@ifc-lite/viewer 1.21.0 → 1.22.0

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.
Files changed (87) hide show
  1. package/.turbo/turbo-build.log +57 -50
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/CHANGELOG.md +10 -0
  4. package/dist/assets/arrow-fie-E7fe.js +20 -0
  5. package/dist/assets/ascii-points-source-bTjLVmUX.js +1 -0
  6. package/dist/assets/{basketViewActivator-Bzw51jhm.js → basketViewActivator-EHAhHlwN.js} +12 -13
  7. package/dist/assets/bcf-Bhx-K17f.js +281 -0
  8. package/dist/assets/{browser-C5TFR7sH.js → browser-CVf8ATeW.js} +6 -6
  9. package/dist/assets/cesium-B4ZIU9jS.js +17742 -0
  10. package/dist/assets/decode-worker-CYqSjk1n.js +172 -0
  11. package/dist/assets/e57-source-CQHxE8n3.js +1 -0
  12. package/dist/assets/emscripten-module.browser-DcFZLAUx.js +1 -0
  13. package/dist/assets/exporters-KTio0Tdm.js +5723 -0
  14. package/dist/assets/geometry-controller.worker-Cm2P_EJr.js +7 -0
  15. package/dist/assets/geometry.worker-DchLBqZ8.js +1 -0
  16. package/dist/assets/{ids-B7AXEv7h.js → ids-CS7VCFin.js} +5 -5
  17. package/dist/assets/ifc-lite-C6wEhXa6.js +7 -0
  18. package/dist/assets/{ifc-lite_bg-DlKs5-yM.wasm → ifc-lite_bg-CSeT3fNI.wasm} +0 -0
  19. package/dist/assets/{ifc-lite_bg-PqmRe3Ph.wasm → ifc-lite_bg-ns4cSnX2.wasm} +0 -0
  20. package/dist/assets/{index-DVNSvEMh.js → index-8k9h-ANq.js} +60997 -59926
  21. package/dist/assets/index-BZC2YaOP.css +1 -0
  22. package/dist/assets/index-HqAIQkr6.js +22 -0
  23. package/dist/assets/inline-worker-BpBzlmd6.js +1 -0
  24. package/dist/assets/las-BW6LIc_j.js +1 -0
  25. package/dist/assets/las-source-C_IGrgRq.js +1 -0
  26. package/dist/assets/laz-source-jj3xI5Y4.js +125 -0
  27. package/dist/assets/maplibre-gl-C4LXKM6c.js +808 -0
  28. package/dist/assets/{native-bridge-BiD01jI9.js → native-bridge-DNrEhx2R.js} +5 -8
  29. package/dist/assets/{parser.worker-Bnbrl6gy.js → parser.worker-BcjkIo89.js} +2 -2
  30. package/dist/assets/pcd-source-Ck0UnVDn.js +3 -0
  31. package/dist/assets/ply-source-C8jjyzxE.js +4 -0
  32. package/dist/assets/{exporters-u0sz2Upj.js → sandbox-BSn5MyEJ.js} +11745 -7412
  33. package/dist/assets/{server-client-DP8fMPY9.js → server-client-D-kU2XAF.js} +4 -4
  34. package/dist/assets/{three-CDRZThFA.js → three-DwNDHx9-.js} +163 -171
  35. package/dist/assets/wasm-bridge-Cha08LdC.js +1 -0
  36. package/dist/assets/{workerHelpers-CBbWSJmd.js → workerHelpers-pUUnk9Wc.js} +1 -1
  37. package/dist/assets/zip-BJqVbRkU.js +2 -0
  38. package/dist/index.html +10 -12
  39. package/package.json +11 -11
  40. package/src/components/mcp/PlaygroundChat.tsx +90 -52
  41. package/src/components/viewer/CesiumOverlay.tsx +150 -91
  42. package/src/components/viewer/CesiumPlacementEditor.tsx +1009 -0
  43. package/src/components/viewer/ChatPanel.tsx +76 -93
  44. package/src/components/viewer/EntityContextMenu.tsx +68 -10
  45. package/src/components/viewer/MainToolbar.tsx +33 -3
  46. package/src/components/viewer/ViewportContainer.tsx +70 -16
  47. package/src/components/viewer/ViewportOverlays.tsx +2 -98
  48. package/src/components/viewer/chat/ByokKeyModal.tsx +338 -0
  49. package/src/components/viewer/chat/ByokStreamingPill.tsx +62 -0
  50. package/src/components/viewer/chat/ByokTrustDiagram.tsx +192 -0
  51. package/src/components/viewer/properties/GeoreferencingPanel.tsx +49 -52
  52. package/src/components/viewer/properties/ModelMetadataPanel.tsx +55 -44
  53. package/src/components/viewer/selectionHandlers.ts +7 -1
  54. package/src/lib/geo/cesium-bridge.ts +86 -50
  55. package/src/lib/geo/cesium-placement.test.ts +244 -0
  56. package/src/lib/geo/cesium-placement.ts +231 -0
  57. package/src/lib/geo/effective-georef.test.ts +74 -1
  58. package/src/lib/geo/effective-georef.ts +40 -93
  59. package/src/lib/geo/geo-scale.ts +104 -0
  60. package/src/lib/geo/reproject.test.ts +130 -0
  61. package/src/lib/geo/reproject.ts +37 -12
  62. package/src/lib/geo/terrain-elevation.ts +198 -89
  63. package/src/lib/lens/adapter.ts +52 -6
  64. package/src/lib/llm/clipboard-detect.test.ts +150 -0
  65. package/src/lib/llm/clipboard-detect.ts +90 -0
  66. package/src/lib/llm/models.ts +28 -0
  67. package/src/lib/llm/stream-direct.ts +16 -4
  68. package/src/lib/llm/types.ts +8 -0
  69. package/src/services/playground-model.ts +55 -0
  70. package/src/store/index.ts +4 -5
  71. package/src/store/slices/cesiumSlice.ts +100 -19
  72. package/src/store.ts +3 -0
  73. package/dist/assets/arrow-CZ5kQ26f.js +0 -20
  74. package/dist/assets/bcf-4K724hw0.js +0 -281
  75. package/dist/assets/cesium-DUOzBlqv.js +0 -17817
  76. package/dist/assets/decode-worker-t2EGKAxO.js +0 -1708
  77. package/dist/assets/emscripten-module.browser-CY5t0Vfq.js +0 -1
  78. package/dist/assets/geometry-controller.worker-NH8pZmrU.js +0 -7
  79. package/dist/assets/geometry.worker-Bp4rW_R1.js +0 -1
  80. package/dist/assets/ifc-lite-DfZHk36-.js +0 -7
  81. package/dist/assets/index-CSWgTe1s.css +0 -1
  82. package/dist/assets/index-XwKzDuw6.js +0 -22
  83. package/dist/assets/maplibre-gl-CGLcoNXc.js +0 -811
  84. package/dist/assets/sandbox-DPD1ROr0.js +0 -9700
  85. package/dist/assets/wasm-bridge-CErti6zX.js +0 -1
  86. package/dist/assets/zip-DBEtpeu6.js +0 -12
  87. package/src/components/viewer/CesiumSettingsDialog.tsx +0 -100
