@nnepoch/dtc-sdk 3.0.7 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@epicgames-ps/lib-pixelstreamingcommon-ue5.6"),l=require("zod"),u=require("axios");u=s(u,1);let d=require("@epicgames-ps/lib-pixelstreamingfrontend-ue5.6"),f=require("pako");var p=class extends Error{constructor(e,t,n){super(`Invalid payload for ${e}.${t}: ${n.map(e=>`${e.field}: ${e.reason}`).join(`; `)}`),this.moduleName=e,this.methodName=t,this.issues=n,this.name=`SDKValidationError`,this.code=`VALIDATION_ERROR`}toJSON(){return{name:this.name,code:this.code,message:this.message,module:this.moduleName,method:this.methodName,issues:this.issues}}};function ee(e,t,n,r){let i=e.safeParse(t);if(i.success)return i.data;throw new p(n,r,i.error.issues.map(e=>({field:e.path.length>0?e.path.join(`.`):`<root>`,reason:e.message,code:e.code})))}function te(e){return e instanceof p?JSON.stringify(e.toJSON()):e instanceof Error?`${e.name}: ${e.message}`:String(e)}const ne={InitLogging(){},Debug(e){console.log(`[Debug] - ${e}`)},Info(e){console.log(`[Info] - ${e}`)},Warning(e){console.warn(`[Warning] - ${e}`)},Error(e){console.error(`[Error] - ${e}`)}},m={debug(){},info(){},warn(){},error(){}},re=[`silent`,`error`,`warn`,`info`,`debug`],h={silent:0,error:1,warn:2,info:3,debug:4};function g(e){switch(e){case`silent`:return c.LogLevel.Disabled;case`error`:return c.LogLevel.Error;case`warn`:return c.LogLevel.Warning;case`info`:return c.LogLevel.Info;default:return c.LogLevel.Debug}}function ie(e){c.Logger.InitLogging(g(e),!1)}function ae(e){return typeof e==`string`&&re.includes(e)}function oe(e){if(e===void 0)return`info`;if(ae(e))return e;let t=typeof e==`string`?e:JSON.stringify(e);throw Error(`Invalid logger level: ${t}. Expected one of: ${re.join(`, `)}.`)}function se(e){if(e===void 0)return``;try{let t=JSON.stringify(e);return t?` ${t}`:``}catch{return` ${String(e)}`}}function ce(){let e=Error().stack;return e?e.replace(/^Error(?::\s*)?\n?/,``):`No Stack Available for this browser`}var le=class{constructor(e,t,n,r,i,a){this.driver=e,this.prefix=t,this.level=n,this.moduleName=r,this.includeStack=i,this.reporter=a}formatMessage(e,t,n){let r=`${this.prefix} ${t}${se(n)}`.trim();return this.shouldIncludeStack(e)?`${r}\nStack: ${ce()}`:r}shouldLog(e){return h[this.level]>=h[e]}shouldIncludeStack(e){return h[this.includeStack]>=h[e]}debug(e,t){this.shouldLog(`debug`)&&this.driver.Debug(this.formatMessage(`debug`,e,t))}info(e,t){this.shouldLog(`info`)&&this.driver.Info(this.formatMessage(`info`,e,t))}warn(e,t){this.reportWarnOrError(`warn`,e,t),this.shouldLog(`warn`)&&this.driver.Warning(this.formatMessage(`warn`,e,t))}error(e,t){this.reportWarnOrError(`error`,e,t),this.shouldLog(`error`)&&this.driver.Error(this.formatMessage(`error`,e,t))}reportWarnOrError(e,t,n){this.reporter?.recordLogSignal({level:e,moduleName:this.moduleName,message:t,meta:n})}},ue=class{constructor(e,t=ne,n){this.level=oe(e),this.driver=t,this.includeStack=n?.includeStack??`warn`,this.driver.InitLogging(g(this.level),!1),this.reporter=n?.reporter??n?.qosMonitor}setReporter(e){this.reporter=e}child(e){return new le(this.driver,`[DTCEngine:${e}]`,this.level,e,this.includeStack,this.reporter)}};const _={EngineIniting:`云渲染引擎初始化中...`,ServiceUrlInValid:`调度中心地址不正确,请检查中心地址!`,SerriceError:`调度中心连接失败,尝试重连中...`,SerriceUnAvaible:`没有服务资源,请检查服务是否启动!`,SerriceLoadingForWaiting:`服务资源启动中,请稍候!`,EngineWaiting:`云渲染服务坐席已满,当前排队人数:1人....`,EngineTockenChecking:`云引擎授权文件验证中...`,EngineTokenCheckFail:`云引擎授权许可无效,请联系管理员!`,EngineConnectioning:`云渲染引擎连接中...`,EngineConnectionSuccess:`云渲染引擎连接成功...`,EngineClose:`云渲染引擎连接断开,请检查服务状态!`,SourcePreparing:`资源准备中...`,TokenInValid:`许可未激活!`,TokenExpired:`许可授权已过期,实时渲染服务已停止!`,TokenWillExpired:`您的授权许可将于 YYYY-MM-DD 到期,请尽快续期!`};var de=class{constructor(e){this.options=e,this.logger=e.logger??m}show(e,t,n=!0){if(console.log(`loading show`,e,t,n),this.options.emit({message:e,key:t,isFinish:!n}),!this.options.enabled)return;let r=this.getRoot();r&&(this.progressDiv||=this.createTipDiv(r,`engineProgressTips`),this.progressDiv.textContent=e,n||(this.clearAutoCloseTimer(),this.autoCloseTimer=setTimeout(()=>{this.removeProgressBar()},2e3)))}showTokenWillExpire(e,t=`TokenWillExpired`,n=!0){let r=this.formatTokenWillExpireMessage(e);if(this.options.emit({message:r,key:t,isFinish:!n}),!this.options.enabled)return;let i=this.getRoot();i&&(this.tokenWillExpireDiv||(this.tokenWillExpireDiv=this.createTipDiv(i,`TokenWillExpireTips`),this.tokenWillExpireDiv.style.top=`60px`),this.tokenWillExpireDiv.textContent=r)}dispose(){this.clearAutoCloseTimer(),this.removeProgressBar(),this.removeTokenWillExpireBar()}getRoot(){if(this.options.hostElement?.ownerDocument?.body)return this.options.hostElement.ownerDocument.body;if(typeof document<`u`&&document.body)return document.body;this.logger.debug(`skip loading progress ui render: document is unavailable`)}createTipDiv(e,t){let n=e.ownerDocument.createElement(`div`);return n.id=t,n.style.position=`fixed`,n.style.left=`50%`,n.style.top=`16px`,n.style.transform=`translateX(-50%)`,n.style.zIndex=`99999`,n.style.padding=`8px 14px`,n.style.borderRadius=`6px`,n.style.background=`rgba(0, 0, 0, 0.72)`,n.style.color=`#fff`,n.style.fontSize=`14px`,n.style.lineHeight=`1.4`,n.style.pointerEvents=`none`,n.style.maxWidth=`80vw`,n.style.textAlign=`center`,e.appendChild(n),n}removeProgressBar(){this.progressDiv&&=(this.progressDiv.remove(),void 0)}removeTokenWillExpireBar(){this.tokenWillExpireDiv&&=(this.tokenWillExpireDiv.remove(),void 0)}clearAutoCloseTimer(){this.autoCloseTimer&&=(clearTimeout(this.autoCloseTimer),void 0)}formatTokenWillExpireMessage(e){let t=e.trim();return t?t.includes(`到期`)?t:`您的授权许可将于 ${t}到期,请尽快续期!`:_.TokenWillExpired}};const fe=`sdk3-agent-bridge/v1`;function pe(e){if(typeof WebSocket>`u`)throw Error(`WebSocket is not available in current runtime.`);return new WebSocket(e)}function me(e){return{ok:!0,data:e,ts:Date.now()}}function he(e,t){return{ok:!1,error:{code:`PROTOCOL_ERROR`,message:e,details:t},ts:Date.now()}}function ge(e){if(typeof e==`string`)try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return;let n=t;return n.protocolVersion!==`sdk3-agent-bridge/v1`||typeof n.type!=`string`||typeof n.callId!=`string`?void 0:n}catch{return}}var _e=class{constructor(e,t,n={}){this.runtime=e,this.options=t,this.reconnectAttempt=0,this.running=!1,this.startedAt=0,this.beforeUnloadHandler=()=>{this.stop(`pagehide`)},this.socketFactory=n.socketFactory??pe}start(){this.socket||(this.running=!0,this.openSocket(),typeof window<`u`&&(window.addEventListener(`beforeunload`,this.beforeUnloadHandler),window.addEventListener(`pagehide`,this.beforeUnloadHandler)))}stop(e=`stop`){this.running=!1,this.clearReconnect(),typeof window<`u`&&(window.removeEventListener(`beforeunload`,this.beforeUnloadHandler),window.removeEventListener(`pagehide`,this.beforeUnloadHandler)),this.clearHeartbeat(),this.runtime.dispose?.();let t=this.socket;t&&(t.readyState===1&&this.sendUnregister(e),this.clearSocketHandlers(t),t.close(1e3,e),this.socket=void 0)}openSocket(){this.startedAt=Date.now();let e=this.socketFactory(this.options.serverUrl??`ws://127.0.0.1:8787/sdk3-bridge`);this.socket=e,e.onopen=()=>{this.reconnectAttempt=0,this.sendRegister(),this.startHeartbeat()},e.onmessage=e=>{this.handleMessage(e.data)},e.onclose=()=>{this.clearSocketHandlers(e),this.clearHeartbeat(),this.runtime.closeAllStreams?.(`Agent bridge WebSocket disconnected`),this.runtime.cancelAllPrograms?.(`Agent bridge WebSocket disconnected`),this.socket===e&&(this.socket=void 0),this.scheduleReconnect()},e.onerror=()=>{this.clearHeartbeat()}}scheduleReconnect(){if(!this.running||this.reconnectTimer!==void 0||this.options.reconnect===!1)return;let e=this.getReconnectDelay();this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=void 0,!(!this.running||this.socket)&&this.openSocket()},e),this.reconnectAttempt+=1}getReconnectDelay(){let e=typeof this.options.reconnect==`object`?this.options.reconnect:void 0,t=Math.max(0,e?.initialDelayMs??1e3),n=Math.max(t,e?.maxDelayMs??15e3),r=Math.max(0,e?.jitterMs??500);return Math.min(n,t*2**this.reconnectAttempt)+Math.floor(Math.random()*(r+1))}clearReconnect(){this.reconnectTimer!==void 0&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=void 0)}sendRegister(){let e={...this.runtime.getSnapshot(),heartbeatIntervalMs:this.getHeartbeatInterval(),capabilities:{catalog:!0,schema:!0,validateActions:!0,invoke:!0,stream:!0,businessPrograms:!0,businessProgramProtocolVersion:1}};this.send({type:`register`,protocolVersion:fe,bridgeId:e.bridgeId,ts:Date.now(),payload:e})}sendUnregister(e){let t={...this.runtime.getSnapshot(),reason:e};this.send({type:`unregister`,protocolVersion:fe,bridgeId:t.bridgeId,ts:Date.now(),payload:t})}sendHeartbeat(){let e={...this.runtime.getSnapshot(),heartbeatIntervalMs:this.getHeartbeatInterval(),uptimeMs:Math.max(0,Date.now()-this.startedAt)};this.send({type:`heartbeat`,protocolVersion:fe,bridgeId:e.bridgeId,ts:Date.now(),payload:e})}getHeartbeatInterval(){return Math.max(1e3,this.options.heartbeatIntervalMs??5e3)}startHeartbeat(){this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.sendHeartbeat()},this.getHeartbeatInterval())}clearHeartbeat(){this.heartbeatTimer!==void 0&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0)}async handleMessage(e){let t=ge(e);if(t){if(t.type===`catalog`){let e=t.payload,n=e.kind===`modules`?me(this.runtime.listModules()):this.runtime.listMethods(e.moduleName??``);this.sendResult(t,`catalog`,n);return}if(t.type===`schema`){let e=t.payload;this.sendResult(t,`schema`,this.runtime.getMethodSchema(e.moduleName,e.methodName));return}if(t.type===`validate-actions`){this.sendResult(t,`validate-actions`,this.runtime.validateActions(t.payload));return}if(t.type===`invoke`){this.sendResult(t,`invoke`,await this.runtime.invoke(t.payload));return}if(t.type===`stream-start`){let e=t.payload,n=await this.runtime.startStream(e,e=>{this.sendStreamEvent(e)});this.sendResult(t,`stream-start`,n);return}if(t.type===`stream-close`){this.sendResult(t,`stream-close`,await this.runtime.closeStream(t.payload));return}if(t.type===`load-program`){this.sendResult(t,`load-program`,await this.runtime.loadProgram(t.payload));return}if(t.type===`start-program`){this.sendResult(t,`start-program`,await this.runtime.startProgram(t.payload,e=>{this.sendProgramEvent(e)}));return}if(t.type===`cancel-program`){this.sendResult(t,`cancel-program`,await this.runtime.cancelProgram(t.payload));return}this.sendResult(t,`catalog`,he(`Unsupported message type "${t.type}".`))}}sendStreamEvent(e){this.send({type:`stream-event`,protocolVersion:fe,bridgeId:this.runtime.getSnapshot().bridgeId,ts:Date.now(),payload:e})}sendProgramEvent(e){this.send({type:`program-event`,protocolVersion:fe,bridgeId:this.runtime.getSnapshot().bridgeId,traceId:e.traceId,ts:Date.now(),payload:e})}sendResult(e,t,n){let r={requestType:t,result:n,traceId:e.traceId};this.send({type:`result`,protocolVersion:fe,bridgeId:this.runtime.getSnapshot().bridgeId,callId:e.callId,traceId:e.traceId,ts:Date.now(),payload:r})}send(e){!this.socket||this.socket.readyState!==1||this.socket.send(JSON.stringify(e))}clearSocketHandlers(e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null}};function ve(e,t){return t&&e.then(e=>{t(e)}).catch(e=>{t(e)}),e}var v=class{constructor(e,t,n){this.bridge=e,this.moduleName=t,this.logger=n?.logger??m}request(e,t,n,r){return ve(Promise.resolve().then(()=>{let n=r?ee(r,t,this.moduleName,e):t;return r||this.logger.debug(`validation schema not configured`,{method:e}),this.logger.debug(`sending request`,{method:e}),this.bridge.sendRequest(this.moduleName,e,n)}).then(t=>(this.logger.info(`request success`,{method:e,code:t.code}),t)).catch(t=>{throw this.logger.warn(`request failed`,{method:e,error:te(t)}),t}),n)}requestStream(e,t,n,r){try{if(!this.bridge.sendStreamRequest)throw Error(`Current bridge does not support stream request`);let i=r?ee(r,t,this.moduleName,e):t;return r||this.logger.debug(`validation schema not configured`,{method:e}),this.logger.debug(`sending stream request`,{method:e}),this.bridge.sendStreamRequest(this.moduleName,e,i,n)}catch(t){let r=t instanceof Error?t:Error(String(t));if(this.logger.warn(`stream request failed before send`,{method:e,error:te(r)}),n)try{n({type:`error`,requestId:``,error:r})}catch(t){this.logger.warn(`stream error callback failed`,{method:e,error:te(t)})}let i=Promise.reject(r);return Object.defineProperty(i,"requestId",{value:``,enumerable:!0}),i.cancel=()=>{},i}}},ye=class e{constructor(e=0,t=0){this.x=e,this.y=t}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}clone(){return new e(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t==null?(this.x+=e.x,this.y+=e.y,this):this.addVectors(e,t)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t==null?(this.x-=e.x,this.y-=e.y,this):this.subVectors(e,t)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}angle(){let e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}equals(e){return e.x==this.x&&e.y==this.y}toString(){return JSON.stringify(this)}};function be(e,t){let n=e*20037508.34/180,r=Math.log(Math.tan((90+t)*Math.PI/360))/(Math.PI/180);return r=r*20037508.34/180,{x:n,y:r}}function xe(e,t){let n=e/20037508.34*180,r=t/20037508.34*180;return r=180/Math.PI*(2*Math.atan(Math.exp(r*Math.PI/180))-Math.PI/2),{x:n,y:r}}const y={EPSGType:{EPSG84:`4326`,EPSGWeb:`3857`,EPSGWorld:`0000`}};var b=class e{constructor(e=0,t=0,n=0,r=y.EPSGType.EPSG84){typeof e!=`number`&&(e=this.parseFloatDeal(e)),typeof t!=`number`&&(t=this.parseFloatDeal(t)),typeof n!=`number`&&(n=this.parseFloatDeal(n)),e!=e&&(e=0),t!=t&&(t=0),n!=n&&(n=0),this.x=e,this.y=t,this.z=n,this.ePSGType=r}parseFloatDeal(e){try{return parseFloat(e)}catch(e){return console.log(e),0}}set(e,t,n){return typeof e!=`number`&&(e=0),typeof t!=`number`&&(t=0),typeof n!=`number`&&(n=0),e!=e&&(e=0),t!=t&&(t=0),n!=n&&(n=0),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}clone(){return new e(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t==null?(this.x+=e.x,this.y+=e.y,this.z+=e.z,this):this.addVectors(e,t)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t==null?(this.x-=e.x,this.y-=e.y,this.z-=e.z,this):this.subVectors(e,t)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t==null?(this.x*=e.x,this.y*=e.y,this.z*=e.z,this):this.multiplyVectors(e,t)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(t,n){let r=new e,i=new e;return r.set(t,t,t),i.set(n,n,n),this.clamp(r,i)}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)}cross(e,t){return t==null?this.crossVectors(this,e):this.crossVectors(e,t)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}equals(e){return e.x==this.x&&e.y==this.y&&e.z==this.z}toString(){return JSON.stringify(this)}changeEPSGType(e){if(this.ePSGType!=e){if(e==y.EPSGType.EPSG84){let e=xe(this.x,this.y);this.x=e.x,this.y=e.y}else if(e==y.EPSGType.EPSGWeb){let e=be(this.x,this.y);this.x=e.x,this.y=e.y}else console.log(`暂不支持[${this.ePSGType}]转换为${e}`);return this.ePSGType=e,this}}};const x={Off:0,Auto:1,DLAA:2,UltraQuality:3,Quality:4,Balanced:5,Performance:6,UltraPerformance:7},S={Auto:`auto`,Low:`low`,High:`high`,Super:`super`,Blue:`blue`},Se=[{label:`自动`,type:S.Auto,value:12e6},{label:`标清`,type:S.Low,value:4e6},{label:`高清`,type:S.High,value:8e6},{label:`超清`,type:S.Super,value:12e6},{label:`蓝光`,type:S.Blue,value:24e6}],Ce={[S.Auto]:12e6,[S.Low]:4e6,[S.High]:8e6,[S.Super]:12e6,[S.Blue]:24e6};let we=function(e){return e.VP8=`VP8`,e.VP9=`VP9`,e.AV1=`AV1`,e.H264=`H264`,e}({}),Te=function(e){return e.Model=`MODEL`,e.POI=`POI`,e}({});const Ee={Spring:0,Summer:1,Autumn:2,Winter:3};let De=function(e){return e[e.Linear=0]=`Linear`,e[e.EaseInQuad=1]=`EaseInQuad`,e[e.EaseOutQuad=2]=`EaseOutQuad`,e[e.EaseInOutQuad=3]=`EaseInOutQuad`,e[e.EaseOutInQuad=4]=`EaseOutInQuad`,e[e.EaseInCubic=5]=`EaseInCubic`,e[e.EaseOutCubic=6]=`EaseOutCubic`,e[e.EaseInOutCubic=7]=`EaseInOutCubic`,e[e.EaseOutInCubic=8]=`EaseOutInCubic`,e[e.EaseInQuart=9]=`EaseInQuart`,e[e.EaseOutQuart=10]=`EaseOutQuart`,e[e.EaseInOutQuart=11]=`EaseInOutQuart`,e[e.EaseOutInQuart=12]=`EaseOutInQuart`,e[e.EaseInQuint=13]=`EaseInQuint`,e[e.EaseOutQuint=14]=`EaseOutQuint`,e[e.EaseInOutQuint=15]=`EaseInOutQuint`,e[e.EaseOutInQuint=16]=`EaseOutInQuint`,e[e.EaseInSine=17]=`EaseInSine`,e[e.EaseOutSine=18]=`EaseOutSine`,e[e.EaseInOutSine=19]=`EaseInOutSine`,e[e.EaseOutInSine=20]=`EaseOutInSine`,e[e.EaseInExpo=21]=`EaseInExpo`,e[e.EaseOutExpo=22]=`EaseOutExpo`,e[e.EaseInOutExpo=23]=`EaseInOutExpo`,e[e.EaseOutInExpo=24]=`EaseOutInExpo`,e[e.EaseInCirc=25]=`EaseInCirc`,e[e.EaseOutCirc=26]=`EaseOutCirc`,e[e.EaseInOutCirc=27]=`EaseInOutCirc`,e[e.EaseOutInCirc=28]=`EaseOutInCirc`,e[e.EaseInElastic=29]=`EaseInElastic`,e[e.EaseOutElastic=30]=`EaseOutElastic`,e[e.EaseInOutElastic=31]=`EaseInOutElastic`,e[e.EaseOutInElastic=32]=`EaseOutInElastic`,e[e.EaseInBack=33]=`EaseInBack`,e[e.EaseOutBack=34]=`EaseOutBack`,e[e.EaseInOutBack=35]=`EaseInOutBack`,e[e.EaseOutInBack=36]=`EaseOutInBack`,e[e.EaseInBounce=37]=`EaseInBounce`,e[e.EaseOutBounce=38]=`EaseOutBounce`,e[e.EaseInOutBounce=39]=`EaseInOutBounce`,e[e.EaseOutInBounce=40]=`EaseOutInBounce`,e}({}),Oe=function(e){return e[e.Loose=0]=`Loose`,e[e.Strict=1]=`Strict`,e}({}),ke=function(e){return e.StopAtTheEnd=`StopAtTheEnd`,e.Loop=`Loop`,e.BackAndForward=`BackAndForward`,e}({});const C=l.z.string().min(1),w=C.optional(),T=l.z.number().finite(),E=T.optional(),D=l.z.instanceof(b),Ae=l.z.object({x:T,y:T,z:T,ePSGType:C}),je=l.z.union([l.z.instanceof(ye),l.z.object({x:T,y:T})]),O=l.z.union([D,Ae]),Me=D.optional(),Ne=O.optional(),Pe=l.z.union([l.z.literal(Ee.Spring).describe(`春季`),l.z.literal(Ee.Summer).describe(`夏季`),l.z.literal(Ee.Autumn).describe(`秋季`),l.z.literal(Ee.Winter).describe(`冬季`)]).describe(`场景季节`),Fe=l.z.union([l.z.literal(x.Off).describe(`关闭 DLSS`),l.z.literal(x.Auto).describe(`自动质量档位`),l.z.literal(x.DLAA).describe(`DLAA 2倍效果`),l.z.literal(x.UltraQuality).describe(`超高质量`),l.z.literal(x.Quality).describe(`高质量`),l.z.literal(x.Balanced).describe(`平衡`),l.z.literal(x.Performance).describe(`性能`),l.z.literal(x.UltraPerformance).describe(`超高性能`)]).describe(`DLSS 质量档位`),Ie=l.z.union([l.z.literal(S.Auto).describe(`自动`),l.z.literal(S.Low).describe(`标清`),l.z.literal(S.High).describe(`高清`),l.z.literal(S.Super).describe(`超清`),l.z.literal(S.Blue).describe(`蓝光`)]).describe(`渲染码率档位`),Le=l.z.union([l.z.literal(`VP8`).describe(`VP8`),l.z.literal(`VP9`).describe(`VP9`),l.z.literal(`AV1`).describe(`AV1`),l.z.literal(`H264`).describe(`H264`)]).describe(`视频解码器类别`),Re=l.z.union([l.z.literal(`MODEL`).describe(`模型图层`),l.z.literal(`POI`).describe(`POI 图层`)]).describe(`图层类别`),ze=l.z.union([C,l.z.array(C).min(1)]),k=l.z.undefined().optional(),Be=l.z.object({ids:l.z.array(C).min(1)}),Ve={show:Be,hide:Be,showByGroup:Be,hideByGroup:Be,showAll:k,hideAll:k},He=l.z.object({parentId:l.z.string().optional(),id:w}),Ue=e=>e.refine(e=>!!(e.id||e.timelineId),{message:`id or timelineId is required`}),We={connect:k,disconnect:k,reconnect:k,KickOtherConnect:k,KeepConnect:k,GetEngineServiceStatus:k},A={lookAt:l.z.object({parentId:l.z.string().optional(),id:ze,offSet:Ne,positionOffSetDistance:E,offSetX:E,distance:E,time:E,isRotate:l.z.boolean().optional(),isHighlight:l.z.boolean().optional(),showBack:l.z.boolean().optional()}),lookAtArray:l.z.object({parentId:w,ids:l.z.array(C).min(1),offSet:Ne,offSetX:E,distance:E,time:E,isRotate:l.z.boolean().optional(),isHighlight:l.z.boolean().optional()}),flyToTarget:l.z.object({point:Ne,target:Ne,fov:l.z.number().finite().min(10).max(150).optional(),time:E}),flyByPath:l.z.object({points:l.z.union([l.z.array(D),l.z.string()]).optional(),lookAts:l.z.union([l.z.array(D),l.z.string()]).optional(),nodes:l.z.string().optional(),time:E,smoothMode:l.z.union([l.z.literal(0),l.z.literal(1)]).optional()}),setFlySpeed:l.z.object({speed:T}),endFly:k,pauseFly:k,resumeFly:k,getCameraInfo:k,setCameraPositionAndRotation:l.z.object({point:D,rotation:D}),setCameraFov:l.z.object({fov:T}),startCameraObjFollow:l.z.object({parentId:l.z.string().optional(),id:C,offSet:O,smooth:T.optional().default(.85).refine(e=>e>=0&&e<=1,{message:`smooth must be in [0, 1]`,path:[`smooth`]})}),endCameraObjFollow:k,resetCameraFov:k,reset:k},Ge={getAllSceneName:k,switchSceneByName:l.z.object({sceneName:C}),getCurrentSceneName:k,listenMapCompass:l.z.object({enable:l.z.boolean()}),setFeatureToggle:l.z.object({key:C,enabled:l.z.boolean()}),getSceneMeta:k},Ke={setVisible:l.z.object({parentId:l.z.string().optional().default(``),id:ze,visible:l.z.boolean().optional()}),setVisibleResolved:l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1),visible:l.z.boolean()}),setVisibleByTags:l.z.object({tags:ze,visible:l.z.boolean()}),setVisibleByAttibute:l.z.object({attributes:l.z.record(l.z.string(),l.z.any()),filterMode:l.z.nativeEnum(Oe).optional().default(0),visible:l.z.boolean().optional().default(!0),otherVisible:l.z.boolean().optional().default(!1)}),add:l.z.object({parentId:l.z.string().optional().default(``),id:C,assetsPath:w,position:Me,angle:Me,scale:Me,description:l.z.string().optional()}),remove:l.z.object({parentId:l.z.string().optional().default(``),ids:l.z.array(C).min(1)}),getElementTree:l.z.object({parentId:l.z.string().optional().default(``),id:C}),getModelInfo:l.z.object({parentId:l.z.string().optional().default(``),id:C}),getModelBoundsInfo:l.z.object({parentId:l.z.string().optional().default(``),id:ze}),getModelBoundsInfoResolved:l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1)})},j=l.z.object({parentId:l.z.string().optional(),id:C}),qe=l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1)}),Je=j.extend({rotate:D}),M={startMoveByNodes:j.extend({nodes:l.z.array(O).min(1),speed:T.optional().default(1),linear:T.optional().default(1),isLookAtTarget:l.z.boolean().optional().default(!1),needDirection:l.z.boolean().optional().default(!0)}),pauseMove:j,resumeMove:j,endMove:j,restoreMove:qe,rotate:Je,endRotate:j,continuedRotate:Je,rotateByTarget:j.extend({parentTargetId:w,targetID:C,point:D,axisX:T.optional().default(0),axisY:T.optional().default(0),axisZ:T.optional().default(0),angle:T.optional().default(0),isPersistence:l.z.boolean().optional().default(!1)}),restoreRotate:qe,setScale:j.extend({scale:D,duration:T.optional().default(.5)}),endScale:j,restoreScale:qe},Ye={enable:l.z.object({enable:l.z.boolean()}),setHighLightModel:l.z.object({parentId:l.z.string().optional().default(``),ids:l.z.array(C).min(1),showBack:l.z.boolean()}),removeHighLightModel:l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1)}),clear:l.z.object({})},Xe=l.z.object({parentId:w,id:w}),Ze=e=>e.refine(e=>!!(e.id||e.parentId),{message:`id or parentId is required`}),N={addLayer:Ze(Xe.extend({layerName:l.z.string().optional(),show:l.z.boolean().optional(),poiEnabled:l.z.boolean().optional(),type:Re.optional(),description:l.z.string().optional()})),addLayerResolved:l.z.object({parentId:l.z.string().optional(),id:C,layerName:l.z.string().optional(),show:l.z.boolean().optional().default(!0),poiEnabled:l.z.boolean().optional().default(!0),description:l.z.string().optional().default(``),isSystem:l.z.boolean().optional().default(!1),poiOffsetY:l.z.number().optional().default(0)}),layerSelector:Ze(Xe),removeLayer:Ze(Xe),isLayerOrGroupExit:Ze(Xe),layerSelectorResolved:l.z.object({parentId:l.z.string().optional().default(``),id:C}),switchModelLayer:l.z.object({parentId:C,ids:l.z.array(C).min(1),toParentId:C}),showUIPop:l.z.object({parentId:l.z.string().optional(),id:C,visible:l.z.boolean().optional().default(!0),assetsPath:l.z.string().optional().default(``),offSet:O,scale:O}),addModel:l.z.object({parentId:C,id:C,assetsPath:w,position:O,name:l.z.string().optional().default(``),rotation:O,scale:O,description:l.z.string().optional(),isSystem:l.z.boolean().optional(),tags:l.z.array(l.z.string()).optional(),extraProps:l.z.any().optional()}),addPOI:l.z.object({parentId:l.z.string().optional(),id:C,assetsPath:C,position:O,targetParentId:l.z.string().optional(),targetId:l.z.string().optional(),rotation:O,scale:O,offSet:O,description:l.z.string().optional(),isSystem:l.z.boolean().optional(),text:l.z.string(),fontSize:l.z.number().optional(),tags:l.z.array(l.z.string()).optional(),extraProps:l.z.any().optional()}),removeModel:l.z.object({parentId:C,ids:l.z.array(C).min(1)}),getLayerChildElement:l.z.object({parentId:l.z.string().optional().default(``),id:C})},P={closeCameraFog:k,getWeatherTypes:k,resetWeather:k,resetWeatherAndTime:k,openCameraFog:l.z.object({fogIntensity:E,fogStartColor:l.z.string().optional(),fogEndColor:l.z.string().optional(),fogStartDistance:E,fogEndDistance:E,directionalIntensity:E,directionalFallOff:E,directionalColor:l.z.string().optional()}).refine(e=>e.fogIntensity===void 0||e.fogIntensity>=0&&e.fogIntensity<=1,{message:`fogIntensity must be between 0 and 1`,path:[`fogIntensity`]}),setSceneTime:l.z.object({hour:T,timeDuration:E}).refine(e=>e.hour>=0&&e.hour<24,{message:`hour must be in [0, 24)`,path:[`hour`]}),changeWeatherType:l.z.object({type:T,timeDuration:E}),setAnimateTimeOfDay:l.z.object({isAnimate:l.z.boolean(),dayLength:E,nightLength:E}),changeSeason:l.z.object({season:Pe,duration:E.describe(`切换过渡时长,单位秒`)}),resetSeason:l.z.object({}),setTimeSync:l.z.object({syncSystemTime:l.z.boolean()}),resetSceneTime:l.z.object({}),setDayAndNight:l.z.object({dayType:C})},F={add:l.z.object({groupName:C,poiInfos:l.z.array(l.z.record(l.z.unknown())).min(1)}),deleteById:l.z.object({groupName:C,id:C}),deleteByGroup:l.z.object({groupName:C}),update:l.z.object({groupName:C,poiInfos:l.z.array(l.z.record(l.z.unknown())).min(1)}),updatePopStates:l.z.object({groupName:C,popStates:l.z.array(l.z.record(l.z.unknown())).min(1)}),enableOverlap:l.z.object({enable:l.z.boolean()}),showDistance:l.z.object({distance:T})},I={add:l.z.object({id:C,groupName:C,assetPath:C,targetParentId:w,targetId:w,visible:l.z.boolean().optional()}),deleteById:l.z.object({groupName:C,ids:l.z.array(C).min(1)}),deleteByGroup:l.z.object({groupName:C}),getPOIInfo:l.z.object({groupName:C,id:C}),update:l.z.object({id:C,groupName:C,assetPath:w,targetParentId:w,targetId:w,visible:l.z.boolean().optional()}),setVisibleByGroup:l.z.object({groupName:C,visible:l.z.boolean()})},Qe=l.z.array(l.z.object({groupName:C,id:C,parentId:l.z.string().optional().default(``),position:Me})),$e={addPop:Qe,removePop:Qe,removeAll:Qe,show:Qe,showAll:Qe,setPopDelayFrame:l.z.object({time:T}),setPopShowDistance:l.z.object({distance:T})},et={startLoopAnimation:l.z.object({parentId:w,id:C,stateName:C,loopStartTime:E,loopEndTime:E,speed:E}).refine(e=>e.loopStartTime===void 0||e.loopStartTime>=0&&(e.loopEndTime===void 0||e.loopEndTime>e.loopStartTime),{message:`loopStartTime must be >= 0 and loopEndTime must be greater than loopStartTime`,path:[`loopStartTime`]}),stopLoopAnimation:l.z.object({parentId:w,id:C}),playAnimator:l.z.object({parentId:w,id:C,stateName:C,speed:E,startTime:E,endTime:E,isStop:l.z.boolean().optional()}),setAnimatorSpeed:l.z.object({parentId:w,id:C,speed:T}),getAnimationLength:l.z.object({parentId:w,id:C,stateName:C}),stopAnimator:l.z.object({parentId:w,id:C})},tt={play:Ue(He.extend({initialTime:E,speed:E,keepLastFrame:l.z.boolean().optional()}).refine(e=>e.speed===void 0||e.speed<0||e.speed>=.1,{message:`speed must be negative or >= 0.1`,path:[`speed`]})),pause:Ue(He),resume:Ue(He),stop:Ue(He.extend({resetTime:E,isCameraToStart:l.z.boolean().optional()})),stopAll:l.z.object({}).optional(),setSpeed:Ue(He.extend({speed:T}).refine(e=>e.speed<0||e.speed>=.1,{message:`speed must be negative or >= 0.1`,path:[`speed`]}))},nt={setSceneRenderBitrate:l.z.object({bitrate:Ie.optional()}),setSceneRenderBitrateResolved:l.z.object({bitrate:T}).refine(e=>e.bitrate>=1e6,{message:`bitrate must be >= 1000000`,path:[`bitrate`]}),setSceneFPS:l.z.object({fps:T}).refine(e=>e.fps>=1&&e.fps<=300,{message:`fps must be in [1, 300]`,path:[`fps`]}),setVideoDecode:l.z.object({decode:Le}),setScreenResolution:l.z.object({width:T,height:T}).refine(e=>e.width>0&&e.height>0,{message:`width and height must be > 0`,path:[`width`]})},rt={setDlssEnable:l.z.object({enable:l.z.boolean(),quality:Fe}),setDlss:l.z.object({enable:l.z.boolean(),quality:Fe}),setDlssQuality:l.z.object({quality:Fe})},it=l.z.object({node:O,time:l.z.string()}),at=l.z.object({parentId:l.z.string().optional().default(``),id:C}),L={add:l.z.object({parentId:l.z.string().optional().default(``),id:C,assetPath:l.z.string().optional().default(``),scale:O,showPath:l.z.boolean().optional().default(!0),passedColor:l.z.string().optional().default(`#ffffff`),lineColor:l.z.string().optional().default(`#00ff00`),lineWidth:T,duration:E,nodes:l.z.array(O).optional(),timeNodes:l.z.array(it).optional(),lineLayer:w,afterRender:l.z.boolean().optional().default(!1),isAutoClear:l.z.boolean().optional().default(!0)}),update:l.z.object({parentId:l.z.string().optional().default(``),id:C,lineColor:l.z.string().optional(),lineWidth:E,passedColor:l.z.string().optional(),speed:E}).refine(e=>e.speed===void 0||e.speed>=0,{message:`speed must be >= 0`,path:[`speed`]}),setTimeNode:l.z.object({parentId:l.z.string().optional().default(``),id:C,timeStart:l.z.string().optional(),startNodeIndex:l.z.string().optional()}).refine(e=>e.timeStart!==void 0||e.startNodeIndex!==void 0,{message:`timeStart or startNodeIndex is required`,path:[`timeStart`]}).refine(e=>e.startNodeIndex===void 0||parseInt(e.startNodeIndex)>=0,{message:`startNodeIndex must be >= 0`,path:[`startNodeIndex`]}),node:at,pause:at,resume:at,stop:at,clear:l.z.object({}).optional()},ot=l.z.object({position:O,value:T.min(0).max(999).optional().default(1)}),st={create:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string().optional(),textureSize:je.optional().default({x:256,y:256}),mapSize:je.optional().default({x:1e3,y:1e3}),influenceSize:l.z.number().int().positive().optional().default(13),points:l.z.union([l.z.array(ot).min(1),l.z.array(O).min(1)]),opacity:l.z.number().min(0).max(1).optional().default(.7),heightScale:l.z.number().positive().optional().default(3.5),lerpScale:l.z.number().positive().optional().default(2.5),isAddAsset:l.z.boolean().optional().default(!1)}),remove:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string().optional()}),clear:k,setConfig:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string().optional(),opacity:l.z.number().min(0).max(1).optional().default(.7),heightScale:l.z.number().positive().optional().default(3.5),lerpScale:l.z.number().positive().optional().default(2.5),influenceSize:l.z.number().int().positive().optional().default(13)})},ct={updateWebView:l.z.object({parentId:l.z.string().optional().default(``),id:C,url:C})},lt=l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string()}),ut=e=>e.refine(e=>{let t=e;return t.nodes!==void 0||t.targetIds!==void 0},{message:`nodes or targetIds is required`,path:[`nodes`]}),dt=l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string(),nodes:l.z.array(O).optional(),targetIds:l.z.array(C).optional(),targetCodes:l.z.array(C).optional(),speed:l.z.number().positive().optional().default(2),isCache:l.z.boolean().optional().default(!0),planColor:l.z.string().optional(),passColor:l.z.string().optional(),lineWidth:l.z.number().positive().optional().default(3),isAutoPlay:l.z.boolean().optional().default(!0),assetPath:l.z.string().optional(),isAutoClear:l.z.boolean().optional().default(!0),offSetZ:l.z.number().optional().default(.5),scale:D.default(new b(1,1,1))}),R={startNav:ut(dt),getMeshNavDistance:ut(dt.extend({isCache:l.z.boolean().optional().default(!1),isAutoPlay:l.z.boolean().optional().default(!1)})),pauseNav:lt,resumeNav:lt,stopNav:lt,updateNav:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string(),speed:l.z.number().finite().optional().default(-1),planColor:l.z.string().optional(),passColor:l.z.string().optional()}),updateSpeed:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string(),speed:l.z.number().finite().optional().default(-1),planColor:l.z.string().optional(),passColor:l.z.string().optional()}),startNavByPath:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.array(C).min(1),nodes:l.z.array(O).min(1),isCache:l.z.boolean().optional().default(!0),duration:l.z.number().positive().optional().default(10),planColor:l.z.string().optional(),passColor:l.z.string().optional()}),pauseNavPath:lt,resumeNavPath:lt,stopNavPath:lt,updateNavPath:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.array(C).min(1),duration:l.z.number().finite().optional().default(-1),planColor:l.z.string().optional(),passColor:l.z.string().optional()})},ft=l.z.array(C).min(1).describe(`查询的图层组编号集合`),pt={layerQueryByModel:l.z.object({parentId:l.z.string().optional(),id:l.z.string().optional(),queryRadius:l.z.number().positive().optional().default(50),queryMinHeight:l.z.number().optional().default(0),queryMaxHeight:l.z.number().optional().default(20),queryParentIds:ft}),layerQueryByPosition:l.z.object({queryPosition:O.optional(),queryRadius:l.z.number().positive().optional().default(50),queryMinHeight:l.z.number().optional().default(0),queryMaxHeight:l.z.number().optional().default(20),queryParentIds:ft}),layerQueryByModelBox:l.z.object({parentId:l.z.string().optional(),id:l.z.string().optional(),queryParentIds:ft})},mt={startTrain:l.z.object({parentId:w,id:C,trainCode:l.z.string().optional(),startStationName:l.z.string().optional(),endStationName:l.z.string().optional(),direction:l.z.string().optional(),action:l.z.string().optional(),stopTime:E,moveType:l.z.nativeEnum(ke).optional()}),setTrainBehavior:l.z.object({parentId:w,id:C,moveType:l.z.nativeEnum(ke).optional()}),setCameraFollowTrain:l.z.object({parentId:w,id:C,offSet:Ne}),setTrainVolume:l.z.object({parentId:w,id:C,volume:l.z.number().finite().min(0).max(1).optional()}),cancelCameraFollowTrain:k},ht={},gt={Connect:We,Camera:A,Scene:Ge,Layer:N,Model:Ke,ModelTransform:M,HighlighterEffect:Ye,UIPOI:F,ModelPOI:I,Popup:$e,Animation:et,TimeLine:tt,Screen:nt,Dlss:rt,WeatherSystem:P,PathPatrol:L,pointIcon:Ve,HeatMap:st,WebView:ct,Navigation:R,SpatialQuery:pt,TrainSimulate:mt};var _t=class extends v{constructor(e,t){super(e,`Animation`,t)}startLoopAnimation(e,t){let n={...e,speed:e.speed??1};return this.request(`startLoopAnimation`,n,t,et.startLoopAnimation)}stopLoopAnimation(e,t){return this.request(`stopLoopAnimation`,e,t,et.stopLoopAnimation)}playAnimator(e,t){let n={...e,speed:e.speed??1,startTime:e.startTime??0,endTime:e.endTime??1,isStop:e.isStop??!1};return this.request(`playAnimator`,n,t,et.playAnimator)}setAnimatorSpeed(e,t){return this.request(`setAnimatorSpeed`,e,t,et.setAnimatorSpeed)}getAnimationLength(e,t){return this.request(`getAnimationLength`,e,t,et.getAnimationLength)}stopAnimator(e,t){return this.request(`stopAnimator`,e,t,et.stopAnimator)}},vt=class extends v{constructor(e,t){super(e,`CameraService`,t)}lookAt(e,t){let n={...e,time:e.time??1.5,distance:e.distance??20,isRotate:e.isRotate??!0,isHighlight:e.isHighlight??!0,offSet:e.offSet??new b(50,150,100)};if(n.offSet&&(n.offSet.ePSGType=`0000`),Array.isArray(n.id)){let e={parentId:n.parentId,ids:n.id,offSet:n.offSet,offSetX:n.offSetX,distance:n.distance,time:n.time,isRotate:n.isRotate,isHighlight:n.isHighlight};return this.request(`LookAtArray`,e,t,A.lookAtArray)}return this.request(`LookAt`,n,t,A.lookAt)}flyToTarget(e,t){let n={...e,time:e.time??2};return this.request(`FlyToTarget`,n,t,A.flyToTarget)}flyByPath(e,t){let n=Array.isArray(e.points)?JSON.stringify(e.points):e.points,r=Array.isArray(e.lookAts)?JSON.stringify(e.lookAts):e.lookAts,i={...e,points:n,lookAts:r,nodes:JSON.stringify(e.points),time:e.time??4,smoothMode:e.smoothMode??0};return this.request(`flyByPath`,i,t,A.flyByPath)}setFlySpeed(e,t){return this.request(`setFlySpeed`,e,t,A.setFlySpeed)}endFly(e){return this.request(`endFly`,void 0,e,k)}pauseFly(e){return this.request(`pauseFly`,void 0,e,k)}resumeFly(e){return this.request(`resumeFly`,void 0,e,k)}getCameraInfo(e){return this.request(`GetCameraInfo`,void 0,e,k)}setCameraPositionAndRotation(e,t){return e.rotation&&(e.rotation.ePSGType=`0000`),this.request(`setCameraPositionAndRotation`,e,t,A.setCameraPositionAndRotation)}setCameraFov(e,t){return this.request(`setCameraFov`,e,t,A.setCameraFov)}resetCameraFov(e){return this.request(`resetCameraFov`,void 0,e,k)}reset(e){return this.request(`reset`,void 0,e,k)}startCameraObjFollow(e,t){e.offSet&&(e.offSet.ePSGType=`0000`);let n={...e,offSet:e.offSet??new b(-30,0,10,`0000`)};return this.request(`StartCameraObjFollow`,n,t,A.startCameraObjFollow)}endCameraObjFollow(e){return this.request(`EndCameraObjFollow`,void 0,e,k)}},yt=class extends v{constructor(e,t,n){super(e,`Connect`,n),this.connectionLifecycle=t}connect(e){return ve(Promise.resolve().then(()=>(this.logger.warn(`connect called as compatibility API; SDK auto-connects after DTCEngine init`),this.connectionLifecycle.connect().then(()=>({requestId:``,success:!0,code:`CONNECT_OK`,message:`Connect requested (compatibility path)`,ts:Date.now()})))),e)}disconnect(e){return ve(Promise.resolve().then(()=>(this.logger.info(`disconnect requested`),Promise.resolve(this.connectionLifecycle.disconnect()).then(()=>({requestId:``,success:!0,code:`DISCONNECT_OK`,message:`Disconnected`,ts:Date.now()})))),e)}reconnect(e){return ve(Promise.resolve().then(()=>(this.logger.info(`reconnect requested`),this.connectionLifecycle.reconnect().then(()=>({requestId:``,success:!0,code:`RECONNECT_OK`,message:`Reconnect requested`,ts:Date.now()})))),e)}KickOtherConnect(e){return this.request(`KickOtherConnect`,void 0,e,k)}KeepConnect(e){return this.request(`KeepConnect`,void 0,e,k)}GetEngineServiceStatus(e){return this.request(`GetEngineServiceStatus`,void 0,e,k)}},bt=class extends v{constructor(e,t){super(e,`DLSSService`,t)}setDlss(e={},t){let n={enable:e.enable??!1,quality:e.quality??x.Balanced};return this.request(`SetDlss`,n,t,rt.setDlss)}},xt=class extends v{constructor(e,t){super(e,`HeatMapService`,t)}create(e,t){let n={...e,opacity:e.opacity??.7,heightScale:e.heightScale??3.5,lerpScale:e.lerpScale??2.5,influenceSize:e.influenceSize??13,points:e.points.map(e=>`position`in e?e:{position:e,value:1})};return n.heightScale*=100,this.request(`CreateHeatMap`,n,t,st.create)}remove(e,t){return this.request(`RemoveHeatMap`,e,t,st.remove)}clear(e){return this.request(`ClearHeatMap`,void 0,e,st.clear)}setConfig(e,t){let n={...e,opacity:e.opacity??.7,heightScale:e.heightScale??3.5,lerpScale:e.lerpScale??2.5,influenceSize:e.influenceSize??13};return n.heightScale*=100,this.request(`SetHeatMapConfig`,n,t,st.setConfig)}},St=class extends v{constructor(e,t){super(e,`HighLighterService`,t)}enable(e,t){return this.request(`HighlightEnable`,e,t,Ye.enable)}setHighLightModel(e,t){return this.request(`AddHighLighterModel`,e,t,Ye.setHighLightModel)}removeHighLightModel(e,t){return this.request(`RemoveHighLightModel`,e,t,Ye.removeHighLightModel)}clear(e){return this.request(`Clear`,{},e,Ye.clear)}},Ct=class e{constructor(e=0,t=0,n=0,r=0,i=y.EPSGType.EPSG84){this.x=e,this.y=t,this.z=n,this.v=r,this.EPSGType=i}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.v=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}clone(){return new e(this.x,this.y,this.z,this.v)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.v=e.v,this}add(e,t){return t==null?(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.v+=e.v,this):this.addVectors(e,t)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.v+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.v=e.v+t.v,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.v+=e.v*t,this}sub(e,t){return t==null?(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.v-=e.v,this):this.subVectors(e,t)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.v-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.v=e.v-t.v,this}multiply(e,t){return t==null?(this.x*=e.x,this.y*=e.y,this.z*=e.z,this.v*=e.v,this):this.multiplyVectors(e,t)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.v*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this.v=e.v*t.v,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.v/=e.v,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.v=Math.min(this.v,e.v),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.v=Math.max(this.v,e.v),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.v=Math.max(e.v,Math.min(t.v,this.v)),this}clampScalar(t,n){let r=new e,i=new e;return r.set(t,t,t,t),i.set(n,n,n,n),this.clamp(r,i)}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.v=Math.floor(this.v),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.v=Math.ceil(this.v),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.v=Math.round(this.v),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.v=this.v<0?Math.ceil(this.v):Math.floor(this.v),this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.v*e.v}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.v*this.v}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.v*this.v)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.v)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.v+=(e.v-this.v)*t,this}lerpVectors(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)}cross(e,t){return t==null?this.crossVectors(this,e):this.crossVectors(e,t)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z,i=this.v-e.v;return t*t+n*n+r*r+i*i}equals(e){return e.x==this.x&&e.y==this.y&&e.z==this.z&&e.v==this.v}toString(){return JSON.stringify(this)}changeEPSGType(e){if(this.EPSGType!=e){if(e==y.EPSGType.EPSG84){let e=xe(this.x,this.y);this.x=e.x,this.y=e.y}else if(e==y.EPSGType.EPSGWeb){let e=be(this.x,this.y);this.x=e.x,this.y=e.y}else console.log(`暂不支持[${this.EPSGType}]转换为${e}`);return this.EPSGType=e,this}}},wt=class{constructor(){this.Vector2=ye,this.Vector3=b,this.Vector4=Ct}},Tt=class extends v{constructor(e,t){super(e,`LayerService`,t)}addLayer(e,t){let n={...e,show:e.show??!0,poiEnabled:e.poiEnabled??!0,isSystem:e.isSystem??!1,poiOffsetY:e.poiOffsetY??0};return this.request(`AddLayer`,n,t,N.addLayerResolved)}removeLayer(e,t){let n={...e};return this.request(`RemoveLayer`,n,t,N.layerSelectorResolved)}isLayerOrGroupExit(e,t){let n={...e};return this.request(`IsLayerOrGroupExit`,n,t,N.layerSelectorResolved)}switchModelLayer(e,t){return this.request(`SwitchLayer`,e,t,N.switchModelLayer)}showUIPop(e,t){let n={...e,id:e.id.trim(),visible:e.visible??!0,assetsPath:e.assetsPath??`/Game/Resources/POIS/BluePrints/BP_Camera.uasset`,scale:e.scale??new b(1,1,1),offSet:e.offSet??new b(0,0,0)};return n.scale&&(n.scale.ePSGType=`0000`),n.offSet&&(n.offSet.ePSGType=`0000`),console.log(n),this.request(`ShowLayerUIPop`,n,t,N.showUIPop)}addModel(e,t){let n={...e,id:e.id.trim(),name:e.name?.trim()||``,scale:e.scale??new b(1,1,1),rotation:e.rotation??new b(0,0,0)};return n.extraProps&&=JSON.stringify(n.extraProps),n.scale&&(n.scale.ePSGType=`0000`),n.rotation&&(n.rotation.ePSGType=`0000`),this.request(`AddModel`,n,t,N.addModel)}addPOI(e,t){let n={...e,id:e.id.trim(),scale:e.scale??new b(1,1,1),rotation:e.rotation??new b(0,0,0),fontSize:e.fontSize??16,isSystem:e.isSystem??!1,text:e.text??``,targetParentId:e.targetParentId??``,targetId:e.targetId??``,offSet:e.offSet??new b(0,0,0)};return n.extraProps=n.extraProps?JSON.stringify(n.extraProps):`{}`,n.scale&&(n.scale.ePSGType=`0000`),n.rotation&&(n.rotation.ePSGType=`0000`),n.offSet&&(n.offSet.ePSGType=`0000`),this.request(`AddPOI`,n,t,N.addPOI)}removeModel(e,t){return this.request(`RemoveModelByIds`,e,t,N.removeModel)}getLayerChildElement(e,t){return this.request(`GetLayerChildElements`,e,t,N.getLayerChildElement)}},Et=class extends v{constructor(e,t){super(e,`ModelService`,t)}toIdArray(e){return Array.isArray(e)?e:[e]}setVisible(e,t){let n={parentId:e.parentId,ids:this.toIdArray(e.id),visible:e.visible??!0};return this.request(`SetVisible`,n,t,Ke.setVisibleResolved)}setVisibleByTags(e,t){let n={tags:this.toIdArray(e.tags),visible:e.visible??!0};return this.request(`SetVisibleByTags`,n,t,Ke.setVisibleByTags)}setVisibleByAttibute(e,t){let n={attributes:e.attributes,filterMode:e.filterMode??0,visible:e.visible??!0,otherVisible:e.otherVisible??!1};return this.request(`SetVisibleByAttribute`,n,t,Ke.setVisibleByAttibute)}getElementTree(e,t){return this.request(`GetElementTree`,e,t,Ke.getElementTree)}getModelInfo(e,t){return this.request(`GetModelInfo`,e,t,Ke.getModelInfo)}},Dt=class extends v{constructor(e,t){super(e,`ModelPOI`,t)}add(e,t){let n={...e,visible:e.visible??!0};return this.request(`add`,n,t,I.add)}deleteById(e,t){return this.request(`deleteById`,e,t,I.deleteById)}deleteByGroup(e,t){return this.request(`deleteByGroup`,e,t,I.deleteByGroup)}getPOIInfo(e,t){return this.request(`getPOIInfo`,e,t,I.getPOIInfo)}update(e,t){let n={...e,visible:e.visible??!0};return this.request(`update`,n,t,I.update)}setVisibleByGroup(e,t){return this.request(`setVisibleByGroup`,e,t,I.setVisibleByGroup)}},Ot=class extends v{constructor(e,t){super(e,`ModelTransformService`,t)}startMoveByNodes(e,t){return this.request(`StartMoveByNodes`,e,t,M.startMoveByNodes)}pauseMove(e,t){return this.request(`PauseMove`,e,t,M.pauseMove)}resumeMove(e,t){return this.request(`ResumeMove`,e,t,M.resumeMove)}endMove(e,t){return this.request(`EndMove`,e,t,M.endMove)}restoreMove(e,t){return this.request(`RestoreMove`,e,t,M.restoreMove)}rotate(e,t){return e.rotate.ePSGType=y.EPSGType.EPSGWorld,this.request(`StartRotate`,e,t,M.rotate)}endRotate(e,t){return this.request(`EndRotate`,e,t,M.endRotate)}continuedRotate(e,t){return e.rotate.ePSGType=y.EPSGType.EPSGWorld,this.request(`ContinuedRotate`,e,t,M.continuedRotate)}rotateByTarget(e,t){return this.request(`RotateByTarget`,e,t,M.rotateByTarget)}restoreRotate(e,t){return this.request(`RestoreRotate`,e,t,M.restoreRotate)}setScale(e,t){e.scale.ePSGType=y.EPSGType.EPSGWorld;let n={...e,id:e.id.trim()};return n.scale&&(n.scale.ePSGType=`0000`),this.request(`SetScale`,n,t,M.setScale)}endScale(e,t){return this.request(`EndScale`,e,t,M.endScale)}restoreScale(e,t){return this.request(`RestoreScale`,e,t,M.restoreScale)}},kt=class extends v{constructor(e,t){super(e,`NavigationService`,t)}startNav(e,t){let n={...e,scale:e.scale??new b(1,1,1)};return n.scale&&(n.scale.ePSGType=`0000`),this.request(`PlayMeshNavByNodes`,n,t,R.startNav)}getMeshNavDistance(e,t){return this.request(`PlayMeshNavByNodes`,e,t,R.getMeshNavDistance)}pauseNav(e,t){return this.request(`PauseMeshNav`,e,t,R.pauseNav)}resumeNav(e,t){return this.request(`ResumeMeshNav`,e,t,R.resumeNav)}stopNav(e,t){return this.request(`StopMeshNav`,e,t,R.resumeNav)}updateNav(e,t){return this.request(`UpdateMeshNavProperty`,e,t,R.updateNav)}updateSpeed(e,t){return this.request(`UpdateNavSpeed`,e,t,R.updateSpeed)}startNavByPath(e,t){return this.request(`StartNavByPath`,e,t,R.startNavByPath)}pauseNavPath(e,t){return this.request(`PauseNavPath`,e,t,R.pauseNavPath)}resumeNavPath(e,t){return this.request(`ResumeNavPath`,e,t,R.resumeNavPath)}stopNavPath(e,t){return this.request(`StopNavPath`,e,t,R.stopNavPath)}updateNavPath(e,t){return this.request(`UpdateNavPathProperty`,e,t,R.updateNavPath)}},At=class extends v{constructor(e,t){super(e,`PathPatrolService`,t)}add(e,t){return e.scale&&(e.scale.ePSGType=y.EPSGType.EPSGWorld),this.requestStream(`AddPath`,e,t,L.add)}update(e,t){return this.request(`UpdatePath`,e,t,L.update)}setTimeNode(e,t){return this.request(`CuriserTimeSet`,e,t,L.setTimeNode)}clear(e){return this.request(`ClearPath`,void 0,e,L.clear)}pause(e,t){return this.request(`Pause`,e,t,L.node)}resume(e,t){return this.request(`Resume`,e,t,L.node)}stop(e,t){return this.request(`Stop`,e,t,L.node)}};function jt(e){return Array.isArray(e)?{ids:e}:e}var Mt=class extends v{constructor(e,t){super(e,`PointIcon`,t)}show(e,t){return this.request(`Show`,jt(e),t,Ve.show)}hide(e,t){return this.request(`Hide`,jt(e),t,Ve.hide)}showByGroup(e,t){return this.request(`ShowByGroup`,jt(e),t,Ve.showByGroup)}hideByGroup(e,t){return this.request(`HideByGroup`,jt(e),t,Ve.hideByGroup)}showAll(e){return this.request(`ShowAll`,void 0,e,Ve.showAll)}hideAll(e){return this.request(`HideAll`,void 0,e,Ve.hideAll)}},Nt=class{static getUUID(e=11){let t=16,n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`.split(``),r=[],i;if(t||=n.length,e)for(i=0;i<e;i++)r[i]=n[0|Math.random()*t];else{let e;for(r[8]=r[13]=r[18]=r[23]=`-`,r[14]=`4`,i=0;i<36;i++)r[i]||(e=0|Math.random()*16,r[i]=n[i==19?e&3|8:e])}return`U`+r.join(``)}static warn(e,t=!1){console.log(`warn`,e,t);let n=document.createElement(`div`);return n.innerHTML=e,document.body.appendChild(n),n.setAttribute(`id`,`engineWarnTips`),n.style.cssText=`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@epicgames-ps/lib-pixelstreamingcommon-ue5.6"),l=require("zod"),u=require("axios");u=s(u,1);let d=require("@epicgames-ps/lib-pixelstreamingfrontend-ue5.6"),f=require("pako");var p=class extends Error{constructor(e,t,n){super(`Invalid payload for ${e}.${t}: ${n.map(e=>`${e.field}: ${e.reason}`).join(`; `)}`),this.moduleName=e,this.methodName=t,this.issues=n,this.name=`SDKValidationError`,this.code=`VALIDATION_ERROR`}toJSON(){return{name:this.name,code:this.code,message:this.message,module:this.moduleName,method:this.methodName,issues:this.issues}}};function ee(e,t,n,r){let i=e.safeParse(t);if(i.success)return i.data;throw new p(n,r,i.error.issues.map(e=>({field:e.path.length>0?e.path.join(`.`):`<root>`,reason:e.message,code:e.code})))}function te(e){return e instanceof p?JSON.stringify(e.toJSON()):e instanceof Error?`${e.name}: ${e.message}`:String(e)}const ne={InitLogging(){},Debug(e){console.log(`[Debug] - ${e}`)},Info(e){console.log(`[Info] - ${e}`)},Warning(e){console.warn(`[Warning] - ${e}`)},Error(e){console.error(`[Error] - ${e}`)}},m={debug(){},info(){},warn(){},error(){}},re=[`silent`,`error`,`warn`,`info`,`debug`],h={silent:0,error:1,warn:2,info:3,debug:4};function g(e){switch(e){case`silent`:return c.LogLevel.Disabled;case`error`:return c.LogLevel.Error;case`warn`:return c.LogLevel.Warning;case`info`:return c.LogLevel.Info;default:return c.LogLevel.Debug}}function ie(e){c.Logger.InitLogging(g(e),!1)}function ae(e){return typeof e==`string`&&re.includes(e)}function oe(e){if(e===void 0)return`info`;if(ae(e))return e;let t=typeof e==`string`?e:JSON.stringify(e);throw Error(`Invalid logger level: ${t}. Expected one of: ${re.join(`, `)}.`)}function se(e){if(e===void 0)return``;try{let t=JSON.stringify(e);return t?` ${t}`:``}catch{return` ${String(e)}`}}function ce(){let e=Error().stack;return e?e.replace(/^Error(?::\s*)?\n?/,``):`No Stack Available for this browser`}var le=class{constructor(e,t,n,r,i,a){this.driver=e,this.prefix=t,this.level=n,this.moduleName=r,this.includeStack=i,this.reporter=a}formatMessage(e,t,n){let r=`${this.prefix} ${t}${se(n)}`.trim();return this.shouldIncludeStack(e)?`${r}\nStack: ${ce()}`:r}shouldLog(e){return h[this.level]>=h[e]}shouldIncludeStack(e){return h[this.includeStack]>=h[e]}debug(e,t){this.shouldLog(`debug`)&&this.driver.Debug(this.formatMessage(`debug`,e,t))}info(e,t){this.shouldLog(`info`)&&this.driver.Info(this.formatMessage(`info`,e,t))}warn(e,t){this.reportWarnOrError(`warn`,e,t),this.shouldLog(`warn`)&&this.driver.Warning(this.formatMessage(`warn`,e,t))}error(e,t){this.reportWarnOrError(`error`,e,t),this.shouldLog(`error`)&&this.driver.Error(this.formatMessage(`error`,e,t))}reportWarnOrError(e,t,n){this.reporter?.recordLogSignal({level:e,moduleName:this.moduleName,message:t,meta:n})}},ue=class{constructor(e,t=ne,n){this.level=oe(e),this.driver=t,this.includeStack=n?.includeStack??`warn`,this.driver.InitLogging(g(this.level),!1),this.reporter=n?.reporter??n?.qosMonitor}setReporter(e){this.reporter=e}child(e){return new le(this.driver,`[DTCEngine:${e}]`,this.level,e,this.includeStack,this.reporter)}};const _={EngineIniting:`云渲染引擎初始化中...`,ServiceUrlInValid:`调度中心地址不正确,请检查中心地址!`,SerriceError:`调度中心连接失败,尝试重连中...`,SerriceUnAvaible:`没有服务资源,请检查服务是否启动!`,SerriceLoadingForWaiting:`服务资源启动中,请稍候!`,EngineWaiting:`云渲染服务坐席已满,当前排队人数:1人....`,EngineTockenChecking:`云引擎授权文件验证中...`,EngineTokenCheckFail:`云引擎授权许可无效,请联系管理员!`,EngineConnectioning:`云渲染引擎连接中...`,EngineConnectionSuccess:`云渲染引擎连接成功...`,EngineClose:`云渲染引擎连接断开,请检查服务状态!`,SourcePreparing:`资源准备中...`,TokenInValid:`许可未激活!`,TokenExpired:`许可授权已过期,实时渲染服务已停止!`,TokenWillExpired:`您的授权许可将于 YYYY-MM-DD 到期,请尽快续期!`};var de=class{constructor(e){this.options=e,this.logger=e.logger??m}show(e,t,n=!0){if(console.log(`loading show`,e,t,n),this.options.emit({message:e,key:t,isFinish:!n}),!this.options.enabled)return;let r=this.getRoot();r&&(this.progressDiv||=this.createTipDiv(r,`engineProgressTips`),this.progressDiv.textContent=e,n||(this.clearAutoCloseTimer(),this.autoCloseTimer=setTimeout(()=>{this.removeProgressBar()},2e3)))}showTokenWillExpire(e,t=`TokenWillExpired`,n=!0){let r=this.formatTokenWillExpireMessage(e);if(this.options.emit({message:r,key:t,isFinish:!n}),!this.options.enabled)return;let i=this.getRoot();i&&(this.tokenWillExpireDiv||(this.tokenWillExpireDiv=this.createTipDiv(i,`TokenWillExpireTips`),this.tokenWillExpireDiv.style.top=`60px`),this.tokenWillExpireDiv.textContent=r)}dispose(){this.clearAutoCloseTimer(),this.removeProgressBar(),this.removeTokenWillExpireBar()}getRoot(){if(this.options.hostElement?.ownerDocument?.body)return this.options.hostElement.ownerDocument.body;if(typeof document<`u`&&document.body)return document.body;this.logger.debug(`skip loading progress ui render: document is unavailable`)}createTipDiv(e,t){let n=e.ownerDocument.createElement(`div`);return n.id=t,n.style.position=`fixed`,n.style.left=`50%`,n.style.top=`16px`,n.style.transform=`translateX(-50%)`,n.style.zIndex=`99999`,n.style.padding=`8px 14px`,n.style.borderRadius=`6px`,n.style.background=`rgba(0, 0, 0, 0.72)`,n.style.color=`#fff`,n.style.fontSize=`14px`,n.style.lineHeight=`1.4`,n.style.pointerEvents=`none`,n.style.maxWidth=`80vw`,n.style.textAlign=`center`,e.appendChild(n),n}removeProgressBar(){this.progressDiv&&=(this.progressDiv.remove(),void 0)}removeTokenWillExpireBar(){this.tokenWillExpireDiv&&=(this.tokenWillExpireDiv.remove(),void 0)}clearAutoCloseTimer(){this.autoCloseTimer&&=(clearTimeout(this.autoCloseTimer),void 0)}formatTokenWillExpireMessage(e){let t=e.trim();return t?t.includes(`到期`)?t:`您的授权许可将于 ${t}到期,请尽快续期!`:_.TokenWillExpired}};const fe=`sdk3-agent-bridge/v1`;function pe(e){if(typeof WebSocket>`u`)throw Error(`WebSocket is not available in current runtime.`);return new WebSocket(e)}function me(e){return{ok:!0,data:e,ts:Date.now()}}function he(e,t){return{ok:!1,error:{code:`PROTOCOL_ERROR`,message:e,details:t},ts:Date.now()}}function ge(e){if(typeof e==`string`)try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return;let n=t;return n.protocolVersion!==`sdk3-agent-bridge/v1`||typeof n.type!=`string`||typeof n.callId!=`string`?void 0:n}catch{return}}var _e=class{constructor(e,t,n={}){this.runtime=e,this.options=t,this.reconnectAttempt=0,this.running=!1,this.startedAt=0,this.beforeUnloadHandler=()=>{this.stop(`pagehide`)},this.socketFactory=n.socketFactory??pe}start(){this.socket||(this.running=!0,this.openSocket(),typeof window<`u`&&(window.addEventListener(`beforeunload`,this.beforeUnloadHandler),window.addEventListener(`pagehide`,this.beforeUnloadHandler)))}stop(e=`stop`){this.running=!1,this.clearReconnect(),typeof window<`u`&&(window.removeEventListener(`beforeunload`,this.beforeUnloadHandler),window.removeEventListener(`pagehide`,this.beforeUnloadHandler)),this.clearHeartbeat(),this.runtime.dispose?.();let t=this.socket;t&&(t.readyState===1&&this.sendUnregister(e),this.clearSocketHandlers(t),t.close(1e3,e),this.socket=void 0)}openSocket(){this.startedAt=Date.now();let e=this.socketFactory(this.options.serverUrl??`ws://127.0.0.1:8787/sdk3-bridge`);this.socket=e,e.onopen=()=>{this.reconnectAttempt=0,this.sendRegister(),this.startHeartbeat()},e.onmessage=e=>{this.handleMessage(e.data)},e.onclose=()=>{this.clearSocketHandlers(e),this.clearHeartbeat(),this.runtime.closeAllStreams?.(`Agent bridge WebSocket disconnected`),this.runtime.cancelAllPrograms?.(`Agent bridge WebSocket disconnected`),this.socket===e&&(this.socket=void 0),this.scheduleReconnect()},e.onerror=()=>{this.clearHeartbeat()}}scheduleReconnect(){if(!this.running||this.reconnectTimer!==void 0||this.options.reconnect===!1)return;let e=this.getReconnectDelay();this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=void 0,!(!this.running||this.socket)&&this.openSocket()},e),this.reconnectAttempt+=1}getReconnectDelay(){let e=typeof this.options.reconnect==`object`?this.options.reconnect:void 0,t=Math.max(0,e?.initialDelayMs??1e3),n=Math.max(t,e?.maxDelayMs??15e3),r=Math.max(0,e?.jitterMs??500);return Math.min(n,t*2**this.reconnectAttempt)+Math.floor(Math.random()*(r+1))}clearReconnect(){this.reconnectTimer!==void 0&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=void 0)}sendRegister(){let e={...this.runtime.getSnapshot(),heartbeatIntervalMs:this.getHeartbeatInterval(),capabilities:{catalog:!0,schema:!0,validateActions:!0,invoke:!0,stream:!0,businessPrograms:!0,businessProgramProtocolVersion:1}};this.send({type:`register`,protocolVersion:fe,bridgeId:e.bridgeId,ts:Date.now(),payload:e})}sendUnregister(e){let t={...this.runtime.getSnapshot(),reason:e};this.send({type:`unregister`,protocolVersion:fe,bridgeId:t.bridgeId,ts:Date.now(),payload:t})}sendHeartbeat(){let e={...this.runtime.getSnapshot(),heartbeatIntervalMs:this.getHeartbeatInterval(),uptimeMs:Math.max(0,Date.now()-this.startedAt)};this.send({type:`heartbeat`,protocolVersion:fe,bridgeId:e.bridgeId,ts:Date.now(),payload:e})}getHeartbeatInterval(){return Math.max(1e3,this.options.heartbeatIntervalMs??5e3)}startHeartbeat(){this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.sendHeartbeat()},this.getHeartbeatInterval())}clearHeartbeat(){this.heartbeatTimer!==void 0&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0)}async handleMessage(e){let t=ge(e);if(t){if(t.type===`catalog`){let e=t.payload,n=e.kind===`modules`?me(this.runtime.listModules()):this.runtime.listMethods(e.moduleName??``);this.sendResult(t,`catalog`,n);return}if(t.type===`schema`){let e=t.payload;this.sendResult(t,`schema`,this.runtime.getMethodSchema(e.moduleName,e.methodName));return}if(t.type===`validate-actions`){this.sendResult(t,`validate-actions`,this.runtime.validateActions(t.payload));return}if(t.type===`invoke`){this.sendResult(t,`invoke`,await this.runtime.invoke(t.payload));return}if(t.type===`stream-start`){let e=t.payload,n=await this.runtime.startStream(e,e=>{this.sendStreamEvent(e)});this.sendResult(t,`stream-start`,n);return}if(t.type===`stream-close`){this.sendResult(t,`stream-close`,await this.runtime.closeStream(t.payload));return}if(t.type===`load-program`){this.sendResult(t,`load-program`,await this.runtime.loadProgram(t.payload));return}if(t.type===`start-program`){this.sendResult(t,`start-program`,await this.runtime.startProgram(t.payload,e=>{this.sendProgramEvent(e)}));return}if(t.type===`cancel-program`){this.sendResult(t,`cancel-program`,await this.runtime.cancelProgram(t.payload));return}this.sendResult(t,`catalog`,he(`Unsupported message type "${t.type}".`))}}sendStreamEvent(e){this.send({type:`stream-event`,protocolVersion:fe,bridgeId:this.runtime.getSnapshot().bridgeId,ts:Date.now(),payload:e})}sendProgramEvent(e){this.send({type:`program-event`,protocolVersion:fe,bridgeId:this.runtime.getSnapshot().bridgeId,traceId:e.traceId,ts:Date.now(),payload:e})}sendResult(e,t,n){let r={requestType:t,result:n,traceId:e.traceId};this.send({type:`result`,protocolVersion:fe,bridgeId:this.runtime.getSnapshot().bridgeId,callId:e.callId,traceId:e.traceId,ts:Date.now(),payload:r})}send(e){!this.socket||this.socket.readyState!==1||this.socket.send(JSON.stringify(e))}clearSocketHandlers(e){e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null}};function ve(e,t){return t&&e.then(e=>{t(e)}).catch(e=>{t(e)}),e}var v=class{constructor(e,t,n){this.bridge=e,this.moduleName=t,this.logger=n?.logger??m}request(e,t,n,r){return ve(Promise.resolve().then(()=>{let n=r?ee(r,t,this.moduleName,e):t;return r||this.logger.debug(`validation schema not configured`,{method:e}),this.logger.debug(`sending request`,{method:e}),this.bridge.sendRequest(this.moduleName,e,n)}).then(t=>(this.logger.info(`request success`,{method:e,code:t.code}),t)).catch(t=>{throw this.logger.warn(`request failed`,{method:e,error:te(t)}),t}),n)}requestStream(e,t,n,r){try{if(!this.bridge.sendStreamRequest)throw Error(`Current bridge does not support stream request`);let i=r?ee(r,t,this.moduleName,e):t;return r||this.logger.debug(`validation schema not configured`,{method:e}),this.logger.debug(`sending stream request`,{method:e}),this.bridge.sendStreamRequest(this.moduleName,e,i,n)}catch(t){let r=t instanceof Error?t:Error(String(t));if(this.logger.warn(`stream request failed before send`,{method:e,error:te(r)}),n)try{n({type:`error`,requestId:``,error:r})}catch(t){this.logger.warn(`stream error callback failed`,{method:e,error:te(t)})}let i=Promise.reject(r);return Object.defineProperty(i,"requestId",{value:``,enumerable:!0}),i.cancel=()=>{},i}}},ye=class e{constructor(e=0,t=0){this.x=e,this.y=t}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}clone(){return new e(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t==null?(this.x+=e.x,this.y+=e.y,this):this.addVectors(e,t)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t==null?(this.x-=e.x,this.y-=e.y,this):this.subVectors(e,t)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}angle(){let e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}equals(e){return e.x==this.x&&e.y==this.y}toString(){return JSON.stringify(this)}};function be(e,t){let n=e*20037508.34/180,r=Math.log(Math.tan((90+t)*Math.PI/360))/(Math.PI/180);return r=r*20037508.34/180,{x:n,y:r}}function xe(e,t){let n=e/20037508.34*180,r=t/20037508.34*180;return r=180/Math.PI*(2*Math.atan(Math.exp(r*Math.PI/180))-Math.PI/2),{x:n,y:r}}const y={EPSGType:{EPSG84:`4326`,EPSGWeb:`3857`,EPSGWorld:`0000`}};var b=class e{constructor(e=0,t=0,n=0,r=y.EPSGType.EPSG84){typeof e!=`number`&&(e=this.parseFloatDeal(e)),typeof t!=`number`&&(t=this.parseFloatDeal(t)),typeof n!=`number`&&(n=this.parseFloatDeal(n)),e!=e&&(e=0),t!=t&&(t=0),n!=n&&(n=0),this.x=e,this.y=t,this.z=n,this.ePSGType=r}parseFloatDeal(e){try{return parseFloat(e)}catch(e){return console.log(e),0}}set(e,t,n){return typeof e!=`number`&&(e=0),typeof t!=`number`&&(t=0),typeof n!=`number`&&(n=0),e!=e&&(e=0),t!=t&&(t=0),n!=n&&(n=0),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}clone(){return new e(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t==null?(this.x+=e.x,this.y+=e.y,this.z+=e.z,this):this.addVectors(e,t)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t==null?(this.x-=e.x,this.y-=e.y,this.z-=e.z,this):this.subVectors(e,t)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t==null?(this.x*=e.x,this.y*=e.y,this.z*=e.z,this):this.multiplyVectors(e,t)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(t,n){let r=new e,i=new e;return r.set(t,t,t),i.set(n,n,n),this.clamp(r,i)}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)}cross(e,t){return t==null?this.crossVectors(this,e):this.crossVectors(e,t)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}equals(e){return e.x==this.x&&e.y==this.y&&e.z==this.z}toString(){return JSON.stringify(this)}changeEPSGType(e){if(this.ePSGType!=e){if(e==y.EPSGType.EPSG84){let e=xe(this.x,this.y);this.x=e.x,this.y=e.y}else if(e==y.EPSGType.EPSGWeb){let e=be(this.x,this.y);this.x=e.x,this.y=e.y}else console.log(`暂不支持[${this.ePSGType}]转换为${e}`);return this.ePSGType=e,this}}};const x={Off:0,Auto:1,DLAA:2,UltraQuality:3,Quality:4,Balanced:5,Performance:6,UltraPerformance:7},S={Auto:`auto`,Low:`low`,High:`high`,Super:`super`,Blue:`blue`},Se=[{label:`自动`,type:S.Auto,value:12e6},{label:`标清`,type:S.Low,value:4e6},{label:`高清`,type:S.High,value:8e6},{label:`超清`,type:S.Super,value:12e6},{label:`蓝光`,type:S.Blue,value:24e6}],Ce={[S.Auto]:12e6,[S.Low]:4e6,[S.High]:8e6,[S.Super]:12e6,[S.Blue]:24e6};let we=function(e){return e.VP8=`VP8`,e.VP9=`VP9`,e.AV1=`AV1`,e.H264=`H264`,e}({}),Te=function(e){return e.Model=`MODEL`,e.POI=`POI`,e}({});const Ee={Spring:0,Summer:1,Autumn:2,Winter:3};let De=function(e){return e[e.Linear=0]=`Linear`,e[e.EaseInQuad=1]=`EaseInQuad`,e[e.EaseOutQuad=2]=`EaseOutQuad`,e[e.EaseInOutQuad=3]=`EaseInOutQuad`,e[e.EaseOutInQuad=4]=`EaseOutInQuad`,e[e.EaseInCubic=5]=`EaseInCubic`,e[e.EaseOutCubic=6]=`EaseOutCubic`,e[e.EaseInOutCubic=7]=`EaseInOutCubic`,e[e.EaseOutInCubic=8]=`EaseOutInCubic`,e[e.EaseInQuart=9]=`EaseInQuart`,e[e.EaseOutQuart=10]=`EaseOutQuart`,e[e.EaseInOutQuart=11]=`EaseInOutQuart`,e[e.EaseOutInQuart=12]=`EaseOutInQuart`,e[e.EaseInQuint=13]=`EaseInQuint`,e[e.EaseOutQuint=14]=`EaseOutQuint`,e[e.EaseInOutQuint=15]=`EaseInOutQuint`,e[e.EaseOutInQuint=16]=`EaseOutInQuint`,e[e.EaseInSine=17]=`EaseInSine`,e[e.EaseOutSine=18]=`EaseOutSine`,e[e.EaseInOutSine=19]=`EaseInOutSine`,e[e.EaseOutInSine=20]=`EaseOutInSine`,e[e.EaseInExpo=21]=`EaseInExpo`,e[e.EaseOutExpo=22]=`EaseOutExpo`,e[e.EaseInOutExpo=23]=`EaseInOutExpo`,e[e.EaseOutInExpo=24]=`EaseOutInExpo`,e[e.EaseInCirc=25]=`EaseInCirc`,e[e.EaseOutCirc=26]=`EaseOutCirc`,e[e.EaseInOutCirc=27]=`EaseInOutCirc`,e[e.EaseOutInCirc=28]=`EaseOutInCirc`,e[e.EaseInElastic=29]=`EaseInElastic`,e[e.EaseOutElastic=30]=`EaseOutElastic`,e[e.EaseInOutElastic=31]=`EaseInOutElastic`,e[e.EaseOutInElastic=32]=`EaseOutInElastic`,e[e.EaseInBack=33]=`EaseInBack`,e[e.EaseOutBack=34]=`EaseOutBack`,e[e.EaseInOutBack=35]=`EaseInOutBack`,e[e.EaseOutInBack=36]=`EaseOutInBack`,e[e.EaseInBounce=37]=`EaseInBounce`,e[e.EaseOutBounce=38]=`EaseOutBounce`,e[e.EaseInOutBounce=39]=`EaseInOutBounce`,e[e.EaseOutInBounce=40]=`EaseOutInBounce`,e}({}),Oe=function(e){return e[e.Loose=0]=`Loose`,e[e.Strict=1]=`Strict`,e}({}),ke=function(e){return e.StopAtTheEnd=`StopAtTheEnd`,e.Loop=`Loop`,e.BackAndForward=`BackAndForward`,e}({});const C=l.z.string().min(1),w=C.optional(),T=l.z.number().finite(),E=T.optional(),D=l.z.instanceof(b),Ae=l.z.object({x:T,y:T,z:T,ePSGType:C}),je=l.z.union([l.z.instanceof(ye),l.z.object({x:T,y:T})]),O=l.z.union([D,Ae]),Me=D.optional(),Ne=O.optional(),Pe=l.z.union([l.z.literal(Ee.Spring).describe(`春季`),l.z.literal(Ee.Summer).describe(`夏季`),l.z.literal(Ee.Autumn).describe(`秋季`),l.z.literal(Ee.Winter).describe(`冬季`)]).describe(`场景季节`),Fe=l.z.union([l.z.literal(x.Off).describe(`关闭 DLSS`),l.z.literal(x.Auto).describe(`自动质量档位`),l.z.literal(x.DLAA).describe(`DLAA 2倍效果`),l.z.literal(x.UltraQuality).describe(`超高质量`),l.z.literal(x.Quality).describe(`高质量`),l.z.literal(x.Balanced).describe(`平衡`),l.z.literal(x.Performance).describe(`性能`),l.z.literal(x.UltraPerformance).describe(`超高性能`)]).describe(`DLSS 质量档位`),Ie=l.z.union([l.z.literal(S.Auto).describe(`自动`),l.z.literal(S.Low).describe(`标清`),l.z.literal(S.High).describe(`高清`),l.z.literal(S.Super).describe(`超清`),l.z.literal(S.Blue).describe(`蓝光`)]).describe(`渲染码率档位`),Le=l.z.union([l.z.literal(`VP8`).describe(`VP8`),l.z.literal(`VP9`).describe(`VP9`),l.z.literal(`AV1`).describe(`AV1`),l.z.literal(`H264`).describe(`H264`)]).describe(`视频解码器类别`),Re=l.z.union([l.z.literal(`MODEL`).describe(`模型图层`),l.z.literal(`POI`).describe(`POI 图层`)]).describe(`图层类别`),ze=l.z.union([C,l.z.array(C).min(1)]),k=l.z.undefined().optional(),Be=l.z.object({ids:l.z.array(C).min(1)}),Ve={show:Be,hide:Be,showByGroup:Be,hideByGroup:Be,showAll:k,hideAll:k},He=l.z.object({parentId:l.z.string().optional(),id:w}),Ue=e=>e.refine(e=>!!(e.id||e.timelineId),{message:`id or timelineId is required`}),We={connect:k,disconnect:k,reconnect:k,KickOtherConnect:k,KeepConnect:k,GetEngineServiceStatus:k},A={lookAt:l.z.object({parentId:l.z.string().optional(),id:ze,offSet:Ne,positionOffSetDistance:E,offSetX:E,distance:E,time:E,isRotate:l.z.boolean().optional(),isHighlight:l.z.boolean().optional(),showBack:l.z.boolean().optional()}),lookAtArray:l.z.object({parentId:w,ids:l.z.array(C).min(1),offSet:Ne,offSetX:E,distance:E,time:E,isRotate:l.z.boolean().optional(),isHighlight:l.z.boolean().optional()}),flyToTarget:l.z.object({point:Ne,target:Ne,fov:l.z.number().finite().min(10).max(150).optional(),time:E}),flyByPath:l.z.object({points:l.z.union([l.z.array(D),l.z.string()]).optional(),lookAts:l.z.union([l.z.array(D),l.z.string()]).optional(),nodes:l.z.string().optional(),time:E,smoothMode:l.z.union([l.z.literal(0),l.z.literal(1)]).optional()}),setFlySpeed:l.z.object({speed:T}),endFly:k,pauseFly:k,resumeFly:k,getCameraInfo:k,setCameraPositionAndRotation:l.z.object({point:D,rotation:D}),setCameraFov:l.z.object({fov:T}),startCameraObjFollow:l.z.object({parentId:l.z.string().optional(),id:C,offSet:O,smooth:T.optional().default(.85).refine(e=>e>=0&&e<=1,{message:`smooth must be in [0, 1]`,path:[`smooth`]})}),endCameraObjFollow:k,resetCameraFov:k,reset:k},Ge={getAllSceneName:k,switchSceneByName:l.z.object({sceneName:C}),getCurrentSceneName:k,listenMapCompass:l.z.object({enable:l.z.boolean()}),setFeatureToggle:l.z.object({key:C,enabled:l.z.boolean()}),getSceneMeta:k},Ke={setVisible:l.z.object({parentId:l.z.string().optional().default(``),id:ze,visible:l.z.boolean().optional()}),setVisibleResolved:l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1),visible:l.z.boolean()}),setVisibleByTags:l.z.object({tags:ze,visible:l.z.boolean()}),setVisibleByAttibute:l.z.object({attributes:l.z.record(l.z.string(),l.z.any()),filterMode:l.z.nativeEnum(Oe).optional().default(0),visible:l.z.boolean().optional().default(!0),otherVisible:l.z.boolean().optional().default(!1)}),add:l.z.object({parentId:l.z.string().optional().default(``),id:C,assetsPath:w,position:Me,angle:Me,scale:Me,description:l.z.string().optional()}),remove:l.z.object({parentId:l.z.string().optional().default(``),ids:l.z.array(C).min(1)}),getElementTree:l.z.object({parentId:l.z.string().optional().default(``),id:C}),getModelInfo:l.z.object({parentId:l.z.string().optional().default(``),id:C}),getModelBoundsInfo:l.z.object({parentId:l.z.string().optional().default(``),id:ze}),getModelBoundsInfoResolved:l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1)})},j=l.z.object({parentId:l.z.string().optional(),id:C}),qe=l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1)}),Je=j.extend({rotate:D}),M={startMoveByNodes:j.extend({nodes:l.z.array(O).min(1),speed:T.optional().default(1),linear:T.optional().default(1),isLookAtTarget:l.z.boolean().optional().default(!1),needDirection:l.z.boolean().optional().default(!0)}),pauseMove:j,resumeMove:j,endMove:j,restoreMove:qe,rotate:Je,endRotate:j,continuedRotate:Je,rotateByTarget:j.extend({parentTargetId:w,targetID:C,point:D,axisX:T.optional().default(0),axisY:T.optional().default(0),axisZ:T.optional().default(0),angle:T.optional().default(0),isPersistence:l.z.boolean().optional().default(!1)}),restoreRotate:qe,setScale:j.extend({scale:D,duration:T.optional().default(.5)}),endScale:j,restoreScale:qe},Ye={enable:l.z.object({enable:l.z.boolean()}),setHighLightModel:l.z.object({parentId:l.z.string().optional().default(``),ids:l.z.array(C).min(1),showBack:l.z.boolean()}),removeHighLightModel:l.z.object({parentId:l.z.string().optional(),ids:l.z.array(C).min(1)}),clear:l.z.object({})},Xe=l.z.object({parentId:w,id:w}),Ze=e=>e.refine(e=>!!(e.id||e.parentId),{message:`id or parentId is required`}),N={addLayer:Ze(Xe.extend({layerName:l.z.string().optional(),show:l.z.boolean().optional(),poiEnabled:l.z.boolean().optional(),type:Re.optional(),description:l.z.string().optional()})),addLayerResolved:l.z.object({parentId:l.z.string().optional(),id:C,layerName:l.z.string().optional(),show:l.z.boolean().optional().default(!0),poiEnabled:l.z.boolean().optional().default(!0),description:l.z.string().optional().default(``),isSystem:l.z.boolean().optional().default(!1),poiOffsetY:l.z.number().optional().default(0)}),layerSelector:Ze(Xe),removeLayer:Ze(Xe),isLayerOrGroupExit:Ze(Xe),layerSelectorResolved:l.z.object({parentId:l.z.string().optional().default(``),id:C}),switchModelLayer:l.z.object({parentId:C,ids:l.z.array(C).min(1),toParentId:C}),showUIPop:l.z.object({parentId:l.z.string().optional(),id:C,visible:l.z.boolean().optional().default(!0),assetsPath:l.z.string().optional().default(``),offSet:O,scale:O}),addModel:l.z.object({parentId:C,id:C,assetsPath:w,position:O,name:l.z.string().optional().default(``),rotation:O,scale:O,description:l.z.string().optional(),isSystem:l.z.boolean().optional(),tags:l.z.array(l.z.string()).optional(),extraProps:l.z.any().optional()}),addPOI:l.z.object({parentId:l.z.string().optional(),id:C,assetsPath:C,position:O,targetParentId:l.z.string().optional(),targetId:l.z.string().optional(),rotation:O,scale:O,offSet:O,description:l.z.string().optional(),isSystem:l.z.boolean().optional(),text:l.z.string(),fontSize:l.z.number().optional(),tags:l.z.array(l.z.string()).optional(),extraProps:l.z.any().optional()}),removeModel:l.z.object({parentId:C,ids:l.z.array(C).min(1)}),getLayerChildElement:l.z.object({parentId:l.z.string().optional().default(``),id:C})},P={closeCameraFog:k,getWeatherTypes:k,resetWeather:k,resetWeatherAndTime:k,openCameraFog:l.z.object({fogIntensity:E,fogStartColor:l.z.string().optional(),fogEndColor:l.z.string().optional(),fogStartDistance:E,fogEndDistance:E,directionalIntensity:E,directionalFallOff:E,directionalColor:l.z.string().optional()}).refine(e=>e.fogIntensity===void 0||e.fogIntensity>=0&&e.fogIntensity<=1,{message:`fogIntensity must be between 0 and 1`,path:[`fogIntensity`]}),setSceneTime:l.z.object({hour:T,timeDuration:E}).refine(e=>e.hour>=0&&e.hour<24,{message:`hour must be in [0, 24)`,path:[`hour`]}),changeWeatherType:l.z.object({type:T,timeDuration:E}),setAnimateTimeOfDay:l.z.object({isAnimate:l.z.boolean(),dayLength:E,nightLength:E}),changeSeason:l.z.object({season:Pe,duration:E.describe(`切换过渡时长,单位秒`)}),resetSeason:l.z.object({}),setTimeSync:l.z.object({syncSystemTime:l.z.boolean()}),resetSceneTime:l.z.object({}),setDayAndNight:l.z.object({dayType:C})},F={add:l.z.object({groupName:C,poiInfos:l.z.array(l.z.record(l.z.unknown())).min(1)}),deleteById:l.z.object({groupName:C,id:C}),deleteByGroup:l.z.object({groupName:C}),update:l.z.object({groupName:C,poiInfos:l.z.array(l.z.record(l.z.unknown())).min(1)}),updatePopStates:l.z.object({groupName:C,popStates:l.z.array(l.z.record(l.z.unknown())).min(1)}),enableOverlap:l.z.object({enable:l.z.boolean()}),showDistance:l.z.object({distance:T})},I={add:l.z.object({id:C,groupName:C,assetPath:C,targetParentId:w,targetId:w,visible:l.z.boolean().optional()}),deleteById:l.z.object({groupName:C,ids:l.z.array(C).min(1)}),deleteByGroup:l.z.object({groupName:C}),getPOIInfo:l.z.object({groupName:C,id:C}),update:l.z.object({id:C,groupName:C,assetPath:w,targetParentId:w,targetId:w,visible:l.z.boolean().optional()}),setVisibleByGroup:l.z.object({groupName:C,visible:l.z.boolean()})},Qe=l.z.array(l.z.object({groupName:C,id:C,parentId:l.z.string().optional().default(``),position:Me})),$e={addPop:Qe,removePop:Qe,removeAll:Qe,show:Qe,showAll:Qe,setPopDelayFrame:l.z.object({time:T}),setPopShowDistance:l.z.object({distance:T})},et={startLoopAnimation:l.z.object({parentId:w,id:C,stateName:C,loopStartTime:E,loopEndTime:E,speed:E}).refine(e=>e.loopStartTime===void 0||e.loopStartTime>=0&&(e.loopEndTime===void 0||e.loopEndTime>e.loopStartTime),{message:`loopStartTime must be >= 0 and loopEndTime must be greater than loopStartTime`,path:[`loopStartTime`]}),stopLoopAnimation:l.z.object({parentId:w,id:C}),playAnimator:l.z.object({parentId:w,id:C,stateName:C,speed:E,startTime:E,endTime:E,isStop:l.z.boolean().optional()}),setAnimatorSpeed:l.z.object({parentId:w,id:C,speed:T}),getAnimationLength:l.z.object({parentId:w,id:C,stateName:C}),stopAnimator:l.z.object({parentId:w,id:C})},tt={play:Ue(He.extend({initialTime:E,speed:E,keepLastFrame:l.z.boolean().optional()}).refine(e=>e.speed===void 0||e.speed<0||e.speed>=.1,{message:`speed must be negative or >= 0.1`,path:[`speed`]})),pause:Ue(He),resume:Ue(He),stop:Ue(He.extend({resetTime:E,isCameraToStart:l.z.boolean().optional()})),stopAll:l.z.object({}).optional(),setSpeed:Ue(He.extend({speed:T}).refine(e=>e.speed<0||e.speed>=.1,{message:`speed must be negative or >= 0.1`,path:[`speed`]}))},nt={setSceneRenderBitrate:l.z.object({bitrate:Ie.optional()}),setSceneRenderBitrateResolved:l.z.object({bitrate:T}).refine(e=>e.bitrate>=1e6,{message:`bitrate must be >= 1000000`,path:[`bitrate`]}),setSceneFPS:l.z.object({fps:T}).refine(e=>e.fps>=1&&e.fps<=300,{message:`fps must be in [1, 300]`,path:[`fps`]}),setVideoDecode:l.z.object({decode:Le}),setScreenResolution:l.z.object({width:T,height:T}).refine(e=>e.width>0&&e.height>0,{message:`width and height must be > 0`,path:[`width`]})},rt={setDlssEnable:l.z.object({enable:l.z.boolean(),quality:Fe}),setDlss:l.z.object({enable:l.z.boolean(),quality:Fe}),setDlssQuality:l.z.object({quality:Fe})},it=l.z.object({node:O,time:l.z.string()}),at=l.z.object({parentId:l.z.string().optional().default(``),id:C}),L={add:l.z.object({parentId:l.z.string().optional().default(``),id:C,assetPath:l.z.string().optional().default(``),scale:O,showPath:l.z.boolean().optional().default(!0),passedColor:l.z.string().optional().default(`#ffffff`),lineColor:l.z.string().optional().default(`#00ff00`),lineWidth:T,duration:E,nodes:l.z.array(O).optional(),timeNodes:l.z.array(it).optional(),lineLayer:w,afterRender:l.z.boolean().optional().default(!1),isAutoClear:l.z.boolean().optional().default(!0)}),update:l.z.object({parentId:l.z.string().optional().default(``),id:C,lineColor:l.z.string().optional(),lineWidth:E,passedColor:l.z.string().optional(),speed:E}).refine(e=>e.speed===void 0||e.speed>=0,{message:`speed must be >= 0`,path:[`speed`]}),setTimeNode:l.z.object({parentId:l.z.string().optional().default(``),id:C,timeStart:l.z.string().optional(),startNodeIndex:l.z.string().optional()}).refine(e=>e.timeStart!==void 0||e.startNodeIndex!==void 0,{message:`timeStart or startNodeIndex is required`,path:[`timeStart`]}).refine(e=>e.startNodeIndex===void 0||parseInt(e.startNodeIndex)>=0,{message:`startNodeIndex must be >= 0`,path:[`startNodeIndex`]}),node:at,pause:at,resume:at,stop:at,clear:l.z.object({}).optional()},ot=l.z.object({position:O,value:T.min(0).max(999).optional().default(1)}),st={create:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string().optional(),textureSize:je.optional().default({x:256,y:256}),mapSize:je.optional().default({x:1e3,y:1e3}),influenceSize:l.z.number().int().positive().optional().default(13),points:l.z.union([l.z.array(ot).min(1),l.z.array(O).min(1)]),opacity:l.z.number().min(0).max(1).optional().default(.7),heightScale:l.z.number().positive().optional().default(3.5),lerpScale:l.z.number().positive().optional().default(2.5),isAddAsset:l.z.boolean().optional().default(!1)}),remove:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string().optional()}),clear:k,setConfig:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string().optional(),opacity:l.z.number().min(0).max(1).optional().default(.7),heightScale:l.z.number().positive().optional().default(3.5),lerpScale:l.z.number().positive().optional().default(2.5),influenceSize:l.z.number().int().positive().optional().default(13)})},ct={updateWebView:l.z.object({parentId:l.z.string().optional().default(``),id:C,url:C})},lt=l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string()}),ut=e=>e.refine(e=>{let t=e;return t.nodes!==void 0||t.targetIds!==void 0||t.targetCodes!==void 0},{message:`nodes or targetIds or targetCodes is required`,path:[`nodes`,`targetIds`,`targetCodes`]}),dt=l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string(),nodes:l.z.array(O).optional(),targetIds:l.z.array(C).optional(),targetCodes:l.z.array(C).optional(),speed:l.z.number().positive().optional().default(2),isCache:l.z.boolean().optional().default(!0),planColor:l.z.string().optional(),passColor:l.z.string().optional(),lineWidth:l.z.number().positive().optional().default(3),isAutoPlay:l.z.boolean().optional().default(!0),assetPath:l.z.string().optional(),isAutoClear:l.z.boolean().optional().default(!0),offSetZ:l.z.number().optional().default(.5),scale:D.default(new b(1,1,1))}),R={startNav:ut(dt),getMeshNavDistance:ut(dt.extend({isCache:l.z.boolean().optional().default(!1),isAutoPlay:l.z.boolean().optional().default(!1)})),pauseNav:lt,resumeNav:lt,stopNav:lt,updateNav:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string(),speed:l.z.number().finite().optional().default(-1),planColor:l.z.string().optional(),passColor:l.z.string().optional()}),updateSpeed:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.string(),speed:l.z.number().finite().optional().default(-1),planColor:l.z.string().optional(),passColor:l.z.string().optional()}),startNavByPath:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.array(C).min(1),nodes:l.z.array(O).min(1),isCache:l.z.boolean().optional().default(!0),duration:l.z.number().positive().optional().default(10),planColor:l.z.string().optional(),passColor:l.z.string().optional()}),pauseNavPath:lt,resumeNavPath:lt,stopNavPath:lt,updateNavPath:l.z.object({parentId:l.z.string().optional().default(``),id:l.z.array(C).min(1),duration:l.z.number().finite().optional().default(-1),planColor:l.z.string().optional(),passColor:l.z.string().optional()})},ft=l.z.array(C).min(1).describe(`查询的图层组编号集合`),pt={layerQueryByModel:l.z.object({parentId:l.z.string().optional(),id:l.z.string().optional(),queryRadius:l.z.number().positive().optional().default(50),queryMinHeight:l.z.number().optional().default(0),queryMaxHeight:l.z.number().optional().default(20),queryParentIds:ft}),layerQueryByPosition:l.z.object({queryPosition:O.optional(),queryRadius:l.z.number().positive().optional().default(50),queryMinHeight:l.z.number().optional().default(0),queryMaxHeight:l.z.number().optional().default(20),queryParentIds:ft}),layerQueryByModelBox:l.z.object({parentId:l.z.string().optional(),id:l.z.string().optional(),queryParentIds:ft})},mt={startTrain:l.z.object({parentId:w,id:C,trainCode:l.z.string().optional(),startStationName:l.z.string().optional(),endStationName:l.z.string().optional(),direction:l.z.string().optional(),action:l.z.string().optional(),stopTime:E,moveType:l.z.nativeEnum(ke).optional()}),setTrainBehavior:l.z.object({parentId:w,id:C,moveType:l.z.nativeEnum(ke).optional()}),setCameraFollowTrain:l.z.object({parentId:w,id:C,offSet:Ne}),setTrainVolume:l.z.object({parentId:w,id:C,volume:l.z.number().finite().min(0).max(1).optional()}),cancelCameraFollowTrain:k},ht={},gt={Connect:We,Camera:A,Scene:Ge,Layer:N,Model:Ke,ModelTransform:M,HighlighterEffect:Ye,UIPOI:F,ModelPOI:I,Popup:$e,Animation:et,TimeLine:tt,Screen:nt,Dlss:rt,WeatherSystem:P,PathPatrol:L,pointIcon:Ve,HeatMap:st,WebView:ct,Navigation:R,SpatialQuery:pt,TrainSimulate:mt};var _t=class extends v{constructor(e,t){super(e,`Animation`,t)}startLoopAnimation(e,t){let n={...e,speed:e.speed??1};return this.request(`startLoopAnimation`,n,t,et.startLoopAnimation)}stopLoopAnimation(e,t){return this.request(`stopLoopAnimation`,e,t,et.stopLoopAnimation)}playAnimator(e,t){let n={...e,speed:e.speed??1,startTime:e.startTime??0,endTime:e.endTime??1,isStop:e.isStop??!1};return this.request(`playAnimator`,n,t,et.playAnimator)}setAnimatorSpeed(e,t){return this.request(`setAnimatorSpeed`,e,t,et.setAnimatorSpeed)}getAnimationLength(e,t){return this.request(`getAnimationLength`,e,t,et.getAnimationLength)}stopAnimator(e,t){return this.request(`stopAnimator`,e,t,et.stopAnimator)}},vt=class extends v{constructor(e,t){super(e,`CameraService`,t)}lookAt(e,t){let n={...e,time:e.time??1.5,distance:e.distance??20,isRotate:e.isRotate??!0,isHighlight:e.isHighlight??!0,offSet:e.offSet??new b(50,150,100)};if(n.offSet&&(n.offSet.ePSGType=`0000`),Array.isArray(n.id)){let e={parentId:n.parentId,ids:n.id,offSet:n.offSet,offSetX:n.offSetX,distance:n.distance,time:n.time,isRotate:n.isRotate,isHighlight:n.isHighlight};return this.request(`LookAtArray`,e,t,A.lookAtArray)}return this.request(`LookAt`,n,t,A.lookAt)}flyToTarget(e,t){let n={...e,time:e.time??2};return this.request(`FlyToTarget`,n,t,A.flyToTarget)}flyByPath(e,t){let n=Array.isArray(e.points)?JSON.stringify(e.points):e.points,r=Array.isArray(e.lookAts)?JSON.stringify(e.lookAts):e.lookAts,i={...e,points:n,lookAts:r,nodes:JSON.stringify(e.points),time:e.time??4,smoothMode:e.smoothMode??0};return this.request(`flyByPath`,i,t,A.flyByPath)}setFlySpeed(e,t){return this.request(`setFlySpeed`,e,t,A.setFlySpeed)}endFly(e){return this.request(`endFly`,void 0,e,k)}pauseFly(e){return this.request(`pauseFly`,void 0,e,k)}resumeFly(e){return this.request(`resumeFly`,void 0,e,k)}getCameraInfo(e){return this.request(`GetCameraInfo`,void 0,e,k)}setCameraPositionAndRotation(e,t){return e.rotation&&(e.rotation.ePSGType=`0000`),this.request(`setCameraPositionAndRotation`,e,t,A.setCameraPositionAndRotation)}setCameraFov(e,t){return this.request(`setCameraFov`,e,t,A.setCameraFov)}resetCameraFov(e){return this.request(`resetCameraFov`,void 0,e,k)}reset(e){return this.request(`reset`,void 0,e,k)}startCameraObjFollow(e,t){e.offSet&&(e.offSet.ePSGType=`0000`);let n={...e,offSet:e.offSet??new b(-30,0,10,`0000`)};return this.request(`StartCameraObjFollow`,n,t,A.startCameraObjFollow)}endCameraObjFollow(e){return this.request(`EndCameraObjFollow`,void 0,e,k)}},yt=class extends v{constructor(e,t,n){super(e,`Connect`,n),this.connectionLifecycle=t}connect(e){return ve(Promise.resolve().then(()=>(this.logger.warn(`connect called as compatibility API; SDK auto-connects after DTCEngine init`),this.connectionLifecycle.connect().then(()=>({requestId:``,success:!0,code:`CONNECT_OK`,message:`Connect requested (compatibility path)`,ts:Date.now()})))),e)}disconnect(e){return ve(Promise.resolve().then(()=>(this.logger.info(`disconnect requested`),Promise.resolve(this.connectionLifecycle.disconnect()).then(()=>({requestId:``,success:!0,code:`DISCONNECT_OK`,message:`Disconnected`,ts:Date.now()})))),e)}reconnect(e){return ve(Promise.resolve().then(()=>(this.logger.info(`reconnect requested`),this.connectionLifecycle.reconnect().then(()=>({requestId:``,success:!0,code:`RECONNECT_OK`,message:`Reconnect requested`,ts:Date.now()})))),e)}KickOtherConnect(e){return this.request(`KickOtherConnect`,void 0,e,k)}KeepConnect(e){return this.request(`KeepConnect`,void 0,e,k)}GetEngineServiceStatus(e){return this.request(`GetEngineServiceStatus`,void 0,e,k)}},bt=class extends v{constructor(e,t){super(e,`DLSSService`,t)}setDlss(e={},t){let n={enable:e.enable??!1,quality:e.quality??x.Balanced};return this.request(`SetDlss`,n,t,rt.setDlss)}},xt=class extends v{constructor(e,t){super(e,`HeatMapService`,t)}create(e,t){let n={...e,opacity:e.opacity??.7,heightScale:e.heightScale??3.5,lerpScale:e.lerpScale??2.5,influenceSize:e.influenceSize??13,points:e.points.map(e=>`position`in e?e:{position:e,value:1})};return n.heightScale*=100,this.request(`CreateHeatMap`,n,t,st.create)}remove(e,t){return this.request(`RemoveHeatMap`,e,t,st.remove)}clear(e){return this.request(`ClearHeatMap`,void 0,e,st.clear)}setConfig(e,t){let n={...e,opacity:e.opacity??.7,heightScale:e.heightScale??3.5,lerpScale:e.lerpScale??2.5,influenceSize:e.influenceSize??13};return n.heightScale*=100,this.request(`SetHeatMapConfig`,n,t,st.setConfig)}},St=class extends v{constructor(e,t){super(e,`HighLighterService`,t)}enable(e,t){return this.request(`HighlightEnable`,e,t,Ye.enable)}setHighLightModel(e,t){return this.request(`AddHighLighterModel`,e,t,Ye.setHighLightModel)}removeHighLightModel(e,t){return this.request(`RemoveHighLightModel`,e,t,Ye.removeHighLightModel)}clear(e){return this.request(`Clear`,{},e,Ye.clear)}},Ct=class e{constructor(e=0,t=0,n=0,r=0,i=y.EPSGType.EPSG84){this.x=e,this.y=t,this.z=n,this.v=r,this.EPSGType=i}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.v=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}clone(){return new e(this.x,this.y,this.z,this.v)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.v=e.v,this}add(e,t){return t==null?(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.v+=e.v,this):this.addVectors(e,t)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.v+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.v=e.v+t.v,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.v+=e.v*t,this}sub(e,t){return t==null?(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.v-=e.v,this):this.subVectors(e,t)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.v-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.v=e.v-t.v,this}multiply(e,t){return t==null?(this.x*=e.x,this.y*=e.y,this.z*=e.z,this.v*=e.v,this):this.multiplyVectors(e,t)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.v*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this.v=e.v*t.v,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.v/=e.v,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.v=Math.min(this.v,e.v),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.v=Math.max(this.v,e.v),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.v=Math.max(e.v,Math.min(t.v,this.v)),this}clampScalar(t,n){let r=new e,i=new e;return r.set(t,t,t,t),i.set(n,n,n,n),this.clamp(r,i)}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.v=Math.floor(this.v),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.v=Math.ceil(this.v),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.v=Math.round(this.v),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.v=this.v<0?Math.ceil(this.v):Math.floor(this.v),this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.v*e.v}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.v*this.v}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.v*this.v)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.v)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.v+=(e.v-this.v)*t,this}lerpVectors(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)}cross(e,t){return t==null?this.crossVectors(this,e):this.crossVectors(e,t)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z,i=this.v-e.v;return t*t+n*n+r*r+i*i}equals(e){return e.x==this.x&&e.y==this.y&&e.z==this.z&&e.v==this.v}toString(){return JSON.stringify(this)}changeEPSGType(e){if(this.EPSGType!=e){if(e==y.EPSGType.EPSG84){let e=xe(this.x,this.y);this.x=e.x,this.y=e.y}else if(e==y.EPSGType.EPSGWeb){let e=be(this.x,this.y);this.x=e.x,this.y=e.y}else console.log(`暂不支持[${this.EPSGType}]转换为${e}`);return this.EPSGType=e,this}}},wt=class{constructor(){this.Vector2=ye,this.Vector3=b,this.Vector4=Ct}},Tt=class extends v{constructor(e,t){super(e,`LayerService`,t)}addLayer(e,t){let n={...e,show:e.show??!0,poiEnabled:e.poiEnabled??!0,isSystem:e.isSystem??!1,poiOffsetY:e.poiOffsetY??0};return this.request(`AddLayer`,n,t,N.addLayerResolved)}removeLayer(e,t){let n={...e};return this.request(`RemoveLayer`,n,t,N.layerSelectorResolved)}isLayerOrGroupExit(e,t){let n={...e};return this.request(`IsLayerOrGroupExit`,n,t,N.layerSelectorResolved)}switchModelLayer(e,t){return this.request(`SwitchLayer`,e,t,N.switchModelLayer)}showUIPop(e,t){let n={...e,id:e.id.trim(),visible:e.visible??!0,assetsPath:e.assetsPath??`/Game/Resources/POIS/BluePrints/BP_Camera.uasset`,scale:e.scale??new b(1,1,1),offSet:e.offSet??new b(0,0,0)};return n.scale&&(n.scale.ePSGType=`0000`),n.offSet&&(n.offSet.ePSGType=`0000`),console.log(n),this.request(`ShowLayerUIPop`,n,t,N.showUIPop)}addModel(e,t){let n={...e,id:e.id.trim(),name:e.name?.trim()||``,scale:e.scale??new b(1,1,1),rotation:e.rotation??new b(0,0,0)};return n.extraProps&&=JSON.stringify(n.extraProps),n.scale&&(n.scale.ePSGType=`0000`),n.rotation&&(n.rotation.ePSGType=`0000`),this.request(`AddModel`,n,t,N.addModel)}addPOI(e,t){let n={...e,id:e.id.trim(),scale:e.scale??new b(1,1,1),rotation:e.rotation??new b(0,0,0),fontSize:e.fontSize??16,isSystem:e.isSystem??!1,text:e.text??``,targetParentId:e.targetParentId??``,targetId:e.targetId??``,offSet:e.offSet??new b(0,0,0)};return n.extraProps=n.extraProps?JSON.stringify(n.extraProps):`{}`,n.scale&&(n.scale.ePSGType=`0000`),n.rotation&&(n.rotation.ePSGType=`0000`),n.offSet&&(n.offSet.ePSGType=`0000`),this.request(`AddPOI`,n,t,N.addPOI)}removeModel(e,t){return this.request(`RemoveModelByIds`,e,t,N.removeModel)}getLayerChildElement(e,t){return this.request(`GetLayerChildElements`,e,t,N.getLayerChildElement)}},Et=class extends v{constructor(e,t){super(e,`ModelService`,t)}toIdArray(e){return Array.isArray(e)?e:[e]}setVisible(e,t){let n={parentId:e.parentId,ids:this.toIdArray(e.id),visible:e.visible??!0};return this.request(`SetVisible`,n,t,Ke.setVisibleResolved)}setVisibleByTags(e,t){let n={tags:this.toIdArray(e.tags),visible:e.visible??!0};return this.request(`SetVisibleByTags`,n,t,Ke.setVisibleByTags)}setVisibleByAttibute(e,t){let n={attributes:e.attributes,filterMode:e.filterMode??0,visible:e.visible??!0,otherVisible:e.otherVisible??!1};return this.request(`SetVisibleByAttribute`,n,t,Ke.setVisibleByAttibute)}getElementTree(e,t){return this.request(`GetElementTree`,e,t,Ke.getElementTree)}getModelInfo(e,t){return this.request(`GetModelInfo`,e,t,Ke.getModelInfo)}},Dt=class extends v{constructor(e,t){super(e,`ModelPOI`,t)}add(e,t){let n={...e,visible:e.visible??!0};return this.request(`add`,n,t,I.add)}deleteById(e,t){return this.request(`deleteById`,e,t,I.deleteById)}deleteByGroup(e,t){return this.request(`deleteByGroup`,e,t,I.deleteByGroup)}getPOIInfo(e,t){return this.request(`getPOIInfo`,e,t,I.getPOIInfo)}update(e,t){let n={...e,visible:e.visible??!0};return this.request(`update`,n,t,I.update)}setVisibleByGroup(e,t){return this.request(`setVisibleByGroup`,e,t,I.setVisibleByGroup)}},Ot=class extends v{constructor(e,t){super(e,`ModelTransformService`,t)}startMoveByNodes(e,t){return this.request(`StartMoveByNodes`,e,t,M.startMoveByNodes)}pauseMove(e,t){return this.request(`PauseMove`,e,t,M.pauseMove)}resumeMove(e,t){return this.request(`ResumeMove`,e,t,M.resumeMove)}endMove(e,t){return this.request(`EndMove`,e,t,M.endMove)}restoreMove(e,t){return this.request(`RestoreMove`,e,t,M.restoreMove)}rotate(e,t){return e.rotate.ePSGType=y.EPSGType.EPSGWorld,this.request(`StartRotate`,e,t,M.rotate)}endRotate(e,t){return this.request(`EndRotate`,e,t,M.endRotate)}continuedRotate(e,t){return e.rotate.ePSGType=y.EPSGType.EPSGWorld,this.request(`ContinuedRotate`,e,t,M.continuedRotate)}rotateByTarget(e,t){return this.request(`RotateByTarget`,e,t,M.rotateByTarget)}restoreRotate(e,t){return this.request(`RestoreRotate`,e,t,M.restoreRotate)}setScale(e,t){e.scale.ePSGType=y.EPSGType.EPSGWorld;let n={...e,id:e.id.trim()};return n.scale&&(n.scale.ePSGType=`0000`),this.request(`SetScale`,n,t,M.setScale)}endScale(e,t){return this.request(`EndScale`,e,t,M.endScale)}restoreScale(e,t){return this.request(`RestoreScale`,e,t,M.restoreScale)}},kt=class extends v{constructor(e,t){super(e,`NavigationService`,t)}startNav(e,t){let n={...e,scale:e.scale??new b(1,1,1)};return n.scale&&(n.scale.ePSGType=`0000`),this.request(`PlayMeshNavByNodes`,n,t,R.startNav)}getMeshNavDistance(e,t){return this.request(`PlayMeshNavByNodes`,e,t,R.getMeshNavDistance)}pauseNav(e,t){return this.request(`PauseMeshNav`,e,t,R.pauseNav)}resumeNav(e,t){return this.request(`ResumeMeshNav`,e,t,R.resumeNav)}stopNav(e,t){return this.request(`StopMeshNav`,e,t,R.resumeNav)}updateNav(e,t){return this.request(`UpdateMeshNavProperty`,e,t,R.updateNav)}updateSpeed(e,t){return this.request(`UpdateNavSpeed`,e,t,R.updateSpeed)}startNavByPath(e,t){return this.request(`StartNavByPath`,e,t,R.startNavByPath)}pauseNavPath(e,t){return this.request(`PauseNavPath`,e,t,R.pauseNavPath)}resumeNavPath(e,t){return this.request(`ResumeNavPath`,e,t,R.resumeNavPath)}stopNavPath(e,t){return this.request(`StopNavPath`,e,t,R.stopNavPath)}updateNavPath(e,t){return this.request(`UpdateNavPathProperty`,e,t,R.updateNavPath)}},At=class extends v{constructor(e,t){super(e,`PathPatrolService`,t)}add(e,t){return e.scale&&(e.scale.ePSGType=y.EPSGType.EPSGWorld),this.requestStream(`AddPath`,e,t,L.add)}update(e,t){return this.request(`UpdatePath`,e,t,L.update)}setTimeNode(e,t){return this.request(`CuriserTimeSet`,e,t,L.setTimeNode)}clear(e){return this.request(`ClearPath`,void 0,e,L.clear)}pause(e,t){return this.request(`Pause`,e,t,L.node)}resume(e,t){return this.request(`Resume`,e,t,L.node)}stop(e,t){return this.request(`Stop`,e,t,L.node)}};function jt(e){return Array.isArray(e)?{ids:e}:e}var Mt=class extends v{constructor(e,t){super(e,`PointIcon`,t)}show(e,t){return this.request(`Show`,jt(e),t,Ve.show)}hide(e,t){return this.request(`Hide`,jt(e),t,Ve.hide)}showByGroup(e,t){return this.request(`ShowByGroup`,jt(e),t,Ve.showByGroup)}hideByGroup(e,t){return this.request(`HideByGroup`,jt(e),t,Ve.hideByGroup)}showAll(e){return this.request(`ShowAll`,void 0,e,Ve.showAll)}hideAll(e){return this.request(`HideAll`,void 0,e,Ve.hideAll)}},Nt=class{static getUUID(e=11){let t=16,n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`.split(``),r=[],i;if(t||=n.length,e)for(i=0;i<e;i++)r[i]=n[0|Math.random()*t];else{let e;for(r[8]=r[13]=r[18]=r[23]=`-`,r[14]=`4`,i=0;i<36;i++)r[i]||(e=0|Math.random()*16,r[i]=n[i==19?e&3|8:e])}return`U`+r.join(``)}static warn(e,t=!1){console.log(`warn`,e,t);let n=document.createElement(`div`);return n.innerHTML=e,document.body.appendChild(n),n.setAttribute(`id`,`engineWarnTips`),n.style.cssText=`
2
2
  pointer-events: none;
3
3
  padding: 10px 40px;
4
4
  letter-spacing: 1px;
@@ -4396,6 +4396,8 @@ declare class Navigation extends BaseApi {
4396
4396
  * @agentExample { parentId: 'Players', id: 'Player1', nodes: [{ x: 114.7985155712282, y: 34.842421780635625, z: 2 }, { x: 114.79789723105696, y: 34.84218433379876, z: 1.5 }], isCache: false, planColor: '#00ff00', passColor: '#e1e1e1' }
4397
4397
  * @example
4398
4398
  * ```ts
4399
+ *
4400
+ * 示例1:模型对象根据路过的节点进行导航
4399
4401
  dtcEngine.Navigation.startNav({
4400
4402
  parentId: 'Players',
4401
4403
  id: 'Player1',
@@ -4412,6 +4414,52 @@ declare class Navigation extends BaseApi {
4412
4414
  passColor: '#e1e1e1',
4413
4415
  offSetZ: 0.5,
4414
4416
  }, (result) => { console.log(result); });
4417
+ * 示例2:模型对象根据目标编码进行导航
4418
+ dtcEngine.Navigation.startNav({
4419
+ parentId: 'Players',
4420
+ id: 'Player1',
4421
+ targetCodes: ['1d370e56f4684f07963fed87e91e2164','070b49c4a6c24e0bae3aa8dcd4563556','d7d92d67093f47b881d11e3b59107d0f', 'd5eab05cbf8543aaacd218db300c61cd','a2e0eb51ee8f438088a48a392ffe02d3', '2459436d256847db9084e04e5ef9115c','5317033054e44835a14a6b7a9f5eed74'],
4422
+ isCache: false,
4423
+ planColor: '#00ff00',
4424
+ passColor: '#e1e1e1',
4425
+ offSetZ: 0.5,
4426
+ }, (result) => { console.log(result); });
4427
+
4428
+ ** 示例3:模型对象根据目标坐标进行导航
4429
+ dtcEngine.Navigation.startNav({
4430
+ parentId: 'patrolLayer',
4431
+ id: 'TestNav',
4432
+ targetIds: [
4433
+ "14b5770c062c47e1b359c09026221adc",
4434
+ "56ce729e6ab74858a830b85b638fbe32",
4435
+ "738f6f36bf704969955872c63fab0bd1",
4436
+ "534500c3a1c84defab8a9a3d0c0e60a0",
4437
+ "74b694f0216d4aaf9b059bba22228c21",
4438
+ "2a025d1b1d6641a2b2a2e76f82abbb8c",
4439
+ "bc60c0fd9e6247989e2fda0e57756188",
4440
+ "42dd7766abc94cce97cb36244c348937",
4441
+ "ad594980d6d54752baf63b2f26a29493",
4442
+ ],
4443
+ isCache: false,
4444
+ planColor: '#ff820b',
4445
+ passColor: '#e1e1e1',
4446
+ speed: 3,
4447
+ offSetZ: 0.5,
4448
+ isAutoClear: false,//是否自动清除,默认 `true`。
4449
+ scale: new dtcEngine.Type.Vector3(3, 3, 3),
4450
+ }, (result) => {
4451
+ console.log(result);
4452
+ let param = JSON.parse(result.param);
4453
+ if (param.status == 'start') {
4454
+ // dtcEngine.Camera.startCameraObjFollow({
4455
+ // parentId: "patrolLayer",
4456
+ // id: 'TestNav',
4457
+ // offSet: new dtcEngine.Type.Vector3(-10, 0, 3),
4458
+ // });
4459
+ } else if (param.status == 'finished') {
4460
+ dtcEngine.Camera.endCameraObjFollow();
4461
+ }
4462
+ });
4415
4463
  * ```
4416
4464
  */
4417
4465
  startNav(payload: NavigationMeshNavRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;
@@ -4396,6 +4396,8 @@ declare class Navigation extends BaseApi {
4396
4396
  * @agentExample { parentId: 'Players', id: 'Player1', nodes: [{ x: 114.7985155712282, y: 34.842421780635625, z: 2 }, { x: 114.79789723105696, y: 34.84218433379876, z: 1.5 }], isCache: false, planColor: '#00ff00', passColor: '#e1e1e1' }
4397
4397
  * @example
4398
4398
  * ```ts
4399
+ *
4400
+ * 示例1:模型对象根据路过的节点进行导航
4399
4401
  dtcEngine.Navigation.startNav({
4400
4402
  parentId: 'Players',
4401
4403
  id: 'Player1',
@@ -4412,6 +4414,52 @@ declare class Navigation extends BaseApi {
4412
4414
  passColor: '#e1e1e1',
4413
4415
  offSetZ: 0.5,
4414
4416
  }, (result) => { console.log(result); });
4417
+ * 示例2:模型对象根据目标编码进行导航
4418
+ dtcEngine.Navigation.startNav({
4419
+ parentId: 'Players',
4420
+ id: 'Player1',
4421
+ targetCodes: ['1d370e56f4684f07963fed87e91e2164','070b49c4a6c24e0bae3aa8dcd4563556','d7d92d67093f47b881d11e3b59107d0f', 'd5eab05cbf8543aaacd218db300c61cd','a2e0eb51ee8f438088a48a392ffe02d3', '2459436d256847db9084e04e5ef9115c','5317033054e44835a14a6b7a9f5eed74'],
4422
+ isCache: false,
4423
+ planColor: '#00ff00',
4424
+ passColor: '#e1e1e1',
4425
+ offSetZ: 0.5,
4426
+ }, (result) => { console.log(result); });
4427
+
4428
+ ** 示例3:模型对象根据目标坐标进行导航
4429
+ dtcEngine.Navigation.startNav({
4430
+ parentId: 'patrolLayer',
4431
+ id: 'TestNav',
4432
+ targetIds: [
4433
+ "14b5770c062c47e1b359c09026221adc",
4434
+ "56ce729e6ab74858a830b85b638fbe32",
4435
+ "738f6f36bf704969955872c63fab0bd1",
4436
+ "534500c3a1c84defab8a9a3d0c0e60a0",
4437
+ "74b694f0216d4aaf9b059bba22228c21",
4438
+ "2a025d1b1d6641a2b2a2e76f82abbb8c",
4439
+ "bc60c0fd9e6247989e2fda0e57756188",
4440
+ "42dd7766abc94cce97cb36244c348937",
4441
+ "ad594980d6d54752baf63b2f26a29493",
4442
+ ],
4443
+ isCache: false,
4444
+ planColor: '#ff820b',
4445
+ passColor: '#e1e1e1',
4446
+ speed: 3,
4447
+ offSetZ: 0.5,
4448
+ isAutoClear: false,//是否自动清除,默认 `true`。
4449
+ scale: new dtcEngine.Type.Vector3(3, 3, 3),
4450
+ }, (result) => {
4451
+ console.log(result);
4452
+ let param = JSON.parse(result.param);
4453
+ if (param.status == 'start') {
4454
+ // dtcEngine.Camera.startCameraObjFollow({
4455
+ // parentId: "patrolLayer",
4456
+ // id: 'TestNav',
4457
+ // offSet: new dtcEngine.Type.Vector3(-10, 0, 3),
4458
+ // });
4459
+ } else if (param.status == 'finished') {
4460
+ dtcEngine.Camera.endCameraObjFollow();
4461
+ }
4462
+ });
4415
4463
  * ```
4416
4464
  */
4417
4465
  startNav(payload: NavigationMeshNavRequest, callback?: ApiCallback<ApiResponseEnvelope<unknown>>): Promise<ApiResponseEnvelope<unknown>>;