@vertexvis/viewer 1.1.1-testing.4 → 1.1.1-testing.5

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 (181) hide show
  1. package/dist/cjs/{config-BY0v6BSK.js → config-OELTgslY.js} +3 -3
  2. package/dist/cjs/{config-BY0v6BSK.js.map → config-OELTgslY.js.map} +1 -1
  3. package/dist/cjs/{entities-CEaa12yP.js → entities-rj-TEPKc.js} +4 -4
  4. package/dist/cjs/{entities-CEaa12yP.js.map → entities-rj-TEPKc.js.map} +1 -1
  5. package/dist/cjs/{geometry_pb-EVfAEuPO.js → geometry_pb-asn2mNvW.js} +3 -3
  6. package/dist/cjs/{geometry_pb-EVfAEuPO.js.map → geometry_pb-asn2mNvW.js.map} +1 -1
  7. package/dist/cjs/index.cjs.js +5 -5
  8. package/dist/cjs/{queries-LthBzEHD.js → queries-e19TP_oF.js} +4 -4
  9. package/dist/cjs/{queries-LthBzEHD.js.map → queries-e19TP_oF.js.map} +1 -1
  10. package/dist/cjs/{regl-component-B_JaaVlv.js → regl-component-DjVaO3t3.js} +3 -3
  11. package/dist/cjs/{regl-component-B_JaaVlv.js.map → regl-component-DjVaO3t3.js.map} +1 -1
  12. package/dist/cjs/{representation_pb-B6XR10pQ.js → representation_pb-BVBPrHLf.js} +3 -3
  13. package/dist/cjs/{representation_pb-B6XR10pQ.js.map → representation_pb-BVBPrHLf.js.map} +1 -1
  14. package/dist/cjs/{streamAttributes-nCF7u7lv.js → streamAttributes-M3UUIO3l.js} +117 -94
  15. package/dist/cjs/streamAttributes-M3UUIO3l.js.map +1 -0
  16. package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js +1 -1
  17. package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js.map +1 -1
  18. package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +2 -2
  19. package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js.map +1 -1
  20. package/dist/cjs/vertex-scene-tree.cjs.entry.js +2 -2
  21. package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +1 -1
  22. package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +2 -2
  23. package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +2 -2
  24. package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +2 -2
  25. package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +2 -2
  26. package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +4 -4
  27. package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +3 -3
  28. package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js +2 -2
  29. package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js.map +1 -1
  30. package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +3 -3
  31. package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js.map +1 -1
  32. package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +1 -1
  33. package/dist/cjs/vertex-viewer.cjs.entry.js +4 -4
  34. package/dist/collection/components/scene-tree-search/scene-tree-search.js +1 -1
  35. package/dist/collection/components/scene-tree-search/scene-tree-search.js.map +1 -1
  36. package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.js +1 -1
  37. package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.js.map +1 -1
  38. package/dist/collection/components/viewer-pin-label/viewer-pin-label.js +2 -2
  39. package/dist/collection/components/viewer-pin-label/viewer-pin-label.js.map +1 -1
  40. package/dist/collection/components/viewer-transform-widget/viewer-transform-widget-components.js +1 -1
  41. package/dist/collection/components/viewer-transform-widget/viewer-transform-widget-components.js.map +1 -1
  42. package/dist/collection/workers/png-decoder-pool.js +4 -3
  43. package/dist/collection/workers/png-decoder-pool.js.map +1 -1
  44. package/dist/components/index.js +1 -1
  45. package/dist/components/{p-COznr3CH.js → p-5bk1mHRt.js} +2 -2
  46. package/dist/components/{p-D3bzgaCV.js → p-B8530k7R.js} +2 -2
  47. package/dist/components/{p-CWcvgy8e.js → p-BCuMPvZO.js} +2 -2
  48. package/dist/components/{p-DTwJX9HL.js → p-BgzjmANj.js} +2 -2
  49. package/dist/components/{p-DTwJX9HL.js.map → p-BgzjmANj.js.map} +1 -1
  50. package/dist/components/p-BjvjKoy7.js +5 -0
  51. package/dist/components/p-BjvjKoy7.js.map +1 -0
  52. package/dist/components/{p-Cxz4L6FA.js → p-Bwtyddca.js} +2 -2
  53. package/dist/components/{p-Ca253f0h.js → p-Bx42CNGV.js} +2 -2
  54. package/dist/components/p-C86HMDzi.js +5 -0
  55. package/dist/components/{p-Y8W_BXUk.js.map → p-C86HMDzi.js.map} +1 -1
  56. package/dist/components/p-CSVgoQU8.js +5 -0
  57. package/dist/components/{p-Cku0WCYo.js.map → p-CSVgoQU8.js.map} +1 -1
  58. package/dist/components/{p-D3in41xo.js → p-CTi-0-dI.js} +2 -2
  59. package/dist/components/{p-D1Vdomj_.js → p-D_h07qsA.js} +2 -2
  60. package/dist/components/{p-BNRm88jS.js → p-KidjtXKE.js} +2 -2
  61. package/dist/components/vertex-scene-tree-search.js +1 -1
  62. package/dist/components/vertex-scene-tree-table-cell.js +1 -1
  63. package/dist/components/vertex-scene-tree-table-cell.js.map +1 -1
  64. package/dist/components/vertex-scene-tree.js +1 -1
  65. package/dist/components/vertex-viewer-dom-renderer.js +1 -1
  66. package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
  67. package/dist/components/vertex-viewer-measurement-details.js +1 -1
  68. package/dist/components/vertex-viewer-measurement-distance.js +1 -1
  69. package/dist/components/vertex-viewer-measurement-overlays.js +1 -1
  70. package/dist/components/vertex-viewer-measurement-precise.js +1 -1
  71. package/dist/components/vertex-viewer-pin-group.js +1 -1
  72. package/dist/components/vertex-viewer-pin-label.js +1 -1
  73. package/dist/components/vertex-viewer-pin-tool.js +1 -1
  74. package/dist/components/vertex-viewer-transform-widget.js +1 -1
  75. package/dist/components/vertex-viewer-transform-widget.js.map +1 -1
  76. package/dist/components/vertex-viewer-view-cube.js +1 -1
  77. package/dist/components/vertex-viewer.js +1 -1
  78. package/dist/esm/{config-ss9ha12b.js → config-Cqrcty7U.js} +3 -3
  79. package/dist/esm/{config-ss9ha12b.js.map → config-Cqrcty7U.js.map} +1 -1
  80. package/dist/esm/{entities-DEFAhYdV.js → entities-CawBZH7i.js} +4 -4
  81. package/dist/esm/{entities-DEFAhYdV.js.map → entities-CawBZH7i.js.map} +1 -1
  82. package/dist/esm/{geometry_pb-D7fM1PYG.js → geometry_pb-COdZQiRi.js} +3 -3
  83. package/dist/esm/{geometry_pb-D7fM1PYG.js.map → geometry_pb-COdZQiRi.js.map} +1 -1
  84. package/dist/esm/index.js +5 -5
  85. package/dist/esm/index.mjs +5 -5
  86. package/dist/esm/{queries-BcmE5Zbq.js → queries-B4XotYyr.js} +4 -4
  87. package/dist/esm/{queries-BcmE5Zbq.js.map → queries-B4XotYyr.js.map} +1 -1
  88. package/dist/esm/{regl-component-gIonUTBJ.js → regl-component-B1_h3_s8.js} +3 -3
  89. package/dist/esm/{regl-component-gIonUTBJ.js.map → regl-component-B1_h3_s8.js.map} +1 -1
  90. package/dist/esm/{representation_pb-Bf023NuN.js → representation_pb-C4MJfZMo.js} +3 -3
  91. package/dist/esm/{representation_pb-Bf023NuN.js.map → representation_pb-C4MJfZMo.js.map} +1 -1
  92. package/dist/esm/{streamAttributes-Bj2xDHfI.js → streamAttributes-BW9JzMeG.js} +116 -93
  93. package/dist/esm/streamAttributes-BW9JzMeG.js.map +1 -0
  94. package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js +1 -1
  95. package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js.map +1 -1
  96. package/dist/esm/vertex-scene-tree-table-cell.entry.js +2 -2
  97. package/dist/esm/vertex-scene-tree-table-cell.entry.js.map +1 -1
  98. package/dist/esm/vertex-scene-tree.entry.js +2 -2
  99. package/dist/esm/vertex-viewer-dom-element_2.entry.js +1 -1
  100. package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +2 -2
  101. package/dist/esm/vertex-viewer-measurement-details.entry.js +2 -2
  102. package/dist/esm/vertex-viewer-measurement-distance.entry.js +2 -2
  103. package/dist/esm/vertex-viewer-measurement-line_2.entry.js +2 -2
  104. package/dist/esm/vertex-viewer-measurement-precise.entry.js +4 -4
  105. package/dist/esm/vertex-viewer-pin-group.entry.js +3 -3
  106. package/dist/esm/vertex-viewer-pin-label_2.entry.js +2 -2
  107. package/dist/esm/vertex-viewer-pin-label_2.entry.js.map +1 -1
  108. package/dist/esm/vertex-viewer-transform-widget.entry.js +3 -3
  109. package/dist/esm/vertex-viewer-transform-widget.entry.js.map +1 -1
  110. package/dist/esm/vertex-viewer-view-cube.entry.js +1 -1
  111. package/dist/esm/vertex-viewer.entry.js +4 -4
  112. package/dist/types/workers/png-decoder-pool.d.ts +0 -1
  113. package/dist/viewer/index.esm.js +1 -1
  114. package/dist/viewer/{p-00540193.entry.js → p-1506f9a2.entry.js} +2 -2
  115. package/dist/viewer/{p-5cfb3047.entry.js → p-293d8f3f.entry.js} +2 -2
  116. package/dist/viewer/{p-9a39315d.entry.js → p-2faddbf8.entry.js} +2 -2
  117. package/dist/viewer/{p-7cb9c9bb.entry.js → p-36349a80.entry.js} +2 -2
  118. package/dist/viewer/p-36349a80.entry.js.map +1 -0
  119. package/dist/viewer/p-44395076.entry.js +5 -0
  120. package/dist/viewer/{p-e4913b06.entry.js.map → p-44395076.entry.js.map} +1 -1
  121. package/dist/viewer/{p-30a5748d.entry.js → p-45cc095e.entry.js} +2 -2
  122. package/dist/viewer/{p-d5a57757.entry.js → p-93311f46.entry.js} +2 -2
  123. package/dist/viewer/{p-CyiY_hsD.js → p-BEOO-Ypv.js} +2 -2
  124. package/dist/viewer/{p-CyiY_hsD.js.map → p-BEOO-Ypv.js.map} +1 -1
  125. package/dist/viewer/{p-CS8PfgcI.js → p-BJGbLthH.js} +2 -2
  126. package/dist/viewer/{p-CS8PfgcI.js.map → p-BJGbLthH.js.map} +1 -1
  127. package/dist/viewer/{p-D2IEHEGM.js → p-Br21pGVj.js} +2 -2
  128. package/dist/viewer/{p-D2IEHEGM.js.map → p-Br21pGVj.js.map} +1 -1
  129. package/dist/viewer/{p-kMZA0v7I.js → p-Bw_ryWU0.js} +2 -2
  130. package/dist/viewer/{p-kMZA0v7I.js.map → p-Bw_ryWU0.js.map} +1 -1
  131. package/dist/viewer/{p-DHK23fw4.js → p-C4_1Jc7H.js} +2 -2
  132. package/dist/viewer/{p-DHK23fw4.js.map → p-C4_1Jc7H.js.map} +1 -1
  133. package/dist/viewer/p-Cc3XhAoA.js +5 -0
  134. package/dist/viewer/p-Cc3XhAoA.js.map +1 -0
  135. package/dist/viewer/p-DYDhLlLS.js +5 -0
  136. package/dist/viewer/{p-_LpaX1ga.js.map → p-DYDhLlLS.js.map} +1 -1
  137. package/dist/viewer/{p-48020de1.entry.js → p-a94b626c.entry.js} +2 -2
  138. package/dist/viewer/{p-b79c295a.entry.js → p-ced98004.entry.js} +2 -2
  139. package/dist/viewer/{p-32a51a21.entry.js → p-dcb6ddfe.entry.js} +2 -2
  140. package/dist/viewer/p-dcb6ddfe.entry.js.map +1 -0
  141. package/dist/viewer/{p-cc835213.entry.js → p-ea45c3e9.entry.js} +2 -2
  142. package/dist/viewer/p-ebd9dd99.entry.js +5 -0
  143. package/dist/viewer/p-ebd9dd99.entry.js.map +1 -0
  144. package/dist/viewer/{p-edc2f914.entry.js → p-ecd594f2.entry.js} +2 -2
  145. package/dist/viewer/p-fec5a15d.entry.js +5 -0
  146. package/dist/viewer/p-fec5a15d.entry.js.map +1 -0
  147. package/dist/viewer/viewer.esm.js +1 -1
  148. package/package.json +9 -9
  149. package/dist/cjs/streamAttributes-nCF7u7lv.js.map +0 -1
  150. package/dist/components/p-Cku0WCYo.js +0 -5
  151. package/dist/components/p-CvEK3ZK1.js +0 -5
  152. package/dist/components/p-CvEK3ZK1.js.map +0 -1
  153. package/dist/components/p-Y8W_BXUk.js +0 -5
  154. package/dist/esm/streamAttributes-Bj2xDHfI.js.map +0 -1
  155. package/dist/viewer/p-32a51a21.entry.js.map +0 -1
  156. package/dist/viewer/p-4dd67d16.entry.js +0 -5
  157. package/dist/viewer/p-4dd67d16.entry.js.map +0 -1
  158. package/dist/viewer/p-7cb9c9bb.entry.js.map +0 -1
  159. package/dist/viewer/p-BhKTTmpL.js +0 -5
  160. package/dist/viewer/p-BhKTTmpL.js.map +0 -1
  161. package/dist/viewer/p-_LpaX1ga.js +0 -5
  162. package/dist/viewer/p-e4913b06.entry.js +0 -5
  163. package/dist/viewer/p-fd3a5837.entry.js +0 -5
  164. package/dist/viewer/p-fd3a5837.entry.js.map +0 -1
  165. /package/dist/components/{p-COznr3CH.js.map → p-5bk1mHRt.js.map} +0 -0
  166. /package/dist/components/{p-D3bzgaCV.js.map → p-B8530k7R.js.map} +0 -0
  167. /package/dist/components/{p-CWcvgy8e.js.map → p-BCuMPvZO.js.map} +0 -0
  168. /package/dist/components/{p-Cxz4L6FA.js.map → p-Bwtyddca.js.map} +0 -0
  169. /package/dist/components/{p-Ca253f0h.js.map → p-Bx42CNGV.js.map} +0 -0
  170. /package/dist/components/{p-D3in41xo.js.map → p-CTi-0-dI.js.map} +0 -0
  171. /package/dist/components/{p-D1Vdomj_.js.map → p-D_h07qsA.js.map} +0 -0
  172. /package/dist/components/{p-BNRm88jS.js.map → p-KidjtXKE.js.map} +0 -0
  173. /package/dist/viewer/{p-00540193.entry.js.map → p-1506f9a2.entry.js.map} +0 -0
  174. /package/dist/viewer/{p-5cfb3047.entry.js.map → p-293d8f3f.entry.js.map} +0 -0
  175. /package/dist/viewer/{p-9a39315d.entry.js.map → p-2faddbf8.entry.js.map} +0 -0
  176. /package/dist/viewer/{p-30a5748d.entry.js.map → p-45cc095e.entry.js.map} +0 -0
  177. /package/dist/viewer/{p-d5a57757.entry.js.map → p-93311f46.entry.js.map} +0 -0
  178. /package/dist/viewer/{p-48020de1.entry.js.map → p-a94b626c.entry.js.map} +0 -0
  179. /package/dist/viewer/{p-b79c295a.entry.js.map → p-ced98004.entry.js.map} +0 -0
  180. /package/dist/viewer/{p-cc835213.entry.js.map → p-ea45c3e9.entry.js.map} +0 -0
  181. /package/dist/viewer/{p-edc2f914.entry.js.map → p-ecd594f2.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
- import{e as a,f as s}from"./p-BNuMPeJ8.js";import{m as t}from"./p-CDM7zNn0.js";import{X as n,o as e}from"./p-BhKTTmpL.js";var o=a();const p=t.defineMapper(t.read(t.mapRequiredProp("start",n),t.mapRequiredProp("end",n)),(([a,s])=>({start:a,end:s})));const r=t.defineMapper(t.read(t.getProp("distance"),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("start"))),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("end")))),(([a,s,t])=>({type:"planar-distance",distance:a,plane1:s,plane2:t})));const c=t.defineMapper(t.read(t.getProp("angleInRadians"),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("start"))),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("end")))),(([a,s,t])=>({type:"planar-angle",angle:a,plane1:s,plane2:t})));const i=t.defineMapper(t.read(t.getProp("distance"),t.mapRequiredProp("closestPoint1",e),t.mapRequiredProp("closestPoint2",e)),(([a,s,t])=>({type:"minimum-distance",distance:a,point1:s,point2:t})));const l=t.defineMapper(t.read(t.getProp("area")),(([a])=>({type:"surface-area",area:a})));const m=t.mapProp("planarDistance",t.ifDefined(r));const d=t.mapProp("planarAngle",t.ifDefined(c));const u=t.mapProp("minimumDistance",t.ifDefined(i));const f=t.mapProp("totalSurfaceArea",t.ifDefined(l));const g=t.compose(t.pickFirst(m,d,u,f),t.required("Result field"));const y=t.defineMapper(t.read(t.mapRequiredProp("outcome",t.mapRequiredProp("resultsList",t.mapArray(g))),t.mapRequiredProp("outcome",t.getProp("isApproximate"))),(([a,s])=>({results:a,isApproximate:s})));const A=t.ifInvalidThrow(y);var j=s();export{A as a,j as g,o as m};
5
- //# sourceMappingURL=p-D2IEHEGM.js.map
4
+ import{e as a,f as s}from"./p-BNuMPeJ8.js";import{m as t}from"./p-CDM7zNn0.js";import{X as n,o as e}from"./p-Cc3XhAoA.js";var o=a();const p=t.defineMapper(t.read(t.mapRequiredProp("start",n),t.mapRequiredProp("end",n)),(([a,s])=>({start:a,end:s})));const c=t.defineMapper(t.read(t.getProp("distance"),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("start"))),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("end")))),(([a,s,t])=>({type:"planar-distance",distance:a,plane1:s,plane2:t})));const r=t.defineMapper(t.read(t.getProp("angleInRadians"),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("start"))),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("end")))),(([a,s,t])=>({type:"planar-angle",angle:a,plane1:s,plane2:t})));const i=t.defineMapper(t.read(t.getProp("distance"),t.mapRequiredProp("closestPoint1",e),t.mapRequiredProp("closestPoint2",e)),(([a,s,t])=>({type:"minimum-distance",distance:a,point1:s,point2:t})));const l=t.defineMapper(t.read(t.getProp("area")),(([a])=>({type:"surface-area",area:a})));const m=t.mapProp("planarDistance",t.ifDefined(c));const d=t.mapProp("planarAngle",t.ifDefined(r));const u=t.mapProp("minimumDistance",t.ifDefined(i));const f=t.mapProp("totalSurfaceArea",t.ifDefined(l));const A=t.compose(t.pickFirst(m,d,u,f),t.required("Result field"));const g=t.defineMapper(t.read(t.mapRequiredProp("outcome",t.mapRequiredProp("resultsList",t.mapArray(A))),t.mapRequiredProp("outcome",t.getProp("isApproximate"))),(([a,s])=>({results:a,isApproximate:s})));const y=t.ifInvalidThrow(g);var j=s();export{y as a,j as g,o as m};
5
+ //# sourceMappingURL=p-Br21pGVj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-D2IEHEGM.js","sources":["src/lib/measurement/mapper.ts"],"sourcesContent":["import { Plane } from '@vertexvis/geometry';\nimport type {\n MeasurementResult as PbMeasurementResult,\n MinimumDistanceResult as PbMinimumDistanceResult,\n PlanarAngleResult as PbPlanarAngleResult,\n PlanarDistanceResult as PbPlanarDistanceResult,\n PlanePair as PbPlanePair,\n SurfaceAreaResult as PbSurfaceAreaResult,\n} from '@vertexvis/scene-view-protos/core/protos/measurement_pb';\nimport type { MeasureResponse as PbMeasureResponse } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper as M } from '@vertexvis/utils';\n\nimport { fromPbPlane, fromPbVector3f } from '../mappers';\nimport { MeasurementOutcome } from './outcomes';\nimport {\n MeasurementResult,\n MinimumDistanceMeasurementResult,\n PlanarAngleMeasurementResult,\n PlanarDistanceMeasurementResult,\n SurfaceAreaMeasurementResult,\n} from './results';\n\nconst mapPlanePair: M.Func<\n PbPlanePair.AsObject,\n { start: Plane.Plane; end: Plane.Plane }\n> = M.defineMapper(\n M.read(\n M.mapRequiredProp('start', fromPbPlane),\n M.mapRequiredProp('end', fromPbPlane),\n ),\n ([start, end]) => ({ start, end }),\n);\n\nconst mapPlanarDistance: M.Func<\n PbPlanarDistanceResult.AsObject,\n PlanarDistanceMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('distance'),\n M.mapRequiredProp(\n 'planes',\n M.compose(mapPlanePair, M.requiredProp('start')),\n ),\n M.mapRequiredProp('planes', M.compose(mapPlanePair, M.requiredProp('end'))),\n ),\n ([distance, plane1, plane2]) => ({\n type: 'planar-distance',\n distance,\n plane1,\n plane2,\n }),\n);\n\nconst mapPlanarAngle: M.Func<\n PbPlanarAngleResult.AsObject,\n PlanarAngleMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('angleInRadians'),\n M.mapRequiredProp(\n 'planes',\n M.compose(mapPlanePair, M.requiredProp('start')),\n ),\n M.mapRequiredProp('planes', M.compose(mapPlanePair, M.requiredProp('end'))),\n ),\n ([angle, plane1, plane2]) => ({\n type: 'planar-angle',\n angle,\n plane1,\n plane2,\n }),\n);\n\nconst mapMinimumDistance: M.Func<\n PbMinimumDistanceResult.AsObject,\n MinimumDistanceMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('distance'),\n M.mapRequiredProp('closestPoint1', fromPbVector3f),\n M.mapRequiredProp('closestPoint2', fromPbVector3f),\n ),\n ([distance, point1, point2]) => ({\n type: 'minimum-distance',\n distance,\n point1,\n point2,\n }),\n);\n\nconst mapSurfaceArea: M.Func<\n PbSurfaceAreaResult.AsObject,\n SurfaceAreaMeasurementResult\n> = M.defineMapper(M.read(M.getProp('area')), ([area]) => ({\n type: 'surface-area',\n area,\n}));\n\nconst mapPlanarDistanceFromResult: M.Func<\n PbMeasurementResult.AsObject,\n PlanarDistanceMeasurementResult | undefined | null\n> = M.mapProp('planarDistance', M.ifDefined(mapPlanarDistance));\n\nconst mapPlanarAngleFromResult: M.Func<\n PbMeasurementResult.AsObject,\n PlanarAngleMeasurementResult | undefined | null\n> = M.mapProp('planarAngle', M.ifDefined(mapPlanarAngle));\n\nconst mapMinimumDistanceFromResult: M.Func<\n PbMeasurementResult.AsObject,\n MinimumDistanceMeasurementResult | undefined | null\n> = M.mapProp('minimumDistance', M.ifDefined(mapMinimumDistance));\n\nconst mapSurfaceAreaFromResult: M.Func<\n PbMeasurementResult.AsObject,\n SurfaceAreaMeasurementResult | undefined | null\n> = M.mapProp('totalSurfaceArea', M.ifDefined(mapSurfaceArea));\n\nconst mapMeasurementResult: M.Func<\n PbMeasurementResult.AsObject,\n MeasurementResult\n> = M.compose(\n M.pickFirst(\n mapPlanarDistanceFromResult,\n mapPlanarAngleFromResult,\n mapMinimumDistanceFromResult,\n mapSurfaceAreaFromResult,\n ),\n M.required('Result field'),\n);\n\nexport const mapMeasureResponse: M.Func<\n PbMeasureResponse.AsObject,\n MeasurementOutcome\n> = M.defineMapper(\n M.read(\n M.mapRequiredProp(\n 'outcome',\n M.mapRequiredProp('resultsList', M.mapArray(mapMeasurementResult)),\n ),\n M.mapRequiredProp('outcome', M.getProp('isApproximate')),\n ),\n ([results, isApproximate]) => ({ results, isApproximate }),\n);\n\nexport const mapMeasureResponseOrThrow = M.ifInvalidThrow(mapMeasureResponse);\n"],"names":["M"],"mappings":";;;;;;;;;AAsBA,MAAM,YAAY,GAGdA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,EACvCA,MAAC,CAAC,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,CACtC,EACD,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CACnC;AAED,MAAM,iBAAiB,GAGnBA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrBA,MAAC,CAAC,eAAe,CACf,QAAQ,EACRA,MAAC,CAAC,OAAO,CAAC,YAAY,EAAEA,MAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CACjD,EACDA,MAAC,CAAC,eAAe,CAAC,QAAQ,EAAEA,MAAC,CAAC,OAAO,CAAC,YAAY,EAAEA,MAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAC5E,EACD,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM;AAC/B,IAAA,IAAI,EAAE,iBAAiB;IACvB,QAAQ;IACR,MAAM;IACN,MAAM;AACP,CAAA,CAAC,CACH;AAED,MAAM,cAAc,GAGhBA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAC3BA,MAAC,CAAC,eAAe,CACf,QAAQ,EACRA,MAAC,CAAC,OAAO,CAAC,YAAY,EAAEA,MAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CACjD,EACDA,MAAC,CAAC,eAAe,CAAC,QAAQ,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,kBAAkB,EAAEA,MAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;AAE9D,MAAM,oBAAoB,GAGtBA,MAAC,CAAC,OAAO,CACXA,MAAC,CAAC,SAAS,CACT,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,CACzB,EACDA,MAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAC3B;AAEM,MAAM,kBAAkB,GAG3BA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,eAAe,CACf,SAAS,EACTA,MAAC,CAAC,eAAe,CAAC,aAAa,EAAEA,MAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CACnE,EACDA,MAAC,CAAC,eAAe,CAAC,SAAS,EAAEA,MAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CACzD,EACD,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAC3D;AAEM,MAAM,yBAAyB,GAAGA,MAAC,CAAC,cAAc,CAAC,kBAAkB;;;;;;"}
1
+ {"version":3,"file":"p-Br21pGVj.js","sources":["src/lib/measurement/mapper.ts"],"sourcesContent":["import { Plane } from '@vertexvis/geometry';\nimport type {\n MeasurementResult as PbMeasurementResult,\n MinimumDistanceResult as PbMinimumDistanceResult,\n PlanarAngleResult as PbPlanarAngleResult,\n PlanarDistanceResult as PbPlanarDistanceResult,\n PlanePair as PbPlanePair,\n SurfaceAreaResult as PbSurfaceAreaResult,\n} from '@vertexvis/scene-view-protos/core/protos/measurement_pb';\nimport type { MeasureResponse as PbMeasureResponse } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper as M } from '@vertexvis/utils';\n\nimport { fromPbPlane, fromPbVector3f } from '../mappers';\nimport { MeasurementOutcome } from './outcomes';\nimport {\n MeasurementResult,\n MinimumDistanceMeasurementResult,\n PlanarAngleMeasurementResult,\n PlanarDistanceMeasurementResult,\n SurfaceAreaMeasurementResult,\n} from './results';\n\nconst mapPlanePair: M.Func<\n PbPlanePair.AsObject,\n { start: Plane.Plane; end: Plane.Plane }\n> = M.defineMapper(\n M.read(\n M.mapRequiredProp('start', fromPbPlane),\n M.mapRequiredProp('end', fromPbPlane),\n ),\n ([start, end]) => ({ start, end }),\n);\n\nconst mapPlanarDistance: M.Func<\n PbPlanarDistanceResult.AsObject,\n PlanarDistanceMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('distance'),\n M.mapRequiredProp(\n 'planes',\n M.compose(mapPlanePair, M.requiredProp('start')),\n ),\n M.mapRequiredProp('planes', M.compose(mapPlanePair, M.requiredProp('end'))),\n ),\n ([distance, plane1, plane2]) => ({\n type: 'planar-distance',\n distance,\n plane1,\n plane2,\n }),\n);\n\nconst mapPlanarAngle: M.Func<\n PbPlanarAngleResult.AsObject,\n PlanarAngleMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('angleInRadians'),\n M.mapRequiredProp(\n 'planes',\n M.compose(mapPlanePair, M.requiredProp('start')),\n ),\n M.mapRequiredProp('planes', M.compose(mapPlanePair, M.requiredProp('end'))),\n ),\n ([angle, plane1, plane2]) => ({\n type: 'planar-angle',\n angle,\n plane1,\n plane2,\n }),\n);\n\nconst mapMinimumDistance: M.Func<\n PbMinimumDistanceResult.AsObject,\n MinimumDistanceMeasurementResult\n> = M.defineMapper(\n M.read(\n M.getProp('distance'),\n M.mapRequiredProp('closestPoint1', fromPbVector3f),\n M.mapRequiredProp('closestPoint2', fromPbVector3f),\n ),\n ([distance, point1, point2]) => ({\n type: 'minimum-distance',\n distance,\n point1,\n point2,\n }),\n);\n\nconst mapSurfaceArea: M.Func<\n PbSurfaceAreaResult.AsObject,\n SurfaceAreaMeasurementResult\n> = M.defineMapper(M.read(M.getProp('area')), ([area]) => ({\n type: 'surface-area',\n area,\n}));\n\nconst mapPlanarDistanceFromResult: M.Func<\n PbMeasurementResult.AsObject,\n PlanarDistanceMeasurementResult | undefined | null\n> = M.mapProp('planarDistance', M.ifDefined(mapPlanarDistance));\n\nconst mapPlanarAngleFromResult: M.Func<\n PbMeasurementResult.AsObject,\n PlanarAngleMeasurementResult | undefined | null\n> = M.mapProp('planarAngle', M.ifDefined(mapPlanarAngle));\n\nconst mapMinimumDistanceFromResult: M.Func<\n PbMeasurementResult.AsObject,\n MinimumDistanceMeasurementResult | undefined | null\n> = M.mapProp('minimumDistance', M.ifDefined(mapMinimumDistance));\n\nconst mapSurfaceAreaFromResult: M.Func<\n PbMeasurementResult.AsObject,\n SurfaceAreaMeasurementResult | undefined | null\n> = M.mapProp('totalSurfaceArea', M.ifDefined(mapSurfaceArea));\n\nconst mapMeasurementResult: M.Func<\n PbMeasurementResult.AsObject,\n MeasurementResult\n> = M.compose(\n M.pickFirst(\n mapPlanarDistanceFromResult,\n mapPlanarAngleFromResult,\n mapMinimumDistanceFromResult,\n mapSurfaceAreaFromResult,\n ),\n M.required('Result field'),\n);\n\nexport const mapMeasureResponse: M.Func<\n PbMeasureResponse.AsObject,\n MeasurementOutcome\n> = M.defineMapper(\n M.read(\n M.mapRequiredProp(\n 'outcome',\n M.mapRequiredProp('resultsList', M.mapArray(mapMeasurementResult)),\n ),\n M.mapRequiredProp('outcome', M.getProp('isApproximate')),\n ),\n ([results, isApproximate]) => ({ results, isApproximate }),\n);\n\nexport const mapMeasureResponseOrThrow = M.ifInvalidThrow(mapMeasureResponse);\n"],"names":["M"],"mappings":";;;;;;;;;AAsBA,MAAM,YAAY,GAGdA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,EACvCA,MAAC,CAAC,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,CACtC,EACD,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CACnC;AAED,MAAM,iBAAiB,GAGnBA,MAAC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MAAC,CAAC,eAAe,CAAC,SAAS,EAAEA,MAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CACzD,EACD,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAC3D;AAEM,MAAM,yBAAyB,GAAGA,MAAC,CAAC,cAAc,CAAC,kBAAkB;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
- import{o as e}from"./p-CDM7zNn0.js";import{d as t}from"./p-CPk-nchx.js";import"./p-BhKTTmpL.js";import"./p-BAhfr1Nx.js";const s=500;const r={durationMs:s};const n={throttleFrameDelivery:true,adaptiveRendering:true,logWsMessages:false,logFrameRate:false,letterboxFrames:false,grpcUseStreamingWebSocketTransport:true};const o={finePointerThreshold:1,coarsePointerThreshold:3,interactionDelay:75,useMinimumPerspectiveZoomDistance:true,mouseWheelInteractionEndDebounce:400,reverseMouseWheelDirection:false};const i={network:{apiHost:"https://platform.platprod.vertexvis.io",renderingHost:"wss://stream.platprod.vertexvis.io",sceneTreeHost:"https://scene-trees.platprod.vertexvis.io",sceneViewHost:"https://scenes.platprod.vertexvis.io"},flags:n,events:t,animation:r,interactions:o,EXPERIMENTAL_frameDelivery:{},EXPERIMENTAL_adaptiveRendering:{},EXPERIMENTAL_qualityOfService:{},EXPERIMENTAL_annotationPollingIntervalInMs:undefined};const a={...i,network:{apiHost:"https://platform.platdev.vertexvis.io",renderingHost:"wss://stream.platdev.vertexvis.io",sceneTreeHost:"https://scene-trees.platdev.vertexvis.io",sceneViewHost:"https://scenes.platdev.vertexvis.io"}};const p={...i,network:{apiHost:"https://platform.platstaging.vertexvis.io",renderingHost:"wss://stream.platstaging.vertexvis.io",sceneTreeHost:"https://scene-trees.platstaging.vertexvis.io",sceneViewHost:"https://scenes.platstaging.vertexvis.io"}};function c(e){switch(e){case"platdev":return a;case"platstaging":return p;default:return i}}function l(e="platprod",t){const s=v(e,t);return u(d(s))}function v(t="platprod",s){if(typeof s==="string"){s=JSON.parse(s)}const r=c(t);if(s==null){return r}else{return e.defaults({...s},r)}}function d(e){const t=e.network.apiHost.trim();const s=e.network.renderingHost.trim();const r=e.network.sceneTreeHost.trim();const n=e.network.sceneViewHost.trim();return{...e,network:{...e.network,apiHost:t,renderingHost:s,sceneTreeHost:r,sceneViewHost:n}}}function u(e){h(e.network,"apiHost","https://");h(e.network,"renderingHost","wss://");h(e.network,"sceneTreeHost","https://");h(e.network,"sceneViewHost","https://");return e}function h(e,t,s){if(!e[t].startsWith(s)){throw new Error(`Invalid ${t} "${e[t]}" specified. The URL must start with the ${s} scheme.`)}}export{l as p};
5
- //# sourceMappingURL=p-kMZA0v7I.js.map
4
+ import{o as e}from"./p-CDM7zNn0.js";import{d as t}from"./p-CPk-nchx.js";import"./p-Cc3XhAoA.js";import"./p-BAhfr1Nx.js";const s=500;const r={durationMs:s};const n={throttleFrameDelivery:true,adaptiveRendering:true,logWsMessages:false,logFrameRate:false,letterboxFrames:false,grpcUseStreamingWebSocketTransport:true};const o={finePointerThreshold:1,coarsePointerThreshold:3,interactionDelay:75,useMinimumPerspectiveZoomDistance:true,mouseWheelInteractionEndDebounce:400,reverseMouseWheelDirection:false};const i={network:{apiHost:"https://platform.platprod.vertexvis.io",renderingHost:"wss://stream.platprod.vertexvis.io",sceneTreeHost:"https://scene-trees.platprod.vertexvis.io",sceneViewHost:"https://scenes.platprod.vertexvis.io"},flags:n,events:t,animation:r,interactions:o,EXPERIMENTAL_frameDelivery:{},EXPERIMENTAL_adaptiveRendering:{},EXPERIMENTAL_qualityOfService:{},EXPERIMENTAL_annotationPollingIntervalInMs:undefined};const a={...i,network:{apiHost:"https://platform.platdev.vertexvis.io",renderingHost:"wss://stream.platdev.vertexvis.io",sceneTreeHost:"https://scene-trees.platdev.vertexvis.io",sceneViewHost:"https://scenes.platdev.vertexvis.io"}};const p={...i,network:{apiHost:"https://platform.platstaging.vertexvis.io",renderingHost:"wss://stream.platstaging.vertexvis.io",sceneTreeHost:"https://scene-trees.platstaging.vertexvis.io",sceneViewHost:"https://scenes.platstaging.vertexvis.io"}};function c(e){switch(e){case"platdev":return a;case"platstaging":return p;default:return i}}function l(e="platprod",t){const s=v(e,t);return u(d(s))}function v(t="platprod",s){if(typeof s==="string"){s=JSON.parse(s)}const r=c(t);if(s==null){return r}else{return e.defaults({...s},r)}}function d(e){const t=e.network.apiHost.trim();const s=e.network.renderingHost.trim();const r=e.network.sceneTreeHost.trim();const n=e.network.sceneViewHost.trim();return{...e,network:{...e.network,apiHost:t,renderingHost:s,sceneTreeHost:r,sceneViewHost:n}}}function u(e){h(e.network,"apiHost","https://");h(e.network,"renderingHost","wss://");h(e.network,"sceneTreeHost","https://");h(e.network,"sceneViewHost","https://");return e}function h(e,t,s){if(!e[t].startsWith(s)){throw new Error(`Invalid ${t} "${e[t]}" specified. The URL must start with the ${s} scheme.`)}}export{l as p};
5
+ //# sourceMappingURL=p-Bw_ryWU0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-kMZA0v7I.js","sources":["src/lib/types/animation.ts","src/lib/types/flags.ts","src/lib/types/interactions.ts","src/lib/config.ts"],"sourcesContent":["const DEFAULT_ANIMATION_DURATION = 500;\n\nexport interface Animation {\n milliseconds: number;\n}\n\nexport function create(data: Partial<Animation> = {}): Animation {\n return {\n milliseconds: data.milliseconds || DEFAULT_ANIMATION_DURATION,\n };\n}\n\nexport interface AnimationConfig {\n durationMs: number;\n}\n\nexport const defaultAnimationConfig: AnimationConfig = {\n durationMs: DEFAULT_ANIMATION_DURATION,\n};\n","import { Objects } from '@vertexvis/utils';\n\ntype Flag =\n /**\n * Enables or disables a throttling of image delivery based on detected\n * network conditions.\n */\n | 'throttleFrameDelivery'\n\n /**\n * Enables or disables automatic quality adjustments of rendered frames to\n * improve the performance of delivering frames to the client.\n */\n | 'adaptiveRendering'\n\n /**\n * Enables or disables logging of WS message payloads.\n */\n | 'logWsMessages'\n\n /**\n * Toggles the logging of frame rates.\n */\n | 'logFrameRate'\n\n /**\n * Enables or disables the letterboxing of frames when the host dimensions\n * are larger than the supported maximum image size (1080p). By default\n * this option is disabled, and images will be scaled up to match the host.\n */\n | 'letterboxFrames'\n\n /**\n * Enables or disables the use of the `grpc.WebsocketTransport` for streaming\n * RPCs. By default this transport will be used, and streaming messages will\n * be sent over WebSocket.\n */\n | 'grpcUseStreamingWebSocketTransport';\n\n/**\n * A set of experimental features that can be enabled through the viewer's\n * config.\n */\nexport type Flags = { [K in Flag]: boolean };\n\nexport const defaultFlags: Flags = {\n throttleFrameDelivery: true,\n adaptiveRendering: true,\n logWsMessages: false,\n logFrameRate: false,\n letterboxFrames: false,\n grpcUseStreamingWebSocketTransport: true,\n};\n\nexport function createFlags(\n features: Partial<Flags>,\n fallbacks: Partial<Flags> = defaultFlags,\n): Flags {\n return Objects.defaults(features, fallbacks, defaultFlags);\n}\n","export interface InteractionConfig {\n /**\n * The amount of movement required with a fine (mouse, trackpad, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n finePointerThreshold: number;\n\n /**\n * The amount of movement required with a coarse (touch, stylus, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n coarsePointerThreshold: number;\n\n /**\n * The amount of time before a movement is considered an interaction and will\n * update the camera.\n */\n interactionDelay: number;\n\n /**\n * Whether the `zoomCameraToPoint` interaction through the `InteractionApiPerspective`\n * will enforce a minimum distance when moving the camera. When set, the camera will be\n * able to move through geometry under the cursor, rather than being restricted by the\n * point under the cursor. Defaults to `true`.\n */\n useMinimumPerspectiveZoomDistance: boolean;\n\n /**\n * The amount of time before a wheel interaction is ended.\n *\n * This delay is used to support successive sets of mouse events, and not cause\n * abrupt and unexpected ending of mouse interactions during natural pauses in mouse\n * wheel usage.\n */\n mouseWheelInteractionEndDebounce: number;\n\n /**\n * Reverses which direction the mouse wheel considers positive or negative\n * for zoom interactions.\n */\n reverseMouseWheelDirection: boolean;\n}\n\nexport const defaultInteractionConfig: InteractionConfig = {\n finePointerThreshold: 1,\n coarsePointerThreshold: 3,\n interactionDelay: 75,\n useMinimumPerspectiveZoomDistance: true,\n mouseWheelInteractionEndDebounce: 400,\n reverseMouseWheelDirection: false,\n};\n","import { FrameDeliverySettings } from '@vertexvis/stream-api';\nimport {\n AdaptiveRenderingSettings,\n QualityOfServiceSettings,\n} from '@vertexvis/stream-api';\nimport { DeepPartial, Objects } from '@vertexvis/utils';\n\nimport { Environment } from './environment';\nimport { Animation, Events, Flags, Interactions } from './types';\n\ninterface NetworkConfig {\n apiHost: string;\n renderingHost: string;\n sceneTreeHost: string;\n sceneViewHost: string;\n}\n\nexport interface Config {\n network: NetworkConfig;\n flags: Flags.Flags;\n events: Events.EventConfig;\n animation: Animation.AnimationConfig;\n interactions: Interactions.InteractionConfig;\n EXPERIMENTAL_frameDelivery: Omit<\n FrameDeliverySettings,\n 'rateLimitingEnabled'\n >;\n EXPERIMENTAL_adaptiveRendering: Omit<AdaptiveRenderingSettings, 'enabled'>;\n EXPERIMENTAL_qualityOfService: QualityOfServiceSettings;\n EXPERIMENTAL_annotationPollingIntervalInMs: number | undefined;\n}\n\nexport type PartialConfig = DeepPartial<Config>;\n\nexport type ConfigProvider = () => Config;\n\nexport type InteractionConfigProvider = () => Interactions.InteractionConfig;\n\nconst config: Config = {\n network: {\n apiHost: 'https://platform.platprod.vertexvis.io',\n renderingHost: 'wss://stream.platprod.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platprod.vertexvis.io',\n sceneViewHost: 'https://scenes.platprod.vertexvis.io',\n },\n flags: Flags.defaultFlags,\n events: Events.defaultEventConfig,\n animation: Animation.defaultAnimationConfig,\n interactions: Interactions.defaultInteractionConfig,\n EXPERIMENTAL_frameDelivery: {},\n EXPERIMENTAL_adaptiveRendering: {},\n EXPERIMENTAL_qualityOfService: {},\n EXPERIMENTAL_annotationPollingIntervalInMs: undefined,\n};\n\nconst platdevConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platdev.vertexvis.io',\n renderingHost: 'wss://stream.platdev.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platdev.vertexvis.io',\n sceneViewHost: 'https://scenes.platdev.vertexvis.io',\n },\n};\n\nconst platstagingConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platstaging.vertexvis.io',\n renderingHost: 'wss://stream.platstaging.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platstaging.vertexvis.io',\n sceneViewHost: 'https://scenes.platstaging.vertexvis.io',\n },\n};\n\nfunction getEnvironmentConfig(environment: Environment): Config {\n switch (environment) {\n case 'platdev':\n return platdevConfig;\n case 'platstaging':\n return platstagingConfig;\n default:\n return config;\n }\n}\n\nexport function parseAndValidateConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig,\n): Config {\n const parsed = parseConfig(environment, config);\n\n return validateConfig(sanitizeConfig(parsed));\n}\n\nexport function parseConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig,\n): Config {\n if (typeof config === 'string') {\n config = JSON.parse(config) as PartialConfig;\n }\n\n const envConfig = getEnvironmentConfig(environment);\n\n if (config == null) {\n return envConfig;\n } else {\n return Objects.defaults({ ...config }, envConfig);\n }\n}\n\nexport function sanitizeConfig(config: Config): Config {\n const sanitizedApiHost = config.network.apiHost.trim();\n const sanitizedRenderingHost = config.network.renderingHost.trim();\n const sanitizedSceneTreeHost = config.network.sceneTreeHost.trim();\n const sanitizedSceneViewHost = config.network.sceneViewHost.trim();\n\n return {\n ...config,\n network: {\n ...config.network,\n apiHost: sanitizedApiHost,\n renderingHost: sanitizedRenderingHost,\n sceneTreeHost: sanitizedSceneTreeHost,\n sceneViewHost: sanitizedSceneViewHost,\n },\n };\n}\n\nexport function validateConfig(config: Config): Config {\n validateUrlScheme(config.network, 'apiHost', 'https://');\n validateUrlScheme(config.network, 'renderingHost', 'wss://');\n validateUrlScheme(config.network, 'sceneTreeHost', 'https://');\n validateUrlScheme(config.network, 'sceneViewHost', 'https://');\n\n return config;\n}\n\nfunction validateUrlScheme(\n networkConfig: NetworkConfig,\n field: keyof NetworkConfig,\n expectedScheme: string,\n): void {\n if (!networkConfig[field].startsWith(expectedScheme)) {\n throw new Error(\n `Invalid ${field} \"${networkConfig[field]}\" specified. The URL must start with the ${expectedScheme} scheme.`,\n );\n }\n}\n"],"names":["Flags.defaultFlags","Events.defaultEventConfig","Animation.defaultAnimationConfig","Interactions.defaultInteractionConfig","Objects"],"mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,GAAG;AAgB/B,MAAM,sBAAsB,GAAoB;AACrD,IAAA,UAAU,EAAE,0BAA0B;CACvC;;AC2BM,MAAM,YAAY,GAAU;AACjC,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,kCAAkC,EAAE,IAAI;CACzC;;ACPM,MAAM,wBAAwB,GAAsB;AACzD,IAAA,oBAAoB,EAAE,CAAC;AACvB,IAAA,sBAAsB,EAAE,CAAC;AACzB,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,iCAAiC,EAAE,IAAI;AACvC,IAAA,gCAAgC,EAAE,GAAG;AACrC,IAAA,0BAA0B,EAAE,KAAK;CAClC;;ACdD,MAAM,MAAM,GAAW;AACrB,IAAA,OAAO,EAAE;AACP,QAAA,OAAO,EAAE,wCAAwC;AACjD,QAAA,aAAa,EAAE,oCAAoC;AACnD,QAAA,aAAa,EAAE,2CAA2C;AAC1D,QAAA,aAAa,EAAE,sCAAsC;AACtD,KAAA;IACD,KAAK,EAAEA,YAAkB;IACzB,MAAM,EAAEC,kBAAyB;IACjC,SAAS,EAAEC,sBAAgC;IAC3C,YAAY,EAAEC,wBAAqC;AACnD,IAAA,0BAA0B,EAAE,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,EAAK,aAAa,CAAC,KAAK,CAAC,CAAA,yCAAA,EAA4C,cAAc,CAAA,QAAA,CAAU,CAC9G;;AAEL;;;;"}
1
+ {"version":3,"file":"p-Bw_ryWU0.js","sources":["src/lib/types/animation.ts","src/lib/types/flags.ts","src/lib/types/interactions.ts","src/lib/config.ts"],"sourcesContent":["const DEFAULT_ANIMATION_DURATION = 500;\n\nexport interface Animation {\n milliseconds: number;\n}\n\nexport function create(data: Partial<Animation> = {}): Animation {\n return {\n milliseconds: data.milliseconds || DEFAULT_ANIMATION_DURATION,\n };\n}\n\nexport interface AnimationConfig {\n durationMs: number;\n}\n\nexport const defaultAnimationConfig: AnimationConfig = {\n durationMs: DEFAULT_ANIMATION_DURATION,\n};\n","import { Objects } from '@vertexvis/utils';\n\ntype Flag =\n /**\n * Enables or disables a throttling of image delivery based on detected\n * network conditions.\n */\n | 'throttleFrameDelivery'\n\n /**\n * Enables or disables automatic quality adjustments of rendered frames to\n * improve the performance of delivering frames to the client.\n */\n | 'adaptiveRendering'\n\n /**\n * Enables or disables logging of WS message payloads.\n */\n | 'logWsMessages'\n\n /**\n * Toggles the logging of frame rates.\n */\n | 'logFrameRate'\n\n /**\n * Enables or disables the letterboxing of frames when the host dimensions\n * are larger than the supported maximum image size (1080p). By default\n * this option is disabled, and images will be scaled up to match the host.\n */\n | 'letterboxFrames'\n\n /**\n * Enables or disables the use of the `grpc.WebsocketTransport` for streaming\n * RPCs. By default this transport will be used, and streaming messages will\n * be sent over WebSocket.\n */\n | 'grpcUseStreamingWebSocketTransport';\n\n/**\n * A set of experimental features that can be enabled through the viewer's\n * config.\n */\nexport type Flags = { [K in Flag]: boolean };\n\nexport const defaultFlags: Flags = {\n throttleFrameDelivery: true,\n adaptiveRendering: true,\n logWsMessages: false,\n logFrameRate: false,\n letterboxFrames: false,\n grpcUseStreamingWebSocketTransport: true,\n};\n\nexport function createFlags(\n features: Partial<Flags>,\n fallbacks: Partial<Flags> = defaultFlags,\n): Flags {\n return Objects.defaults(features, fallbacks, defaultFlags);\n}\n","export interface InteractionConfig {\n /**\n * The amount of movement required with a fine (mouse, trackpad, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n finePointerThreshold: number;\n\n /**\n * The amount of movement required with a coarse (touch, stylus, etc) pointer\n * input before an interaction is considered a movement that will update the\n * camera. This threshold is always scaled up based on the device's pixel ratio.\n */\n coarsePointerThreshold: number;\n\n /**\n * The amount of time before a movement is considered an interaction and will\n * update the camera.\n */\n interactionDelay: number;\n\n /**\n * Whether the `zoomCameraToPoint` interaction through the `InteractionApiPerspective`\n * will enforce a minimum distance when moving the camera. When set, the camera will be\n * able to move through geometry under the cursor, rather than being restricted by the\n * point under the cursor. Defaults to `true`.\n */\n useMinimumPerspectiveZoomDistance: boolean;\n\n /**\n * The amount of time before a wheel interaction is ended.\n *\n * This delay is used to support successive sets of mouse events, and not cause\n * abrupt and unexpected ending of mouse interactions during natural pauses in mouse\n * wheel usage.\n */\n mouseWheelInteractionEndDebounce: number;\n\n /**\n * Reverses which direction the mouse wheel considers positive or negative\n * for zoom interactions.\n */\n reverseMouseWheelDirection: boolean;\n}\n\nexport const defaultInteractionConfig: InteractionConfig = {\n finePointerThreshold: 1,\n coarsePointerThreshold: 3,\n interactionDelay: 75,\n useMinimumPerspectiveZoomDistance: true,\n mouseWheelInteractionEndDebounce: 400,\n reverseMouseWheelDirection: false,\n};\n","import { FrameDeliverySettings } from '@vertexvis/stream-api';\nimport {\n AdaptiveRenderingSettings,\n QualityOfServiceSettings,\n} from '@vertexvis/stream-api';\nimport { DeepPartial, Objects } from '@vertexvis/utils';\n\nimport { Environment } from './environment';\nimport { Animation, Events, Flags, Interactions } from './types';\n\ninterface NetworkConfig {\n apiHost: string;\n renderingHost: string;\n sceneTreeHost: string;\n sceneViewHost: string;\n}\n\nexport interface Config {\n network: NetworkConfig;\n flags: Flags.Flags;\n events: Events.EventConfig;\n animation: Animation.AnimationConfig;\n interactions: Interactions.InteractionConfig;\n EXPERIMENTAL_frameDelivery: Omit<\n FrameDeliverySettings,\n 'rateLimitingEnabled'\n >;\n EXPERIMENTAL_adaptiveRendering: Omit<AdaptiveRenderingSettings, 'enabled'>;\n EXPERIMENTAL_qualityOfService: QualityOfServiceSettings;\n EXPERIMENTAL_annotationPollingIntervalInMs: number | undefined;\n}\n\nexport type PartialConfig = DeepPartial<Config>;\n\nexport type ConfigProvider = () => Config;\n\nexport type InteractionConfigProvider = () => Interactions.InteractionConfig;\n\nconst config: Config = {\n network: {\n apiHost: 'https://platform.platprod.vertexvis.io',\n renderingHost: 'wss://stream.platprod.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platprod.vertexvis.io',\n sceneViewHost: 'https://scenes.platprod.vertexvis.io',\n },\n flags: Flags.defaultFlags,\n events: Events.defaultEventConfig,\n animation: Animation.defaultAnimationConfig,\n interactions: Interactions.defaultInteractionConfig,\n EXPERIMENTAL_frameDelivery: {},\n EXPERIMENTAL_adaptiveRendering: {},\n EXPERIMENTAL_qualityOfService: {},\n EXPERIMENTAL_annotationPollingIntervalInMs: undefined,\n};\n\nconst platdevConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platdev.vertexvis.io',\n renderingHost: 'wss://stream.platdev.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platdev.vertexvis.io',\n sceneViewHost: 'https://scenes.platdev.vertexvis.io',\n },\n};\n\nconst platstagingConfig: Config = {\n ...config,\n network: {\n apiHost: 'https://platform.platstaging.vertexvis.io',\n renderingHost: 'wss://stream.platstaging.vertexvis.io',\n sceneTreeHost: 'https://scene-trees.platstaging.vertexvis.io',\n sceneViewHost: 'https://scenes.platstaging.vertexvis.io',\n },\n};\n\nfunction getEnvironmentConfig(environment: Environment): Config {\n switch (environment) {\n case 'platdev':\n return platdevConfig;\n case 'platstaging':\n return platstagingConfig;\n default:\n return config;\n }\n}\n\nexport function parseAndValidateConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig,\n): Config {\n const parsed = parseConfig(environment, config);\n\n return validateConfig(sanitizeConfig(parsed));\n}\n\nexport function parseConfig(\n environment: Environment = 'platprod',\n config?: string | PartialConfig,\n): Config {\n if (typeof config === 'string') {\n config = JSON.parse(config) as PartialConfig;\n }\n\n const envConfig = getEnvironmentConfig(environment);\n\n if (config == null) {\n return envConfig;\n } else {\n return Objects.defaults({ ...config }, envConfig);\n }\n}\n\nexport function sanitizeConfig(config: Config): Config {\n const sanitizedApiHost = config.network.apiHost.trim();\n const sanitizedRenderingHost = config.network.renderingHost.trim();\n const sanitizedSceneTreeHost = config.network.sceneTreeHost.trim();\n const sanitizedSceneViewHost = config.network.sceneViewHost.trim();\n\n return {\n ...config,\n network: {\n ...config.network,\n apiHost: sanitizedApiHost,\n renderingHost: sanitizedRenderingHost,\n sceneTreeHost: sanitizedSceneTreeHost,\n sceneViewHost: sanitizedSceneViewHost,\n },\n };\n}\n\nexport function validateConfig(config: Config): Config {\n validateUrlScheme(config.network, 'apiHost', 'https://');\n validateUrlScheme(config.network, 'renderingHost', 'wss://');\n validateUrlScheme(config.network, 'sceneTreeHost', 'https://');\n validateUrlScheme(config.network, 'sceneViewHost', 'https://');\n\n return config;\n}\n\nfunction validateUrlScheme(\n networkConfig: NetworkConfig,\n field: keyof NetworkConfig,\n expectedScheme: string,\n): void {\n if (!networkConfig[field].startsWith(expectedScheme)) {\n throw new Error(\n `Invalid ${field} \"${networkConfig[field]}\" specified. The URL must start with the ${expectedScheme} scheme.`,\n );\n }\n}\n"],"names":["Flags.defaultFlags","Events.defaultEventConfig","Animation.defaultAnimationConfig","Interactions.defaultInteractionConfig","Objects"],"mappings":";;;;;;;;AAAA,MAAM,0BAA0B,GAAG,GAAG;AAgB/B,MAAM,sBAAsB,GAAoB;AACrD,IAAA,UAAU,EAAE,0BAA0B;CACvC;;AC2BM,MAAM,YAAY,GAAU;AACjC,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAA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YAAA,aAAa,EAAE,sBAAsB;AACrC,YAAA,aAAa,EAAE,sBAAsB;AACrC,YAAA,aAAa,EAAE,sBAAsB;AACtC,SAAA;KACF;AACH;AAEM,SAAU,cAAc,CAAC,MAAc,EAAA;IAC3C,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;IACxD,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC;IAC5D,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC;IAC9D,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC;AAE9D,IAAA,OAAO,MAAM;AACf;AAEA,SAAS,iBAAiB,CACxB,aAA4B,EAC5B,KAA0B,EAC1B,cAAsB,EAAA;IAEtB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;AACpD,QAAA,MAAM,IAAI,KAAK,CACb,CAAA,QAAA,EAAW,KAAK,CAAA,EAAA,EAAK,aAAa,CAAC,KAAK,CAAC,CAAA,yCAAA,EAA4C,cAAc,CAAA,QAAA,CAAU,CAC9G;;AAEL;;;;"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
- import{b as s,c as a,d as e}from"./p-BNuMPeJ8.js";import{m as o}from"./p-CDM7zNn0.js";import{l as t,V as i,s as n,W as m}from"./p-BhKTTmpL.js";var d=s();var r=a();const p=o.defineMapper(o.read(o.mapRequiredProp("id",t),o.getProp("displayName"),o.mapRequiredProp("partRevisionId",t),o.mapRequiredProp("camera",i)),(([s,a,e,o])=>({id:s,displayName:a,partRevisionId:e,camera:o})));const c=o.defineMapper(o.read(o.mapProp("modelViewsList",o.mapArray(p)),o.mapProp("nextPageCursor",n)),(([s,a])=>({modelViews:s,paging:{next:a}})));const l=o.ifInvalidThrow(c);const I=o.defineMapper(o.read(o.mapProp("modelViewId",m),o.mapProp("sceneItemId",m)),(([s,a])=>({modelViewId:s,sceneItemId:a})));const g=o.ifInvalidThrow(I);const N=o.defineMapper(o.read(o.mapRequiredProp("id",t),o.getProp("displayName")),(([s,a])=>({id:s,displayName:a})));const v=o.defineMapper(o.read(o.mapProp("annotationsList",o.mapArray(N)),o.mapProp("nextPageCursor",n)),(([s,a])=>({annotations:s,paging:{next:a}})));const x=o.ifInvalidThrow(v);var V=e();export{g as a,x as b,l as m,d as p,V as r,r as u};
5
- //# sourceMappingURL=p-DHK23fw4.js.map
4
+ import{b as s,c as a,d as e}from"./p-BNuMPeJ8.js";import{m as o}from"./p-CDM7zNn0.js";import{l as t,V as i,s as n,W as m}from"./p-Cc3XhAoA.js";var d=s();var r=a();const p=o.defineMapper(o.read(o.mapRequiredProp("id",t),o.getProp("displayName"),o.mapRequiredProp("partRevisionId",t),o.mapRequiredProp("camera",i)),(([s,a,e,o])=>({id:s,displayName:a,partRevisionId:e,camera:o})));const c=o.defineMapper(o.read(o.mapProp("modelViewsList",o.mapArray(p)),o.mapProp("nextPageCursor",n)),(([s,a])=>({modelViews:s,paging:{next:a}})));const l=o.ifInvalidThrow(c);const I=o.defineMapper(o.read(o.mapProp("modelViewId",m),o.mapProp("sceneItemId",m)),(([s,a])=>({modelViewId:s,sceneItemId:a})));const g=o.ifInvalidThrow(I);const N=o.defineMapper(o.read(o.mapRequiredProp("id",t),o.getProp("displayName")),(([s,a])=>({id:s,displayName:a})));const v=o.defineMapper(o.read(o.mapProp("annotationsList",o.mapArray(N)),o.mapProp("nextPageCursor",n)),(([s,a])=>({annotations:s,paging:{next:a}})));const x=o.ifInvalidThrow(v);var V=e();export{g as a,x as b,l as m,d as p,V as r,r as u};
5
+ //# sourceMappingURL=p-C4_1Jc7H.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-DHK23fw4.js","sources":["src/lib/model-views/mapper.ts","src/lib/pmi/mapper.ts"],"sourcesContent":["import type { vertexvis } from '@vertexvis/frame-streaming-protos';\nimport { ModelView as PBModelView } from '@vertexvis/scene-view-protos/core/protos/model_views_pb';\nimport { ListItemModelViewsResponse } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper as M, UUID } from '@vertexvis/utils';\n\nimport {\n fromPbCamera,\n fromPbUuid2l,\n mapCursor,\n toPbJsUuid2l,\n} from '../mappers';\nimport { ModelView, ModelViewListResponse } from './types';\n\nconst mapModelView: M.Func<PBModelView.AsObject, ModelView> = M.defineMapper(\n M.read(\n M.mapRequiredProp('id', fromPbUuid2l),\n M.getProp('displayName'),\n M.mapRequiredProp('partRevisionId', fromPbUuid2l),\n M.mapRequiredProp('camera', fromPbCamera),\n ),\n ([id, displayName, partRevisionId, camera]) => ({\n id,\n displayName,\n partRevisionId,\n camera,\n }),\n);\n\nconst mapListItemModelViewsResponse: M.Func<\n ListItemModelViewsResponse.AsObject,\n ModelViewListResponse\n> = M.defineMapper(\n M.read(\n M.mapProp('modelViewsList', M.mapArray(mapModelView)),\n M.mapProp('nextPageCursor', mapCursor),\n ),\n ([modelViews, next]) => ({ modelViews, paging: { next } }),\n);\n\nexport const mapListItemModelViewsResponseOrThrow = M.ifInvalidThrow(\n mapListItemModelViewsResponse,\n);\n\nconst mapItemModelView: M.Func<\n { modelViewId: UUID.UUID; sceneItemId: UUID.UUID },\n vertexvis.protobuf.core.IItemModelView\n> = M.defineMapper(\n M.read(\n M.mapProp('modelViewId', toPbJsUuid2l),\n M.mapProp('sceneItemId', toPbJsUuid2l),\n ),\n ([modelViewId, sceneItemId]) => ({ modelViewId, sceneItemId }),\n);\n\nexport const mapItemModelViewOrThrow = M.ifInvalidThrow(mapItemModelView);\n","import { PmiAnnotation as PBPmiAnnotation } from '@vertexvis/scene-view-protos/core/protos/model_views_pb';\nimport { ListPmiAnnotationsResponse } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper as M } from '@vertexvis/utils';\n\nimport { fromPbUuid2l, mapCursor } from '../mappers';\nimport { PmiAnnotation, PmiAnnotationListResponse } from './types';\n\nconst mapPmiAnnotation: M.Func<PBPmiAnnotation.AsObject, PmiAnnotation> =\n M.defineMapper(\n M.read(M.mapRequiredProp('id', fromPbUuid2l), M.getProp('displayName')),\n ([id, displayName]) => ({ id, displayName }),\n );\n\nconst mapListPmiAnnotationsResponse: M.Func<\n ListPmiAnnotationsResponse.AsObject,\n PmiAnnotationListResponse\n> = M.defineMapper(\n M.read(\n M.mapProp('annotationsList', M.mapArray(mapPmiAnnotation)),\n M.mapProp('nextPageCursor', mapCursor),\n ),\n ([annotations, next]) => ({ annotations, paging: { next } }),\n);\n\nexport const mapListPmiAnnotationsResponseOrThrow = M.ifInvalidThrow(\n mapListPmiAnnotationsResponse,\n);\n"],"names":["M"],"mappings":";;;;;;;;;;;AAaA,MAAM,YAAY,GAA4CA,MAAC,CAAC,YAAY,CAC1EA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,eAAe,CAAC,IAAI,EAAE,YAAY,CAAC,EACrCA,MAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EACxBA,MAAC,CAAC,eAAe,CAAC,gBAAgB,EAAE,YAAY,CAAC,EACjDA,MAAC,CAAC,eAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,CAC1C,EACD,CAAC,CAAC,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM;IAC9C,EAAE;IACF,WAAW;IACX,cAAc;IACd,MAAM;AACP,CAAA,CAAC,CACH;AAED,MAAM,6BAA6B,GAG/BA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,OAAO,CAAC,gBAAgB,EAAEA,MAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EACrDA,MAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC,CACvC,EACD,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE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import type { vertexvis } from '@vertexvis/frame-streaming-protos';\nimport { ModelView as PBModelView } from '@vertexvis/scene-view-protos/core/protos/model_views_pb';\nimport { ListItemModelViewsResponse } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper as M, UUID } from '@vertexvis/utils';\n\nimport {\n fromPbCamera,\n fromPbUuid2l,\n mapCursor,\n toPbJsUuid2l,\n} from '../mappers';\nimport { ModelView, ModelViewListResponse } from './types';\n\nconst mapModelView: M.Func<PBModelView.AsObject, ModelView> = M.defineMapper(\n M.read(\n M.mapRequiredProp('id', fromPbUuid2l),\n M.getProp('displayName'),\n M.mapRequiredProp('partRevisionId', fromPbUuid2l),\n M.mapRequiredProp('camera', fromPbCamera),\n ),\n ([id, displayName, partRevisionId, camera]) => ({\n id,\n displayName,\n partRevisionId,\n camera,\n }),\n);\n\nconst mapListItemModelViewsResponse: M.Func<\n ListItemModelViewsResponse.AsObject,\n ModelViewListResponse\n> = M.defineMapper(\n M.read(\n M.mapProp('modelViewsList', M.mapArray(mapModelView)),\n M.mapProp('nextPageCursor', mapCursor),\n ),\n ([modelViews, next]) => ({ modelViews, paging: { next } }),\n);\n\nexport const mapListItemModelViewsResponseOrThrow = M.ifInvalidThrow(\n mapListItemModelViewsResponse,\n);\n\nconst mapItemModelView: M.Func<\n { modelViewId: UUID.UUID; sceneItemId: UUID.UUID },\n vertexvis.protobuf.core.IItemModelView\n> = M.defineMapper(\n M.read(\n M.mapProp('modelViewId', toPbJsUuid2l),\n M.mapProp('sceneItemId', toPbJsUuid2l),\n ),\n ([modelViewId, sceneItemId]) => ({ modelViewId, sceneItemId }),\n);\n\nexport const mapItemModelViewOrThrow = M.ifInvalidThrow(mapItemModelView);\n","import { PmiAnnotation as PBPmiAnnotation } from '@vertexvis/scene-view-protos/core/protos/model_views_pb';\nimport { ListPmiAnnotationsResponse } from '@vertexvis/scene-view-protos/sceneview/protos/scene_view_api_pb';\nimport { Mapper as M } from '@vertexvis/utils';\n\nimport { fromPbUuid2l, mapCursor } from '../mappers';\nimport { PmiAnnotation, PmiAnnotationListResponse } from './types';\n\nconst mapPmiAnnotation: M.Func<PBPmiAnnotation.AsObject, PmiAnnotation> =\n M.defineMapper(\n M.read(M.mapRequiredProp('id', fromPbUuid2l), M.getProp('displayName')),\n ([id, displayName]) => ({ id, displayName }),\n );\n\nconst mapListPmiAnnotationsResponse: M.Func<\n ListPmiAnnotationsResponse.AsObject,\n PmiAnnotationListResponse\n> = M.defineMapper(\n M.read(\n M.mapProp('annotationsList', M.mapArray(mapPmiAnnotation)),\n M.mapProp('nextPageCursor', mapCursor),\n ),\n ([annotations, next]) => ({ annotations, paging: { next } }),\n);\n\nexport const mapListPmiAnnotationsResponseOrThrow = M.ifInvalidThrow(\n mapListPmiAnnotationsResponse,\n);\n"],"names":["M"],"mappings":";;;;;;;;;;;AAaA,MAAM,YAAY,GAA4CA,MAAC,CAAC,YAAY,CAC1EA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,eAAe,CAAC,IAAI,EAAE,YAAY,CAAC,EACrCA,MAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EACxBA,MAAC,CAAC,eAAe,CAAC,gBAAgB,EAAE,YAAY,CAAC,EACjDA,MAAC,CAAC,eAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,CAC1C,EACD,CAAC,CAAC,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM;IAC9C,EAAE;IACF,WAAW;IACX,cAAc;IACd,MAAM;AACP,CAAA,CAAC,CACH;AAED,MAAM,6BAA6B,GAG/BA,MAAC,CAAC,YAAY,CAChBA,MAAC,CAAC,IAAI,CACJA,MAAC,CAAC,OAAO,CAAC,gBAAgB,EAAEA,MAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EACrDA,MAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,SAAS,CAAC,CACvC,EACD,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,U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e,f as n,p as r,r as s,g as o,l as i,b as c,m as a,e as u,c as l,i as f,j as h}from"./p-2UsvOTHJ.js";import{v as d,p as m,L as p}from"./p-5kcpg4MZ.js";import{m as v,c as w,b as y}from"./p-CDM7zNn0.js";import{E as g}from"./p-BAhfr1Nx.js";import{g as b}from"./p-CG9AChtV.js";const C=v.defineMapper((t=>{switch(t){case"perspective":return d.protobuf.stream.CameraType.CAMERA_TYPE_PERSPECTIVE;case"orthographic":return d.protobuf.stream.CameraType.CAMERA_TYPE_ORTHOGRAPHIC;default:return d.protobuf.stream.CameraType.CAMERA_TYPE_INVALID}}),(t=>t));function x(){return v.ifInvalidThrow(C)}const k=v.defineMapper(v.read(v.requiredProp("r"),v.requiredProp("g"),v.requiredProp("b"),v.requiredProp("a")),(([t,e,n,r])=>w.create(t,e,n,r)));const F=v.defineMapper(v.read(v.requiredProp("msb"),v.requiredProp("lsb")),(([t,e])=>y.fromMsbLsb(t,e)));const M=v.defineMapper(v.read(v.requiredProp("seconds"),v.requiredProp("nanos")),(([t,e])=>m({seconds:t,nanos:e})));const S=v.defineMapper(v.read(v.requiredProp("iso")),(([t])=>new Date(t)));const j=v.defineMapper(v.read(v.requiredProp("hex")),(([t])=>t));const P=v.defineMapper(v.read(v.requiredProp("msb"),v.requiredProp("lsb")),(([t,e])=>{const n=BigInt(typeof t==="number"?t:t.toString());const r=BigInt(typeof e==="number"?e:e.toString());return y.fromMsbLsb(n,r)}));const E=v.defineMapper(v.compose((t=>y.toMsbLsb(t)),v.read(v.mapProp("msb",p.fromString),v.mapProp("lsb",p.fromString))),(([t,e])=>({msb:t,lsb:e})));function I(t){"@babel/helpers - typeof";return I="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},I(t)}function N(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 T(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function D(t){T(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||I(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 O(t,e){T(2,arguments);var n=D(t);var r=N(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function A(t,e){T(2,arguments);var n=D(t);var r=N(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}var s=n.getDate();var o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var i=o.getDate();if(s>=i){return o}else{n.setFullYear(o.getFullYear(),o.getMonth(),s);return n}}function V(t,e){T(2,arguments);if(!e||I(e)!=="object")return new Date(NaN);var n=e.years?N(e.years):0;var r=e.months?N(e.months):0;var s=e.weeks?N(e.weeks):0;var o=e.days?N(e.days):0;var i=e.hours?N(e.hours):0;var c=e.minutes?N(e.minutes):0;var a=e.seconds?N(e.seconds):0;var u=D(t);var l=r||n?A(u,r+n*12):u;var f=o||s?O(l,o+s*7):l;var h=c+i*60;var d=a+h*60;var m=d*1e3;var p=new Date(f.getTime()+m);return p}function z(t,e){T(2,arguments);return D(t).getTime()-D(e).getTime()}function B(t,e){T(2,arguments);var n=D(t);var r=D(e);return n.getTime()>r.getTime()}function R(t,e){T(2,arguments);var n=N(e);return O(t,-n)}function W(t,e){T(2,arguments);var n=N(e);return A(t,-n)}function $(t,e){T(2,arguments);if(!e||I(e)!=="object")return new Date(NaN);var n=e.years?N(e.years):0;var r=e.months?N(e.months):0;var s=e.weeks?N(e.weeks):0;var o=e.days?N(e.days):0;var i=e.hours?N(e.hours):0;var c=e.minutes?N(e.minutes):0;var a=e.seconds?N(e.seconds):0;var u=W(t,r+n*12);var l=R(u,o+s*7);var f=c+i*60;var h=a+f*60;var d=h*1e3;var m=new Date(l.getTime()-d);return m}class q{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=V(new Date,{seconds:e});return new q(t,e,n)}hasExpired(){return B(new Date,this.expiresAt)}remainingTimeInMs(t){return z($(this.expiresAt,{seconds:t}),new Date)}}function U(t){if(H(t)){const n=_(t.lookAt);const r=_(t.position);const s=L(t.up);const o=n&&r&&L(e.subtract(t.lookAt,t.position));const i=t.fovY!=null&&Number.isFinite(t.fovY)&&t.fovY>=1&&t.fovY<=179;return s&&o&&i}else{const e=t;const n=L(e.viewVector);const r=_(e.lookAt);const s=L(e.up);const o=Number.isFinite(e.fovHeight)&&e.fovHeight>0;return n&&r&&s&&o}}function _(t){return t!=null&&e.isValid(t)}function L(t){return _(t)&&!e.isZeroVector(t)}function H(t){return t.position!=null&&t.fovHeight==null}function G(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function Y(t){if(G(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function J(t={}){var n,r,s,o;return{position:(n=t.position)!==null&&n!==void 0?n:e.forward(),lookAt:(r=t.lookAt)!==null&&r!==void 0?r:e.origin(),up:(s=t.up)!==null&&s!==void 0?s:e.up(),fovY:(o=t.fovY)!==null&&o!==void 0?o:45}}function Q(t={}){var n,r,s,o,i,c;return{viewVector:(n=t.viewVector)!==null&&n!==void 0?n:e.back(),lookAt:(r=t.lookAt)!==null&&r!==void 0?r:e.origin(),up:(s=t.up)!==null&&s!==void 0?s:e.up(),fovHeight:(o=t.fovHeight)!==null&&o!==void 0?o:1,rotationPoint:(c=(i=t.rotationPoint)!==null&&i!==void 0?i:t.lookAt)!==null&&c!==void 0?c:e.origin()}}function Z(r,s){var o;const i=e.subtract(r.lookAt,r.position);const c=n.create(s);const a=c.radius/e.magnitude(i);return{viewVector:e.scale(a,i),up:r.up,lookAt:r.lookAt,fovHeight:2*e.magnitude(i)*Math.tan(t.toRadians(((o=r.fovY)!==null&&o!==void 0?o:45)/2))}}function K(n,r=45){const s=n.fovHeight/(2*Math.tan(t.toRadians(r/2)));const o=e.magnitude(n.viewVector);const i=s/o;return{position:e.add(n.lookAt,e.negate(e.scale(i,n.viewVector))),up:n.up,lookAt:n.lookAt,fovY:r}}function X(t){if(G(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(H(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}}}var tt=Object.freeze({__proto__:null,createOrthographic:Q,createPerspective:J,isOrthographicFrameCamera:G,isPerspectiveFrameCamera:H,isValidFrameCamera:U,toOrthographic:Z,toPerspective:K,toProtobuf:X,withPositionAndViewVector:Y});function et(t,e){return G(e)?rt(t):nt(t,e)}function nt(t,r){const s=n.create(t);const o=s.epsilon*100;const i=e.dot(e.subtract(s.center,r.position),e.normalize(e.subtract(r.lookAt,r.position)));const c=Math.max(s.radius,o);let a=c+i<o?c*3:c+i;let u=a-c*2<o?Math.min(o,a):a-c*2;if(a-u<o){u=Math.max(u,o);a+=u+o}else if(u/a<1e-4){u=a*1e-4}if(u>a-c*2){if(u>1e3+o){a-=u-1e3;u=1e3}}return{near:u,far:a}}function rt(t,e){const r=n.create(t);const s=r.epsilon*100;const o=Math.max(r.radius,s);return{near:-o,far:o}}function st(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var ot=Object.freeze({__proto__:null,create:st});function it(t={}){return{modelViewId:t.modelViewId,sceneItemId:t.sceneItemId}}function ct(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function at(t,e){return ut(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function ut(t){return t.visibleSummary==null}class lt{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 lt(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 s=this.camera.isPerspective();const o=this.getNormalizedDepthAtPoint(t,e);if(s){return o*(r-n)+n}else{return o*(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:s}=this.imageAttr.imageRect;const o=r.subtract(t,this.imageAttr.imageRect);const i=1/this.imageAttr.imageScale;const c=r.scale(o,i,i);if(c.x>=0&&c.y>=0&&c.x<n&&c.y<s){const t=Math.floor(c.x)+Math.floor(c.y)*n;const r=this.pixels[t];const s=r===lt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(s!==null&&s!==void 0?s:lt.MAX_DEPTH_VALUE)/lt.MAX_DEPTH_VALUE}else{return e!==null&&e!==void 0?e:1}}hitTest(t){return this.getNormalizedDepthAtPoint(t)<1}getWorldPoint(t,n,r){const o=this.getDepthAtPoint(t,r);const i=this.camera.isPerspective();if(i){const{position:t,viewVector:r,far:i}=this.camera;const c=s.at(n,i);const a=e.subtract(c,t);const u=e.dot(r,a)/(e.magnitude(r)*e.magnitude(a));return s.at(n,o/u)}else{return s.at(n,o)}}distanceToPoint(t){const{position:n,direction:r}=this.camera;const s=e.subtract(t,n);return Math.abs(e.dot(s,r))}depthOfClosestGeometry(t,e){const{projectionViewMatrix:n}=this.camera;const r=e.transformWorldToViewport(t,n);const s=e.transformPointToFrame(r,this);return this.getDepthAtPoint(s)}isOccluded(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const s=Math.abs(.02*n);const o=Math.abs(r-n);return n>r&&o>s}isDetached(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const s=r-n;const o=.02*n;const i=s<o;const c=this.getMaxDepthOfGeometry();const a=n>c;const u=!i||a;return u}}lt.MAX_DEPTH_VALUE=2**16-1;class ft{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class ht extends ft{constructor(){super(1)}}class dt extends ft{constructor(t=1){super(1/Math.pow(10,t))}}class mt extends ft{constructor(t=1){super(1/Math.pow(1e3,t))}}class pt extends ft{constructor(t=1){super(1/Math.pow(25.4,t))}}class vt extends ft{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class wt extends ft{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class yt{constructor(t){this.unitType=t;this.unit=yt.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}}}yt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new ht},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new dt},meters:{name:"Meters",abbreviatedName:"m",converter:new mt},inches:{name:"Inches",abbreviatedName:"in",converter:new pt},feet:{name:"Feet",abbreviatedName:"ft",converter:new vt},yards:{name:"Yards",abbreviatedName:"yd",converter:new wt}};class gt{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class bt{constructor(t){this.unitType=t;this.unit=bt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}bt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new ft(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new gt}};class Ct{constructor(t){this.unitType=t;this.unit=Ct.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}Ct.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new ht},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new dt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new mt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new pt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new vt(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new wt(2)}};class xt{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 xt(t.data,{...e,imageRect:o.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 s=r.subtract(t,this.imageAttr.imageRect);const o=1/this.imageAttr.imageScale;const i=r.scale(s,o,o);if(i.x>=0&&i.y>=0&&i.x<e&&i.y<n){const t=Math.floor(i.x)*4+Math.floor(i.y)*4*e;const n=this.pixels[t];const r=this.pixels[t+1];const s=this.pixels[t+2];const o=this.pixels[t+3];return w.create(n,r,s,o)}else return undefined}}const kt={deserialize(t){return Object.assign(Error(t.message),{name:t.name,stack:t.stack})},serialize(t){return{__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack}}};const Ft=t=>t&&typeof t==="object"&&"__error_marker"in t&&t.__error_marker==="$$error";const Mt={deserialize(t){if(Ft(t)){return kt.deserialize(t)}else{return t}},serialize(t){if(t instanceof Error){return kt.serialize(t)}else{return t}}};let St=Mt;function jt(t){return St.deserialize(t)}function Pt(t){return St.serialize(t)}class Et extends Error{constructor(t,e){super(t);this.name="ThreadCloneError";this.cause=e;Object.setPrototypeOf(this,Et.prototype)}}function It(t){return Boolean(t&&typeof t==="object"&&t.name==="DataCloneError")}let Nt;function Tt(){if(!Nt){Nt=Dt()}return Nt}function Dt(){try{throw new Error}catch(t){const e=(""+t.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(e){return Ot(e[0])}}return"/"}function Ot(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}const At=typeof navigator!=="undefined"&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4;const Vt=t=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t);function zt(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Bt(){if(typeof Worker==="undefined"){return class t{constructor(){throw Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.")}}}class t extends Worker{constructor(t,e){var n,r;if(typeof t==="string"&&e&&e._baseURL){t=new URL(t,e._baseURL)}else if(typeof t==="string"&&!Vt(t)&&Tt().match(/^file:\/\//i)){t=new URL(t,Tt().replace(/\/[^/]+$/,"/"));if((n=e===null||e===void 0?void 0:e.CORSWorkaround)!==null&&n!==void 0?n:true){t=zt(`importScripts(${JSON.stringify(t)});`)}}if(typeof t==="string"&&Vt(t)){if((r=e===null||e===void 0?void 0:e.CORSWorkaround)!==null&&r!==void 0?r:true){t=zt(`importScripts(${JSON.stringify(t)});`)}}super(t,e)}}class e extends t{constructor(t,e){const n=window.URL.createObjectURL(t);super(n,e)}static fromText(t,n){const r=new window.Blob([t],{type:"text/javascript"});return new e(r,n)}}return{blob:e,default:t}}let Rt;function Wt(){if(!Rt){Rt=Bt()}return Rt}var $t={exports:{}};var qt;var Ut;function _t(){if(Ut)return qt;Ut=1;var t=1e3;var e=t*60;var n=e*60;var r=n*24;var s=r*7;var o=r*365.25;qt=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0){return i(t)}else if(n==="number"&&isFinite(t)){return e.long?a(t):c(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function i(i){i=String(i);if(i.length>100){return}var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!c){return}var a=parseFloat(c[1]);var u=(c[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"weeks":case"week":case"w":return a*s;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*e;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function c(s){var o=Math.abs(s);if(o>=r){return Math.round(s/r)+"d"}if(o>=n){return Math.round(s/n)+"h"}if(o>=e){return Math.round(s/e)+"m"}if(o>=t){return Math.round(s/t)+"s"}return s+"ms"}function a(s){var o=Math.abs(s);if(o>=r){return u(s,o,r,"day")}if(o>=n){return u(s,o,n,"hour")}if(o>=e){return u(s,o,e,"minute")}if(o>=t){return u(s,o,t,"second")}return s+" ms"}function u(t,e,n,r){var s=e>=n*1.5;return Math.round(t/n)+" "+r+(s?"s":"")}return qt}var Lt;var Ht;function Gt(){if(Ht)return Lt;Ht=1;function t(t){n.debug=n;n.default=n;n.coerce=a;n.disable=i;n.enable=s;n.enabled=c;n.humanize=_t();n.destroy=u;Object.keys(t).forEach((e=>{n[e]=t[e]}));n.names=[];n.skips=[];n.formatters={};function e(t){let e=0;for(let n=0;n<t.length;n++){e=(e<<5)-e+t.charCodeAt(n);e|=0}return n.colors[Math.abs(e)%n.colors.length]}n.selectColor=e;function n(t){let e;let s=null;let o;let i;function c(...t){if(!c.enabled){return}const r=c;const s=Number(new Date);const o=s-(e||s);r.diff=o;r.prev=e;r.curr=s;e=s;t[0]=n.coerce(t[0]);if(typeof t[0]!=="string"){t.unshift("%O")}let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((e,s)=>{if(e==="%%"){return"%"}i++;const o=n.formatters[s];if(typeof o==="function"){const n=t[i];e=o.call(r,n);t.splice(i,1);i--}return e}));n.formatArgs.call(r,t);const a=r.log||n.log;a.apply(r,t)}c.namespace=t;c.useColors=n.useColors();c.color=n.selectColor(t);c.extend=r;c.destroy=n.destroy;Object.defineProperty(c,"enabled",{enumerable:true,configurable:false,get:()=>{if(s!==null){return s}if(o!==n.namespaces){o=n.namespaces;i=n.enabled(t)}return i},set:t=>{s=t}});if(typeof n.init==="function"){n.init(c)}return c}function r(t,e){const r=n(this.namespace+(typeof e==="undefined"?":":e)+t);r.log=this.log;return r}function s(t){n.save(t);n.namespaces=t;n.names=[];n.skips=[];const e=(typeof t==="string"?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const t of e){if(t[0]==="-"){n.skips.push(t.slice(1))}else{n.names.push(t)}}}function o(t,e){let n=0;let r=0;let s=-1;let o=0;while(n<t.length){if(r<e.length&&(e[r]===t[n]||e[r]==="*")){if(e[r]==="*"){s=r;o=n;r++}else{n++;r++}}else if(s!==-1){r=s+1;o++;n=o}else{return false}}while(r<e.length&&e[r]==="*"){r++}return r===e.length}function i(){const t=[...n.names,...n.skips.map((t=>"-"+t))].join(",");n.enable("");return t}function c(t){for(const e of n.skips){if(o(t,e)){return false}}for(const e of n.names){if(o(t,e)){return true}}return false}function a(t){if(t instanceof Error){return t.stack||t.message}return t}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}n.enable(n.load());return n}Lt=t;return Lt}var Yt;function Jt(){if(Yt)return $t.exports;Yt=1;(function(t,e){e.formatArgs=r;e.save=s;e.load=o;e.useColors=n;e.storage=i();e.destroy=(()=>{let t=false;return()=>{if(!t){t=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let t;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0;let s=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{if(t==="%%"){return}r++;if(t==="%c"){s=r}}));e.splice(s,0,n)}e.log=console.debug||console.log||(()=>{});function s(t){try{if(t){e.storage.setItem("debug",t)}else{e.storage.removeItem("debug")}}catch(t){}}function o(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}function i(){try{return localStorage}catch(t){}}t.exports=Gt()(e);const{formatters:c}=t.exports;c.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}})($t,$t.exports);return $t.exports}var Qt=Jt();var Zt=b(Qt);const Kt=()=>typeof Symbol==="function";const Xt=t=>Kt()&&Boolean(Symbol[t]);const te=t=>Xt(t)?Symbol[t]:"@@"+t;if(!Xt("asyncIterator")){Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator")}const ee=te("iterator");const ne=te("observable");const re=te("species");function se(t,e){const n=t[e];if(n==null){return undefined}if(typeof n!=="function"){throw new TypeError(n+" is not a function")}return n}function oe(t){let e=t.constructor;if(e!==undefined){e=e[re];if(e===null){e=undefined}}return e!==undefined?e:ve}function ie(t){return t instanceof ve}function ce(t){if(ce.log){ce.log(t)}else{setTimeout((()=>{throw t}),0)}}function ae(t){Promise.resolve().then((()=>{try{t()}catch(t){ce(t)}}))}function ue(t){const e=t._cleanup;if(e===undefined){return}t._cleanup=undefined;if(!e){return}try{if(typeof e==="function"){e()}else{const t=se(e,"unsubscribe");if(t){t.call(e)}}}catch(t){ce(t)}}function le(t){t._observer=undefined;t._queue=undefined;t._state="closed"}function fe(t){const e=t._queue;if(!e){return}t._queue=undefined;t._state="ready";for(const n of e){he(t,n.type,n.value);if(t._state==="closed"){break}}}function he(t,e,n){t._state="running";const r=t._observer;try{const s=r?se(r,e):undefined;switch(e){case"next":if(s)s.call(r,n);break;case"error":le(t);if(s)s.call(r,n);else throw n;break;case"complete":le(t);if(s)s.call(r);break}}catch(t){ce(t)}if(t._state==="closed"){ue(t)}else if(t._state==="running"){t._state="ready"}}function de(t,e,n){if(t._state==="closed"){return}if(t._state==="buffering"){t._queue=t._queue||[];t._queue.push({type:e,value:n});return}if(t._state!=="ready"){t._state="buffering";t._queue=[{type:e,value:n}];ae((()=>fe(t)));return}he(t,e,n)}class me{constructor(t,e){this._cleanup=undefined;this._observer=t;this._queue=undefined;this._state="initializing";const n=new pe(this);try{this._cleanup=e.call(undefined,n)}catch(t){n.error(t)}if(this._state==="initializing"){this._state="ready"}}get closed(){return this._state==="closed"}unsubscribe(){if(this._state!=="closed"){le(this);ue(this)}}}class pe{constructor(t){this._subscription=t}get closed(){return this._subscription._state==="closed"}next(t){de(this._subscription,"next",t)}error(t){de(this._subscription,"error",t)}complete(){de(this._subscription,"complete")}}class ve{constructor(t){if(!(this instanceof ve)){throw new TypeError("Observable cannot be called as a function")}if(typeof t!=="function"){throw new TypeError("Observable initializer must be a function")}this._subscriber=t}subscribe(t,e,n){if(typeof t!=="object"||t===null){t={next:t,error:e,complete:n}}return new me(t,this._subscriber)}pipe(t,...e){let n=this;for(const r of[t,...e]){n=r(n)}return n}tap(t,e,n){const r=typeof t!=="object"||t===null?{next:t,error:e,complete:n}:t;return new ve((t=>this.subscribe({next(e){r.next&&r.next(e);t.next(e)},error(e){r.error&&r.error(e);t.error(e)},complete(){r.complete&&r.complete();t.complete()},start(t){r.start&&r.start(t)}})))}forEach(t){return new Promise(((e,n)=>{if(typeof t!=="function"){n(new TypeError(t+" is not a function"));return}function r(){s.unsubscribe();e(undefined)}const s=this.subscribe({next(e){try{t(e,r)}catch(t){n(t);s.unsubscribe()}},error(t){n(t)},complete(){e(undefined)}})}))}map(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=oe(this);return new e((e=>this.subscribe({next(n){let r=n;try{r=t(n)}catch(t){return e.error(t)}e.next(r)},error(t){e.error(t)},complete(){e.complete()}})))}filter(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=oe(this);return new e((e=>this.subscribe({next(n){try{if(!t(n))return}catch(t){return e.error(t)}e.next(n)},error(t){e.error(t)},complete(){e.complete()}})))}reduce(t,e){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const n=oe(this);const r=arguments.length>1;let s=false;let o=e;return new n((e=>this.subscribe({next(n){const i=!s;s=true;if(!i||r){try{o=t(o,n)}catch(t){return e.error(t)}}else{o=n}},error(t){e.error(t)},complete(){if(!s&&!r){return e.error(new TypeError("Cannot reduce an empty sequence"))}e.next(o);e.complete()}})))}concat(...t){const e=oe(this);return new e((n=>{let r;let s=0;function o(i){r=i.subscribe({next(t){n.next(t)},error(t){n.error(t)},complete(){if(s===t.length){r=undefined;n.complete()}else{o(e.from(t[s++]))}}})}o(this);return()=>{if(r){r.unsubscribe();r=undefined}}}))}flatMap(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=oe(this);return new e((n=>{const r=[];const s=this.subscribe({next(s){let i;if(t){try{i=t(s)}catch(t){return n.error(t)}}else{i=s}const c=e.from(i).subscribe({next(t){n.next(t)},error(t){n.error(t)},complete(){const t=r.indexOf(c);if(t>=0)r.splice(t,1);o()}});r.push(c)},error(t){n.error(t)},complete(){o()}});function o(){if(s.closed&&r.length===0){n.complete()}}return()=>{r.forEach((t=>t.unsubscribe()));s.unsubscribe()}}))}[ne](){return this}static from(t){const e=typeof this==="function"?this:ve;if(t==null){throw new TypeError(t+" is not an object")}const n=se(t,ne);if(n){const r=n.call(t);if(Object(r)!==r){throw new TypeError(r+" is not an object")}if(ie(r)&&r.constructor===e){return r}return new e((t=>r.subscribe(t)))}if(Xt("iterator")){const n=se(t,ee);if(n){return new e((e=>{ae((()=>{if(e.closed)return;for(const r of n.call(t)){e.next(r);if(e.closed)return}e.complete()}))}))}}if(Array.isArray(t)){return new e((e=>{ae((()=>{if(e.closed)return;for(const n of t){e.next(n);if(e.closed)return}e.complete()}))}))}throw new TypeError(t+" is not observable")}static of(...t){const e=typeof this==="function"?this:ve;return new e((e=>{ae((()=>{if(e.closed)return;for(const n of t){e.next(n);if(e.closed)return}e.complete()}))}))}static get[re](){return this}}if(Kt()){Object.defineProperty(ve,Symbol("extensions"),{value:{symbol:ne,hostReportError:ce},configurable:true})}function we(t){if(typeof t==="function"){t()}else if(t&&typeof t.unsubscribe==="function"){t.unsubscribe()}}class ye extends ve{constructor(){super((t=>{this._observers.add(t);return()=>this._observers.delete(t)}));this._observers=new Set}next(t){for(const e of this._observers){e.next(t)}}error(t){for(const e of this._observers){e.error(t)}}complete(){for(const t of this._observers){t.complete()}}}function ge(t){const e=new ye;let n;let r=0;return new ve((s=>{if(!n){n=t.subscribe(e)}const o=e.subscribe(s);r++;return()=>{r--;o.unsubscribe();if(r===0){we(n);n=undefined}}}))}function be(t){return Promise.all(t.map((t=>{const e=t=>({status:"fulfilled",value:t});const n=t=>({status:"rejected",reason:t});const r=Promise.resolve(t);try{return r.then(e,n)}catch(t){return Promise.reject(t)}})))}var Ce;(function(t){t["initialized"]="initialized";t["taskCanceled"]="taskCanceled";t["taskCompleted"]="taskCompleted";t["taskFailed"]="taskFailed";t["taskQueued"]="taskQueued";t["taskQueueDrained"]="taskQueueDrained";t["taskStart"]="taskStart";t["terminated"]="terminated"})(Ce||(Ce={}));const xe=Symbol("thread.errors");const ke=Symbol("thread.events");const Fe=Symbol("thread.terminate");const Me=Symbol("thread.transferable");const Se=Symbol("thread.worker");function je(t){throw Error(t)}const Pe={errors(t){return t[xe]||je("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},events(t){return t[ke]||je("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},terminate(t){return t[Fe]()}};var Ee=undefined&&undefined.__awaiter||function(t,e,n,r){function s(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{a(r.next(t))}catch(t){o(t)}}function c(t){try{a(r["throw"](t))}catch(t){o(t)}}function a(t){t.done?n(t.value):s(t.value).then(i,c)}a((r=r.apply(t,e||[])).next())}))};let Ie=1;function Ne(t){const e=[];for(let n=0;n<t;n++){e.push(n)}return e}function Te(t){return new Promise((e=>setTimeout(e,t)))}function De(t,e){return t.reduce(((t,n)=>[...t,...e(n)]),[])}function Oe(t){return t.replace(/\W/g," ").trim().replace(/\s+/g,"-")}function Ae(t,e){return Ne(e).map((()=>({init:t(),runningTasks:[]})))}class Ve{constructor(t,e){this.eventSubject=new ye;this.initErrors=[];this.isClosing=false;this.nextTaskID=1;this.taskQueue=[];const n=typeof e==="number"?{size:e}:e||{};const{size:r=At}=n;this.debug=Zt(`threads:pool:${Oe(n.name||String(Ie++))}`);this.options=n;this.workers=Ae(t,r);this.eventObservable=ge(ve.from(this.eventSubject));Promise.all(this.workers.map((t=>t.init))).then((()=>this.eventSubject.next({type:Ce.initialized,size:this.workers.length})),(t=>{this.debug("Error while initializing pool worker:",t);this.eventSubject.error(t);this.initErrors.push(t)}))}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find((e=>e.runningTasks.length<t))}runPoolTask(t,e){return Ee(this,void 0,void 0,(function*(){const n=this.workers.indexOf(t)+1;this.debug(`Running task #${e.id} on worker #${n}...`);this.eventSubject.next({type:Ce.taskStart,taskID:e.id,workerID:n});try{const r=yield e.run(yield t.init);this.debug(`Task #${e.id} completed successfully`);this.eventSubject.next({type:Ce.taskCompleted,returnValue:r,taskID:e.id,workerID:n})}catch(t){this.debug(`Task #${e.id} failed`);this.eventSubject.next({type:Ce.taskFailed,taskID:e.id,error:t,workerID:n})}}))}run(t,e){return Ee(this,void 0,void 0,(function*(){const n=(()=>Ee(this,void 0,void 0,(function*(){const r=()=>{t.runningTasks=t.runningTasks.filter((t=>t!==n))};yield Te(0);try{yield this.runPoolTask(t,e)}finally{r();if(!this.isClosing){this.scheduleWork()}}})))();t.runningTasks.push(n)}))}scheduleWork(){this.debug(`Attempt de-queueing a task in order to run it...`);const t=this.findIdlingWorker();if(!t)return;const e=this.taskQueue.shift();if(!e){this.debug(`Task queue is empty`);this.eventSubject.next({type:Ce.taskQueueDrained});return}this.run(t,e)}taskCompletion(t){return new Promise(((e,n)=>{const r=this.events().subscribe((s=>{if(s.type===Ce.taskCompleted&&s.taskID===t){r.unsubscribe();e(s.returnValue)}else if(s.type===Ce.taskFailed&&s.taskID===t){r.unsubscribe();n(s.error)}else if(s.type===Ce.taskCanceled&&s.taskID===t){r.unsubscribe();n(Error("Task has been canceled."))}else if(s.type===Ce.terminated){r.unsubscribe();n(Error("Pool has been terminated before task was run."))}}))}))}settled(){return Ee(this,arguments,void 0,(function*(t=false){const e=()=>De(this.workers,(t=>t.runningTasks));const n=[];const r=this.eventObservable.subscribe((t=>{if(t.type===Ce.taskFailed){n.push(t.error)}}));if(this.initErrors.length>0){r.unsubscribe();return Promise.reject(this.initErrors[0])}if(t&&this.taskQueue.length===0){yield be(e());r.unsubscribe();return n}yield new Promise(((t,e)=>{const n=this.eventObservable.subscribe({next(e){if(e.type===Ce.taskQueueDrained||e.type===Ce.terminated){n.unsubscribe();t(void 0)}},complete(){n.unsubscribe();t(void 0)},error:e})}));yield be(e());r.unsubscribe();return n}))}completed(){return Ee(this,arguments,void 0,(function*(t=false){const e=this.settled(t);const n=new Promise(((t,n)=>{const r=this.eventObservable.subscribe({next(s){if(s.type===Ce.taskQueueDrained||s.type===Ce.terminated){r.unsubscribe();t(e)}else if(s.type===Ce.taskFailed){r.unsubscribe();n(s.error)}},complete(){r.unsubscribe();t(e)},error:n})}));const r=yield Promise.race([e,n]);if(r.length>0){throw r[0]}}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:e=Infinity}=this.options;if(this.isClosing){throw Error(`Cannot schedule pool tasks after terminate() has been called.`)}if(this.initErrors.length>0){throw this.initErrors[0]}if(this.taskQueue.length>=e){throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\n"+"This usually happens for one of two reasons: We are either at peak "+"workload right now or some tasks just won't finish, thus blocking the pool.")}const n=this.nextTaskID++;const r=this.taskCompletion(n);r.catch((t=>{this.debug(`Task #${n} errored:`,t)}));const s={id:n,run:t,cancel:()=>{if(this.taskQueue.indexOf(s)===-1)return;this.taskQueue=this.taskQueue.filter((t=>t!==s));this.eventSubject.next({type:Ce.taskCanceled,taskID:s.id})},then:r.then.bind(r)};this.debug(`Queueing task #${s.id}...`);this.taskQueue.push(s);this.eventSubject.next({type:Ce.taskQueued,taskID:s.id});this.scheduleWork();return s}terminate(t){return Ee(this,void 0,void 0,(function*(){this.isClosing=true;if(!t){yield this.completed(true)}this.eventSubject.next({type:Ce.terminated,remainingQueue:[...this.taskQueue]});this.eventSubject.complete();yield Promise.all(this.workers.map((t=>Ee(this,void 0,void 0,(function*(){try{yield Pe.terminate(yield t.init)}catch(t){this.debug("Worker did not initialize; nothing to terminate:",t)}})))))}))}}Ve.EventType=Ce;function ze(t,e){return new Ve(t,e)}ze.EventType=Ce;const Be=ze;const Re=()=>undefined;function We(){let t=false;let e;let n=Re;const r=new Promise((r=>{if(t){r(e)}else{n=r}}));const s=r=>{t=true;e=r;n(e)};return[r,s]}var $e;(function(t){t["internalError"]="internalError";t["message"]="message";t["termination"]="termination"})($e||($e={}));var qe;const Ue=()=>undefined;const _e=t=>t;const Le=t=>Promise.resolve().then(t);function He(t){throw t}function Ge(t){return t&&typeof t.then==="function"}class Ye extends ve{constructor(t){super((e=>{const n=this;const r=Object.assign(Object.assign({},e),{complete(){e.complete();n.onCompletion()},error(t){e.error(t);n.onError(t)},next(t){e.next(t);n.onNext(t)}});try{this.initHasRun=true;return t(r)}catch(t){r.error(t)}}));this.initHasRun=false;this.fulfillmentCallbacks=[];this.rejectionCallbacks=[];this.firstValueSet=false;this.state="pending";this[qe]="[object ObservablePromise]"}onNext(t){if(!this.firstValueSet){this.firstValue=t;this.firstValueSet=true}}onError(t){this.state="rejected";this.rejection=t;for(const e of this.rejectionCallbacks){Le((()=>e(t)))}}onCompletion(){this.state="fulfilled";for(const t of this.fulfillmentCallbacks){Le((()=>t(this.firstValue)))}}then(t,e){const n=t||_e;const r=e||He;let s=false;return new Promise(((t,e)=>{const o=n=>{if(s)return;s=true;try{t(r(n))}catch(t){e(t)}};const i=e=>{try{t(n(e))}catch(t){o(t)}};if(!this.initHasRun){this.subscribe({error:o})}if(this.state==="fulfilled"){return t(n(this.firstValue))}if(this.state==="rejected"){s=true;return t(r(this.rejection))}this.fulfillmentCallbacks.push(i);this.rejectionCallbacks.push(o)}))}catch(t){return this.then(undefined,t)}finally(t){const e=t||Ue;return this.then((t=>{e();return t}),(()=>e()))}static from(t){if(Ge(t)){return new Ye((e=>{const n=t=>{e.next(t);e.complete()};const r=t=>{e.error(t)};t.then(n,r)}))}else{return super.from(t)}}}qe=Symbol.toStringTag;function Je(t){return t&&typeof t==="object"&&t[Me]}var Qe;(function(t){t["cancel"]="cancel";t["run"]="run"})(Qe||(Qe={}));var Ze;(function(t){t["error"]="error";t["init"]="init";t["result"]="result";t["running"]="running";t["uncaughtError"]="uncaughtError"})(Ze||(Ze={}));const Ke=Zt("threads:master:messages");let Xe=1;const tn=t=>Array.from(new Set(t));const en=t=>t&&t.type===Ze.error;const nn=t=>t&&t.type===Ze.result;const rn=t=>t&&t.type===Ze.running;function sn(t,e){return new ve((n=>{let r;let s=false;const o=()=>{t.removeEventListener("message",i);t.removeEventListener("error",c);t.removeEventListener("exit",a)};const i=t=>{Ke("Message from worker:",t.data);if(!t.data||t.data.uid!==e)return;if(rn(t.data)){r=t.data.resultType}else if(nn(t.data)){if(r==="promise"){if(typeof t.data.payload!=="undefined"){n.next(jt(t.data.payload))}s=true;n.complete();o()}else{if(typeof t.data.payload!=="undefined"){n.next(jt(t.data.payload))}if(t.data.complete){s=true;n.complete();o()}}}else if(en(t.data)){const e=jt(t.data.error);s=true;n.error(e);o()}};const c=t=>{if(s)return;s=true;const e=t&&t.data instanceof Error?t.data:Error(String(t&&t.data||"Worker errored before the job completed."));n.error(e);o()};const a=t=>{if(s)return;s=true;const e=t?t.data:undefined;n.error(Error(`Worker terminated before the job completed (exit code: ${e}).`));o()};t.addEventListener("message",i);t.addEventListener("error",c);t.addEventListener("exit",a);return()=>{if(r==="observable"||!r){const n={type:Qe.cancel,uid:e};t.postMessage(n)}o()}}))}function on(t){if(t.length===0){return{args:[],transferables:[]}}const e=[];const n=[];for(const r of t){if(Je(r)){e.push(Pt(r.send));n.push(...r.transferables)}else{e.push(Pt(r))}}return{args:e,transferables:n.length===0?n:tn(n)}}function cn(t,e){return(...n)=>{const r=Xe++;const{args:s,transferables:o}=on(n);const i={type:Qe.run,uid:r,method:e,args:s};Ke("Sending command to run function to worker:",i);try{t.postMessage(i,o)}catch(t){if(It(t)){const e=new Et(`Cannot send arguments to the worker thread: a value is not structured-cloneable. `+`Functions, class instances and other non-serializable values cannot be passed to a thread. `+`Original error: ${t.message}`,t);return Ye.from(Promise.reject(e))}return Ye.from(Promise.reject(t))}return Ye.from(ge(sn(t,r)))}}function an(t,e){const n={};for(const r of e){n[r]=cn(t,r)}return n}var un=undefined&&undefined.__awaiter||function(t,e,n,r){function s(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{a(r.next(t))}catch(t){o(t)}}function c(t){try{a(r["throw"](t))}catch(t){o(t)}}function a(t){t.done?n(t.value):s(t.value).then(i,c)}a((r=r.apply(t,e||[])).next())}))};const ln=Zt("threads:master:messages");const fn=Zt("threads:master:spawn");const hn=Zt("threads:master:thread-utils");const dn=t=>t&&t.type==="init";const mn=t=>t&&t.type==="uncaughtError";const pn=typeof process!=="undefined"&&typeof process.env!=="undefined"&&process.env.THREADS_WORKER_INIT_TIMEOUT?Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT,10):1e4;function vn(t,e,n){return un(this,void 0,void 0,(function*(){let r;const s=new Promise(((t,s)=>{r=setTimeout((()=>s(Error(n))),e)}));try{return yield Promise.race([t,s])}finally{clearTimeout(r)}}))}function wn(t){return new Promise(((e,n)=>{const r=s=>{ln("Message from worker before finishing initialization:",s.data);if(dn(s.data)){t.removeEventListener("message",r);e(s.data)}else if(mn(s.data)){t.removeEventListener("message",r);n(jt(s.data.error))}};t.addEventListener("message",r)}))}function yn(t,e){return new ve((n=>{const r=t=>{const e={type:$e.message,data:t.data};n.next(e)};const s=t=>{hn("Unhandled promise rejection event in thread:",t);const e={type:$e.internalError,error:Error(t.reason)};n.next(e)};let o=false;const i=()=>{t.removeEventListener("message",r);t.removeEventListener("unhandledrejection",s);t.removeEventListener("exit",a)};const c=()=>{if(o)return;o=true;const t={type:$e.termination};i();n.next(t);n.complete()};const a=()=>c();t.addEventListener("message",r);t.addEventListener("unhandledrejection",s);t.addEventListener("exit",a);e.then(c);return i}))}function gn(t){const[e,n]=We();const r=()=>un(this,void 0,void 0,(function*(){hn("Terminating worker");yield t.terminate();n()}));return{terminate:r,termination:e}}function bn(t,e,n,r){const s=n.filter((t=>t.type===$e.internalError)).map((t=>t.error));return Object.assign(t,{[xe]:s,[ke]:n,[Fe]:r,[Se]:e})}function Cn(t,e){return un(this,void 0,void 0,(function*(){var e,n,r,s;fn("Initializing new thread");const o=pn;let i;try{i=yield vn(wn(t),o,`Timeout: Did not receive an init message from worker after ${o}ms. Make sure the worker calls expose().`)}catch(r){yield Promise.resolve((n=(e=t).terminate)===null||n===void 0?void 0:n.call(e)).catch((()=>undefined));throw r}const c=i.exposed;const{termination:a,terminate:u}=gn(t);const l=yn(t,a);if(c.type==="function"){const e=cn(t);return bn(e,t,l,u)}else if(c.type==="module"){const e=an(t,c.methods);return bn(e,t,l,u)}else{const e=c.type;yield Promise.resolve((s=(r=t).terminate)===null||s===void 0?void 0:s.call(r)).catch((()=>undefined));throw Error(`Worker init message states unexpected type of expose(): ${e}`)}}))}Wt().blob;const xn=Wt().default;const kn=new URL("./png-decoder.worker.js",import.meta.url);let Fn;const Mn=1;function Sn(){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 Mn}}function jn(){if(Fn==null){const t=Sn();console.debug(`Spawning PNG worker pool [size=${t}]`);Fn=Be((()=>Cn(new xn(kn.href))),{size:t})}return Fn}const Pn=async t=>{const e=jn();return e.queue((e=>e(t)))};function En(t,n){const r=e.magnitude(t);const s=n.radius/r;return e.scale(s,t)}function In(t,n,r){const s=e.subtract(r,t);const o=e.dot(n,s);const i=e.magnitudeSquared(n);const c=o/i;const a=e.scale(c,n);return e.add(a,t)}class Nn{constructor(t,e,n,r,s,o,i,c,a,u=y.create()){this.correlationIds=t;this.temporalRefinementCorrelationId=e;this.sequenceNumber=n;this.dimensions=r;this.image=s;this.scene=o;this.depthBufferBytes=i;this.featureMapBytes=c;this.partialFrame=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 Pn(t);return lt.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 Pn(t);return xt.fromPng(e,this.image.imageAttr)}copy({correlationIds:t,temporalRefinementCorrelationId:e,sequenceNumber:n,dimensions:r,image:s,scene:o,depthBufferBytes:i,featureMapBytes:c,partialFrame:a}){return new Nn(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,s!==null&&s!==void 0?s:this.image,o!==null&&o!==void 0?o:this.scene,i!==null&&i!==void 0?i:this.depthBufferBytes,c!==null&&c!==void 0?c:this.featureMapBytes,a!==null&&a!==void 0?a:this.partialFrame,this.id)}}class Tn{constructor(t,e){this.imageAttr=t;this.imageBytes=e}}class Dn{constructor(t,e,n,r,s,o,i,c){this.camera=t;this.boundingBox=e;this.crossSection=n;this.worldOrientation=r;this.hasChanged=s;this.sceneViewSummary=o;this.modelViewId=i;this.itemModelView=c}copy({camera:t,boundingBox:e,crossSection:n,worldOrientation:r,hasChanged:s,sceneViewSummary:o,modelViewId:i,itemModelView:c}){return new Dn(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,s!==null&&s!==void 0?s:this.hasChanged,o!==null&&o!==void 0?o:this.sceneViewSummary,i!==null&&i!==void 0?i:this.modelViewId,c!==null&&c!==void 0?c:this.itemModelView)}}class On{constructor(t,e,n,r,s,o){this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=s;this.aspectRatio=o}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}static fromBoundingBox(t,e,r){var s;const{near:o,far:i}=et(e,t);if(G(t)){const s=n.create(e);const c=En(t.viewVector,s);const a=In(t.lookAt,c,s.center);return new Vn(c,a,t.up,o,i,r,t.fovHeight,t.rotationPoint)}else{return new An(t.position,t.lookAt,t.up,o,i,r,(s=t.fovY)!==null&&s!==void 0?s:45)}}isOrthographic(){return false}isPerspective(){return false}isPointBehindNear(t){const{position:n,direction:r,near:s}=this;const o=e.dot(e.subtract(t,n),r);return o<s}intersectLineWithNear(t){const{position:n,direction:r,near:s}=this;const o=e.subtract(t.start,n);const a=e.subtract(t.end,n);const u=i.create({start:o,end:a});const l=c.create({normal:r,constant:-s});const f=c.intersectLine(l,u);return f!=null?e.add(f,n):undefined}computeCameraMatrices(){if(this.cameraMatrices==null){return{viewMatrix:a.makeIdentity(),worldMatrix:a.makeIdentity(),projectionMatrix:a.makeIdentity(),projectionMatrixInverse:a.makeIdentity(),projectionViewMatrix:a.makeIdentity()}}return this.cameraMatrices}updateCameraMatrices(t){this.cameraMatrices=t;return this.cameraMatrices}}class An extends On{constructor(t,e,n,r,s,o,i){super(t,e,n,r,s,o);this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=s;this.aspectRatio=o;this.fovY=i}toOrthographic(t){return On.fromBoundingBox(Z(this,t),t,this.aspectRatio)}isPerspective(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=a.makeLookAtView(this.position,this.lookAt,this.up);const e=a.invert(t);const n=a.makePerspective(this.near,this.far,this.fovY,this.aspectRatio);const r=a.invert(n);const s=a.multiply(t,n);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:s})}return this.cameraMatrices}}class Vn extends On{constructor(t,n,r,s,o,i,c,a){super(e.add(n,e.negate(t)),n,r,s,o,i);this.lookAt=n;this.up=r;this.near=s;this.far=o;this.aspectRatio=i;this.fovHeight=c;this.rotationPoint=a;this.top=c*.5;this.bottom=-this.top;this.right=this.top*i;this.left=-this.right}toPerspective(t){return On.fromBoundingBox(K(this),t,this.aspectRatio)}isOrthographic(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=a.makeLookAtView(this.position,this.lookAt,this.up);const e=a.invert(t);const n=a.makeOrthographic(this.left,this.right,this.bottom,this.top,this.near,this.far);const r=a.invert(n);const s=a.multiply(t,n);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:s})}return this.cameraMatrices}}class zn{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 a.makeBasis(r,n,t)}}zn.DEFAULT=new zn(e.up(),e.back());class Bn{constructor(t,e){this.position=t;this.up=e}transformMatrix(t){const n=e.multiplyByTransformMatrixColumnMajor(this.position,t);const r=e.multiplyByTransformMatrixColumnMajor(this.up,t);return new Bn(n,r)}}Bn.FRONT=new Bn(e.back(),e.up());Bn.RIGHT=new Bn(e.right(),e.up());Bn.LEFT=new Bn(e.left(),e.up());Bn.BACK=new Bn(e.forward(),e.up());Bn.TOP=new Bn(e.up(),e.forward());Bn.BOTTOM=new Bn(e.down(),e.back());Bn.TOP_FRONT_RIGHT=new Bn(e.add(e.back(),e.up(),e.left()),e.up());Bn.TOP_FRONT_LEFT=new Bn(e.add(e.back(),e.up(),e.right()),e.up());Bn.BOTTOM_FRONT_RIGHT=new Bn(e.add(e.back(),e.down(),e.left()),e.up());Bn.BOTTOM_FRONT_LEFT=new Bn(e.add(e.back(),e.down(),e.right()),e.up());Bn.TOP_BACK_LEFT=new Bn(e.add(e.forward(),e.up(),e.right()),e.up());Bn.TOP_BACK_RIGHT=new Bn(e.add(e.forward(),e.up(),e.left()),e.up());Bn.BOTTOM_BACK_LEFT=new Bn(e.add(e.forward(),e.down(),e.right()),e.up());Bn.BOTTOM_BACK_RIGHT=new Bn(e.add(e.forward(),e.down(),e.left()),e.up());Bn.TOP_FRONT=new Bn(e.add(e.back(),e.up()),e.up());Bn.BOTTOM_FRONT=new Bn(e.add(e.back(),e.down()),e.up());Bn.FRONT_RIGHT=new Bn(e.add(e.back(),e.left()),e.up());Bn.FRONT_LEFT=new Bn(e.add(e.back(),e.right()),e.up());Bn.TOP_BACK=new Bn(e.add(e.forward(),e.up()),e.up());Bn.BOTTOM_BACK=new Bn(e.add(e.forward(),e.down()),e.up());Bn.BACK_LEFT=new Bn(e.add(e.forward(),e.right()),e.up());Bn.BACK_RIGHT=new Bn(e.add(e.forward(),e.left()),e.up());Bn.TOP_LEFT=new Bn(e.add(e.up(),e.right()),e.up());Bn.TOP_RIGHT=new Bn(e.add(e.up(),e.left()),e.up());Bn.BOTTOM_LEFT=new Bn(e.add(e.down(),e.right()),e.up());Bn.BOTTOM_RIGHT=new Bn(e.add(e.down(),e.left()),e.up());const Rn=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y")),(([t,e])=>r.create(t,e)));const Wn=v.defineMapper(v.read(v.requiredProp("width"),v.requiredProp("height")),(([t,e])=>u.create(t,e)));const $n=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("width"),v.requiredProp("height")),(([t,e,n,r])=>o.create(t,e,n,r)));const qn=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("z")),(([t,n,r])=>e.create(t,n,r)));const Un=v.defineMapper(v.read(v.requiredProp("xmin"),v.requiredProp("ymin"),v.requiredProp("zmin"),v.requiredProp("xmax"),v.requiredProp("ymax"),v.requiredProp("zmax")),(([t,n,r,s,o,i])=>l.create(e.create(t,n,r),e.create(s,o,i))));const _n=v.defineMapper(v.read(v.requiredProp("d"),v.mapRequiredProp("normal",qn)),(([t,e])=>c.create({normal:e,constant:t})));const Ln=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("z"),v.requiredProp("w")),(([t,e,n,r])=>f.create({x:t,y:e,z:n,w:r})));const Hn=v.defineMapper(v.read(v.mapRequiredProp("r0",Ln),v.mapRequiredProp("r1",Ln),v.mapRequiredProp("r2",Ln),v.mapRequiredProp("r3",Ln)),(([t,e,n,r])=>a.transpose(a.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 Gn=v.defineMapper(v.read(v.requiredProp("r"),v.requiredProp("g"),v.requiredProp("b")),(([t,e,n])=>w.create(t,e,n)));const Yn=v.defineMapper((t=>{function e(t){return{r:t.r,g:t.g,b:t.b}}if(typeof t==="string"){const n=w.fromHexString(t);return n!=null?e(n):{errors:["String is not a valid color."]}}else if(typeof t==="number"){return e(w.fromNumber(t))}else{return e(t)}}),(t=>t));tr();const Jn=tr();const Qn=tr();const Zn=er();const Kn=er();const Xn=er();function tr(){return v.defineMapper((t=>t!=null?{value:t}:undefined),(t=>t))}function er(){return v.defineMapper((t=>(t===null||t===void 0?void 0:t.value)||undefined),(t=>t))}const nr=v.defineMapper(v.read(v.mapProp("position",v.compose(v.required("position"),qn)),v.mapProp("lookAt",v.compose(v.required("lookAt"),qn)),v.mapProp("up",v.compose(v.required("up"),qn)),v.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 rr=v.defineMapper(v.read(v.mapProp("viewVector",v.compose(v.required("viewVector"),qn)),v.mapProp("lookAt",v.compose(v.required("lookAt"),qn)),v.mapProp("up",v.compose(v.required("up"),qn)),v.mapProp("fovHeight",v.required("fovHeight"))),(([t,e,n,r])=>({viewVector:t,lookAt:e,up:n,fovHeight:r})));const sr=v.defineMapper(v.read(v.mapProp("position",v.ifDefined(qn)),v.mapProp("lookAt",v.ifDefined(qn)),v.mapProp("up",v.ifDefined(qn)),v.mapProp("perspective",v.ifDefined(nr)),v.mapProp("orthographic",v.ifDefined(rr))),(([t,n,r,s,o])=>{var i;return(i=s!==null&&s!==void 0?s:o)!==null&&i!==void 0?i:{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 or=v.defineMapper(v.read(v.mapProp("normal",v.compose(v.required("normal"),qn)),v.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const ir=v.defineMapper(v.read(v.mapProp("frameDimensions",v.compose(v.required("frameDimensions"),Wn)),v.mapProp("imageRect",v.compose(v.required("imageRect"),$n)),v.mapProp("scaleFactor",v.required("scaleFactor"))),(([t,e,n])=>({frameDimensions:t,imageRect:e,imageScale:n})));const cr=v.defineMapper(v.read(v.mapProp("sectionPlanes",v.compose(v.required("sectionPlanes"),v.mapArray(or))),v.mapProp("highlightColor",v.ifDefined(Gn))),(([t,e])=>st({sectionPlanes:t,highlightColor:e||undefined})));const ar=v.defineMapper(v.read(v.requiredProp("count"),v.mapProp("boundingBox",v.ifDefined(Un))),(([t,e])=>({count:t,boundingBox:e!==null&&e!==void 0?e:undefined})));const ur=v.defineMapper(v.read(v.mapProp("visibleSummary",v.ifDefined(ar)),v.mapProp("selectedVisibleSummary",v.ifDefined(ar))),(([t,e])=>ct({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const lr=v.defineMapper(v.read(v.mapProp("modelViewId",v.ifDefined(j)),v.mapProp("sceneItemId",v.ifDefined(j))),(([t,e])=>it({modelViewId:t!==null&&t!==void 0?t:undefined,sceneItemId:e!==null&&e!==void 0?e:undefined})));const fr=v.defineMapper(v.read(v.mapProp("imageAttributes",v.compose(v.required("imageAttributes"),ir))),(([t])=>t));const hr=v.defineMapper(v.read(fr,v.mapProp("image",v.required("image"))),(([t,e])=>new Tn(t,e)));const dr=v.defineMapper(v.read(v.mapRequiredProp("camera",sr),v.mapRequiredProp("visibleBoundingBox",Un),v.mapRequiredProp("crossSectioning",cr),v.requiredProp("hasChanged"),v.mapRequiredProp("displayListSummary",ur),v.mapProp("modelViewId",v.ifDefined(P)),v.mapProp("itemModelView",v.ifDefined(lr))),(([t,e,n,r,s,o,i])=>({camera:t,boundingBox:e,crossSectioning:n,hasChanged:r,displayListSummary:s,modelViewId:o!==null&&o!==void 0?o:undefined,itemModelView:i!==null&&i!==void 0?i:undefined})));const mr=v.defineMapper(v.read(v.mapProp("sceneAttributes",v.compose(v.required("sceneAttributes"),dr))),(([t])=>t));const pr=v.defineMapper(v.read(mr,fr),(([t,e])=>On.fromBoundingBox(t.camera,t.boundingBox,u.aspectRatio(e.frameDimensions))));function vr(t){return v.defineMapper(v.read(mr,pr),(([e,n])=>new Dn(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId,e.itemModelView)))}function wr(t){return v.defineMapper(v.read(v.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),v.requiredProp("sequenceNumber"),v.compose(fr,v.getProp("frameDimensions")),vr(t),hr,v.mapProp("depthBuffer",Kn),v.mapProp("featureMap",Kn),v.mapProp("temporalRefinementCorrelationId",(t=>t!=null?j(t):null)),v.mapProp("partialFrame",v.ifDefined(Zn))),(([t,e,n,r,s,o,i,c,a])=>new Nn(t,c||"",e,n,s,r,o,i,a!==null&&a!==void 0?a:false)))}function yr(t){return v.ifInvalidThrow(wr(t))}const gr=v.defineMapper(v.compose(v.required("orientation"),v.read(v.mapProp("up",v.compose(v.required("up"),qn)),v.mapProp("front",v.compose(v.required("front"),qn)))),(([t,e])=>new zn(t,e)));v.ifInvalidThrow(gr);const br=v.defineMapper(v.read(v.mapRequiredProp("imageAttributes",ir),v.requiredProp("stencilBuffer"),v.mapRequiredProp("depthBuffer",v.compose(Kn,v.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const Cr=kr("stencilBuffer",br);const xr=v.ifInvalidThrow(Cr);function kr(t,e){return v.mapRequiredProp(t,e)}const Fr=v.defineMapper(v.read(v.requiredProp("token"),v.requiredProp("expiresIn")),(([t,e])=>q.create(t,e)));const Mr=v.defineMapper(v.read(v.compose(v.requiredProp("startStream"),v.mapRequiredProp("streamId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sceneId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sceneViewId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sessionId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("worldOrientation",gr)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("token",Fr))),(([t,e,n,r,s,o])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:s,token:o})));const Sr=v.ifInvalidThrow(Mr);const jr=v.defineMapper(v.read(v.compose(v.requiredProp("reconnect"),v.mapRequiredProp("token",Fr))),(([t])=>({token:t})));const Pr=v.ifInvalidThrow(jr);const Er=v.defineMapper(v.compose(v.requiredProp("refreshToken"),v.requiredProp("token"),Fr),(t=>t));const Ir=v.ifInvalidThrow(Er);const Nr=v.defineMapper(v.compose(v.requiredProp("syncTime"),v.requiredProp("replyTime"),v.read(v.requiredProp("seconds"),v.requiredProp("nanos"))),(([t,e])=>m({seconds:t,nanos:e})));const Tr=v.ifInvalidThrow(Nr);const Dr=v.defineMapper(v.ifDefined(v.getProp("next")),(t=>t!=null?t:undefined));const Or=v.defineMapper((t=>{switch(t){case"all":return{enabled:{value:true},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_ALL};case"final":return{enabled:{value:true},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_FINAL};default:return{enabled:{value:false},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_INVALID}}}),(t=>t));const Ar=v.defineMapper(v.read(v.ifDefined(v.getProp("opacity"))),(([t])=>({opacity:{value:h(t!==null&&t!==void 0?t:0,0,1)}})));const Vr=v.defineMapper(v.read(v.ifDefined(v.getProp("width")),v.ifDefined(v.mapProp("color",v.ifDefined(Yn)))),(([t,e])=>({lineWidth:t,lineColor:e})));const zr=v.defineMapper(v.read(v.ifDefined(v.mapProp("color",v.ifDefined(Yn))),v.ifDefined(v.mapProp("opacity",Jn)),v.ifDefined(v.getProp("lineWidth"))),(([t,e,n])=>{if(t||e||n){return{color:t,opacity:e,lineWidth:n}}else return undefined}));const Br=v.defineMapper(v.read(v.ifDefined(v.mapProp("highlightColor",v.ifDefined(Yn))),v.ifDefined(v.mapProp("occludedOpacity",Jn)),v.ifDefined(v.mapProp("outline",v.ifDefined(Vr)))),(([t,e,n])=>({highlightColor:t,occludedOpacity:e,outline:n})));const Rr=v.defineMapper((t=>!!t),(t=>t));const Wr=v.defineMapper((t=>t!==null&&t!==void 0?t:""),(t=>t));const $r=v.defineMapper(v.read(v.ifDefined(v.mapProp("frameBackgroundColor",v.ifDefined(Yn)))),(([t])=>({frameBackgroundColor:t})));const qr=v.defineMapper(v.read(v.ifDefined(v.mapProp("streamKeyToCompare",v.ifDefined(Qn)))),(([t])=>({streamKeyToCompare:t})));const Ur=v.defineMapper(v.read(v.ifDefined(v.mapProp("endCapEnabled",(t=>!!t))),v.ifDefined(v.mapProp("endCapColor",v.ifDefined(Yn)))),(([t,e])=>({endCapEnabled:t,endCapColor:e})));const _r=v.defineMapper(v.read(v.mapProp("depthBuffers",Or),v.mapProp("phantom",Ar),v.mapProp("noDefaultLights",Rr),v.mapProp("featureLines",Vr),v.mapProp("featureHighlighting",Br),v.mapProp("featureMaps",Or),v.mapProp("experimentalRenderingOptions",Wr),v.mapProp("selectionHighlighting",zr),v.mapProp("frames",$r),v.mapProp("sceneComparison",qr),v.mapProp("crossSectioning",Ur)),(([t,e,n,r,s,o,i,c,a,u,l])=>{const f={depthBuffers:t,phantomItems:e,noDefaultLights:n,featureLines:r,featureHighlighting:s,featureMaps:o,experimentalRenderingOptions:i,selectionHighlighting:c,frames:a,sceneComparison:u,crossSectioningAttributes:l};return f}));export{bt as A,Yn as B,C,yt as D,Jn as E,On as F,yr as G,Sr as H,Pr as I,Tr as J,Ir as K,at as L,x as M,Z as N,zn as O,K as P,U as Q,Y as R,Bn as S,et as T,En as U,sr as V,E as W,_n as X,Nn as a,Tn as b,ot as c,Dn as d,Vn as e,tt as f,An as g,Ct as h,xr as i,Pn as j,lt as k,F as l,M as m,Xn as n,qn as o,k as p,Rn as q,Gn as r,Dr as s,X as t,In as u,S as v,Hn as w,Zn as x,Un as y,_r as z};
5
+ //# sourceMappingURL=p-Cc3XhAoA.js.map