/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import{a as t,v as e,f as n,p as r,r as i,g as s,l as o,b as a,m as u,e as c,c as h,i as f,j as l}from"./p-DfdVaPrt.js";import{v,p as d}from"./p-Cnqnt1lk.js";import{m,c as p,b as w}from"./p-BuOEMGyM.js";import{E as g}from"./p-BAhfr1Nx.js";const b=m.defineMapper((t=>{switch(t){case"perspective":return v.protobuf.stream.CameraType.CAMERA_TYPE_PERSPECTIVE;case"orthographic":return v.protobuf.stream.CameraType.CAMERA_TYPE_ORTHOGRAPHIC;default:return v.protobuf.stream.CameraType.CAMERA_TYPE_INVALID}}),(t=>t));function y(){return m.ifInvalidThrow(b)}const M=m.defineMapper(m.read(m.requiredProp("r"),m.requiredProp("g"),m.requiredProp("b"),m.requiredProp("a")),(([t,e,n,r])=>p.create(t,e,n,r)));const x=m.defineMapper(m.read(m.requiredProp("msb"),m.requiredProp("lsb")),(([t,e])=>w.fromMsbLsb(t,e)));const N=m.defineMapper(m.read(m.requiredProp("seconds"),m.requiredProp("nanos")),(([t,e])=>d({seconds:t,nanos:e})));const I=m.defineMapper(m.read(m.requiredProp("iso")),(([t])=>new Date(t)));
/**
 * @license
 * Copyright 2009 The Closure Library Authors
 * Copyright 2020 Daniel Wirtz / The long.js Authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
 */var S=null;try{S=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function B(t,e,n){this.low=t|0;this.high=e|0;this.unsigned=!!n}Object.defineProperty(B.prototype,"__isLong__",{value:true});function C(t){return(t&&t["__isLong__"])===true}function A(t){var e=Math.clz32(t&-t);return t?31-e:e}B.isLong=C;var V={};var j={};function D(t,e){var n,r,i;if(e){t>>>=0;if(i=0<=t&&t<256){r=j[t];if(r)return r}n=k(t,0,true);if(i)j[t]=n;return n}else{t|=0;if(i=-128<=t&&t<128){r=V[t];if(r)return r}n=k(t,t<0?-1:0,false);if(i)V[t]=n;return n}}B.fromInt=D;function P(t,e){if(isNaN(t))return e?G:L;if(e){if(t<0)return G;if(t>=q)return J}else{if(t<=-F)return Q;if(t+1>=F)return K}if(t<0)return P(-t,e).neg();return k(t%z|0,t/z|0,e)}B.fromNumber=P;function k(t,e,n){return new B(t,e,n)}B.fromBits=k;var T=Math.pow;function E(t,e,n){if(t.length===0)throw Error("empty string");if(typeof e==="number"){n=e;e=false}else{e=!!e}if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e?G:L;n=n||10;if(n<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");else if(r===0){return E(t.substring(1),e,n).neg()}var i=P(T(n,8));var s=L;for(var o=0;o<t.length;o+=8){var a=Math.min(8,t.length-o),u=parseInt(t.substring(o,o+a),n);if(a<8){var c=P(T(n,a));s=s.mul(c).add(P(u))}else{s=s.mul(i);s=s.add(P(u))}}s.unsigned=e;return s}B.fromString=E;function O(t,e){if(typeof t==="number")return P(t,e);if(typeof t==="string")return E(t,e);return k(t.low,t.high,typeof e==="boolean"?e:t.unsigned)}B.fromValue=O;var R=1<<16;var W=1<<24;var z=R*R;var q=z*z;var F=q/2;var H=D(W);var L=D(0);B.ZERO=L;var G=D(0,true);B.UZERO=G;var U=D(1);B.ONE=U;var _=D(1,true);B.UONE=_;var Y=D(-1);B.NEG_ONE=Y;var K=k(4294967295|0,2147483647|0,false);B.MAX_VALUE=K;var J=k(4294967295|0,4294967295|0,true);B.MAX_UNSIGNED_VALUE=J;var Q=k(0,2147483648|0,false);B.MIN_VALUE=Q;var $=B.prototype;$.toInt=function t(){return this.unsigned?this.low>>>0:this.low};$.toNumber=function t(){if(this.unsigned)return(this.high>>>0)*z+(this.low>>>0);return this.high*z+(this.low>>>0)};$.toString=function t(e){e=e||10;if(e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Q)){var n=P(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e)}var s=P(T(e,6),this.unsigned),o=this;var a="";while(true){var u=o.div(s),c=o.sub(u.mul(s)).toInt()>>>0,h=c.toString(e);o=u;if(o.isZero())return h+a;else{while(h.length<6)h="0"+h;a=""+h+a}}};$.getHighBits=function t(){return this.high};$.getHighBitsUnsigned=function t(){return this.high>>>0};$.getLowBits=function t(){return this.low};$.getLowBitsUnsigned=function t(){return this.low>>>0};$.getNumBitsAbs=function t(){if(this.isNegative())return this.eq(Q)?64:this.neg().getNumBitsAbs();var e=this.high!=0?this.high:this.low;for(var n=31;n>0;n--)if((e&1<<n)!=0)break;return this.high!=0?n+33:n+1};$.isSafeInteger=function t(){var e=this.high>>21;if(!e)return true;if(this.unsigned)return false;return e===-1&&!(this.low===0&&this.high===-2097152)};$.isZero=function t(){return this.high===0&&this.low===0};$.eqz=$.isZero;$.isNegative=function t(){return!this.unsigned&&this.high<0};$.isPositive=function t(){return this.unsigned||this.high>=0};$.isOdd=function t(){return(this.low&1)===1};$.isEven=function t(){return(this.low&1)===0};$.equals=function t(e){if(!C(e))e=O(e);if(this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1)return false;return this.high===e.high&&this.low===e.low};$.eq=$.equals;$.notEquals=function t(e){return!this.eq(e)};$.neq=$.notEquals;$.ne=$.notEquals;$.lessThan=function t(e){return this.comp(e)<0};$.lt=$.lessThan;$.lessThanOrEqual=function t(e){return this.comp(e)<=0};$.lte=$.lessThanOrEqual;$.le=$.lessThanOrEqual;$.greaterThan=function t(e){return this.comp(e)>0};$.gt=$.greaterThan;$.greaterThanOrEqual=function t(e){return this.comp(e)>=0};$.gte=$.greaterThanOrEqual;$.ge=$.greaterThanOrEqual;$.compare=function t(e){if(!C(e))e=O(e);if(this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();if(n&&!r)return-1;if(!n&&r)return 1;if(!this.unsigned)return this.sub(e).isNegative()?-1:1;return e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1};$.comp=$.compare;$.negate=function t(){if(!this.unsigned&&this.eq(Q))return Q;return this.not().add(U)};$.neg=$.negate;$.add=function t(e){if(!C(e))e=O(e);var n=this.high>>>16;var r=this.high&65535;var i=this.low>>>16;var s=this.low&65535;var o=e.high>>>16;var a=e.high&65535;var u=e.low>>>16;var c=e.low&65535;var h=0,f=0,l=0,v=0;v+=s+c;l+=v>>>16;v&=65535;l+=i+u;f+=l>>>16;l&=65535;f+=r+a;h+=f>>>16;f&=65535;h+=n+o;h&=65535;return k(l<<16|v,h<<16|f,this.unsigned)};$.subtract=function t(e){if(!C(e))e=O(e);return this.add(e.neg())};$.sub=$.subtract;$.multiply=function t(e){if(this.isZero())return this;if(!C(e))e=O(e);if(S){var n=S["mul"](this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}if(e.isZero())return this.unsigned?G:L;if(this.eq(Q))return e.isOdd()?Q:L;if(e.eq(Q))return this.isOdd()?Q:L;if(this.isNegative()){if(e.isNegative())return this.neg().mul(e.neg());else return this.neg().mul(e).neg()}else if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(H)&&e.lt(H))return P(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16;var i=this.high&65535;var s=this.low>>>16;var o=this.low&65535;var a=e.high>>>16;var u=e.high&65535;var c=e.low>>>16;var h=e.low&65535;var f=0,l=0,v=0,d=0;d+=o*h;v+=d>>>16;d&=65535;v+=s*h;l+=v>>>16;v&=65535;v+=o*c;l+=v>>>16;v&=65535;l+=i*h;f+=l>>>16;l&=65535;l+=s*c;f+=l>>>16;l&=65535;l+=o*u;f+=l>>>16;l&=65535;f+=r*h+i*c+s*u+o*a;f&=65535;return k(v<<16|d,f<<16|l,this.unsigned)};$.mul=$.multiply;$.divide=function t(e){if(!C(e))e=O(e);if(e.isZero())throw Error("division by zero");if(S){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1){return this}var n=(this.unsigned?S["div_u"]:S["div_s"])(this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?G:L;var r,i,s;if(!this.unsigned){if(this.eq(Q)){if(e.eq(U)||e.eq(Y))return Q;else if(e.eq(Q))return U;else{var o=this.shr(1);r=o.div(e).shl(1);if(r.eq(L)){return e.isNegative()?U:Y}else{i=this.sub(e.mul(r));s=r.add(i.div(e));return s}}}else if(e.eq(Q))return this.unsigned?G:L;if(this.isNegative()){if(e.isNegative())return this.neg().div(e.neg());return this.neg().div(e).neg()}else if(e.isNegative())return this.div(e.neg()).neg();s=L}else{if(!e.unsigned)e=e.toUnsigned();if(e.gt(this))return G;if(e.gt(this.shru(1)))return _;s=G}i=this;while(i.gte(e)){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:T(2,a-48),c=P(r),h=c.mul(e);while(h.isNegative()||h.gt(i)){r-=u;c=P(r,this.unsigned);h=c.mul(e)}if(c.isZero())c=U;s=s.add(c);i=i.sub(h)}return s};$.div=$.divide;$.modulo=function t(e){if(!C(e))e=O(e);if(S){var n=(this.unsigned?S["rem_u"]:S["rem_s"])(this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}return this.sub(this.div(e).mul(e))};$.mod=$.modulo;$.rem=$.modulo;$.not=function t(){return k(~this.low,~this.high,this.unsigned)};$.countLeadingZeros=function t(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};$.clz=$.countLeadingZeros;$.countTrailingZeros=function t(){return this.low?A(this.low):A(this.high)+32};$.ctz=$.countTrailingZeros;$.and=function t(e){if(!C(e))e=O(e);return k(this.low&e.low,this.high&e.high,this.unsigned)};$.or=function t(e){if(!C(e))e=O(e);return k(this.low|e.low,this.high|e.high,this.unsigned)};$.xor=function t(e){if(!C(e))e=O(e);return k(this.low^e.low,this.high^e.high,this.unsigned)};$.shiftLeft=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return k(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned);else return k(0,this.low<<e-32,this.unsigned)};$.shl=$.shiftLeft;$.shiftRight=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return k(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned);else return k(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};$.shr=$.shiftRight;$.shiftRightUnsigned=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e<32)return k(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned);if(e===32)return k(this.high,0,this.unsigned);return k(this.high>>>e-32,0,this.unsigned)};$.shru=$.shiftRightUnsigned;$.shr_u=$.shiftRightUnsigned;$.rotateLeft=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return k(this.high,this.low,this.unsigned);if(e<32){n=32-e;return k(this.low<<e|this.high>>>n,this.high<<e|this.low>>>n,this.unsigned)}e-=32;n=32-e;return k(this.high<<e|this.low>>>n,this.low<<e|this.high>>>n,this.unsigned)};$.rotl=$.rotateLeft;$.rotateRight=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return k(this.high,this.low,this.unsigned);if(e<32){n=32-e;return k(this.high<<n|this.low>>>e,this.low<<n|this.high>>>e,this.unsigned)}e-=32;n=32-e;return k(this.low<<n|this.high>>>e,this.high<<n|this.low>>>e,this.unsigned)};$.rotr=$.rotateRight;$.toSigned=function t(){if(!this.unsigned)return this;return k(this.low,this.high,false)};$.toUnsigned=function t(){if(this.unsigned)return this;return k(this.low,this.high,true)};$.toBytes=function t(e){return e?this.toBytesLE():this.toBytesBE()};$.toBytesLE=function t(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};$.toBytesBE=function t(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};B.fromBytes=function t(e,n,r){return r?B.fromBytesLE(e,n):B.fromBytesBE(e,n)};B.fromBytesLE=function t(e,n){return new B(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};B.fromBytesBE=function t(e,n){return new B(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)};if(typeof BigInt==="function"){B.fromBigInt=function t(e,n){var r=Number(BigInt.asIntN(32,e));var i=Number(BigInt.asIntN(32,e>>BigInt(32)));return k(r,i,n)};B.fromValue=function t(e,n){if(typeof e==="bigint")return B.fromBigInt(e,n);return O(e,n)};$.toBigInt=function t(){var e=BigInt(this.low>>>0);var n=BigInt(this.unsigned?this.high>>>0:this.high);return n<<BigInt(32)|e}}const X=m.defineMapper(m.read(m.requiredProp("hex")),(([t])=>t));const Z=m.defineMapper(m.read(m.requiredProp("msb"),m.requiredProp("lsb")),(([t,e])=>{const n=BigInt(typeof t==="number"?t:t.toString());const r=BigInt(typeof e==="number"?e:e.toString());return w.fromMsbLsb(n,r)}));const tt=m.defineMapper(m.compose((t=>w.toMsbLsb(t)),m.read(m.mapProp("msb",B.fromString),m.mapProp("lsb",B.fromString))),(([t,e])=>({msb:t,lsb:e})));function et(t){"@babel/helpers - typeof";return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function nt(t){if(t===null||t===true||t===false){return NaN}var e=Number(t);if(isNaN(e)){return e}return e<0?Math.ceil(e):Math.floor(e)}function rt(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function it(t){rt(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||et(t)==="object"&&e==="[object Date]"){return new Date(t.getTime())}else if(typeof t==="number"||e==="[object Number]"){return new Date(t)}else{if((typeof t==="string"||e==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function st(t,e){rt(2,arguments);var n=it(t);var r=nt(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function ot(t,e){rt(2,arguments);var n=it(t);var r=nt(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}var i=n.getDate();var s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var o=s.getDate();if(i>=o){return s}else{n.setFullYear(s.getFullYear(),s.getMonth(),i);return n}}function at(t,e){rt(2,arguments);if(!e||et(e)!=="object")return new Date(NaN);var n=e.years?nt(e.years):0;var r=e.months?nt(e.months):0;var i=e.weeks?nt(e.weeks):0;var s=e.days?nt(e.days):0;var o=e.hours?nt(e.hours):0;var a=e.minutes?nt(e.minutes):0;var u=e.seconds?nt(e.seconds):0;var c=it(t);var h=r||n?ot(c,r+n*12):c;var f=s||i?st(h,s+i*7):h;var l=a+o*60;var v=u+l*60;var d=v*1e3;var m=new Date(f.getTime()+d);return m}function ut(t,e){rt(2,arguments);return it(t).getTime()-it(e).getTime()}function ct(t,e){rt(2,arguments);var n=it(t);var r=it(e);return n.getTime()>r.getTime()}function ht(t,e){rt(2,arguments);var n=nt(e);return st(t,-n)}function ft(t,e){rt(2,arguments);var n=nt(e);return ot(t,-n)}function lt(t,e){rt(2,arguments);if(!e||et(e)!=="object")return new Date(NaN);var n=e.years?nt(e.years):0;var r=e.months?nt(e.months):0;var i=e.weeks?nt(e.weeks):0;var s=e.days?nt(e.days):0;var o=e.hours?nt(e.hours):0;var a=e.minutes?nt(e.minutes):0;var u=e.seconds?nt(e.seconds):0;var c=ft(t,r+n*12);var h=ht(c,s+i*7);var f=a+o*60;var l=u+f*60;var v=l*1e3;var d=new Date(h.getTime()-v);return d}class vt{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=at(new Date,{seconds:e});return new vt(t,e,n)}hasExpired(){return ct(new Date,this.expiresAt)}remainingTimeInMs(t){return ut(lt(this.expiresAt,{seconds:t}),new Date)}}function dt(t){if(mt(t)){const n=e.isValid(t.lookAt);const r=e.isValid(t.position);const i=e.isValid(t.up);return n&&r&&i}else{const n=t;const r=e.isValid(n.viewVector);const i=e.isValid(n.lookAt);const s=e.isValid(n.up);const o=Number.isFinite(n.fovHeight);return r&&i&&s&&o}}function mt(t){return t.position!=null&&t.fovHeight==null}function pt(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function wt(t){if(pt(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function gt(r,i){var s;const o=e.subtract(r.lookAt,r.position);const a=n.create(i);const u=a.radius/e.magnitude(o);return{viewVector:e.scale(u,o),up:r.up,lookAt:r.lookAt,fovHeight:2*e.magnitude(o)*Math.tan(t.toRadians(((s=r.fovY)!==null&&s!==void 0?s:45)/2))}}function bt(n,r=45){const i=n.fovHeight/(2*Math.tan(t.toRadians(r/2)));const s=e.magnitude(n.viewVector);const o=i/s;return{position:e.add(n.lookAt,e.negate(e.scale(o,n.viewVector))),up:n.up,lookAt:n.lookAt,fovY:r}}function yt(t){if(pt(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(mt(t)){return{perspective:{position:{...t.position},lookAt:{...t.lookAt},up:{...t.up},fovY:t.fovY?{value:t.fovY}:null},position:{...t.position},lookAt:{...t.lookAt},up:{...t.up}}}else{return{...t}}}function Mt(t,e){return pt(e)?Nt(t):xt(t,e)}function xt(t,r){const i=n.create(t);const s=i.epsilon*100;const o=e.dot(e.subtract(i.center,r.position),e.normalize(e.subtract(r.lookAt,r.position)));const a=Math.max(i.radius,s);let u=a+o<s?a*3:a+o;let c=u-a*2<s?Math.min(s,u):u-a*2;if(u-c<s){c=Math.max(c,s);u+=c+s}else if(c/u<1e-4){c=u*1e-4}if(c>u-a*2){if(c>1e3+s){u-=c-1e3;c=1e3}}return{near:c,far:u}}function Nt(t,e){const r=n.create(t);const i=r.epsilon*100;const s=Math.max(r.radius,i);return{near:-s,far:s}}function It(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var St=Object.freeze({__proto__:null,create:It});function Bt(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function Ct(t,e){return At(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function At(t){return t.visibleSummary==null}class Vt{constructor(t,e,n){this.camera=t;this.imageAttr=e;this.pixels=n}static fromPng(t,e,n){if(t.data instanceof Uint16Array){return new Vt(e,n,t.data)}else{throw new Error("Expected depth PNG to have depth of 16-bit")}}getDepthAtPoint(t,e){const{near:n,far:r}=this.camera;const i=this.camera.isPerspective();const s=this.getNormalizedDepthAtPoint(t,e);if(i){return s*(r-n)+n}else{return s*(r-n)}}getMaxDepthOfGeometry(){const{near:t,far:e}=this.camera;const n=this.camera.isPerspective();if(n){return e}else{return e-t}}getNormalizedDepthAtPoint(t,e){const{width:n,height:i}=this.imageAttr.imageRect;const s=r.subtract(t,this.imageAttr.imageRect);const o=1/this.imageAttr.imageScale;const a=r.scale(s,o,o);if(a.x>=0&&a.y>=0&&a.x<n&&a.y<i){const t=Math.floor(a.x)+Math.floor(a.y)*n;const r=this.pixels[t];const i=r===Vt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(i!==null&&i!==void 0?i:Vt.MAX_DEPTH_VALUE)/Vt.MAX_DEPTH_VALUE}else{return e!==null&&e!==void 0?e:1}}hitTest(t){return this.getNormalizedDepthAtPoint(t)<1}getWorldPoint(t,n,r){const s=this.getDepthAtPoint(t,r);const o=this.camera.isPerspective();if(o){const{position:t,viewVector:r,far:o}=this.camera;const a=i.at(n,o);const u=e.subtract(a,t);const c=e.dot(r,u)/(e.magnitude(r)*e.magnitude(u));return i.at(n,s/c)}else{return i.at(n,s)}}distanceToPoint(t){const{position:n,direction:r}=this.camera;const i=e.subtract(t,n);return Math.abs(e.dot(i,r))}depthOfClosestGeometry(t,e){const{projectionViewMatrix:n}=this.camera;const r=e.transformWorldToViewport(t,n);const i=e.transformPointToFrame(r,this);return this.getDepthAtPoint(i)}isOccluded(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const i=Math.abs(.02*n);const s=Math.abs(r-n);return n>r&&s>i}isDetached(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const i=r-n;const s=.02*n;const o=i<s;const a=this.getMaxDepthOfGeometry();const u=n>a;const c=!o||u;return c}}Vt.MAX_DEPTH_VALUE=2**16-1;class jt{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class Dt extends jt{constructor(){super(1)}}class Pt extends jt{constructor(t=1){super(1/Math.pow(10,t))}}class kt extends jt{constructor(t=1){super(1/Math.pow(1e3,t))}}class Tt extends jt{constructor(t=1){super(1/Math.pow(25.4,t))}}class Et extends jt{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class Ot extends jt{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class Rt{constructor(t){this.unitType=t;this.unit=Rt.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}convertWorldPointToReal(t){const e=this.unit.converter.convertTo(t.x);const n=this.unit.converter.convertTo(t.y);const r=this.unit.converter.convertTo(t.z);return{x:e,y:n,z:r}}convertRealPointToWorld(t){const e=this.unit.converter.convertFrom(t.x);const n=this.unit.converter.convertFrom(t.y);const r=this.unit.converter.convertFrom(t.z);return{x:e,y:n,z:r}}}Rt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new Dt},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new Pt},meters:{name:"Meters",abbreviatedName:"m",converter:new kt},inches:{name:"Inches",abbreviatedName:"in",converter:new Tt},feet:{name:"Feet",abbreviatedName:"ft",converter:new Et},yards:{name:"Yards",abbreviatedName:"yd",converter:new Ot}};class Wt{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class zt{constructor(t){this.unitType=t;this.unit=zt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}zt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new jt(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new Wt}};class qt{constructor(t){this.unitType=t;this.unit=qt.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}qt.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new Dt},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new Pt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new kt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new Tt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new Et(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new Ot(2)}};class Ft{constructor(t,e){this.pixels=t;this.imageAttr=e}static fromPng(t,e){if(!(t.data instanceof Uint8Array)){throw new Error("Cannot create FeatureMap. Expected decoded PNG to be a Uint8Array.")}else if(t.channels!==4){throw new Error("Cannot create FeatureMap. Missing alpha channel.")}else{return new Ft(t.data,{...e,imageRect:s.fromPointAndDimensions(e.imageRect,t)})}}getEntityType(t){const e=this.getColor(t);if((e===null||e===void 0?void 0:e.a)===g.CROSS_SECTION){return g.CROSS_SECTION}else if((e===null||e===void 0?void 0:e.a)===g.GENERIC_GEOMETRY){return g.GENERIC_GEOMETRY}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_EDGE){return g.IMPRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_SURFACE){return g.IMPRECISE_SURFACE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_EDGE){return g.PRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_SURFACE){return g.PRECISE_SURFACE}else{return g.NO_GEOMETRY}}getColor(t){const{width:e,height:n}=this.imageAttr.imageRect;const i=r.subtract(t,this.imageAttr.imageRect);const s=1/this.imageAttr.imageScale;const o=r.scale(i,s,s);if(o.x>=0&&o.y>=0&&o.x<e&&o.y<n){const t=Math.floor(o.x)*4+Math.floor(o.y)*4*e;const n=this.pixels[t];const r=this.pixels[t+1];const i=this.pixels[t+2];const s=this.pixels[t+3];return p.create(n,r,i,s)}else return undefined}}async function Ht(){return import("./p-BUvpJrVN.js")}let Lt;let Gt;const Ut=1;function _t(){if(Lt==null){console.debug(`Loading PNG worker module`);Lt=Ht()}return Lt}function Yt(){var t;if(typeof window!=="undefined"){const e=(t=window.navigator.hardwareConcurrency)!==null&&t!==void 0?t:8;return Math.ceil(e/4)}else{return Ut}}async function Kt(){if(Gt==null){Gt=_t().then((async({spawnPool:t})=>{const e=Yt();console.debug(`Spawning PNG worker pool [size=${e}]`);return t({size:e})}))}return Gt}const Jt=async t=>{const e=await Kt();return e.queue((e=>e(t)))};if(typeof window!=="undefined"){void Kt()}function Qt(t,n){const r=e.magnitude(t);const i=n.radius/r;return e.scale(i,t)}function $t(t,n,r){const i=e.subtract(r,t);const s=e.dot(n,i);const o=e.magnitudeSquared(n);const a=s/o;const u=e.scale(a,n);return e.add(u,t)}class Xt{constructor(t,e,n,r,i,s,o,a,u=w.create()){this.correlationIds=t;this.temporalRefinementCorrelationId=e;this.sequenceNumber=n;this.dimensions=r;this.image=i;this.scene=s;this.depthBufferBytes=o;this.featureMapBytes=a;this.id=u}getId(){return this.id}async depthBuffer(){if(this.cachedDepthBuffer==null){this.cachedDepthBuffer=this.depthBufferBytes!=null?this.decodeDepthBuffer(new Uint8Array(this.depthBufferBytes)):Promise.resolve(undefined)}return this.cachedDepthBuffer}async decodeDepthBuffer(t){const e=await Jt(t);return Vt.fromPng(e,this.scene.camera,this.image.imageAttr)}async featureMap(){if(this.cachedFeatureMap==null){this.cachedFeatureMap=this.featureMapBytes!=null?this.decodeFeatureMap(new Uint8Array(this.featureMapBytes)):Promise.resolve(undefined)}return this.cachedFeatureMap}async decodeFeatureMap(t){const e=await Jt(t);return Ft.fromPng(e,this.image.imageAttr)}copy({correlationIds:t,temporalRefinementCorrelationId:e,sequenceNumber:n,dimensions:r,image:i,scene:s,depthBufferBytes:o,featureMapBytes:a}){return new Xt(t!==null&&t!==void 0?t:this.correlationIds,e!==null&&e!==void 0?e:this.temporalRefinementCorrelationId,n!==null&&n!==void 0?n:this.sequenceNumber,r!==null&&r!==void 0?r:this.dimensions,i!==null&&i!==void 0?i:this.image,s!==null&&s!==void 0?s:this.scene,o!==null&&o!==void 0?o:this.depthBufferBytes,a!==null&&a!==void 0?a:this.featureMapBytes,this.id)}}class Zt{constructor(t,e){this.imageAttr=t;this.imageBytes=e}}class te{constructor(t,e,n,r,i,s,o){this.camera=t;this.boundingBox=e;this.crossSection=n;this.worldOrientation=r;this.hasChanged=i;this.sceneViewSummary=s;this.modelViewId=o}copy({camera:t,boundingBox:e,crossSection:n,worldOrientation:r,hasChanged:i,sceneViewSummary:s,modelViewId:o}){return new te(t!==null&&t!==void 0?t:this.camera,e!==null&&e!==void 0?e:this.boundingBox,n!==null&&n!==void 0?n:this.crossSection,r!==null&&r!==void 0?r:this.worldOrientation,i!==null&&i!==void 0?i:this.hasChanged,s!==null&&s!==void 0?s:this.sceneViewSummary,o!==null&&o!==void 0?o:this.modelViewId)}}class ee{constructor(t,e,n,r,i,s){this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=i;this.aspectRatio=s}get direction(){return e.normalize(this.viewVector)}get viewVector(){return e.subtract(this.lookAt,this.position)}get worldMatrix(){return this.computeCameraMatrices().worldMatrix}get viewMatrix(){return this.computeCameraMatrices().viewMatrix}get projectionMatrix(){return this.computeCameraMatrices().projectionMatrix}get projectionMatrixInverse(){return this.computeCameraMatrices().projectionMatrixInverse}get projectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}get frustumProjectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}static fromBoundingBox(t,e,r){var i;const{near:s,far:o}=Mt(e,t);if(pt(t)){const i=n.create(e);const a=Qt(t.viewVector,i);const u=$t(t.lookAt,a,i.center);return new re(a,u,t.up,s,o,r,t.fovHeight,t.rotationPoint)}else{return new ne(t.position,t.lookAt,t.up,s,o,r,(i=t.fovY)!==null&&i!==void 0?i:45)}}isOrthographic(){return false}isPerspective(){return false}isPointBehindNear(t){const{position:n,direction:r,near:i}=this;const s=e.dot(e.subtract(t,n),r);return s<i}intersectLineWithNear(t){const{position:n,direction:r,near:i}=this;const s=e.subtract(t.start,n);const u=e.subtract(t.end,n);const c=o.create({start:s,end:u});const h=a.create({normal:r,constant:-i});const f=a.intersectLine(h,c);return f!=null?e.add(f,n):undefined}computeCameraMatrices(){if(this.cameraMatrices==null){return{viewMatrix:u.makeIdentity(),worldMatrix:u.makeIdentity(),projectionMatrix:u.makeIdentity(),projectionMatrixInverse:u.makeIdentity(),projectionViewMatrix:u.makeIdentity()}}return this.cameraMatrices}updateCameraMatrices(t){this.cameraMatrices=t;return this.cameraMatrices}}class ne extends ee{constructor(t,e,n,r,i,s,o){super(t,e,n,r,i,s);this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=i;this.aspectRatio=s;this.fovY=o}toOrthographic(t){return ee.fromBoundingBox(gt(this,t),t,this.aspectRatio)}isPerspective(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=u.makeLookAtView(this.position,this.lookAt,this.up);const e=u.invert(t);const n=u.makePerspective(this.near,this.far,this.fovY,this.aspectRatio);const r=u.invert(n);const i=u.multiply(n,t);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:i})}return this.cameraMatrices}}class re extends ee{constructor(t,n,r,i,s,o,a,u){super(e.add(n,e.negate(t)),n,r,i,s,o);this.lookAt=n;this.up=r;this.near=i;this.far=s;this.aspectRatio=o;this.fovHeight=a;this.rotationPoint=u;this.top=a*.5;this.bottom=-this.top;this.right=this.top*o;this.left=-this.right}toPerspective(t){return ee.fromBoundingBox(bt(this),t,this.aspectRatio)}isOrthographic(){return true}get frustumProjectionViewMatrix(){const t=u.makeFrustum(this.left,this.right,this.top,this.bottom,this.near,this.far);return u.multiply(t,this.computeCameraMatrices().viewMatrix)}computeCameraMatrices(){if(this.cameraMatrices==null){const t=u.makeLookAtView(this.position,this.lookAt,this.up);const e=u.invert(t);const n=u.makeOrthographic(this.left,this.right,this.bottom,this.top,this.near,this.far);const r=u.invert(n);const i=u.multiply(n,t);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:i})}return this.cameraMatrices}}class ie{constructor(t,e){this.y=t;this.z=e}get matrix(){const t=this.z;const n=this.y;const r=e.cross(n,t);return u.makeBasis(r,n,t)}}ie.DEFAULT=new ie(e.up(),e.back());class se{constructor(t,e){this.position=t;this.up=e}transformMatrix(t){const n=e.transformMatrix(this.position,t);const r=e.transformMatrix(this.up,t);return new se(n,r)}}se.FRONT=new se(e.back(),e.up());se.RIGHT=new se(e.right(),e.up());se.LEFT=new se(e.left(),e.up());se.BACK=new se(e.forward(),e.up());se.TOP=new se(e.up(),e.forward());se.BOTTOM=new se(e.down(),e.back());se.TOP_FRONT_RIGHT=new se(e.add(e.back(),e.up(),e.left()),e.up());se.TOP_FRONT_LEFT=new se(e.add(e.back(),e.up(),e.right()),e.up());se.BOTTOM_FRONT_RIGHT=new se(e.add(e.back(),e.down(),e.left()),e.up());se.BOTTOM_FRONT_LEFT=new se(e.add(e.back(),e.down(),e.right()),e.up());se.TOP_BACK_LEFT=new se(e.add(e.forward(),e.up(),e.right()),e.up());se.TOP_BACK_RIGHT=new se(e.add(e.forward(),e.up(),e.left()),e.up());se.BOTTOM_BACK_LEFT=new se(e.add(e.forward(),e.down(),e.right()),e.up());se.BOTTOM_BACK_RIGHT=new se(e.add(e.forward(),e.down(),e.left()),e.up());se.TOP_FRONT=new se(e.add(e.back(),e.up()),e.up());se.BOTTOM_FRONT=new se(e.add(e.back(),e.down()),e.up());se.FRONT_RIGHT=new se(e.add(e.back(),e.left()),e.up());se.FRONT_LEFT=new se(e.add(e.back(),e.right()),e.up());se.TOP_BACK=new se(e.add(e.forward(),e.up()),e.up());se.BOTTOM_BACK=new se(e.add(e.forward(),e.down()),e.up());se.BACK_LEFT=new se(e.add(e.forward(),e.right()),e.up());se.BACK_RIGHT=new se(e.add(e.forward(),e.left()),e.up());se.TOP_LEFT=new se(e.add(e.up(),e.right()),e.up());se.TOP_RIGHT=new se(e.add(e.up(),e.left()),e.up());se.BOTTOM_LEFT=new se(e.add(e.down(),e.right()),e.up());se.BOTTOM_RIGHT=new se(e.add(e.down(),e.left()),e.up());const oe=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y")),(([t,e])=>r.create(t,e)));const ae=m.defineMapper(m.read(m.requiredProp("width"),m.requiredProp("height")),(([t,e])=>c.create(t,e)));const ue=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("width"),m.requiredProp("height")),(([t,e,n,r])=>s.create(t,e,n,r)));const ce=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("z")),(([t,n,r])=>e.create(t,n,r)));const he=m.defineMapper(m.read(m.requiredProp("xmin"),m.requiredProp("ymin"),m.requiredProp("zmin"),m.requiredProp("xmax"),m.requiredProp("ymax"),m.requiredProp("zmax")),(([t,n,r,i,s,o])=>h.create(e.create(t,n,r),e.create(i,s,o))));const fe=m.defineMapper(m.read(m.requiredProp("d"),m.mapRequiredProp("normal",ce)),(([t,e])=>a.create({normal:e,constant:t})));const le=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("z"),m.requiredProp("w")),(([t,e,n,r])=>f.create({x:t,y:e,z:n,w:r})));const ve=m.defineMapper(m.read(m.mapRequiredProp("r0",le),m.mapRequiredProp("r1",le),m.mapRequiredProp("r2",le),m.mapRequiredProp("r3",le)),(([t,e,n,r])=>u.fromValues(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)));const de=m.defineMapper(m.read(m.requiredProp("r"),m.requiredProp("g"),m.requiredProp("b")),(([t,e,n])=>p.create(t,e,n)));const me=m.defineMapper((t=>{function e(t){return{r:t.r,g:t.g,b:t.b}}if(typeof t==="string"){const n=p.fromHexString(t);return n!=null?e(n):{errors:["String is not a valid color."]}}else if(typeof t==="number"){return e(p.fromNumber(t))}else{return e(t)}}),(t=>t));Me();const pe=Me();const we=Me();const ge=xe();const be=xe();const ye=xe();function Me(){return m.defineMapper((t=>t!=null?{value:t}:undefined),(t=>t))}function xe(){return m.defineMapper((t=>(t===null||t===void 0?void 0:t.value)||undefined),(t=>t))}const Ne=m.defineMapper(m.read(m.mapProp("position",m.compose(m.required("position"),ce)),m.mapProp("lookAt",m.compose(m.required("lookAt"),ce)),m.mapProp("up",m.compose(m.required("up"),ce)),m.getProp("fovY")),(([t,e,n,r])=>({position:t,lookAt:e,up:n,fovY:(r===null||r===void 0?void 0:r.value)!=null?r.value:45})));const Ie=m.defineMapper(m.read(m.mapProp("viewVector",m.compose(m.required("viewVector"),ce)),m.mapProp("lookAt",m.compose(m.required("lookAt"),ce)),m.mapProp("up",m.compose(m.required("up"),ce)),m.mapProp("fovHeight",m.required("fovHeight"))),(([t,e,n,r])=>({viewVector:t,lookAt:e,up:n,fovHeight:r})));const Se=m.defineMapper(m.read(m.mapProp("position",m.ifDefined(ce)),m.mapProp("lookAt",m.ifDefined(ce)),m.mapProp("up",m.ifDefined(ce)),m.mapProp("perspective",m.ifDefined(Ne)),m.mapProp("orthographic",m.ifDefined(Ie))),(([t,n,r,i,s])=>{var o;return(o=i!==null&&i!==void 0?i:s)!==null&&o!==void 0?o:{position:t!==null&&t!==void 0?t:e.back(),lookAt:n!==null&&n!==void 0?n:e.origin(),up:r!==null&&r!==void 0?r:e.up(),fovY:45}}));const Be=m.defineMapper(m.read(m.mapProp("normal",m.compose(m.required("normal"),ce)),m.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const Ce=m.defineMapper(m.read(m.mapProp("frameDimensions",m.compose(m.required("frameDimensions"),ae)),m.mapProp("imageRect",m.compose(m.required("imageRect"),ue)),m.mapProp("scaleFactor",m.required("scaleFactor"))),(([t,e,n])=>({frameDimensions:t,imageRect:e,imageScale:n})));const Ae=m.defineMapper(m.read(m.mapProp("sectionPlanes",m.compose(m.required("sectionPlanes"),m.mapArray(Be))),m.mapProp("highlightColor",m.ifDefined(de))),(([t,e])=>It({sectionPlanes:t,highlightColor:e||undefined})));const Ve=m.defineMapper(m.read(m.requiredProp("count"),m.mapProp("boundingBox",m.ifDefined(he))),(([t,e])=>({count:t,boundingBox:e!==null&&e!==void 0?e:undefined})));const je=m.defineMapper(m.read(m.mapProp("visibleSummary",m.ifDefined(Ve)),m.mapProp("selectedVisibleSummary",m.ifDefined(Ve))),(([t,e])=>Bt({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const De=m.defineMapper(m.read(m.mapProp("imageAttributes",m.compose(m.required("imageAttributes"),Ce))),(([t])=>t));const Pe=m.defineMapper(m.read(De,m.mapProp("image",m.required("image"))),(([t,e])=>new Zt(t,e)));const ke=m.defineMapper(m.read(m.mapRequiredProp("camera",Se),m.mapRequiredProp("visibleBoundingBox",he),m.mapRequiredProp("crossSectioning",Ae),m.requiredProp("hasChanged"),m.mapRequiredProp("displayListSummary",je),m.mapProp("modelViewId",m.ifDefined(Z))),(([t,e,n,r,i,s])=>({camera:t,boundingBox:e,crossSectioning:n,hasChanged:r,displayListSummary:i,modelViewId:s!=null?s:undefined})));const Te=m.defineMapper(m.read(m.mapProp("sceneAttributes",m.compose(m.required("sceneAttributes"),ke))),(([t])=>t));const Ee=m.defineMapper(m.read(Te,De),(([t,e])=>ee.fromBoundingBox(t.camera,t.boundingBox,c.aspectRatio(e.frameDimensions))));function Oe(t){return m.defineMapper(m.read(Te,Ee),(([e,n])=>new te(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId)))}function Re(t){return m.defineMapper(m.read(m.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),m.requiredProp("sequenceNumber"),m.compose(De,m.getProp("frameDimensions")),Oe(t),Pe,m.mapProp("depthBuffer",be),m.mapProp("featureMap",be),m.mapProp("temporalRefinementCorrelationId",(t=>t!=null?X(t):null))),(([t,e,n,r,i,s,o,a])=>new Xt(t,a||"",e,n,i,r,s,o)))}function We(t){return m.ifInvalidThrow(Re(t))}const ze=m.defineMapper(m.compose(m.required("orientation"),m.read(m.mapProp("up",m.compose(m.required("up"),ce)),m.mapProp("front",m.compose(m.required("front"),ce)))),(([t,e])=>new ie(t,e)));m.ifInvalidThrow(ze);const qe=m.defineMapper(m.read(m.mapRequiredProp("imageAttributes",Ce),m.requiredProp("stencilBuffer"),m.mapRequiredProp("depthBuffer",m.compose(be,m.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const Fe=Le("stencilBuffer",qe);const He=m.ifInvalidThrow(Fe);function Le(t,e){return m.mapRequiredProp(t,e)}const Ge=m.defineMapper(m.read(m.requiredProp("token"),m.requiredProp("expiresIn")),(([t,e])=>vt.create(t,e)));const Ue=m.defineMapper(m.read(m.compose(m.requiredProp("startStream"),m.mapRequiredProp("streamId",X)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneId",X)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneViewId",X)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sessionId",X)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("worldOrientation",ze)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("token",Ge))),(([t,e,n,r,i,s])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:i,token:s})));const _e=m.ifInvalidThrow(Ue);const Ye=m.defineMapper(m.read(m.compose(m.requiredProp("reconnect"),m.mapRequiredProp("token",Ge))),(([t])=>({token:t})));const Ke=m.ifInvalidThrow(Ye);const Je=m.defineMapper(m.compose(m.requiredProp("refreshToken"),m.requiredProp("token"),Ge),(t=>t));const Qe=m.ifInvalidThrow(Je);const $e=m.defineMapper(m.compose(m.requiredProp("syncTime"),m.requiredProp("replyTime"),m.read(m.requiredProp("seconds"),m.requiredProp("nanos"))),(([t,e])=>d({seconds:t,nanos:e})));const Xe=m.ifInvalidThrow($e);const Ze=m.defineMapper(m.ifDefined(m.getProp("next")),(t=>t!=null?t:undefined));const tn=m.defineMapper((t=>{switch(t){case"all":return{enabled:{value:true},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_ALL};case"final":return{enabled:{value:true},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_FINAL};default:return{enabled:{value:false},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_INVALID}}}),(t=>t));const en=m.defineMapper(m.read(m.ifDefined(m.getProp("opacity"))),(([t])=>({opacity:{value:l(t!==null&&t!==void 0?t:0,0,1)}})));const nn=m.defineMapper(m.read(m.ifDefined(m.getProp("width")),m.ifDefined(m.mapProp("color",m.ifDefined(me)))),(([t,e])=>({lineWidth:t,lineColor:e})));const rn=m.defineMapper(m.read(m.ifDefined(m.mapProp("color",m.ifDefined(me))),m.ifDefined(m.mapProp("opacity",pe)),m.ifDefined(m.getProp("lineWidth"))),(([t,e,n])=>{if(t||e||n){return{color:t,opacity:e,lineWidth:n}}else return undefined}));const sn=m.defineMapper(m.read(m.ifDefined(m.mapProp("highlightColor",m.ifDefined(me))),m.ifDefined(m.mapProp("occludedOpacity",pe)),m.ifDefined(m.mapProp("outline",m.ifDefined(nn)))),(([t,e,n])=>({highlightColor:t,occludedOpacity:e,outline:n})));const on=m.defineMapper((t=>!!t),(t=>t));const an=m.defineMapper((t=>t!==null&&t!==void 0?t:""),(t=>t));const un=m.defineMapper(m.read(m.ifDefined(m.mapProp("frameBackgroundColor",m.ifDefined(me)))),(([t])=>({frameBackgroundColor:t})));const cn=m.defineMapper(m.read(m.ifDefined(m.mapProp("streamKeyToCompare",m.ifDefined(we)))),(([t])=>({streamKeyToCompare:t})));const hn=m.defineMapper(m.read(m.ifDefined(m.mapProp("endCapEnabled",(t=>!!t))),m.ifDefined(m.mapProp("endCapColor",m.ifDefined(me)))),(([t,e])=>({endCapEnabled:t,endCapColor:e})));const fn=m.defineMapper(m.read(m.mapProp("depthBuffers",tn),m.mapProp("phantom",en),m.mapProp("noDefaultLights",on),m.mapProp("featureLines",nn),m.mapProp("featureHighlighting",sn),m.mapProp("featureMaps",tn),m.mapProp("experimentalRenderingOptions",an),m.mapProp("selectionHighlighting",rn),m.mapProp("frames",un),m.mapProp("sceneComparison",cn),m.mapProp("crossSectioning",hn)),(([t,e,n,r,i,s,o,a,u,c,h])=>{const f={depthBuffers:t,phantomItems:e,noDefaultLights:n,featureLines:r,featureHighlighting:i,featureMaps:s,experimentalRenderingOptions:o,selectionHighlighting:a,frames:u,sceneComparison:c,crossSectioningAttributes:h};return f}));export{zt as A,b as B,We as C,Rt as D,_e as E,ee as F,Ke as G,Xe as H,Qe as I,Ct as J,y as K,gt as L,bt as M,dt as N,ie as O,B as P,wt as Q,Mt as R,se as S,Qt as T,Se as U,tt as V,fe as W,Xt as a,Zt as b,St as c,te as d,re as e,ne as f,qt as g,He as h,Jt as i,Vt as j,x as k,N as l,ye as m,ce as n,M as o,oe as p,de as q,Ze as r,I as s,yt as t,$t as u,ve as v,ge as w,he as x,fn as y,me as z};
//# sourceMappingURL=p-C5iGCYv2.js.map