var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(v){var D=0;return function(){return D>>0,$jscomp.propertyToPolyfillSymbol[O]=$jscomp.IS_SYMBOL_NATIVE? $jscomp.global.Symbol(O):$jscomp.POLYFILL_PREFIX+I+"$"+O),$jscomp.defineProperty(E,$jscomp.propertyToPolyfillSymbol[O],{configurable:!0,writable:!0,value:D})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(v){v={next:v};v[Symbol.iterator]=function(){return this};return v};$jscomp.underscoreProtoCanBeSet=function(){var v={a:!0},D={};try{return D.__proto__=v,D.a}catch(I){}return!1}; $jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(v,D){v.__proto__=D;if(v.__proto__!==D)throw new TypeError(v+" is not extensible");return v}:null;$jscomp.makeIterator=function(v){var D="undefined"!=typeof Symbol&&Symbol.iterator&&v[Symbol.iterator];return D?D.call(v):$jscomp.arrayIterator(v)};$jscomp.generator={}; $jscomp.generator.ensureIteratorResultIsObject_=function(v){if(!(v instanceof Object))throw new TypeError("Iterator result "+v+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null}; $jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(v){this.yieldResult=v}; $jscomp.generator.Context.prototype.throw_=function(v){this.abruptCompletion_={exception:v,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(v){this.abruptCompletion_={return:v};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(v){this.abruptCompletion_={jumpTo:v};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(v,D){this.nextAddress=D;return{value:v}}; $jscomp.generator.Context.prototype.yieldAll=function(v,D){v=$jscomp.makeIterator(v);var I=v.next();$jscomp.generator.ensureIteratorResultIsObject_(I);if(I.done)this.yieldResult=I.value,this.nextAddress=D;else return this.yieldAllIterator_=v,this.yield(I.value,D)};$jscomp.generator.Context.prototype.jumpTo=function(v){this.nextAddress=v};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0}; $jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(v,D){this.catchAddress_=v;void 0!=D&&(this.finallyAddress_=D)};$jscomp.generator.Context.prototype.setFinallyBlock=function(v){this.catchAddress_=0;this.finallyAddress_=v||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(v,D){this.nextAddress=v;this.catchAddress_=D||0}; $jscomp.generator.Context.prototype.enterCatchBlock=function(v){this.catchAddress_=v||0;v=this.abruptCompletion_.exception;this.abruptCompletion_=null;return v};$jscomp.generator.Context.prototype.enterFinallyBlock=function(v,D,I){I?this.finallyContexts_[I]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=v||0;this.finallyAddress_=D||0}; $jscomp.generator.Context.prototype.leaveFinallyBlock=function(v,D){D=this.finallyContexts_.splice(D||0)[0];if(D=this.abruptCompletion_=this.abruptCompletion_||D){if(D.isException)return this.jumpToErrorHandler_();void 0!=D.jumpTo&&this.finallyAddress_I&&(I=Math.max(I+O,0));Id?h:d},e)}return b(a,1)}function I(a){let b=a.length,c=Array(b),e;for(let d=0;de?e-48:(e&223)-65+10,c[d]=e;return c.reduce((d,g)=>16*d+g,0)}function E(a){if(void 0!=a){var b=[];if(/^(rgb|RGB)/.test(a)){a=a.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(",");for(let c of a)b.push(Number((Number(c)/255).toFixed(1)))}else if(/^#/.test(a)){if(/^#[0-9A-F]{3}$/i.test(a)){let c= "#";a.replace(/[0-9A-F]/ig,function(e){c+=e+e});a=c}/^#[0-9A-F]{6}$/i.test(a)&&a.replace(/[0-9A-F]{2}/ig,function(c){c=I(c);b.push(Number((c/255).toFixed(1)))})}else a instanceof Array&&(b=a);3==b.length&&b.push(1);return b}}function O(a){if(void 0!=a){var b,c=D(a);2==c?b=[[a]]:3==c?b=[a]:4==c&&(b=a);if(b)for(let e of b)for(let d of e)for(let g of d)2==g.length&&g.push(0);return b}}function S(a){if(void 0!=a)return 1==D(a)?[a]:a}function F(a){return a instanceof Array?a:[a]}function J(a){let b=[]; if(a instanceof Array)for(let c in a)b[c]=a[c].toString();else b=[a.toString()];return b}function T(a){switch(typeof a){case "undefined":return!0;case "string":if(0===a.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g,"").length)return!0;break;case "boolean":if(!a)return!0;break;case "number":if(isNaN(a))return!0;break;case "object":if(null===a||0===a.length)return!0;for(var b in a)return!1;return!0}return!1}function ra(a,b){for(a=a.toString();a.length=q?(e=h,a.apply(g,d),c&&(clearTimeout(c),c=null)):c||(c=setTimeout(()=>{e=+new Date;c=null;a.apply(g,d)},q))}}function Ka(a){switch(a){case ea.StartingProcess:return"starting process...";case ea.CheckingBusy:return"checking...";case ea.ProcessStartFailed:return"process start failed!";case ea.ProcessStarted:return"process started"; case ea.LoadingProject:return"loading project...";case ea.ProjectLoaded:return"project loaded"}}function ya(a){"string"===typeof a&&(a=document.getElementById(a));return a}function La(a){return R.isIOSDevice&&R.isInWeixinBrowser?!1:a==la.abnormal||a==la.instance_disconnected}function Z(a,b){return void 0!==a&&null!==a?a:b}function W(){if(!(this instanceof W))return new W;this.reg=Array(8);this.chunk=[];this.size=0;this.reset()}function Ma(a){var b=new W;a=b.sum(a);return b.toArray(a,function(c){return("0"+ (c&255).toString(16)).slice(-2)}).join("")}function za(a){return a.keyCode===fa.Shift&&"ShiftRight"===a.code?fa.RightShift:a.keyCode===fa.Control&&"ControlRight"===a.code?fa.RightControl:a.keyCode===fa.Alt&&"AltRight"===a.code?fa.RightAlt:a.keyCode}var p={None:0,Camera_PlayAnimation:1,Camera_StopAnimation:2,Misc_EnterReportMode:3,Misc_ExitReportMode:4,Misc_SetDateTime:5,Camera_GetCamera:6,Camera_SetState:7,Camera_Set:8,Camera_LookAtBBox:9,Coord_World2Screen:10,Coord_Screen2World:11,InfoTree_SetVisibility:12, InfoTree_Show:13,InfoTree_Hide:14,InfoTree_EnableXRay:15,InfoTree_DisableXRay:16,TileLayer_Add:17,HeatMap_Add:18,HeatMap_Update:19,HeatMap_AddPoints:20,HeatMap_RemovePoints:21,HeatMap_Delete:22,HeatMap_Show:23,HeatMap_Hide:24,HeatMap_Focus:25,HighlightArea_Add:26,HighlightArea_Delete:27,HighlightArea_Update:28,Polygon3D_Add:29,Polygon3D_Delete:30,Misc_AddImageButton:31,Misc_DeleteImageButton:32,Misc_AddAnimatedImageButton:33,Settings_SetMainUIVisibility:34,Settings_SetMousePickMask:35,Tag_Add:36, Tag_Delete:37,Tag_Update:38,Tag_Clear:39,Tag_Focus:40,Beam_Add:41,Beam_Update:42,Beam_Delete:43,Beam_Clear:44,Beam_Focus:45,Beam_Show:350,Beam_Hide:351,Beam_ShowAll:352,Beam_HideAll:353,RadiationPoint_Add:46,RadiationPoint_Update:47,RadiationPoint_Delete:48,RadiationPoint_Clear:49,Polygon_Add:50,Polygon_Update:51,Polygon_Delete:52,Polygon_Clear:53,Polygon_Highlight:54,Polygon_StopHighlight:325,Polygon_Glow:55,Polygon_Focus:56,Tag_FocusAll:57,Tag_Show:58,Tag_Hide:59,Tag_ShowAll:60,Tag_HideAll:61,RadiationPoint_Focus:62, RadiationPoint_FocusAll:63,RadiationPoint_Show:64,RadiationPoint_Hide:65,RadiationPoint_ShowAll:66,RadiationPoint_HideAll:67,Polygon_Show:68,Polygon_Hide:69,Polygon3D_Update:70,Polygon3D_Clear:71,Polygon3D_Focus:72,Polygon3D_Show:73,Polygon3D_Hide:74,Polygon3D_Highlight:75,Polygon3D_Glow:76,Polygon3D_StopGlow:77,HighlightArea_Clear:78,HighlightArea_Focus:79,HighlightArea_Show:80,HighlightArea_Hide:81,Misc_GetVersion:82,TileLayer_Update:83,TileLayer_Delete:84,TileLayer_Focus:85,TileLayer_EnableXRay:86, TileLayer_DisableXRay:87,TileLayer_Show:88,TileLayer_Hide:89,Tag_Get:90,RadiationPoint_Get:91,Polygon_Get:92,Polygon3D_Get:93,HighlightArea_Get:94,TileLayer_Get:95,Beam_Get:96,HeatMap_Get:97,Settings_GetMapMode:98,Settings_SetMapMode:99,Settings_SetMapURL:100,Settings_SetWMTSLayerVisible:320,TileLayer_Actor_Show:101,TileLayer_Actor_Hide:102,TileLayer_Actor_Focus:103,TileLayer_Actor_Highlight:104,TileLayer_Actor_StopHightlight:105,CustomObject_Add:106,CustomObject_Update:107,CustomObject_Delete:108, CustomObject_Get:109,CustomObject_Focus:110,CustomObject_Show:111,CustomObject_Hide:112,CustomObject_SetTintColor:326,HeatMap_Clear:113,CustomTag_Clear:39,CustomTag_Delete:37,CustomTag_Focus:40,CustomTag_FocusAll:57,CustomTag_Show:58,CustomTag_Hide:59,CustomTag_ShowAll:60,CustomTag_HideAll:61,CustomTag_Add:114,CustomTag_Update:115,CustomTag_Get:116,Polyline_Add:117,Polyline_Update:118,Polyline_Delete:119,Polyline_Clear:120,Polyline_Focus:121,Polyline_Get:122,Polyline_Show:123,Polyline_Hide:124,Polyline_ShowAll:125, Polyline_HideAll:126,VideoProjection_Add:127,VideoProjection_Update:128,VideoProjection_Delete:129,VideoProjection_Show:130,VideoProjection_Hide:131,VideoProjection_Get:132,VideoProjection_Focus:133,Misc_PlayVideo:134,Misc_StopPlayVideo:135,Weather_SetParams:136,Weather_GetParams:137,Weather_SetDate:138,Weather_GetDate:139,ODLine_Add:140,ODLine_Update:141,ODLine_Delete:142,ODLine_Clear:143,ODLine_Focus:144,ODLine_Get:145,ODLine_Show:146,ODLine_Hide:147,ODLine_ShowAll:148,ODLine_HideAll:149,Misc_SetWindowResolution:150, Misc_CallBPFunction:151,Settings_SetHighlightColor:152,InfoTree_ShowByGroupId:153,InfoTree_HideByGroupId:154,InfoTree_HighlightByGroupId:155,InfoTree_DeleteByGroupId:156,EditHelper_Start:157,EditHelper_Quit:158,EditHelper_Finish:159,EditHelper_SetParam:160,Settings_SetFovX:161,TileLayer_Actor_ShowAll:162,TileLayer_Actor_HideAll:163,CameraTour_Add:164,CameraTour_Update:165,CameraTour_Play:166,CameraTour_Stop:167,CameraTour_Delete:168,Tag_PopupWindow_Show:169,Tag_PopupWindow_Hide:170,Tag_PopupWindow_ShowAll:171, Tag_PopupWindow_HideAll:172,Settings_SetOceanColor:173,Misc_ShowAllFoliages:174,Misc_HideAllFoliages:175,Tools_StartPolygonClip:176,Tools_StopClip:177,TileLayer_SetAllowClip:178,Panorama_Add:179,Panorama_Update:180,Panorama_Delete:181,Panorama_Clear:182,Panorama_Focus:183,Panorama_Get:184,Decal_Add:185,Decal_Update:186,Decal_Delete:187,Decal_Clear:188,Decal_Focus:189,Decal_FocusAll:190,Decal_Get:191,Misc_PlayMovie:192,Misc_StopMovie:193,Tools_SetMeasurement:194,Tools_StartMeasurement:195,Tools_StopMeasurement:196, Viewshed_Add:197,Viewshed_Update:198,Viewshed_Focus:199,Viewshed_Delete:200,Viewshed_Clear:201,Viewshed_Get:202,TileLayer_SetStyle:203,Tools_LineIntersect:204,Coord_PCS2GCS:205,Coord_GCS2PCS:206,DynamicWater_Add:207,DynamicWater_Update:208,DynamicWater_Focus:209,DynamicWater_Delete:210,DynamicWater_Clear:211,DynamicWater_Get:212,DynamicWater_Show:213,DynamicWater_Hide:214,Quit:215,TileLayer_Actor_Unhighlight:216,InfoTree_Get:217,Reset:218,SaveProject:225,CustomObject_Clear:219,CustomObject_Highlight:220, CustomObject_Unhighlight:221,CustomObject_StopHighlight:222,CustomObject_CallFunction:223,CustomObject_AddByTileLayer:224,Tools_StartPlaneClip:226,Tools_StopPlaneClip:228,Tools_StartVolumeClip:229,Tools_UpdateVolumeClip:230,Tools_StopVolumeClip:231,Tools_StartSkylineAnalysis:232,Tools_StopSkylineAnalysis:233,Tools_ExportSkyline:234,Tools_StartViewshedAnalysis:235,Tools_StopViewshedAnalysis:236,Camera_Move:237,TileLayer_SetCollision:238,TileLayer_Modifier_Add:239,TileLayer_Modifier_Update:240,TileLayer_Modifier_Delete:241, TileLayer_Modifier_Clear:242,Misc_StartProcess:243,Settings_SetCampassVisible:244,Tools_StartGeometryEdit:245,Tools_StopGeometryEdit:246,Settings_SetEnableInteract:247,Camera_PauseAnimation:248,Camera_ResumeAnimation:249,Settings_SetInteractiveMode:250,CameraTour_Pause:251,CameraTour_Resume:252,Settings_SetTerrainAlpha:253,CustomMesh_Add:254,CustomMesh_Delete:255,CustomMesh_Clear:256,CustomMesh_Update:257,CustomMesh_Get:258,CustomMesh_Focus:259,CustomMesh_Show:260,CustomMesh_Hide:261,CustomMesh_ShowAll:262, CustomMesh_HideAll:263,Settings_EnableCameraMovingEvent:264,Marker_Add:265,Marker_Update:266,Marker_Get:267,Marker_Delete:268,Marker_Clear:269,Marker_Focus:270,Marker_FocusAll:271,Marker_Show:272,Marker_Hide:273,Marker_ShowAll:274,Marker_HideAll:275,Marker_ShowPopupWindow:276,Marker_HidePopupWindow:277,Marker_ShowAllPopupWindow:278,Marker_HideAllPopupWindow:279,TileLayer_SetViewportVisible:280,TileLayer_GetObjectIDs:281,Polygon3D_StopHighlight:282,Tools_StartFloodFill:283,Tools_StopFloodFill:284, FloodFill_Add:285,FloodFill_Delete:286,FloodFill_Clear:287,FloodFill_Update:288,FloodFill_Get:289,FloodFill_Focus:290,FloodFill_Show:291,FloodFill_Hide:292,FloodFill_ShowAll:293,FloodFill_HideAll:294,Cesium3DTile_Add:295,Cesium3DTile_Delete:296,Cesium3DTile_Clear:297,Cesium3DTile_Update:298,Cesium3DTile_Get:299,Cesium3DTile_Focus:300,Cesium3DTile_Show:301,Cesium3DTile_Hide:302,Cesium3DTile_ShowAll:303,Cesium3DTile_HideAll:304,TileLayer_GetActorInfoFromDB:305,ShapeFileLayer_Add:306,ShapeFileLayer_Delete:307, ShapeFileLayer_Clear:308,ShapeFileLayer_Update:309,ShapeFileLayer_Get:310,ShapeFileLayer_Focus:311,ShapeFileLayer_Show:312,ShapeFileLayer_Hide:313,ShapeFileLayer_ShowAll:314,ShapeFileLayer_HideAll:315,ShapeFileLayer_OpenShapeFileLayer:316,Weather_SimulateTime:317,TileLayer_Actor_GetInfo:318,Camera_GetAnimationList:319,TileLayer_CutPolygon_Add:321,TileLayer_CutPolygon_Update:322,TileLayer_CutPolygon_Delete:323,TileLayer_CutPolygon_Clear:324,Marker3D_Add:327,Marker3D_Delete:328,Marker3D_Clear:329,Marker3D_Update:330, Marker3D_Get:331,Marker3D_Focus:332,Marker3D_Show:333,Marker3D_Hide:334,Marker3D_ShowAll:335,Marker3D_HideAll:336,Camera_GetAnimationImage:337,Tools_ReplaceTexture:338,Tools_RestoreTexture:339,Light_Add:340,Light_Delete:341,Light_Update:343,Light_Get:344,Light_Clear:342,Light_Focus:345,Light_Show:346,Light_Hide:347,Light_ShowAll:348,Light_HideAll:349,WaterMesh_Add:354,WaterMesh_Update:355,WaterMesh_Delete:356,WaterMesh_Clear:357,WaterMesh_Get:358,WaterMesh_Focus:359,WaterMesh_Show:360,WaterMesh_Hide:361, WaterMesh_ShowAll:362,WaterMesh_HideAll:363,CustomObject_StartMove:364,CustomObject_StopMove:365,CustomObject_OverrideMaterial:366,CustomObject_RestoreMaterial:367,Settings_SetReport:368,Settings_GetReport:369,Settings_SetControl:370,Settings_GetControl:371,Settings_SetPostProcess:372,Settings_GetPostProcess:373,Settings_SetCamera:374,Settings_GetCamera:375,CustomObject_SetViewportVisible:376,WaterFlowField_Add:377,WaterFlowField_Update:378,WaterFlowField_Delete:379,WaterFlowField_Clear:380,WaterFlowField_Get:381, WaterFlowField_Focus:382,WaterFlowField_Show:383,WaterFlowField_Hide:384,TileLayer_SetViewHeightRange:385,Tools_StartVisiblityAnalysis:386,Tools_StopVisiblityAnalysis:387,Tools_StartViewDomeAnalysis:388,Tools_StopViewDomeAnalysis:389,Tools_StartCutFillAnalysis:390,Tools_StopCutFillAnalysis:391,Tools_StartSunshineAnalysis:392,Tools_StopSunshineAnalysis:393,Tools_StartTerrainSlopeAnalysis:394,Tools_StopTerrainSlopeAnalysis:395,Tools_StartContourLineAnalysis:396,Tools_StopContourLineAnalysis:397,TileLayer_GetAllFlattenData:398, Marker_SetupPOIAttachment:399,HeatMap3D_Add:400,HeatMap3D_Update:401,HeatMap3D_Focus:402,HeatMap3D_Delete:403,HeatMap3D_Show:404,HeatMap3D_Hide:405,HeatMap3D_Get:406,HeatMap3D_Clear:407,ShapeFileLayer_HighlightFeature:408,ShapeFileLayer_UnHighlightFeature:409,ShapeFileLayer_FocusFeature:410,ShapeFileLayer_GetFeatureInfo:411,Misc_EnterMultiViewport:412,Misc_ExitMultiViewport:413,Misc_SetActivateMultiViewport:414,Misc_GetActivateMultiViewport:415,Panorama_Enter:416,Panorama_Exit:417,Panorama_Switch:418, VTPKService_Get:419,VTPKService_Set:420,SimulateTest__:421,Settings_CursorAutoSync:422,InfoTree_Focus:423,Marker_ShowByGroupId:424,Marker_HideByGroupId:425,Marker_DeleteByGroupId:426,ImageryLayer_Init:427,ImageryLayer_Add:428,Camera_LockBBox:429,Camera_UnLockBBox:430,Settings_SetWMTSLayerOpacity:431,Camera_EnterEarthCapture:432,Camera_ExitEarthCapture:433,Tools_AnalysisPopupAttributes:434,Tools_AnalysisCloseAttributes:435,ImageryLayer_Show:436,ImageryLayer_Hide:437,ImageryLayer_Delete:438,Settings_GetInteractiveMode:439, VideoProjection_Clear:440,Misc_UpdateMultiViewport:441,Misc_downloadPakFiles:442,Settings_SetCampassPosition:443,Polygon3D_ShowAll:444,Polygon3D_HideAll:445,GeoJSONLayer_Add:446,GeoJSONLayer_Show:447,GeoJSONLayer_Hide:448,GeoJSONLayer_Delete:449,Vehicle_Add:450,Vehicle_Update:451,Vehicle_AddWayPoints:452,Vehicle_ClearWayPoints:453,Vehicle_Focus:454,Vehicle_Show:455,Vehicle_Hide:456,Vehicle_Get:457,Vehicle_Delete:458,Vehicle_Clear:459,Vehicle_MoveTo:460,Misc_ConvexHull2D:461,HeatMap_AddVoxels:462, TileLayer_GetCollision:463,TileLayer_SetPointSize:464,Misc_QueryActorOrMaterial:465,CustomObject_StartGlow:466,CustomObject_StopGlow:467,Coord_Transform:468,RegisterJsCommunication:469,UnRegisterJsCommunication:470,Vehicle_CallBatchFunction:471,Camera_FlyAround:472,Marker3D_ShowByGroupId:473,Marker3D_HideByGroupId:474,Marker3D_DeleteByGroupId:475,Camera_EnterWorldAnimation:476,Camera_ExitWorldAnimation:477,TileLayer_SetDecalAttach:478,Settings_SetGameBoardVisible:479,Antenna_Add:480,Antenna_Update:481, Antenna_Get:482,Antenna_Focus:483,Antenna_Delete:484,Antenna_Clear:485,Antenna_Show:486,Antenna_Hide:487,TileLayer_Clear:499,Settings_GetWKT:508,ImageryLayer_AddCustom:510,GeoJSONLayer_Focus:511,ImageryLayer_Focus:512,Marker_SetViewPort:513,Command_End:1E4},Aa=!1;(()=>{if(!Aa){Aa=!0;for(let a in p)p[p[a]]=a}})();class Na{constructor(a,b){this.id=a;this.visible=b}}class Oa{constructor(a,b,c,e){this.id=a.toString();this.coordinate=b;this.radius=c;this.heatValue=e}}class Pa{constructor(a,b,c,e,d,g,h, q,k,f,l,t,x,r){this.id=a.toString();this.coordinate=b;this.imagePath=c;this.imageSize=e;this.url=d;this.text=g;this.range=h||[1,1E5];this.showLine=!!q;this.textColor=k||[0,0,0,1];this.textBackgroundColor=f||[1,1,1,.85];this.textBorderColor=l||[0,0,0,0];this.textRange=t||1E5;this.hoverImagePath=x;this.autoHidePopupWindow=r||!0}}class Qa{constructor(a,b,c){this.url=a;this.width=b;this.height=c}}class Ra{constructor(a,b,c,e,d,g,h,q){this.id=a.toString();this.coordinate=b;this.contentURL=c.url;this.contentSize= [c.width,c.height];this.popupURL=e.url;this.popupSize=[e.width,e.height];this.pivot=d;this.range=g;this.autoHidePopupWindow=h||!0;this.popupPos=q}}class Sa{constructor(a,b,c,e,d,g){this.id=a.toString();this.coordinates=O(b);this.color=E(c);this.heightRange=e;this.intensity=d;this.depthTest=g||!0}}class Ta{constructor(a,b,c,e,d,g,h,q){this.id=a.toString();this.x=b;this.y=c;this.width=e;this.height=d;this.normalImage=g;this.hoverImage=h;this.tooltip=q}}class Ua{constructor(a,b,c,e,d,g,h,q,k){this.id= a.toString();this.x=b;this.y=c;this.width=e;this.height=d;this.imageSequecePath=g;this.imageSequeceLength=h;this.loop=!!q;this.interactable=!!k}}class Va{constructor(a,b,c,e,d,g,h){this.id=a.toString();this.duration=b;this.thickness=c;this.interval=e;this.velocity=d;this.color=E(g);this.coordinates=h}}class Wa{constructor(a,b,c,e,d,g){this.id=a.toString();this.coordinate=b;this.radius=c;this.rippleNumber=e;this.color=E(d);this.brightness=g}}class Xa{constructor(a,b,c,e,d,g,h,q){this.id=a.toString(); this.style=b;this.coordinates=O(c);this.color=E(e);this.height=d;this.intensity=g;this.tillingX=h;this.tillingY=q}}class Ya{constructor(a,b,c,e,d,g,h,q,k,f){this.id=a.toString();this.color=E(b);this.coordinates=c;this.style=void 0==e?0:e;if(0>this.style||5this.style||10{this.isMainThreadBusy?this._callNextForTimeout(5E3):this.callNext()},a)}}class Q{constructor(a,b,c){this.int=a;this.type=b;this.colorProps=c;this._useBatchUpdate=!1;this._tempUpdateData=[]}_checkCommand(a){a=this.type+a;let b=p[a];void 0==b&&this.int.logWithColor("red",`Invalid command: ${a}`);return b}_convertFilePath(a){return this.int.resourcesPath?a.replace("@path:",this.int.resourcesPath+"/"):a}_processProps(a){a=F(a);for(var b of a)for(let e in b)if("string"== typeof b[e]&&b[e].startsWith("@path:")&&(b[e]=this._convertFilePath(b[e])),"imagesArray"==e)for(let d=0;da[3]||a[1]>a[4]||a[2]>a[5])return!1}else return!1;return!0}add(a,b,c,e,d,g,h,q,k,f,l){return this._checkBBox(b)?"undefined"==typeof d||"function"==typeof d?this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:-1},l):0==d||1==d?this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:d,textureSize:g,opacityMode:h,opacityRange:q, blur:k,colors:f},l):this.int.call({command:p.HeatMap_Add,id:a.toString(),bbox:b,range:c,data:F(e),style:-1},l):(this.int.logWithColor("red","Invalid bbox value"),!1)}update(a,b,c,e,d){a={command:p.HeatMap_Update,id:a.toString()};if(b){if(!this._checkBBox(b))return this.int.logWithColor("red","Invalid bbox value"),!1;a.bbox=b}c&&(a.range=c);e&&(a.data=F(e));return this.int.call(a,d)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a, b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}addPoints(a,b,c){return this.int.call({command:p.HeatMap_AddPoints,id:a,data:F(b)},c)}removePoints(a,b,c){return this.int.call({command:p.HeatMap_RemovePoints,id:a,pointIds:F(b)},c)}setRange(a,b,c){return this.int.call({command:p.HeatMap_Update,id:a,range:b},c)}setBBox(a,b,c){return this._checkBBox(b)?this.int.call({command:p.HeatMap_Update,id:a,bbox:b},c):(this.int.logWithColor("red","Invalid bbox value"), !1)}}class xb extends Q{constructor(a){super(a,"HeatMap3D")}_checkBBox(a){if(a instanceof Array){if(6!=a.length||a[0]>a[3]||a[1]>a[4]||a[2]>a[5])return!1}else return!1;return!0}add(a,b){return super._add(a,b)}addVoxels(a,b){return this.int.call({command:p.HeatMap_AddVoxels,data:F(a)},b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a, b)}get(a,b){return super._get(a,b)}setDisplayMode(a,b,c){return this.int.call({command:p.HeatMap3D_Update,id:a,displayMode:b},c)}}class yb extends Q{constructor(a){super(a,"HighlightArea","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}get(a,b){return super._get(a,b)}setColor(a,b,c){return super._updateOneProp(a, "color",E(b),c)}setCoordinates(a,b,c){return super._updateOneProp(a,"coordinates",b,c)}setHeightRange(a,b,c){return super._updateOneProp(a,"heightRange",b,c)}setIntensity(a,b,c){return super._updateOneProp(a,"intensity",b,c)}setDepthTest(a,b,c){return super._updateOneProp(a,"depthTest",b,c)}}class zb extends Q{constructor(a){super(a,"ImageryLayer")}init(a,b){return this.int.call({command:p.ImageryLayer_Init,xmlPath:a.xmlUrl,layerName:a.layerName,tileMatrixName:a.tileMatrixName,ogcEPSG:a.ogcEPSG,cachePath:a.cachePath, mapMode:a.mapMode,renderMode:a.renderMode},b)}add(a,b){const c=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){return a instanceof Array?new Promise(e=>$jscomp.asyncExecutePromiseGeneratorFunction(function*(){let d;for(let g of a)if(d=yield c.addOne(g,b),0!=d.result){e(d);break}e(d)})):c.addOne(a,b)})}addOne(a,b){return this.int.call({command:p.ImageryLayer_Add,id:a.id,url:a.url,xmlPath:a.xmlPath,layerName:a.layerName,tileMatrixName:a.tileMatrixName,ogcEPSG:a.ogcEPSG},b)}show(a, b){return super._show(a,b)}hide(a,b){return super._hide(a,b)}delete(a,b){return super._delete(a,b)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}}class Ab extends Q{constructor(a){super(a,"Light","color")}add(a,b){return super._add(a,b)}update(a,b){return super._update(a,b)}delete(a,b){return super._delete(a,b)}clear(a){return super._clear(a)}focus(a,b,c,e,d){return super._focus(a,b,c,e,d)}show(a,b){return super._show(a,b)}showAll(a){return super._showAll(a)}hide(a,b){return super._hide(a,b)}hideAll(a){return super._hideAll(a)}get(a, b){return super._get(a,b)}}class Bb extends Q{constructor(a){super(a,"Marker","fontColor|fontOutlineColor|textBackgroundColor|lineColor")}add(a,b){this._fixMarkerData(a,"add");return super._add(a,b)}_fixMarkerProperty(a,b){a.textColor&&(a.fontColor=a.textColor);a.url&&(a.popupURL=a.url);a.dispalyMode&&(a.displayMode=a.dispalyMode);T(a.displayMode)&&"add"==b&&(a.displayMode=4);a.popupURL&&!a.popupSize&&"add"==b&&(a.popupSize=[600,400]);0==a.showLine&&(a.lineSize=[0,0]);1!=a.showLine||null!=a.lineSize&& void 0!=a.lineSize||(a.lineSize=[2,100]);4==a.displayMode&&0{Ca="zh"===a?"zh":"en";va={};a="zh"==Ca;for(let b in Da){let c=Da[b];va[b]=a?c[0]:c[1]}for(let b of H.onLanguageChangedCallbacks)"function"==typeof b&&b()};H.getString=a=>va[a];class Qb{constructor(a){this.int=a;this._useOldDataFormat=!1}useOldDataFormat(a){this._useOldDataFormat=a||!0}get(a){return this.int.call0(p.Camera_GetCamera,a)}_setByArray(a,b,c){return this.set(a[0],a[1],a[2],a[3],a[4],b,c)}_setByObject(a,b,c){return this.set(a.x,a.y,a.z,a.pitch,a.yaw,b,c)}set(a,b,c,e,d, g,h){if(a instanceof Array&&5<=a.length)return this._setByArray(a,b,c);if("object"==typeof a&&a.hasOwnProperty("x"))return this._setByObject(a,b,c);"function"==typeof g&&(h=g,g=void 0);if(this._useOldDataFormat){let q=e;e=d;d=q}return this.int.call({command:p.Camera_Set,coordinate:[a,b,c],pitch:e||0,yaw:d||0,flyTime:g},h)}lookAt(a,b,c,e,d,g,h,q){"function"==typeof h&&(q=h,h=void 0);if(this._useOldDataFormat){let k=d;d=g;g=k}return this.int.call({command:p.Camera_Set,coordinate:[a,b,c],distance:e, pitch:d||0,yaw:g||0,flyTime:h},q)}lookAtBBox(a,b,c,e,d){"function"==typeof e&&(d=e,e=void 0);if(this._useOldDataFormat){let g=b;b=c;c=g}return this.int.call({command:p.Camera_LookAtBBox,bbox:a,pitch:b||0,yaw:c||0,flyTime:e},d)}playAnimation(a,b){return this.int.call({command:p.Camera_PlayAnimation,id:a},b)}stopAnimation(a){return this.int.call0(p.Camera_StopAnimation,a)}pauseAnimation(a){return this.int.call0(p.Camera_PauseAnimation,a)}resumeAnimation(a){return this.int.call0(p.Camera_ResumeAnimation, a)}getAnimationList(a){return this.int.call0(p.Camera_GetAnimationList,a)}getAnimationImage(a,b){return this.int.call({command:p.Camera_GetAnimationImage,name:a},b)}moveForward(a){return this.int.call({command:p.Camera_Move,moveForward:!0},a)}moveBackward(a){return this.int.call({command:p.Camera_Move,moveBackward:!0},a)}moveLeft(a){return this.int.call({command:p.Camera_Move,moveLeft:!0},a)}moveRight(a){return this.int.call({command:p.Camera_Move,moveRight:!0},a)}moveUp(a){return this.int.call({command:p.Camera_Move, moveUp:!0},a)}moveDown(a){return this.int.call({command:p.Camera_Move,moveDown:!0},a)}turnLeft(a){return this.int.call({command:p.Camera_Move,turnLeft:!0},a)}turnRight(a){return this.int.call({command:p.Camera_Move,turnRight:!0},a)}turnUp(a){return this.int.call({command:p.Camera_Move,turnUp:!0},a)}turnDown(a){return this.int.call({command:p.Camera_Move,turnDown:!0},a)}stop(a){return this.int.call({command:p.Camera_Move,stop:!0},a)}getEulerAngle(a,b){const c=360/(2*Math.PI);let e=b[0]-a[0],d=b[1]- a[1];return[Math.atan2(b[2]-a[2],Math.sqrt(e*e+d*d))*c,Math.atan2(e,d)*c-90,0]}lockByBBox(a,b){return this.int.call({command:p.Camera_LockBBox,bbox:a},b)}unlock(a){return this.int.call({command:p.Camera_UnLockBBox},a)}flyAround(a,b,c,e,d){return this.int.call({command:p.Camera_FlyAround,coordinate:a,rotation:b||[0,90,0],distance:c||1E3,time:e||10},d)}enterWorld(a){return this.int.call({command:p.Camera_ExitWorldAnimation},a)}exitWorld(a){return this.int.call({command:p.Camera_EnterWorldAnimation}, a)}}class Rb{constructor(a){this.int=a}screen2World(a,b,c){return this.int.call({command:p.Coord_Screen2World,screenPosition:[a,b]},c)}world2Screen(a,b,c,e){return this.int.call({command:p.Coord_World2Screen,worldlocation:[a,b,c]},e)}gcs2pcs(a,b,c){"function"==typeof b&&(c=b);T(b)&&(b=1);if(1==b)return this.int.call({command:p.Coord_GCS2PCS,coordinates:S(a)},c);2==b?this.transform(S(a),2,0,c):3==b?this.transform(S(a),3,0,c):console.error("\u672a\u77e5\u5750\u6807\u7cfb\u7c7b\u578b")}pcs2gcs(a,b,c){"function"== typeof b&&(c=b);T(b)&&(b=1);if(1==b)return this.int.call({command:p.Coord_PCS2GCS,coordinates:S(a)},c);2==b?this.transform(S(a),0,2,c):3==b?this.transform(S(a),0,3,c):console.error("\u672a\u77e5\u5750\u6807\u7cfb\u7c7b\u578b")}transform(a,b,c,e){return this.int.call({command:p.Coord_Transform,coordinates:S(a),src:b,dest:c},e)}}class Sb{constructor(a){this.int=a}start(a){return this.int.call0(p.EditHelper_Start,a)}cancel(a){return this.int.call0(p.EditHelper_Quit,a)}finish(a,b){return this.int.call({command:p.EditHelper_Finish, withOffset:a||!0},b)}setParam(a,b,c,e){return this.int.call({command:p.EditHelper_SetParam,lineType:a,buildType:b,color:E(c)},e)}}class Tb{constructor(a){this.int=a}setVisibility(a,b){return this.int.call({command:p.InfoTree_SetVisibility,layers:F(a)},b)}show(a,b){return this.int.call({command:p.InfoTree_Show,ids:J(a)},b)}hide(a,b){return this.int.call({command:p.InfoTree_Hide,ids:J(a)},b)}enableXRay(a,b,c){return this.int.call({command:p.InfoTree_EnableXRay,ids:F(a),color:E(b)},c)}disableXRay(a, b){return this.int.call({command:p.InfoTree_DisableXRay,ids:F(a)},b)}showByGroupId(a,b){return this.int.call({command:p.InfoTree_ShowByGroupId,ids:J(a)},b)}hideByGroupId(a,b){return this.int.call({command:p.InfoTree_HideByGroupId,ids:J(a)},b)}highlightByGroupId(a,b){return this.int.call({command:p.InfoTree_HighlightByGroupId,ids:J(a)},b)}deleteByGroupId(a,b){return this.int.call({command:p.InfoTree_DeleteByGroupId,ids:J(a)},b)}get(a){return this.int.call0(p.InfoTree_Get,a)}focus(a,b){return this.int.call({command:p.InfoTree_Focus, ids:J(a)},b)}}class Ub{constructor(a){this.int=a;this.apiVersion="6.0";this.apiVersionServer=""}isApiVersionMatched(){return"1.0.0"==this.apiVersionServer||this.apiVersionServer==this.int.getVersion()}addImageButtons(a,b){return this.int.call({command:p.Misc_AddImageButton,data:F(a)},b)}deleteImageButtons(a,b){return this.int.call({command:p.Misc_DeleteImageButton,ids:J(a)},b)}addAnimatedImageButtons(a,b){return this.int.call({command:p.Misc_AddAnimatedImageButton,data:F(a)},b)}setApiVersionReceived(a){this.int.onApiVersionReceived= a}playVideo(a,b,c,e,d,g,h){return this.int.call({command:p.Misc_PlayVideo,data:[{id:a.toString(),position:[b,c],size:[e,d],url:g}]},h)}stopPlayVideo(a,b){return this.int.call({command:p.Misc_StopPlayVideo,ids:J(a)},b)}playMovie(a,b,c){"function"==typeof b&&(c=b,b=!1);return this.int.call({command:p.Misc_PlayMovie,loop:b,url:a},c)}stopMovie(a){return this.int.call({command:p.Misc_StopMovie},a)}playVideoAlone(a,b,c){let e=[];e.push(`--URL=${a}`);"object"==typeof b&&(b.hasOwnProperty("mute")&&b.mute&& e.push("--Mute"),b.hasOwnProperty("x")&&-1!=b.x&&e.push(`--Left=${b.x}`),b.hasOwnProperty("y")&&-1!=b.y&&e.push(`--Top=${b.y}`),b.hasOwnProperty("cx")&&0!=b.cx&&e.push(`--Width=${b.cx}`),b.hasOwnProperty("cy")&&0!=b.cy&&e.push(`--Height=${b.cy}`),b.hasOwnProperty("title")&&b.title&&e.push(`--Title="${b.title}"`),b.hasOwnProperty("opacity")&&0!=b.opacity&&e.push(`--Opacity=${b.opacity}`),b.hasOwnProperty("style")&&e.push(`--FormBorderStyle=${b.style}`),b.hasOwnProperty("hideBuffering")&&b.hideBuffering&& e.push("--HideBuffering"),b.hasOwnProperty("maximizeBox")&&b.maximizeBox&&e.push("--MaximizeBox"),b.hasOwnProperty("notTopmost")&&b.notTopmost&&e.push("--NotTopmost"));a=e.join(" ");return this.startProcess("$VlcPlayer",a,!0,c)}stopPlayVideoAlone(a,b){return this.int.test(2,a,b)}setWindowResolution(a,b,c){return this.int.call({command:p.Misc_SetWindowResolution,cx:a,cy:b,mode:0},c)}callBPFunction(a,b){return this.int.call({command:p.Misc_CallBPFunction,data:F(a)},b)}enterReportMode(a){return this.int.call0(p.Misc_EnterReportMode)}exitReportMode(a){return this.int.call0(p.Misc_ExitReportMode, a)}showAllFoliages(a){return this.int.call0(p.Misc_ShowAllFoliages,a)}hideAllFoliages(a){return this.int.call0(p.Misc_HideAllFoliages,a)}startProcess(a,b,c,e){"function"==typeof c&&(e=c,c=!0);return this.int.call({command:p.Misc_StartProcess,appName:a,commandLine:b,visible:c},e)}enterMultiViewportMode(a,b,c,e){if(null==b||void 0==b)b="#DEA309";if(null==c||void 0==c)c=2;return this.int.call({command:p.Misc_EnterMultiViewport,type:a,lineColor:E(b),lineThickness:c},e)}exitMultiViewportMode(a){return this.int.call({command:p.Misc_ExitMultiViewport}, a)}setActiveViewport(a,b){return this.int.call({command:p.Misc_SetActivateMultiViewport,viewIndex:F(a)},b)}getActiveViewport(a){return this.int.call({command:p.Misc_GetActivateMultiViewport},a)}setMultiviewportInteractSync(a,b){this.setCameraFollow4Viewport(a,b)}setCameraFollow4Viewport(a,b){return this.int.call({command:p.Misc_UpdateMultiViewport,moverTogether:a},b)}downloadPakFiles(a,b){return this.int.call({command:p.Misc_downloadPakFiles,ids:F(a)},b)}getConvexPolygon(a,b){return this.int.call({command:p.Misc_ConvexHull2D, data:F(a)},b)}getMaterial(a,b){return this.int.call({command:p.Misc_QueryActorOrMaterial,idOrPaths:F(a)},b)}getBPFunction(a,b){return this.int.call({command:p.Misc_QueryActorOrMaterial,idOrPaths:F(a)},b)}startPolygonClip(a,b,c){return this.int.tools.startPolygonClip(a,b,c)}stopClip(a){return this.int.tools.stopClip(a)}playAnimation(a,b){return this.int.camera.playAnimation(a,b)}stopAnimation(a){return this.int.camera.stopAnimation(a)}setDateTime(a,b,c,e,d,g,h){return this.int.weather.setDateTime(a, b,c,e,d,g,h)}setQueryToolState(a,b){return this.int.call({"c.ommand":p.Settings_SetMousePickMask,mouseClick:a},b)}setCampassVisible(a,b){return this.int.settings.setCampassVisible(a,b)}setMainUIVisibility(a,b){return this.int.settings.setMainUIVisibility(a,b)}setMousePickMask(a,b){return this.int.settings.setMousePickMask(a,b)}}class Vb{constructor(a){this.int=a}setMapMode(a,b,c){b=b||{};return this.int.call({command:p.Settings_SetMapMode,mode:a,serviceType:b.serviceType||0,coordType:b.coordType|| 0,mapPoint:b.mapPoint||[0,0],longitude:b.longitude||0,latitude:b.latitude||0,cache:b.cache||":memory:",style:b.style||"mapbox://styles/mapbox/streets-v10",groundHeight:b.groundHeight||0,renderMode:b.renderMode||0,decalMode:b.decalMode||1,serverURL:b.serverURL,coordOrder:b.coordOrder,maxLevel:b.maxLevel},c)}getMapMode(a){return this.int.call0(p.Settings_GetMapMode,a)}setWMTSLayerVisible(a,b){this.setwmtsLayerVisible(a,b)}setwmtsLayerVisible(a,b){return this.int.call({command:p.Settings_SetWMTSLayerVisible, data:F(a)},b)}setWMTSLayerOpacity(a,b){return this.int.call({command:p.Settings_SetWMTSLayerOpacity,data:F(a)},b)}setMapURL(a,b){return this.int.call({command:p.Settings_SetMapURL,url:a},b)}highlightColor(a,b){return this.setHighlightColor(a,b)}setHighlightColor(a,b){return this.int.call({command:p.Settings_SetHighlightColor,color:E(a)},b)}setFovX(a,b){return this.int.call({command:p.Settings_SetFovX,value:a},b)}setOceanColor(a,b){return this.int.call({command:p.Settings_SetOceanColor,color:E(a)}, b)}setEnableInteract(a,b){return this.int.call({command:p.Settings_SetEnableInteract,enableInteract:a},b)}setInteractiveMode(a,b){return this.int.call({command:p.Settings_SetInteractiveMode,mode:a},b)}setRoleLocation(a,b,c){return this.int.call({command:p.Settings_SetInteractiveMode,mode:1,location:a,rotation:b},c)}getInteractiveMode(a){return this.int.call({command:p.Settings_GetInteractiveMode},a)}setCampassVisible(a,b){return this.int.call({command:p.Settings_SetCampassVisible,visible:a},b)}setCampassPosition(a, b,c){return this.int.call({command:p.Settings_SetCampassPosition,position:[a,b]},c)}setMainUIVisibility(a,b){return this.int.call({command:p.Settings_SetMainUIVisibility,visible:a},b)}setMousePickMask(a,b){let c=!1,e=!1,d=!1;a&sa.MouseClick&&(c=!0);a&sa.MouseMove&&(e=!0);a&sa.MouseHover&&(d=!0);return this.int.call({command:p.Settings_SetMousePickMask,mouseClick:c,mouseMove:e,mouseHover:d},b)}setTerrainAlpha(a,b){return this.int.call({command:p.Settings_SetTerrainAlpha,alpha:a},b)}setEnableCameraMovingEvent(a, b,c){return this.int.call({command:p.Settings_EnableCameraMovingEvent,bEnable:a,monitorThreshold:b},c)}setLabelLayer(a,b){return this.int.call({command:p.VTPKService_Set,vtpk:a},b)}getLabelLayer(a){return this.int.call({command:p.VTPKService_Get},a)}removeLabelLayer(a){return this.int.call({command:p.VTPKService_Set,vtpk:""},a)}setRenderedCursorVisible(a,b){this.setCursorAutoSync(a,b)}setCursorAutoSync(a,b){return this.int.call({command:p.Settings_CursorAutoSync,useSoftwareCursor:a},b)}setScreenControlsVisible(a, b){return this.int.call({command:p.Settings_SetGameBoardVisible,visible:a},b)}getProjectWKT(a){return this.int.call({command:p.Settings_GetWKT},a)}}class Wb{constructor(a){this.int=a}setReportMode(a,b,c,e){return this.int.call({command:p.Settings_SetReport,alignment:a,playMode:b,moveInOtherView:c},e)}getReportMode(a){return this.int.call({command:p.Settings_GetReport},a)}setControlMode(a,b,c,e,d,g){return this.int.call({command:p.Settings_SetControl,speed:a,yawSpeed:b,rotateSelf:c,useFemale:e,viewType:d}, g)}getControlMode(a){return this.int.call({command:p.Settings_GetControl},a)}setPostProcessMode(a,b){let c=1E3,e=1E3;0<=a.terrainGlobalAlpha&&1>=a.terrainGlobalAlpha&&(c=1E3*a.terrainGlobalAlpha);0<=a.osgbGlobalAlpha&&1>=a.osgbGlobalAlpha&&(e=1E3*a.osgbGlobalAlpha);return this.int.call({command:p.Settings_SetPostProcess,globalIllumination:a.globalIllumination,chromaticAberration:a.chromaticAberration,ambientRadius:a.ambientRadius,ambientFadeDistance:a.ambientFadeDistance,exposureEnabled:a.exposureEnabled, exposureCompensation:a.exposureCompensation,depthFiethSwitch:a.depthFiethSwitch,focalLength:a.focalLength,aperture:a.aperture,deepBlur:a.deepBlur,contrast:a.contrast,saturation:a.saturation,lensFlareIntensity:a.lensFlareIntensity,ambientIntensity:a.ambientIntensity,bloomIntensity:a.bloomIntensity,lutMode:a.lutMode,lutIntensity:a.lutIntensity,darkCorner:a.darkCorner,screenPercentage:a.screenPercentage,terrainGlobalAlpha:c,terrainGlobalLitStatus:a.terrainGlobalLitStatus,osgbGlobalLitStatus:a.osgbGlobalLitStatus, osgbGlobalAlpha:e,antiAliasing:a.antiAliasing,tonemapper:a.tonemapper,postProcessEffects:a.postProcessEffects,dofMode:a.dofMode,wireThickness:a.wireThickness,receiveDecalMode:a.receiveDecalMode},b)}getPostProcessMode(a){return this.int.call({command:p.Settings_GetPostProcess},a)}setCameraMode(a,b,c,e,d){e&&"function"==typeof e&&(d=e);return this.int.call({command:p.Settings_SetCamera,nearClipPlane:a,fovH:b,minCamHeight:c,maxCamHeight:e},d)}getCameraMode(a){return this.int.call({command:p.Settings_GetCamera}, a)}setMapMode(a,b,c){b=b||{};return this.int.call({command:p.Settings_SetMapMode,mode:a,serviceType:b.serviceType||0,coordType:b.coordType||0,mapPoint:b.mapPoint||[0,0],longitude:b.longitude||0,latitude:b.latitude||0,cache:b.cache||":memory:",style:b.style||"mapbox://styles/mapbox/streets-v10",groundHeight:b.groundHeight||0,renderMode:b.renderMode||0,decalMode:b.decalMode||1,serverURL:b.serverURL,coordOrder:b.coordOrder,maxLevel:b.maxLevel},c)}getMapMode(a){return this.int.call0(p.Settings_GetMapMode, a)}}class Xb{constructor(a){this.int=a}startPolygonClip(a,b,c){return this.int.call({command:p.Tools_StartPolygonClip,data:F({id:"0",coordinates:O(a),toggleImageCut:b})},c)}startPlaneClip(a,b,c,e,d){return this.int.call({command:p.Tools_StartPlaneClip,location:a,rotation:b,isShowPlane:c,isEdit:e},d)}startVolumeClip(a,b,c,e,d,g){return this.int.call({command:p.Tools_StartVolumeClip,bbox:a,rotation:d,value:b,isShowPlane:c,isEdit:e},g)}updateVolumeClip(a,b,c,e,d,g){return this.int.call({command:p.Tools_UpdateVolumeClip, bbox:a,rotation:d,value:b,isShowPlane:c,isEdit:e},g)}stopClip(a){return this.stopPolygonClip(a)}stopPolygonClip(a){return this.int.call0(p.Tools_StopClip,a)}stopPlaneClip(a){return this.int.call({command:p.Tools_StopPlaneClip},a)}stopVolumeClip(a){return this.int.call({command:p.Tools_StopVolumeClip},a)}setMeasurement(a,b,c){b=b||{};return this.int.call({command:p.Tools_SetMeasurement,type:a,pointSize:b.pointSize,textSize:b.textSize,textColor:E(b.textColor),pointColor:E(b.pointColor),lineColor:E(b.lineColor), areaColor:E(b.areaColor),showCoordinateText:b.showCoordinateText},c)}startMeasurement(a){return this.int.call0(p.Tools_StartMeasurement,a)}stopMeasurement(a){return this.int.call0(p.Tools_StopMeasurement,a)}lineIntersect(a,b,c){return this.int.call({command:p.Tools_LineIntersect,data:[{start:a,end:b}],highPrecision:!1,returnDetails:!0},c)}linesIntersect(a,b,c,e){return this.int.call({command:p.Tools_LineIntersect,data:F(a),highPrecision:b,returnDetails:c},e)}startGeometryEdit(a,b,c){return this.int.call({command:p.Tools_StartGeometryEdit, id:a,type:b},c)}stopGeometryEdit(a){return this.int.call0(p.Tools_StopGeometryEdit,a)}startSkylineAnalysis(a,b){a=a||{};a.outlineColor&&(a.outlineColor=E(a.outlineColor));a.sceneColor&&(a.sceneColor=E(a.sceneColor));a.skylineColor&&(a.skylineColor=E(a.skylineColor));a.backgroundColor&&(a.backgroundColor=E(a.backgroundColor));if(a.tileLayers){a.tileLayers=F(a.tileLayers);for(let c of a.tileLayers)c.hasOwnProperty("color")&&(c.color=E(c.color))}a.command=p.Tools_StartSkylineAnalysis;return this.int.call(a, b)}stopSkylineAnalysis(a){return this.int.call0(p.Tools_StopSkylineAnalysis,a)}exportSkyline(a,b,c,e){c=c||{};c.skylineColor&&(c.skylineColor=E(c.skylineColor));c.backgroundColor&&(c.backgroundColor=E(c.backgroundColor));if(c.tileLayers){c.tileLayers=F(c.tileLayers);for(let d of c.tileLayer)d.hasOwnProperty("color")&&(d.color=E(d.color))}return this.int.call({command:p.Tools_ExportSkyline,path:a,size:b,skylineColor:c.skylineColor,backgroundColor:c.backgroundColor},e)}startViewshedAnalysis(a,b){a= a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartViewshedAnalysis;return this.int.call(a,b)}stopViewshedAnalysis(a){return this.int.call0(p.Tools_StopViewshedAnalysis,a)}startVisiblityAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartVisiblityAnalysis;return this.int.call(a,b)}stopVisiblityAnalysis(a){return this.int.call0(p.Tools_StopVisiblityAnalysis, a)}startViewDomeAnalysis(a,b){a=a||{};a.visibleColor&&(a.visibleColor=E(a.visibleColor));a.invisibleColor&&(a.invisibleColor=E(a.invisibleColor));a.command=p.Tools_StartViewDomeAnalysis;return this.int.call(a,b)}stopViewDomeAnalysis(a){return this.int.call0(p.Tools_StopViewDomeAnalysis,a)}startCutFillAnalysis(a,b){a=a||{};a.cutLineColor&&(a.cutLineColor=E(a.cutLineColor));a.fillLineColor&&(a.fillLineColor=E(a.fillLineColor));a.cutPointColor&&(a.cutPointColor=E(a.cutPointColor));a.fillPointColor&& (a.fillPointColor=E(a.fillPointColor));a.gridColor&&(a.gridColor=E(a.gridColor));a.command=p.Tools_StartCutFillAnalysis;return this.int.call(a,b)}stopCutFillAnalysis(a){return this.int.call0(p.Tools_StopCutFillAnalysis,a)}startSunshineAnalysis(a,b){var c=/^(0?[0-9]|1[0-9]|[2][0-3]):(0?[0-9]|[1-5][0-9])$/;if(null==a||void 0==a)console.error("\u53c2\u6570\u4e0d\u80fd\u4e3a\u7a7a");else{let e=a.startTime,d=a.endTime;if(null==e||""==e||null==d||""==d)console.error("\u65f6\u95f4\u53c2\u6570\u683c\u5f0f\u4e0d\u6b63\u786e"); else if(e.match(c)&&d.match(c))if(e.split(":"))if(a.startHour=parseInt(e.split(":")[0]),a.startMinute=parseInt(e.split(":")[1]),d.split(":"))if(a.endHour=parseInt(d.split(":")[0]),a.endMinute=parseInt(d.split(":")[1]),a.startHour>a.endHour)console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u65f6\u95f4");else{if(a.startHour==a.endHour){if(a.startMinute==a.endMinute){console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u7b49\u4e8e\u7ed3\u675f\u65f6\u95f4");return}if(a.startMinute> a.endMinute){console.error("\u5f00\u59cb\u65f6\u95f4\u4e0d\u80fd\u5927\u4e8e\u7ed3\u675f\u65f6\u95f4");return}}T(a.groundElevation)||(c=a.groundElevation,!isNaN(parseFloat(c))&&isFinite(c)&&(a.undersideHeight=a.groundElevation,delete a.groundElevation));a.command=p.Tools_StartSunshineAnalysis;return this.int.call(a,b)}else console.error("\u53c2\u6570endTime\u65f6\u95f4\u683c\u5f0f\u4e0d\u6b63\u786e");else console.error("\u53c2\u6570startTime\u65f6\u95f4\u683c\u5f0f\u4e0d\u6b63\u786e");else console.error("\u65f6\u95f4\u53c2\u6570\u683c\u5f0f\u4e0d\u6b63\u786e")}}stopSunshineAnalysis(a){return this.int.call0(p.Tools_StopSunshineAnalysis, a)}startTerrainSlopeAnalysis(a,b){a.command=p.Tools_StartTerrainSlopeAnalysis;return this.int.call(a,b)}stopTerrainSlopeAnalysis(a){return this.int.call0(p.Tools_StopTerrainSlopeAnalysis,a)}startContourLineAnalysis(a,b){a.command=p.Tools_StartContourLineAnalysis;return this.int.call(a,b)}stopContourLineAnalysis(a){return this.int.call0(p.Tools_StopContourLineAnalysis,a)}startFloodFill(a,b){a=a||{};a.color&&(a.color=E(a.color));a.command=p.Tools_StartFloodFill;return this.int.call(a,b)}stopFloodFill(a){return this.int.call0(p.Tools_StopFloodFill, a)}replaceTextureByVideo(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture,texturePackage:a,newTexture:b,type:1},c)}replaceTextureByImage(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture,texturePackage:a,newTexture:b,type:2},c)}replaceTextureByUrl(a,b,c){return this.int.call({command:p.Tools_ReplaceTexture,texturePackage:a,newTexture:b,type:3},c)}restoreTexture(a,b){return this.int.call({command:p.Tools_RestoreTexture,ids:F(a)},b)}showPanel(a,b,c){this.showAnalysisPanel(a,b,c)}hidePanel(a){this.hideAnalysisPanel(a)}showAnalysisPanel(a, b,c){return this.int.call({command:p.Tools_AnalysisPopupAttributes,type:a,position:b},c)}hideAnalysisPanel(a){return this.int.call({command:p.Tools_AnalysisCloseAttributes},a)}}class Yb{constructor(a){this.int=a}getParams(a){return this.int.call0(p.Weather_GetParams,a)}_setParam(a,b){return this.int.call({command:p.Weather_SetParams,data:a},b)}setDateTime(a,b,c,e,d,g,h){return this.int.call({command:p.Weather_SetDate,year:a,month:b,day:c,hour:e,minute:d,daynightLoop:g},h)}getDateTime(a){return this.int.call0(p.Weather_GetDate, a)}simulateTime(a,b,c,e){let d=0,g=0,h=0,q=0;a instanceof Array?(0this.sendApi(c))}getPlayer(){return this.player}setHost(a, b){this.url=`ws://${a}:${b}`}connectWebSocket(){if(!this.player){this.log(`Connecting: ${this.url}`);if("undefined"==typeof window)this.websocket=new (require("ws"))(this.url);else{if(!("WebSocket"in window)){console.error("Not Support WebSocket!");return}this.websocket=new WebSocket(this.url)}this.websocket.onopen=()=>this.onConnectionOpen();this.websocket.onmessage=a=>this.onConnectionMessage(a.data);this.websocket.onclose=a=>this.onConnectionClose(a);this.websocket.onerror=a=>this.onConnectionError(a)}}setEventCallback(a){this.options.onEvent= a}destroy(){this.isDestroyed=!0;this.player&&this.player.destroy();this.websocket&&(this.websocket.close(),this.websocket=null)}reset(a,b){return this.call({command:p.Reset,resetType:a||Ba.ClearObjects},b)}saveProject(a){return this.call0(p.SaveProject,a)}registerTick(a,b,c){b=b||{};"__execute__"!=a&&(b.func="tick");this.call({command:p.RegisterJsCommunication,id:this.tickMarkerId,url:a,func:b.func,x:b.x||4,y:b.y||4,width:b.width||400,height:b.height||300,visible:b.visible||!1},c)}removeTick(a){this.call({command:p.UnRegisterJsCommunication, ids:[this.tickMarkerId]},a)}showTickWindow(a,b){this.isCalledInCEF?ue.internal.showtickwindow(a):a?this.registerTick("__show__",{},b):this.registerTick("",{},b)}executeJsInTickPage(a,b){this.registerTick("__execute__",{func:a},b)}getVersion(){return"6.0.0102.16504"}checkApiReady(){if(!this.isReady)throw console.error("The interface call is not ready!"),"The interface call is not ready!";return!0}get camera(){if(!this.checkApiReady())return null;this._camera||(this._camera=new Qb(this));return this._camera}get coord(){if(!this.checkApiReady())return null; this._coord||(this._coord=new Rb(this));return this._coord}get infoTree(){if(!this.checkApiReady())return null;this._infoTree||(this._infoTree=new Tb(this));return this._infoTree}get cameraTour(){if(!this.checkApiReady())return null;this._cameraTour||(this._cameraTour=new nb(this));return this._cameraTour}get tileLayer(){if(!this.checkApiReady())return null;this.__tileLayer||(this._tileLayer=new Lb(this));return this._tileLayer}get tag(){if(!this.checkApiReady())return null;this._tag||(this._tag= new Kb(this));return this._tag}get marker(){if(!this.checkApiReady())return null;this._marker||(this._marker=new Bb(this));return this._marker}get marker3d(){if(!this.checkApiReady())return null;this._marker3d||(this._marker3d=new Cb(this));return this._marker3d}get customTag(){if(!this.checkApiReady())return null;this._customTag||(this._customTag=new rb(this));return this._customTag}get radiationPoint(){if(!this.checkApiReady())return null;this._radiationPoint||(this._radiationPoint=new Ib(this)); return this._radiationPoint}get customMesh(){if(!this.checkApiReady())return null;this._customMesh||(this._customMesh=new pb(this));return this._customMesh}get waterMesh(){if(!this.checkApiReady())return null;this._waterMesh||(this._waterMesh=new Pb(this));return this._waterMesh}get waterFlowField(){if(!this.checkApiReady())return null;this._waterFlowField||(this._waterFlowField=new Ob(this));return this._waterFlowField}get polyline(){if(!this.checkApiReady())return null;this._polyline||(this._polyline= new Hb(this));return this._polyline}get odline(){if(!this.checkApiReady())return null;this._odline||(this._odline=new Db(this));return this._odline}get polygon3d(){if(!this.checkApiReady())return null;this._polygon3d||(this._polygon3d=new Gb(this));return this._polygon3d}get polygon(){if(!this.checkApiReady())return null;this._polygon||(this._polygon=new Fb(this));return this._polygon}get heatmap(){if(!this.checkApiReady())return null;this._heatmap||(this._heatmap=new wb(this));return this._heatmap}get heatmap3d(){if(!this.checkApiReady())return null; this._heatmap3d||(this._heatmap3d=new xb(this));return this._heatmap3d}get beam(){if(!this.checkApiReady())return null;this._beam||(this._beam=new mb(this));return this._beam}get highlightArea(){if(!this.checkApiReady())return null;this._highlightArea||(this._highlightArea=new yb(this));return this._highlightArea}get customObject(){if(!this.checkApiReady())return null;this._customObject||(this._customObject=new qb(this));return this._customObject}get videoProjection(){if(!this.checkApiReady())return null; this._videoProjection||(this._videoProjection=new Nb(this));return this._videoProjection}get panorama(){if(!this.checkApiReady())return null;this._panorama||(this._panorama=new Eb(this));return this._panorama}get decal(){if(!this.checkApiReady())return null;this._decal||(this._decal=new sb(this));return this._decal}get dynamicWater(){if(!this.checkApiReady())return null;this._dynamicWater||(this._dynamicWater=new tb(this));return this._dynamicWater}get floodFill(){if(!this.checkApiReady())return null; this._floodFill||(this._floodFill=new ub(this));return this._floodFill}get cesium3DTileset(){if(!this.checkApiReady())return null;this._cesium3DTileset||(this._cesium3DTileset=new ob(this));return this._cesium3DTileset}get shapeFileLayer(){if(!this.checkApiReady())return null;this._shapeFileLayer||(this._shapeFileLayer=new Jb(this));return this._shapeFileLayer}get light(){if(!this.checkApiReady())return null;this._light||(this._light=new Ab(this));return this._light}get imageryLayer(){if(!this.checkApiReady())return null; this._imageryLayer||(this._imageryLayer=new zb(this));return this._imageryLayer}get geoJSONLayer(){if(!this.checkApiReady())return null;this._geoJSONLayer||(this._geoJSONLayer=new vb(this));return this._geoJSONLayer}get vehicle(){if(!this.checkApiReady())return null;this._vehicle||(this._vehicle=new Mb(this));return this._vehicle}get misc(){if(!this.checkApiReady())return null;this._misc||(this._misc=new Ub(this));return this._misc}get tools(){if(!this.checkApiReady())return null;this._tools||(this._tools= new Xb(this));return this._tools}get settings(){if(!this.checkApiReady())return null;this._settings||(this._settings=new Vb(this));return this._settings}get weather(){if(!this.checkApiReady())return null;this._weather||(this._weather=new Yb(this));return this._weather}get editHelper(){if(!this.checkApiReady())return null;this._editHelper||(this._editHelper=new Sb(this));return this._editHelper}get settingsPanel(){if(!this.checkApiReady())return null;this._settingsPanel||(this._settingsPanel=new Wb(this)); return this._settingsPanel}setEnableAliases(){this.ct=this.cameraTour;this.tl=this.tileLayer;this.ctag=this.customTag;this.line=this.polyline;this.ol=this.odline;this.p3d=this.polygon3d;this.hm=this.heatmap;this.hm3d=this.heatmap3d;this.co=this.customObject;this.ha=this.highlightArea;this.vp=this.videoProjection;this.dw=this.dynamicWater;this.ff=this.floodFill;this.c3d=this.cesium3DTileset;this.shapeFile=this.shp=this.shapeFileLayer;this.imagery=this.imageryLayer;this.geoJSON=this.geoJSONLayer;this.vc= this.vehicle;this.eh=this.editHelper;this.sp=this.settingsPanel}_getCallbackIndex(){return++this.callbackIndex}call0(a,b){return this.call({command:a},b)}call(a,b){if(!this.isConnected)return this.logWithColor("red","Not connected!"),b?void 0:Promise.reject("Not connected!");if(void 0==a.command||a.command==p.None)return this.logWithColor("red","command is undefined or None"),b?void 0:Promise.reject("command is undefined or None");a.timestamp=Date.now();a.callbackIndex=this._getCallbackIndex();a.__command= p[a.command]||"Unknown";a.__version=this.getVersion();null===b&&(a.__noResponse=!0);let c=a.command+"_"+a.callbackIndex;b&&"function"==typeof b&&(this.callbackMap[c]=b);if(this.isCalledInCEF&&null===b)return delete a.__noResponse,this.callbackMap[c]=null,this.sendApi(a),a;let e=JSON.stringify(a);this.log("");this.logWithColor("RoyalBlue",`Request: ${p[a.command]||"Unknown"}`,!0);this.logWithColor("green","\uff08"+(new Date(a.timestamp)).toLocaleTimeString()+"\uff09");this.logWithColor("gray",`${e}`); if(b||null===b)this.apiQueue.push(a);else return new Promise(d=>{this.callbackMap[c]=d;this.apiQueue.push(a)})}sendApi(a){this.isCalledInCEF?ue.internal.execute(JSON.stringify(a)):this.player?this.player.sendApi(a):this.sendStringByWS(a)}sendStringByWS(a){if(a){a=JSON.stringify(a);var b=a.length;if(16777216>=b)this.websocket.send(a);else{var c=Math.ceil(b/16777216),e=[];for(let d=0;dthis.savedCamera=b.camera)}}onReady(){this.isReady=!0;if("function"==typeof this.options.onReady)this.options.onReady();this.call({command:p.Misc_GetVersion});if(this.player)this.player.onApiReady()}log(a, b,c){if("function"==typeof this.options.onLog)this.options.onLog(a,b,c)}logWithColor(a,b,c){this.log(b,c,a)}onConnectionOpen(){this.isConnected=!0;this.logWithColor("blue","Connected!")}onConnectionClose(a){this.isConnected=!1;this.logWithColor("red",`Connection closed! code: ${a.code||"-"}, reason: ${1006==a.code?H.getString("Disconnect"):a.reason||a.message||"-"}`);this.log("");this.logWithColor("SpringGreen","Reconnecting...");this.isDestroyed||this.player||this.connectWebSocket()}onConnectionError(a){console.error("WebSocket error observed")}onConnectionMessage(a, b){a=a.replace(/~!@~!@~!@/g,'\\"');this.log("");let c=null;try{c=JSON.parse(a)}catch(d){this.isCalledInCEF?(document.writeln(d.message),document.writeln("
"),document.writeln(a)):(console.error(d.message),this.log("Response: [Unknown]"));return}if(c.command==p.Misc_GetVersion){this.misc.apiVersionServer=c.version;if(!this.misc.isApiVersionMatched()){var e=H.getString("VersionMismatch").format(this.getVersion(),this.misc.apiVersionServer);console.warn(e);"undefined"!=typeof window&&alert(e)}if("function"== typeof this.options.onApiVersion)this.options.onApiVersion(this.misc.apiVersionServer)}if(c.command)this.apiQueue.callNext(c.callbackIndex),e=Date.now()-c.timestamp,this.logWithColor("RoyalBlue",`Response: ${p[c.command]||"Unknown"}`,!0),this.logWithColor("green",` (${H.getString("TimeConsuming")}${e}ms)`),this.logWithColor("gray",`${H.getString("RequestTime")}${(new Date(c.timestamp)).toLocaleTimeString()}`,!0),this.logWithColor("gray",` ${H.getString("ResponseTime")}${(new Date(Date.now())).toLocaleTimeString()}`, !0),this.logWithColor("gray",` ${H.getString("MessageLength")}${a.length}`),a=c.command+"_"+c.callbackIndex,(e=this.callbackMap[a])?(e(c),delete this.callbackMap[a]):null===e&&"function"===typeof tick_next&&tick_next(c,b);else if(c.eventtype)if(this.log("Response: Event"),"CompleteInitialization"==c.eventtype)this.log("The initialization is complete, now you can call the interfaces in onReady callback function."),this.initialCameraPosition=c.InitialCamera,c.ResourcesPath&&(this.resourcesPath=c.ResourcesPath, this.log("ResourcesPath:"+this.resourcesPath)),this.onReady();else if("NodeConfiguration"==c.eventtype)this.resourcesPath=c.ResourcesPath,this.log("ResourcesPath:"+this.resourcesPath);else if("MainThreadBusy"==c.eventtype)this.apiQueue.onMainThreadBusy(c),this.player&&this.player.onMainThreadBusy(c);else{if("function"==typeof this.options.onEvent)this.options.onEvent(c)}else this.log("Response: [Unknown]");b=JSON.stringify(c,(d,g)=>g instanceof Array?JSON.stringify(g):g,"\t").replace(/"\[/g,"[").replace(/\]"/g, "]").replace(/\\"/g,'"').replace(/""/g,'"');this.logWithColor("gray",b)}quit(){return this.call0(p.Quit)}test(a,b,c){return this.call({command:p.SimulateTest__,type:a,int32Val:b},c)}}const V={WS_Disconnected:0,WS_Connecting:1,WS_Connected:2,RTC_Opened:3,Video_LoadedMetaData:4,OnReady:5},ea={StartingProcess:0,CheckingBusy:1,ConfirmBusy:2,ProcessStartFailed:3,ProcessStarted:4,LoadingProject:5,ProjectLoaded:6};class Zb{constructor(){"undefined"!=typeof navigator&&(this.isUnix="Mac68K"==navigator.platform|| "MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform||-1!=navigator.platform.indexOf("Linux"),this.isChrome=-1!=navigator.userAgent.indexOf("Chrome"),this.isMobileDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),this.isIOSDevice=/iPhone|iPad|iPod/i.test(navigator.userAgent),this.isSafari=/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent),this.isAndroidDevice=/Android/i.test(navigator.userAgent),this.isInWeixinBrowser)}fullscreen(a){a&& (a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen?a.msRequestFullscreen:a.webkitRequestFullscreen&&a.webkitRequestFullscreen())}exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen||(document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen())}isFullscreen(){return document.fullscreen||document.mozFullScreen||document.webkitIsFullScreen}isFunction(a){return"function"== typeof a}}var R=new Zb;const la={abnormal:1006,invalid_message:1008,out_of_control:4E3,instance_disconnected:4001,instance_not_found:4002,instance_start_failed:4003,webrtc_connection_error:4004,one_client_allowed:4005,timeout:4006,iid_required:4007,locked:4008,invalid_project:4009,no_free_instance:4010,kicked:4100,syncing_data:4101,instance_killed_by_user:4102,invalid_password:4103,nodeservice_stopped:4105,instance_is_busy:4107,ip_no_access:4108,unknown_client:4109,num_of_instances_exceeded:4110, instance_not_auth:4111,permission_denied:4112,instance_was_preempted:4113,no_username_provided:4114,user_does_not_exist:4115,not_logged_in:4116};Z.EMPTY_OBJECT=Object.freeze({});class ma{}ma.doParamsCompatibility=a=>{a.apiOptions=a.apiOptions||{};a.events=a.events||{};a.ui=a.ui||{};"undefined"!=typeof a.showMarker&&(a.showStatus=a.showMarker,delete a.showMarker);"undefined"!=typeof a.actionEventHander&&(a.onaction=a.actionEventHander,delete a.actionEventHander);"undefined"!=typeof a.useBuiltinCursor&& (a.useBuiltinCursors=a.useBuiltinCursor,delete a.useBuiltinCursor);"undefined"!=typeof a.keyEventReceiver&&(a.keyEventTarget=a.keyEventReceiver,delete a.keyEventReceiver);"undefined"!=typeof a.ui.debugTouchPanel&&(a.ui.debugEventsPanel=a.ui.debugTouchPanel,delete a.ui.debugTouchPanel);var b=(c,e)=>{let d=a[c];d&&(a.events[e]=d,delete a[c])};b("onclose","onConnClose");b("onloaded","onVideoLoaded");b("onvideostatus","onRtcStatsReport");b("onaction","mouseKeyListener");b=(c,e)=>{let d=a.events.mouseKeyListener[c]; d&&(a.events.mouseKeyListener[e]=d,delete a.events.mouseKeyListener[c])};a.events.mouseKeyListener&&(b("onmouseenter","onMouseEnter"),b("onmouseleave","onMouseLeave"),b("onmousemove","onMouseMove"),b("onmousedown","onMouseDown"),b("onmouseup","onMouseUp"),b("onkeydown","onKeyDown"),b("onkeyup","onKeyUp"),b("onkeypress","onKeyPress"));b=(c,e)=>{"undefined"!=typeof a[c]&&(a.ui[e]=a[c],delete a[c])};b("showStartupInfo","startupInfo");b("showStatus","statusButton");b("showFullscreenButton","fullscreenButton"); b("showHomeButton","homeButton");b("showTaskList","taskListBar")};ma.setDefaultParamValues=a=>{a.enableApiCallLog=Z(a.enableApiCallLog,!1);a.receiveRenderEvents=Z(a.receiveRenderEvents,!0);a.registerEvents=Z(a.registerEvents,!0);a.keyEventTarget=Z(a.keyEventTarget,"video");a.useBuiltinCursors=Z(a.useBuiltinCursors,!0);a.ui.startupInfo=Z(a.ui.startupInfo,!0);a.ui.statusIndicator=Z(a.ui.statusIndicator,!0);a.ui.statusButton=Z(a.ui.statusButton,!1);a.ui.fullscreenButton=Z(a.ui.fullscreenButton,!1);a.ui.homeButton= Z(a.ui.homeButton,!1);a.ui.taskListBar=Z(a.ui.taskListBar,1);a.ui.debugEventsPanel=Z(a.ui.debugEventsPanel,!1);a.offer=1};ma.processParams=a=>{ma.doParamsCompatibility(a);ma.setDefaultParamValues(a)};W.prototype.reset=function(){this.reg[0]=1937774191;this.reg[1]=1226093241;this.reg[2]=388252375;this.reg[3]=3666478592;this.reg[4]=2842636476;this.reg[5]=372324522;this.reg[6]=3817729613;this.reg[7]=2969243214;this.chunk=[];this.size=0};W.prototype.strToBytes=function(a){for(var b,c,e=[],d=0;d>=8;while(b);e=e.concat(c.reverse())}return e};W.prototype.write=function(a){a="string"===typeof a?this.strToBytes(a):a;this.size+=a.length;var b=64-this.chunk.length;if(a.lengtha;a++)b+=this.reg[a].toString(16);else for(b=Array(32),a=0;8>a;a++){var c=this.reg[a];b[4*a+3]=(c&255)>>>0;c>>>=8;b[4*a+2]=(c&255)>>>0;c>>>=8;b[4*a+1]=(c&255)>>>0;c>>>=8;b[4*a]=(c&255)>>>0}this.reset();return b};W.prototype._compress=function(a){if(64>a)console.error("compress error: not enough data");else{var b=this._expand(a);a=this.reg.slice(0);for(var c=0;64>c;c++){var e=this._rotl(a[0],12)+a[4]+this._rotl(this._t(c), c);e=(e&4294967295)>>>0;e=this._rotl(e,7);var d=(e^this._rotl(a[0],12))>>>0,g=this._ff(c,a[0],a[1],a[2]);g=g+a[3]+d+b[c+68];g=(g&4294967295)>>>0;d=this._gg(c,a[4],a[5],a[6]);d=d+a[7]+e+b[c];d=(d&4294967295)>>>0;a[3]=a[2];a[2]=this._rotl(a[1],9);a[1]=a[0];a[0]=g;a[7]=a[6];a[6]=this._rotl(a[5],19);a[5]=a[4];a[4]=(d^this._rotl(d,9)^this._rotl(d,17))>>>0}for(b=0;8>b;b++)this.reg[b]=(this.reg[b]^a[b])>>>0}};W.prototype._fill=function(){var a=8*this.size,b=this.chunk.push(128)%64;for(8>64-b&&(b-=64);56> b;b++)this.chunk.push(0);for(b=0;4>b;b++)this.chunk.push(Math.floor(a/4294967296)>>>8*(3-b)&255);for(b=0;4>b;b++)this.chunk.push(a>>>8*(3-b)&255)};W.prototype._expand=function(a){for(var b=Array(132),c=0;16>c;c++)b[c]=a[4*c]<<24,b[c]|=a[4*c+1]<<16,b[c]|=a[4*c+2]<<8,b[c]|=a[4*c+3],b[c]>>>=0;for(a=16;68>a;a++)c=b[a-16]^b[a-9]^this._rotl(b[a-3],15),c=c^this._rotl(c,15)^this._rotl(c,23),b[a]=(c^this._rotl(b[a-13],7)^b[a-6])>>>0;for(a=0;64>a;a++)b[a+68]=(b[a]^b[a+4])>>>0;return b};W.prototype._rotl=function(a, b){b%=32;return(a<>>32-b)>>>0};W.prototype._t=function(a){if(0<=a&&16>a)return 2043430169;if(16<=a&&64>a)return 2055708042;console.error("invalid j for constant Tj")};W.prototype._ff=function(a,b,c,e){if(0<=a&&16>a)return(b^c^e)>>>0;if(16<=a&&64>a)return(b&c|b&e|c&e)>>>0;console.error("invalid j for bool function FF");return 0};W.prototype._gg=function(a,b,c,e){if(0<=a&&16>a)return(b^c^e)>>>0;if(16<=a&&64>a)return(b&c|~b&e)>>>0;console.error("invalid j for bool function GG");return 0};W.prototype.toArray= function(a,b){for(var c=[],e=0;e{if(this.options.onopen)this.options.onopen();setInterval(()=>{this.timeOfLastInteraction&&this.send({type:"ping",time:this.timeOfLastInteraction})}, 3E3);"string"==typeof this.options.customString&&this.send({type:"customString",content:this.options.customString})},this.websocket.onmessage=b=>{if(b=JSON.parse(b.data)){switch(b.type){case "checkParamsResult":this.onCheckParamsResponse(b);return;case "detectResponse":this.send(b);return}if(this.options.onmessage)this.options.onmessage(b)}},this.websocket.onerror=b=>{if(this.options.onerror)this.options.onerror(b)},this.websocket.onclose=b=>{this.websocket=void 0;if(this.options.onclose)this.options.onclose(b)}): alert("Your browser does not support WebSocket")}isOpened(){return this.websocket&&1===this.websocket.readyState}send(a){a&&this.isOpened()&&this.websocket.send(JSON.stringify(a))}close(a){console.log(`call SignallingConnection.close: ${a||" "}`);this.isOpened()&&(this.websocket.close(a),this.websocket=null)}sendReady(){this.send({type:"ready"})}sendCustomString(a){"string"==typeof a&&this.send({type:"customString",content:a})}sendCandidate(a){a.candidate&&a.candidate.candidate&&this.send({type:"iceCandidate", candidate:a.candidate})}sendOffer(a,b){this.send({type:"offer",sdp:a,hasVideo:b})}sendApi(a){"api"==(null==a?void 0:a.type)?this.send(a):console.error("Invalid API call format!")}sendInstancePassword(a){"string"==typeof a&&0{this.checkParamsMap[a.timestamp]=b;this.send({type:"checkParams",data:a});this.timerOfCheckParams=setTimeout(()=> {let c=this.checkParamsMap[a.timestamp];c&&(delete this.checkParamsMap[a.timestamp],c(null))},1E3)})}onCheckParamsResponse(a){let b=this.checkParamsMap[a.timestamp];b&&(clearTimeout(this.timerOfCheckParams),delete this.checkParamsMap[a.timestamp],b(a))}}(function(a){"object"===typeof v&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).adapter= a()})(function(){return function(){function a(b,c,e){function d(q,k){if(!c[q]){if(!b[q]){var f="function"==typeof require&&require;if(!k&&f)return f(q,!0);if(g)return g(q,!0);k=Error("Cannot find module '"+q+"'");throw k.code="MODULE_NOT_FOUND",k;}k=c[q]={exports:{}};b[q][0].call(k.exports,function(l){return d(b[q][1][l]||l)},k,k.exports,a,b,c,e)}return c[q].exports}for(var g="function"==typeof require&&require,h=0;hl.version&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){var y=f.RTCPeerConnection.prototype[r],u=e({},r,function(){arguments[0]=new ("addIceCandidate"=== r?f.RTCIceCandidate:f.RTCSessionDescription)(arguments[0]);return y.apply(this,arguments)});f.RTCPeerConnection.prototype[r]=u[r]});var x=f.RTCPeerConnection.prototype.addIceCandidate;f.RTCPeerConnection.prototype.addIceCandidate=function(){return t||arguments[0]?78>l.version&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():x.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}};c.fixNegotiationNeeded=function(f){var l=k.detectBrowser(f);k.wrapPeerConnectionEvent(f, "negotiationneeded",function(t){var x=t.target;if(!(72>l.version||x.getConfiguration&&"plan-b"===x.getConfiguration().sdpSemantics)||"stable"===x.signalingState)return t})};var k=function(f){if(f&&f.__esModule)return f;var l={};if(null!=f)for(var t in f)Object.prototype.hasOwnProperty.call(f,t)&&(l[t]=f[t]);l.default=f;return l}(a("../utils.js"))},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia= function(e,d){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||("function"!==typeof d?console.error("shimGetDisplayMedia: getSourceId argument is not a function"):e.navigator.mediaDevices.getDisplayMedia=function(g){return d(g).then(function(h){var q=g.video&&g.video.width,k=g.video&&g.video.height;g.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:h,maxFrameRate:g.video&&g.video.frameRate||3}};q&&(g.video.mandatory.maxWidth=q);k&& (g.video.mandatory.maxHeight=k);return e.navigator.mediaDevices.getUserMedia(g)})})}},{}],5:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"===typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h};c.shimGetUserMedia=function(h){var q=h&&h.navigator;if(q.mediaDevices){var k=d.detectBrowser(h),f=function(r){if("object"!==("undefined"=== typeof r?"undefined":e(r))||r.mandatory||r.optional)return r;var y={};Object.keys(r).forEach(function(u){if("require"!==u&&"advanced"!==u&&"mediaSource"!==u){var A="object"===e(r[u])?r[u]:{ideal:r[u]};void 0!==A.exact&&"number"===typeof A.exact&&(A.min=A.max=A.exact);var m=function(w,z){return w?w+z.charAt(0).toUpperCase()+z.slice(1):"deviceId"===z?"sourceId":z};if(void 0!==A.ideal){y.optional=y.optional||[];var n={};"number"===typeof A.ideal?(n[m("min",u)]=A.ideal,y.optional.push(n),n={},n[m("max", u)]=A.ideal):n[m("",u)]=A.ideal;y.optional.push(n)}void 0!==A.exact&&"number"!==typeof A.exact?(y.mandatory=y.mandatory||{},y.mandatory[m("",u)]=A.exact):["min","max"].forEach(function(w){void 0!==A[w]&&(y.mandatory=y.mandatory||{},y.mandatory[m(w,u)]=A[w])})}});r.advanced&&(y.optional=(y.optional||[]).concat(r.advanced));return y},l=function(r,y){if(61<=k.version)return y(r);if((r=JSON.parse(JSON.stringify(r)))&&"object"===e(r.audio)){var u=function(n,w,z){w in n&&!(z in n)&&(n[z]=n[w],delete n[w])}; r=JSON.parse(JSON.stringify(r));u(r.audio,"autoGainControl","googAutoGainControl");u(r.audio,"noiseSuppression","googNoiseSuppression");r.audio=f(r.audio)}if(r&&"object"===e(r.video)){var A=r.video.facingMode;A=A&&("object"===("undefined"===typeof A?"undefined":e(A))?A:{ideal:A});u=66>k.version;if(!(!A||"user"!==A.exact&&"environment"!==A.exact&&"user"!==A.ideal&&"environment"!==A.ideal||q.mediaDevices.getSupportedConstraints&&q.mediaDevices.getSupportedConstraints().facingMode&&!u)){delete r.video.facingMode; var m=void 0;if("environment"===A.exact||"environment"===A.ideal)m=["back","rear"];else if("user"===A.exact||"user"===A.ideal)m=["front"];if(m)return q.mediaDevices.enumerateDevices().then(function(n){n=n.filter(function(z){return"videoinput"===z.kind});var w=n.find(function(z){return m.some(function(B){return z.label.toLowerCase().includes(B)})});!w&&n.length&&m.includes("back")&&(w=n[n.length-1]);w&&(r.video.deviceId=A.exact?{exact:w.deviceId}:{ideal:w.deviceId});r.video=f(r.video);g("chrome: "+ JSON.stringify(r));return y(r)})}r.video=f(r.video)}g("chrome: "+JSON.stringify(r));return y(r)},t=function(r){return 64<=k.version?r:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError", ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[r.name]||r.name,message:r.message,constraint:r.constraint||r.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};q.getUserMedia=function(r,y,u){l(r,function(A){q.webkitGetUserMedia(A,y,function(m){u&&u(t(m))})})}.bind(q);if(q.mediaDevices.getUserMedia){var x=q.mediaDevices.getUserMedia.bind(q.mediaDevices);q.mediaDevices.getUserMedia=function(r){return l(r,function(y){return x(y).then(function(u){if(y.audio&& !u.getAudioTracks().length||y.video&&!u.getVideoTracks().length)throw u.getTracks().forEach(function(A){A.stop()}),new DOMException("","NotFoundError");return u},function(u){return Promise.reject(t(u))})})}}}};var d=function(h){if(h&&h.__esModule)return h;var q={};if(null!=h)for(var k in h)Object.prototype.hasOwnProperty.call(h,k)&&(q[k]=h[k]);q.default=h;return q}(a("../utils.js")),g=d.log},{"../utils.js":15}],6:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"=== typeof Symbol&&"symbol"===typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"===typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h};c.shimRTCIceCandidate=function(h){if(h.RTCIceCandidate&&!(h.RTCIceCandidate&&"foundation"in h.RTCIceCandidate.prototype)){var q=h.RTCIceCandidate;h.RTCIceCandidate=function(k){"object"===("undefined"===typeof k?"undefined":e(k))&&k.candidate&&0===k.candidate.indexOf("a=")&&(k=JSON.parse(JSON.stringify(k)),k.candidate= k.candidate.substr(2));if(k.candidate&&k.candidate.length){var f=new q(k);k=d.default.parseCandidate(k.candidate);var l=Object.assign(f,k);l.toJSON=function(){return{candidate:l.candidate,sdpMid:l.sdpMid,sdpMLineIndex:l.sdpMLineIndex,usernameFragment:l.usernameFragment}};return l}return new q(k)};h.RTCIceCandidate.prototype=q.prototype;g.wrapPeerConnectionEvent(h,"icecandidate",function(k){k.candidate&&Object.defineProperty(k,"candidate",{value:new h.RTCIceCandidate(k.candidate),writable:"false"}); return k})}};c.shimMaxMessageSize=function(h){if(h.RTCPeerConnection){var q=g.detectBrowser(h);"sctp"in h.RTCPeerConnection.prototype||Object.defineProperty(h.RTCPeerConnection.prototype,"sctp",{get:function(){return"undefined"===typeof this._sctp?null:this._sctp}});var k=function(r){if(!r||!r.sdp)return!1;r=d.default.splitSections(r.sdp);r.shift();return r.some(function(y){return(y=d.default.parseMLine(y))&&"application"===y.kind&&-1!==y.protocol.indexOf("SCTP")})},f=function(r){r=r.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/); if(null===r||2>r.length)return-1;r=parseInt(r[1],10);return r!==r?-1:r},l=function(r){var y=65536;"firefox"===q.browser&&(y=57>q.version?-1===r?16384:2147483637:60>q.version?57===q.version?65535:65536:2147483637);return y},t=function(r,y){var u=65536;"firefox"===q.browser&&57===q.version&&(u=65535);r=d.default.matchPrefix(r.sdp,"a=max-message-size:");0l.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+l.sctp.maxMessageSize+" bytes)");return t.apply(f,arguments)}}if(h.RTCPeerConnection&&"createDataChannel"in h.RTCPeerConnection.prototype){var k=h.RTCPeerConnection.prototype.createDataChannel; h.RTCPeerConnection.prototype.createDataChannel=function(){var f=k.apply(this,arguments);q(f,this);return f};g.wrapPeerConnectionEvent(h,"datachannel",function(f){q(f.channel,f.target);return f})}};c.shimConnectionState=function(h){if(h.RTCPeerConnection&&!("connectionState"in h.RTCPeerConnection.prototype)){var q=h.RTCPeerConnection.prototype;Object.defineProperty(q,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState}, enumerable:!0,configurable:!0});Object.defineProperty(q,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(k){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange);k&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=k)},enumerable:!0,configurable:!0});["setLocalDescription","setRemoteDescription"].forEach(function(k){var f=q[k]; q[k]=function(){this._connectionstatechangepoly||(this._connectionstatechangepoly=function(l){var t=l.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var x=new Event("connectionstatechange",l);t.dispatchEvent(x)}return l},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly));return f.apply(this,arguments)}})}};c.removeAllowExtmapMixed=function(h){if(h.RTCPeerConnection){var q=g.detectBrowser(h);if(!("chrome"===q.browser&& 71<=q.version||"safari"===q.browser&&605<=q.version)){var k=h.RTCPeerConnection.prototype.setRemoteDescription;h.RTCPeerConnection.prototype.setRemoteDescription=function(f){f&&f.sdp&&-1!==f.sdp.indexOf("\na=extmap-allow-mixed")&&(f.sdp=f.sdp.split("\n").filter(function(l){return"a=extmap-allow-mixed"!==l.trim()}).join("\n"));return k.apply(this,arguments)}}}};var d=(b=a("sdp"))&&b.__esModule?b:{default:b},g=function(h){if(h&&h.__esModule)return h;var q={};if(null!=h)for(var k in h)Object.prototype.hasOwnProperty.call(h, k)&&(q[k]=h[k]);q.default=h;return q}(a("./utils"))},{"./utils":15,sdp:17}],7:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=c.shimGetUserMedia=void 0;var e=a("./getusermedia");Object.defineProperty(c,"shimGetUserMedia",{enumerable:!0,get:function(){return e.shimGetUserMedia}});var d=a("./getdisplaymedia");Object.defineProperty(c,"shimGetDisplayMedia",{enumerable:!0,get:function(){return d.shimGetDisplayMedia}});c.shimPeerConnection=function(k){var f=g.detectBrowser(k); if(k.RTCIceGatherer&&(k.RTCIceCandidate||(k.RTCIceCandidate=function(x){return x}),k.RTCSessionDescription||(k.RTCSessionDescription=function(x){return x}),15025>f.version)){var l=Object.getOwnPropertyDescriptor(k.MediaStreamTrack.prototype,"enabled");Object.defineProperty(k.MediaStreamTrack.prototype,"enabled",{set:function(x){l.set.call(this,x);var r=new Event("enabled");r.enabled=x;this.dispatchEvent(r)}})}!k.RTCRtpSender||"dtmf"in k.RTCRtpSender.prototype||Object.defineProperty(k.RTCRtpSender.prototype, "dtmf",{get:function(){void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new k.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null));return this._dtmf}});k.RTCDtmfSender&&!k.RTCDTMFSender&&(k.RTCDTMFSender=k.RTCDtmfSender);var t=(0,q.default)(k,f.version);k.RTCPeerConnection=function(x){x&&x.iceServers&&(x.iceServers=(0,h.filterIceServers)(x.iceServers,f.version),g.log("ICE servers after filtering:",x.iceServers));return new t(x)};k.RTCPeerConnection.prototype=t.prototype};c.shimReplaceTrack= function(k){!k.RTCRtpSender||"replaceTrack"in k.RTCRtpSender.prototype||(k.RTCRtpSender.prototype.replaceTrack=k.RTCRtpSender.prototype.setTrack)};var g=function(k){if(k&&k.__esModule)return k;var f={};if(null!=k)for(var l in k)Object.prototype.hasOwnProperty.call(k,l)&&(f[l]=k[l]);f.default=k;return f}(a("../utils")),h=a("./filtericeservers"),q=(a=a("rtcpeerconnection-shim"))&&a.__esModule?a:{default:a}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}], 8:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.filterIceServers=function(d,g){var h=!1;d=JSON.parse(JSON.stringify(d));return d.filter(function(q){if(q&&(q.urls||q.url)){var k=q.urls||q.url;q.url&&!q.urls&&e.deprecated("RTCIceServer.url","RTCIceServer.urls");var f="string"===typeof k;f&&(k=[k]);k=k.filter(function(l){return 0===l.indexOf("stun:")?!1:(l=l.startsWith("turn")&&!l.startsWith("turn:[")&&l.includes("transport=udp"))&&!h?h=!0:l&&!h});delete q.url;q.urls=f?k[0]:k;return!!k.length}})}; var e=function(d){if(d&&d.__esModule)return d;var g={};if(null!=d)for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(g[h]=d[h]);g.default=d;return g}(a("../utils"))},{"../utils":15}],9:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=function(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&!(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices)&&(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator))}}, {}],10:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetUserMedia=function(e){e=e&&e.navigator;var d=function(h){return{name:{PermissionDeniedError:"NotAllowedError"}[h.name]||h.name,message:h.message,constraint:h.constraint,toString:function(){return this.name}}},g=e.mediaDevices.getUserMedia.bind(e.mediaDevices);e.mediaDevices.getUserMedia=function(h){return g(h).catch(function(q){return Promise.reject(d(q))})}}},{}],11:[function(a,b,c){function e(k,f,l){f in k?Object.defineProperty(k, f,{value:l,enumerable:!0,configurable:!0,writable:!0}):k[f]=l;return k}Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=c.shimGetUserMedia=void 0;var d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"===typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},g=a("./getusermedia");Object.defineProperty(c,"shimGetUserMedia",{enumerable:!0,get:function(){return g.shimGetUserMedia}}); var h=a("./getdisplaymedia");Object.defineProperty(c,"shimGetDisplayMedia",{enumerable:!0,get:function(){return h.shimGetDisplayMedia}});c.shimOnTrack=function(k){"object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCTrackEvent&&"receiver"in k.RTCTrackEvent.prototype&&!("transceiver"in k.RTCTrackEvent.prototype)&&Object.defineProperty(k.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})};c.shimPeerConnection=function(k){var f=q.detectBrowser(k);if("object"=== ("undefined"===typeof k?"undefined":d(k))&&(k.RTCPeerConnection||k.mozRTCPeerConnection)){!k.RTCPeerConnection&&k.mozRTCPeerConnection&&(k.RTCPeerConnection=k.mozRTCPeerConnection);53>f.version&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){var y=k.RTCPeerConnection.prototype[r],u=e({},r,function(){arguments[0]=new ("addIceCandidate"===r?k.RTCIceCandidate:k.RTCSessionDescription)(arguments[0]);return y.apply(this,arguments)});k.RTCPeerConnection.prototype[r]= u[r]});if(68>f.version){var l=k.RTCPeerConnection.prototype.addIceCandidate;k.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():l.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var t={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},x=k.RTCPeerConnection.prototype.getStats;k.RTCPeerConnection.prototype.getStats= function(){var r=Array.prototype.slice.call(arguments),y=r[1],u=r[2];return x.apply(this,[r[0]||null]).then(function(A){if(53>f.version&&!y)try{A.forEach(function(m){m.type=t[m.type]||m.type})}catch(m){if("TypeError"!==m.name)throw m;A.forEach(function(n,w){A.set(w,Object.assign({},n,{type:t[n.type]||n.type}))})}return A}).then(y,u)}}};c.shimSenderGetStats=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection&&k.RTCRtpSender&&!(k.RTCRtpSender&&"getStats"in k.RTCRtpSender.prototype)){var f= k.RTCPeerConnection.prototype.getSenders;f&&(k.RTCPeerConnection.prototype.getSenders=function(){var t=this,x=f.apply(this,[]);x.forEach(function(r){return r._pc=t});return x});var l=k.RTCPeerConnection.prototype.addTrack;l&&(k.RTCPeerConnection.prototype.addTrack=function(){var t=l.apply(this,arguments);t._pc=this;return t});k.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}};c.shimReceiverGetStats=function(k){if("object"===("undefined"=== typeof k?"undefined":d(k))&&k.RTCPeerConnection&&k.RTCRtpSender&&!(k.RTCRtpSender&&"getStats"in k.RTCRtpReceiver.prototype)){var f=k.RTCPeerConnection.prototype.getReceivers;f&&(k.RTCPeerConnection.prototype.getReceivers=function(){var l=this,t=f.apply(this,[]);t.forEach(function(x){return x._pc=l});return t});q.wrapPeerConnectionEvent(k,"track",function(l){l.receiver._pc=l.srcElement;return l});k.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}};c.shimRemoveStream= function(k){!k.RTCPeerConnection||"removeStream"in k.RTCPeerConnection.prototype||(k.RTCPeerConnection.prototype.removeStream=function(f){var l=this;q.deprecated("removeStream","removeTrack");this.getSenders().forEach(function(t){t.track&&f.getTracks().includes(t.track)&&l.removeTrack(t)})})};c.shimRTCDataChannel=function(k){k.DataChannel&&!k.RTCDataChannel&&(k.RTCDataChannel=k.DataChannel)};c.shimAddTransceiver=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f= k.RTCPeerConnection.prototype.addTransceiver;f&&(k.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var l=arguments[1],t=l&&"sendEncodings"in l;t&&l.sendEncodings.forEach(function(y){if("rid"in y&&!/^[a-z0-9]{0,16}$/i.test(y.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in y&&!(1<=parseFloat(y.scaleResolutionDownBy)))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in y&&!(0<=parseFloat(y.maxFramerate)))throw new RangeError("max_framerate must be >= 0.0"); });var x=f.apply(this,arguments);if(t){var r=x.sender;t=r.getParameters();"encodings"in t||(t.encodings=l.sendEncodings,r.sendEncodings=l.sendEncodings,this.setParametersPromises.push(r.setParameters(t).then(function(){delete r.sendEncodings}).catch(function(){delete r.sendEncodings})))}return x})}};c.shimGetParameters=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCRtpSender){var f=k.RTCRtpSender.prototype.getParameters;f&&(k.RTCRtpSender.prototype.getParameters=function(){var l= f.apply(this,arguments);return"sendEncodings"in this?Object.assign({},{encodings:this.sendEncodings},l):l})}};c.shimCreateOffer=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f=k.RTCPeerConnection.prototype.createOffer;k.RTCPeerConnection.prototype.createOffer=function(){var l=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return f.apply(l,t)}).finally(function(){l.setParametersPromises= []}):f.apply(this,arguments)}}};c.shimCreateAnswer=function(k){if("object"===("undefined"===typeof k?"undefined":d(k))&&k.RTCPeerConnection){var f=k.RTCPeerConnection.prototype.createAnswer;k.RTCPeerConnection.prototype.createAnswer=function(){var l=this,t=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return f.apply(l,t)}).finally(function(){l.setParametersPromises=[]}):f.apply(this,arguments)}}};var q=function(k){if(k&& k.__esModule)return k;var f={};if(null!=k)for(var l in k)Object.prototype.hasOwnProperty.call(k,l)&&(f[l]=k[l]);f.default=k;return f}(a("../utils"))},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});c.shimGetDisplayMedia=function(e,d){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(g){if(!g||!g.video)return g=new DOMException("getDisplayMedia without video constraints is undefined"), g.name="NotFoundError",g.code=8,Promise.reject(g);!0===g.video?g.video={mediaSource:d}:g.video.mediaSource=d;return e.navigator.mediaDevices.getUserMedia(g)})}},{}],13:[function(a,b,c){Object.defineProperty(c,"__esModule",{value:!0});var e="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(g){return typeof g}:function(g){return g&&"function"===typeof Symbol&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g};c.shimGetUserMedia=function(g){var h=d.detectBrowser(g), q=g&&g.navigator;g=g&&g.MediaStreamTrack;q.getUserMedia=function(x,r,y){d.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia");q.mediaDevices.getUserMedia(x).then(r,y)};if(!(55=t&&parseInt(f[t],10)}function d(f){return"[object Object]"!==Object.prototype.toString.call(f)? f:Object.keys(f).reduce(function(l,t){var x="[object Object]"===Object.prototype.toString.call(f[t]),r=x?d(f[t]):f[t];x=x&&!Object.keys(r).length;if(void 0===r||x)return l;x=Object;var y=x.assign,u={};t in u?Object.defineProperty(u,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):u[t]=r;return y.call(x,l,u)},{})}function g(f,l,t){l&&!t.has(l.id)&&(t.set(l.id,l),Object.keys(l).forEach(function(x){x.endsWith("Id")?g(f,f.get(l[x]),t):x.endsWith("Ids")&&l[x].forEach(function(r){g(f,f.get(r),t)})}))} Object.defineProperty(c,"__esModule",{value:!0});var h="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};c.extractVersion=e;c.wrapPeerConnectionEvent=function(f,l,t){if(f.RTCPeerConnection){f=f.RTCPeerConnection.prototype;var x=f.addEventListener;f.addEventListener=function(y,u){if(y!==l)return x.apply(this,arguments);var A=function(m){(m=t(m))&& (u.handleEvent?u.handleEvent(m):u(m))};this._eventMap=this._eventMap||{};this._eventMap[l]||(this._eventMap[l]=new Map);this._eventMap[l].set(u,A);return x.apply(this,[y,A])};var r=f.removeEventListener;f.removeEventListener=function(y,u){if(y!==l||!this._eventMap||!this._eventMap[l]||!this._eventMap[l].has(u))return r.apply(this,arguments);var A=this._eventMap[l].get(u);this._eventMap[l].delete(u);0===this._eventMap[l].size&&delete this._eventMap[l];0===Object.keys(this._eventMap).length&&delete this._eventMap; return r.apply(this,[y,A])};Object.defineProperty(f,"on"+l,{get:function(){return this["_on"+l]},set:function(y){this["_on"+l]&&(this.removeEventListener(l,this["_on"+l]),delete this["_on"+l]);y&&this.addEventListener(l,this["_on"+l]=y)},enumerable:!0,configurable:!0})}};c.disableLog=function(f){return"boolean"!==typeof f?Error("Argument type: "+("undefined"===typeof f?"undefined":h(f))+". Please use a boolean."):(q=f)?"adapter.js logging disabled":"adapter.js logging enabled"};c.disableWarnings= function(f){if("boolean"!==typeof f)return Error("Argument type: "+("undefined"===typeof f?"undefined":h(f))+". Please use a boolean.");k=!f;return"adapter.js deprecation warnings "+(f?"disabled":"enabled")};c.log=function(){"object"!==("undefined"===typeof window?"undefined":h(window))||q||"undefined"!==typeof console&&"function"===typeof console.log&&console.log.apply(console,arguments)};c.deprecated=function(f,l){k&&console.warn(f+" is deprecated, please use "+l+" instead.")};c.detectBrowser=function(f){var l= f.navigator,t={browser:null,version:null};if("undefined"===typeof f||!f.navigator)return t.browser="Not a browser.",t;l.mozGetUserMedia?(t.browser="firefox",t.version=e(l.userAgent,/Firefox\/(\d+)\./,1)):l.webkitGetUserMedia||!1===f.isSecureContext&&f.webkitRTCPeerConnection&&!f.RTCIceGatherer?(t.browser="chrome",t.version=e(l.userAgent,/Chrom(e|ium)\/(\d+)\./,2)):l.mediaDevices&&l.userAgent.match(/Edge\/(\d+).(\d+)$/)?(t.browser="edge",t.version=e(l.userAgent,/Edge\/(\d+).(\d+)$/,2)):f.RTCPeerConnection&& l.userAgent.match(/AppleWebKit\/(\d+)\./)?(t.browser="safari",t.version=e(l.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=f.RTCRtpTransceiver&&"currentDirection"in f.RTCRtpTransceiver.prototype):t.browser="Not a supported browser.";return t};c.compactObject=d;c.walkStats=g;c.filterStats=function(f,l,t){var x=t?"outbound-rtp":"inbound-rtp",r=new Map;if(null===l)return r;var y=[];f.forEach(function(u){"track"===u.type&&u.trackIdentifier===l.id&&y.push(u)});y.forEach(function(u){f.forEach(function(A){A.type=== x&&A.trackId===u.id&&g(f,A,r)})});return r};var q=!0,k=!0},{}],16:[function(a,b,c){function e(l,t,x,r,y){t=f.writeRtpDescription(l.kind,t);t+=f.writeIceParameters(l.iceGatherer.getLocalParameters());t+=f.writeDtlsParameters(l.dtlsTransport.getLocalParameters(),"offer"===x?"actpass":y||"active");t+="a=mid:"+l.mid+"\r\n";t=l.rtpSender&&l.rtpReceiver?t+"a=sendrecv\r\n":l.rtpSender?t+"a=sendonly\r\n":l.rtpReceiver?t+"a=recvonly\r\n":t+"a=inactive\r\n";l.rtpSender&&(x=l.rtpSender._initialTrackId||l.rtpSender.track.id, l.rtpSender._initialTrackId=x,r="msid:"+(r?r.id:"-")+" "+x+"\r\n",t=t+("a="+r)+("a=ssrc:"+l.sendEncodingParameters[0].ssrc+" "+r),l.sendEncodingParameters[0].rtx&&(t+="a=ssrc:"+l.sendEncodingParameters[0].rtx.ssrc+" "+r,t+="a=ssrc-group:FID "+l.sendEncodingParameters[0].ssrc+" "+l.sendEncodingParameters[0].rtx.ssrc+"\r\n"));t+="a=ssrc:"+l.sendEncodingParameters[0].ssrc+" cname:"+f.localCName+"\r\n";l.rtpSender&&l.sendEncodingParameters[0].rtx&&(t+="a=ssrc:"+l.sendEncodingParameters[0].rtx.ssrc+" cname:"+ f.localCName+"\r\n");return t}function d(l,t){var x=!1;l=JSON.parse(JSON.stringify(l));return l.filter(function(r){if(r&&(r.urls||r.url)){var y=r.urls||r.url;r.url&&!r.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var u="string"===typeof y;u&&(y=[y]);y=y.filter(function(A){return 0!==A.indexOf("turn:")||-1===A.indexOf("transport=udp")||-1!==A.indexOf("turn:[")||x?0===A.indexOf("stun:")&&14393<=t&&-1===A.indexOf("?transport=udp"):x=!0});delete r.url;r.urls=u?y[0]:y;return!!y.length}})} function g(l,t){var x={codecs:[],headerExtensions:[],fecMechanisms:[]},r=function(u,A){u=parseInt(u,10);for(var m=0;mt&&m.recvEncodingParameters.forEach(function(B){delete B.rtx}), z.encodings=m.recvEncodingParameters.length?m.recvEncodingParameters:[{}],z.rtcp={compound:m.rtcpParameters.compound},m.rtcpParameters.cname&&(z.rtcp.cname=m.rtcpParameters.cname),m.sendEncodingParameters.length&&(z.rtcp.ssrc=m.sendEncodingParameters[0].ssrc),m.rtpReceiver.receive(z))};u.prototype.setLocalDescription=function(m){var n=this;if(-1===["offer","answer"].indexOf(m.type))return Promise.reject(k("TypeError",'Unsupported type "'+m.type+'"'));if(!h("setLocalDescription",m.type,n.signalingState)|| n._isClosed)return Promise.reject(k("InvalidStateError","Can not set local "+m.type+" in state "+n.signalingState));if("offer"===m.type){var w=f.splitSections(m.sdp);var z=w.shift();w.forEach(function(C,G){C=f.parseRtpParameters(C);n.transceivers[G].localCapabilities=C});n.transceivers.forEach(function(C,G){n._gather(C.mid,G)})}else if("answer"===m.type){w=f.splitSections(n._remoteDescription.sdp);z=w.shift();var B=0t&&(L.codecs=L.codecs.filter(function(Y){return"rtx"!==Y.name}));ba=N.sendEncodingParameters||[{ssrc:1001*(2*K+2)}];qa=!1;if("sendrecv"===P||"sendonly"===P){qa=!N.rtpReceiver;var ia= N.rtpReceiver||new l.RTCRtpReceiver(N.dtlsTransport,U);if(qa){P=ia.track;if(!X||"-"!==X.stream)if(X){w[X.stream]||(w[X.stream]=new l.MediaStream,Object.defineProperty(w[X.stream],"id",{get:function(){return X.stream}}));Object.defineProperty(P,"id",{get:function(){return X.track}});var ka=w[X.stream]}else w.default||(w.default=new l.MediaStream),ka=w.default;ka&&(x(P,ka),N.associatedRemoteMediaStreams.push(ka));z.push([P,ia,ka])}}else N.rtpReceiver&&N.rtpReceiver.track&&(N.associatedRemoteMediaStreams.forEach(function(Y){var Ia= Y.getTracks().find(function(ac){return ac.id===N.rtpReceiver.track.id});Ia&&r(Ia,Y)}),N.associatedRemoteMediaStreams=[]);N.localCapabilities=L;N.remoteCapabilities=Ea;N.rtpReceiver=ia;N.rtcpParameters=Ga;N.sendEncodingParameters=ba;N.recvEncodingParameters=na;n._transceive(n.transceivers[K],!1,qa)}}});void 0===n._dtlsRole&&(n._dtlsRole="offer"===m.type?"active":"passive");n._remoteDescription={type:m.type,sdp:m.sdp};"offer"===m.type?n._updateSignalingState("have-remote-offer"):n._updateSignalingState("stable"); Object.keys(w).forEach(function(L){var K=w[L];if(K.getTracks().length){if(-1===n.remoteStreams.indexOf(K)){n.remoteStreams.push(K);var P=new Event("addstream");P.stream=K;l.setTimeout(function(){n._dispatchEvent("addstream",P)})}z.forEach(function(U){K.id===U[2].id&&y(n,U[0],U[1],[K])})}});z.forEach(function(L){L[2]||y(n,L[0],L[1],[])});l.setTimeout(function(){n&&n.transceivers&&n.transceivers.forEach(function(L){L.iceTransport&&"new"===L.iceTransport.state&&0w&&(C.wantReceive=!1)):"video"===C.kind&&(z--,0>z&&(C.wantReceive=!1))});0t&&(L.codecs=L.codecs.filter(function(K){return"rtx"!==K.name}));L.codecs.forEach(function(K){"H264"===K.name&&void 0===K.parameters["level-asymmetry-allowed"]&&(K.parameters["level-asymmetry-allowed"]="1");C.remoteCapabilities&&C.remoteCapabilities.codecs&&C.remoteCapabilities.codecs.forEach(function(P){K.name.toLowerCase()===P.name.toLowerCase()&&K.clockRate===P.clockRate&&(K.preferredPayloadType=P.payloadType)})}); L.headerExtensions.forEach(function(K){(C.remoteCapabilities&&C.remoteCapabilities.headerExtensions||[]).forEach(function(P){K.uri===P.uri&&(K.id=P.id)})});G=C.sendEncodingParameters||[{ssrc:1001*(2*G+1)}];M&&15019<=t&&"video"===aa&&!G[0].rtx&&(G[0].rtx={ssrc:G[0].ssrc+1});C.wantReceive&&(C.rtpReceiver=new l.RTCRtpReceiver(C.dtlsTransport,aa));C.localCapabilities=L;C.sendEncodingParameters=G});"max-compat"!==n._config.bundlePolicy&&(B+="a=group:BUNDLE "+n.transceivers.map(function(C){return C.mid}).join(" ")+ "\r\n");B+="a=ice-options:trickle\r\n";n.transceivers.forEach(function(C,G){B+=e(C,C.localCapabilities,"offer",C.stream,n._dtlsRole);B+="a=rtcp-rsize\r\n";!C.iceGatherer||"new"===n.iceGatheringState||0!==G&&n.usingBundle||(C.iceGatherer.getLocalCandidates().forEach(function(M){M.component=1;B+="a="+f.writeCandidate(M)+"\r\n"}),"completed"===C.iceGatherer.state&&(B+="a=end-of-candidates\r\n"))});m=new l.RTCSessionDescription({type:"offer",sdp:B});return Promise.resolve(m)};u.prototype.createAnswer= function(){var m=this;if(m._isClosed)return Promise.reject(k("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==m.signalingState&&"have-local-pranswer"!==m.signalingState)return Promise.reject(k("InvalidStateError","Can not call createAnswer in signalingState "+m.signalingState));var n=f.writeSessionBoilerplate(m._sdpSessionId,m._sdpSessionVersion++);m.usingBundle&&(n+="a=group:BUNDLE "+m.transceivers.map(function(B){return B.mid}).join(" ")+"\r\n");n+="a=ice-options:trickle\r\n"; var w=f.getMediaSections(m._remoteDescription.sdp).length;m.transceivers.forEach(function(B,C){if(!(C+1>w))if(B.rejected)"application"===B.kind?n="DTLS/SCTP"===B.protocol?n+"m=application 0 DTLS/SCTP 5000\r\n":n+("m=application 0 "+B.protocol+" webrtc-datachannel\r\n"):"audio"===B.kind?n+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===B.kind&&(n+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),n+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+B.mid+"\r\n";else{if(B.stream){var G; "audio"===B.kind?G=B.stream.getAudioTracks()[0]:"video"===B.kind&&(G=B.stream.getVideoTracks()[0]);G&&15019<=t&&"video"===B.kind&&!B.sendEncodingParameters[0].rtx&&(B.sendEncodingParameters[0].rtx={ssrc:B.sendEncodingParameters[0].ssrc+1})}C=g(B.localCapabilities,B.remoteCapabilities);!C.codecs.filter(function(M){return"rtx"===M.name.toLowerCase()}).length&&B.sendEncodingParameters[0].rtx&&delete B.sendEncodingParameters[0].rtx;n+=e(B,C,"answer",B.stream,m._dtlsRole);B.rtcpParameters&&B.rtcpParameters.reducedSize&& (n+="a=rtcp-rsize\r\n")}});var z=new l.RTCSessionDescription({type:"answer",sdp:n});return Promise.resolve(z)};u.prototype.addIceCandidate=function(m){var n=this,w;return m&&void 0===m.sdpMLineIndex&&!m.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(z,B){if(n._remoteDescription)if(m&&""!==m.candidate){var C=m.sdpMLineIndex;if(m.sdpMid)for(var G=0;Gq&&(q=k.maxptime)});0d[g].length||"="!==d[g].charAt(1))return!1;return!0};"object"===typeof b&&(b.exports=e)},{}]},{},[1])(1)});class bc{constructor(a){this.FrameDisplayDeltaTimeMs=this.BrowserReceiptTimeMs=this.UETransmissionTimeMs= this.UECaptureToSendMs=this.UEEncodeMs=this.UEReceiptTimeMs=this.TestStartTimeMs=null;this.onReady=a}reset(){this.FrameDisplayDeltaTimeMs=this.BrowserReceiptTimeMs=this.UETransmissionTimeMs=this.UEEncodeMs=this.UECaptureToSendMs=this.UEReceiptTimeMs=this.TestStartTimeMs=null}start(){this.reset();this.TestStartTimeMs=Date.now();if(this.onReady)this.onReady()}setUETimings(a){this.UEReceiptTimeMs=a.ReceiptTimeMs;this.UEEncodeMs=a.EncodeMs;this.UECaptureToSendMs=a.CaptureToSendMs;this.UETransmissionTimeMs= a.TransmissionTimeMs;this.BrowserReceiptTimeMs=Date.now();this.latencyTimingsReady()}setFrameDisplayDeltaTime(a){null==this.FrameDisplayDeltaTimeMs&&(this.FrameDisplayDeltaTimeMs=Math.round(a),this.latencyTimingsReady())}latencyTimingsReady(){if(this.BrowserReceiptTimeMs){var a=this.BrowserReceiptTimeMs-this.TestStartTimeMs,b=this.UECaptureToSendMs,c=this.UETransmissionTimeMs-this.UEReceiptTimeMs,e=a-c,d={latencyExcludingDecode:a,encodeLatency:this.UEEncodeMs.toFixed(1),uePixelStreamLatency:b.toFixed(1), ueTestDuration:c.toFixed(1),networkLatency:e.toFixed(1)};this.FrameDisplayDeltaTimeMs&&this.BrowserReceiptTimeMs&&(d.endToEndLatency=this.FrameDisplayDeltaTimeMs+e+("string"===typeof b?0:b),d.browserSideLatency=this.FrameDisplayDeltaTimeMs+(a-e-c),d.endToEndLatency=d.endToEndLatency.toFixed(1),d.browserSideLatency=d.browserSideLatency.toFixed(1));if(this.onReady)this.onReady(d)}}}class cc{constructor(a,b){this.useStats=a.useStats;this.events=a.events;this.webRtcConfig=a.peerConnectionOptions||{}; this.webRtcConfig.sdpSemantics="unified-plan";this.tnClient=this.dcClient=this.pcClient=null;this.sdpConstraints={offerToReceiveAudio:0,offerToReceiveVideo:1,voiceActivityDetection:!1};this.dataChannelOptions={ordered:!0};this.lastStats={};this.playerId=0;this.latencyTestTimings=new bc(this.events.onLatencyTimingsReady);this.api_isSending=!1;this.api_queue=[];this.player=b;this.api_enableLog=a.enableApiCallLog;this.log=(c,e,d)=>this.player.getAPI().log(c,e,d)}setVideo(a){this.video=a}logStartupInfo(a){if(this.events.onlog)this.events.onlog(a)}logApiCall(a, b,c){this.api_enableLog&&(a&&""!=a?(a=`[API] ${ua()} ${a}`,this.log(a,b,c)):this.log(""))}logPerfTest(a,b,c){a&&""!=a?this.log(`[PerfTest] ${ua()} ${a}`,b,c):this.log("")}setupPeerConnection(){this.pcClient||(this.pcClient=new RTCPeerConnection(this.webRtcConfig),this.pcClient.addTransceiver("video",{direction:"recvonly"}),this.pcClient.onsignalingstatechange=a=>this.onStateChanged(a),this.pcClient.oniceconnectionstatechange=a=>this.onStateChanged(a),this.pcClient.onicegatheringstatechange=a=>this.onStateChanged(a), this.pcClient.ontrack=a=>this.events.ontrack(a),this.pcClient.onicecandidate=a=>this.events.onicecandidate(a),this.pcClient.ondatachannel=a=>{this.dcClient=a.channel;this.dcClient.bufferedAmountLowThreshold=this.lowWaterMark;this.setupDataChannelCallbacks()},this.lowWaterMark=this.chunkSize=this.pcClient.sctp?Math.min(this.pcClient.sctp.maxMessageSize,65536):65536,this.highWaterMark=Math.max(8*this.chunkSize,1048576),this.headerOffset=4,this.lenPerChunk=Math.floor((this.chunkSize-this.headerOffset)/ 2),this.log("Chunk Size: "+this.chunkSize),this.log("Buffer Threshold Low: "+this.lowWaterMark),this.log("Buffer Threshold High: "+this.highWaterMark))}close(){this.dcClient&&"open"==this.dcClient.readyState&&(this.dcClient.close(),this.dcClient=null);this.pcClient&&(this.pcClient.close(),this.pcClient=null);this.clearStatsTimer()}setupDataChannelCallbacks(){this.dcClient.binaryType="arraybuffer";this.dcClient.onopen=a=>{this.isDatachannelOpened=!0;if(this.events&&this.events.ondatachannelopen)this.events.ondatachannelopen(a); this.logStartupInfo("video: loading...");for(let b of[81,87,69,82,84,65,83,68,70])this.send((new Uint8Array([61,b])).buffer)};this.dcClient.onclose=a=>{this.isDatachannelOpened=!1;this.clearStatsTimer();if(this.events&&this.events.ondatachannelclose)this.events.ondatachannelclose(a)};this.dcClient.onerror=a=>{this.isDatachannelOpened=!1;this.logStartupInfo("channel error");if(this.events&&this.events.ondatachannelerror)this.events.ondatachannelerror(a)};this.dcClient.onmessage=a=>this.onDatachannelMessage(a)}createOffer(){this.close(); this.setupPeerConnection();try{this.dcClient=this.pcClient.createDataChannel("cirrus",this.dataChannelOptions),this.dcClient.bufferedAmountLowThreshold=this.lowWaterMark,this.setupDataChannelCallbacks(),this.logStartupInfo("channel created")}catch(a){this.logStartupInfo("no channel"),this.dcClient=null}this.pcClient.createOffer(this.sdpConstraints).then(a=>{a.sdp=a.sdp.replace("useinbandfec=1","useinbandfec=1;stereo=1;sprop-maxcapturerate=48000");this.pcClient.setLocalDescription(a);this.events.onOfferCreated(a)}, ()=>{this.logStartupInfo("couldn't create offer")})}onReceiveOffer(a){a=new RTCSessionDescription(a);this.setupPeerConnection();this.pcClient.setRemoteDescription(a).then(()=>{this.pcClient.createAnswer().then(b=>this.pcClient.setLocalDescription(b)).then(()=>{if(this.events.onAnswerCreated)this.events.onAnswerCreated(this.pcClient.currentLocalDescription)}).then(()=>{let b=this.pcClient.getReceivers();for(let c of b)c.playoutDelayHint=0}).catch(b=>console.error("createAnswer() failed:",b))});this.setupLiveStats()}onIceCandidate(a){a= new RTCIceCandidate(a);this.pcClient.addIceCandidate(a).then(b=>{this.logStartupInfo("candidate added")})}onReceiveAnswer(a){this.playerId=a.playerId;this.logStartupInfo(`received answer: ${this.playerId}`);a=new RTCSessionDescription(a);this.pcClient.setRemoteDescription(a);a=this.pcClient.getReceivers();for(let b of a)b.playoutDelayHint=0;this.setupLiveStats()}setupLiveStats(){this.clearStatsTimer();this.useStats&&!this.aggregateStatsIntervalId&&(this.aggregateStatsIntervalId=setInterval(()=>{this.pcClient&& this.pcClient.getStats(null).then(a=>this.processLiveStats(a))},1E3))}onStateChanged(a){this.signalingState!=this.pcClient.signalingState&&(this.signalingState=this.pcClient.signalingState,this.logStartupInfo(`__signaling: ${this.signalingState}`));this.iceConnectionState!=this.pcClient.iceConnectionState&&(this.iceConnectionState=this.pcClient.iceConnectionState,this.logStartupInfo(`__ice_connection: ${this.iceConnectionState}`),"disconnected"!=this.iceConnectionState||this.isDatachannelOpened|| this.logStartupInfo("\u8fde\u63a5\u5efa\u7acb\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u670d\u52a1\u5668\u7aef\u53e3\u8bbe\u7f6e"),"failed"!=this.iceConnectionState||this.isDatachannelOpened||this.logStartupInfo("\u8fde\u63a5\u5efa\u7acb\u5931\u8d25\uff0c\u65e0\u53ef\u7528\u7684\u5019\u9009\u8fde\u63a5"));this.iceGatheringState!=this.pcClient.iceGatheringState&&(this.iceGatheringState=this.pcClient.iceGatheringState,this.logStartupInfo(`__ice_gathering: ${this.iceGatheringState}`))}clearStatsTimer(){this.aggregateStatsIntervalId&& (clearInterval(this.aggregateStatsIntervalId),this.aggregateStatsIntervalId=void 0)}send(a){return this.dcClient&&"open"==this.dcClient.readyState?(this.dcClient.send(a),!0):!1}requestInitialSettings(){this.send((new Uint8Array([7])).buffer)}requestQualityControl(){this.send((new Uint8Array([1])).buffer)}sendEnableIntervalSendQP(a){this.send((new Uint8Array([11,a?1:0])).buffer)}sendEnableReceiveEvents(a){this.send((new Uint8Array([12,a?1:0])).buffer)}_createApiBinBuffer(a,b,c){let e=new DataView(new ArrayBuffer(this.headerOffset+ 2*b)),d=0;e.setUint8(d,52);d++;e.setUint8(d,a);d++;e.setUint16(d,b,!0);d+=2;for(a=0;athis.lenPerChunk){let e=Math.ceil(a/this.lenPerChunk);for(let d=0;d=this.highWaterMark){this.dcClient.bufferedAmount< this.lowWaterMark&&(this.api_timeoutHandle=setTimeout(()=>{0==this.api_queue.length?(this.api_isSending=!1,this.logApiCall("Finished!")):(this.logApiCall("continue send after timeout."),this._sendApiFromQueue())},0));this.logApiCall(`-------paused------- queue: ${this.api_queue.length}, bufferedAmount: ${a}, highWaterMark: ${this.highWaterMark}`);return}}this.api_isSending=!1;this.logApiCall("Finished!")}sendApi(a){this.logApiCall();this.logApiCall(`START: ${a?a.command:"Unkown"}`);this.dcClient&& "open"==this.dcClient.readyState?(this._pushApiToSendingQueue(a),this.dcClient.onbufferedamountlow=b=>{this.logApiCall(`-------bufferedamountlow------- queue: ${this.api_queue.length}`);0==this.api_queue.length?(this.api_isSending=!1,this.logApiCall("Finished!")):(this.logApiCall("continue send after bufferedamountlow."),this._sendApiFromQueue())},this.api_isSending?this.logApiCall("Waiting..."):this._sendApiFromQueue()):this.logApiCall("Data channel is invalid!")}perfTest(a){this.api_isSending?this.logPerfTest("Please wait until the API call is completed before testing!", !1,"red"):(this.pt_finished=!1,this.pt_bytesToSend=1048576*a,this.pt_timeoutHandle=null,this.pt_sended=this.pt_sendStartTime=this.pt_maxTimeUsedInSend=this.pt_numberOfSendCalls=this.pt_totalTimeUsedInSend=0,this.logPerfTest(),this.logPerfTest(`Performence Testing Starting: ${a}MB (${1048576*a})`,!1,"blue"),this.logPerfTest("Chunk Size: "+this.chunkSize),this.logPerfTest("Buffer Threshold Low: "+this.lowWaterMark),this.logPerfTest("Buffer Threshold High: "+this.highWaterMark),this.dcClient.onbufferedamountlow= b=>{this.logPerfTest(`[bufferedamountlow] sendCalls: ${this.pt_numberOfSendCalls}, sended: ${this.pt_sended}, bufferedAmount: ${this.dcClient.bufferedAmount}`,!1,"gray");this.pt_finished||this.pt_send()},this.pt_create_data=()=>{var b=new Date;b=b.toLocaleString()+"."+b.getMilliseconds();let c=new DataView(new ArrayBuffer(this.chunkSize)),e=0;c.setUint8(e,53);e++;c.setUint16(e,b.length,!0);e+=2;for(let d=0;d{null!== this.pt_timeoutHandle&&(clearTimeout(this.pt_timeoutHandle),this.pt_timeoutHandle=null);for(var b=this.dcClient.bufferedAmount;this.pt_sendedthis.pt_maxTimeUsedInSend&&(this.pt_maxTimeUsedInSend=c);this.pt_numberOfSendCalls+=1;b+=this.chunkSize;this.pt_sended+=this.chunkSize;if(b>=this.highWaterMark){this.dcClient.bufferedAmountsendData(),0));this.logPerfTest(`[-------paused-------] sendCalls: ${this.pt_numberOfSendCalls}, sended: ${this.pt_sended}, ${b} / ${this.dcClient.bufferedAmount}`,!1,"darkgray");break}}this.pt_sended===this.pt_bytesToSend&&(this.pt_finished=!0,this.logPerfTest("Data transfer completed successfully!",!1,"blue"),this.logPerfTest(" Total sended: "+this.pt_sended),this.logPerfTest(" Average time spent in send() (ms): "+this.pt_totalTimeUsedInSend/this.pt_numberOfSendCalls),this.logPerfTest(" Max time spent in send() (ms): "+ this.pt_maxTimeUsedInSend),b=performance.now()-this.pt_sendStartTime,this.logPerfTest(" Total time spent: "+b),this.logPerfTest(" MBytes/Sec: "+this.pt_bytesToSend/1E3/b))},this.logPerfTest("Start sending data..."),this.pt_sendStartTime=performance.now(),this.pt_sended=this.pt_numberOfSendCalls=this.pt_totalTimeUsedInSend=this.pt_maxTimeUsedInSend=0,this.pt_send())}sendDescriptor(a,b){b=JSON.stringify(b);let c=new DataView(new ArrayBuffer(3+2*b.length)),e=0;c.setUint8(e,a);e++;c.setUint16(e, b.length,!0);e+=2;for(a=0;a{"inbound-rtp"!=c.type||c.isRemote||"video"!=c.mediaType&&!c.id.toLowerCase().includes("video")||(b.timestamp=c.timestamp,b.timestampStart=this.lastStats&&this.lastStats.timestampStart?this.lastStats.timestampStart:c.timestamp,b.bytesReceived=c.bytesReceived,b.packetsLost=c.packetsLost,b.framesDropped=c.framesDropped,b.framesPerSecond=c.framesPerSecond,b.framesReceived=c.framesReceived,b.framesDecoded=c.framesDecoded,b.keyFramesDecoded=c.keyFramesDecoded, b.frameWidth=c.frameWidth,b.frameHeight=c.frameHeight,this.lastStats&&(b.bitrate=8*(b.bytesReceived-this.lastStats.bytesReceived)/(b.timestamp-this.lastStats.timestamp)));"track"==c.type&&c.frameWidth&&(c.framesDropped&&(b.framesDropped=c.framesDropped),c.framesReceived&&(b.framesReceived=c.framesReceived),b.frameWidth=c.frameWidth,b.frameHeight=c.frameHeight);"candidate-pair"==c.type&&c.hasOwnProperty("currentRoundTripTime")&&0!=c.currentRoundTripTime&&(b.currentRoundTripTime=c.currentRoundTripTime)}); this.lastStats.receiveToCompositeMs&&(b.receiveToCompositeMs=this.lastStats.receiveToCompositeMs,this.latencyTestTimings.setFrameDisplayDeltaTime(this.lastStats.receiveToCompositeMs));this.lastStats=b;this.events.onstats(this.lastStats)}onDatachannelMessage(a){var b=new Uint8Array(a.data);switch(b[0]){case 0:this.events.ondatachannelmessage("QualityControlOwnership",1==b[1]);break;case 1:if((a=(new TextDecoder("utf-16")).decode(a.data.slice(1)))&&""!=a)this.events.ondatachannelmessage("ResponseAPI", a);break;case 101:b=b[1];a=(new TextDecoder("utf-8")).decode(a.data.slice(2));switch(b){case 0:this.events.ondatachannelmessage("ResponseAPI",a);break;case 1:this.reponse_api_json_string=a;break;case 2:this.reponse_api_json_string+=a;break;case 3:this.reponse_api_json_string+=a,this.events.ondatachannelmessage("ResponseAPI",this.reponse_api_json_string)}break;case 6:a=(new TextDecoder("utf-16")).decode(a.data.slice(1));a=JSON.parse(a);this.latencyTestTimings.setUETimings(a);break;case 7:a=(new TextDecoder("utf-16")).decode(a.data.slice(1)); a=JSON.parse(a);if(a.Encoder)this.events.ondatachannelmessage("InitialSettings",a);break;case 5:this.events.ondatachannelmessage("VideoEncoderAvgQP",a)}}startLatencyTest(){this.video&&(this.latencyTestTimings.start(),this.sendDescriptor(6,{StartTime:this.latencyTestTimings.TestStartTimeMs}))}}class ja{constructor(a){this.player=a;this.uniqueId=a.uniqueId;this.container=a.container}appendElement(a){this.container.appendChild(a);this.setNeedReposUI()}removeElement(a){this.container.removeChild(a)}get(a){return ya(a+ "_"+this.uniqueId)}getValue(a){let b;return null==(b=this.get(a))?void 0:b.value}setValue(a,b){(a=this.get(a))&&(a.value=b)}setText(a,b){(a=this.get(a))&&(a.innerText=b)}setHtml(a,b){(a=this.get(a))&&(a.innerHTML=b)}resize(){this.player.resize()}setNeedReposUI(){this.player.bNeedReposUI=!0}}class dc extends ja{constructor(a){super(a);this.el=document.createElement("pre");this.el.id=`eventsPanel_${this.uniqueId}`;this.el.className="__eventsPanel";this.el.oncontextmenu=new Function("return false"); this.el.onselectstart=new Function("return false");this.appendElement(this.el)}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}appendText(a){if(this.el){let b=this.el.innerText;b+=a+"\n";this.el.innerText=b;this.el.scrollTop=this.el.scrollHeight+100}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.width=`${a.width}px`)}}class da{}da.Information=''; da.FullScreenEnter=''; da.FullScreenExit=''; da.InitialCamera=''; class ec extends ja{constructor(a){super(a);this.create()}create(){if(!this.el){this.el=document.createElement("button");this.el.id=`fullscreeButton_${this.uniqueId}`;this.el.className="__fullscreeButton";if(R.isIOSDevice||R.isSafari)this.el.style.backgroundSize="cover";this.el.innerHTML=da.FullScreenEnter;this.el.title=H.getString("EnterFullscreen");this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false");this.el.onclick=()=>this.player.fullscreen=!this.player.fullscreen; this.el.onmousedown=a=>{1==a.button&&a.preventDefault()};this.appendElement(this.el);document.addEventListener("fullscreenchange",()=>{this.el.title=H.getString("ExitFullscreen");this.el.innerHTML=R.isFullscreen()?da.FullScreenExit:da.FullScreenEnter;this.player.resize()})}}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}setPosition(a,b){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.left=`${b?38:5}px`,this.el.style.top=`${a.height-32}px`)}}const fa={BackSpace:8, Shift:16,Control:17,Alt:18,RightShift:253,RightControl:254,RightAlt:255};class fc extends ja{constructor(a,b){super(a);this.video=null;this.useBuiltinCursors=b.useBuiltinCursors;this.keyEventTargetStr=b.keyEventTarget;this.keyEventTarget="document"==b.keyEventTarget?document:"none"==b.keyEventTarget?null:"video";this.callOnUserInteraction=()=>this.player.resetInteractTimestamp();this.fakeMouseWithTouches=!1;this.onMButtonDoubleClick=b.onMButtonDoubleClick;this.mouseKeyListener=b.mouseKeyListener; this.touchListener=b.touchListener;this.onActionEnable=!0;this.onEvents=b.onEvents;this.onVideoLoaded=b.onVideoLoaded;document.addEventListener("WeixinJSBridgeReady",()=>{R.isInWeixinBrowser=!0;this.video.play()});this.create()}isVideoLoaded(){return!!this._isVideoLoaded}create(){this.video&&this.destroy();this.video||(this.video=document.createElement("video"),this.video.id=`streamingVideo_${this.uniqueId}`,this.video.style="position:absolute;",this.video.playsInline=!0,this.video.muted=!0,this.video.autoplay= !0,this.video.disablepictureinpicture=!0,"video"===this.keyEventTarget&&(this.video.tabIndex=1,this.keyEventTarget=this.video),this.appendElement(this.video),this.player.logStartupInfo("video element created"),this._isVideoLoaded=!1,this.video.addEventListener("loadedmetadata",()=>{this._isVideoLoaded=!0;this.video.onmouseenter({button:0,x:0,y:0});this.onVideoLoaded()},!0),this.setCursor());if("requestVideoFrameCallback"in HTMLVideoElement.prototype){const a=(b,c)=>{c.receiveTime&&c.expectedDisplayTime&& (this.rtc.lastStats.receiveToCompositeMs=c.presentationTime-c.receiveTime);this.video&&this.video.requestVideoFrameCallback(a)};this.video.requestVideoFrameCallback(a)}}setWebRtcPlayer(a){(!this.video||R.isAndroidDevice||R.isIOSDevice&&!R.isInWeixinBrowser)&&this.create();this.rtc=a;this.rtc.setVideo(this.video)}setActionEventEnabled(a){this.onActionEnable=a}destroy(){this.video&&(this.removeElement(this.video),this.video=null)}valid(){return!!this.video}videoWidth(){let a;return null==(a=this.video)? void 0:a.videoWidth}videoHeight(){let a;return null==(a=this.video)?void 0:a.videoHeight}clientWidth(){let a;return null==(a=this.video)?void 0:a.clientWidth}clientHeight(){let a;return null==(a=this.video)?void 0:a.clientHeight}setTrack(a){let b=a.streams[0];this.player.logStartupInfo("track: "+a.track.kind);"audio"==a.track.kind?(a=document.createElement("Audio"),a.autoplay=!0,a.srcObject=b,a.play(),this.player.logStartupInfo("audio element created")):"video"==a.track.kind&&this.video.srcObject!== b&&(this.video.srcObject=b)}setKeyEventTarget(a){this.keyEventTargetStr!=a&&(this.clearKeyboardEvents(),"video"==a?(this.video&&(this.video.tabIndex=1),this.keyEventTarget=this.video,this.video.focus()):"document"==a?(this.keyEventTarget=document,this.video.focus()):this.keyEventTarget&&(this.keyEventTarget=null),this.keyEventTargetStr=a,this.registerKeyboardEvents())}clearKeyboardEvents(){this.keyEventTarget&&(this.keyEventTarget.onkeydown=null,this.keyEventTarget.onkeyup=null,this.keyEventTarget.onkeypress= null)}registerKeyboardEvents(){this.keyEventTarget&&(this.keyEventTarget.onkeydown=a=>{112<=a.keyCode&&123>=a.keyCode||a.ctrlKey||this.sendKeydown(a);if(a.keyCode===fa.BackSpace)this.keyEventTarget.onkeypress({charCode:fa.BackSpace});this.callActionEventHander(5,a)},this.keyEventTarget.onkeyup=a=>{112<=a.keyCode&&123>=a.keyCode||a.ctrlKey||this.sendKeyup(a);this.callActionEventHander(6,a)},this.keyEventTarget.onkeypress=a=>{112<=a.keyCode&&123>=a.keyCode||this.sendKeypress(a);this.callActionEventHander(7, a)})}setCursor(){if(this.video)if(this.useBuiltinCursors)switch(this.mouseDownButton){case 0:this.video.setAttribute("class","streamingVideoCursorPan");break;case 1:this.video.setAttribute("class","streamingVideoCursorMove");break;case 2:this.video.setAttribute("class","streamingVideoCursorRotate");break;default:this.video.setAttribute("class","streamingVideoCursorPointer")}else this.video.setAttribute("class","streamingVideoNoCursor")}callActionEventHander(a,b){if(this.mouseKeyListener&&this.onActionEnable)switch(a){case 0:if(R.isFunction(this.mouseKeyListener.onMouseEnter))this.mouseKeyListener.onMouseEnter(b); break;case 1:if(R.isFunction(this.mouseKeyListener.onMouseLeave))this.mouseKeyListener.onMouseLeave(b);break;case 2:if(R.isFunction(this.mouseKeyListener.onMouseMove))this.mouseKeyListener.onMouseMove(b);break;case 3:if(R.isFunction(this.mouseKeyListener.onMouseDown))this.mouseKeyListener.onMouseDown(b);break;case 4:if(R.isFunction(this.mouseKeyListener.onMouseUp))this.mouseKeyListener.onMouseUp(b);break;case 5:if(R.isFunction(this.mouseKeyListener.onKeyDown))this.mouseKeyListener.onKeyDown(b);break; case 6:if(R.isFunction(this.mouseKeyListener.onKeyUp))this.mouseKeyListener.onKeyUp(b);break;case 7:if(R.isFunction(this.mouseKeyListener.onKeyPress))this.mouseKeyListener.onKeyPress(b)}}isMiddleDoubleClick(a){if(1==a.button){if(this.lastMClickTimestamp&&200>a.timeStamp-this.lastMClickTimestamp)return!0;this.lastMClickTimestamp=a.timeStamp}else this.lastMClickTimestamp=void 0;return!1}registerMouseEvents(){this.video.onmouseenter=a=>{this.sendMouseEnter();a.buttons&1&&this.sendMouseDown(0,a.offsetX, a.offsetY);a.buttons&2&&this.sendMouseDown(2,a.offsetX,a.offsetY);a.buttons&4&&this.sendMouseDown(1,a.offsetX,a.offsetY);a.buttons&8&&this.sendMouseDown(3,a.offsetX,a.offsetY);a.buttons&16&&this.sendMouseDown(4,a.offsetX,a.offsetY);this.callActionEventHander(0,a)};this.video.onmouseleave=a=>{this.sendMouseLeave();a.buttons&1&&this.sendMouseUp(0,a.offsetX,a.offsetY);a.buttons&2&&this.sendMouseUp(2,a.offsetX,a.offsetY);a.buttons&4&&this.sendMouseUp(1,a.offsetX,a.offsetY);a.buttons&8&&this.sendMouseUp(3, a.offsetX,a.offsetYy);a.buttons&16&&this.sendMouseUp(4,a.offsetX,a.offsetY);this.callActionEventHander(1,a)};this.video.onmousemove=a=>{this.sendMouseMove(a.offsetX,a.offsetY,a.movementX,a.movementY);a.preventDefault();if(0==this.mouseDownButton||2==this.mouseDownButton)this.setCursor(),this.mouseDownButton=void 0;this.callActionEventHander(2,a)};this.video.onmousedown=a=>{this.keyEventTarget==this.video&&this.video.focus();this.sendMouseEnter();this.isMiddleDoubleClick(a)&&this.onMButtonDoubleClick? (this.onMButtonDoubleClick(a.offsetX,a.offsetY),a.preventDefault()):(this.mouseDownButton=a.button,this.sendMouseDown(a.button,a.offsetX,a.offsetY),a.preventDefault(),0!=a.button&&2!=a.button&&this.setCursor(),this.callActionEventHander(3,a))};this.video.onmouseup=a=>{this.mouseDownButton=void 0;this.sendMouseUp(a.button,a.offsetX,a.offsetY);a.preventDefault();this.setCursor();this.callActionEventHander(4,a)};this.video.oncontextmenu=a=>{a.preventDefault()};"onmousewheel"in this.video?this.video.addEventListener("mousewheel", a=>{this.sendMouseWheel(a.wheelDelta,a.offsetX,a.offsetY);a.preventDefault()},{passive:!1}):this.video.addEventListener("DOMMouseScroll",a=>{this.sendMouseWheel(-120*a.detail,a.offsetX,a.offsetY);a.preventDefault()},!1)}registerTouchEvents(){this.initFingers=()=>{this.fingers=[9,8,7,6,5,4,3,2,1,0];this.fingerIds={};this.fingersToEnd=new Set};this.rememberTouch=a=>{let b=this.fingers.pop();void 0===b&&console.log("exhausted touch indentifiers");this.fingerIds[a.identifier]=b};this.forgetTouch=a=>{this.fingers.push(this.fingerIds[a.identifier]); delete this.fingerIds[a.identifier]};this.initFingers();["touchstart","touchmove","touchend","touchcancel"].forEach(a=>{this.video.addEventListener(a,b=>{b.preventDefault();let c=b.touches,e=b.changedTouches;switch(a){case "touchstart":if(0this.videoAspectRatio){let c=this.playerAspectRatio/this.videoAspectRatio;a/=this.container.clientWidth;b=c*(b/this.container.clientHeight-.5)+.5}else a=this.videoAspectRatio/this.playerAspectRatio*(a/this.container.clientWidth-.5)+.5,b/=this.container.clientHeight;return 0>a||1b||1this.videoAspectRatio){let c= this.playerAspectRatio/this.videoAspectRatio;a/=.5*this.container.clientWidth;b=c*b/(.5*this.container.clientHeight);return{x:32767*a,y:32767*b}}return{x:this.videoAspectRatio/this.playerAspectRatio*a/(.5*this.container.clientWidth)*32767,y:b/(.5*this.container.clientHeight)*32767}}sendTouch(a,b,c){this.callOnUserInteraction();let e=new DataView(new ArrayBuffer(2+10*c.length));e.setUint8(0,b);e.setUint8(1,c.length);b=2;let d=[],g=this.video.getBoundingClientRect();for(let q of c){let k=q.clientX- g.left,f=q.clientY-g.top,l=this.normalizeAndQuantizeUnsigned(k,f),t=this.fingerIds[q.identifier];if(void 0==t){let x;null==(x=this.onEvents)||x.call(this,`\t[${a}] fingersToEnd:${this.fingersToEnd.size},fingerIds:${JSON.stringify(this.fingerIds)},touchCount:${c.length} Invalid touchId!!!!!!!!!!!!`)}else e.setUint16(b,l.x,!0),b+=2,e.setUint16(b,l.y,!0),b+=2,e.setInt32(b,t,!0),b+=4,e.setUint8(b,255*q.force,!0),b+=1,e.setUint8(b,l.inRange?1:0,!0),b+=1,d.push(`{${t} (${parseInt(k)},${parseInt(f)})->(${parseInt(l.x)},${parseInt(l.y)})}`)}this.rtc.send(e.buffer); let h;null==(h=this.onEvents)||h.call(this,`\t[${a}] ${d.join(",")}`)}sendKeydown(a){this.callOnUserInteraction();let b=za(a),c;null==(c=this.onEvents)||c.call(this,`Send KeyDown, Code:${b}, Repeat:${a.repeat}`);this.rtc.send((new Uint8Array([60,b,a.repeat])).buffer)}sendKeyup(a){this.callOnUserInteraction();a=za(a);let b;null==(b=this.onEvents)||b.call(this,`Send KeyUp:${a}`);this.rtc.send((new Uint8Array([61,a])).buffer)}sendKeypress(a){this.callOnUserInteraction();var b;null==(b=this.onEvents)|| b.call(this,`Send KeyPress:${a.charCode}`);b=new DataView(new ArrayBuffer(3));b.setUint8(0,62);b.setUint16(1,a.charCode,!0);this.rtc.send(b.buffer)}sendMouseEnter(){this.callOnUserInteraction();var a;null==(a=this.onEvents)||a.call(this,"Send MouseEnter");a=new DataView(new ArrayBuffer(1));a.setUint8(0,70);this.rtc.send(a.buffer)}sendMouseLeave(){this.callOnUserInteraction();var a;null==(a=this.onEvents)||a.call(this,"Send MouseLeave");a=new DataView(new ArrayBuffer(1));a.setUint8(0,71);this.rtc.send(a.buffer)}sendMouseMove(a, b,c,e){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var d;null==(d=this.onEvents)||d.call(this,`Send MouseMove, X:${a}, Y:${b}, DeltaX:${c}, DeltaY:${e}`);a=this.normalizeAndQuantizeUnsigned(a,b);c=this.normalizeAndQuantizeSigned(c,e);e=new DataView(new ArrayBuffer(9));e.setUint8(0,74);e.setUint16(1,a.x,!0);e.setUint16(3,a.y,!0);e.setInt16(5,c.x,!0);e.setInt16(7,c.y,!0);this.rtc.send(e.buffer)}}sendMouseDown(a,b,c){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var e; null==(e=this.onEvents)||e.call(this,`Send MouseDown, Button:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(6));c.setUint8(0,72);c.setUint8(1,a);c.setUint16(2,b.x,!0);c.setUint16(4,b.y,!0);this.rtc.send(c.buffer)}}sendMouseUp(a,b,c){if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this,`Send MouseUp, Button:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(6));c.setUint8(0,73);c.setUint8(1, a);c.setUint16(2,b.x,!0);c.setUint16(4,b.y,!0);this.rtc.send(c.buffer)}}sendMouseWheel(a,b,c){this.callOnUserInteraction();if(this.normalizeAndQuantizeUnsigned){var e;null==(e=this.onEvents)||e.call(this,`Send MouseWheel, Delta:${a}, X:${b}, Y:${c}`);b=this.normalizeAndQuantizeUnsigned(b,c);c=new DataView(new ArrayBuffer(7));c.setUint8(0,75);c.setInt16(1,a,!0);c.setUint16(3,b.x,!0);c.setUint16(5,b.y,!0);this.rtc.send(c.buffer)}}}class gc extends ja{constructor(a,b,c){super(a);this.updateConnectionCount(b); this.createButton(c)}createButton(a){if(!this.elButton){this.elButton=document.createElement("button");this.elButton.id=`liveStatusSwitchButton_${this.uniqueId}`;this.elButton.innerHTML=da.Information;this.elButton.title=a;this.elButton.className="__liveStatusSwitchButton";if(R.isIOSDevice||R.isSafari)this.elButton.style.backgroundSize="cover";this.elButton.oncontextmenu=new Function("return false");this.elButton.onselectstart=new Function("return false");this.elButton.onclick=()=>this.setPanelVisible(); this.elButton.onmousedown=b=>{1==b.button&&b.preventDefault()};this.appendElement(this.elButton)}}createPanel(){if(!this.elPanel){var a=''+``+ ``+``+``+``+ ``+``+``+ ``+``+``+ ``+``+"
${H.getString("ConnInfo")}1-1${H.getString("Close")}
${H.getString("Duration")}00:00:00
${H.getString("Resolution")}1920 x 1080
${H.getString("Received")}0 kB
${H.getString("ReceivedFrames")}0
${H.getString("Dropped")}0 / 0
${H.getString("DecodingTime")}
${H.getString("DecodeFrames")}0 / 0
${H.getString("Bitrate")}-
${H.getString("FPS")}- / -
${H.getString("QP")}0
${H.getString("MaxQP")}
${H.getString("MaxBitrate")}
";this.elPanel=document.createElement("div");this.elPanel.innerHTML=a;this.elPanel.id=`liveStatusPanel_${this.uniqueId}`; this.elPanel.className="__liveStatusPanel __fadeinComp";this.elPanel.oncontextmenu=new Function("return false");this.elPanel.onselectstart=new Function("return false");this.appendElement(this.elPanel);this.get("i_hide_panel").onclick=()=>this.setPanelVisible();for(a=29;40>=a;a++)this.get("i_settings_maxQP").add(new Option(a,a));this.get("i_settings_maxQP").onchange=()=>{let b={encodeMaxQP:this.getValue("i_settings_maxQP")};this.player.rtc.updateParams(b);this.player.signallingConnection.updateParams(b); this.get("i_settings_maxQP").blur()};for(a=10;100>=a;a+=5)this.get("i_settings_maxBitrate").add(new Option(a,a));this.get("i_settings_maxBitrate").onchange=()=>{let b={maxBitrate:this.getValue("i_settings_maxBitrate")};this.player.rtc.updateParams(b);this.player.signallingConnection.updateParams(b);this.get("i_settings_maxBitrate").blur()}}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.elButton&&(this.elButton.style.top=`${a.height-32}px`);if(this.elPanel)if(this.customPosX&&this.customPosY)this.elPanel.style.left= this.customPosX+"px",this.elPanel.style.top=this.customPosY+"px";else{let b=this.elPanel.getBoundingClientRect();this.elPanel.style.left="5px";this.elPanel.style.top=`${a.height-b.height-42}px`}}destroy(){this.updateLatencyTestUI=!1;this.visible&&this.setPanelVisible();this.elPanel&&(this.removeElement(this.elPanel),this.elPanel=null);this.elButton&&(this.removeElement(this.elButton),this.elButton=null)}setPanelVisible(a,b){this.customPosX=a;this.customPosY=b;if(this.elPanel)if("none"==this.elPanel.style.display)this.updateConnectionCount(), this.elPanel.style.display="block",this.elPanel.className="__liveStatusPanel __fadeinComp",this.visible=!0,this.player.rtc.sendEnableIntervalSendQP(!0);else{this.elPanel.className="__liveStatusPanel __fadeoutComp";setTimeout(()=>{this.visible=!1;this.elPanel&&(this.elPanel.style.display="none");this.player.rtc.sendEnableIntervalSendQP(!1);this.setNeedReposUI();this.resize()},500);return}else this.createPanel(),this.visible=!0,this.resize(),this.updateConnectionCount(),this.player.rtc.requestInitialSettings(), this.player.rtc.sendEnableIntervalSendQP(!0);this.setNeedReposUI();this.resize()}adjustMaxQP(a){return 18==a?(this.get("i_settings_maxQP")&&this.get("i_settings_maxQP").add(new Option(18,18)),18):0>a?40:0<=a&&29>a?29:40a?10:100e);d++)e/=1E3,c=b[d];this.setText("i_bytesReceived",this.formatNumber(e)+" "+c);this.setText("i_framesReceived",this.processValue(a.framesReceived)); this.setText("i_framesDecoded",a.framesDecoded);this.setText("i_keyframesDecoded",this.processValue(a.keyFramesDecoded));this.updateVideoFramerate(this.formatNumber(a.framesPerSecond));this.updateBitrate(a.bitrate);this.setText("i_packetsLost",this.processValue(a.packetsLost));this.setText("i_frameDropped",this.processValue(a.framesDropped));this.setText("i_compositeTime",this.formatNumber(a.receiveToCompositeMs,1))}}updateVideoFramerate(a){let b=this.get("i_framerateVideo");b.style.color=10>a?"red": 20>a?"orange":"rgb(128,255,0)";b.innerText=a}updateBitrate(a){let b=this.get("i_bitrate");a?1E3a?"red":1E3>a?"orange":"rgb(128,255,0)",b.innerText=this.formatNumber(a)+" kbps"):b.innerText="-"}updateInitialSettings(a){let b=this.adjustMaxQP(a.Encoder.MaxQP);this.setValue("i_settings_maxQP",b);a=this.adjustMaxBitrate(a.WebRTC.MaxBitrate/1E3/1E3);this.setValue("i_settings_maxBitrate",a)}updateQPAndRenderFPS(a, b){let c=this.get("i_qp");c.style.color=35this.setVisible(!1),500)}setDelayClear(a){this.bDelayClear=a}log(a){if(this.el){if(this.bDelayClear)this.bDelayClear=!1,this.el.innerText= a+"\n";else{let b=this.el.innerText;b+=a+"\n";this.el.innerText=b}this.el.scrollTop=this.el.scrollHeight+100}}setPosition(a){a||(a=this.container.getBoundingClientRect());this.el&&(this.el.style.height=`${a.height-20}px`)}}class ic extends ja{constructor(a){super(a);this.create()}create(){this.el||(this.el=document.createElement("i"),this.el.id=`statusIndicator_${this.uniqueId}`,this.el.className="__statusIndicator",this.appendElement(this.el))}destroy(){this.el&&(this.removeElement(this.el),this.el= null)}setStatus(a){let b="Red",c=this.get("statusIndicator");switch(a){case V.WS_Disconnected:b="Red";c&&(c.style.display="inline-block");break;case V.WS_Connecting:b="RGB(200,200,200)";break;case V.WS_Connected:b="Yellow";break;case V.RTC_Opened:b="RGB(0,128,255)";break;case V.OnReady:b="RGB(0,255,0)",this.hide()}this.lastStatus=a;c&&(c.style.backgroundColor=b)}hide(){let a=this.get("statusIndicator");a&&(a.style.display="none")}}class jc{constructor(){this.css("@keyframes __fadeoutframes {0%{opacity:1;} 100%{opacity:0;}}.__fadeoutComp {animation-duration:600ms; animation-name:__fadeoutframes;}@keyframes __fadeinframes {0%{opacity:0;} 100%{opacity:0.65;}}.__fadeinComp {animation-duration:100ms; animation-name:__fadeinframes;}@keyframes twinkling{0%{opacity:0;}100%{opacity:1;}}.__statusIndicator {position:absolute;display:block;left:5px;top:5px;width:6px;height:6px;border-radius:50%;background-color:red;animation:twinkling 0.25s infinite ease-in-out;}.__startupInfoPanel { position:absolute;left:3px;top:0px;width:400px;background-color:transparent !important;text-shadow:black 0.1em 0.1em 0.2em;color:white;font-family:Verdana;font-size:12px !important;overflow:auto;}.__liveStatusPanel {position:absolute;left:5px;top:10px;width:164px;height:300px;background-color:rgba(50,50,50,0.8);color:#00FF00;font-family:Verdana;font-size:10px;box-shadow:0px 0px 5px 5px rgba(200,200,200,0.5);-moz-border-radius:8px;-webkit-border-radius:8px;}.__liveStatusPanel a:link { color: rgb(0,255,128); text-decoration: none; }.__liveStatusPanel a:hover { color: yellow; background:transparent; }.__liveStatusPanel input {background:transparent; border:1px solid gray; color: #00FF00;}.__liveStatusPanel select {background:transparent; border:1px solid gray; color: #00FF00;}.__liveStatusPanel option {background:#333; color: #00FF00;}.__liveStatusSwitchButton{position:absolute;padding:0;left:6px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__fullscreeButton {position:absolute;padding:0;left:38px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__viewHomeButton {position:absolute;padding:0;left:70px;width:26px;height:26px;opacity:0.65;cursor:pointer;background-size:conver;}.__taskWaiting {position:absolute;z-index:30;text-align:center;padding-left:5px;text-shadow:black 0.1em 0.1em 0.2em;color:lime;font-family:Verdana;font-size:12px !important;overflow:hidden;display:none;}.__eventsPanel {position:absolute;left:3px;top:0px;width:600px;height:200px;background-color:rgba(64,64,64,0.5) !important;text-shadow:black 0.1em 0.1em 0.2em;color:white;font-family:Verdana;font-size:12px !important;overflow:auto;}.streamingVideoNoCursor {width:100%;height:100%;}.streamingVideoCursorMove {width:100%;height:100%;cursor:move;}.streamingVideoCursorPan {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA8ADwCoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////8AAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH///gA///wAP//8AB///gAf//8AH//+AB///gA///8k///////////////////////////////////////////////////////////////////////w==),auto;}.streamingVideoCursorPointer {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA0ACACoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH///gA///wAP//8AB//+AAf//AAD//wAA//+AAP//4AD//+AF///gT///4f///+H////h////8////////////////////////////////////////w==),auto;}.streamingVideoCursorRotate {width:100%;height:100%;cursor:url(data:application/octet-stream;base64,AAACAAEAICAAAA8ADwCoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAD///////////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAD///////////////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////////8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////////////////////////////8AAAD///8AAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////8AAAD///////8AAAD///////8AAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////////////////////////////////4B///+Af///AH//hgAh/wwAMP4cABh+HgAYfh8AGH4eABh+HgA4eAck4BwP//A+H//4fz///P/////////////////////////////////////////////////////w==),auto;}")}css(a){let b= document.createElement("style");try{b.appendChild(document.createTextNode(a))}catch(c){b.styleSheet.cssText=a}(a=document.getElementsByTagName("head")[0])?a.appendChild(b):console.error("[Cloud] No head element found, cannot create css.")}}class kc extends ja{constructor(a){super(a);this.elContainer=document.createElement("div");this.elContainer.id=`taskWaiting_${this.uniqueId}`;this.elContainer.className="__taskWaiting";this.elContainer.oncontextmenu=new Function("return false");this.elContainer.onselectstart= new Function("return false");this.appendElement(this.elContainer);this.elText=document.createElement("div");this.elText.style.marginBottom="15px";this.elText.innerText="dddd";this.elContainer.appendChild(this.elText);this.elButton=document.createElement("input");this.elButton.type="button";this.elButton.value=H.getString("RestartInstNow");this.elButton.onclick=()=>{this.player.setInstanceOptions({iid:this.player.options.iid,reset:!0})};this.elContainer.appendChild(this.elButton);H.onLanguageChangedCallbacks.push(()=> {this.elButton.value=H.getString("RestartInstNow")});this.setMode(0)}setMode(a){this._mode=a;0===a?this.elContainer.style.background="transparent":(this.elContainer.style.background="rgba(64,64,64,0.5)",this.elContainer.style.height="26px",this.elContainer.style.lineHeight="26px")}destroy(){this.elContainer&&(this.removeElement(this.elContainer),this.elContainer=null)}updateText(a){this.elText&&(this.elText.innerText=a,this.show())}show(){this.elContainer.className="__taskWaiting";this.elContainer.style.display= "block"}hide(){this.elContainer.className="__taskWaiting __fadeoutComp";setTimeout(()=>this.elContainer.style.display="none",500)}setPosition(a,b,c,e){if(this.elContainer)if(a||(a=this.container.getBoundingClientRect()),0==this._mode){var d=a.width/2-150;0>d&&(d=10);this.elContainer.style.left=d+"px";this.elContainer.style.top=a.height/2+"px"}else d=0,b&&d++,c&&d++,e&&d++,a=a.height-32,this.elContainer.style.left=(0==d?5:1==d?38:2==d?70:102)+"px",this.elContainer.style.top=a+"px"}}class lc extends ja{constructor(a){super(a); this.create()}create(){if(!this.el){var a=[];a.push(H.getString("LeftClickTip"));a.push(H.getString("RightClickTip"));a.push(H.getString("MiddleClickTip"));a=a.join("\n");this.el=document.createElement("button");this.el.id=`viewHomeButton_${this.uniqueId}`;this.el.className="__viewHomeButton";if(R.isIOSDevice||R.isSafari)this.el.style.backgroundSize="cover";this.el.innerHTML=da.InitialCamera;this.el.title=a;this.el.oncontextmenu=new Function("return false");this.el.onselectstart=new Function("return false"); this.el.onclick=b=>this.player.viewHome(0);this.el.onmousedown=b=>{0!=b.button&&this.player.viewHome(b.button);b.preventDefault()};this.appendElement(this.el)}}destroy(){this.el&&(this.removeElement(this.el),this.el=null)}setPosition(a,b,c){a||(a=this.container.getBoundingClientRect());if(this.el){let e=5;if(b&&c)e=70;else if(b||c)e=38;this.el.style.left=e+"px";this.el.style.top=`${a.height-32}px`}}}var xa=0;class mc{constructor(a,b){if(a){this.host=a;this.options=b;ma.processParams(this.options); this.receiveRenderEvents=this.options.receiveRenderEvents;H.setLanguage();this.uniqueId=++xa;this.options.apiOptions.player=this;this.api=new ta(null,this.options.apiOptions);if(this.options.domId)if(a=ya(this.options.domId))this.container=document.createElement("div"),this.container.style="position:relative;width:100%;height:100%;",a.innerHTML="",a.appendChild(this.container);else if("loading"==document.readyState){console.error(H.getString("DomLoading"));return}if(this.hasVideo=!!this.container)this.styleManager= new jc,this.createWidgetsInConstructor(),this.canAdaptiveResolution=!1,this.lastResizeTime=Date.now(),this.orientationChangeTimeout=void 0;this.constructUrlAndConnect();this.resetInteractTimestamp()}else console.error("[DigitalTwinPlayer] The parameter `host` cannot be empty!")}constructUrlAndConnect(){this.logStartupInfo(`host: ${this.host}`);this.useHttps="https:"==location.protocol||this.options.useHttps;this.url=`${this.useHttps?"wss":"ws"}://${this.host}/player?hasVideo=${this.hasVideo}`;this.options.offer&& (this.url+="&offer=1");this.options.iid&&(this.url+="&iid="+this.options.iid);this.options.pid&&(this.url+="&pid="+this.options.pid);if("object"==typeof this.options.urlExtraInfo)for(let a in this.options.urlExtraInfo){let b=this.options.urlExtraInfo[a];null!=b&&void 0!=b&&(this.url+="&"+a+"="+b)}this.options.reset&&(this.url+="&reset=1",this.options.reset=!1);setTimeout(()=>this.connectSignallingServer(),200)}callEvent(a,b,c){a=this.options.events[a];"function"==typeof a&&a(b,c)}getHost(){return this.host}getAPI(){return this.api}getInstanceInfo(){return this.paramInfo}getVideoElement(){let a; return null==(a=this.htmlVideo)?void 0:a.video}getVideoElementSize(){let a=this.getVideoElement();return{width:null==a?void 0:a.clientWidth,height:null==a?void 0:a.clientHeight}}getVideoStreamSize(){return{width:this.htmlVideo.videoWidth(),height:this.htmlVideo.videoHeight()}}getVideoSize(){return this.getVideoStreamSize()}screen2World(a,b,c){let e=this.getVideoElementSize(),d=this.getVideoStreamSize(),g=0,h=0,q=d.height/d.width;e.height/e.width>q?h=-(e.width*q-e.height)/2:g=-(e.height/q-e.width)/ 2;a=d.width/(e.width-2*g)*(a-g);b=d.height/(e.height-2*h)*(b-h);return this.getAPI().coord.screen2World(a,b,c)}world2Screen(a,b,c,e){const d=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){let g=yield d.getAPI().coord.world2Screen(a,b,c,e),h=d.getVideoElementSize(),q=d.getVideoStreamSize(),k=0,f=0,l=q.height/q.width;h.height/h.width>l?f=-(h.width*l-h.height)/2:k=-(h.height/l-h.width)/2;g.screenPosition=[g.screenPosition[0]/(q.width/(h.width-2*k))+k,g.screenPosition[1]/(q.height/ (h.height-2*f))+f];return g})}setResolution(a,b){if(this.streamerAdaptive&&(0!=a||0!=b)){window.devicePixelRatio&&(a*=window.devicePixelRatio,b*=window.devicePixelRatio);if(4096this.streamerResX||b>this.streamerResY)&&(b=a/b,b>=this.streamerResX/this.streamerResY?(a=this.streamerResX,b=this.streamerResX/b):(a=this.streamerResY*b,b=this.streamerResY));a=Math.floor(a);b=Math.floor(b); 256>a&&(console.warn("ResX:"+a),a=256);256>b&&(console.warn("ResY:"+b),b=256);var c=this.htmlVideo.videoWidth(),e=this.htmlVideo.videoHeight();if(a!=c&&a+1!=c&&a-1!=c||b!=e&&b+1!=e&&b-1!=e){if(this.lastWidth&&this.lastHeight&&(c=Math.abs(this.lastWidth-a),e=Math.abs(this.lastHeight-b),(0!=c||0!=e)&&4>c&&4>e))return;this.lastWidth=a;this.lastHeight=b;this.rtc&&this.rtc.updateRenderResolution(a,b);return[a,b]}}}destroy(a){console.log(`call DigitalTwinPlayer.destroy: ${a||" "}`);if(!this.isDestroyed){xa--; this.isDestroyed=!0;this.destroyReason=a;var b;null==(b=this.rtc)||b.close();var c;null==(c=this.signallingConnection)||c.close()}}setKeyEventTarget(a){let b;null==(b=this.htmlVideo)||b.setKeyEventTarget(a)}setKeyEventReceiver(a){this.setKeyEventTarget(a)}resize(){if(this.container){this.rect=this.container.getBoundingClientRect();if(this.bNeedReposUI||!this.oldRect||this.oldRect.width!=this.rect.width||this.oldRect.height!=this.rect.height){this.bNeedReposUI=!1;this.oldRect=this.rect;let b;null== (b=this.startupInfo)||b.setPosition(this.rect);let c;null==(c=this.liveStatus)||c.setPosition(this.rect);let e;null==(e=this.fullscreenButton)||e.setPosition(this.rect,this.options.ui.statusButton);let d;null==(d=this.homeButton)||d.setPosition(this.rect,this.options.ui.statusButton,this.options.ui.fullscreenButton);let g;null==(g=this.taskListBar)||g.setPosition(this.rect,this.options.ui.statusButton,this.options.ui.fullscreenButton,this.options.ui.homeButton)}if(this.htmlVideo.valid()){this.canAdaptiveResolution&& this.setResolution(this.htmlVideo.clientWidth(),this.htmlVideo.clientHeight());var a;null==(a=this.htmlVideo)||a.resize(this.streamerAdaptive&&this.canAdaptiveResolution)}}}setInstanceOptions(a){const b=this;return $jscomp.asyncExecutePromiseGeneratorFunction(function*(){var c=a.pid==b.options.pid&&a.iid==b.options.iid||!a.pid&&a.iid==b.options.iid||!a.iid&&a.pid==b.options.pid;if(c&&!a.reset)b.api.log("setInstanceOptions: no change.");else{if(!c){c=(!a.iid||a.iid==b.options.iid)&&a.pid!=b.options.pid; if(b.streamerLocked&&c){b.api.log(H.getString("CannotChangeProject"));return}c=yield b.signallingConnection.checkParams(a);if(null!==c){if(!1===c.iid){b.api.log(`iid(${a.iid})${H.getString("InstanceNotExist")}`);return}if(!1===c.pid){b.api.log(`pid(${a.pid})${H.getString("ProjectNotExist")}`);return}}}b.destroy();b.options.iid=a.iid;b.options.pid=a.pid;b.options.reset=a.reset;b.constructUrlAndConnect()}})}set fullscreen(a){a?R.fullscreen(this.container):R.exitFullscreen()}get fullscreen(){return!!document.fullscreenElement}setActionEventEnabled(a){let b; null==(b=this.htmlVideo)||b.setActionEventEnabled(a)}perfTest(a){let b;null==(b=this.rtc)||b.perfTest(a)}onApiReady(){this.setStatus(V.OnReady);let a;null==(a=this.signallingConnection)||a.sendReady();1==this.options.ui.mainUI?this.api.settings.setMainUIVisibility(!0):0==this.options.ui.mainUI&&this.api.settings.setMainUIVisibility(!1);1==this.options.ui.campass?this.api.settings.setCampassVisible(!0):0==this.options.ui.campass&&this.api.settings.setCampassVisible(!1)}sendApi(a,b){if(a)if(b){let c; null==(c=this.signallingConnection)||c.sendApi(a)}else{let c;null==(c=this.rtc)||c.sendApi(a)}}onMainThreadBusy(a){if(1===a.busy){let b="BUSY! ",c=this.api.apiQueue.queueSize(),e=this.api.apiQueue.dataSize();0{if(Date.now()-this.timeOfLastInteraction>6E4*this.kickOutInMinutes){let h=H.getString("DisconnectForIdle");this.destroy(h);console.warn(h);clearInterval(g)}},2E4)}this.nodeInfoArray=[`${H.getString("NodeInfo")}`];e&&this.nodeInfoArray.push(`\t${H.getString("Host")}`+e);c&&this.nodeInfoArray.push(`\t${H.getString("HostAddress")}`+c);b&&this.nodeInfoArray.push(`\t\u3000${H.getString("Project")}`+b);this.options.pid&& this.nodeInfoArray.push(`\t${H.getString("ProjectId")}`+this.options.pid);this.nodeInfoArray.push(`\t${H.getString("IID")}`+this.options.iid);this.nodeInfoArray.push(`\t${H.getString("Adaptive")}`+this.streamerAdaptive);this.nodeInfoArray.push(`\t${H.getString("LimitMaxRes")}`+this.streamerLimitMaxResolution);this.nodeInfoArray.push(`\t${H.getString("Resolution")}${this.streamerResX}x${this.streamerResY}`);let d;null==(d=this.liveStatus)||d.updateButtonTip(this.nodeInfoArray.join("\n"));this.api.log(this.nodeInfoArray.join("\n\t"))}logStartupInfo(a){if(a){a= `[${ua()}] ${a}`;var b;null==(b=this.startupInfo)||b.log(a);1 {let b;return null==(b=this.eventsPanel)?void 0:b.appendText(a)},onVideoLoaded:()=>{this.logStartupInfo("video: loadedmetadata");this.createWidgets();this.callEvent("onVideoLoaded");this.resize()},onMButtonDoubleClick:(a,b)=>{let c;null==(c=this.liveStatus)||c.setPanelVisible(a,b)}});this.options.ui.statusIndicator&&(this.statusIndicator=new ic(this));this.options.ui.startupInfo&&(this.startupInfo=new hc(this),this.logStartupInfo("sdk version: "+this.api.getVersion()),this.logStartupInfo("uniqueId: "+ this.uniqueId));this.resizeObserver=new ResizeObserver(Ja(()=>this.resize(),1E3));this.resizeObserver.observe(this.container)}createWidgets(){this.options.ui.statusButton&&(this.liveStatus=new gc(this,this.playerCount,this.nodeInfoArray.join("\n")));this.options.ui.fullscreenButton&&(this.fullscreenButton=new ec(this));this.options.ui.homeButton&&(this.homeButton=new lc(this));this.taskListBar&&this.taskListBar.setMode(1)}destroyWidgets(){this.liveStatus&&(this.liveStatus.destroy(),this.liveStatus= null);this.fullscreenButton&&(this.fullscreenButton.destroy(),this.fullscreenButton=null);this.homeButton&&(this.homeButton.destroy(),this.homeButton=null);this.eventsPanel&&(this.eventsPanel.destroy(),this.eventsPanel=null);this.taskListBar&&(this.taskListBar.destroy(),this.taskListBar=null)}isQualityController(){return this.bQualityController}initWebRtcPlayer(a){H.setLanguage(a.language);this.rtc=new cc({useStats:this.hasVideo&&(this.options.ui.statusButton||this.options.events.onRtcStatsReport), peerConnectionOptions:a.peerConnectionOptions,events:{onlog:b=>this.logStartupInfo(b),ontrack:b=>{let c;null==(c=this.htmlVideo)||c.setTrack(b)},onicecandidate:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.sendCandidate(b)},onOfferCreated:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.sendOffer(b.sdp,this.hasVideo)},onAnswerCreated:b=>{let c;return null==(c=this.signallingConnection)?void 0:c.send(b)},onstats:b=>{let c;null==(c=this.liveStatus)||c.updateWebRtcStats(b); this.callEvent("onRtcStatsReport",b)},ondatachannelopen:()=>{this.setStatus(V.RTC_Opened);this.signallingConnection.sendCustomString(this.options.customString);this.hasVideo&&(this.rtc.requestQualityControl(),this.liveStatus&&this.rtc.requestInitialSettings());this.receiveRenderEvents||this.rtc.sendEnableReceiveEvents(!1);this.api.onConnectionOpen()},ondatachannelclose:b=>this.api.onConnectionClose(b),ondatachannelerror:b=>this.api.onConnectionClose(b.error),ondatachannelmessage:(b,c)=>{switch(b){case "ResponseAPI":this.api.onConnectionMessage(c); break;case "InitialSettings":let e;null==(e=this.liveStatus)||e.updateInitialSettings(c);break;case "VideoEncoderAvgQP":let d;if(null==(d=this.liveStatus)?0:d.visible)b=(new TextDecoder("utf-16")).decode(c.data.slice(1)),(b=JSON.parse(b))&&this.liveStatus.updateQPAndRenderFPS(b.qp,b.renderFPS);break;case "QualityControlOwnership":this.bQualityController=c;let g;null==(g=this.liveStatus)||g.updatePlayerId()}}},enableApiCallLog:this.options.enableApiCallLog},this);this.hasVideo&&this.htmlVideo.setWebRtcPlayer(this.rtc); this.logStartupInfo("setting up...");this.options.offer&&this.rtc.createOffer();this.hasVideo&&this.options.registerEvents&&(this.htmlVideo.registerKeyboardEvents(),this.htmlVideo.registerMouseEvents(),this.htmlVideo.registerTouchEvents())}connectSignallingServer(){this.setStatus(V.WS_Connecting);this.signallingConnection=new $b({onopen:()=>{this.setStatus(V.WS_Connected);this.options.password&&this.signallingConnection.sendInstancePassword(this.options.password)},onclose:a=>this.handleSignallingClose(a), onerror:()=>{this.setStatus(V.WS_Disconnected)},onmessage:a=>{switch(a.type){case "config":setTimeout(()=>this.initWebRtcPlayer(a),200);break;case "answer":this.playerId=a.playerId;this.rtc&&this.rtc.onReceiveAnswer(a);break;case "offer":this.playerId=a.playerId;this.rtc&&this.rtc.onReceiveOffer(a);break;case "iceCandidate":this.rtc&&this.rtc.onIceCandidate(a.candidate);break;case "paramInfo":this.receiveParamInfo(a);break;case "status":this.handleSignallingMessage_Status(a);break;case "playerCount":this.handleSignallingMessage_PlayerCount(a); break;case "api":this.api.onConnectionMessage(JSON.stringify(a));break;case "userConfig":this.captchaRequired=a.captchaRequired}},customString:this.options.customString});this.signallingConnection.connect(this.url)}handleSignallingClose(a){this.destroyWidgets();this.callEvent("onConnClose",a);this.startupInfo&&this.startupInfo.setVisible(!0);this.api.onConnectionClose(a);this.rtc&&this.rtc.close();let b="";this.isDestroyed?(b=H.getString("Destroyed"),b=this.destroyReason?b+(": "+this.destroyReason): b+"."):(b="closed: ",a.code&&(b+=a.code),a.reason?b+=" "+a.reason:1006==a.code&&(b+=" "+H.getString("Disconnect")));this.setStatus(V.WS_Disconnected,b);La(a.code)||this.destroy();this.isDestroyed||(this.logStartupInfo(H.getString("Reconnect5s")),this.startupInfo.setDelayClear(!0),setTimeout(()=>this.connectSignallingServer(),5E3));a.code==la.instance_is_busy?confirm(H.getString("RestartAndRetry"))&&this.setInstanceOptions({iid:this.busyIId,reset:!0}):a.code==la.no_username_provided?this.callEvent("onLoginRequired", this.captchaRequired):a.code==la.user_does_not_exist?this.callEvent("onLoginRequired",this.captchaRequired):a.code==la.not_logged_in&&this.callEvent("onLoginRequired",this.captchaRequired)}handleSignallingMessage_Status(a){let b=Ka(a.state);b&&this.logStartupInfo(b);a.state===ea.StartFailed?(console.error(a.info),this.options.ui.startupInfo&&setTimeout(()=>alert(a.info),500)):a.state==ea.ConfirmBusy&&(this.busyIId=a.info)}handleSignallingMessage_PlayerCount(a){this.playerCount=a.count;let b;null== (b=this.liveStatus)||b.updateConnectionCount(this.playerCount);this.canAdaptiveResolution=1===a.count}}v.APIErrorCode={OK:0,InvalidParameters:1,InternalError:2,ResourceNotFound:3,AcpProjWKTNotSet:4,CoordinateConversionFailed:5,IDExists:6,InvalidRequestType:7,InvalidRequestString:8,NoCommand:9,DataTypeNotSupport:10,InvalidOperation:11,ProjectNotOpened:12,CodeMax:65535};v.ActionMode={None:0,Follow:1,FollowBehindAndAbove:2,FollowBehind:3,FollowAbove:4,FollowBellow:5,FollowLeft:6,FollowRight:7};v.AnimatedImageButtonData= Ua;v.BPFuncParamType={Bool:0,UInt8:1,Int32:2,Float:3,Double:4,String:5,Color:6,Vector2D:7,Vector:8,Rotator:9,IntArray:10,StringArray:11,VectorArray:12,Coordinate:13,CoordinateArray:14,FloatArray:15};v.BPFunctionData=hb;v.BeamData=Va;v.CameraTourData=jb;v.CameraTourKeyFrame=ib;v.CloudStatus=V;v.Color={LightPink:"RGB(255,182,193)",Pink:"RGB(255,192,203)",Crimson:"RGB(220,20,60)",LavenderBlush:"RGB(255,240,245)",PaleVioletRed:"RGB(219,112,147)",HotPink:"RGB(255,105,180)",DeepPink:"RGB(255,20,147)",MediumVioletRed:"RGB(199,21,133)", Orchid:"RGB(218,112,214)",Thistle:"RGB(216,191,216)",plum:"RGB(221,160,221)",Violet:"RGB(238,130,238)",Magenta:"RGB(255,0,255)",Fuchsia:"RGB(255,0,255)",DarkMagenta:"RGB(139,0,139)",Purple:"RGB(128,0,128)",MediumOrchid:"RGB(186,85,211)",DarkVoilet:"RGB(148,0,211)",DarkOrchid:"RGB(153,50,204)",Indigo:"RGB(75,0,130)",BlueViolet:"RGB(138,43,226)",MediumPurple:"RGB(147,112,219)",MediumSlateBlue:"RGB(123,104,238)",SlateBlue:"RGB(106,90,205)",DarkSlateBlue:"RGB(72,61,139)",Lavender:"RGB(230,230,250)",GhostWhite:"RGB(248,248,255)", Blue:"RGB(0,0,255)",MediumBlue:"RGB(0,0,205)",MidnightBlue:"RGB(25,25,112)",DarkBlue:"RGB(0,0,139)",Navy:"RGB(0,0,128)",RoyalBlue:"RGB(65,105,225)",CornflowerBlue:"RGB(100,149,237)",LightSteelBlue:"RGB(176,196,222)",LightSlateGray:"RGB(119,136,153)",SlateGray:"RGB(112,128,144)",DoderBlue:"RGB(30,144,255)",AliceBlue:"RGB(240,248,255)",SteelBlue:"RGB(70,130,180)",LightSkyBlue:"RGB(135,206,250)",SkyBlue:"RGB(135,206,235)",DeepSkyBlue:"RGB(0,191,255)",LightBLue:"RGB(173,216,230)",PowDerBlue:"RGB(176,224,230)", CadetBlue:"RGB(95,158,160)",Azure:"RGB(240,255,255)",LightCyan:"RGB(225,255,255)",PaleTurquoise:"RGB(175,238,238)",Cyan:"RGB(0,255,255)",Aqua:"RGB(212,242,231)",DarkTurquoise:"RGB(0,206,209)",DarkSlateGray:"RGB(47,79,79)",DarkCyan:"RGB(0,139,139)",Teal:"RGB(0,128,128)",MediumTurquoise:"RGB(72,209,204)",LightSeaGreen:"RGB(32,178,170)",Turquoise:"RGB(64,224,208)",Auqamarin:"RGB(127,255,170)",MediumAquamarine:"RGB(0,250,154)",MediumSpringGreen:"RGB(0,255,127)",MintCream:"RGB(245,255,250)",SpringGreen:"RGB(60,179,113)", SeaGreen:"RGB(46,139,87)",Honeydew:"RGB(240,255,240)",LightGreen:"RGB(144,238,144)",PaleGreen:"RGB(152,251,152)",DarkSeaGreen:"RGB(143,188,143)",LimeGreen:"RGB(50,205,50)",Lime:"RGB(0,255,0)",ForestGreen:"RGB(34,139,34)",Green:"RGB(0,128,0)",DarkGreen:"RGB(0,100,0)",Chartreuse:"RGB(127,255,0)",LawnGreen:"RGB(124,252,0)",GreenYellow:"RGB(173,255,47)",OliveDrab:"RGB(85,107,47)",Beige:"RGB(245,245,220)",LightGoldenrodYellow:"RGB(250,250,210)",Ivory:"RGB(255,255,240)",LightYellow:"RGB(255,255,224)",Yellow:"RGB(255,255,0)", Olive:"RGB(128,128,0)",DarkKhaki:"RGB(189,183,107)",LemonChiffon:"RGB(255,250,205)",PaleGodenrod:"RGB(238,232,170)",Khaki:"RGB(240,230,140)",Gold:"RGB(255,215,0)",Cornislk:"RGB(255,248,220)",GoldEnrod:"RGB(218,165,32)",FloralWhite:"RGB(255,250,240)",OldLace:"RGB(253,245,230)",Wheat:"RGB(245,222,179)",Moccasin:"RGB(255,228,181)",Orange:"RGB(255,165,0)",PapayaWhip:"RGB(255,239,213)",BlanchedAlmond:"RGB(255,235,205)",NavajoWhite:"RGB(255,222,173)",AntiqueWhite:"RGB(250,235,215)",Tan:"RGB(210,180,140)", BrulyWood:"RGB(222,184,135)",Bisque:"RGB(255,228,196)",DarkOrange:"RGB(255,140,0)",Linen:"RGB(250,240,230)",Peru:"RGB(205,133,63)",PeachPuff:"RGB(255,218,185)",SandyBrown:"RGB(244,164,96)",Chocolate:"RGB(210,105,30)",SaddleBrown:"RGB(139,69,19)",SeaShell:"RGB(255,245,238)",Sienna:"RGB(160,82,45)",LightSalmon:"RGB(255,160,122)",Coral:"RGB(255,127,80)",OrangeRed:"RGB(255,69,0)",DarkSalmon:"RGB(233,150,122)",Tomato:"RGB(255,99,71)",MistyRose:"RGB(255,228,225)",Salmon:"RGB(250,128,114)",Snow:"RGB(255,250,250)", LightCoral:"RGB(240,128,128)",RosyBrown:"RGB(188,143,143)",IndianRed:"RGB(205,92,92)",Red:"RGB(255,0,0)",Brown:"RGB(165,42,42)",FireBrick:"RGB(178,34,34)",DarkRed:"RGB(139,0,0)",Maroon:"RGB(128,0,0)",White:"RGB(255,255,255)",WhiteSmoke:"RGB(245,245,245)",Gainsboro:"RGB(220,220,220)",LightGrey:"RGB(211,211,211)",Silver:"RGB(192,192,192)",DarkGray:"RGB(169,169,169)",Gray:"RGB(128,128,128)",DimGray:"RGB(105,105,105)",Black:"RGB(0,0,0)"};v.CommandType=p;v.CustomObjectData=db;v.CustomObjectData2=eb;v.CustomTagData= Ra;v.DecalData=bb;v.DigitalTwinAPI=ta;v.DigitalTwinPlayer=mc;v.DynamicWaterData=gb;v.FieldType={String:0,Number:1};v.HeatMapPointData=Oa;v.HeatMapStyle={Normal:-1,CustomColor:0,CustomWave:1};v.HighlightAreaData=Sa;v.ImageButtonData=Ta;v.LayerVisibleData=Na;v.MapMode={Campass:0,SmallMap:1,BigMap:2};v.MeasurementMode={Coordinate:1,Linear:2,Horizontal:3,Vertical:4,MultiPoint:5,TerrainArea:6};v.MousePickMask=sa;v.ODLineData=Za;v.PanelType={ViewshedAnalysis:0,SkylineAnalysis:1,ViewDomeAnalysis:2,VisiblityAnalysis:3, FloodFillAnalysis:4,SolarAnalysis:5,CutFillAnalysis:6,TerrainSlopeAnalysi:7,ContourLineAnalysis:8};v.PanoramaData=ab;v.Polygon3DData=Xa;v.Polygon3DStyle={Wave:0,LoopLine:1,Gradual:2,DynamicGradual:3,WaveTransparent:4,WideWave:5,RotateArrow:6,RotateLine:7,RotateGradual:8,SingleColor:9,SingleColorWithLight:10};v.PolygonData=$a;v.PolygonStyle={SingleColor:0,CirclePoint:1,Volumn:2,Gradual:3,DynamicGradual:4,WaveTransparent:5,WideWave:6,RotateArrow:7,RotateLine:8,RotateGradual:9,OnTerrain:10};v.PolylineData= Ya;v.PolylineStyle={Arrow:0,Arrow1:1,Flow:2,Beam:3,Normal:4,OnTerrain:5,DottedNormal:6,DottedCircle:7};v.REVISION=16504;v.RadiationPointData=Wa;v.RendererType={SimpleRenderer:0,UniqueValueRenderer:1,ClassBreaksRenderer:2};v.ResetType=Ba;v.TagData=Pa;v.TileLayerActorData=ha;v.TileLayerData=cb;v.VERSION="6.0";v.VehicleViewMode={FirstPerson:0,ThirdPerson:1};v.VideoProjectionData=fb;v.Viewport=ca;v.WaterFlowFieldStyle={HeatMap:0,Water:1,Particle:2};v.WebUIData=Qa;v.__onCefResponse=function(a,b){if(wa)wa.onConnectionMessage(a, b)};Object.defineProperty(v,"__esModule",{value:!0});return v}({});(()=>{if("undefined"!=typeof module&&module.exports)module.exports=acapi;else if("function"==typeof define&&define.amd)define(function(){return acapi});else{window.AcApiVersion=acapi.VERSION;acapi.AirCityAPI=acapi.DigitalTwinAPI;acapi.AirCityPlayer=acapi.DigitalTwinPlayer;for(let v in acapi)"VERSION"!=v&&(window[v]=acapi[v]);acapi.DigitalTwinAPI.__onApiConstructed=v=>{window.__g=v;window.fdapi=v}}})();