@arcgis/core 4.34.0-next.84 → 4.34.0-next.86
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.
- package/Basemap.js +1 -1
- package/arcade/functions/measures.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06c389283ee5b60573f2.js +1 -0
- package/assets/esri/core/workers/chunks/0b679d5a1bfdbd006d6e.js +1 -0
- package/assets/esri/core/workers/chunks/1537b02e674f8ef77f4a.js +1 -0
- package/assets/esri/core/workers/chunks/{9eb1bfcb9b05f2a36748.js → 1f2d13466c60a6b57717.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a23b127f551bf13ef54.js → 268f5b233640a9dbbf89.js} +2 -2
- package/assets/esri/core/workers/chunks/2896ada406074f754b00.js +1 -0
- package/assets/esri/core/workers/chunks/28d30be414e59eabd963.js +1 -0
- package/assets/esri/core/workers/chunks/29471e0b3f7296dee096.js +1 -0
- package/assets/esri/core/workers/chunks/{3192b68675ff2afcb1d6.js → 2d3ae187f8aa3495d4ae.js} +1 -1
- package/assets/esri/core/workers/chunks/336b54144afec0c7d396.js +2 -0
- package/assets/esri/core/workers/chunks/42bc1e981624ce9844a4.js +1 -0
- package/assets/esri/core/workers/chunks/436bbe99bedd7b331edb.js +1 -0
- package/assets/esri/core/workers/chunks/{d66cdb9bb494da19696b.js → 47e4f66c33bb697fbe6b.js} +2 -2
- package/assets/esri/core/workers/chunks/4840bd93d8fe15c7aefd.js +1 -0
- package/assets/esri/core/workers/chunks/4a06ab00d095f63598b5.js +1 -0
- package/assets/esri/core/workers/chunks/4d4db6854aff7656f6e1.js +1 -0
- package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +1 -0
- package/assets/esri/core/workers/chunks/655a878ddea4907d830e.js +1 -0
- package/assets/esri/core/workers/chunks/68f5a2d2666636c3f807.js +1 -0
- package/assets/esri/core/workers/chunks/6c36cef0b58b87a1f17f.js +316 -0
- package/assets/esri/core/workers/chunks/72fe4f1f789abb5b4035.js +1 -0
- package/assets/esri/core/workers/chunks/8307f635a5c0c4a95825.js +1 -0
- package/assets/esri/core/workers/chunks/{afb76f9d6abedef771df.js → 8380a092ffc8e92ede7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{f8f85207b382c1ea038c.js → 97489bf16a1d327992b2.js} +3 -3
- package/assets/esri/core/workers/chunks/9d7a22746dae1451deaf.js +1 -0
- package/assets/esri/core/workers/chunks/a2652d10bb0bc41c9a8d.js +1 -0
- package/assets/esri/core/workers/chunks/a845c68e76382a73da5e.js +1 -0
- package/assets/esri/core/workers/chunks/{9c64b78c5c9b35b31d98.js → aa78b69219d9a0ef1c54.js} +2 -2
- package/assets/esri/core/workers/chunks/{1859a11df9f579b993d7.js → b2fbb44e219232e61cbd.js} +1 -1
- package/assets/esri/core/workers/chunks/b4349db7155673329432.js +1 -0
- package/assets/esri/core/workers/chunks/{d153b29c542c37ae1636.js → c50e8d5f554cf151865c.js} +2 -2
- package/assets/esri/core/workers/chunks/c5cc0fc652432a9264cc.js +1 -0
- package/assets/esri/core/workers/chunks/cab2a1382bdd32bb34d8.js +1 -0
- package/assets/esri/core/workers/chunks/ce937ff0dd1147ea297e.js +1 -0
- package/assets/esri/core/workers/chunks/d142a42755a78bb157ed.js +1 -0
- package/assets/esri/core/workers/chunks/{280af3640f8e93c1024e.js → d6e0528eacee7ea4c1ce.js} +2 -2
- package/assets/esri/core/workers/chunks/d9d86cf0500fa29d1d43.js +1 -0
- package/assets/esri/core/workers/chunks/{b15ff6c9ef2de8a49853.js → f651c05604eab83aef5f.js} +2 -2
- package/assets/esri/core/workers/chunks/{ed773dab5965e42a2879.js → f6e18668f728dfd8ba5e.js} +2 -2
- package/assets/esri/core/workers/chunks/ff8e2f998169ca3a7a68.js +1 -0
- package/assets/esri/libs/dracoMeshDecoder/draco_mesh_decoder.wasm +0 -0
- package/assets/esri/libs/i3s/i3s.wasm +0 -0
- package/chunks/CloudsComposition.glsl.js +2 -2
- package/chunks/HUDMaterial.glsl.js +49 -50
- package/chunks/LineMarker.glsl.js +34 -34
- package/chunks/PointRenderer.glsl.js +4 -4
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/draco_mesh_decoder.js +1 -1
- package/config.js +1 -1
- package/core/NestedMap.js +1 -1
- package/core/iteratorUtils.js +1 -1
- package/editing/geometry/lineUtils.js +1 -1
- package/interfaces.d.ts +55 -7
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/package.json +5 -5
- package/rest/print.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/support/userTypeGuards/isBasemap.js +5 -0
- package/symbols/support/previewSymbol2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +11 -11
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/InstancedCommandVAO.js +5 -0
- package/views/3d/webgl-engine/materials/renderers/InstancedCommandVAOs.js +5 -0
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +14 -9
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
- package/views/BasemapView.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/webgl/RenderbufferDescriptor.js +1 -1
- package/views/webgl/TextureDescriptor.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/views/webgl/VertexArrayObject.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/adapters/layer/GraphicsLayerAdapter.js +5 -0
- package/widgets/Sketch/adapters/layer/MapNotesLayerAdapter.js +5 -0
- package/assets/esri/core/workers/chunks/25ea02dd7d45a90cbb3b.js +0 -1
- package/assets/esri/core/workers/chunks/264a9a916e1e972b69d7.js +0 -1
- package/assets/esri/core/workers/chunks/30c85a1a4f118cc45a25.js +0 -1
- package/assets/esri/core/workers/chunks/3ef8a7468d7e3b2f0b69.js +0 -351
- package/assets/esri/core/workers/chunks/5c1cdc2ec06c4c6bd0b3.js +0 -1
- package/assets/esri/core/workers/chunks/609abf071c4ea24955c2.js +0 -1
- package/assets/esri/core/workers/chunks/71c2a8e5a17803d3e949.js +0 -1
- package/assets/esri/core/workers/chunks/7889a909394c61a9d3e0.js +0 -1
- package/assets/esri/core/workers/chunks/99ac292a858bbedc6a89.js +0 -1
- package/assets/esri/core/workers/chunks/9a6fa91dd204f64d2590.js +0 -1
- package/assets/esri/core/workers/chunks/9cdeead9d444e8d95477.js +0 -1
- package/assets/esri/core/workers/chunks/aa1eb7b4d9ccda725da5.js +0 -1
- package/assets/esri/core/workers/chunks/b4a053063e6022080d31.js +0 -1
- package/assets/esri/core/workers/chunks/b4b26cc2ba3ff30e1d03.js +0 -1
- package/assets/esri/core/workers/chunks/bbb585f0b484ab5eabb3.js +0 -1
- package/assets/esri/core/workers/chunks/c2bc70b65f5c2a2c9671.js +0 -1
- package/assets/esri/core/workers/chunks/cd1869e183001266c4c1.js +0 -2
- package/assets/esri/core/workers/chunks/d2fe403d6ab237bc89c2.js +0 -1
- package/assets/esri/core/workers/chunks/d51e8eeb1e1eb0605cc9.js +0 -1
- package/assets/esri/core/workers/chunks/e080628ac6e1cf25dc72.js +0 -1
- package/assets/esri/core/workers/chunks/e8e0f73fb94e63e2abc3.js +0 -1
- package/assets/esri/core/workers/chunks/f45c343527709f6f91c2.js +0 -1
- package/assets/esri/core/workers/chunks/fcac475e4e82911b3126.js +0 -1
- /package/assets/esri/core/workers/chunks/{7a23b127f551bf13ef54.js.LICENSE.txt → 268f5b233640a9dbbf89.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{cd1869e183001266c4c1.js.LICENSE.txt → 336b54144afec0c7d396.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{280af3640f8e93c1024e.js.LICENSE.txt → 47e4f66c33bb697fbe6b.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{9c64b78c5c9b35b31d98.js.LICENSE.txt → aa78b69219d9a0ef1c54.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d153b29c542c37ae1636.js.LICENSE.txt → c50e8d5f554cf151865c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b15ff6c9ef2de8a49853.js.LICENSE.txt → d6e0528eacee7ea4c1ce.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d66cdb9bb494da19696b.js.LICENSE.txt → f651c05604eab83aef5f.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ed773dab5965e42a2879.js.LICENSE.txt → f6e18668f728dfd8ba5e.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7136,8535],{17136:(e,t,r)=>{r.d(t,{Y_:()=>S,O7:()=>R,el:()=>A});var n=r(92602),o=r(69052),s=r(49186),i=r(53966),a=r(39829),u=r(82799),l=r(16930),c=r(80754),f=r(21325),d=r(28735),m=r(78888),p=r(65864),h=r(2272),g=r(84952),y=r(92300);const x=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function v(e,t,r){if(t){const t=function(e,t){if(!(e instanceof u.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new s.A("internal:geometry",e)}const r=(0,c.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const o=e[n][0],s=e[n][1],i=e[n+1][0],a=e[n+1][1],u=Math.sqrt((i-o)*(i-o)+(a-s)*(a-s)),l=(a-s)/u,c=(i-o)/u,f=u/t;if(f>1){for(let e=1;e<=f-1;e++){const n=e*t,i=c*n+o,a=l*n+s;r.push([i,a])}const e=(u+Math.floor(f-1)*t)/2,n=c*e+o,i=l*e+s;r.push([n,i])}r.push([i,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:n,spatialReference:e.spatialReference}):new u.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,c.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,c.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,c.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,c.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,c.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function M(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const o=t.cutIndexes[n],s=t.geometries[n],i=(0,c.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,c.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}})}if(o===r){if(w(e))for(const t of(0,c.r8)(s))e[o]=e[o].addRing(t);else if(b(e))for(const t of(0,c.r8)(s))e[o]=e[o].addPath(t)}else r=o,e[o]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let s,i,l,w,b,R,B,S,_=0;const I=[],P=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,i=(0,f.Vp)(s),l=s.isWebMercator,R=l?102100:4326,w=c.j7[R].maxX,b=c.j7[R].minX,B=c.j7[R].plus180Line,S=c.j7[R].minus180Line),i)if("mesh"===t.type)P.push(t);else if("point"===t.type)P.push(T(t.clone(),w,b));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,w,b)),P.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);P.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,c.kd)(e.xmin,b)*(2*w);let n=0===r?t.clone():(0,c.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(B)&&s!==w?(_=s>_?s:_,n=v(n,l),I.push(n),P.push("cut")):e.intersects(S)&&o!==b?(_=s*(2*w)>_?s*(2*w):_,n=v(n,l,360),I.push(n),P.push("cut")):P.push(n)}else P.push(t.clone());else P.push(t);else P.push(t);let E=(0,c.kd)(_,w),O=-90;const U=E,L=new u.A;for(;E>0;){const e=360*E-180;L.addPath([[e,O],[e,-1*O]]),O*=-1,E--}if(I.length>0&&U>0){const t=M(I,await async function(e,t,r,n){const o=(0,h.Dl)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...o.query,f:"json",sr:(0,f.YX)(s),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,m.A)(o.path+"/cut",i),{cutIndexes:u,geometries:l=[]}=a.data;return{cutIndexes:u,geometries:l.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=s,t})}}(o,I,L,r)),n=[],s=[];for(let r=0;r<P.length;r++){const o=P[r];if("cut"!==o)s.push(o);else{const o=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&o.rings.length>=i.rings.length?(n.push(o),s.push("simplify")):s.push(l?(0,d.Gh)(o):o)}}if(!n.length)return s;const i=await async function(e,t,r){const n="string"==typeof e?(0,g.An)(e):e,o=t[0].spatialReference,s=(0,p.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,f.YX)(o),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,m.A)(n.path+"/simplify",i);return(0,y.V)(a.geometries,s,o)}(o,n,r),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(l?(0,d.Gh)(i.shift()):i.shift())}return a}const k=[];for(let e=0;e<P.length;e++){const t=P[e];if("cut"!==t)k.push(t);else{const e=I.shift();k.push(!0===l?(0,d.Gh)(e):e)}}return k}function R(e,t,r){const n=(0,f.Vp)(r);if(null==n)return e;const[o,s]=n.valid,i=2*s;let a=0,u=0;t>s?a=Math.ceil(Math.abs(t-s)/i):t<o&&(a=-Math.ceil(Math.abs(t-o)/i)),e>s?u=Math.ceil(Math.abs(e-s)/i):e<o&&(u=-Math.ceil(Math.abs(e-o)/i));let l=e+(a-u)*i;const c=l-t;return c>s?l-=i:c<o&&(l+=i),l}function B(e){const t=(0,f.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new o.hr(r,n)}const S=B(l.A.WGS84);B(l.A.WebMercator)},21015:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(78888),o=r(60999),s=r(49186),i=r(74887),a=r(84952);class u{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load(0,e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,i.Te)(t),(0,a.lJ)(e)):this._load(1,e,t)}async loadImage(e,t){return this._load(2,e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,n.A)(t,{responseType:l[e]})).data;const a=await(0,o.Ke)(this._streamDataRequester.request(t,e,r));if(!0===a.ok)return a.value;throw(0,i.QP)(a.error),new s.A("glt-loader-request-error",`Request for resource failed: ${a.error}`)}}const l={2:"image",1:"array-buffer",0:"json",3:void 0}},43609:(e,t,r)=>{r.d(t,{a:()=>s,f:()=>i,n:()=>o});var n=r(34275);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let i=0,a=0;if(!(0,n.iu)(t)||(0,n.dk)(t)){for(let n=0;n<s;++n)e[i]=t[a],e[i+1]=t[a+1],i+=r,a+=o;return}const u=(0,n.a3)(t);if((0,n.JI)(t))for(let n=0;n<s;++n)e[i]=Math.max(t[a]/u,-1),e[i+1]=Math.max(t[a+1]/u,-1),i+=r,a+=o;else for(let n=0;n<s;++n)e[i]=t[a]/u,e[i+1]=t[a+1]/u,i+=r,a+=o}function i(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,i=n?.count??e.count;let a=(n?.dstIndex??0)*s;for(let e=0;e<i;++e)o[a]=t,o[a+1]=r,a+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},51530:(e,t,r)=>{r.d(t,{KB:()=>i,Xi:()=>o,pn:()=>a,x3:()=>s});var n=r(44208);class o{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function s(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new o(e);const r=new Blob([e],{type:t});let s=URL.createObjectURL(r);switch(t){case"image/jpeg":s+="#.jpg";break;case"image/png":s+="#.png"}const i=new Image;if((0,n.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{o(),e(i)},n=e=>{o(),t(e)},o=()=>{URL.revokeObjectURL(s),i.removeEventListener("load",r),i.removeEventListener("error",n)};i.addEventListener("load",r),i.addEventListener("error",n),i.src=s});try{i.src=s,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(s),i}},61473:(e,t,r)=>{function n(e){return e=e||globalThis.location.hostname,l.some(t=>null!=e?.match(t))}function o(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(s)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(u)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>o,b5:()=>n});const s=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,u=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,s,i,/^jsapps\.esri\.com$/,a,u]},64304:(e,t,r)=>{r.d(t,{fetch:()=>Q});var n=r(40876),o=r(61473),s=r(34727),i=r(77690),a=r(29242),u=r(58083),l=r(9093),c=r(48163),f=r(38954),d=r(51850),m=r(70328),p=r(11868),h=r(13030),g=r(73354),y=r(65686),x=r(43609),w=r(21015),b=r(84498),v=r(51530),T=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,n=null!=e.scale?e.scale:T.Un,o=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),s=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),u=(0,a.fA)(n[0],0,0,0,n[1],0,0,0,1),l=(0,a.vt)();return(0,i.lw)(l,s,u),(0,i.lw)(l,o,l),l}class A{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class R{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new A,this.numberOfVertices=0}}var B=r(78888),S=r(60999),_=r(49186),I=r(53966),P=r(69397);class E{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const n=this._outer.get(e);n?n.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,n]of t)yield[e,r,n]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,n)=>e(t,r,n)))}copy(){const e=new E;return this.forAll((t,r,n)=>e.set(r,n,t)),e}}var O=r(74887),U=r(46140),L=r(97146),k=r(99677),j=r(46610),z=r(87170),q=r(48833),F=r(2495);const C=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class ${constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function V(e){throw new _.A("",`Request for object resource failed: ${e}`)}function N(e){const t=e.params,r=t.topology;let n=!0;switch(t.vertexAttributes||(C().warn("Geometry must specify vertex attributes"),n=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(C().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(C().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):(C().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else C().warn("Indexed geometries must specify faces"),n=!1;break}default:C().warn(`Unsupported topology '${r}'`),n=!1}e.params.material||(C().warn("Geometry requires material"),n=!1);const o=e.params.vertexAttributes;for(const e in o)o[e].values||(C().warn("Geometries with externally defined attributes are not yet supported"),n=!1);return n}function D(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function G(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function X(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const W=new U.R(1,2,"wosr");var J=r(74810);async function Q(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,o.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=t?.streamDataRequester;if(r)return async function(e,t,r){const n=await(0,S.Ke)(t.request(e,0,r));if(!0===n.ok)return n.value;(0,O.QP)(n.error),V(n.error.details.url)}(e,r,t);const n=await(0,S.Ke)((0,B.A)(e,t));if(!0===n.ok)return n.value.data;(0,O.QP)(n.error),V(n.error)}(e,t),n=await async function(e,t){const r=new Array;for(const n in e){const o=e[n],s=o.images[0].data;if(!s){C().warn("Externally referenced texture data is not yet supported");continue}const i=o.encoding+";base64,"+s,a="/textureDefinitions/"+n,u="rgba"===o.channels?o.alphaChannelUsage||"transparency":"none",l={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==G(u)},c=t?.disableTextures?Promise.resolve(null):(0,k.D)(i,t);r.push(c.then(e=>({refId:a,image:e,parameters:l,alphaChannelUsage:u})))}const n=await Promise.all(r),o={};for(const e of n)o[e.refId]=e;return o}(r.textureDefinitions??{},t);let o=0;for(const e in n)if(n.hasOwnProperty(e)){const t=n[e];o+=t?.image?t.image.width*t.image.height*4:0}return new $(r,n,o+(0,P.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:n}=function(e,t){const r=new Array,n=new Array,o=new Array,s=new E,i=e.resource,a=U.R.parse(i.version||"1.0","wosr");W.validate(a);const u=i.model.name,l=i.model.geometries,c=i.materialDefinitions??{},f=e.textures;let m=0;const p=new Map;for(let e=0;e<l.length;e++){const i=l[e];if(!N(i))continue;const a=X(i),u=i.params.vertexAttributes,h=[],g=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},y=u.position,x=y.values.length/y.valuesPerElement;for(const e in u){const t=u[e],r=t.values,n=g(e)??(0,L.tM)(x);h.push([e,new j.n(r,n,t.valuesPerElement,!0)])}const w=a.texture,b=f&&f[w];if(b&&!p.has(w)){const{image:e,parameters:t}=b,r=new q.g(e,t);n.push(r),p.set(w,r)}const v=p.get(w),T=v?v.id:void 0,M=a.material;let A=s.get(M,w);if(null==A){const e=c[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=b?G(b.alphaChannelUsage):void 0,n={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:T,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:b?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(n,t.materialParameters),A=new F.$U(n,t),s.set(M,w,A)}o.push(A);const R=new z.V(A,h);m+=h.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(R)}return{engineResources:[{name:u,stageResources:{textures:n,materials:o,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:D(r)}}(e,t);return{lods:r,referenceBoundingBox:n,isEsriSymbolResource:!1,isWosr:!0}}let T;if(t.cache)T=await t.cache.loadGLTF(a.url,t,!!t.usePBR);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));T=await e(new w.R(t.streamDataRequester),a.url,t,t.usePBR)}const A=T.model.meta?.ESRI_proxyEllipsoid,_=T.meta.isEsriSymbolResource&&null!=A&&"EsriRealisticTreesStyle"===T.meta.ESRI_webstyle;_&&!T.customMeta.esriTreeRendering&&(T.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const o=e.model.lods[r];for(const s of o.parts){const o=s.attributes.normal;if(null==o)return;const i=s.attributes.position,a=i.count,c=(0,d.vt)(),m=(0,d.vt)(),p=(0,d.vt)(),g=new Float32Array(4*a),y=new Float32Array(3*a),x=(0,u.B8)((0,l.vt)(),s.transform);let w=0,b=0;for(let u=0;u<a;u++){i.getVec(u,m),o.getVec(u,c),(0,f.t)(m,m,s.transform),(0,f.d)(p,m,t.center),(0,f.D)(p,p,t.radius);const a=p[2],l=(0,f.l)(p),d=Math.min(.45+.55*l*l,1)**n.Tf;(0,f.D)(p,p,t.radius),null!==x&&(0,f.t)(p,p,x),(0,f.n)(p,p),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,f.m)(p,p,c,a>-1?.2:Math.min(-4*a-3.8,1)),y[w]=p[0],y[w+1]=p[1],y[w+2]=p[2],w+=3,g[b]=d,g[b+1]=d,g[b+2]=d,g[b+3]=1,b+=4}s.attributes.normal=new h.xs(y.buffer),s.attributes.color=new h.Eq(g.buffer)}}}(T,A));const I=!!t.usePBR,Q=T.meta.isEsriSymbolResource?{usePBR:I,isSchematic:!1,treeRendering:_,mrrFactors:J.SY}:{usePBR:I,isSchematic:!1,treeRendering:!1,mrrFactors:J.mb},K={...t.materialParameters,treeRendering:_},{engineResources:H,referenceBoundingBox:Z}=function(e,t,r,o,a,u){const l=e.model,f=new Array,d=new Map,w=new Map,T=l.lods.length,A=(0,m.Ie)();return l.lods.forEach((e,B)=>{const S=!0===o.skipHighLods&&(T>1&&0===B||T>3&&1===B)||!1===o.skipHighLods&&null!=a&&B!==a;if(S&&0!==B)return;const _=new R(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const a=S?new F.$U({},o):function(e,t,r,o,s,i,a,u,l){const f=e.materials.get(t.material);if(null==f)return null;const{normal:d,color:m,texCoord0:p,tangent:h}=t.attributes,g=t.material+(d?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(h?"_tangent":""),y=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,w=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(f.alphaMode);if(!i.has(g)){if(y){const t=(t,r=!1,n=!1)=>{if(null!=t&&!a.has(t)){const o=e.textures.get(t);if(o){const e=o.data,s=r&&!(0,v.x3)(e)?u.compressionOptions:void 0;a.set(t,new q.g((0,v.x3)(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!(0,v.x3)(e)&&n,encoding:(0,v.x3)(e)?e.encoding:void 0,compressionOptions:s}))}}},r=1!==w&&!l;t(f.colorTexture,r,1!==w),t(f.normalTexture),t(f.occlusionTexture,!0),t(f.emissiveTexture),t(f.metallicRoughnessTexture,!0)}const r=1/n.Tf,d=f.color[0]**r,m=f.color[1]**r,p=f.color[2]**r,h=f.emissiveFactor[0]**r,b=f.emissiveFactor[1]**r,T=f.emissiveFactor[2]**r,A=null!=f.colorTexture&&y?a.get(f.colorTexture):null,R=(0,J.Jr)(f),B=null!=f.normalTextureTransform?.scale?f.normalTextureTransform?.scale:c.Un;i.set(g,new F.$U({...o,customDepthTest:1,textureAlphaMode:w,textureAlphaCutoff:f.alphaCutoff,diffuse:[d,m,p],ambient:[d,m,p],opacity:"OPAQUE"===f.alphaMode?1:f.opacity,doubleSided:f.doubleSided,doubleSidedType:"winding-order",cullFace:f.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:f.receiveShadows,receiveAmbientOcclusion:f.receiveAmbientOcclusion,textureId:null!=A?A.id:void 0,colorMixMode:f.colorMixMode,normalTextureId:null!=f.normalTexture&&y?a.get(f.normalTexture).id:void 0,textureAlphaPremultiplied:null!=A&&!!A.parameters.preMultiplyAlpha,occlusionTextureId:null!=f.occlusionTexture&&y?a.get(f.occlusionTexture).id:void 0,emissiveTextureId:null!=f.emissiveTexture&&y?a.get(f.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=f.metallicRoughnessTexture&&y?a.get(f.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[h,b,T],mrrFactors:R?J.Bt:[f.metallicFactor,f.roughnessFactor,o.mrrFactors[2]],isSchematic:R,colorTextureTransformMatrix:M(f.colorTextureTransform),normalTextureTransformMatrix:M(f.normalTextureTransform),scale:[B[0],B[1]],occlusionTextureTransformMatrix:M(f.occlusionTextureTransform),emissiveTextureTransformMatrix:M(f.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(f.metallicRoughnessTextureTransform),...s},u))}const b=i.get(g);if(r.stageResources.materials.push(b),y){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(f.colorTexture),e(f.normalTexture),e(f.occlusionTexture),e(f.emissiveTexture),e(f.metallicRoughnessTexture)}return b}(l,e,_,t,r,d,w,o,u),{geometry:f,vertexCount:T}=function(e,t){const r=e.attributes.position.count,n=(0,b.x)(e.indices||r,e.primitiveType),o=(0,p.oe)(3*r),{typedBuffer:a,typedBufferStride:u}=e.attributes.position;(0,g.t)(o,a,e.transform,3,u);const l=[["position",new j.n(o,n,3,!0)]];if(null!=e.attributes.normal){const t=(0,p.oe)(3*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.normal;(0,i.Ge)(Y,e.transform),(0,g.b)(t,o,Y,3,a),(0,s.or)(Y)&&(0,g.n)(t,t),l.push(["normal",new j.n(t,n,3,!0)])}if(null!=e.attributes.tangent){const t=(0,p.oe)(4*r),{typedBuffer:o,typedBufferStride:a}=e.attributes.tangent;(0,i.z0)(Y,e.transform),(0,y.t)(t,o,Y,4,a),(0,s.or)(Y)&&(0,g.n)(t,t,4),l.push(["tangent",new j.n(t,n,4,!0)])}if(null!=e.attributes.texCoord0){const t=(0,p.oe)(2*r),{typedBuffer:o,typedBufferStride:s}=e.attributes.texCoord0;(0,x.a)(t,o,2,s),l.push(["uv0",new j.n(t,n,2,!0)])}const c=e.attributes.color;if(null!=c){const t=new Uint8Array(4*r);4===c.elementCount?c instanceof h.Eq?(0,y.b)(t,c,1,255):(c instanceof h.XP||c instanceof h.Uz)&&(0,y.b)(t,c,1/255,255):(t.fill(255),c instanceof h.xs?(0,g.f)(t,c.typedBuffer,1,255,4,c.typedBufferStride):(e.attributes.color instanceof h.eI||e.attributes.color instanceof h.nS)&&(0,g.f)(t,c.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new j.n(t,n,4,!0)])}return{geometry:new z.V(t,l),vertexCount:r}}(e,a??new F.$U({},o)),R=f.boundingInfo;null!=R&&0===B&&((0,m.iT)(A,R.bbMin),(0,m.iT)(A,R.bbMax)),null!=a&&(_.stageResources.geometries.push(f),_.numberOfVertices+=T)}),S||f.push(_)}),{engineResources:f,referenceBoundingBox:A}}(T,Q,K,t,a.specifiedLodIndex,_);return{lods:H,referenceBoundingBox:Z,isEsriSymbolResource:T.meta.isEsriSymbolResource,isWosr:!1}}const Y=(0,a.vt)()},69052:(e,t,r)=>{r.d(t,{hr:()=>o,ie:()=>u,uC:()=>a});var n=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,n,o=0,s=!1){return(n-=o)<t?n+=i(e,t-n):n>r&&(n-=i(e,n-r)),s&&n===r&&(n=t),n+o}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new o(0,2*Math.PI),u=(new o(-Math.PI,Math.PI),new o(0,360))},69397:(e,t,r)=>{r.d(t,{$B:()=>o,Qf:()=>l,Qh:()=>a,RS:()=>s,ez:()=>d,lM:()=>i,qK:()=>f});var n=r(34275);function o(e){return 32+e.length}const s=16;function i(e){if(!e)return 0;let t=f;for(const r in e)e.hasOwnProperty(r)&&(t+=u(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let n=0;n<t;n++)r+=u(e[n]);return r}(e);let t=f;for(const r in e)e.hasOwnProperty(r)&&(t+=u(e[r]));return t}function u(e,t=!0){switch(typeof e){case"object":return t?a(e):f;case"string":return o(e);case"number":return s;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+m:Array.isArray(t)?c(t,s):0:0),0)}function c(e,t){return d+e.length*t}const f=32,d=16,m=145},73354:(e,t,r)=>{r.d(t,{a:()=>f,b:()=>a,c:()=>i,d:()=>o,e:()=>d,f:()=>c,l:()=>l,n:()=>m,t:()=>s});var n=r(40876);function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return e;const s=e.length/n,i=r[0],a=r[1],u=r[2],l=r[4],c=r[5],f=r[6],d=r[8],m=r[9],p=r[10],h=r[12],g=r[13],y=r[14];let x=0,w=0;for(let r=0;r<s;r++){const r=t[x],s=t[x+1],b=t[x+2];e[w]=i*r+l*s+d*b+h,e[w+1]=a*r+c*s+m*b+g,e[w+2]=u*r+f*s+p*b+y,x+=o,w+=n}return e}function i(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,n=3,o=n){if(e.length/n!==Math.ceil(t.length/o))return;const s=e.length/n,i=r[0],a=r[1],u=r[2],l=r[3],c=r[4],f=r[5],d=r[6],m=r[7],p=r[8];let h=0,g=0;for(let r=0;r<s;r++){const r=t[h],s=t[h+1],y=t[h+2];e[g]=i*r+l*s+d*y,e[g+1]=a*r+c*s+m*y,e[g+2]=u*r+f*s+p*y,h+=o,g+=n}}function u(e,t,r,n=3,o=n){const s=Math.min(e.length/n,t.length/o);let i=0,a=0;for(let u=0;u<s;u++)e[a]=r*t[i],e[a+1]=r*t[i+1],e[a+2]=r*t[i+2],i+=o,a+=n;return e}function l(e,t,r,n){c(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,o,s=3,i=s){const a=Math.min(e.length/s,t.length/i);let u=0,l=0;const c=1/n.Tf;for(let n=0;n<a;n++)e[l]=o*(r*t[u])**c,e[l+1]=o*(r*t[u+1])**c,e[l+2]=o*(r*t[u+2])**c,u+=i,l+=s}function f(e,t,r,n=3,o=n){const s=e.length/n;if(s!==Math.ceil(t.length/o))return e;let i=0,a=0;for(let u=0;u<s;u++)e[a]=t[i]+r[0],e[a+1]=t[i+1]+r[1],e[a+2]=t[i+2]+r[2],i+=o,a+=n;return e}function d(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,n=r){const o=Math.min(e.length/r,t.length/n);let s=0,i=0;for(let a=0;a<o;a++){const o=t[s],a=t[s+1],u=t[s+2],l=o*o+a*a+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*o,e[i+1]=t*a,e[i+2]=t*u}s+=n,i+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:l,normalize:m,normalizeView:d,scale:u,scaleView:function(e,t,r){u(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,i=t.typedBuffer,a=t.typedBufferStride;let u=0,l=0;for(let e=0;e<n;e++)o[l]=i[u]>>r,o[l+1]=i[u+1]>>r,o[l+2]=i[u+2]>>r,u+=a,l+=s},transformMat3:a,transformMat3View:i,transformMat4:s,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>u,kd:()=>a,r8:()=>l});var n=r(82799),o=r(16930),s=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const r=l(e);for(const e of r)for(const r of e)r[0]+=t;return e}function l(e){return(0,s.Bi)(e)?e.rings:e.paths}},84498:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(34275),o=r(97146),s=r(63907);function i(e,t){switch(t){case s.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,o.tM)(e):(0,n.mg)(e)?new Uint16Array(e):e}(e);case s.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];n[i++]=o,n[i++]=s,n[i++]=r,s=r}return n}(e)}}},88340:(e,t,r)=>{function n(){return new Float32Array(2)}function o(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function s(){return n()}function i(){return o(1,1)}function a(){return o(1,0)}function u(){return o(0,1)}r.d(t,{Un:()=>c,fA:()=>o,uY:()=>l,vt:()=>n});const l=s(),c=i(),f=a(),d=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:f,UNIT_Y:d,ZEROS:l,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:n,fromValues:o,ones:i,unitX:a,unitY:u,zeros:s},Symbol.toStringTag,{value:"Module"}))},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>o});var n=r(65864);function o(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const o=(0,n.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see
|
|
2
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[224],{87843:(e,t,n)=>{n.r(t),n.d(t,{Label:()=>s});var l=n(34088),a=n(46337),i=n(
|
|
1
|
+
/*! For license information please see f651c05604eab83aef5f.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[224],{87843:(e,t,n)=>{n.r(t),n.d(t,{Label:()=>s});var l=n(34088),a=n(46337),i=n(41557),c=n(93174);const o=a.AH`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=block]) .container,:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;class s extends i.WF{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=(0,i.lh)({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=o}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(c.l))}willUpdate(e){e.has("for")&&(0,c.a)(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(c.b))}labelClickHandler(e){"Range"!==window.getSelection()?.type&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return a.qy`<div class=${(0,i.CP)("container")}><slot></slot></div>`}}(0,l.c)("calcite-label",s)},93174:(e,t,n)=>{n.d(t,{a:()=>k,b:()=>c,c:()=>m,d:()=>f,g:()=>g,l:()=>i});var l=n(79e3);const a="calciteInternalLabelClick",i="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",o="calcite-label",s=new WeakMap,r=new WeakMap,d=new WeakMap,b=new WeakMap,h=new Set,u=e=>{const{id:t}=e,n=t&&(0,l.q)(e,{selector:`${o}[for="${t}"]`});if(n)return n;const a=(0,l.l)(e,o);return!a||function(e,t){let n;const l="custom-element-ancestor-check",a=l=>{l.stopImmediatePropagation();const a=l.composedPath();n=a.slice(a.indexOf(t),a.indexOf(e))};e.addEventListener(l,a,{once:!0}),t.dispatchEvent(new CustomEvent(l,{composed:!0,bubbles:!0})),e.removeEventListener(l,a);return n.filter(n=>n!==t&&n!==e).filter(e=>e.tagName?.includes("-")).length>0}(a,e)?null:a};function m(e){if(!e)return;const t=u(e.el);if(r.has(t)&&t===e.labelEl||!t&&h.has(e))return;const n=y.bind(e);if(t){e.labelEl=t;const l=s.get(t)||[];l.push(e),s.set(t,l.sort(p)),r.has(e.labelEl)||(r.set(e.labelEl,v),e.labelEl.addEventListener(a,v)),h.delete(e),document.removeEventListener(i,d.get(e)),b.set(e,n),document.addEventListener(c,n)}else h.has(e)||(n(),document.removeEventListener(c,b.get(e)))}function f(e){if(!e)return;if(h.delete(e),document.removeEventListener(i,d.get(e)),document.removeEventListener(c,b.get(e)),d.delete(e),b.delete(e),!e.labelEl)return;const t=s.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(a,r.get(e.labelEl)),r.delete(e.labelEl)),s.set(e.labelEl,t.filter(t=>t!==e).sort(p)),e.labelEl=null}function p(e,t){return(0,l.m)(e.el,t.el)?-1:1}function g(e){return e.label||e.labelEl?.textContent?.trim()||""}function v(e){const t=e.detail.sourceEvent.target,n=s.get(this),l=n.find(e=>e.el===t);if(n.includes(l))return;const a=n[0];a.disabled||a.onLabelClick(e)}function E(){h.has(this)&&m(this)}function y(){h.add(this);const e=d.get(this)||E.bind(this);d.set(this,e),document.addEventListener(i,e)}async function k(e){if(await e.componentOnReady(),s.has(e))return;const t=e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame(()=>{for(const e of h)if(e.el===t){m(e);break}})}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see
|
|
2
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1436],{4643:(t,e,n)=>{n.d(e,{c:()=>o});var s=n(46337);function o(t,e,n){if(s.S$)return;const o=function(t){class e extends window.MutationObserver{constructor(t){super(t),this.observedEntry=[],this.callback=t}observe(t,e){return this.observedEntry.push({target:t,options:e}),super.observe(t,e)}unobserve(t){const e=this.observedEntry.filter(e=>e.target!==t);this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),e.forEach(t=>this.observe(t.target,t.options))}}return"intersection"===t?window.IntersectionObserver:"mutation"===t?e:window.ResizeObserver}(t);return new o(e,n)}},20307:(t,e,n)=>{n.d(e,{u:()=>r});var s=n(50941),o=n(83623),i=n(79e3);const r=()=>(0,s.aK)((t,e)=>{let n;function s(){n?.abort()}return e.onLoad(()=>{t.listen("focus",()=>{n=new AbortController,t.el.addEventListener("focusout",s,{signal:n.signal})})}),e.onDisconnected(()=>{t.el.removeEventListener("focusout",s)}),async(e,r)=>{if(t.disabled)return;const a=function(t){if(t)return function(t){return"target"in t&&("includeContainer"in t||"strategy"in t)}(t)?t:{target:t}}(e());if(!a)return;const{target:c,includeContainer:l,strategy:h}=a,u=(0,i.k)(t.el),p=u.activeElement;return await(0,o.c)(t),p!==u.activeElement||n&&!n?.signal.aborted?void 0:(t.el.removeEventListener("focus",s),(0,i.b)(c,l,h,t.el,r))}})},32239:(t,e,n)=>{var s=n(34088),o=n(46337),i=n(
|
|
1
|
+
/*! For license information please see f6e18668f728dfd8ba5e.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1436],{4643:(t,e,n)=>{n.d(e,{c:()=>o});var s=n(46337);function o(t,e,n){if(s.S$)return;const o=function(t){class e extends window.MutationObserver{constructor(t){super(t),this.observedEntry=[],this.callback=t}observe(t,e){return this.observedEntry.push({target:t,options:e}),super.observe(t,e)}unobserve(t){const e=this.observedEntry.filter(e=>e.target!==t);this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),e.forEach(t=>this.observe(t.target,t.options))}}return"intersection"===t?window.IntersectionObserver:"mutation"===t?e:window.ResizeObserver}(t);return new o(e,n)}},20307:(t,e,n)=>{n.d(e,{u:()=>r});var s=n(50941),o=n(83623),i=n(79e3);const r=()=>(0,s.aK)((t,e)=>{let n;function s(){n?.abort()}return e.onLoad(()=>{t.listen("focus",()=>{n=new AbortController,t.el.addEventListener("focusout",s,{signal:n.signal})})}),e.onDisconnected(()=>{t.el.removeEventListener("focusout",s)}),async(e,r)=>{if(t.disabled)return;const a=function(t){if(t)return function(t){return"target"in t&&("includeContainer"in t||"strategy"in t)}(t)?t:{target:t}}(e());if(!a)return;const{target:c,includeContainer:l,strategy:h}=a,u=(0,i.k)(t.el),p=u.activeElement;return await(0,o.c)(t),p!==u.activeElement||n&&!n?.signal.aborted?void 0:(t.el.removeEventListener("focus",s),(0,i.b)(c,l,h,t.el,r))}})},32239:(t,e,n)=>{var s=n(34088),o=n(46337),i=n(41557),r=n(79e3),a=n(4643),c=n(84137);const l="flip-rtl",h="svg",u={},p={},d={s:16,m:24,l:32};function b({icon:t,scale:e}){const n=d[e],s=function(t){const e=!isNaN(Number(t.charAt(0))),n=t.split("-");if(n.length>0){const e=/[a-z]/i;t=n.map((t,n)=>t.replace(e,function(t,e){return 0===n&&0===e?t:t.toUpperCase()})).join("")}return e?`i${t}`:t}(t),o="F"===s.charAt(s.length-1);return`${o?s.substring(0,s.length-1):s}${n}${o?"F":""}`}function f(t){return u[t]}const v=o.AH`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`;class g extends i.WF{constructor(){super(...arguments),this.visible=!1,this.flipRtl=!1,this.icon=null,this.preload=!1,this.scale="m"}static{this.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1}}static{this.styles=v}connectedCallback(){if(super.connectedCallback(),this.preload)return this.visible=!0,void this.loadIconPathData();this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||null!==this.icon)||t.has("scale")&&(this.hasUpdated||"m"!==this.scale))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=null}async loadIconPathData(){const{icon:t,scale:e,visible:n}=this;if(o.S$||!t||!n)return;const i={icon:t,scale:e},r=f(b(i))||await async function(t){const e=b(t),n=f(e);if(n)return n;p[e]||(p[e]=fetch((0,s.g)(`./assets/icon/${e}.json`)).then(t=>t.json()).catch(()=>(c.l.error(`${t.icon} (${t.scale}) icon failed to load`),"")));const o=await p[e];return u[e]=o,o}(i);t===this.icon&&(this.pathData=r)}waitUntilVisible(t){this.intersectionObserver=(0,a.c)("intersection",e=>{e.forEach(e=>{e.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,t())})},{rootMargin:"50px"}),this.intersectionObserver?this.intersectionObserver.observe(this.el):t()}render(){const{el:t,flipRtl:e,pathData:n,scale:s,textLabel:a}=this,c=(0,r.g)(t),u=d[s],p=!!a,b=[].concat(n||"");return this.el.ariaHidden=(0,r.t)(!p),this.el.ariaLabel=p?a:null,this.el.role=p?"img":null,o.qy`<svg aria-hidden=true class=${(0,i.CP)({[l]:"rtl"===c&&e,[h]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${u} ${u}`} width=100% xmlns=http://www.w3.org/2000/svg>${b.map(t=>"string"==typeof t?o.JW`<path d=${t??o.s6} />`:o.JW`<path d=${t.d??o.s6} opacity=${("opacity"in t?t.opacity:1)??o.s6} />`)}</svg>`}}(0,s.c)("calcite-icon",g)},50941:(t,e,n)=>{n.d(e,{aK:()=>f,yr:()=>y,oW:()=>w});var s=n(55333),o=n(94667);var i=n(46337),r=n(20150);const a="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),c=new Set(a),l="en",h={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},u={},p=async(t,e)=>{const n=`${e}${t}.json`;try{const t=await fetch(n);if(t.ok)return await t.json()}catch(t){return console.error(t),{}}return t===l?{}:await p(l,e)},d=t=>{const e=(0,r.Zj)(t,"lang",globalThis.navigator?.language||l);return{lang:e,t9nLocale:b(e)}},b=t=>{const[e,n]=t.split("-"),s=e.toLowerCase();let o=s;return n&&(o=`${s}-${n.toUpperCase()}`),o=h[o]??o,c.has(o)?o:n?b(s):l},f=t=>e=>g(e,t);class v extends s.C{constructor(t,e){super(t);const n=this.exports;try{(0,o.s)(this.component);const t=e(this.component,this),s=this.exports!==n;if((0,o.i)(t)){s||this.setProvisionalExports(t);const e=t.then(t=>{this.exports=t,super.catchUpLifecycle()}).catch(t=>{this.P.reject(t),console.error(t)});this.onLoad(async()=>await e)}else s&&void 0===t||(this.exports=t),queueMicrotask(()=>super.catchUpLifecycle())}catch(t){this.P.reject(t),console.error(t)}}catchUpLifecycle(){}}const g=(m=v,(...t)=>{const e=(0,o.d)(),n=new m(...t),i=n.exports;(0,o.b)(e.at(-1));const r=n.component.manager;r.W(n,i),n.watchExports(r.W.bind(r,n)),(0,o.j)(n);const a=[n.component,...e].reverse();return(0,s.t)(a,t=>void 0===t?void 0:((t,{host:e,key:n,isReactive:s},i)=>{const r=e,a=r[n]!==t.exports,c=r[n]!==i,l=i!==t.exports;if(a&&!c&&l&&(r[n]=t.exports),e===t.component){if(s){const e=t.component.manager;c&&e.W(t,r[n]),t.onUpdate(s=>{if(s.has(n)){const s=r[n];s!==t.exports&&e.W(t,s)}})}t.O=s?void 0:n}const h=t.component.constructor.elementProperties.get(n)?.readOnly;t.watchExports(()=>{r[n]!==t.exports&&(h?(0,o.f)(()=>{r[n]=t.exports}):r[n]=t.exports)})})(n,t,i),i)});var m;const w=(t,e)=>new x(t,e);class x extends s.C{#t;#e;#n;constructor(t,e){super(),i.S$||(this.#e=t,this.#n=e,this.#t=new MutationObserver(n=>{n.forEach(n=>{t.includes(n.attributeName)&&e.call(this.component,this.component.el.getAttribute(n.attributeName),n.oldValue,n.attributeName)})}))}hostConnected(){this.#e.forEach(t=>{this.component.el.hasAttribute(t)&&this.#n.call(this.component,null,this.component.el.getAttribute(t),t)}),this.#t.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#e})}hostDisconnected(){this.#t.disconnect()}}const y=t=>(e={})=>g(void 0,(n,s)=>{const o=d(n.el),i={_lang:o.lang,_t9nLocale:o.t9nLocale,_loading:!0},a=n;s.onLifecycle(()=>((e,o,i,l)=>{let h;const b=()=>(async(t,e,n=t.localName.split("-").slice(1).join("-"))=>{const{lang:s,t9nLocale:o}=d(t),i=`${e}/${n}/t9n`,r=null===n?{}:await(async(t,e,n="")=>{const s=`${e}/${n}`,o=`${s}${t}.json`;return u[o]??(u[o]=p(t,s)),await u[o]})(o,i,"messages.");return{lang:s,t9nLocale:o,t9nStrings:r}})(e,t("./assets"),l).then(t=>{h?.lang===t.lang&&h.t9nLocale===t.t9nLocale&&h.t9nStrings===t.t9nStrings||(({t9nLocale:t,t9nStrings:e,lang:o})=>{const i={...e,_lang:o,_t9nLocale:t,_loading:!1};s.exports=i;const r=e.componentLabel;"string"==typeof r&&"label"in n&&null==n.label&&(n.label??=r),c(a.messageOverrides)})(t),h=t}).catch(console.error);return queueMicrotask(b),(0,r.Yt)(e,["lang"],b)})(n.el,0,0,e.name));const c=t=>{const e=s.exports,n=e._original??e,o=$(n,t);t&&(o._original=n),s.exports=o};return"messageOverrides"in a&&s.onUpdate(t=>{t.has("messageOverrides")&&c(a.messageOverrides)}),e.blocking?(s.setProvisionalExports(i,!1),s.ready):i}),$=(t,e)=>{if(!e)return t;const n={...t};return Object.entries(e).forEach(([e,s])=>{n[e]="object"==typeof s?$(t[e],s):s??t[e]}),n}},75572:(t,e,n)=>{n.d(e,{u:()=>i});var s=n(50941),o=n(34088);const i=(0,s.yr)(o.g)},83623:(t,e,n)=>{function s(t){return"l"===t?"m":"s"}async function o(t){await t.componentOnReady(),await t.updateComplete}n.d(e,{c:()=>o,g:()=>s}),n(84137)},84137:(t,e,n)=>{n.d(e,{l:()=>c});var s=n(34088);const o=new Set,i={trace:0,debug:1,info:2,warn:4,error:8,off:10};function r(t,...e){(function(t){return i[t]>=i[s.l]})(t)&&console[t].call(this,"%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...e)}let a;const c={debug:t=>r("debug",t),info:t=>r("info",t),warn:t=>r("warn",t),error:t=>r("error",t),trace:t=>r("trace",t),deprecated:function(t,{component:e,name:n,suggested:s,removalVersion:i}){const c=`${t}:${"component"===t?"":e}${n}`;if(o.has(c))return;o.add(c);const l=Array.isArray(s);l&&!a&&(a=new Intl.ListFormat("en",{style:"long",type:"disjunction"})),r("warn",`[${n}] ${t} is deprecated and will be removed in ${"future"===i?"a future version":`v${i}`}.${s?` Use ${l?a.format(s.map(t=>`"${t}"`)):`"${s}"`} instead.`:""}`)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788],{10788:(t,e,n)=>{n.d(e,{A:()=>Ze,CharStream:()=>$e,CommonTokenStream:()=>Xe,ParseTreeWalker:()=>Qe,p:()=>Je});var s={763:()=>{}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return s[t](n,n.exports,r),n.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};r.d(o,{MG:()=>Q,fr:()=>wt,sR:()=>Ie,Zo:()=>Le,iH:()=>be,rt:()=>Ft,jB:()=>Me,M8:()=>ue,$t:()=>Ne,aq:()=>Ce,pG:()=>vt,eP:()=>Ee,KU:()=>me,zW:()=>Oe,IX:()=>A,mY:()=>k,a7:()=>J,JG:()=>zt,ay:()=>Zt,X2:()=>ie,WU:()=>fe,Uw:()=>xe,gw:()=>Te,iX:()=>Be,re:()=>oe,Pg:()=>qe,tD:()=>le,R$:()=>se,Dj:()=>Bt,m7:()=>z,NZ:()=>F,xo:()=>M,ou:()=>l,qC:()=>He,mD:()=>f,Ay:()=>je});class l{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(t){this._text=t}}function a(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!(t[n]===e[n]||t[n].equals&&t[n].equals(e[n])))return!1;return!0}l.INVALID_TYPE=0,l.EPSILON=-2,l.MIN_USER_TOKEN_TYPE=1,l.EOF=-1,l.DEFAULT_CHANNEL=0,l.HIDDEN_CHANNEL=1;const h=Math.round(Math.random()*Math.pow(2,32));function c(t){if(!t)return 0;const e=typeof t,n="string"===e?t:!("object"!==e||!t.toString)&&t.toString();if(!n)return 0;let s,i;const r=3&n.length,o=n.length-r;let l=h;const a=3432918353,c=461845907;let u=0;for(;u<o;)i=255&n.charCodeAt(u)|(255&n.charCodeAt(++u))<<8|(255&n.charCodeAt(++u))<<16|(255&n.charCodeAt(++u))<<24,++u,i=(65535&i)*a+(((i>>>16)*a&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i,l=l<<13|l>>>19,s=5*(65535&l)+((5*(l>>>16)&65535)<<16)&4294967295,l=27492+(65535&s)+((58964+(s>>>16)&65535)<<16);switch(i=0,r){case 3:i^=(255&n.charCodeAt(u+2))<<16;case 2:i^=(255&n.charCodeAt(u+1))<<8;case 1:i^=255&n.charCodeAt(u),i=(65535&i)*a+(((i>>>16)*a&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i}return l^=n.length,l^=l>>>16,l=2246822507*(65535&l)+((2246822507*(l>>>16)&65535)<<16)&4294967295,l^=l>>>13,l=3266489909*(65535&l)+((3266489909*(l>>>16)&65535)<<16)&4294967295,l^=l>>>16,l>>>0}class u{constructor(){this.count=0,this.hash=0}update(){for(let t=0;t<arguments.length;t++){const e=arguments[t];if(null!=e)if(Array.isArray(e))this.update.apply(this,e);else{let t=0;switch(typeof e){case"undefined":case"function":continue;case"number":case"boolean":t=e;break;case"string":t=c(e);break;default:e.updateHashCode?e.updateHashCode(this):console.log("No updateHashCode for "+e.toString());continue}t*=3432918353,t=t<<15|t>>>17,t*=461845907,this.count=this.count+1;let n=this.hash^t;n=n<<13|n>>>19,n=5*n+3864292196,this.hash=n}}}finish(){let t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16,t}static hashStuff(){const t=new u;return t.update.apply(t,arguments),t.finish()}}function d(t){return t?"string"==typeof t?c(t):t.hashCode():-1}function g(t,e){return t&&t.equals?t.equals(e):t===e}function p(t){return null===t?"null":t}function f(t){return Array.isArray(t)?"["+t.map(p).join(", ")+"]":"null"}class x{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||d,this.equalsFunction=e||g}get(t){if(null==t)return t;const e=this._getBucket(t);if(!e)return null;for(const n of e)if(this.equalsFunction(n,t))return n;return null}add(t){return this.getOrAdd(t)===t}getOrAdd(t){this._expand();const e=this._getSlot(t);let n=this.buckets[e];if(!n)return n=[t],this.buckets[e]=n,this.itemCount++,t;for(const e of n)if(this.equalsFunction(e,t))return e;return n.push(t),this.itemCount++,t}has(t){return null!=this.get(t)}values(){return this.buckets.filter(t=>null!=t).flat(1)}toString(){return f(this.values())}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}class T{hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===T.NONE)return e;if(null===e||e===T.NONE)return t;const n=new S(t,e);return 1===n.opnds.length?n.opnds[0]:n}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===T.NONE||e===T.NONE)return T.NONE;const n=new m(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class S extends T{constructor(t,e){super();const n=new x;t instanceof S?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof S?e.opnds.map(function(t){n.add(t)}):n.add(e);const s=E(n);if(s.length>0){let t=null;s.map(function(e){(null===t||e.precedence<t.precedence)&&(t=e)}),n.add(t)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof S&&a(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"AND")}evaluate(t,e){for(let n=0;n<this.opnds.length;n++)if(!this.opnds[n].evaluate(t,e))return!1;return!0}evalPrecedence(t,e){let n=!1;const s=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(n|=o!==r,null===o)return null;o!==T.NONE&&s.push(o)}if(!n)return this;if(0===s.length)return T.NONE;let i=null;return s.map(function(t){i=null===i?t:T.andContext(i,t)}),i}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("&&")}}class m extends T{constructor(t,e){super();const n=new x;t instanceof m?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof m?e.opnds.map(function(t){n.add(t)}):n.add(e);const s=E(n);if(s.length>0){const t=s.sort(function(t,e){return t.compareTo(e)}),e=t[t.length-1];n.add(e)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof m&&a(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let n=0;n<this.opnds.length;n++)if(this.opnds[n].evaluate(t,e))return!0;return!1}evalPrecedence(t,e){let n=!1;const s=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(n|=o!==r,o===T.NONE)return T.NONE;null!==o&&s.push(o)}return n?(s.length,null):this}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("||")}}function E(t){const e=[];return t.values().map(function(t){t instanceof T.PrecedencePredicate&&e.push(t)}),e}function _(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const n={};return n.state=t.state||null,n.alt=void 0===t.alt?null:t.alt,n.context=t.context||null,n.semanticContext=t.semanticContext||null,e&&(n.reachesIntoOuterContext=t.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),n}}class C{constructor(t,e){this.checkContext(t,e),t=_(t),e=_(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:T.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed}checkContext(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(t){return this===t||t instanceof C&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed}hashCodeForConfigSet(){const t=new u;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof C&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==T.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class A{constructor(t,e){this.start=t,this.stop=e}clone(){return new A(this.start,this.stop)}contains(t){return t>=this.start&&t<this.stop}toString(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}get length(){return this.stop-this.start}}A.INVALID_INTERVAL=new A(-1,-2);class k{constructor(){this.intervals=null,this.readOnly=!1}first(t){return null===this.intervals||0===this.intervals.length?l.INVALID_TYPE:this.intervals[0].start}addOne(t){this.addInterval(new A(t,t+1))}addRange(t,e){this.addInterval(new A(t,e+1))}addInterval(t){if(null===this.intervals)this.intervals=[],this.intervals.push(t.clone());else{for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];if(t.stop<n.start)return void this.intervals.splice(e,0,t);if(t.stop===n.start)return void(this.intervals[e]=new A(t.start,n.stop));if(t.start<=n.stop)return this.intervals[e]=new A(Math.min(n.start,t.start),Math.max(n.stop,t.stop)),void this.reduce(e)}this.intervals.push(t.clone())}}addSet(t){return null!==t.intervals&&t.intervals.forEach(t=>this.addInterval(t),this),this}reduce(t){if(t<this.intervals.length-1){const e=this.intervals[t],n=this.intervals[t+1];e.stop>=n.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new A(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new k;return n.addInterval(new A(t,e+1)),null!==this.intervals&&this.intervals.forEach(t=>n.removeRange(t)),n}contains(t){if(null===this.intervals)return!1;for(let e=0;e<this.intervals.length;e++)if(this.intervals[e].contains(t))return!0;return!1}removeRange(t){if(t.start===t.stop-1)this.removeOne(t.start);else if(null!==this.intervals){let e=0;for(let n=0;n<this.intervals.length;n++){const n=this.intervals[e];if(t.stop<=n.start)return;if(t.start>n.start&&t.stop<n.stop){this.intervals[e]=new A(n.start,t.start);const s=new A(t.stop,n.stop);return void this.intervals.splice(e,0,s)}t.start<=n.start&&t.stop>=n.stop?(this.intervals.splice(e,1),e-=1):t.start<n.stop?this.intervals[e]=new A(n.start,t.start):t.stop<n.stop&&(this.intervals[e]=new A(t.stop,n.stop)),e+=1}}}removeOne(t){if(null!==this.intervals)for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];if(t<n.start)return;if(t===n.start&&t===n.stop-1)return void this.intervals.splice(e,1);if(t===n.start)return void(this.intervals[e]=new A(n.start+1,n.stop));if(t===n.stop-1)return void(this.intervals[e]=new A(n.start,n.stop-1));if(t<n.stop-1){const s=new A(n.start,t);return n.start=t+1,void this.intervals.splice(e,0,s)}}}toString(t,e,n){return t=t||null,e=e||null,n=n||!1,null===this.intervals?"{}":null!==t||null!==e?this.toTokenString(t,e):n?this.toCharString():this.toIndexString()}toCharString(){const t=[];for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];n.stop===n.start+1?n.start===l.EOF?t.push("<EOF>"):t.push("'"+String.fromCharCode(n.start)+"'"):t.push("'"+String.fromCharCode(n.start)+"'..'"+String.fromCharCode(n.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];n.stop===n.start+1?n.start===l.EOF?t.push("<EOF>"):t.push(n.start.toString()):t.push(n.start.toString()+".."+(n.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(t,e){const n=[];for(let s=0;s<this.intervals.length;s++){const i=this.intervals[s];for(let s=i.start;s<i.stop;s++)n.push(this.elementName(t,e,s))}return n.length>1?"{"+n.join(", ")+"}":n[0]}elementName(t,e,n){return n===l.EOF?"<EOF>":n===l.EPSILON?"<EPSILON>":t[n]||e[n]}get length(){return this.intervals.map(t=>t.length).reduce((t,e)=>t+e)}}class N{constructor(){this.atn=null,this.stateNumber=N.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(t){return t instanceof N&&this.stateNumber===t.stateNumber}isNonGreedyExitState(){return!1}addTransition(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}N.INVALID_TYPE=0,N.BASIC=1,N.RULE_START=2,N.BLOCK_START=3,N.PLUS_BLOCK_START=4,N.STAR_BLOCK_START=5,N.TOKEN_START=6,N.RULE_STOP=7,N.BLOCK_END=8,N.STAR_LOOP_BACK=9,N.STAR_LOOP_ENTRY=10,N.PLUS_LOOP_BACK=11,N.LOOP_END=12,N.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],N.INVALID_STATE_NUMBER=-1;class I extends N{constructor(){return super(),this.stateType=N.RULE_STOP,this}}class y{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}y.EPSILON=1,y.RANGE=2,y.RULE=3,y.PREDICATE=4,y.ATOM=5,y.ACTION=6,y.SET=7,y.NOT_SET=8,y.WILDCARD=9,y.PRECEDENCE=10,y.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],y.serializationTypes={EpsilonTransition:y.EPSILON,RangeTransition:y.RANGE,RuleTransition:y.RULE,PredicateTransition:y.PREDICATE,AtomTransition:y.ATOM,ActionTransition:y.ACTION,SetTransition:y.SET,NotSetTransition:y.NOT_SET,WildcardTransition:y.WILDCARD,PrecedencePredicateTransition:y.PRECEDENCE};class L extends y{constructor(t,e,n,s){super(t),this.ruleIndex=e,this.precedence=n,this.followState=s,this.serializationType=y.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class O extends y{constructor(t,e){super(t),this.serializationType=y.SET,null!=e?this.label=e:(this.label=new k,this.label.addOne(l.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class R extends O{constructor(t,e){super(t,e),this.serializationType=y.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class w extends y{constructor(t){super(t),this.serializationType=y.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class v extends y{constructor(t){super(t)}}class b{}class P extends b{}class D extends P{}class F extends D{get ruleContext(){throw new Error("missing interface implementation")}}class M extends D{}class U extends M{}const B={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let s=B.getNodeText(t,e);s=function(t){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(s);const i=t.getChildCount();if(0===i)return s;let r="("+s+" ";i>0&&(s=B.toStringTree(t.getChild(0),e),r=r.concat(s));for(let n=1;n<i;n++)s=B.toStringTree(t.getChild(n),e),r=r.concat(" "+s);return r=r.concat(")"),r},getNodeText:function(t,e,n){if(e=e||null,null!==(n=n||null)&&(e=n.ruleNames),null!==e){if(t instanceof F){const n=t.ruleContext.getAltNumber();return 0!=n?e[t.ruleIndex]+":"+n:e[t.ruleIndex]}if(t instanceof U)return t.toString();if(t instanceof M&&null!==t.symbol)return t.symbol.text}const s=t.getPayload();return s instanceof l?s.text:t.getPayload().toString()},getChildren:function(t){const e=[];for(let n=0;n<t.getChildCount();n++)e.push(t.getChild(n));return e},getAncestors:function(t){let e=[];for(t=t.getParent();null!==t;)e=[t].concat(e),t=t.getParent();return e},findAllTokenNodes:function(t,e){return B.findAllNodes(t,e,!0)},findAllRuleNodes:function(t,e){return B.findAllNodes(t,e,!1)},findAllNodes:function(t,e,n){const s=[];return B._findAllNodes(t,e,n,s),s},_findAllNodes:function(t,e,n,s){n&&t instanceof M?t.symbol.type===e&&s.push(t):!n&&t instanceof F&&t.ruleIndex===e&&s.push(t);for(let i=0;i<t.getChildCount();i++)B._findAllNodes(t.getChild(i),e,n,s)},descendants:function(t){let e=[t];for(let n=0;n<t.getChildCount();n++)e=e.concat(B.descendants(t.getChild(n)));return e}},V=B;class z extends F{constructor(t,e){super(),this.parentCtx=t||null,this.invokingState=e||-1}depth(){let t=0,e=this;for(;null!==e;)e=e.parentCtx,t+=1;return t}isEmpty(){return-1===this.invokingState}getSourceInterval(){return A.INVALID_INTERVAL}get ruleContext(){return this}getPayload(){return this}getText(){return 0===this.getChildCount()?"":this.children.map(function(t){return t.getText()}).join("")}getAltNumber(){return 0}setAltNumber(t){}getChild(t){return null}getChildCount(){return 0}accept(t){return t.visitChildren(this)}toStringTree(t,e){return V.toStringTree(this,t,e)}toString(t,e){t=t||null,e=e||null;let n=this,s="[";for(;null!==n&&n!==e;){if(null===t)n.isEmpty()||(s+=n.invokingState);else{const e=n.ruleIndex;s+=e>=0&&e<t.length?t[e]:""+e}null===n.parentCtx||null===t&&n.parentCtx.isEmpty()||(s+=" "),n=n.parentCtx}return s+="]",s}}class q{constructor(t){this.cachedHashCode=t}isEmpty(){return this===q.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===q.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}}q.EMPTY=null,q.EMPTY_RETURN_STATE=2147483647,q.globalNodeCount=1,q.id=q.globalNodeCount,q.trace_atn_sim=!1;class H extends q{constructor(t,e){const n=new u;return n.update(t,e),super(n.finish()),this.parents=t,this.returnStates=e,this}isEmpty(){return this.returnStates[0]===q.EMPTY_RETURN_STATE}getParent(t){return this.parents[t]}getReturnState(t){return this.returnStates[t]}equals(t){return this===t||t instanceof H&&this.hashCode()===t.hashCode()&&a(this.returnStates,t.returnStates)&&a(this.parents,t.parents)}toString(){if(this.isEmpty())return"[]";{let t="[";for(let e=0;e<this.returnStates.length;e++)e>0&&(t+=", "),this.returnStates[e]!==q.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}}get length(){return this.returnStates.length}}class K extends q{constructor(t,e){let n=0;const s=new u;null!==t?s.update(t,e):s.update(1),n=s.finish(),super(n),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof K&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}toString(){const t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===q.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===q.EMPTY_RETURN_STATE&&null===t?q.EMPTY:new K(t,e)}}class Y extends K{constructor(){super(null,q.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}q.EMPTY=new Y;class G{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||d,this.equalsFunction=e||g}set(t,e){this._expand();const n=this._getSlot(t);let s=this.buckets[n];if(!s)return s=[[t,e]],this.buckets[n]=s,this.itemCount++,e;const i=s.find(e=>this.equalsFunction(e[0],t),this);if(i){const t=i[1];return i[1]=e,t}return s.push([t,e]),this.itemCount++,e}containsKey(t){const e=this._getBucket(t);return!!e&&!!e.find(e=>this.equalsFunction(e[0],t),this)}get(t){const e=this._getBucket(t);if(!e)return null;const n=e.find(e=>this.equalsFunction(e[0],t),this);return n?n[1]:null}entries(){return this.buckets.filter(t=>null!=t).flat(1)}getKeys(){return this.entries().map(t=>t[0])}getValues(){return this.entries().map(t=>t[1])}toString(){return"["+this.entries().map(t=>"{"+t[0]+":"+t[1]+"}").join(", ")+"]"}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t[0]);let n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}function W(t,e){if(null==e&&(e=z.EMPTY),null===e.parentCtx||e===z.EMPTY)return q.EMPTY;const n=W(t,e.parentCtx),s=t.states[e.invokingState].transitions[0];return K.create(n,s.followState.stateNumber)}function j(t,e,n){if(t.isEmpty())return t;let s=n.get(t)||null;if(null!==s)return s;if(s=e.get(t),null!==s)return n.set(t,s),s;let i=!1,r=[];for(let s=0;s<r.length;s++){const o=j(t.getParent(s),e,n);if(i||o!==t.getParent(s)){if(!i){r=[];for(let e=0;e<t.length;e++)r[e]=t.getParent(e);i=!0}r[s]=o}}if(!i)return e.add(t),n.set(t,t),t;let o=null;return o=0===r.length?q.EMPTY:1===r.length?K.create(r[0],t.getReturnState(0)):new H(r,t.returnStates),e.add(o),n.set(o,o),n.set(t,o),o}function $(t,e,n,s){if(t===e)return t;if(t instanceof K&&e instanceof K)return function(t,e,n,s){if(null!==s){let n=s.get(t,e);if(null!==n)return n;if(n=s.get(e,t),null!==n)return n}const i=function(t,e,n){if(n){if(t===q.EMPTY)return q.EMPTY;if(e===q.EMPTY)return q.EMPTY}else{if(t===q.EMPTY&&e===q.EMPTY)return q.EMPTY;if(t===q.EMPTY){const t=[e.returnState,q.EMPTY_RETURN_STATE],n=[e.parentCtx,null];return new H(n,t)}if(e===q.EMPTY){const e=[t.returnState,q.EMPTY_RETURN_STATE],n=[t.parentCtx,null];return new H(n,e)}}return null}(t,e,n);if(null!==i)return null!==s&&s.set(t,e,i),i;if(t.returnState===e.returnState){const i=$(t.parentCtx,e.parentCtx,n,s);if(i===t.parentCtx)return t;if(i===e.parentCtx)return e;const r=K.create(i,t.returnState);return null!==s&&s.set(t,e,r),r}{let n=null;if((t===e||null!==t.parentCtx&&t.parentCtx===e.parentCtx)&&(n=t.parentCtx),null!==n){const i=[t.returnState,e.returnState];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const r=new H([n,n],i);return null!==s&&s.set(t,e,r),r}const i=[t.returnState,e.returnState];let r=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState,r=[e.parentCtx,t.parentCtx]);const o=new H(r,i);return null!==s&&s.set(t,e,o),o}}(t,e,n,s);if(n){if(t instanceof Y)return t;if(e instanceof Y)return e}return t instanceof K&&(t=new H([t.getParent()],[t.returnState])),e instanceof K&&(e=new H([e.getParent()],[e.returnState])),function(t,e,n,s){if(null!==s){let n=s.get(t,e);if(null!==n)return q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=s.get(e,t),null!==n)return q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n}let i=0,r=0,o=0,l=new Array(t.returnStates.length+e.returnStates.length).fill(0),a=new Array(t.returnStates.length+e.returnStates.length).fill(null);for(;i<t.returnStates.length&&r<e.returnStates.length;){const h=t.parents[i],c=e.parents[r];if(t.returnStates[i]===e.returnStates[r]){const e=t.returnStates[i];e===q.EMPTY_RETURN_STATE&&null===h&&null===c||null!==h&&null!==c&&h===c?(a[o]=h,l[o]=e):(a[o]=$(h,c,n,s),l[o]=e),i+=1,r+=1}else t.returnStates[i]<e.returnStates[r]?(a[o]=h,l[o]=t.returnStates[i],i+=1):(a[o]=c,l[o]=e.returnStates[r],r+=1);o+=1}if(i<t.returnStates.length)for(let e=i;e<t.returnStates.length;e++)a[o]=t.parents[e],l[o]=t.returnStates[e],o+=1;else for(let t=r;t<e.returnStates.length;t++)a[o]=e.parents[t],l[o]=e.returnStates[t],o+=1;if(o<a.length){if(1===o){const n=K.create(a[0],l[0]);return null!==s&&s.set(t,e,n),n}a=a.slice(0,o),l=l.slice(0,o)}const h=new H(a,l);return h.equals(t)?(null!==s&&s.set(t,e,t),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> a"),t):h.equals(e)?(null!==s&&s.set(t,e,e),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new G;for(let n=0;n<t.length;n++){const s=t[n];e.containsKey(s)||e.set(s,s)}for(let n=0;n<t.length;n++)t[n]=e.get(t[n])}(a),null!==s&&s.set(t,e,h),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> "+h),h)}(t,e,n,s)}class X{constructor(){this.data=new Uint32Array(1)}set(t){X._checkIndex(t),this._resize(t),this.data[t>>>5]|=1<<t%32}get(t){X._checkIndex(t);const e=t>>>5;return!(e>=this.data.length||!(this.data[e]&1<<t%32))}clear(t){X._checkIndex(t);const e=t>>>5;e<this.data.length&&(this.data[e]&=~(1<<t))}or(t){const e=Math.min(this.data.length,t.data.length);for(let n=0;n<e;++n)this.data[n]|=t.data[n];if(this.data.length<t.data.length){this._resize((t.data.length<<5)-1);const n=t.data.length;for(let s=e;s<n;++s)this.data[s]=t.data[s]}}values(){const t=new Array(this.length);let e=0;const n=this.data.length;for(let s=0;s<n;++s){let n=this.data[s];for(;0!==n;){const i=n&-n;t[e++]=(s<<5)+X._bitCount(i-1),n^=i}}return t}minValue(){for(let t=0;t<this.data.length;++t){let e=this.data[t];if(0!==e){let n=0;for(;!(1&e);)n++,e>>=1;return n+32*t}}return 0}hashCode(){return u.hashStuff(this.values())}equals(t){return t instanceof X&&a(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.data.map(t=>X._bitCount(t)).reduce((t,e)=>t+e,0)}_resize(t){const e=t+32>>>5;if(e<=this.data.length)return;const n=new Uint32Array(e);n.set(this.data),n.fill(0,this.data.length),this.data=n}static _checkIndex(t){if(t<0)throw new RangeError("index cannot be negative")}static _bitCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,0+(t+=t>>16)&63}}class J{constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,n=[];for(let s=0;s<e;s++){n[s]=new k;const e=new x,i=!1;this._LOOK(t.transition(s).target,null,q.EMPTY,n[s],e,new X,i,!1),(0===n[s].length||n[s].contains(J.HIT_PRED))&&(n[s]=null)}return n}LOOK(t,e,n){const s=new k,i=null!==(n=n||null)?W(t.atn,n):null;return this._LOOK(t,e,i,s,new x,new X,!0,!0),s}_LOOK(t,e,n,s,i,r,o,a){const h=new C({state:t,alt:0,context:n},null);if(!i.has(h)){if(i.add(h),t===e){if(null===n)return void s.addOne(l.EPSILON);if(n.isEmpty()&&a)return void s.addOne(l.EOF)}if(t instanceof I){if(null===n)return void s.addOne(l.EPSILON);if(n.isEmpty()&&a)return void s.addOne(l.EOF);if(n!==q.EMPTY){const l=r.get(t.ruleIndex);try{r.clear(t.ruleIndex);for(let t=0;t<n.length;t++){const l=this.atn.states[n.getReturnState(t)];this._LOOK(l,e,n.getParent(t),s,i,r,o,a)}}finally{l&&r.set(t.ruleIndex)}return}}for(let h=0;h<t.transitions.length;h++){const c=t.transitions[h];if(c.constructor===L){if(r.get(c.target.ruleIndex))continue;const t=K.create(n,c.followState.stateNumber);try{r.set(c.target.ruleIndex),this._LOOK(c.target,e,t,s,i,r,o,a)}finally{r.clear(c.target.ruleIndex)}}else if(c instanceof v)o?this._LOOK(c.target,e,n,s,i,r,o,a):s.addOne(J.HIT_PRED);else if(c.isEpsilon)this._LOOK(c.target,e,n,s,i,r,o,a);else if(c.constructor===w)s.addRange(l.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{let t=c.label;null!==t&&(c instanceof R&&(t=t.complement(l.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),s.addSet(t))}}}}}J.HIT_PRED=l.INVALID_TYPE;class Q{constructor(t,e){this.grammarType=t,this.maxTokenType=e,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[]}nextTokensInContext(t,e){return new J(this).LOOK(t,null,e)}nextTokensNoContext(t){return null!==t.nextTokenWithinRule||(t.nextTokenWithinRule=this.nextTokensInContext(t,null),t.nextTokenWithinRule.readOnly=!0),t.nextTokenWithinRule}nextTokens(t,e){return void 0===e?this.nextTokensNoContext(t):this.nextTokensInContext(t,e)}addState(t){null!==t&&(t.atn=this,t.stateNumber=this.states.length),this.states.push(t)}removeState(t){this.states[t.stateNumber]=null}defineDecisionState(t){return this.decisionToState.push(t),t.decision=this.decisionToState.length-1,t.decision}getDecisionState(t){return 0===this.decisionToState.length?null:this.decisionToState[t]}getExpectedTokens(t,e){if(t<0||t>=this.states.length)throw"Invalid state number.";const n=this.states[t];let s=this.nextTokens(n);if(!s.contains(l.EPSILON))return s;const i=new k;for(i.addSet(s),i.removeOne(l.EPSILON);null!==e&&e.invokingState>=0&&s.contains(l.EPSILON);){const t=this.states[e.invokingState].transitions[0];s=this.nextTokens(t.followState),i.addSet(s),i.removeOne(l.EPSILON),e=e.parentCtx}return s.contains(l.EPSILON)&&i.addOne(l.EOF),i}}Q.INVALID_ALT_NUMBER=0;class Z extends N{constructor(){super(),this.stateType=N.BASIC}}class tt extends N{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class et extends tt{constructor(){return super(),this.endState=null,this}}class nt extends N{constructor(){return super(),this.stateType=N.BLOCK_END,this.startState=null,this}}class st extends N{constructor(){return super(),this.stateType=N.LOOP_END,this.loopBackState=null,this}}class it extends N{constructor(){return super(),this.stateType=N.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class rt extends tt{constructor(){return super(),this.stateType=N.TOKEN_START,this}}class ot extends tt{constructor(){return super(),this.stateType=N.PLUS_LOOP_BACK,this}}class lt extends N{constructor(){return super(),this.stateType=N.STAR_LOOP_BACK,this}}class at extends tt{constructor(){return super(),this.stateType=N.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class ht extends et{constructor(){return super(),this.stateType=N.PLUS_BLOCK_START,this.loopBackState=null,this}}class ct extends et{constructor(){return super(),this.stateType=N.STAR_BLOCK_START,this}}class ut extends et{constructor(){return super(),this.stateType=N.BLOCK_START,this}}class dt extends y{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=y.ATOM}makeLabel(){const t=new k;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class gt extends y{constructor(t,e,n){super(t),this.serializationType=y.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new k;return t.addRange(this.start,this.stop),t}matches(t,e,n){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class pt extends y{constructor(t,e,n,s){super(t),this.serializationType=y.ACTION,this.ruleIndex=e,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==s&&s,this.isEpsilon=!0}matches(t,e,n){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class ft extends y{constructor(t,e){super(t),this.serializationType=y.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class xt extends T{constructor(t,e,n){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==n&&n}evaluate(t,e){const n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof xt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}T.NONE=new xt;class Tt extends v{constructor(t,e,n,s){super(t),this.serializationType=y.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=s,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new xt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class St extends T{constructor(t){super(),this.precedence=void 0===t?0:t}evaluate(t,e){return t.precpred(e,this.precedence)}evalPrecedence(t,e){return t.precpred(e,this.precedence)?T.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof St&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}T.PrecedencePredicate=St;class mt extends v{constructor(t,e){super(t),this.serializationType=y.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new St(this.precedence)}toString(){return this.precedence+" >= _p"}}class Et{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}Et.defaultOptions=new Et,Et.defaultOptions.readOnly=!0;class _t{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class Ct extends _t{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}Ct.INSTANCE=new Ct;class At extends _t{constructor(t){super(0),this.channel=t}execute(t){t._channel=this.channel}updateHashCode(t){t.update(this.actionType,this.channel)}equals(t){return this===t||t instanceof At&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class kt extends _t{constructor(t,e){super(1),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0}execute(t){t.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(t){return this===t||t instanceof kt&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class Nt extends _t{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}Nt.INSTANCE=new Nt;class It extends _t{constructor(t){super(7),this.type=t}execute(t){t.type=this.type}updateHashCode(t){t.update(this.actionType,this.type)}equals(t){return this===t||t instanceof It&&this.type===t.type}toString(){return"type("+this.type+")"}}class yt extends _t{constructor(t){super(5),this.mode=t}execute(t){t.pushMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof yt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class Lt extends _t{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}Lt.INSTANCE=new Lt;class Ot extends _t{constructor(t){super(2),this.mode=t}execute(t){t.setMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Ot&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function Rt(t,e){const n=[];return n[t-1]=e,n.map(function(t){return e})}class wt{constructor(t){null==t&&(t=Et.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const n=this.readATN();this.readStates(n,e),this.readRules(n,e),this.readModes(n);const s=[];return this.readSets(n,s,this.readInt.bind(this)),e&&this.readSets(n,s,this.readInt32.bind(this)),this.readEdges(n,s),this.readDecisions(n),this.readLexerActions(n,e),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}reset(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){const e=function(t){const e=t.charCodeAt(0);return e>1?e-2:e+65534},n=t.split("").map(e);return n[0]=t.charCodeAt(0),this.data=n,this.pos=0,!0}return this.data=t,this.pos=0,!1}skipUUID(){let t=0;for(;t++<8;)this.readInt()}checkVersion(t){const e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}readATN(){const t=this.readInt(),e=this.readInt();return new Q(t,e)}readStates(t,e){let n,s,i;const r=[],o=[],l=this.readInt();for(let n=0;n<l;n++){const n=this.readInt();if(n===N.INVALID_TYPE){t.addState(null);continue}let s=this.readInt();e&&65535===s&&(s=-1);const i=this.stateFactory(n,s);if(n===N.LOOP_END){const t=this.readInt();r.push([i,t])}else if(i instanceof et){const t=this.readInt();o.push([i,t])}t.addState(i)}for(n=0;n<r.length;n++)s=r[n],s[0].loopBackState=t.states[s[1]];for(n=0;n<o.length;n++)s=o[n],s[0].endState=t.states[s[1]];let a=this.readInt();for(n=0;n<a;n++)i=this.readInt(),t.states[i].nonGreedy=!0;let h=this.readInt();for(n=0;n<h;n++)i=this.readInt(),t.states[i].isPrecedenceRule=!0}readRules(t,e){let n;const s=this.readInt();for(0===t.grammarType&&(t.ruleToTokenType=Rt(s,0)),t.ruleToStartState=Rt(s,0),n=0;n<s;n++){const s=this.readInt();if(t.ruleToStartState[n]=t.states[s],0===t.grammarType){let s=this.readInt();e&&65535===s&&(s=l.EOF),t.ruleToTokenType[n]=s}}for(t.ruleToStopState=Rt(s,0),n=0;n<t.states.length;n++){const e=t.states[n];e instanceof I&&(t.ruleToStopState[e.ruleIndex]=e,t.ruleToStartState[e.ruleIndex].stopState=e)}}readModes(t){const e=this.readInt();for(let n=0;n<e;n++){let e=this.readInt();t.modeToStartState.push(t.states[e])}}readSets(t,e,n){const s=this.readInt();for(let t=0;t<s;t++){const t=new k;e.push(t);const s=this.readInt();0!==this.readInt()&&t.addOne(-1);for(let e=0;e<s;e++){const e=n(),s=n();t.addRange(e,s)}}}readEdges(t,e){let n,s,i,r,o;const l=this.readInt();for(n=0;n<l;n++){const n=this.readInt(),s=this.readInt(),i=this.readInt(),o=this.readInt(),l=this.readInt(),a=this.readInt();r=this.edgeFactory(t,i,n,s,o,l,a,e),t.states[n].addTransition(r)}for(n=0;n<t.states.length;n++)for(i=t.states[n],s=0;s<i.transitions.length;s++){const e=i.transitions[s];if(!(e instanceof L))continue;let n=-1;t.ruleToStartState[e.target.ruleIndex].isPrecedenceRule&&0===e.precedence&&(n=e.target.ruleIndex),r=new ft(e.followState,n),t.ruleToStopState[e.target.ruleIndex].addTransition(r)}for(n=0;n<t.states.length;n++){if(i=t.states[n],i instanceof et){if(null===i.endState)throw"IllegalState";if(null!==i.endState.startState)throw"IllegalState";i.endState.startState=i}if(i instanceof ot)for(s=0;s<i.transitions.length;s++)o=i.transitions[s].target,o instanceof ht&&(o.loopBackState=i);else if(i instanceof lt)for(s=0;s<i.transitions.length;s++)o=i.transitions[s].target,o instanceof at&&(o.loopBackState=i)}}readDecisions(t){const e=this.readInt();for(let n=0;n<e;n++){const e=this.readInt(),s=t.states[e];t.decisionToState.push(s),s.decision=n}}readLexerActions(t,e){if(0===t.grammarType){const n=this.readInt();t.lexerActions=Rt(n,null);for(let s=0;s<n;s++){const n=this.readInt();let i=this.readInt();e&&65535===i&&(i=-1);let r=this.readInt();e&&65535===r&&(r=-1),t.lexerActions[s]=this.lexerActionFactory(n,i,r)}}}generateRuleBypassTransitions(t){let e;const n=t.ruleToStartState.length;for(e=0;e<n;e++)t.ruleToTokenType[e]=t.maxTokenType+e+1;for(e=0;e<n;e++)this.generateRuleBypassTransition(t,e)}generateRuleBypassTransition(t,e){let n,s;const i=new ut;i.ruleIndex=e,t.addState(i);const r=new nt;r.ruleIndex=e,t.addState(r),i.endState=r,t.defineDecisionState(i),r.startState=i;let o=null,l=null;if(t.ruleToStartState[e].isPrecedenceRule){for(l=null,n=0;n<t.states.length;n++)if(s=t.states[n],this.stateIsEndStateFor(s,e)){l=s,o=s.loopBackState.transitions[0];break}if(null===o)throw"Couldn't identify final state of the precedence rule prefix section."}else l=t.ruleToStopState[e];for(n=0;n<t.states.length;n++){s=t.states[n];for(let t=0;t<s.transitions.length;t++){const e=s.transitions[t];e!==o&&e.target===l&&(e.target=r)}}const a=t.ruleToStartState[e],h=a.transitions.length;for(;h>0;)i.addTransition(a.transitions[h-1]),a.transitions=a.transitions.slice(-1);t.ruleToStartState[e].addTransition(new ft(i)),r.addTransition(new ft(l));const c=new Z;t.addState(c),c.addTransition(new dt(r,t.ruleToTokenType[e])),i.addTransition(new ft(c))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof at))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof st&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof I?t:null}markPrecedenceDecisions(t){for(let e=0;e<t.states.length;e++){const n=t.states[e];if(n instanceof at&&t.ruleToStartState[n.ruleIndex].isPrecedenceRule){const t=n.transitions[n.transitions.length-1].target;t instanceof st&&t.epsilonOnlyTransitions&&t.transitions[0].target instanceof I&&(n.isPrecedenceDecision=!0)}}}verifyATN(t){if(this.deserializationOptions.verifyATN)for(let e=0;e<t.states.length;e++){const n=t.states[e];if(null!==n)if(this.checkCondition(n.epsilonOnlyTransitions||n.transitions.length<=1),n instanceof ht)this.checkCondition(null!==n.loopBackState);else if(n instanceof at)if(this.checkCondition(null!==n.loopBackState),this.checkCondition(2===n.transitions.length),n.transitions[0].target instanceof ct)this.checkCondition(n.transitions[1].target instanceof st),this.checkCondition(!n.nonGreedy);else{if(!(n.transitions[0].target instanceof st))throw"IllegalState";this.checkCondition(n.transitions[1].target instanceof ct),this.checkCondition(n.nonGreedy)}else n instanceof lt?(this.checkCondition(1===n.transitions.length),this.checkCondition(n.transitions[0].target instanceof at)):n instanceof st?this.checkCondition(null!==n.loopBackState):n instanceof it?this.checkCondition(null!==n.stopState):n instanceof et?this.checkCondition(null!==n.endState):n instanceof nt?this.checkCondition(null!==n.startState):n instanceof tt?this.checkCondition(n.transitions.length<=1||n.decision>=0):this.checkCondition(n.transitions.length<=1||n instanceof I)}}checkCondition(t,e){if(!t)throw null==e&&(e="IllegalState"),e}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(t,e,n,s,i,r,o,a){const h=t.states[s];switch(e){case y.EPSILON:return new ft(h);case y.RANGE:return new gt(h,0!==o?l.EOF:i,r);case y.RULE:return new L(t.states[i],r,o,h);case y.PREDICATE:return new Tt(h,i,r,0!==o);case y.PRECEDENCE:return new mt(h,i);case y.ATOM:return new dt(h,0!==o?l.EOF:i);case y.ACTION:return new pt(h,i,r,0!==o);case y.SET:return new O(h,a[i]);case y.NOT_SET:return new R(h,a[i]);case y.WILDCARD:return new w(h);default:throw"The specified transition type: "+e+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[N.INVALID_TYPE]=null,t[N.BASIC]=()=>new Z,t[N.RULE_START]=()=>new it,t[N.BLOCK_START]=()=>new ut,t[N.PLUS_BLOCK_START]=()=>new ht,t[N.STAR_BLOCK_START]=()=>new ct,t[N.TOKEN_START]=()=>new rt,t[N.RULE_STOP]=()=>new I,t[N.BLOCK_END]=()=>new nt,t[N.STAR_LOOP_BACK]=()=>new lt,t[N.STAR_LOOP_ENTRY]=()=>new at,t[N.PLUS_LOOP_BACK]=()=>new ot,t[N.LOOP_END]=()=>new st,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const n=this.stateFactories[t]();if(null!==n)return n.ruleIndex=e,n}}lexerActionFactory(t,e,n){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new At(t),t[1]=(t,e)=>new kt(t,e),t[2]=(t,e)=>new Ot(t),t[3]=(t,e)=>Nt.INSTANCE,t[4]=(t,e)=>Lt.INSTANCE,t[5]=(t,e)=>new yt(t),t[6]=(t,e)=>Ct.INSTANCE,t[7]=(t,e)=>new It(t),this.actionFactories=t}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,n)}}class vt{syntaxError(t,e,n,s,i,r){}reportAmbiguity(t,e,n,s,i,r,o){}reportAttemptingFullContext(t,e,n,s,i,r){}reportContextSensitivity(t,e,n,s,i,r){}}class bt extends vt{constructor(){super()}syntaxError(t,e,n,s,i,r){console.error("line "+n+":"+s+" "+i)}}bt.INSTANCE=new bt;class Pt extends vt{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,n,s,i,r){this.delegates.map(o=>o.syntaxError(t,e,n,s,i,r))}reportAmbiguity(t,e,n,s,i,r,o){this.delegates.map(l=>l.reportAmbiguity(t,e,n,s,i,r,o))}reportAttemptingFullContext(t,e,n,s,i,r){this.delegates.map(o=>o.reportAttemptingFullContext(t,e,n,s,i,r))}reportContextSensitivity(t,e,n,s,i,r){this.delegates.map(o=>o.reportContextSensitivity(t,e,n,s,i,r))}}class Dt{constructor(){this._listeners=[bt.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.2";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}addErrorListener(t){this._listeners.push(t)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const t=this.getLiteralNames(),e=this.getSymbolicNames(),n=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let s=0;s<n;s++)this.tokenNames[s]=t[s]||e[s]||"<INVALID"}return this.tokenNames}getTokenTypeMap(){const t=this.getTokenNames();if(null===t)throw"The current recognizer does not provide a list of token names.";let e=this.tokenTypeMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,n){t[e]=n}),e.EOF=l.EOF,this.tokenTypeMapCache[t]=e),e}getRuleIndexMap(){const t=this.ruleNames;if(null===t)throw"The current recognizer does not provide a list of rule names.";let e=this.ruleIndexMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,n){t[e]=n}),this.ruleIndexMapCache[t]=e),e}getTokenType(t){const e=this.getTokenTypeMap()[t];return void 0!==e?e:l.INVALID_TYPE}getErrorHeader(t){return"line "+t.getOffendingToken().line+":"+t.getOffendingToken().column}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===l.EOF?"<EOF>":"<"+t.type+">"),e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+e+"'"}getErrorListenerDispatch(){return console.warn("Calling deprecated method in Recognizer class: getErrorListenerDispatch()"),this.getErrorListener()}getErrorListener(){return new Pt(this._listeners)}sempred(t,e,n){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Dt.tokenTypeMapCache={},Dt.ruleIndexMapCache={};class Ft extends l{constructor(t,e,n,s,i){super(),this.source=void 0!==t?t:Ft.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==n?n:l.DEFAULT_CHANNEL,this.start=void 0!==s?s:-1,this.stop=void 0!==i?i:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1}clone(){const t=new Ft(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}cloneWithType(t){const e=new Ft(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===l.EOF&&(e.text=""),e}toString(){let t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const t=this.getInputStream();if(null===t)return null;const e=t.size;return this.start<e&&this.stop<e?t.getText(this.start,this.stop):"<EOF>"}set text(t){this._text=t}}Ft.EMPTY_SOURCE=[null,null];class Mt{}class Ut extends Mt{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,s,i,r,o,l){const a=new Ft(t,e,s,i,r);return a.line=o,a.column=l,null!==n?a.text=n:this.copyText&&null!==t[1]&&(a.text=t[1].getText(i,r)),a}createThin(t,e){const n=new Ft(null,t);return n.text=e,n}}Ut.DEFAULT=new Ut;class Bt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Bt),this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class Vt extends Bt{constructor(t,e,n,s){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=n,this.deadEndConfigs=s}toString(){let t="";return this.startIndex>=0&&this.startIndex<this.input.size&&(t=this.input.getText(new A(this.startIndex,this.startIndex))),"LexerNoViableAltException"+t}}class zt extends Dt{constructor(t){super(),this._input=t,this._factory=Ut.DEFAULT,this._tokenFactorySourcePair=[this,t],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=l.DEFAULT_CHANNEL,this._type=l.INVALID_TYPE,this._modeStack=[],this._mode=zt.DEFAULT_MODE,this._text=null}reset(){null!==this._input&&this._input.seek(0),this._token=null,this._type=l.INVALID_TYPE,this._channel=l.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=zt.DEFAULT_MODE,this._modeStack=[],this._interp.reset()}nextToken(){if(null===this._input)throw"nextToken requires a non-null input stream.";const t=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=l.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;let e=!1;for(;;){this._type=l.INVALID_TYPE;let n=zt.SKIP;try{n=this._interp.match(this._input,this._mode)}catch(t){if(!(t instanceof Bt))throw console.log(t.stack),t;this.notifyListeners(t),this.recover(t)}if(this._input.LA(1)===l.EOF&&(this._hitEOF=!0),this._type===l.INVALID_TYPE&&(this._type=n),this._type===zt.SKIP){e=!0;break}if(this._type!==zt.MORE)break}if(!e)return null===this._token&&this.emit(),this._token}}finally{this._input.release(t)}}skip(){this._type=zt.SKIP}more(){this._type=zt.MORE}mode(t){console.warn("Calling deprecated method in Lexer class: mode(...)"),this.setMode(t)}setMode(t){this._mode=t}getMode(){return this._mode}getModeStack(){return this._modeStack}pushMode(t){this._interp.debug&&console.log("pushMode "+t),this._modeStack.push(this._mode),this.setMode(t)}popMode(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.setMode(this._modeStack.pop()),this._mode}emitToken(t){this._token=t}emit(){const t=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(t),t}emitEOF(){const t=this.column,e=this.line,n=this._factory.create(this._tokenFactorySourcePair,l.EOF,null,l.DEFAULT_CHANNEL,this._input.index,this._input.index-1,e,t);return this.emitToken(n),n}getCharIndex(){return this._input.index}getAllTokens(){const t=[];let e=this.nextToken();for(;e.type!==l.EOF;)t.push(e),e=this.nextToken();return t}notifyListeners(t){const e=this._tokenStartCharIndex,n=this._input.index,s=this._input.getText(e,n),i="token recognition error at: '"+this.getErrorDisplay(s)+"'";this.getErrorListener().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,i,t)}getErrorDisplay(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e.join("")}getErrorDisplayForChar(t){return t.charCodeAt(0)===l.EOF?"<EOF>":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(t){this._input.LA(1)!==l.EOF&&(t instanceof Vt?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(t){this._type=t}get line(){return this._interp.line}set line(t){this._interp.line=t}get column(){return this._interp.column}set column(t){this._interp.column=t}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(t){this._text=t}}function qt(t){return t.hashCodeForConfigSet()}function Ht(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}zt.DEFAULT_MODE=0,zt.MORE=-2,zt.SKIP=-3,zt.DEFAULT_TOKEN_CHANNEL=l.DEFAULT_CHANNEL,zt.HIDDEN=l.HIDDEN_CHANNEL,zt.MIN_CHAR_VALUE=0,zt.MAX_CHAR_VALUE=1114111;class Kt{constructor(t){this.configLookup=new x(qt,Ht),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==T.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.getOrAdd(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const s=!this.fullCtx,i=$(n.context,t.context,s,e);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=i,!0}getStates(){const t=new x;for(let e=0;e<this.configs.length;e++)t.add(this.configs[e].state);return t}getPredicates(){const t=[];for(let e=0;e<this.configs.length;e++){const n=this.configs[e].semanticContext;n!==T.NONE&&t.push(n.semanticContext)}return t}optimizeConfigs(t){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(let e=0;e<this.configs.length;e++){const n=this.configs[e];n.context=t.getCachedContext(n.context)}}addAll(t){for(let e=0;e<t.length;e++)this.add(t[e]);return!1}equals(t){return this===t||t instanceof Kt&&a(this.configs,t.configs)&&this.fullCtx===t.fullCtx&&this.uniqueAlt===t.uniqueAlt&&this.conflictingAlts===t.conflictingAlts&&this.hasSemanticContext===t.hasSemanticContext&&this.dipsIntoOuterContext===t.dipsIntoOuterContext}hashCode(){const t=new u;return t.update(this.configs),t.finish()}updateHashCode(t){this.readOnly?(-1===this.cachedHashCode&&(this.cachedHashCode=this.hashCode()),t.update(this.cachedHashCode)):t.update(this.hashCode())}isEmpty(){return 0===this.configs.length}contains(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(t)}containsFast(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(t)}clear(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new x}setReadonly(t){this.readOnly=t,t&&(this.configLookup=null)}toString(){return f(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==Q.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(null!==this.conflictingAlts?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}}class Yt{constructor(t,e){return null===t&&(t=-1),null===e&&(e=new Kt),this.stateNumber=t,this.configs=e,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}getAltSet(){const t=new x;if(null!==this.configs)for(let e=0;e<this.configs.length;e++){const n=this.configs[e];t.add(n.alt)}return 0===t.length?null:t}equals(t){return this===t||t instanceof Yt&&this.configs.equals(t.configs)}toString(){let t=this.stateNumber+":"+this.configs;return this.isAcceptState&&(t+="=>",null!==this.predicates?t+=this.predicates:t+=this.prediction),t}hashCode(){const t=new u;return t.update(this.configs),t.finish()}}class Gt{constructor(t,e){return this.atn=t,this.sharedContextCache=e,this}getCachedContext(t){if(null===this.sharedContextCache)return t;const e=new G;return j(t,this.sharedContextCache,e)}}Gt.ERROR=new Yt(2147483647,new Kt);class Wt extends Kt{constructor(){super(),this.configLookup=new x}}class jt extends C{constructor(t,e){super(t,e);const n=t.lexerActionExecutor||null;return this.lexerActionExecutor=n||(null!==e?e.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=null!==e&&this.checkNonGreedyDecision(e,this.state),this.hashCodeForConfigSet=jt.prototype.hashCode,this.equalsForConfigSet=jt.prototype.equals,this}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)}equals(t){return this===t||t instanceof jt&&this.passedThroughNonGreedyDecision===t.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(t.lexerActionExecutor):!t.lexerActionExecutor)&&super.equals(t)}checkNonGreedyDecision(t,e){return t.passedThroughNonGreedyDecision||e instanceof tt&&e.nonGreedy}}class $t extends _t{constructor(t,e){super(e.actionType),this.offset=t,this.action=e,this.isPositionDependent=!0}execute(t){this.action.execute(t)}updateHashCode(t){t.update(this.actionType,this.offset,this.action)}equals(t){return this===t||t instanceof $t&&this.offset===t.offset&&this.action===t.action}}class Xt{constructor(t){return this.lexerActions=null===t?[]:t,this.cachedHashCode=u.hashStuff(t),this}fixOffsetBeforeMatch(t){let e=null;for(let n=0;n<this.lexerActions.length;n++)!this.lexerActions[n].isPositionDependent||this.lexerActions[n]instanceof $t||(null===e&&(e=this.lexerActions.concat([])),e[n]=new $t(t,this.lexerActions[n]));return null===e?this:new Xt(e)}execute(t,e,n){let s=!1;const i=e.index;try{for(let r=0;r<this.lexerActions.length;r++){let o=this.lexerActions[r];if(o instanceof $t){const t=o.offset;e.seek(n+t),o=o.action,s=n+t!==i}else o.isPositionDependent&&(e.seek(i),s=!1);o.execute(t)}}finally{s&&e.seek(i)}}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}equals(t){if(this===t)return!0;if(t instanceof Xt){if(this.cachedHashCode!=t.cachedHashCode)return!1;if(this.lexerActions.length!=t.lexerActions.length)return!1;{const e=this.lexerActions.length;for(let n=0;n<e;++n)if(!this.lexerActions[n].equals(t.lexerActions[n]))return!1;return!0}}return!1}static append(t,e){if(null===t)return new Xt([e]);const n=t.lexerActions.concat([e]);return new Xt(n)}}function Jt(t){t.index=-1,t.line=0,t.column=-1,t.dfaState=null}class Qt{constructor(){Jt(this)}reset(){Jt(this)}}class Zt extends Gt{constructor(t,e,n,s){super(e,s),this.decisionToDFA=n,this.recog=t,this.startIndex=-1,this.line=1,this.column=0,this.mode=zt.DEFAULT_MODE,this.prevAccept=new Qt}copyState(t){this.column=t.column,this.line=t.line,this.mode=t.mode,this.startIndex=t.startIndex}match(t,e){this.mode=e;const n=t.mark();try{this.startIndex=t.index,this.prevAccept.reset();const n=this.decisionToDFA[e];return null===n.s0?this.matchATN(t):this.execATN(t,n.s0)}finally{t.release(n)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=zt.DEFAULT_MODE}matchATN(t){const e=this.atn.modeToStartState[this.mode];Zt.debug&&console.log("matchATN mode "+this.mode+" start: "+e);const n=this.mode,s=this.computeStartState(t,e),i=s.hasSemanticContext;s.hasSemanticContext=!1;const r=this.addDFAState(s);i||(this.decisionToDFA[this.mode].s0=r);const o=this.execATN(t,r);return Zt.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[n].toLexerString()),o}execATN(t,e){Zt.debug&&console.log("start state closure="+e.configs),e.isAcceptState&&this.captureSimState(this.prevAccept,t,e);let n=t.LA(1),s=e;for(;;){Zt.debug&&console.log("execATN loop starting closure: "+s.configs);let e=this.getExistingTargetState(s,n);if(null===e&&(e=this.computeTargetState(t,s,n)),e===Gt.ERROR)break;if(n!==l.EOF&&this.consume(t),e.isAcceptState&&(this.captureSimState(this.prevAccept,t,e),n===l.EOF))break;n=t.LA(1),s=e}return this.failOrAccept(this.prevAccept,t,s.configs,n)}getExistingTargetState(t,e){if(null===t.edges||e<Zt.MIN_DFA_EDGE||e>Zt.MAX_DFA_EDGE)return null;let n=t.edges[e-Zt.MIN_DFA_EDGE];return void 0===n&&(n=null),Zt.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(t,e,n){const s=new Wt;return this.getReachableConfigSet(t,e.configs,s,n),0===s.items.length?(s.hasSemanticContext||this.addDFAEdge(e,n,Gt.ERROR),Gt.ERROR):this.addDFAEdge(e,n,null,s)}failOrAccept(t,e,n,s){if(null!==this.prevAccept.dfaState){const n=t.dfaState.lexerActionExecutor;return this.accept(e,n,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(s===l.EOF&&e.index===this.startIndex)return l.EOF;throw new Vt(this.recog,e,this.startIndex,n)}getReachableConfigSet(t,e,n,s){let i=Q.INVALID_ALT_NUMBER;for(let r=0;r<e.items.length;r++){const o=e.items[r],a=o.alt===i;if(!a||!o.passedThroughNonGreedyDecision){Zt.debug&&console.log("testing %s at %s\n",this.getTokenName(s),o.toString(this.recog,!0));for(let e=0;e<o.state.transitions.length;e++){const r=o.state.transitions[e],h=this.getReachableTarget(r,s);if(null!==h){let e=o.lexerActionExecutor;null!==e&&(e=e.fixOffsetBeforeMatch(t.index-this.startIndex));const r=s===l.EOF,c=new jt({state:h,lexerActionExecutor:e},o);this.closure(t,c,n,a,!0,r)&&(i=o.alt)}}}}}accept(t,e,n,s,i,r){Zt.debug&&console.log("ACTION %s\n",e),t.seek(s),this.line=i,this.column=r,null!==e&&null!==this.recog&&e.execute(this.recog,t,n)}getReachableTarget(t,e){return t.matches(e,0,zt.MAX_CHAR_VALUE)?t.target:null}computeStartState(t,e){const n=q.EMPTY,s=new Wt;for(let i=0;i<e.transitions.length;i++){const r=e.transitions[i].target,o=new jt({state:r,alt:i+1,context:n},null);this.closure(t,o,s,!1,!1,!1)}return s}closure(t,e,n,s,i,r){let o=null;if(Zt.debug&&console.log("closure("+e.toString(this.recog,!0)+")"),e.state instanceof I){if(Zt.debug&&(null!==this.recog?console.log("closure at %s rule stop %s\n",this.recog.ruleNames[e.state.ruleIndex],e):console.log("closure at rule stop %s\n",e)),null===e.context||e.context.hasEmptyPath()){if(null===e.context||e.context.isEmpty())return n.add(e),!0;n.add(new jt({state:e.state,context:q.EMPTY},e)),s=!0}if(null!==e.context&&!e.context.isEmpty())for(let l=0;l<e.context.length;l++)if(e.context.getReturnState(l)!==q.EMPTY_RETURN_STATE){const a=e.context.getParent(l),h=this.atn.states[e.context.getReturnState(l)];o=new jt({state:h,context:a},e),s=this.closure(t,o,n,s,i,r)}return s}e.state.epsilonOnlyTransitions||s&&e.passedThroughNonGreedyDecision||n.add(e);for(let l=0;l<e.state.transitions.length;l++){const a=e.state.transitions[l];o=this.getEpsilonTarget(t,e,a,n,i,r),null!==o&&(s=this.closure(t,o,n,s,i,r))}return s}getEpsilonTarget(t,e,n,s,i,r){let o=null;if(n.serializationType===y.RULE){const t=K.create(e.context,n.followState.stateNumber);o=new jt({state:n.target,context:t},e)}else{if(n.serializationType===y.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";if(n.serializationType===y.PREDICATE)Zt.debug&&console.log("EVAL rule "+n.ruleIndex+":"+n.predIndex),s.hasSemanticContext=!0,this.evaluatePredicate(t,n.ruleIndex,n.predIndex,i)&&(o=new jt({state:n.target},e));else if(n.serializationType===y.ACTION)if(null===e.context||e.context.hasEmptyPath()){const t=Xt.append(e.lexerActionExecutor,this.atn.lexerActions[n.actionIndex]);o=new jt({state:n.target,lexerActionExecutor:t},e)}else o=new jt({state:n.target},e);else n.serializationType===y.EPSILON?o=new jt({state:n.target},e):n.serializationType!==y.ATOM&&n.serializationType!==y.RANGE&&n.serializationType!==y.SET||r&&n.matches(l.EOF,0,zt.MAX_CHAR_VALUE)&&(o=new jt({state:n.target},e))}return o}evaluatePredicate(t,e,n,s){if(null===this.recog)return!0;if(!s)return this.recog.sempred(null,e,n);const i=this.column,r=this.line,o=t.index,l=t.mark();try{return this.consume(t),this.recog.sempred(null,e,n)}finally{this.column=i,this.line=r,t.seek(o),t.release(l)}}captureSimState(t,e,n){t.index=e.index,t.line=this.line,t.column=this.column,t.dfaState=n}addDFAEdge(t,e,n,s){if(void 0===n&&(n=null),void 0===s&&(s=null),null===n&&null!==s){const t=s.hasSemanticContext;if(s.hasSemanticContext=!1,n=this.addDFAState(s),t)return n}return e<Zt.MIN_DFA_EDGE||e>Zt.MAX_DFA_EDGE||(Zt.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-Zt.MIN_DFA_EDGE]=n),n}addDFAState(t){const e=new Yt(null,t);let n=null;for(let e=0;e<t.items.length;e++){const s=t.items[e];if(s.state instanceof I){n=s;break}}null!==n&&(e.isAcceptState=!0,e.lexerActionExecutor=n.lexerActionExecutor,e.prediction=this.atn.ruleToTokenType[n.state.ruleIndex]);const s=this.decisionToDFA[this.mode],i=s.states.get(e);if(null!==i)return i;const r=e;return r.stateNumber=s.states.length,t.setReadonly(!0),r.configs=t,s.states.add(r),r}getDFA(t){return this.decisionToDFA[t]}getText(t){return t.getText(this.startIndex,t.index-1)}consume(t){t.LA(1)==="\n".charCodeAt(0)?(this.line+=1,this.column=0):this.column+=1,t.consume()}getTokenName(t){return-1===t?"EOF":"'"+String.fromCharCode(t)+"'"}}Zt.debug=!1,Zt.dfa_debug=!1,Zt.MIN_DFA_EDGE=0,Zt.MAX_DFA_EDGE=127;class te{constructor(t,e){this.alt=e,this.pred=t}toString(){return"("+this.pred+", "+this.alt+")"}}class ee{constructor(){this.data={}}get(t){return this.data["k-"+t]||null}set(t,e){this.data["k-"+t]=e}values(){return Object.keys(this.data).filter(t=>t.startsWith("k-")).map(t=>this.data[t],this)}}const ne={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(ne.allConfigsInRuleStopStates(e))return!0;if(t===ne.SLL&&e.hasSemanticContext){const t=new Kt;for(let n=0;n<e.items.length;n++){let s=e.items[n];s=new C({semanticContext:T.NONE},s),t.add(s)}e=t}const n=ne.getConflictingAltSubsets(e);return ne.hasConflictingAltSet(n)&&!ne.hasStateAssociatedWithOneAlt(e)},hasConfigInRuleStopState:function(t){for(let e=0;e<t.items.length;e++)if(t.items[e].state instanceof I)return!0;return!1},allConfigsInRuleStopStates:function(t){for(let e=0;e<t.items.length;e++)if(!(t.items[e].state instanceof I))return!1;return!0},resolvesToJustOneViableAlt:function(t){return ne.getSingleViableAlt(t)},allSubsetsConflict:function(t){return!ne.hasNonConflictingAltSet(t)},hasNonConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(1===t[e].length)return!0;return!1},hasConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(t[e].length>1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let n=0;n<t.length;n++){const s=t[n];if(null===e)e=s;else if(s!==e)return!1}return!0},getUniqueAlt:function(t){const e=ne.getAlts(t);return 1===e.length?e.minValue():Q.INVALID_ALT_NUMBER},getAlts:function(t){const e=new X;return t.map(function(t){e.or(t)}),e},getConflictingAltSubsets:function(t){const e=new G;return e.hashFunction=function(t){u.hashStuff(t.state.stateNumber,t.context)},e.equalsFunction=function(t,e){return t.state.stateNumber===e.state.stateNumber&&t.context.equals(e.context)},t.items.map(function(t){let n=e.get(t);null===n&&(n=new X,e.set(t,n)),n.set(t.alt)}),e.getValues()},getStateToAltMap:function(t){const e=new ee;return t.items.map(function(t){let n=e.get(t.state);null===n&&(n=new X,e.set(t.state,n)),n.set(t.alt)}),e},hasStateAssociatedWithOneAlt:function(t){const e=ne.getStateToAltMap(t).values();for(let t=0;t<e.length;t++)if(1===e[t].length)return!0;return!1},getSingleViableAlt:function(t){let e=null;for(let n=0;n<t.length;n++){const s=t[n].minValue();if(null===e)e=s;else if(e!==s)return Q.INVALID_ALT_NUMBER}return e}},se=ne;class ie extends Bt{constructor(t,e,n,s,i,r){r=r||t._ctx,s=s||t.getCurrentToken(),n=n||t.getCurrentToken(),e=e||t.getInputStream(),super({message:"",recognizer:t,input:e,ctx:r}),this.deadEndConfigs=i,this.startToken=n,this.offendingToken=s}}class re{constructor(t){this.defaultMapCtor=t||G,this.cacheMap=new this.defaultMapCtor}get(t,e){const n=this.cacheMap.get(t)||null;return null===n?null:n.get(e)||null}set(t,e,n){let s=this.cacheMap.get(t)||null;null===s&&(s=new this.defaultMapCtor,this.cacheMap.set(t,s)),s.set(e,n)}}class oe extends Gt{constructor(t,e,n,s){super(e,s),this.parser=t,this.decisionToDFA=n,this.predictionMode=se.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this.debug=!1,this.debug_closure=!1,this.debug_add=!1,this.trace_atn_sim=!1,this.dfa_debug=!1,this.retry_debug=!1}reset(){}adaptivePredict(t,e,n){(this.debug||this.trace_atn_sim)&&console.log("adaptivePredict decision "+e+" exec LA(1)=="+this.getLookaheadName(t)+" line "+t.LT(1).line+":"+t.LT(1).column),this._input=t,this._startIndex=t.index,this._outerContext=n;const s=this.decisionToDFA[e];this._dfa=s;const i=t.mark(),r=t.index;try{let e;if(e=s.precedenceDfa?s.getPrecedenceStartState(this.parser.getPrecedence()):s.s0,null===e){null===n&&(n=z.EMPTY),this.debug&&console.log("predictATN decision "+s.decision+" exec LA(1)=="+this.getLookaheadName(t)+", outerContext="+n.toString(this.parser.ruleNames));const i=!1;let r=this.computeStartState(s.atnStartState,z.EMPTY,i);s.precedenceDfa?(s.s0.configs=r,r=this.applyPrecedenceFilter(r),e=this.addDFAState(s,new Yt(null,r)),s.setPrecedenceStartState(this.parser.getPrecedence(),e)):(e=this.addDFAState(s,new Yt(null,r)),s.s0=e)}const i=this.execATN(s,e,t,r,n);return this.debug&&console.log("DFA after predictATN: "+s.toString(this.parser.literalNames,this.parser.symbolicNames)),i}finally{this._dfa=null,this.mergeCache=null,t.seek(r),t.release(i)}}execATN(t,e,n,s,i){let r;(this.debug||this.trace_atn_sim)&&console.log("execATN decision "+t.decision+", DFA state "+e+", LA(1)=="+this.getLookaheadName(n)+" line "+n.LT(1).line+":"+n.LT(1).column);let o=e;this.debug&&console.log("s0 = "+e);let a=n.LA(1);for(;;){let e=this.getExistingTargetState(o,a);if(null===e&&(e=this.computeTargetState(t,o,a)),e===Gt.ERROR){const t=this.noViableAlt(n,i,o.configs,s);if(n.seek(s),r=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(o.configs,i),r!==Q.INVALID_ALT_NUMBER)return r;throw t}if(e.requiresFullContext&&this.predictionMode!==se.SLL){let o=null;if(null!==e.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");const t=n.index;if(t!==s&&n.seek(s),o=this.evalSemanticContext(e.predicates,i,!0),1===o.length)return this.debug&&console.log("Full LL avoided"),o.minValue();t!==s&&n.seek(t)}this.dfa_debug&&console.log("ctx sensitive state "+i+" in "+e);const l=!0,a=this.computeStartState(t.atnStartState,i,l);return this.reportAttemptingFullContext(t,o,e.configs,s,n.index),r=this.execATNWithFullContext(t,e,a,n,s,i),r}if(e.isAcceptState){if(null===e.predicates)return e.prediction;const r=n.index;n.seek(s);const o=this.evalSemanticContext(e.predicates,i,!0);if(0===o.length)throw this.noViableAlt(n,i,e.configs,s);return 1===o.length||this.reportAmbiguity(t,e,s,r,!1,o,e.configs),o.minValue()}o=e,a!==l.EOF&&(n.consume(),a=n.LA(1))}}getExistingTargetState(t,e){const n=t.edges;return null===n?null:n[e+1]||null}computeTargetState(t,e,n){const s=this.computeReachSet(e.configs,n,!1);if(null===s)return this.addDFAEdge(t,e,n,Gt.ERROR),Gt.ERROR;let i=new Yt(null,s);const r=this.getUniqueAlt(s);if(this.debug){const t=se.getConflictingAltSubsets(s);console.log("SLL altSubSets="+f(t)+", configs="+s+", predict="+r+", allSubsetsConflict="+se.allSubsetsConflict(t)+", conflictingAlts="+this.getConflictingAlts(s))}return r!==Q.INVALID_ALT_NUMBER?(i.isAcceptState=!0,i.configs.uniqueAlt=r,i.prediction=r):se.hasSLLConflictTerminatingPrediction(this.predictionMode,s)&&(i.configs.conflictingAlts=this.getConflictingAlts(s),i.requiresFullContext=!0,i.isAcceptState=!0,i.prediction=i.configs.conflictingAlts.minValue()),i.isAcceptState&&i.configs.hasSemanticContext&&(this.predicateDFAState(i,this.atn.getDecisionState(t.decision)),null!==i.predicates&&(i.prediction=Q.INVALID_ALT_NUMBER)),i=this.addDFAEdge(t,e,n,i),i}predicateDFAState(t,e){const n=e.transitions.length,s=this.getConflictingAltsOrUniqueAlt(t.configs),i=this.getPredsForAmbigAlts(s,t.configs,n);null!==i?(t.predicates=this.getPredicatePredictions(s,i),t.prediction=Q.INVALID_ALT_NUMBER):t.prediction=s.minValue()}execATNWithFullContext(t,e,n,s,i,r){(this.debug||this.trace_atn_sim)&&console.log("execATNWithFullContext "+n);let o,a=!1,h=n;s.seek(i);let c=s.LA(1),u=-1;for(;;){if(o=this.computeReachSet(h,c,!0),null===o){const t=this.noViableAlt(s,r,h,i);s.seek(i);const e=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(h,r);if(e!==Q.INVALID_ALT_NUMBER)return e;throw t}const t=se.getConflictingAltSubsets(o);if(this.debug&&console.log("LL altSubSets="+t+", predict="+se.getUniqueAlt(t)+", resolvesToJustOneViableAlt="+se.resolvesToJustOneViableAlt(t)),o.uniqueAlt=this.getUniqueAlt(o),o.uniqueAlt!==Q.INVALID_ALT_NUMBER){u=o.uniqueAlt;break}if(this.predictionMode!==se.LL_EXACT_AMBIG_DETECTION){if(u=se.resolvesToJustOneViableAlt(t),u!==Q.INVALID_ALT_NUMBER)break}else if(se.allSubsetsConflict(t)&&se.allSubsetsEqual(t)){a=!0,u=se.getSingleViableAlt(t);break}h=o,c!==l.EOF&&(s.consume(),c=s.LA(1))}return o.uniqueAlt!==Q.INVALID_ALT_NUMBER?(this.reportContextSensitivity(t,u,o,i,s.index),u):(this.reportAmbiguity(t,e,i,s.index,a,null,o),u)}computeReachSet(t,e,n){this.debug&&console.log("in computeReachSet, starting closure: "+t),null===this.mergeCache&&(this.mergeCache=new re);const s=new Kt(n);let i=null;for(let r=0;r<t.items.length;r++){const o=t.items[r];if(this.debug&&console.log("testing "+this.getTokenName(e)+" at "+o),o.state instanceof I)(n||e===l.EOF)&&(null===i&&(i=[]),i.push(o),this.debug_add&&console.log("added "+o+" to skippedStopStates"));else for(let t=0;t<o.state.transitions.length;t++){const n=o.state.transitions[t],i=this.getReachableTarget(n,e);if(null!==i){const t=new C({state:i},o);s.add(t,this.mergeCache),this.debug_add&&console.log("added "+t+" to intermediate")}}}let r=null;if(null===i&&e!==l.EOF&&(1===s.items.length||this.getUniqueAlt(s)!==Q.INVALID_ALT_NUMBER)&&(r=s),null===r){r=new Kt(n);const t=new x,i=e===l.EOF;for(let e=0;e<s.items.length;e++)this.closure(s.items[e],r,t,!1,n,i)}if(e===l.EOF&&(r=this.removeAllConfigsNotInRuleStopState(r,r===s)),!(null===i||n&&se.hasConfigInRuleStopState(r)))for(let t=0;t<i.length;t++)r.add(i[t],this.mergeCache);return this.trace_atn_sim&&console.log("computeReachSet "+t+" -> "+r),0===r.items.length?null:r}removeAllConfigsNotInRuleStopState(t,e){if(se.allConfigsInRuleStopStates(t))return t;const n=new Kt(t.fullCtx);for(let s=0;s<t.items.length;s++){const i=t.items[s];if(i.state instanceof I)n.add(i,this.mergeCache);else if(e&&i.state.epsilonOnlyTransitions&&this.atn.nextTokens(i.state).contains(l.EPSILON)){const t=this.atn.ruleToStopState[i.state.ruleIndex];n.add(new C({state:t},i),this.mergeCache)}}return n}computeStartState(t,e,n){const s=W(this.atn,e),i=new Kt(n);this.trace_atn_sim&&console.log("computeStartState from ATN state "+t+" initialContext="+s.toString(this.parser));for(let e=0;e<t.transitions.length;e++){const r=t.transitions[e].target,o=new C({state:r,alt:e+1,context:s},null),l=new x;this.closure(o,i,l,!0,n,!1)}return i}applyPrecedenceFilter(t){let e;const n=[],s=new Kt(t.fullCtx);for(let i=0;i<t.items.length;i++){if(e=t.items[i],1!==e.alt)continue;const r=e.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==r&&(n[e.state.stateNumber]=e.context,r!==e.semanticContext?s.add(new C({semanticContext:r},e),this.mergeCache):s.add(e,this.mergeCache))}for(let i=0;i<t.items.length;i++)if(e=t.items[i],1!==e.alt){if(!e.precedenceFilterSuppressed){const t=n[e.state.stateNumber]||null;if(null!==t&&t.equals(e.context))continue}s.add(e,this.mergeCache)}return s}getReachableTarget(t,e){return t.matches(e,0,this.atn.maxTokenType)?t.target:null}getPredsForAmbigAlts(t,e,n){let s=[];for(let n=0;n<e.items.length;n++){const i=e.items[n];t.get(i.alt)&&(s[i.alt]=T.orContext(s[i.alt]||null,i.semanticContext))}let i=0;for(let t=1;t<n+1;t++){const e=s[t]||null;null===e?s[t]=T.NONE:e!==T.NONE&&(i+=1)}return 0===i&&(s=null),this.debug&&console.log("getPredsForAmbigAlts result "+f(s)),s}getPredicatePredictions(t,e){const n=[];let s=!1;for(let i=1;i<e.length;i++){const r=e[i];null!==t&&t.get(i)&&n.push(new te(r,i)),r!==T.NONE&&(s=!0)}return s?n:null}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(t,e){const n=this.splitAccordingToSemanticValidity(t,e),s=n[0],i=n[1];let r=this.getAltThatFinishedDecisionEntryRule(s);return r!==Q.INVALID_ALT_NUMBER||i.items.length>0&&(r=this.getAltThatFinishedDecisionEntryRule(i),r!==Q.INVALID_ALT_NUMBER)?r:Q.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let n=0;n<t.items.length;n++){const s=t.items[n];(s.reachesIntoOuterContext>0||s.state instanceof I&&s.context.hasEmptyPath())&&e.indexOf(s.alt)<0&&e.push(s.alt)}return 0===e.length?Q.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const n=new Kt(t.fullCtx),s=new Kt(t.fullCtx);for(let i=0;i<t.items.length;i++){const r=t.items[i];r.semanticContext!==T.NONE?r.semanticContext.evaluate(this.parser,e)?n.add(r):s.add(r):n.add(r)}return[n,s]}evalSemanticContext(t,e,n){const s=new X;for(let i=0;i<t.length;i++){const r=t[i];if(r.pred===T.NONE){if(s.set(r.alt),!n)break;continue}const o=r.pred.evaluate(this.parser,e);if((this.debug||this.dfa_debug)&&console.log("eval pred "+r+"="+o),o&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+r.alt),s.set(r.alt),!n))break}return s}closure(t,e,n,s,i,r){this.closureCheckingStopState(t,e,n,s,i,0,r)}closureCheckingStopState(t,e,n,s,i,r,o){if((this.trace_atn_sim||this.debug_closure)&&console.log("closure("+t.toString(this.parser,!0)+")"),t.state instanceof I){if(!t.context.isEmpty()){for(let l=0;l<t.context.length;l++){if(t.context.getReturnState(l)===q.EMPTY_RETURN_STATE){if(i){e.add(new C({state:t.state,context:q.EMPTY},t),this.mergeCache);continue}this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex)),this.closure_(t,e,n,s,i,r,o);continue}const a=this.atn.states[t.context.getReturnState(l)],h=t.context.getParent(l),c={state:a,alt:t.alt,context:h,semanticContext:t.semanticContext},u=new C(c,null);u.reachesIntoOuterContext=t.reachesIntoOuterContext,this.closureCheckingStopState(u,e,n,s,i,r-1,o)}return}if(i)return void e.add(t,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex))}this.closure_(t,e,n,s,i,r,o)}closure_(t,e,n,s,i,r,o){const l=t.state;l.epsilonOnlyTransitions||e.add(t,this.mergeCache);for(let a=0;a<l.transitions.length;a++){if(0===a&&this.canDropLoopEntryEdgeInLeftRecursiveRule(t))continue;const h=l.transitions[a],c=s&&!(h instanceof pt),u=this.getEpsilonTarget(t,h,c,0===r,i,o);if(null!==u){let s=r;if(t.state instanceof I){if(null!==this._dfa&&this._dfa.precedenceDfa&&h.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(u.precedenceFilterSuppressed=!0),u.reachesIntoOuterContext+=1,n.getOrAdd(u)!==u)continue;e.dipsIntoOuterContext=!0,s-=1,this.debug&&console.log("dips into outer ctx: "+u)}else{if(!h.isEpsilon&&n.getOrAdd(u)!==u)continue;h instanceof L&&s>=0&&(s+=1)}this.closureCheckingStopState(u,e,n,c,i,s,o)}}}canDropLoopEntryEdgeInLeftRecursiveRule(t){const e=t.state;if(e.stateType!==N.STAR_LOOP_ENTRY)return!1;if(e.stateType!==N.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;const n=t.context.length;for(let s=0;s<n;s++)if(this.atn.states[t.context.getReturnState(s)].ruleIndex!==e.ruleIndex)return!1;const s=e.transitions[0].target.endState.stateNumber,i=this.atn.states[s];for(let s=0;s<n;s++){const n=t.context.getReturnState(s),r=this.atn.states[n];if(1!==r.transitions.length||!r.transitions[0].isEpsilon)return!1;const o=r.transitions[0].target;if(!(r.stateType===N.BLOCK_END&&o===e||r===i||o===i||o.stateType===N.BLOCK_END&&1===o.transitions.length&&o.transitions[0].isEpsilon&&o.transitions[0].target===e))return!1}return!0}getRuleName(t){return null!==this.parser&&t>=0?this.parser.ruleNames[t]:"<rule "+t+">"}getEpsilonTarget(t,e,n,s,i,r){switch(e.serializationType){case y.RULE:return this.ruleTransition(t,e);case y.PRECEDENCE:return this.precedenceTransition(t,e,n,s,i);case y.PREDICATE:return this.predTransition(t,e,n,s,i);case y.ACTION:return this.actionTransition(t,e);case y.EPSILON:return new C({state:e.target},t);case y.ATOM:case y.RANGE:case y.SET:return r&&e.matches(l.EOF,0,1)?new C({state:e.target},t):null;default:return null}}actionTransition(t,e){if(this.debug){const t=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+t)}return new C({state:e.target},t)}precedenceTransition(t,e,n,s,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+f(this.parser.getRuleInvocationStack())));let r=null;if(n&&s)if(i){const n=this._input.index;this._input.seek(this._startIndex);const s=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),s&&(r=new C({state:e.target},t))}else{const n=T.andContext(t.semanticContext,e.getPredicate());r=new C({state:e.target,semanticContext:n},t)}else r=new C({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}predTransition(t,e,n,s,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+f(this.parser.getRuleInvocationStack())));let r=null;if(n&&(e.isCtxDependent&&s||!e.isCtxDependent))if(i){const n=this._input.index;this._input.seek(this._startIndex);const s=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),s&&(r=new C({state:e.target},t))}else{const n=T.andContext(t.semanticContext,e.getPredicate());r=new C({state:e.target,semanticContext:n},t)}else r=new C({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}ruleTransition(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);const n=e.followState,s=K.create(t.context,n.stateNumber);return new C({state:e.target,context:s},t)}getConflictingAlts(t){const e=se.getConflictingAltSubsets(t);return se.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==Q.INVALID_ALT_NUMBER?(e=new X,e.set(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(t){if(t===l.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}getLookaheadName(t){return this.getTokenName(t.LA(1))}dumpDeadEndConfigs(t){console.log("dead end configs: ");const e=t.getDeadEndConfigs();for(let t=0;t<e.length;t++){const n=e[t];let s="no edges";if(n.state.transitions.length>0){const t=n.state.transitions[0];t instanceof dt?s="Atom "+this.getTokenName(t.label):t instanceof O&&(s=(t instanceof R?"~":"")+"Set "+t.set)}console.error(n.toString(this.parser,!0)+":"+s)}}noViableAlt(t,e,n,s){return new ie(this.parser,t,t.get(s),t.LT(1),n,e)}getUniqueAlt(t){let e=Q.INVALID_ALT_NUMBER;for(let n=0;n<t.items.length;n++){const s=t.items[n];if(e===Q.INVALID_ALT_NUMBER)e=s.alt;else if(s.alt!==e)return Q.INVALID_ALT_NUMBER}return e}addDFAEdge(t,e,n,s){if(this.debug&&console.log("EDGE "+e+" -> "+s+" upon "+this.getTokenName(n)),null===s)return null;if(s=this.addDFAState(t,s),null===e||n<-1||n>this.atn.maxTokenType)return s;if(null===e.edges&&(e.edges=[]),e.edges[n+1]=s,this.debug){const e=null===this.parser?null:this.parser.literalNames,n=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(e,n))}return s}addDFAState(t,e){if(e===Gt.ERROR)return e;const n=t.states.get(e);return null!==n?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),n):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}reportAttemptingFullContext(t,e,n,s,i){if(this.debug||this.retry_debug){const e=new A(s,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportAttemptingFullContext(this.parser,t,s,i,e,n)}reportContextSensitivity(t,e,n,s,i){if(this.debug||this.retry_debug){const e=new A(s,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportContextSensitivity(this.parser,t,s,i,e,n)}reportAmbiguity(t,e,n,s,i,r,o){if(this.debug||this.retry_debug){const t=new A(n,s+1);console.log("reportAmbiguity "+r+":"+o+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListener().reportAmbiguity(this.parser,t,n,s,i,r,o)}}class le{constructor(){this.cache=new G}add(t){if(t===q.EMPTY)return q.EMPTY;const e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}get(t){return this.cache.get(t)||null}get length(){return this.cache.length}}const ae={ATN:Q,ATNDeserializer:wt,LexerATNSimulator:Zt,ParserATNSimulator:oe,PredictionMode:se,PredictionContextCache:le};class he{constructor(t,e,n){this.dfa=t,this.literalNames=e||[],this.symbolicNames=n||[]}toString(){if(null===this.dfa.s0)return null;let t="";const e=this.dfa.sortedStates();for(let n=0;n<e.length;n++){const s=e[n];if(null!==s.edges){const e=s.edges.length;for(let n=0;n<e;n++){const e=s.edges[n]||null;null!==e&&2147483647!==e.stateNumber&&(t=t.concat(this.getStateString(s)),t=t.concat("-"),t=t.concat(this.getEdgeLabel(n)),t=t.concat("->"),t=t.concat(this.getStateString(e)),t=t.concat("\n"))}}}return 0===t.length?null:t}getEdgeLabel(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}getStateString(t){const e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+f(t.predicates):e+"=>"+t.prediction.toString():e}}class ce extends he{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class ue{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new x,this.s0=null,this.precedenceDfa=!1,t instanceof at&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new Yt(null,new Kt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}}getPrecedenceStartState(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}setPrecedenceStartState(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}setPrecedenceDfa(t){if(this.precedenceDfa!==t){if(this._states=new x,t){const t=new Yt(null,new Kt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=t}}sortedStates(){return this._states.values().sort(function(t,e){return t.stateNumber-e.stateNumber})}toString(t,e){return t=t||null,e=e||null,null===this.s0?"":new he(this,t,e).toString()}toLexerString(){return null===this.s0?"":new ce(this).toString()}get states(){return this._states}}const de={DFA:ue,DFASerializer:he,LexerDFASerializer:ce,PredPrediction:te},ge={PredictionContext:q},pe={Interval:A,IntervalSet:k};class fe{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class xe{visit(t){return Array.isArray(t)?t.map(function(t){return t.accept(this)},this):t.accept(this)}visitChildren(t){return t.children?this.visit(t.children):null}visitTerminal(t){}visitErrorNode(t){}}class Te{walk(t,e){if(e instanceof U||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof M)t.visitTerminal(e);else{this.enterRule(t,e);for(let n=0;n<e.getChildCount();n++){const s=e.getChild(n);this.walk(t,s)}this.exitRule(t,e)}}enterRule(t,e){const n=e.ruleContext;t.enterEveryRule(n),n.enterRule(t)}exitRule(t,e){const n=e.ruleContext;n.exitRule(t),t.exitEveryRule(n)}}Te.DEFAULT=new Te;const Se={Trees:V,RuleNode:F,ErrorNode:U,TerminalNode:M,ParseTreeListener:fe,ParseTreeVisitor:xe,ParseTreeWalker:Te};class me extends Bt{constructor(t){super({message:"",recognizer:t,input:t.getInputStream(),ctx:t._ctx}),this.offendingToken=t.getCurrentToken()}}class Ee extends Bt{constructor(t,e,n){super({message:_e(e,n||null),recognizer:t,input:t.getInputStream(),ctx:t._ctx});const s=t._interp.atn.states[t.state].transitions[0];s instanceof Tt?(this.ruleIndex=s.ruleIndex,this.predicateIndex=s.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=e,this.offendingToken=t.getCurrentToken()}}function _e(t,e){return null!==e?e:"failed predicate: {"+t+"}?"}class Ce extends vt{constructor(t){super(),t=t||!0,this.exactOnly=t}reportAmbiguity(t,e,n,s,i,r,o){if(this.exactOnly&&!i)return;const l="reportAmbiguity d="+this.getDecisionDescription(t,e)+": ambigAlts="+this.getConflictingAlts(r,o)+", input='"+t.getTokenStream().getText(new A(n,s))+"'";t.notifyErrorListeners(l)}reportAttemptingFullContext(t,e,n,s,i,r){const o="reportAttemptingFullContext d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new A(n,s))+"'";t.notifyErrorListeners(o)}reportContextSensitivity(t,e,n,s,i,r){const o="reportContextSensitivity d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new A(n,s))+"'";t.notifyErrorListeners(o)}getDecisionDescription(t,e){const n=e.decision,s=e.atnStartState.ruleIndex,i=t.ruleNames;if(s<0||s>=i.length)return""+n;const r=i[s]||null;return null===r||0===r.length?""+n:`${n} (${r})`}getConflictingAlts(t,e){if(null!==t)return t;const n=new X;for(let t=0;t<e.items.length;t++)n.set(e.items[t].alt);return`{${n.values().join(", ")}}`}}class Ae extends Error{constructor(){super(),Error.captureStackTrace(this,Ae)}}class ke{reset(t){}recoverInline(t){}recover(t,e){}sync(t){}inErrorRecoveryMode(t){}reportError(t){}}class Ne extends ke{constructor(){super(),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this.nextTokensContext=null,this.nextTokenState=0}reset(t){this.endErrorCondition(t)}beginErrorCondition(t){this.errorRecoveryMode=!0}inErrorRecoveryMode(t){return this.errorRecoveryMode}endErrorCondition(t){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1}reportMatch(t){this.endErrorCondition(t)}reportError(t,e){this.inErrorRecoveryMode(t)||(this.beginErrorCondition(t),e instanceof ie?this.reportNoViableAlternative(t,e):e instanceof me?this.reportInputMismatch(t,e):e instanceof Ee?this.reportFailedPredicate(t,e):(console.log("unknown recognition error type: "+e.constructor.name),console.log(e.stack),t.notifyErrorListeners(e.getOffendingToken(),e.getMessage(),e)))}recover(t,e){this.lastErrorIndex===t.getInputStream().index&&null!==this.lastErrorStates&&this.lastErrorStates.indexOf(t.state)>=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);const n=this.getErrorRecoverySet(t);this.consumeUntil(t,n)}sync(t){if(this.inErrorRecoveryMode(t))return;const e=t._interp.atn.states[t.state],n=t.getTokenStream().LA(1),s=t.atn.nextTokens(e);if(s.contains(n))return this.nextTokensContext=null,void(this.nextTokenState=N.INVALID_STATE_NUMBER);if(s.contains(l.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(e.stateType){case N.BLOCK_START:case N.STAR_BLOCK_START:case N.PLUS_BLOCK_START:case N.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new me(t);case N.PLUS_LOOP_BACK:case N.STAR_LOOP_BACK:{this.reportUnwantedToken(t);const e=new k;e.addSet(t.getExpectedTokens());const n=e.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,n)}}}reportNoViableAlternative(t,e){const n=t.getTokenStream();let s;s=null!==n?e.startToken.type===l.EOF?"<EOF>":n.getText(new A(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"<unknown input>";const i="no viable alternative at input "+this.escapeWSAndQuote(s);t.notifyErrorListeners(i,e.offendingToken,e)}reportInputMismatch(t,e){const n="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e.offendingToken,e)}reportFailedPredicate(t,e){const n="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(n,e.offendingToken,e)}reportUnwantedToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e,null)}reportMissingToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(n,e,null)}recoverInline(t){const e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new me(t)}singleTokenInsertion(t){const e=t.getTokenStream().LA(1),n=t._interp.atn,s=n.states[t.state].transitions[0].target;return!!n.nextTokens(s,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}singleTokenDeletion(t){const e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();const e=t.getCurrentToken();return this.reportMatch(t),e}return null}getMissingSymbol(t){const e=t.getCurrentToken(),n=this.getExpectedTokens(t).first();let s;s=n===l.EOF?"<missing EOF>":"<missing "+t.literalNames[n]+">";let i=e;const r=t.getTokenStream().LT(-1);return i.type===l.EOF&&null!==r&&(i=r),t.getTokenFactory().create(i.source,n,s,l.DEFAULT_CHANNEL,-1,-1,i.line,i.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===l.EOF?"<EOF>":"<"+t.type+">"),this.escapeWSAndQuote(e)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(t){const e=t._interp.atn;let n=t._ctx;const s=new k;for(;null!==n&&n.invokingState>=0;){const t=e.states[n.invokingState].transitions[0],i=e.nextTokens(t.followState);s.addSet(i),n=n.parentCtx}return s.removeOne(l.EPSILON),s}consumeUntil(t,e){let n=t.getTokenStream().LA(1);for(;n!==l.EOF&&!e.contains(n);)t.consume(),n=t.getTokenStream().LA(1)}}class Ie extends Ne{constructor(){super()}recover(t,e){let n=t._ctx;for(;null!==n;)n.exception=e,n=n.parentCtx;throw new Ae(e)}recoverInline(t){this.recover(t,new me(t))}sync(t){}}const ye={RecognitionException:Bt,NoViableAltException:ie,LexerNoViableAltException:Vt,InputMismatchException:me,FailedPredicateException:Ee,DiagnosticErrorListener:Ce,BailErrorStrategy:Ie,DefaultErrorStrategy:Ne,ErrorListener:vt};class Le{constructor(t,e){if(this.name="<empty>",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let t=0;t<this.strdata.length;){const e=this.strdata.codePointAt(t);this.data.push(e),t+=e<=65535?1:2}else{this.data=new Array(this.strdata.length);for(let t=0;t<this.strdata.length;t++)this.data[t]=this.strdata.charCodeAt(t)}this._size=this.data.length}reset(){this._index=0}consume(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1}LA(t){if(0===t)return 0;t<0&&(t+=1);const e=this._index+t-1;return e<0||e>=this._size?l.EOF:this.data[e]}LT(t){return this.LA(t)}mark(){return-1}release(t){}seek(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}getText(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){let n="";for(let s=t;s<=e;s++)n+=String.fromCodePoint(this.data[s]);return n}return this.strdata.slice(t,e+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Oe extends Le{constructor(t,e){super(t,e)}}var Re=r(763);const we="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class ve extends Oe{static fromPath(t,e,n){if(!we)throw new Error("FileStream is only available when running in Node!");Re.readFile(t,e,function(t,e){let s=null;null!==e&&(s=new Le(e,!0)),n(t,s)})}constructor(t,e,n){if(!we)throw new Error("FileStream is only available when running in Node!");super(Re.readFileSync(t,e||"utf-8"),n),this.fileName=t}}const be={fromString:function(t){return new Le(t,!0)},fromBlob:function(t,e,n,s){const i=new window.FileReader;i.onload=function(t){const e=new Le(t.target.result,!0);n(e)},i.onerror=s,i.readAsText(t,e)},fromBuffer:function(t,e){return new Le(t.toString(e),!0)},fromPath:function(t,e,n){ve.fromPath(t,e,n)},fromPathSync:function(t,e){return new ve(t,e)}},Pe={arrayToString:f,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}};class De{}class Fe extends De{constructor(t){super(),this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}mark(){return 0}release(t){}reset(){this.seek(0)}seek(t){this.lazyInit(),this.index=this.adjustSeekIndex(t)}get size(){return this.tokens.length}get(t){return this.lazyInit(),this.tokens[t]}consume(){let t=!1;if(t=this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length),!t&&this.LA(1)===l.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))}sync(t){const e=t-this.tokens.length+1;return!(e>0)||this.fetch(e)>=e}fetch(t){if(this.fetchedEOF)return 0;for(let e=0;e<t;e++){const t=this.tokenSource.nextToken();if(t.tokenIndex=this.tokens.length,this.tokens.push(t),t.type===l.EOF)return this.fetchedEOF=!0,e+1}return t}getTokens(t,e,n){if(void 0===n&&(n=null),t<0||e<0)return null;this.lazyInit();const s=[];e>=this.tokens.length&&(e=this.tokens.length-1);for(let i=t;i<e;i++){const t=this.tokens[i];if(t.type===l.EOF)break;(null===n||n.contains(t.type))&&s.push(t)}return s}LA(t){return this.LT(t).type}LB(t){return this.index-t<0?null:this.tokens[this.index-t]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);const e=this.index+t-1;return this.sync(e),e>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}adjustSeekIndex(t){return t}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(t,e){if(this.sync(t),t>=this.tokens.length)return-1;let n=this.tokens[t];for(;n.channel!==e;){if(n.type===l.EOF)return-1;t+=1,this.sync(t),n=this.tokens[t]}return t}previousTokenOnChannel(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}getHiddenTokensToRight(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.nextTokenOnChannel(t+1,zt.DEFAULT_TOKEN_CHANNEL),s=t+1,i=-1===n?this.tokens.length-1:n;return this.filterForChannel(s,i,e)}getHiddenTokensToLeft(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.previousTokenOnChannel(t-1,zt.DEFAULT_TOKEN_CHANNEL);if(n===t-1)return null;const s=n+1,i=t-1;return this.filterForChannel(s,i,e)}filterForChannel(t,e,n){const s=[];for(let i=t;i<e+1;i++){const t=this.tokens[i];-1===n?t.channel!==zt.DEFAULT_TOKEN_CHANNEL&&s.push(t):t.channel===n&&s.push(t)}return 0===s.length?null:s}getSourceName(){return this.tokenSource.getSourceName()}getText(t){this.lazyInit(),this.fill(),t||(t=new A(0,this.tokens.length-1));let e=t.start;e instanceof l&&(e=e.tokenIndex);let n=t.stop;if(n instanceof l&&(n=n.tokenIndex),null===e||null===n||e<0||n<0)return"";n>=this.tokens.length&&(n=this.tokens.length-1);let s="";for(let t=e;t<n+1;t++){const e=this.tokens[t];if(e.type===l.EOF)break;s+=e.text}return s}fill(){for(this.lazyInit();1e3===this.fetch(1e3););}}Object.defineProperty(Fe,"size",{get:function(){return this.tokens.length}});class Me extends Fe{constructor(t,e){super(t),this.channel=void 0===e?l.DEFAULT_CHANNEL:e}adjustSeekIndex(t){return this.nextTokenOnChannel(t,this.channel)}LB(t){if(0===t||this.index-t<0)return null;let e=this.index,n=1;for(;n<=t;)e=this.previousTokenOnChannel(e-1,this.channel),n+=1;return e<0?null:this.tokens[e]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);let e=this.index,n=1;for(;n<t;)this.sync(e+1)&&(e=this.nextTokenOnChannel(e+1,this.channel)),n+=1;return this.tokens[e]}getNumberOfOnChannelTokens(){let t=0;this.fill();for(let e=0;e<this.tokens.length;e++){const n=this.tokens[e];if(n.channel===this.channel&&(t+=1),n.type===l.EOF)break}return t}}class Ue extends fe{constructor(t){super(),this.parser=t}enterEveryRule(t){console.log("enter "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}visitTerminal(t){console.log("consume "+t.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}exitEveryRule(t){console.log("exit "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}}class Be extends Dt{constructor(t){super(),this._input=null,this._errHandler=new Ne,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(t)}reset(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()}match(t){let e=this.getCurrentToken();return e.type===t?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e}matchWildcard(){let t=this.getCurrentToken();return t.type>0?(this._errHandler.reportMatch(this),this.consume()):(t=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===t.tokenIndex&&this._ctx.addErrorNode(t)),t}getParseListeners(){return this._parseListeners||[]}addParseListener(t){if(null===t)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(t)}removeParseListener(t){if(null!==this._parseListeners){const e=this._parseListeners.indexOf(t);e>=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.forEach(function(e){e.enterEveryRule(t),t.enterRule(e)})}}triggerExitRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.slice(0).reverse().forEach(function(e){t.exitRule(e),e.exitEveryRule(t)})}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(t){this._input.tokenSource._factory=t}getATNWithBypassAlts(){const t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";let e=this.bypassAltsAtnCache[t];if(null===e){const n=new Et;n.generateRuleBypassTransitions=!0,e=new wt(n).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}getInputStream(){return this.getTokenStream()}setInputStream(t){this.setTokenStream(t)}getTokenStream(){return this._input}setTokenStream(t){this._input=null,this.reset(),this._input=t}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(t,e,n){n=n||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;const s=e.line,i=e.column;this.getErrorListener().syntaxError(this,e,s,i,t,n)}consume(){const t=this.getCurrentToken();t.type!==l.EOF&&this.getInputStream().consume();const e=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||e){let n;n=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t),n.invokingState=this.state,e&&this._parseListeners.forEach(function(t){n instanceof U||void 0!==n.isErrorNode&&n.isErrorNode()?t.visitErrorNode(n):n instanceof M&&t.visitTerminal(n)})}return t}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(t,e,n){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(t,e,n,s){this.state=e,this._precedenceStack.push(s),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(t,e,n){const s=this._ctx;s.parentCtx=t,s.invokingState=e,s.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=s.start,this.buildParseTrees&&this._ctx.addChild(s),this.triggerEnterRuleEvent()}unrollRecursionContexts(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const e=this._ctx,n=this.getParseListeners();if(null!==n&&n.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}getInvokingContext(t){let e=this._ctx;for(;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}precpred(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}inContext(t){return!1}isExpectedToken(t){const e=this._interp.atn;let n=this._ctx;const s=e.states[this.state];let i=e.nextTokens(s);if(i.contains(t))return!0;if(!i.contains(l.EPSILON))return!1;for(;null!==n&&n.invokingState>=0&&i.contains(l.EPSILON);){const s=e.states[n.invokingState].transitions[0];if(i=e.nextTokens(s.followState),i.contains(t))return!0;n=n.parentCtx}return!(!i.contains(l.EPSILON)||t!==l.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}getRuleIndex(t){const e=this.getRuleIndexMap()[t];return null!==e?e:-1}getRuleInvocationStack(t){null===(t=t||null)&&(t=this._ctx);const e=[];for(;null!==t;){const n=t.ruleIndex;n<0?e.push("n/a"):e.push(this.ruleNames[n]),t=t.parentCtx}return e}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let t=!1;for(let e=0;e<this._interp.decisionToDFA.length;e++){const n=this._interp.decisionToDFA[e];n.states.length>0&&(t&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),t=!0)}}getSourceName(){return this._input.getSourceName()}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Ue(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}Be.bypassAltsAtnCache={};class Ve extends M{constructor(t){super(),this.parentCtx=null,this.symbol=t}getChild(t){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return A.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new A(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===l.EOF?"<EOF>":this.symbol.text}}class ze extends Ve{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class qe extends z{constructor(t,e){super(t,e),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map(function(t){t instanceof ze&&(this.children.push(t),t.parentCtx=this)},this))}enterRule(t){}exitRule(t){}addChild(t){return null===this.children&&(this.children=[]),this.children.push(t),t}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(t){const e=new Ve(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new ze(t);return this.addChild(e),e.parentCtx=this,e}getChild(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(let n=0;n<this.children.length;n++){const s=this.children[n];if(s instanceof e){if(0===t)return s;t-=1}}return null}getToken(t,e){if(null===this.children||e<0||e>=this.children.length)return null;for(let n=0;n<this.children.length;n++){const s=this.children[n];if(s instanceof M&&s.symbol.type===t){if(0===e)return s;e-=1}}return null}getTokens(t){if(null===this.children)return[];{const e=[];for(let n=0;n<this.children.length;n++){const s=this.children[n];s instanceof M&&s.symbol.type===t&&e.push(s)}return e}}getTypedRuleContext(t,e){return this.getChild(e,t)}getTypedRuleContexts(t){if(null===this.children)return[];{const e=[];for(let n=0;n<this.children.length;n++){const s=this.children[n];s instanceof t&&e.push(s)}return e}}getChildCount(){return null===this.children?0:this.children.length}getSourceInterval(){return null===this.start||null===this.stop?A.INVALID_INTERVAL:new A(this.start.tokenIndex,this.stop.tokenIndex)}}z.EMPTY=new qe;class He{static DEFAULT_PROGRAM_NAME="default";constructor(t){this.tokens=t,this.programs=new Map}getTokenStream(){return this.tokens}insertAfter(t,e){let n,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(s),r=new Ge(this.tokens,n,i.length,e);i.push(r)}insertBefore(t,e){let n,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(s),r=new Ye(this.tokens,n,i.length,e);i.push(r)}replaceSingle(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,n)}replace(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:He.DEFAULT_PROGRAM_NAME;if("number"!=typeof t&&(t=t.tokenIndex),"number"!=typeof e&&(e=e.tokenIndex),t>e||t<0||e<0||e>=this.tokens.size)throw new RangeError(`replace: range invalid: ${t}..${e}(size=${this.tokens.size})`);let i=this.getProgram(s),r=new We(this.tokens,t,e,i.length,n);i.push(r)}delete(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He.DEFAULT_PROGRAM_NAME;void 0===e&&(e=t),this.replace(t,e,null,n)}getProgram(t){let e=this.programs.get(t);return null==e&&(e=this.initializeProgram(t)),e}initializeProgram(t){const e=[];return this.programs.set(t,e),e}getText(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:He.DEFAULT_PROGRAM_NAME;e=t instanceof A?t:new A(0,this.tokens.size-1),"string"==typeof t&&(n=t);const s=this.programs.get(n);let i=e.start,r=e.stop;if(r>this.tokens.size-1&&(r=this.tokens.size-1),i<0&&(i=0),null==s||0===s.length)return this.tokens.getText(new A(i,r));let o=[],a=this.reduceToSingleOperationPerIndex(s),h=i;for(;h<=r&&h<this.tokens.size;){let t=a.get(h);a.delete(h);let e=this.tokens.get(h);null==t?(e.type!==l.EOF&&o.push(String(e.text)),h++):h=t.execute(o)}if(r===this.tokens.size-1)for(const t of a.values())t.index>=this.tokens.size-1&&o.push(t.text.toString());return o.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;e<t.length;e++){let n=t[e];if(null==n)continue;if(!(n instanceof We))continue;let s=n,i=this.getKindOfOps(t,Ye,e);for(let e of i)e.index===s.index?(t[e.instructionIndex]=void 0,s.text=e.text.toString()+(null!=s.text?s.text.toString():"")):e.index>s.index&&e.index<=s.lastIndex&&(t[e.instructionIndex]=void 0);let r=this.getKindOfOps(t,We,e);for(let e of r){if(e.index>=s.index&&e.lastIndex<=s.lastIndex){t[e.instructionIndex]=void 0;continue}let n=e.lastIndex<s.index||e.index>s.lastIndex;if(null!=e.text||null!=s.text||n){if(!n)throw new Error(`replace op boundaries of ${s} overlap with previous ${e}`)}else t[e.instructionIndex]=void 0,s.index=Math.min(e.index,s.index),s.lastIndex=Math.max(e.lastIndex,s.lastIndex)}}for(let e=0;e<t.length;e++){let n=t[e];if(null==n)continue;if(!(n instanceof Ye))continue;let s=n,i=this.getKindOfOps(t,Ye,e);for(let e of i)e.index===s.index&&(e instanceof Ge?(s.text=this.catOpText(e.text,s.text),t[e.instructionIndex]=void 0):e instanceof Ye&&(s.text=this.catOpText(s.text,e.text),t[e.instructionIndex]=void 0));let r=this.getKindOfOps(t,We,e);for(let n of r)if(s.index!==n.index){if(s.index>=n.index&&s.index<=n.lastIndex)throw new Error(`insert op ${s} within boundaries of previous ${n}`)}else n.text=this.catOpText(s.text,n.text),t[e]=void 0}let e=new Map;for(let n of t)if(null!=n){if(null!=e.get(n.index))throw new Error("should only be one op per index");e.set(n.index,n)}return e}catOpText(t,e){let n="",s="";return null!=t&&(n=t.toString()),null!=e&&(s=e.toString()),n+s}getKindOfOps(t,e,n){return t.slice(0,n).filter(t=>t&&t instanceof e)}}class Ke{constructor(t,e,n,s){this.tokens=t,this.instructionIndex=n,this.index=e,this.text=void 0===s?"":s}toString(){let t=this.constructor.name;const e=t.indexOf("$");return t=t.substring(e+1,t.length),"<"+t+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class Ye extends Ke{constructor(t,e,n,s){super(t,e,n,s)}execute(t){return this.text&&t.push(this.text.toString()),this.tokens.get(this.index).type!==l.EOF&&t.push(String(this.tokens.get(this.index).text)),this.index+1}}class Ge extends Ye{constructor(t,e,n,s){super(t,e+1,n,s)}}class We extends Ke{constructor(t,e,n,s,i){super(t,e,s,i),this.lastIndex=n}execute(t){return this.text&&t.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}const je={atn:ae,dfa:de,context:ge,misc:pe,tree:Se,error:ye,Token:l,CommonToken:Ft,CharStreams:be,CharStream:Le,InputStream:Oe,CommonTokenStream:Me,Lexer:zt,Parser:Be,ParserRuleContext:qe,Interval:A,IntervalSet:k,LL1Analyzer:J,Utils:Pe,TokenStreamRewriter:He};var $e=o.Zo,Xe=o.jB,Je=o.pG,Qe=o.gw,Ze=o.Ay}}]);
|
|
Binary file
|
|
Binary file
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{EvaluateAmbientLighting as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PiUtils as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{
|
|
6
|
-
fragColor = vec4(cloudsOpacity * cloudsColor.rgb, cloudsColor.a);`),
|
|
5
|
+
import{EvaluateAmbientLighting as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PiUtils as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{Float3BindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as d}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ScreenSpacePassAtmosphere as a}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";function c(){const c=new g,{fragment:t}=c;return c.include(a,{needUVs:!1,needEyeDirection:!1}),t.include(l),c.include(e,{pbrMode:0,lightingSphericalHarmonicsOrder:2}),t.include(i),t.include(r),c.include(o),t.uniforms.add(new s("cameraPosition",e=>e.camera.eye),new n("cloudsOpacity",e=>e.clouds.opacity)).main.add(d`vec4 cloudsColor = renderClouds(normalize(worldRay), cameraPosition);
|
|
6
|
+
fragColor = vec4(cloudsOpacity * cloudsColor.rgb, cloudsColor.a);`),c}const t=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:"Module"}));export{t as C,c as b};
|