@@ -0,0 +1,172 @@
1
+ (async ()=>{
2
+ function i(e) {
3
+ const t = e.positions.buffer, r = [
4
+ t
5
+ ], n = {
6
+ positions: t,
7
+ pointCount: e.pointCount,
8
+ bbox: e.bbox
9
+ };
10
+ if (e.colors) {
11
+ const o = e.colors.buffer;
12
+ n.colors = o, r.push(o);
13
+ }
14
+ if (e.classifications) {
15
+ const o = e.classifications.buffer;
16
+ n.classifications = o, r.push(o);
17
+ }
18
+ if (e.intensities) {
19
+ const o = e.intensities.buffer;
20
+ n.intensities = o, r.push(o);
21
+ }
22
+ return {
23
+ payload: n,
24
+ transfer: r
25
+ };
26
+ }
27
+ const a = new Map;
28
+ let u = 1;
29
+ self.onmessage = (e)=>{
30
+ const t = e.data;
31
+ switch(t.kind){
32
+ case "open":
33
+ d(t);
34
+ return;
35
+ case "next":
36
+ f(t);
37
+ return;
38
+ case "close":
39
+ l(t.sourceId);
40
+ return;
41
+ case "abort":
42
+ w(t.sourceId);
43
+ return;
44
+ }
45
+ };
46
+ async function d(e) {
47
+ try {
48
+ const t = await p(e.format, e.blob, {
49
+ label: e.label,
50
+ downsample: {
51
+ stride: Math.max(1, e.stride | 0)
52
+ }
53
+ }), r = new AbortController, n = await t.open(r.signal), o = u++;
54
+ a.set(o, {
55
+ source: t,
56
+ abort: r
57
+ }), s({
58
+ kind: "opened",
59
+ requestId: e.requestId,
60
+ sourceId: o,
61
+ info: n
62
+ });
63
+ } catch (t) {
64
+ s({
65
+ kind: "error",
66
+ requestId: e.requestId,
67
+ message: c(t)
68
+ });
69
+ }
70
+ }
71
+ async function f(e) {
72
+ const t = a.get(e.sourceId);
73
+ if (!t) {
74
+ s({
75
+ kind: "error",
76
+ requestId: e.requestId,
77
+ message: `Unknown sourceId ${e.sourceId}`
78
+ });
79
+ return;
80
+ }
81
+ try {
82
+ const r = await t.source.next(e.maxPoints, t.abort.signal);
83
+ if (!r) {
84
+ s({
85
+ kind: "chunk",
86
+ requestId: e.requestId,
87
+ sourceId: e.sourceId,
88
+ chunk: null
89
+ });
90
+ return;
91
+ }
92
+ const { payload: n, transfer: o } = i(r);
93
+ s({
94
+ kind: "chunk",
95
+ requestId: e.requestId,
96
+ sourceId: e.sourceId,
97
+ chunk: n
98
+ }, o);
99
+ } catch (r) {
100
+ s({
101
+ kind: "error",
102
+ requestId: e.requestId,
103
+ message: c(r)
104
+ });
105
+ }
106
+ }
107
+ function l(e) {
108
+ const t = a.get(e);
109
+ if (t) {
110
+ try {
111
+ t.abort.abort(), t.source.close();
112
+ } catch (r) {
113
+ console.warn("[decode-worker] close failed:", c(r));
114
+ }
115
+ a.delete(e);
116
+ }
117
+ }
118
+ function w(e) {
119
+ const t = a.get(e);
120
+ t && t.abort.abort();
121
+ }
122
+ async function p(e, t, r) {
123
+ switch(e){
124
+ case "las":
125
+ {
126
+ const { LasStreamingSource: n } = await import("./las-source-C_IGrgRq.js");
127
+ return new n(t, r);
128
+ }
129
+ case "laz":
130
+ {
131
+ const { LazStreamingSource: n } = await import("./laz-source-jj3xI5Y4.js").then(async (m)=>{
132
+ await m.__tla;
133
+ return m;
134
+ });
135
+ return new n(t, r);
136
+ }
137
+ case "ply":
138
+ {
139
+ const { PlyStreamingSource: n } = await import("./ply-source-C8jjyzxE.js");
140
+ return new n(t, r);
141
+ }
142
+ case "pcd":
143
+ {
144
+ const { PcdStreamingSource: n } = await import("./pcd-source-Ck0UnVDn.js");
145
+ return new n(t, r);
146
+ }
147
+ case "e57":
148
+ {
149
+ const { E57StreamingSource: n } = await import("./e57-source-CQHxE8n3.js");
150
+ return new n(t, r);
151
+ }
152
+ case "pts":
153
+ {
154
+ const { AsciiPointsStreamingSource: n } = await import("./ascii-points-source-bTjLVmUX.js");
155
+ return new n(t, "pts", r);
156
+ }
157
+ case "xyz":
158
+ {
159
+ const { AsciiPointsStreamingSource: n } = await import("./ascii-points-source-bTjLVmUX.js");
160
+ return new n(t, "xyz", r);
161
+ }
162
+ default:
163
+ throw new Error(`decode-worker: unknown format "${e}"`);
164
+ }
165
+ }
166
+ function s(e, t = []) {
167
+ self.postMessage(e, t);
168
+ }
169
+ function c(e) {
170
+ return e instanceof Error ? e.message : String(e);
171
+ }
172
+ })();
@@ -0,0 +1 @@
1
+ const q="ASTM-E57";function Q(t){if(t.length<48)throw new Error("E57: header truncated (need 48 bytes)");const e=String.fromCharCode(...t.subarray(0,8));if(e!==q)throw new Error(`E57: bad magic "${e}" (expected "${q}")`);const n=new DataView(t.buffer,t.byteOffset,t.byteLength);return{majorVersion:n.getUint32(8,!0),minorVersion:n.getUint32(12,!0),fileLogicalSize:P(n,16),xmlLogicalOffset:R(P(n,24),P(n,40)),xmlLogicalLength:P(n,32),pageSize:P(n,40)}}function tt(t,e){if(e<=4)throw new Error("E57: pageSize too small");const n=e-4,o=Math.floor(t.length/e),r=t.length-o*e,i=new Uint8Array(o*n+Math.max(0,r-4));let s=0;for(let f=0;f<o;f++){const a=f*e;i.set(t.subarray(a,a+n),s),s+=n}if(r>4){const f=o*e;i.set(t.subarray(f,f+r-4),s)}return i}function R(t,e){const n=e-4,o=Math.floor(t/e),r=t-o*e;return o*n+r}function nt(t,e,n){const o=R(e,n);if(o+32>t.length)throw new Error(`E57: CompressedVector section header at logical ${o} runs past end of file (length ${t.length})`);const r=new DataView(t.buffer,t.byteOffset+o,32),i=r.getUint8(0);if(i!==1)throw new Error(`E57: expected CompressedVector section (id=1) at physical ${e}, got id=${i}`);const s=P(r,16);return R(s,n)}function P(t,e){const n=t.getUint32(e,!0);return t.getUint32(e+4,!0)*4294967296+n}function et(t){const e={name:"",attrs:new Map,children:[],text:""},n=[e];let o=0;const r=t.length;let i=-1;const s=f=>{if(i<0||i>=f){i=-1;return}const a=t.slice(i,f).trim();if(a.length>0){const c=n[n.length-1];c.children.length===0&&(c.text=c.text+G(a))}i=-1};for(;o<r;){if(t.charCodeAt(o)!==60){i<0&&(i=o),o++;continue}if(s(o),t.startsWith("<?",o)){const l=t.indexOf("?>",o+2);o=l<0?r:l+2;continue}if(t.startsWith("<!--",o)){const l=t.indexOf("-->",o+4);o=l<0?r:l+3;continue}if(t.startsWith("<![CDATA[",o)){const l=t.indexOf("]]>",o+9),b=t.slice(o+9,l<0?r:l),w=n[n.length-1];w.children.length===0&&(w.text=w.text+b),o=l<0?r:l+3;continue}if(t.startsWith("<!",o)){const l=t.indexOf(">",o+2);o=l<0?r:l+1;continue}if(t.charCodeAt(o+1)===47){const l=t.indexOf(">",o+2);if(l<0)throw new Error("XML: unterminated closing tag");const b=t.slice(o+2,l).trim(),w=n[n.length-1];if(w.name!==b)throw new Error(`XML: mismatched closing tag </${b}> (expected </${w.name}>)`);n.pop(),o=l+1;continue}const a=ot(t,o+1);if(a<0)throw new Error("XML: unterminated tag");let c=t.slice(o+1,a).trim(),d=!1;c.endsWith("/")&&(d=!0,c=c.slice(0,-1).trim());const h=c.match(/^([A-Za-z_][\w:.\-]*)/);if(!h){o=a+1;continue}const g=h[1],m=c.slice(g.length).trim(),u=rt(m),p={name:g,attrs:u,children:[],text:""};n.length===1&&e.name===""?(e.name=g,e.attrs=u,d||n.push(e)):(n[n.length-1].children.push(p),d||n.push(p)),o=a+1}if(s(r),n.length!==1)throw new Error(`XML: unclosed tag <${n[n.length-1].name}>`);if(e.name==="")throw new Error("XML: missing root element");return e}function ot(t,e){let n=!1;for(let o=e;o<t.length;o++){const r=t.charCodeAt(o);if(r===34)n=!n;else if(r===62&&!n)return o}return-1}const W=/([A-Za-z_][\w:.\-]*)\s*=\s*"([^"]*)"/g;function rt(t){const e=new Map;if(!t)return e;let n;for(W.lastIndex=0;(n=W.exec(t))!==null;)e.set(n[1],G(n[2]));return e}function G(t){return t.indexOf("&")<0?t:t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&#(\d+);/g,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,n)=>String.fromCharCode(parseInt(n,16))).replace(/&amp;/g,"&")}function N(t,e){for(const n of t.children)if(n.name===e)return n;return null}function it(t,e){return t.children.filter(n=>n.name===e)}function A(t,e){const n=N(t,e);if(!n)return null;const o=n.text.trim();return o.length>0?o:null}function st(t){const e=et(t);if(e.name!=="e57Root")throw new Error(`E57: XML root is not <e57Root> (saw <${e.name||"?"}>)`);const n=N(e,"data3D");if(!n)return[];const o=[];for(const r of it(n,"vectorChild")){const i=N(r,"points");if(!i||i.attrs.get("type")!=="CompressedVector")continue;const s=i.attrs.get("fileOffset"),f=i.attrs.get("recordCount");if(!s||!f)continue;const a=Number(s),c=Number(f);if(!Number.isFinite(a)||a<0||!Number.isFinite(c)||c<0)continue;const d=N(i,"prototype");if(!d)continue;const h=[];for(const g of d.children){const m=g.attrs.get("type")??"";m==="Float"?h.push({name:g.name,kind:"Float",precision:g.attrs.get("precision")==="single"?"single":"double"}):m==="ScaledInteger"?h.push({name:g.name,kind:"ScaledInteger",scale:Number(g.attrs.get("scale")??"1"),offset:Number(g.attrs.get("offset")??"0"),minimum:Number(g.attrs.get("minimum")??"0"),maximum:Number(g.attrs.get("maximum")??"0")}):m==="Integer"&&h.push({name:g.name,kind:"Integer",minimum:Number(g.attrs.get("minimum")??"0"),maximum:Number(g.attrs.get("maximum")??"0")})}o.push({guid:A(r,"guid")??"",name:A(r,"name")??void 0,recordCount:c,binaryFileOffset:a,prototype:h,pose:at(N(r,"pose"))??void 0})}return o}function at(t){if(!t)return null;const e=N(t,"rotation"),n=N(t,"translation");if(!e||!n)return null;const o=Number(A(e,"w")??"1"),r=Number(A(e,"x")??"0"),i=Number(A(e,"y")??"0"),s=Number(A(e,"z")??"0"),f=Number(A(n,"x")??"0"),a=Number(A(n,"y")??"0"),c=Number(A(n,"z")??"0");return[o,r,i,s,f,a,c].every(Number.isFinite)?{rotation:{w:o,x:r,y:i,z:s},translation:{x:f,y:a,z:c}}:null}function U(t,e){return t.find(n=>n.name===e)}function ct(t,e){const n=U(e.prototype,"cartesianX"),o=U(e.prototype,"cartesianY"),r=U(e.prototype,"cartesianZ");if(!n||!o||!r)throw new Error("E57: prototype missing cartesianX/Y/Z");for(const w of[n,o,r])if(w.kind==="Integer")throw new Error(`E57: cartesian${w.name.slice(-1)} encoded as plain Integer (only Float / ScaledInteger supported)`);const i=U(e.prototype,"colorRed"),s=U(e.prototype,"colorGreen"),f=U(e.prototype,"colorBlue"),a=!!(i&&s&&f),c=U(e.prototype,"intensity"),d=U(e.prototype,"classification"),h=new Float32Array(e.recordCount*3),g=a?new Float32Array(e.recordCount*3):void 0,m=c&&(c.kind==="Float"||c.kind==="Integer"||c.kind==="ScaledInteger")?new Uint16Array(e.recordCount):void 0,u=d&&(d.kind==="Integer"||d.kind==="ScaledInteger")?new Uint8Array(e.recordCount):void 0;let p=e.binaryFileOffset;const l=new DataView(t.buffer,t.byteOffset,t.byteLength);let b=0;for(;b<e.recordCount&&p<t.length;){if(p+4>t.length)throw new Error("E57: truncated DataPacket header");const w=l.getUint8(p),x=l.getUint16(p+2,!0)+1;if(w!==1){p+=x;continue}const y=p+x;if(y>t.length)throw new Error("E57: DataPacket runs past end of logical bytes");const E=y;if(p+6>E)throw new Error("E57: truncated DataPacket header");const M=l.getUint16(p+4,!0);if(M!==e.prototype.length)throw new Error(`E57: packet bytestreamCount (${M}) ≠ prototype length (${e.prototype.length})`);const L=[];let S=p+6;for(let C=0;C<M;C++){if(S+2>E)throw new Error("E57: truncated bytestream length table");L.push(l.getUint16(S,!0)),S+=2}const F=new Map;let k=S;for(let C=0;C<M;C++){if(k+L[C]>E)throw new Error(`E57: bytestream ${e.prototype[C].name} (${L[C]} bytes) runs past packet payload at offset ${k}`);F.set(e.prototype[C].name,{start:k,length:L[C]}),k+=L[C]}const V=F.get("cartesianX"),Z=F.get("cartesianY"),_=F.get("cartesianZ"),j=v(n,V.length),H=v(o,Z.length),J=v(r,_.length),K=Math.min(j,H,J),I=Math.min(K,e.recordCount-b);D(t,l,n,V.start,h,b,I,0),D(t,l,o,Z.start,h,b,I,1),D(t,l,r,_.start,h,b,I,2),g&&i&&s&&f&&(z(l,F.get("colorRed").start,i,g,b,I,0,t),z(l,F.get("colorGreen").start,s,g,b,I,1,t),z(l,F.get("colorBlue").start,f,g,b,I,2,t)),m&&c&&ut(t,l,c,F.get("intensity").start,m,b,I),u&&d&&lt(t,l,d,F.get("classification").start,u,b,I),b+=I,p=y}return b<e.recordCount?Y(h.subarray(0,b*3),g?.subarray(0,b*3),m?.subarray(0,b),u?.subarray(0,b),b):Y(h,g,m,u,e.recordCount)}function z(t,e,n,o,r,i,s,f){if(n.kind==="Float"){const a=n.precision==="single"?4:8;for(let c=0;c<i;c++){const d=a===4?t.getFloat32(e+c*a,!0):t.getFloat64(e+c*a,!0);o[(r+c)*3+s]=X(d)}}else if(n.kind==="Integer"){const a=n.minimum??0,c=n.maximum??255,d=c-a,h=d>0?1/d:1,m=Math.max(Math.abs(a),Math.abs(c))>255?2:1,u=a<0;for(let p=0;p<i;p++){const l=e+p*m,b=m===2?u?t.getInt16(l,!0):t.getUint16(l,!0):u?t.getInt8(l):t.getUint8(l);o[(r+p)*3+s]=X((b-a)*h)}}else{const a=n.minimum??0,d=(n.maximum??1)-a,h=d>0?1/d:1,g=O(n),m=e*8;for(let u=0;u<i;u++){const p=$(f,m+u*g,g);o[(r+u)*3+s]=X(p*h)}}}function D(t,e,n,o,r,i,s,f){if(n.kind==="Float"){const m=n.precision==="single"?4:8;if(m===4)for(let u=0;u<s;u++)r[(i+u)*3+f]=e.getFloat32(o+u*m,!0);else for(let u=0;u<s;u++)r[(i+u)*3+f]=e.getFloat64(o+u*m,!0);return}const a=O(n),c=n.minimum??0,d=n.scale??1,h=n.offset??0,g=o*8;for(let m=0;m<s;m++){const u=$(t,g+m*a,a);r[(i+m)*3+f]=(u+c)*d+h}}function ut(t,e,n,o,r,i,s){if(n.kind==="Float"){const m=n.precision==="single"?4:8;for(let u=0;u<s;u++){const p=m===4?e.getFloat32(o+u*m,!0):e.getFloat64(o+u*m,!0);r[i+u]=Math.min(65535,Math.max(0,Math.round(p*65535)))}return}if(n.kind==="Integer"){const m=n.minimum??0,u=n.maximum??65535,p=u-m,l=p>0?1/p:1,w=Math.max(Math.abs(m),Math.abs(u))>255?2:1,x=m<0;for(let y=0;y<s;y++){const E=o+y*w,L=((w===2?x?e.getInt16(E,!0):e.getUint16(E,!0):x?e.getInt8(E):e.getUint8(E))-m)*l;r[i+y]=Math.min(65535,Math.max(0,Math.round(L*65535)))}return}const f=O(n),a=n.minimum??0,d=(n.maximum??a)-a,h=d>0?1/d:1,g=o*8;for(let m=0;m<s;m++){const u=$(t,g+m*f,f);r[i+m]=Math.min(65535,Math.max(0,Math.round(u*h*65535)))}}function O(t){const e=t.minimum??0,n=t.maximum??e,o=Math.max(0,n-e);if(o===0)return 1;const r=Math.ceil(Math.log2(o+1));if(r>53)throw new Error(`E57: ScaledInteger field "${t.name}" needs ${r} bits — exceeds the 53-bit Number-precision limit`);return Math.max(1,r)}function v(t,e){if(t.kind==="Float"){const s=t.precision==="single"?4:8;return Math.floor(e/s)}if(t.kind==="ScaledInteger"){const s=O(t);return Math.floor(e*8/s)}const n=t.minimum??0,o=t.maximum??255,i=Math.max(Math.abs(n),Math.abs(o))>255?2:1;return Math.floor(e/i)}function $(t,e,n){let o=0,r=0,i=e>>>3,s=e&7;for(;r<n;){const f=8-s,a=Math.min(f,n-r),c=(1<<a)-1,d=t[i]>>>s&c;o+=d*Math.pow(2,r),r+=a,s=0,i++}return o}function Y(t,e,n,o,r){return{positions:new Float32Array(t),colors:e?new Float32Array(e):void 0,intensities:n?new Uint16Array(n):void 0,classifications:o?new Uint8Array(o):void 0,pointCount:r,bbox:T(t)}}function lt(t,e,n,o,r,i,s){if(n.kind==="Integer"){const d=n.minimum??0,h=n.maximum??255,m=Math.max(Math.abs(d),Math.abs(h))>255?2:1,u=d<0;for(let p=0;p<s;p++){const l=o+p*m,b=m===2?u?e.getInt16(l,!0):e.getUint16(l,!0):u?e.getInt8(l):e.getUint8(l);r[i+p]=Math.max(0,Math.min(255,b))}return}const f=O(n),a=n.minimum??0,c=o*8;for(let d=0;d<s;d++){const h=$(t,c+d*f,f);r[i+d]=Math.max(0,Math.min(255,h+a))}}function X(t){return t<0?0:t>1?1:t}function T(t){if(t.length<3)return{min:[0,0,0],max:[0,0,0]};let e=1/0,n=1/0,o=1/0,r=-1/0,i=-1/0,s=-1/0,f=!1;for(let a=0;a+2<t.length;a+=3){const c=t[a],d=t[a+1],h=t[a+2];!Number.isFinite(c)||!Number.isFinite(d)||!Number.isFinite(h)||(f=!0,c<e&&(e=c),c>r&&(r=c),d<n&&(n=d),d>i&&(i=d),h<o&&(o=h),h>s&&(s=h))}return f?{min:[e,n,o],max:[r,i,s]}:{min:[0,0,0],max:[0,0,0]}}const ft=new TextDecoder;function mt(t){const e=Q(t),n=tt(t,e.pageSize),o=n.subarray(e.xmlLogicalOffset,e.xmlLogicalOffset+e.xmlLogicalLength),r=ft.decode(o),i=st(r);if(i.length===0)return null;const s=i.map(u=>{const p=nt(n,u.binaryFileOffset,e.pageSize),l=ct(n,{...u,binaryFileOffset:p});return u.pose&&(dt(l.positions,l.pointCount,u.pose),l.bbox=T(l.positions)),l});if(s.length===1)return s[0];let f=0;for(const u of s)f+=u.pointCount;const a=new Float32Array(f*3),c=s.some(u=>u.colors),d=s.some(u=>u.intensities),h=c?new Float32Array(f*3):void 0,g=d?new Uint16Array(f):void 0;let m=0;for(const u of s)a.set(u.positions,m*3),h&&u.colors&&h.set(u.colors,m*3),g&&u.intensities&&g.set(u.intensities,m),m+=u.pointCount;return{positions:a,colors:h,intensities:g,pointCount:f,bbox:T(a)}}function dt(t,e,n){const{w:o,x:r,y:i,z:s}=n.rotation,f=n.translation.x,a=n.translation.y,c=n.translation.z,d=1-2*(i*i+s*s),h=2*(r*i-o*s),g=2*(r*s+o*i),m=2*(r*i+o*s),u=1-2*(r*r+s*s),p=2*(i*s-o*r),l=2*(r*s-o*i),b=2*(i*s+o*r),w=1-2*(r*r+i*i);for(let x=0;x<e;x++){const y=t[x*3],E=t[x*3+1],M=t[x*3+2];t[x*3]=d*y+h*E+g*M+f,t[x*3+1]=m*y+u*E+p*M+a,t[x*3+2]=l*y+b*E+w*M+c}}class gt{blob;downsample;label;chunk=null;served=!1;constructor(e,n={}){this.blob=e,this.downsample=n.downsample??{stride:1},this.label=n.label}async open(e){B(e);const n=await this.blob.arrayBuffer();B(e);const o=mt(new Uint8Array(n));if(!o)throw new Error("E57: file contains no Data3D scans");return this.chunk=ht(o,this.downsample.stride),{totalPointCount:this.chunk.pointCount,bbox:this.chunk.bbox,hasColor:!!this.chunk.colors,hasClassification:!!this.chunk.classifications,hasIntensity:!!this.chunk.intensities,label:this.label}}async next(e,n){return B(n),!this.chunk||this.served?null:(this.served=!0,this.chunk)}close(){this.chunk=null,this.served=!1}}function ht(t,e){const n=Math.max(1,e|0);if(n===1)return t;const o=Math.ceil(t.pointCount/n),r=new Float32Array(o*3),i=t.colors?new Float32Array(o*3):void 0,s=t.intensities?new Uint16Array(o):void 0,f=t.classifications?new Uint8Array(o):void 0;let a=0;for(let c=0;c<t.pointCount;c+=n)r[a*3]=t.positions[c*3],r[a*3+1]=t.positions[c*3+1],r[a*3+2]=t.positions[c*3+2],i&&t.colors&&(i[a*3]=t.colors[c*3],i[a*3+1]=t.colors[c*3+1],i[a*3+2]=t.colors[c*3+2]),s&&t.intensities&&(s[a]=t.intensities[c]),f&&t.classifications&&(f[a]=t.classifications[c]),a++;return{positions:r,colors:i,intensities:s,classifications:f,pointCount:o,bbox:t.bbox}}function B(t){if(t?.aborted)throw new DOMException("Aborted","AbortError")}export{gt as E57StreamingSource};
@@ -0,0 +1 @@
1
+ var Ae=(()=>{var j=import.meta.url;return(function(fe={}){var H,r=fe,z,R,Te=new Promise((e,t)=>{z=e,R=t}),ce=typeof window=="object",F=typeof importScripts=="function";function A(e){e={log:e||function(){}};for(const t of A.Ia)t(e);return r.quickJSEmscriptenExtensions=e}A.Ia=[],r.quickjsEmscriptenInit=A,A.Ia.push(e=>{e.getWasmMemory=function(){return g}});var k=Object.assign({},r),W="./this.program",c="",V,M;(ce||F)&&(F?c=self.location.href:typeof document<"u"&&document.currentScript&&(c=document.currentScript.src),j&&(c=j),c.startsWith("blob:")?c="":c=c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1),F&&(M=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),V=e=>fetch(e,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(Error(t.status+" : "+t.url))));var me=r.print||console.log.bind(console),w=r.printErr||console.error.bind(console);Object.assign(r,k),k=null,r.thisProgram&&(W=r.thisProgram);var P=r.wasmBinary,g,E=!1,b,G,S,f,Q;function J(){var e=g.buffer;r.HEAP8=G=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAPU8=S=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAP32=f=new Int32Array(e),r.HEAPU32=Q=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.wasmMemory?g=r.wasmMemory:g=new WebAssembly.Memory({initial:(r.INITIAL_MEMORY||16777216)/65536,maximum:32768}),J();var $=[],q=[],Y=[];function Qe(){var e=r.preRun.shift();$.unshift(e)}var h=0,v=null;function D(e){throw r.onAbort?.(e),e="Aborted("+e+")",w(e),E=!0,b=1,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),R(e),e}var K=e=>e.startsWith("data:application/octet-stream;base64,"),I;function X(e){if(e==I&&P)return new Uint8Array(P);if(M)return M(e);throw"both async and sync fetching of the wasm failed"}function pe(e){return P?Promise.resolve().then(()=>X(e)):V(e).then(t=>new Uint8Array(t),()=>X(e))}function Z(e,t,n){return pe(e).then(a=>WebAssembly.instantiate(a,t)).then(n,a=>{w(`failed to asynchronously prepare wasm: ${a}`),D(a)})}function ge(e,t){var n=I;return P||typeof WebAssembly.instantiateStreaming!="function"||K(n)||typeof fetch!="function"?Z(n,e,t):fetch(n,{credentials:"same-origin"}).then(a=>WebAssembly.instantiateStreaming(a,e).then(t,function(i){return w(`wasm streaming compile failed: ${i}`),w("falling back to ArrayBuffer instantiation"),Z(n,e,t)}))}function ee(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var C=e=>{for(;0<e.length;)e.shift()(r)},x=r.noExitRuntime||!0,te=typeof TextDecoder<"u"?new TextDecoder:void 0,m=(e,t,n)=>{var a=t+n;for(n=t;e[n]&&!(n>=a);)++n;if(16<n-t&&e.buffer&&te)return te.decode(e.subarray(t,n));for(a="";t<n;){var i=e[t++];if(i&128){var _=e[t++]&63;if((i&224)==192)a+=String.fromCharCode((i&31)<<6|_);else{var u=e[t++]&63;i=(i&240)==224?(i&15)<<12|_<<6|u:(i&7)<<18|_<<12|u<<6|e[t++]&63,65536>i?a+=String.fromCharCode(i):(i-=65536,a+=String.fromCharCode(55296|i>>10,56320|i&1023))}}else a+=String.fromCharCode(i)}return a},he=[0,31,60,91,121,152,182,213,244,274,305,335],we=[0,31,59,90,120,151,181,212,243,273,304,334],d={},re=e=>{if(!(e instanceof ee||e=="unwind"))throw e},L=0,ne=e=>{throw b=e,x||0<L||(r.onExit?.(e),E=!0),new ee(e)},ye=e=>{if(!E)try{if(e(),!(x||0<L))try{b=e=b,ne(e)}catch(t){re(t)}}catch(t){re(t)}},ae;ae=()=>performance.now();var y=(e,t,n)=>{var a=S;if(!(0<n))return 0;var i=t;n=t+n-1;for(var _=0;_<e.length;++_){var u=e.charCodeAt(_);if(55296<=u&&57343>=u){var s=e.charCodeAt(++_);u=65536+((u&1023)<<10)|s&1023}if(127>=u){if(t>=n)break;a[t++]=u}else{if(2047>=u){if(t+1>=n)break;a[t++]=192|u>>6}else{if(65535>=u){if(t+2>=n)break;a[t++]=224|u>>12}else{if(t+3>=n)break;a[t++]=240|u>>18,a[t++]=128|u>>12&63}a[t++]=128|u>>6&63}a[t++]=128|u&63}}return a[t]=0,t-i},O={},oe=()=>{if(!U){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:W||"./this.program"},t;for(t in O)O[t]===void 0?delete e[t]:e[t]=O[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);U=n}return U},U,ve=[null,[],[]],ie=e=>{for(var t=0,n=0;n<e.length;++n){var a=e.charCodeAt(n);127>=a?t++:2047>=a?t+=2:55296<=a&&57343>=a?(t+=4,++n):t+=3}return t},de=(e,t,n,a)=>{var i={string:l=>{var T=0;if(l!=null&&l!==0){T=ie(l)+1;var Se=B(T);y(l,Se,T),T=Se}return T},array:l=>{var T=B(l.length);return G.set(l,T),T}};e=r["_"+e];var _=[],u=0;if(a)for(var s=0;s<a.length;s++){var p=i[n[s]];p?(u===0&&(u=se()),_[s]=p(a[s])):_[s]=a[s]}return n=e(..._),n=(function(l){return u!==0&&ue(u),t==="string"?l?m(S,l):"":t==="boolean"?!!l:l})(n)},Re={b:(e,t,n,a)=>{D(`Assertion failed: ${e?m(S,e):""}, at: `+[t?t?m(S,t):"":"unknown filename",n,a?a?m(S,a):"":"unknown function"])},q:()=>{D("")},n:()=>{x=!1,L=0},j:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),f[n>>2]=e.getSeconds(),f[n+4>>2]=e.getMinutes(),f[n+8>>2]=e.getHours(),f[n+12>>2]=e.getDate(),f[n+16>>2]=e.getMonth(),f[n+20>>2]=e.getFullYear()-1900,f[n+24>>2]=e.getDay(),t=e.getFullYear(),f[n+28>>2]=(t%4!==0||t%100===0&&t%400!==0?we:he)[e.getMonth()]+e.getDate()-1|0,f[n+36>>2]=-(60*e.getTimezoneOffset()),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var a=new Date(e.getFullYear(),0,1).getTimezoneOffset();f[n+32>>2]=(t!=a&&e.getTimezoneOffset()==Math.min(a,t))|0},l:(e,t)=>{if(d[e]&&(clearTimeout(d[e].id),delete d[e]),!t)return 0;var n=setTimeout(()=>{delete d[e],ye(()=>_e(e,ae()))},t);return d[e]={id:n,Na:t},0},o:(e,t,n,a)=>{var i=new Date().getFullYear(),_=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),Q[e>>2]=60*Math.max(_,i),f[t>>2]=+(_!=i),t=u=>{var s=Math.abs(u);return`UTC${0<=u?"-":"+"}${String(Math.floor(s/60)).padStart(2,"0")}${String(s%60).padStart(2,"0")}`},e=t(_),t=t(i),i<_?(y(e,n,17),y(t,a,17)):(y(e,a,17),y(t,n,17))},p:()=>Date.now(),m:e=>{var t=S.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var a=t*(1+.2/n);a=Math.min(a,e+100663296);e:{a=(Math.min(2147483648,65536*Math.ceil(Math.max(e,a)/65536))-g.buffer.byteLength+65535)/65536;try{g.grow(a),J();var i=1;break e}catch{}i=void 0}if(i)return!0}return!1},f:(e,t)=>{var n=0;return oe().forEach((a,i)=>{var _=t+n;for(i=Q[e+4*i>>2]=_,_=0;_<a.length;++_)G[i++]=a.charCodeAt(_);G[i]=0,n+=a.length+1}),0},g:(e,t)=>{var n=oe();Q[e>>2]=n.length;var a=0;return n.forEach(i=>a+=i.length+1),Q[t>>2]=a,0},e:()=>52,k:function(){return 70},d:(e,t,n,a)=>{for(var i=0,_=0;_<n;_++){var u=Q[t>>2],s=Q[t+4>>2];t+=8;for(var p=0;p<s;p++){var l=S[u+p],T=ve[e];l===0||l===10?((e===1?me:w)(m(T,0)),T.length=0):T.push(l)}i+=s}return Q[a>>2]=i,0},a:g,c:ne,s:function(e,t,n,a,i){return r.callbacks.callFunction(void 0,e,t,n,a,i)},r:function(e){return r.callbacks.shouldInterrupt(void 0,e)},i:function(e,t,n){return n=n?m(S,n):"",r.callbacks.loadModuleSource(void 0,e,t,n)},h:function(e,t,n,a){return n=n?m(S,n):"",a=a?m(S,a):"",r.callbacks.normalizeModule(void 0,e,t,n,a)}},o=(function(){function e(n){return o=n.exports,q.unshift(o.t),h--,r.monitorRunDependencies?.(h),h==0&&v&&(n=v,v=null,n()),o}var t={a:Re};if(h++,r.monitorRunDependencies?.(h),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(n){w(`Module.instantiateWasm callback failed with error: ${n}`),R(n)}return I||=r.locateFile?K("emscripten-module.wasm")?"emscripten-module.wasm":r.locateFile?r.locateFile("emscripten-module.wasm",c):c+"emscripten-module.wasm":new URL("/assets/emscripten-module-NWak2PoB.wasm",import.meta.url).href,ge(t,function(n){e(n.instance)}).catch(R),{}})();r._malloc=e=>(r._malloc=o.u)(e),r._QTS_Throw=(e,t)=>(r._QTS_Throw=o.v)(e,t),r._QTS_NewError=e=>(r._QTS_NewError=o.w)(e),r._QTS_RuntimeSetMemoryLimit=(e,t)=>(r._QTS_RuntimeSetMemoryLimit=o.x)(e,t),r._QTS_RuntimeComputeMemoryUsage=(e,t)=>(r._QTS_RuntimeComputeMemoryUsage=o.y)(e,t),r._QTS_RuntimeDumpMemoryUsage=e=>(r._QTS_RuntimeDumpMemoryUsage=o.z)(e),r._QTS_RecoverableLeakCheck=()=>(r._QTS_RecoverableLeakCheck=o.A)(),r._QTS_BuildIsSanitizeLeak=()=>(r._QTS_BuildIsSanitizeLeak=o.B)(),r._QTS_RuntimeSetMaxStackSize=(e,t)=>(r._QTS_RuntimeSetMaxStackSize=o.C)(e,t),r._QTS_GetUndefined=()=>(r._QTS_GetUndefined=o.D)(),r._QTS_GetNull=()=>(r._QTS_GetNull=o.E)(),r._QTS_GetFalse=()=>(r._QTS_GetFalse=o.F)(),r._QTS_GetTrue=()=>(r._QTS_GetTrue=o.G)(),r._QTS_NewRuntime=()=>(r._QTS_NewRuntime=o.H)(),r._QTS_FreeRuntime=e=>(r._QTS_FreeRuntime=o.I)(e),r._free=e=>(r._free=o.J)(e),r._QTS_NewContext=(e,t)=>(r._QTS_NewContext=o.K)(e,t),r._QTS_FreeContext=e=>(r._QTS_FreeContext=o.L)(e),r._QTS_FreeValuePointer=(e,t)=>(r._QTS_FreeValuePointer=o.M)(e,t),r._QTS_FreeValuePointerRuntime=(e,t)=>(r._QTS_FreeValuePointerRuntime=o.N)(e,t),r._QTS_FreeVoidPointer=(e,t)=>(r._QTS_FreeVoidPointer=o.O)(e,t),r._QTS_FreeCString=(e,t)=>(r._QTS_FreeCString=o.P)(e,t),r._QTS_DupValuePointer=(e,t)=>(r._QTS_DupValuePointer=o.Q)(e,t),r._QTS_NewObject=e=>(r._QTS_NewObject=o.R)(e),r._QTS_NewObjectProto=(e,t)=>(r._QTS_NewObjectProto=o.S)(e,t),r._QTS_NewArray=e=>(r._QTS_NewArray=o.T)(e),r._QTS_NewArrayBuffer=(e,t,n)=>(r._QTS_NewArrayBuffer=o.U)(e,t,n),r._QTS_NewFloat64=(e,t)=>(r._QTS_NewFloat64=o.V)(e,t),r._QTS_GetFloat64=(e,t)=>(r._QTS_GetFloat64=o.W)(e,t),r._QTS_NewString=(e,t)=>(r._QTS_NewString=o.X)(e,t),r._QTS_GetString=(e,t)=>(r._QTS_GetString=o.Y)(e,t),r._QTS_GetArrayBuffer=(e,t)=>(r._QTS_GetArrayBuffer=o.Z)(e,t),r._QTS_GetArrayBufferLength=(e,t)=>(r._QTS_GetArrayBufferLength=o._)(e,t),r._QTS_NewSymbol=(e,t,n)=>(r._QTS_NewSymbol=o.$)(e,t,n),r._QTS_GetSymbolDescriptionOrKey=(e,t)=>(r._QTS_GetSymbolDescriptionOrKey=o.aa)(e,t),r._QTS_IsGlobalSymbol=(e,t)=>(r._QTS_IsGlobalSymbol=o.ba)(e,t),r._QTS_IsJobPending=e=>(r._QTS_IsJobPending=o.ca)(e),r._QTS_ExecutePendingJob=(e,t,n)=>(r._QTS_ExecutePendingJob=o.da)(e,t,n),r._QTS_GetProp=(e,t,n)=>(r._QTS_GetProp=o.ea)(e,t,n),r._QTS_GetPropNumber=(e,t,n)=>(r._QTS_GetPropNumber=o.fa)(e,t,n),r._QTS_SetProp=(e,t,n,a)=>(r._QTS_SetProp=o.ga)(e,t,n,a),r._QTS_DefineProp=(e,t,n,a,i,_,u,s,p)=>(r._QTS_DefineProp=o.ha)(e,t,n,a,i,_,u,s,p),r._QTS_GetOwnPropertyNames=(e,t,n,a,i)=>(r._QTS_GetOwnPropertyNames=o.ia)(e,t,n,a,i),r._QTS_Call=(e,t,n,a,i)=>(r._QTS_Call=o.ja)(e,t,n,a,i),r._QTS_ResolveException=(e,t)=>(r._QTS_ResolveException=o.ka)(e,t),r._QTS_Dump=(e,t)=>(r._QTS_Dump=o.la)(e,t),r._QTS_Eval=(e,t,n,a,i,_)=>(r._QTS_Eval=o.ma)(e,t,n,a,i,_),r._QTS_GetModuleNamespace=(e,t)=>(r._QTS_GetModuleNamespace=o.na)(e,t),r._QTS_Typeof=(e,t)=>(r._QTS_Typeof=o.oa)(e,t),r._QTS_GetLength=(e,t,n)=>(r._QTS_GetLength=o.pa)(e,t,n),r._QTS_IsEqual=(e,t,n,a)=>(r._QTS_IsEqual=o.qa)(e,t,n,a),r._QTS_GetGlobalObject=e=>(r._QTS_GetGlobalObject=o.ra)(e),r._QTS_NewPromiseCapability=(e,t)=>(r._QTS_NewPromiseCapability=o.sa)(e,t),r._QTS_PromiseState=(e,t)=>(r._QTS_PromiseState=o.ta)(e,t),r._QTS_PromiseResult=(e,t)=>(r._QTS_PromiseResult=o.ua)(e,t),r._QTS_TestStringArg=e=>(r._QTS_TestStringArg=o.va)(e),r._QTS_GetDebugLogEnabled=e=>(r._QTS_GetDebugLogEnabled=o.wa)(e),r._QTS_SetDebugLogEnabled=(e,t)=>(r._QTS_SetDebugLogEnabled=o.xa)(e,t),r._QTS_BuildIsDebug=()=>(r._QTS_BuildIsDebug=o.ya)(),r._QTS_BuildIsAsyncify=()=>(r._QTS_BuildIsAsyncify=o.za)(),r._QTS_NewFunction=(e,t,n)=>(r._QTS_NewFunction=o.Aa)(e,t,n),r._QTS_ArgvGetJSValueConstPointer=(e,t)=>(r._QTS_ArgvGetJSValueConstPointer=o.Ba)(e,t),r._QTS_RuntimeEnableInterruptHandler=e=>(r._QTS_RuntimeEnableInterruptHandler=o.Ca)(e),r._QTS_RuntimeDisableInterruptHandler=e=>(r._QTS_RuntimeDisableInterruptHandler=o.Da)(e),r._QTS_RuntimeEnableModuleLoader=(e,t)=>(r._QTS_RuntimeEnableModuleLoader=o.Ea)(e,t),r._QTS_RuntimeDisableModuleLoader=e=>(r._QTS_RuntimeDisableModuleLoader=o.Fa)(e),r._QTS_bjson_encode=(e,t)=>(r._QTS_bjson_encode=o.Ga)(e,t),r._QTS_bjson_decode=(e,t)=>(r._QTS_bjson_decode=o.Ha)(e,t);var _e=(e,t)=>(_e=o.Ja)(e,t),ue=e=>(ue=o.Ka)(e),B=e=>(B=o.La)(e),se=()=>(se=o.Ma)();r.cwrap=(e,t,n,a)=>{var i=!n||n.every(_=>_==="number"||_==="boolean");return t!=="string"&&i&&!a?r["_"+e]:(..._)=>de(e,t,n,_)},r.UTF8ToString=(e,t)=>e?m(S,e,t):"",r.stringToUTF8=(e,t,n)=>y(e,t,n),r.lengthBytesUTF8=ie;var N;v=function e(){N||le(),N||(v=e)};function le(){function e(){if(!N&&(N=!0,r.calledRun=!0,!E)){if(C(q),z(r),r.onRuntimeInitialized?.(),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var t=r.postRun.shift();Y.unshift(t)}C(Y)}}if(!(0<h)){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Qe();C($),0<h||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),e()},1)):e())}}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return le(),H=Te,H})})();export{Ae as default};