a3js 0.0.26 → 0.0.28
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/dist/a3js.cjs.js +132 -64
- package/dist/a3js.cjs.js.map +1 -1
- package/dist/a3js.es.js +5379 -4531
- package/dist/a3js.es.js.map +1 -1
- package/package.json +1 -1
package/dist/a3js.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var Ui=Object.create;var ln=Object.defineProperty;var Hi=Object.getOwnPropertyDescriptor;var ji=Object.getOwnPropertyNames;var qi=Object.getPrototypeOf,Ki=Object.prototype.hasOwnProperty;var zi=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ji(e))!Ki.call(n,i)&&i!==t&&ln(n,i,{get:()=>e[i],enumerable:!(r=Hi(e,i))||r.enumerable});return n};var Vi=(n,e,t)=>(t=n!=null?Ui(qi(n)):{},zi(e||!n||!n.__esModule?ln(t,"default",{value:n,enumerable:!0}):t,n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("three"),vn=require("fflate");function Yi(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const se=Yi(I);function kn(n){return typeof n=="string"}function $t(n){return n.isMesh===!0}function Wi(n){return n.type==="RoundedBoxGeometry"}function Ji(n){return n.type==="BoxGeometry"}function Xi(n){return n.type==="SphereGeometry"}function Zi(n){return n.type==="IcosahedronGeometry"}function $i(n){return n.type==="CylinderGeometry"}function er(n){return n.type==="CapsuleGeometry"}function tr(n){return n.isBone===!0}function nr(n){return n.isPerspectiveCamera===!0}class Ie{_x;_y;_z;get x(){return this._x}get y(){return this._y}get z(){return this._z}constructor(e,t,r){typeof e=="number"?(this._x=e,this._y=t,this._z=r):typeof e>"u"?this._x=this._y=this._z=0:(this._x=e.x,this._y=e.y,this._z=e.z)}clone(){return new Ie(this)}normalize(){const e=this._x*this._x+this._y*this._y+this._z*this._z,t=Math.sqrt(e);return t!==0?(this._x/=t,this._y/=t,this._z/=t):console.warn("Vec3.normalize."),this}negate(){return this._x*=-1,this._y*=-1,this._z*=-1,this}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)}set(e,t,r){return typeof e=="number"?(this._x=e,this._y=t,this._z=r):(this._x=e.x,this._y=e.y,this._z=e.z),this}add(e,t,r){return typeof e=="number"?(this._x+=e,this._y+=t,this._z+=r):(this._x+=e.x,this._y+=e.y,this._z+=e.z),this}sub(e,t,r){return typeof e=="number"?(this._x-=e,this._y-=t,this._z-=r):(this._x-=e.x,this._y-=e.y,this._z-=e.z),this}scale(e){return this._x*=e,this._y*=e,this._z*=e,this}cross(e,t){return this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this}apply(e,t,r,i){const s=new we;typeof e=="number"?s.set(e,t,r,i):s.set(e);const o=new we(this._x,this._y,this._z,0),c=new we(s).conjugate();return s.mul(o).mul(c),this._x=s.x,this._y=s.y,this._z=s.z,this}lerp(e,t,r){this._x=(1-r)*e.x+r*t.x,this._y=(1-r)*e.y+r*t.y,this._z=(1-r)*e.z+r*t.z}}class we{_x;_y;_z;_w;get x(){return this._x}get y(){return this._y}get z(){return this._z}get w(){return this._w}constructor(e,t,r,i){typeof e=="number"?(this._x=e,this._y=t,this._z=r,this._w=i):typeof e>"u"?(this._x=this._y=this._z=0,this._w=1):(this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w)}clone(){return new we(this)}normalize(){const e=this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w,t=Math.sqrt(e);return t!==0?(this._x/=t,this._y/=t,this._z/=t,this._w/=t):console.warn("Quat.normalize."),this}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this}set(e,t,r,i){return typeof e=="number"?(this._x=e,this._y=t,this._z=r,this._w=i):(this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w),this}mul(e,t,r,i){const s=new we(this),o=new we;return typeof e=="number"?o.set(e,t,r,i):o.set(e),this._x=s.w*o.x+s.x*o.w+s.y*o.z-s.z*o.y,this._y=s.w*o.y-s.x*o.z+s.y*o.w+s.z*o.x,this._z=s.w*o.z+s.x*o.y-s.y*o.x+s.z*o.w,this._w=s.w*o.w-s.x*o.x-s.y*o.y-s.z*o.z,this}lerp(e,t,r){this._x=(1-r)*e.x+r*t.x,this._y=(1-r)*e.y+r*t.y,this._z=(1-r)*e.z+r*t.z,this._w=(1-r)*e.w+r*t.w}slerp(e,t,r){if(r<0||r>1){console.warn("Quat.slerp(): t must be in [0,1]");return}const i=e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w;if(i<.9995){const s=Math.acos(i),o=Math.sin((1-r)*s)/Math.sin(s),c=Math.sin(r*s)/Math.sin(s);this._x=o*e.x+c*t.x,this._y=o*e.y+c*t.y,this._z=o*e.z+c*t.z,this._w=o*e.w+c*t.w}else{this._x=(1-r)*e.x+r*t.x,this._y=(1-r)*e.y+r*t.y,this._z=(1-r)*e.z+r*t.z,this._w=(1-r)*e.w+r*t.w;const s=Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w);s<1e-4?(console.warn("Quat.slerp(); ???!"),this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w):(this._x*=1/s,this._y*=1/s,this._z*=1/s,this._w*=1/s)}}}function lt(n,e,t){t.normalize();const r=e.clone().sub(n).normalize(),i=new Ie().cross(r,t).normalize(),s=new Ie().cross(i,r),o=i.x,c=s.x,A=-r.x,a=i.y,f=s.y,u=-r.y,b=i.z,d=s.z,E=-r.z,g=o+f+E;if(g>0){const l=Math.sqrt(g+1)*2;return new we((d-u)/l,(A-b)/l,(a-c)/l,.25*l)}else if(o>f&&o>E){const l=Math.sqrt(1+o-f-E)*2;return new we(.25*l,(c+a)/l,(A+b)/l,(d-u)/l)}else if(f>E){const l=Math.sqrt(1+f-o-E)*2;return new we((c+a)/l,.25*l,(u+d)/l,(A-b)/l)}else{const l=Math.sqrt(1+E-o-f)*2;return new we((A+b)/l,(u+d)/l,.25*l,(a-c)/l)}}function en(n,e="XYZ"){const t=new we(0,0,0,1);for(let r=0;r<3;r++)switch(e.charAt(r)){case"X":t.mul(new we(Math.sin(n.x),0,0,Math.cos(n.x)));break;case"Y":t.mul(new we(0,Math.sin(n.y),0,Math.cos(n.y)));break;case"Z":t.mul(new we(0,0,Math.sin(n.z),Math.cos(n.z)));break}return t}class Ke{loc;quat;scale;constructor(){this.loc=new Ie,this.quat=new we,this.scale=new Ie(1,1,1)}set(e){if(e instanceof Ke)this.loc.set(e.loc),this.quat.set(e.quat),this.scale.set(e.scale);else{const t=e.trans;this.loc.set(t.loc),this.quat.set(t.quat),this.scale.set(t.scale)}return this}write(e){e instanceof Me?(e.object.position.set(this.loc.x,this.loc.y,this.loc.z),e.object.quaternion.set(this.quat.x,this.quat.y,this.quat.z,this.quat.w),e.object.scale.set(this.scale.x,this.scale.y,this.scale.z)):(e.position.set(this.loc.x,this.loc.y,this.loc.z),e.quaternion.set(this.quat.x,this.quat.y,this.quat.z,this.quat.w),e.scale.set(this.scale.x,this.scale.y,this.scale.z))}blend(e,t){return this.loc.lerp(this.loc,e.loc,t),this.quat.slerp(this.quat,e.quat,t),this.scale.lerp(this.scale,e.scale,t),this}clone(){const e=new Ke;return e.set(this),e}}const qt={rigidBody:"dynamic",collider:"solid",meshCollider:"convex_hull",mass:1,friction:.5,restitution:.5,membership:1,filter:1,collisionDetection:!1};let Ue;const ut=new Map;class pt{static RAPIER;isInitialized=!1;constructor(){}async init(){if(!pt.RAPIER){const e=await import("@dimforge/rapier3d-compat");await e.init(),pt.RAPIER=e,Ue=e,this.isInitialized=!0}}createWorld(e){let t=.016666666666666666;this.isRapierWorldOption(e)&&(t=e.timestep);const r=new Ue.World(e.gravity);return new Sn(r,t)}isRapierWorldOption(e){return"timestep"in e}}class Sn{world;timestep;collisionEventQueue;constructor(e,t){this.world=e,this.timestep=t,this.collisionEventQueue=new Ue.EventQueue(!0),this.world.integrationParameters.dt=this.timestep}add(e){e.addOneselfToPhysics(this)}remove(e){e.removeOneselfFromPhysics(this)}update(e){const t=Math.ceil(e/this.timestep);for(let r=0;r<t;r++)this.world.step(this.collisionEventQueue)}getCollisions(){const e=[];return this.collisionEventQueue.drainCollisionEvents((t,r,i)=>{const s=ut.get(t),o=ut.get(r);s&&o&&e.push({objectA:s,partOfA:t,objectB:o,partOfB:r,started:i})}),e}}class un{objectA3;bodyDesc;body;colliderDescs;colliders;completeOption;constructor(e,t={}){this.objectA3=e,this.colliderDescs=[],this.colliders=[],this.completeOption={...qt,...t};const r=this.completeOption;switch(r.rigidBody){case"dynamic":this.bodyDesc=Ue.RigidBodyDesc.dynamic();break;case"kinematic":this.bodyDesc=Ue.RigidBodyDesc.kinematicPositionBased();break;case"fixed":this.bodyDesc=Ue.RigidBodyDesc.fixed();break}this.bodyDesc.setTranslation(e.loc.x,e.loc.y,e.loc.z),this.bodyDesc.setRotation({x:e.quat.x,y:e.quat.y,z:e.quat.z,w:e.quat.w});const i=[];e.object.traverse(o=>{if($t(o)){const c=or(o.geometry),A=r.membership<<16|r.filter;if(c)c.colliderDesc.setCollisionGroups(A),r.collisionDetection&&c.colliderDesc.setActiveEvents(Ue.ActiveEvents.COLLISION_EVENTS),this.colliderDescs.push(c.colliderDesc),c.colliderDesc.setRestitution(r.restitution).setFriction(r.friction),i.push(c.volume);else{let a,f;switch(r.meshCollider){case"tri_mesh":a=ir(o),f=hn(o.geometry);break;case"convex_hull":a=rr(o),f=hn(o.geometry);break}a&&(a.setCollisionGroups(A),r.collisionDetection&&a.setActiveEvents(Ue.ActiveEvents.COLLISION_EVENTS),this.colliderDescs.push(a),i.push(f))}}});let s=i.reduce((o,c)=>o+c,0);for(let o=0;o<this.colliderDescs.length;o++)this.colliderDescs[o].setRestitution(r.restitution),this.colliderDescs[o].setFriction(r.friction),this.colliderDescs[o].setMass(r.mass*(i[o]/s))}init(e){}addOneselfToPhysics(e){this.body=e.world.createRigidBody(this.bodyDesc),this.colliderDescs.forEach(t=>{const r=e.world.createCollider(t,this.body);this.colliders.push(r),ut.set(r.handle,this.objectA3)})}removeOneselfFromPhysics(e){this.body&&e.world.removeRigidBody(this.body),this.colliders.forEach(t=>{e.world.removeCollider(t,!1),ut.delete(t.handle)})}getTrans(e){this.body?(e.loc.set(this.body.translation()),e.quat.set(this.body.rotation())):(e.loc.set(this.bodyDesc.translation),e.quat.set(this.bodyDesc.rotation))}setLocation(e){}setLocationNow(e){this.body?this.body.setTranslation(e,!0):this.bodyDesc.setTranslation(e.x,e.y,e.z)}setQuat(e){}setQuatNow(e){this.body?this.body.setRotation(e,!0):this.bodyDesc.setRotation(e)}setScale(e){}setScaleNow(e){}update(e,t){if(this.body){const r=this.body.translation();t.loc.set(r.x,r.y,r.z);const i=this.body.rotation();t.quat.set(i.x,i.y,i.z,i.w)}}}function ir(n){let e=null;if($t(n)){const t=n;t.updateWorldMatrix(!0,!0);const r=t.geometry.clone();r.applyMatrix4(t.matrixWorld);const i=r.attributes.position.array;let s=r.index?r.index.array:null;if(s)s instanceof Uint32Array||(s=new Uint32Array(s));else{const o=r.attributes.position.count;s=new Uint32Array(o);for(let c=0;c<o;c++)s[c]=c}i instanceof Float32Array&&(e=Ue.ColliderDesc.trimesh(i,s))}return e}function rr(n){let e=null;if($t(n)){const t=n;t.updateWorldMatrix(!0,!0);const r=t.geometry.clone();r.applyMatrix4(t.matrixWorld);const i=r.attributes.position.array;i instanceof Float32Array&&(e=Ue.ColliderDesc.convexHull(i))}return e}function hn(n){const e=n.attributes.position;if(!e)throw new Error("position attribute not found");const t=n.index,r=e.array;let i=0;const s=new se.Vector3,o=new se.Vector3,c=new se.Vector3;if(t){const A=t.array;for(let a=0;a<A.length;a+=3){const f=A[a]*3,u=A[a+1]*3,b=A[a+2]*3;s.set(r[f],r[f+1],r[f+2]),o.set(r[u],r[u+1],r[u+2]),c.set(r[b],r[b+1],r[b+2]),i+=s.dot(o.clone().cross(c))}}else for(let A=0;A<r.length;A+=9)s.set(r[A],r[A+1],r[A+2]),o.set(r[A+3],r[A+4],r[A+5]),c.set(r[A+6],r[A+7],r[A+8]),i+=s.dot(o.clone().cross(c));return Math.abs(i)/6}function or(n){if(Wi(n)){const e=n.parameters,t=typeof e?.width=="number"?e.width/2:.5,r=typeof e?.height=="number"?e.height/2:.5,i=typeof e?.depth=="number"?e.depth/2:.5,s=.1;return{colliderDesc:Ue.ColliderDesc.roundCuboid(t-s,r-s,i-s,s),volume:2*t*2*r*2*i}}else if(Ji(n)){const e=n.parameters,t=typeof e?.width=="number"?e.width/2:.5,r=typeof e?.height=="number"?e.height/2:.5,i=typeof e?.depth=="number"?e.depth/2:.5;return{colliderDesc:Ue.ColliderDesc.cuboid(t,r,i),volume:2*t*2*r*2*i}}else if(Xi(n)){const e=n.parameters,t=typeof e?.radius=="number"?e.radius:1;return{colliderDesc:Ue.ColliderDesc.ball(t),volume:4/3*Math.PI*t*t*t}}else if(Zi(n)){const e=n.parameters,t=typeof e?.radius=="number"?e.radius:1;return{colliderDesc:Ue.ColliderDesc.ball(t),volume:4/3*Math.PI*t*t*t}}else if($i(n)){const e=n.parameters,t=typeof e?.radiusBottom=="number"?e.radiusBottom:.5,r=typeof e?.height=="number"?e.height:.5;return{colliderDesc:Ue.ColliderDesc.cylinder(r/2,t),volume:Math.PI*t*t*r}}else if(er(n)){const e=n.parameters,t=typeof e?.radius=="number"?e.radius:.5,r=typeof e?.height=="number"?e.height:.5;return{colliderDesc:Ue.ColliderDesc.capsule(r/2,t),volume:4/3*Math.PI*t*t*t+Math.PI*t*t*r}}return null}const Kt=new pt;async function sr(){await Kt.init()}class Ln{scene;objects;physicsWorld=null;physicsDt=1/60;collisionListener;rapierLines;constructor(){this.scene=new se.Scene,this.objects=[],Kt.isInitialized&&(this.physicsWorld=Kt.createWorld({gravity:{x:0,y:-9.81,z:0},timestep:this.physicsDt}))}add(e){if(this.scene.add(e.object),this.objects.push(e),e.scene=this,this.physicsWorld){e.rootMotion.addOneselfToPhysics(this.physicsWorld);for(const t of Object.values(e.poseMotions))t.addOneselfToPhysics(this.physicsWorld)}}remove(e){this.scene.remove(e.object);{const t=this.objects.indexOf(e);this.objects[t]=this.objects[this.objects.length-1],this.objects.pop()}if(e.scene=void 0,this.physicsWorld){e.rootMotion.removeOneselfFromPhysics(this.physicsWorld);for(const t of Object.values(e.poseMotions))t.removeOneselfFromPhysics(this.physicsWorld)}}setCollisionListener(e){this.collisionListener=e}update(e){if(this.physicsWorld){this.physicsWorld.update(e);const t=this.physicsWorld.getCollisions();if(t.forEach(r=>{r.objectA.handleCollision(r.objectB,r.started,r.partOfA,r.partOfB),r.objectB.handleCollision(r.objectA,r.started,r.partOfB,r.partOfA)}),this.collisionListener&&t.length>0&&this.collisionListener(t),this.rapierLines&&this.physicsWorld instanceof Sn){const{vertices:r,colors:i}=this.physicsWorld.world.debugRender();this.rapierLines.geometry.setAttribute("position",new se.BufferAttribute(r,3)),this.rapierLines.geometry.setAttribute("color",new se.BufferAttribute(i,4))}}for(const t of this.objects)t.update(e)}rapierDebug(e){e?(this.rapierLines=new se.LineSegments(new se.BufferGeometry,new se.LineBasicMaterial({vertexColors:!0})),this.scene.add(this.rapierLines)):this.rapierLines&&(this.scene.remove(this.rapierLines),this.rapierLines=void 0)}}class zt{nextTrans;constructor(){this.nextTrans=new Ke}init(e){this.nextTrans.set(e)}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}getTrans(e){e.set(this.nextTrans)}setLocation(e){this.nextTrans.loc.set(e)}setLocationNow(e){this.nextTrans.loc.set(e)}setQuat(e){this.nextTrans.quat.set(e)}setQuatNow(e){this.nextTrans.quat.set(e)}setScale(e){this.nextTrans.scale.set(e)}setScaleNow(e){this.nextTrans.scale.set(e)}update(e,t){return t.set(this.nextTrans),t}}class _n{firstTrans;nowTrans;lastTrans;nowTime;duration;constructor(){this.firstTrans=new Ke,this.nowTrans=new Ke,this.lastTrans=new Ke,this.nowTime=0,this.duration=1}init(e){this.firstTrans.set(e),this.nowTrans.set(e),this.lastTrans.set(e)}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}getTrans(e){e.set(this.nowTrans)}setLocation(e){this.firstTrans.set(this.nowTrans),this.lastTrans.loc.set(e),this.nowTime=0}setLocationNow(e){this.setLocation(e),this.nowTime=1}setQuat(e){this.firstTrans.set(this.nowTrans),this.lastTrans.quat.set(e),this.nowTime=0}setQuatNow(e){this.setQuat(e),this.nowTime=1}setScale(e){this.firstTrans.set(this.nowTrans),this.lastTrans.scale.set(e),this.nowTime=0}setScaleNow(e){this.setScale(e),this.nowTime=1}smoothstep(e){return e*e*(3-2*e)}update(e,t){this.nowTime+=e,this.nowTime>this.duration&&(this.nowTime=this.duration);const r=this.nowTime/this.duration,i=this.smoothstep(r);this.nowTrans.set(this.firstTrans),this.nowTrans.blend(this.lastTrans,i),t.set(this.nowTrans)}}const Ct=new Ie,Bt=new Ie;class ar{up;target;lastTrans;constructor(e){this.up=new Ie(0,1,0),this.target=e,this.lastTrans=new Ke}setTarget(e){this.target=e}init(e){e.upVector?this.up=e.upVector:this.up=Me.defaultUpVector,this.lastTrans.set(e)}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}getTrans(e){e.set(this.lastTrans)}setLocation(e){}setLocationNow(e){}setQuat(e){}setQuatNow(e){}setScale(e){}setScaleNow(e){}update(e,t){Ct.set(t.loc),Bt.set(this.target.trans.loc);const r=lt(Ct,Bt,this.up);t.quat.set(r),this.lastTrans.set(t)}}class Ar extends _n{up;target;constructor(e){super(),this.up=new Ie(0,1,0),this.target=e}init(e){super.init(e),e.upVector?this.up=e.upVector:this.up=Me.defaultUpVector}setQuat(e){}setQuatNow(e){}update(e,t){super.update(e,t),Ct.set(t.loc),Bt.set(this.target.trans.loc);const r=lt(Ct,Bt,this.up);t.quat.set(r),this.nowTrans.set(t)}}const it={v0:new Ie,v1:new Ie,v2:new Ie,v3:new Ie,v4:new Ie,q0:new we,q1:new we,q2:new we,q3:new we,q4:new we,t0:new Ke,t1:new Ke,t2:new Ke,t3:new Ke,t4:new Ke};function cr(n){return new Promise(e=>{setTimeout(()=>{e()},n)})}async function xn(n){const t=await(await fetch(n)).arrayBuffer(),r=await new Promise((i,s)=>{vn.unzip(new Uint8Array(t),(o,c)=>{o?s(o):i(c)})});return{zipUrl:n,unzipped:r}}function tn(n,e){if(e=e.replace(/^\.\//,"").replace(/^\//,""),n.unzipped[e])return vn.strFromU8(n.unzipped[e]);throw new Error(`readStringFromUnzippedA3(): no file at ${e}`)}function lr(n,e){if(e=e.replace(/^\.\//,"").replace(/^\//,""),n.unzipped[e]){const t=hr(e);return new Blob([new Uint8Array(n.unzipped[e])],{type:t})}else throw new Error(`readBlobFromUnzippedA3(): no file at ${e}`)}const ur={"image/png":/\.png$/i,"image/jpeg":/\.(jpg|jpeg)$/i,"image/gif":/\.gif$/i,"model/vrml":/\.wrl$/i,"application/xml":/\.xml$/i,"application/octet-stream":/\.bvh/i,"audio/x-wav":/\.wav/i,"audio/mpeg":/\.mp3/i,"audio/ogg":/\.ogg/i,"text/plain":/\.(txt|text)$/i,"model/gltf+json":/\.gltf$/i,"model/gltf-binary":/\.glb$/i};function hr(n){for(const[e,t]of Object.entries(ur))if(t.test(n))return e;return"application/octet-stream"}function Tt(n,e){if(!e)return n;const t={...n};for(const r in e)typeof n[r]=="object"&&typeof e[r]=="object"?t[r]=Tt(n[r],e[r]):t[r]=e[r];return t}class Me{static defaultRotationOrder="XYZ";static defaultUpVector=new Ie(0,1,0);rotationOrder;upVector;object;scene;balloon;rootMotion;poseMotions;statePoseMotion;emotePoseMotion;currentPoseMotion;parent;children=[];clickListener;skeletons;bones;morphs;morphsOverwrite;constructor(e){this.skeletons=[],this.bones={},this.morphs={},this.morphsOverwrite=!1,this.object=this.initObject(e),this.object.traverse(t=>{t.userData.a3js={objectA3:this}}),this.rootMotion=this.initRootMotion(e),this.poseMotions=this.initPoseMotions(e)}initRootMotion(e){return new zt}setRootMotion(e){this.rootMotion=e}getRootMotion(){return this.rootMotion}setRootMotionMode(e,t){if(e==="Default")this.setRootMotion(new zt);else if(e==="Interpolation")this.setRootMotion(new _n);else if(e==="Billboard")this.setRootMotion(new ar(t));else if(e==="InterpolationBillboard")this.setRootMotion(new Ar(t));else if(e==="SimplePhysics"){const r={...qt,...t};this.setRootMotion(new un(this,r))}}initPoseMotions(e){return{}}setPoseMotions(e){this.poseMotions=e}getPoseMotions(){return this.poseMotions}getPoseMotion(e){return this.poseMotions[e]}addPoseMotion(e,t){this.poseMotions[e]=t}removePoseMotion(e){const t=this.poseMotions[e];return delete this.poseMotions[e],t}setState(e){this.statePoseMotion=this.poseMotions[e],this.statePoseMotion&&(this.currentPoseMotion?.cleanup3D(this),this.statePoseMotion.prepare3D(this),this.statePoseMotion.playCount=0,this.statePoseMotion.time=0,this.currentPoseMotion=this.statePoseMotion)}setEmote(e){this.emotePoseMotion=this.poseMotions[e],this.emotePoseMotion&&(this.currentPoseMotion?.cleanup3D(this),this.emotePoseMotion.prepare3D(this),this.emotePoseMotion.playCount=0,this.emotePoseMotion.time=0,this.currentPoseMotion=this.emotePoseMotion)}setMorphsOverwrite(e){this.morphsOverwrite=e}morph(e,t){if(e in this.morphs){const{array:r,idx:i}=this.morphs[e];r[i]=t}}initSimplePhysics(e){const t={...qt,...e};this.rootMotion=new un(this,t),this.poseMotions={}}pose={};update(e){this.rootMotion.update(e,it.t0),it.t0.write(this);let t;if(this.emotePoseMotion&&this.emotePoseMotion.playCount<=0?(t=this.emotePoseMotion.update(e),this.emotePoseMotion.playCount>0&&(this.emotePoseMotion.cleanup3D(this),this.emotePoseMotion=void 0,this.statePoseMotion&&this.statePoseMotion.prepare3D(this))):this.statePoseMotion&&(t=this.statePoseMotion.update(e)),t&&this.bones)for(const[r,i]of Object.entries(t)){const s=this.bones[r];if(s&&(i.loc&&s.position.set(i.loc.x,i.loc.y,i.loc.z),i.quat&&s.quaternion.set(i.quat.x,i.quat.y,i.quat.z,i.quat.w),i.scale&&s.scale.set(i.scale.x,i.scale.y,i.scale.z)),!this.morphsOverwrite&&i.morphs){for(const o of i.morphs)for(const c of Object.keys(this.morphs))if(c.startsWith(o.name)){const{array:A}=this.morphs[c];for(let a=0;a<A.length;a++)A[a]=o.vals[a];break}}}this.object.updateMatrixWorld(!0),this.skeletons.forEach(r=>{r.update()}),this.children.forEach(r=>{r.update(e)})}add(e){if(e.scene){console.warn("ObjectA3.add(obj) is ignored.");return}if(e.parent){console.warn("ObjectA3.add(obj) is ignored.");return}this.children.push(e),e.parent=this,this.object.add(e.object)}remove(e){if(e.parent!==this){console.warn("ObjectA3.remove(obj) is ignored.");return}const t=this.children.indexOf(e);this.children.splice(t,1),e.parent=void 0,this.object.remove(e.object)}setBalloon(e){this.balloon?this.balloon.message=e:this.balloon=new fr(e)}setClickListener(e){this.clickListener=e}handleCollision(e,t,r,i){}async clicked(){this.clickListener&&await this.clickListener(this)}get trans(){return this.rootMotion.getTrans(it.t0),it.t0.clone()}get loc(){return this.trans.loc.clone()}setLocation(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):i.set(e),this.rootMotion.setLocation(i)}setLocationNow(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):i.set(e),this.rootMotion.setLocationNow(i)}get quat(){return this.trans.quat.clone()}setQuat(e,t,r,i){const s=new we;typeof e=="number"?s.set(e,t,r,i):s.set(e),this.rootMotion.setQuat(s)}setQuatNow(e,t,r,i){const s=new we;typeof e=="number"?s.set(e,t,r,i):s.set(e),this.rootMotion.setQuatNow(s)}get scale(){return this.trans.scale.clone()}setScale(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):i.set(e),this.rootMotion.setScale(i)}setScaleNow(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):i.set(e),this.rootMotion.setScaleNow(i)}setRotation(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):i.set(e),i.scale(Math.PI/360);const s=this.rotationOrder?this.rotationOrder:Me.defaultRotationOrder,o=en(i,s);this.setQuat(o)}setRotationNow(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):i.set(e);const s=this.rotationOrder?this.rotationOrder:Me.defaultRotationOrder,o=new we(0,0,0,1);for(let c=0;c<3;c++)switch(s.charAt(c)){case"X":o.mul(new we(Math.sin(i.x),0,0,Math.cos(i.x)));break;case"Y":o.mul(new we(0,Math.sin(i.y),0,Math.cos(i.y)));break;case"Z":o.mul(new we(0,0,Math.sin(i.z),Math.cos(i.z)));break}this.setQuatNow(o)}lookAt(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):e instanceof Me?i.set(e.loc):i.set(e);const s=this.upVector?this.upVector:Me.defaultUpVector,o=lt(this.loc,i,s);this.setQuat(o)}lookAtNow(e,t,r){const i=new Ie;typeof e=="number"?i.set(e,t,r):e instanceof Me?i.set(e.loc):i.set(e);const s=this.upVector?this.upVector:Me.defaultUpVector,o=lt(this.loc,i,s);this.setQuatNow(o)}getUnitVecX(){return new Ie(1,0,0).apply(this.object.quaternion)}getUnitVecY(){return new Ie(0,1,0).apply(this.object.quaternion)}getUnitVecZ(){return new Ie(0,0,1).apply(this.object.quaternion)}}class fr{message;dir;offsetTop;offsetRight;offsetLeft;offsetBottom;constructor(e){this.message=e,this.dir="RIGHT",this.offsetTop={x:0,y:2},this.offsetRight={x:1,y:1},this.offsetLeft={x:-1,y:1},this.offsetBottom={x:0,y:0}}}class Nn extends Me{controller;setController(e){this.controller=e}setLocation(e,t,r){const i=new Ie;typeof e=="number"?(super.setLocation(e,t,r),i.set(e,t,r)):(super.setLocation(e),i.set(e)),this.controller?.setCameraLocation(i)}}class Dn{view;constructor(e){this.view=e,e.setController(this)}update(e){}activate(){}deactivate(){}keyDown(e){}keyUp(e){}keyPress(e){}mouseDown(e){}mouseUp(e){}mouseMove(e){}mouseClick(e){}mouseEnter(e){}mouseLeave(e){}mouseWheel(e){}touchStart(e){}touchEnd(e){}touchMove(e){}touchCancel(e){}setCameraLocation(e){}setCameraLocationNow(e){}setCameraQuat(e){}setCameraQuatNow(e){}setCameraScale(e){}setCameraScaleNow(e){}}class On extends Dn{preMouse;leftClick=!1;target;cameraLoc=new Ie(0,0,3);cameraQuat=new we(0,0,0,1);constructor(e,t,r,i){super(e),this.preMouse={x:0,y:0},typeof t=="number"?this.target=new Ie(t,r,i):this.target=new Ie(t)}update(e){this.view.camera.setLocation(this.cameraLoc),this.view.camera.setQuat(this.cameraQuat)}mouseDown(e){e.button===0&&(this.leftClick=!0,this.preMouse.x=e.clientX,this.preMouse.y=e.clientY)}mouseMove(e){if(this.leftClick===!1)return;const t=.01,r=t*(e.clientX-this.preMouse.x),i=t*(e.clientY-this.preMouse.y),s=Math.sin(-r),o=Math.cos(-r),c=Math.sin(-i),A=Math.cos(-i),a=new Ie(1,0,0).apply(this.cameraQuat),f=new Ie(0,1,0).apply(this.cameraQuat),u=new we(a.x*c,a.y*c,a.z*c,A),b=new we(f.x*s,f.y*s,f.z*s,o),d=new Ie(this.cameraLoc);d.sub(this.target),d.apply(u),d.apply(b),d.add(this.target),this.cameraLoc.set(d);const E=lt(this.cameraLoc,this.target,new Ie(0,1,0));this.cameraQuat.set(E),this.preMouse.x=e.clientX,this.preMouse.y=e.clientY}mouseUp(e){e.button===0&&(this.leftClick=!1)}mouseWheel(e){const t=new Ie(this.target).sub(this.cameraLoc);e.deltaY>0?t.scale(.05):e.deltaY<0&&t.scale(-.05),this.cameraLoc.add(t)}setCameraLocation(e){this.cameraLoc.set(e)}setCameraLocationNow(e){this.cameraLoc.set(e)}}const dr={type:"audio",autoplay:!1,loop:!1,volume:1,positional:{refDistance:1,maxDistance:1e3,rolloffFactor:1,directional:{coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0}}};async function pr(){try{rt.listener.context.state!=="running"&&await rt.listener.context.resume()}catch{console.warn("AudioContext resume failed. Did you call on user gesture?")}}class rt extends Me{static listener=new se.AudioListener;static audioLoader=new se.AudioLoader;ready;config;sound;constructor(e,t={}){super(),this.config=Tt(dr,t),this.ready=this.asyncInit(e)}initObject(){return new se.Object3D}async asyncInit(e){if(this.config.type==="positional"){const t=new se.PositionalAudio(rt.listener);t.setRefDistance(this.config.positional.refDistance),t.setMaxDistance(this.config.positional.maxDistance),t.setRolloffFactor(this.config.positional.rolloffFactor);const r=this.config.positional.directional;t.setDirectionalCone(r.coneInnerAngle,r.coneOuterAngle,r.coneOuterGain),t.setVolume(this.config.volume),t.setLoop(this.config.loop),this.sound=t}else{const t=new se.Audio(rt.listener);t.setVolume(this.config.volume),t.setLoop(this.config.loop),this.sound=t}return this.object.add(this.sound),new Promise(t=>{rt.audioLoader.load(e,r=>{this.sound&&this.sound.setBuffer(r),t(this)})})}play(){this.sound?.play()}}class Fn{scene;camera;controller;constructor(e){this.scene=new Ln,this.camera=e,this.camera.setAudioListener(rt.listener),this.scene.scene.add(this.camera.object),this.camera.setLocation(0,0,3),this.controller=new On(this,0,0,0),this.camera.setController(this.controller)}replaceScene(e){this.scene.scene.remove(this.camera.object),e.scene.add(this.camera.object);const t=this.scene;return this.scene=e,t}updateScene(e){this.scene.update(e),this.controller?.update(e),this.camera.update(e)}setController(e){this.controller?.deactivate(),this.controller=e,this.controller.activate(),this.camera.setController(e)}worldToScreen(e){throw new Error("ViewBaseはworldToScreen()は実装していません")}screenToWorld(e,t,r){throw new Error("ViewBaseはscreenToWorld()は実装していません")}cameraToScreen(e){throw new Error("ViewBaseはcameraToScreen()は実装していません")}screenToCamera(e,t,r){throw new Error("ViewBaseはscreenToCamera()は実装していません")}}class gt extends Nn{camera;headLight;constructor(e){super(),this.camera=e,this.headLight=new se.SpotLight(16777215,1,0,Math.PI/3,0,0),this.headLight.rotation.x=3.14/2,this.object.add(this.camera),this.object.add(this.headLight)}initObject(){return new se.Object3D}setAudioListener(e){this.camera.add(e)}getHeadLight(){return this.headLight}setAspect(e){nr(this.camera)&&(this.camera.aspect=e,this.camera.updateProjectionMatrix())}setHeadLightEnable(e){e?this.headLight.intensity=1:this.headLight.intensity=0}calcNDC(e){const t=new se.Vector3(e.x,e.y,e.z);return t.project(this.camera),{x:t.x,y:t.y}}}class Mn extends I.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new I.Vector2(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element&&t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const at=new I.Vector3,fn=new I.Matrix4,dn=new I.Matrix4,pn=new I.Vector3,gn=new I.Vector3;class Pn{constructor(e={}){const t=this;let r,i,s,o;const c={objects:new WeakMap},A=e.element!==void 0?e.element:document.createElement("div");A.style.overflow="hidden",this.domElement=A,this.sortObjects=!0,this.getSize=function(){return{width:r,height:i}},this.render=function(E,g){E.matrixWorldAutoUpdate===!0&&E.updateMatrixWorld(),g.parent===null&&g.matrixWorldAutoUpdate===!0&&g.updateMatrixWorld(),fn.copy(g.matrixWorldInverse),dn.multiplyMatrices(g.projectionMatrix,fn),f(E,E,g),this.sortObjects&&d(E)},this.setSize=function(E,g){r=E,i=g,s=r/2,o=i/2,A.style.width=E+"px",A.style.height=g+"px"};function a(E){E.isCSS2DObject&&(E.element.style.display="none");for(let g=0,l=E.children.length;g<l;g++)a(E.children[g])}function f(E,g,l){if(E.visible===!1){a(E);return}if(E.isCSS2DObject){at.setFromMatrixPosition(E.matrixWorld),at.applyMatrix4(dn);const h=at.z>=-1&&at.z<=1&&E.layers.test(l.layers)===!0,p=E.element;p.style.display=h===!0?"":"none",h===!0&&(E.onBeforeRender(t,g,l),p.style.transform="translate("+-100*E.center.x+"%,"+-100*E.center.y+"%)translate("+(at.x*s+s)+"px,"+(-at.y*o+o)+"px)",p.parentNode!==A&&A.appendChild(p),E.onAfterRender(t,g,l));const C={distanceToCameraSquared:u(l,E)};c.objects.set(E,C)}for(let h=0,p=E.children.length;h<p;h++)f(E.children[h],g,l)}function u(E,g){return pn.setFromMatrixPosition(E.matrixWorld),gn.setFromMatrixPosition(g.matrixWorld),pn.distanceToSquared(gn)}function b(E){const g=[];return E.traverseVisible(function(l){l.isCSS2DObject&&g.push(l)}),g}function d(E){const g=b(E).sort(function(h,p){if(h.renderOrder!==p.renderOrder)return p.renderOrder-h.renderOrder;const C=c.objects.get(h).distanceToCameraSquared,m=c.objects.get(p).distanceToCameraSquared;return C-m}),l=g.length;for(let h=0,p=g.length;h<p;h++)g[h].element.style.zIndex=l-h}}}function En(n,e){if(e===I.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===I.TriangleFanDrawMode||e===I.TriangleStripDrawMode){let t=n.getIndex();if(t===null){const o=[],c=n.getAttribute("position");if(c!==void 0){for(let A=0;A<c.count;A++)o.push(A);n.setIndex(o),t=n.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),n}const r=t.count-2,i=[];if(e===I.TriangleFanDrawMode)for(let o=1;o<=r;o++)i.push(t.getX(0)),i.push(t.getX(o)),i.push(t.getX(o+1));else for(let o=0;o<r;o++)o%2===0?(i.push(t.getX(o)),i.push(t.getX(o+1)),i.push(t.getX(o+2))):(i.push(t.getX(o+2)),i.push(t.getX(o+1)),i.push(t.getX(o)));i.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=n.clone();return s.setIndex(i),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),n}class Gn extends I.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new br(t)}),this.register(function(t){return new Cr(t)}),this.register(function(t){return new Sr(t)}),this.register(function(t){return new Lr(t)}),this.register(function(t){return new _r(t)}),this.register(function(t){return new yr(t)}),this.register(function(t){return new Tr(t)}),this.register(function(t){return new Rr(t)}),this.register(function(t){return new Qr(t)}),this.register(function(t){return new mr(t)}),this.register(function(t){return new wr(t)}),this.register(function(t){return new Br(t)}),this.register(function(t){return new kr(t)}),this.register(function(t){return new vr(t)}),this.register(function(t){return new Er(t)}),this.register(function(t){return new xr(t)}),this.register(function(t){return new Nr(t)})}load(e,t,r,i){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const a=I.LoaderUtils.extractUrlBase(e);o=I.LoaderUtils.resolveURL(a,this.path)}else o=I.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const c=function(a){i?i(a):console.error(a),s.manager.itemError(e),s.manager.itemEnd(e)},A=new I.FileLoader(this.manager);A.setPath(this.path),A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(e,function(a){try{s.parse(a,o,function(f){t(f),s.manager.itemEnd(e)},c)}catch(f){c(f)}},r,c)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,r,i){let s;const o={},c={},A=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(A.decode(new Uint8Array(e,0,4))===Un){try{o[ye.KHR_BINARY_GLTF]=new Dr(e)}catch(u){i&&i(u);return}s=JSON.parse(o[ye.KHR_BINARY_GLTF].content)}else s=JSON.parse(A.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const a=new Yr(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});a.fileLoader.setRequestHeader(this.requestHeader);for(let f=0;f<this.pluginCallbacks.length;f++){const u=this.pluginCallbacks[f](a);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),c[u.name]=u,o[u.name]=!0}if(s.extensionsUsed)for(let f=0;f<s.extensionsUsed.length;++f){const u=s.extensionsUsed[f],b=s.extensionsRequired||[];switch(u){case ye.KHR_MATERIALS_UNLIT:o[u]=new Ir;break;case ye.KHR_DRACO_MESH_COMPRESSION:o[u]=new Or(s,this.dracoLoader);break;case ye.KHR_TEXTURE_TRANSFORM:o[u]=new Fr;break;case ye.KHR_MESH_QUANTIZATION:o[u]=new Mr;break;default:b.indexOf(u)>=0&&c[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}a.setExtensions(o),a.setPlugins(c),a.parse(r,i)}parseAsync(e,t){const r=this;return new Promise(function(i,s){r.parse(e,t,i,s)})}}function gr(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const ye={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Er{constructor(e){this.parser=e,this.name=ye.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let r=0,i=t.length;r<i;r++){const s=t[r];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,r="light:"+e;let i=t.cache.get(r);if(i)return i;const s=t.json,A=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let a;const f=new I.Color(16777215);A.color!==void 0&&f.setRGB(A.color[0],A.color[1],A.color[2],I.LinearSRGBColorSpace);const u=A.range!==void 0?A.range:0;switch(A.type){case"directional":a=new I.DirectionalLight(f),a.target.position.set(0,0,-1),a.add(a.target);break;case"point":a=new I.PointLight(f),a.distance=u;break;case"spot":a=new I.SpotLight(f),a.distance=u,A.spot=A.spot||{},A.spot.innerConeAngle=A.spot.innerConeAngle!==void 0?A.spot.innerConeAngle:0,A.spot.outerConeAngle=A.spot.outerConeAngle!==void 0?A.spot.outerConeAngle:Math.PI/4,a.angle=A.spot.outerConeAngle,a.penumbra=1-A.spot.innerConeAngle/A.spot.outerConeAngle,a.target.position.set(0,0,-1),a.add(a.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+A.type)}return a.position.set(0,0,0),Ze(a,A),A.intensity!==void 0&&(a.intensity=A.intensity),a.name=t.createUniqueName(A.name||"light_"+e),i=Promise.resolve(a),t.cache.add(r,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,r=this.parser,s=r.json.nodes[e],c=(s.extensions&&s.extensions[this.name]||{}).light;return c===void 0?null:this._loadLight(c).then(function(A){return r._getNodeRef(t.cache,c,A)})}}class Ir{constructor(){this.name=ye.KHR_MATERIALS_UNLIT}getMaterialType(){return I.MeshBasicMaterial}extendParams(e,t,r){const i=[];e.color=new I.Color(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],I.LinearSRGBColorSpace),e.opacity=o[3]}s.baseColorTexture!==void 0&&i.push(r.assignTexture(e,"map",s.baseColorTexture,I.SRGBColorSpace))}return Promise.all(i)}}class mr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=i.extensions[this.name].emissiveStrength;return s!==void 0&&(t.emissiveIntensity=s),Promise.resolve()}}class br{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(r.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(r.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(r.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const c=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new I.Vector2(c,c)}return Promise.all(s)}}class Cr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_DISPERSION}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=i.extensions[this.name];return t.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class Br{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(r.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(r.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class yr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_SHEEN}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new I.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=i.extensions[this.name];if(o.sheenColorFactor!==void 0){const c=o.sheenColorFactor;t.sheenColor.setRGB(c[0],c[1],c[2],I.LinearSRGBColorSpace)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(r.assignTexture(t,"sheenColorMap",o.sheenColorTexture,I.SRGBColorSpace)),o.sheenRoughnessTexture!==void 0&&s.push(r.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class Tr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(r.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class Rr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_VOLUME}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(r.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const c=o.attenuationColor||[1,1,1];return t.attenuationColor=new I.Color().setRGB(c[0],c[1],c[2],I.LinearSRGBColorSpace),Promise.all(s)}}class Qr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_IOR}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=i.extensions[this.name];return t.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class wr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_SPECULAR}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(r.assignTexture(t,"specularIntensityMap",o.specularTexture));const c=o.specularColorFactor||[1,1,1];return t.specularColor=new I.Color().setRGB(c[0],c[1],c[2],I.LinearSRGBColorSpace),o.specularColorTexture!==void 0&&s.push(r.assignTexture(t,"specularColorMap",o.specularColorTexture,I.SRGBColorSpace)),Promise.all(s)}}class vr{constructor(e){this.parser=e,this.name=ye.EXT_MATERIALS_BUMP}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(r.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class kr{constructor(e){this.parser=e,this.name=ye.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const r=this.parser.json.materials[e];return!r.extensions||!r.extensions[this.name]?null:I.MeshPhysicalMaterial}extendMaterialParams(e,t){const r=this.parser,i=r.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const s=[],o=i.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(r.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class Sr{constructor(e){this.parser=e,this.name=ye.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,r=t.json,i=r.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const s=i.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class Lr{constructor(e){this.parser=e,this.name=ye.EXT_TEXTURE_WEBP}loadTexture(e){const t=this.name,r=this.parser,i=r.json,s=i.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],c=i.images[o.source];let A=r.textureLoader;if(c.uri){const a=r.options.manager.getHandler(c.uri);a!==null&&(A=a)}return r.loadTextureImage(e,o.source,A)}}class _r{constructor(e){this.parser=e,this.name=ye.EXT_TEXTURE_AVIF}loadTexture(e){const t=this.name,r=this.parser,i=r.json,s=i.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],c=i.images[o.source];let A=r.textureLoader;if(c.uri){const a=r.options.manager.getHandler(c.uri);a!==null&&(A=a)}return r.loadTextureImage(e,o.source,A)}}class xr{constructor(e){this.name=ye.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,r=t.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],s=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(c){const A=i.byteOffset||0,a=i.byteLength||0,f=i.count,u=i.byteStride,b=new Uint8Array(c,A,a);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(f,u,b,i.mode,i.filter).then(function(d){return d.buffer}):o.ready.then(function(){const d=new ArrayBuffer(f*u);return o.decodeGltfBuffer(new Uint8Array(d),f,u,b,i.mode,i.filter),d})})}else return null}}class Nr{constructor(e){this.name=ye.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,r=t.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=t.meshes[r.mesh];for(const a of i.primitives)if(a.mode!==Ye.TRIANGLES&&a.mode!==Ye.TRIANGLE_STRIP&&a.mode!==Ye.TRIANGLE_FAN&&a.mode!==void 0)return null;const o=r.extensions[this.name].attributes,c=[],A={};for(const a in o)c.push(this.parser.getDependency("accessor",o[a]).then(f=>(A[a]=f,A[a])));return c.length<1?null:(c.push(this.parser.createNodeMesh(e)),Promise.all(c).then(a=>{const f=a.pop(),u=f.isGroup?f.children:[f],b=a[0].count,d=[];for(const E of u){const g=new I.Matrix4,l=new I.Vector3,h=new I.Quaternion,p=new I.Vector3(1,1,1),C=new I.InstancedMesh(E.geometry,E.material,b);for(let m=0;m<b;m++)A.TRANSLATION&&l.fromBufferAttribute(A.TRANSLATION,m),A.ROTATION&&h.fromBufferAttribute(A.ROTATION,m),A.SCALE&&p.fromBufferAttribute(A.SCALE,m),C.setMatrixAt(m,g.compose(l,h,p));for(const m in A)if(m==="_COLOR_0"){const y=A[m];C.instanceColor=new I.InstancedBufferAttribute(y.array,y.itemSize,y.normalized)}else m!=="TRANSLATION"&&m!=="ROTATION"&&m!=="SCALE"&&E.geometry.setAttribute(m,A[m]);I.Object3D.prototype.copy.call(C,E),this.parser.assignFinalMaterial(C),d.push(C)}return f.isGroup?(f.clear(),f.add(...d),f):d[0]}))}}const Un="glTF",ht=12,In={JSON:1313821514,BIN:5130562};class Dr{constructor(e){this.name=ye.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,ht),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Un)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-ht,s=new DataView(e,ht);let o=0;for(;o<i;){const c=s.getUint32(o,!0);o+=4;const A=s.getUint32(o,!0);if(o+=4,A===In.JSON){const a=new Uint8Array(e,ht+o,c);this.content=r.decode(a)}else if(A===In.BIN){const a=ht+o;this.body=e.slice(a,a+c)}o+=c}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Or{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=ye.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const r=this.json,i=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,c={},A={},a={};for(const f in o){const u=Vt[f]||f.toLowerCase();c[u]=o[f]}for(const f in e.attributes){const u=Vt[f]||f.toLowerCase();if(o[f]!==void 0){const b=r.accessors[e.attributes[f]],d=ct[b.componentType];a[u]=d.name,A[u]=b.normalized===!0}}return t.getDependency("bufferView",s).then(function(f){return new Promise(function(u,b){i.decodeDracoFile(f,function(d){for(const E in d.attributes){const g=d.attributes[E],l=A[E];l!==void 0&&(g.normalized=l)}u(d)},c,a,I.LinearSRGBColorSpace,b)})})}}class Fr{constructor(){this.name=ye.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class Mr{constructor(){this.name=ye.KHR_MESH_QUANTIZATION}}class Hn extends I.Interpolant{constructor(e,t,r,i){super(e,t,r,i)}copySampleValue_(e){const t=this.resultBuffer,r=this.sampleValues,i=this.valueSize,s=e*i*3+i;for(let o=0;o!==i;o++)t[o]=r[s+o];return t}interpolate_(e,t,r,i){const s=this.resultBuffer,o=this.sampleValues,c=this.valueSize,A=c*2,a=c*3,f=i-t,u=(r-t)/f,b=u*u,d=b*u,E=e*a,g=E-a,l=-2*d+3*b,h=d-b,p=1-l,C=h-b+u;for(let m=0;m!==c;m++){const y=o[g+m+c],v=o[g+m+A]*f,S=o[E+m+c],U=o[E+m]*f;s[m]=p*y+C*v+l*S+h*U}return s}}const Pr=new I.Quaternion;class Gr extends Hn{interpolate_(e,t,r,i){const s=super.interpolate_(e,t,r,i);return Pr.fromArray(s).normalize().toArray(s),s}}const Ye={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},ct={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},mn={9728:I.NearestFilter,9729:I.LinearFilter,9984:I.NearestMipmapNearestFilter,9985:I.LinearMipmapNearestFilter,9986:I.NearestMipmapLinearFilter,9987:I.LinearMipmapLinearFilter},bn={33071:I.ClampToEdgeWrapping,33648:I.MirroredRepeatWrapping,10497:I.RepeatWrapping},Lt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Vt={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},nt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Ur={CUBICSPLINE:void 0,LINEAR:I.InterpolateLinear,STEP:I.InterpolateDiscrete},_t={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Hr(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new I.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:I.FrontSide})),n.DefaultMaterial}function ot(n,e,t){for(const r in t.extensions)n[r]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[r]=t.extensions[r])}function Ze(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function jr(n,e,t){let r=!1,i=!1,s=!1;for(let a=0,f=e.length;a<f;a++){const u=e[a];if(u.POSITION!==void 0&&(r=!0),u.NORMAL!==void 0&&(i=!0),u.COLOR_0!==void 0&&(s=!0),r&&i&&s)break}if(!r&&!i&&!s)return Promise.resolve(n);const o=[],c=[],A=[];for(let a=0,f=e.length;a<f;a++){const u=e[a];if(r){const b=u.POSITION!==void 0?t.getDependency("accessor",u.POSITION):n.attributes.position;o.push(b)}if(i){const b=u.NORMAL!==void 0?t.getDependency("accessor",u.NORMAL):n.attributes.normal;c.push(b)}if(s){const b=u.COLOR_0!==void 0?t.getDependency("accessor",u.COLOR_0):n.attributes.color;A.push(b)}}return Promise.all([Promise.all(o),Promise.all(c),Promise.all(A)]).then(function(a){const f=a[0],u=a[1],b=a[2];return r&&(n.morphAttributes.position=f),i&&(n.morphAttributes.normal=u),s&&(n.morphAttributes.color=b),n.morphTargetsRelative=!0,n})}function qr(n,e){if(n.updateMorphTargets(),e.weights!==void 0)for(let t=0,r=e.weights.length;t<r;t++)n.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(n.morphTargetInfluences.length===t.length){n.morphTargetDictionary={};for(let r=0,i=t.length;r<i;r++)n.morphTargetDictionary[t[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Kr(n){let e;const t=n.extensions&&n.extensions[ye.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+xt(t.attributes):e=n.indices+":"+xt(n.attributes)+":"+n.mode,n.targets!==void 0)for(let r=0,i=n.targets.length;r<i;r++)e+=":"+xt(n.targets[r]);return e}function xt(n){let e="";const t=Object.keys(n).sort();for(let r=0,i=t.length;r<i;r++)e+=t[r]+":"+n[t[r]]+";";return e}function Yt(n){switch(n){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function zr(n){return n.search(/\.jpe?g($|\?)/i)>0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":n.search(/\.ktx2($|\?)/i)>0||n.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const Vr=new I.Matrix4;class Yr{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new gr,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=-1,s=!1,o=-1;if(typeof navigator<"u"){const c=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(c)===!0;const A=c.match(/Version\/(\d+)/);i=r&&A?parseInt(A[1],10):-1,s=c.indexOf("Firefox")>-1,o=s?c.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&i<17||s&&o<98?this.textureLoader=new I.TextureLoader(this.options.manager):this.textureLoader=new I.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new I.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const r=this,i=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(o){const c={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:r,userData:{}};return ot(s,c,i),Ze(c,i),Promise.all(r._invokeAll(function(A){return A.afterRoot&&A.afterRoot(c)})).then(function(){for(const A of c.scenes)A.updateMatrixWorld();e(c)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],r=this.json.meshes||[];for(let i=0,s=t.length;i<s;i++){const o=t[i].joints;for(let c=0,A=o.length;c<A;c++)e[o[c]].isBone=!0}for(let i=0,s=e.length;i<s;i++){const o=e[i];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(r[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,r){if(e.refs[t]<=1)return r;const i=r.clone(),s=(o,c)=>{const A=this.associations.get(o);A!=null&&this.associations.set(c,A);for(const[a,f]of o.children.entries())s(f,c.children[a])};return s(r,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let r=0;r<t.length;r++){const i=e(t[r]);if(i)return i}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const r=[];for(let i=0;i<t.length;i++){const s=e(t[i]);s&&r.push(s)}return r}getDependency(e,t){const r=e+":"+t;let i=this.cache.get(r);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":i=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(r,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){const r=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(s,o){return r.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],r=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[ye.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(s,o){r.load(I.LoaderUtils.resolveURL(t.uri,i.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(r){const i=t.byteLength||0,s=t.byteOffset||0;return r.slice(s,s+i)})}loadAccessor(e){const t=this,r=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){const o=Lt[i.type],c=ct[i.componentType],A=i.normalized===!0,a=new c(i.count*o);return Promise.resolve(new I.BufferAttribute(a,o,A))}const s=[];return i.bufferView!==void 0?s.push(this.getDependency("bufferView",i.bufferView)):s.push(null),i.sparse!==void 0&&(s.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(s).then(function(o){const c=o[0],A=Lt[i.type],a=ct[i.componentType],f=a.BYTES_PER_ELEMENT,u=f*A,b=i.byteOffset||0,d=i.bufferView!==void 0?r.bufferViews[i.bufferView].byteStride:void 0,E=i.normalized===!0;let g,l;if(d&&d!==u){const h=Math.floor(b/d),p="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+h+":"+i.count;let C=t.cache.get(p);C||(g=new a(c,h*d,i.count*d/f),C=new I.InterleavedBuffer(g,d/f),t.cache.add(p,C)),l=new I.InterleavedBufferAttribute(C,A,b%d/f,E)}else c===null?g=new a(i.count*A):g=new a(c,b,i.count*A),l=new I.BufferAttribute(g,A,E);if(i.sparse!==void 0){const h=Lt.SCALAR,p=ct[i.sparse.indices.componentType],C=i.sparse.indices.byteOffset||0,m=i.sparse.values.byteOffset||0,y=new p(o[1],C,i.sparse.count*h),v=new a(o[2],m,i.sparse.count*A);c!==null&&(l=new I.BufferAttribute(l.array.slice(),l.itemSize,l.normalized)),l.normalized=!1;for(let S=0,U=y.length;S<U;S++){const w=y[S];if(l.setX(w,v[S*A]),A>=2&&l.setY(w,v[S*A+1]),A>=3&&l.setZ(w,v[S*A+2]),A>=4&&l.setW(w,v[S*A+3]),A>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}l.normalized=E}return l})}loadTexture(e){const t=this.json,r=this.options,s=t.textures[e].source,o=t.images[s];let c=this.textureLoader;if(o.uri){const A=r.manager.getHandler(o.uri);A!==null&&(c=A)}return this.loadTextureImage(e,s,c)}loadTextureImage(e,t,r){const i=this,s=this.json,o=s.textures[e],c=s.images[t],A=(c.uri||c.bufferView)+":"+o.sampler;if(this.textureCache[A])return this.textureCache[A];const a=this.loadImageSource(t,r).then(function(f){f.flipY=!1,f.name=o.name||c.name||"",f.name===""&&typeof c.uri=="string"&&c.uri.startsWith("data:image/")===!1&&(f.name=c.uri);const b=(s.samplers||{})[o.sampler]||{};return f.magFilter=mn[b.magFilter]||I.LinearFilter,f.minFilter=mn[b.minFilter]||I.LinearMipmapLinearFilter,f.wrapS=bn[b.wrapS]||I.RepeatWrapping,f.wrapT=bn[b.wrapT]||I.RepeatWrapping,f.generateMipmaps=!f.isCompressedTexture&&f.minFilter!==I.NearestFilter&&f.minFilter!==I.LinearFilter,i.associations.set(f,{textures:e}),f}).catch(function(){return null});return this.textureCache[A]=a,a}loadImageSource(e,t){const r=this,i=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());const o=i.images[e],c=self.URL||self.webkitURL;let A=o.uri||"",a=!1;if(o.bufferView!==void 0)A=r.getDependency("bufferView",o.bufferView).then(function(u){a=!0;const b=new Blob([u],{type:o.mimeType});return A=c.createObjectURL(b),A});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const f=Promise.resolve(A).then(function(u){return new Promise(function(b,d){let E=b;t.isImageBitmapLoader===!0&&(E=function(g){const l=new I.Texture(g);l.needsUpdate=!0,b(l)}),t.load(I.LoaderUtils.resolveURL(u,s.path),E,void 0,d)})}).then(function(u){return a===!0&&c.revokeObjectURL(A),Ze(u,o),u.userData.mimeType=o.mimeType||zr(o.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",A),u});return this.sourceCache[e]=f,f}assignTexture(e,t,r,i){const s=this;return this.getDependency("texture",r.index).then(function(o){if(!o)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(o=o.clone(),o.channel=r.texCoord),s.extensions[ye.KHR_TEXTURE_TRANSFORM]){const c=r.extensions!==void 0?r.extensions[ye.KHR_TEXTURE_TRANSFORM]:void 0;if(c){const A=s.associations.get(o);o=s.extensions[ye.KHR_TEXTURE_TRANSFORM].extendTexture(o,c),s.associations.set(o,A)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let r=e.material;const i=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const c="PointsMaterial:"+r.uuid;let A=this.cache.get(c);A||(A=new I.PointsMaterial,I.Material.prototype.copy.call(A,r),A.color.copy(r.color),A.map=r.map,A.sizeAttenuation=!1,this.cache.add(c,A)),r=A}else if(e.isLine){const c="LineBasicMaterial:"+r.uuid;let A=this.cache.get(c);A||(A=new I.LineBasicMaterial,I.Material.prototype.copy.call(A,r),A.color.copy(r.color),A.map=r.map,this.cache.add(c,A)),r=A}if(i||s||o){let c="ClonedMaterial:"+r.uuid+":";i&&(c+="derivative-tangents:"),s&&(c+="vertex-colors:"),o&&(c+="flat-shading:");let A=this.cache.get(c);A||(A=r.clone(),s&&(A.vertexColors=!0),o&&(A.flatShading=!0),i&&(A.normalScale&&(A.normalScale.y*=-1),A.clearcoatNormalScale&&(A.clearcoatNormalScale.y*=-1)),this.cache.add(c,A),this.associations.set(A,this.associations.get(r))),r=A}e.material=r}getMaterialType(){return I.MeshStandardMaterial}loadMaterial(e){const t=this,r=this.json,i=this.extensions,s=r.materials[e];let o;const c={},A=s.extensions||{},a=[];if(A[ye.KHR_MATERIALS_UNLIT]){const u=i[ye.KHR_MATERIALS_UNLIT];o=u.getMaterialType(),a.push(u.extendParams(c,s,t))}else{const u=s.pbrMetallicRoughness||{};if(c.color=new I.Color(1,1,1),c.opacity=1,Array.isArray(u.baseColorFactor)){const b=u.baseColorFactor;c.color.setRGB(b[0],b[1],b[2],I.LinearSRGBColorSpace),c.opacity=b[3]}u.baseColorTexture!==void 0&&a.push(t.assignTexture(c,"map",u.baseColorTexture,I.SRGBColorSpace)),c.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,c.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(a.push(t.assignTexture(c,"metalnessMap",u.metallicRoughnessTexture)),a.push(t.assignTexture(c,"roughnessMap",u.metallicRoughnessTexture))),o=this._invokeOne(function(b){return b.getMaterialType&&b.getMaterialType(e)}),a.push(Promise.all(this._invokeAll(function(b){return b.extendMaterialParams&&b.extendMaterialParams(e,c)})))}s.doubleSided===!0&&(c.side=I.DoubleSide);const f=s.alphaMode||_t.OPAQUE;if(f===_t.BLEND?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,f===_t.MASK&&(c.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==I.MeshBasicMaterial&&(a.push(t.assignTexture(c,"normalMap",s.normalTexture)),c.normalScale=new I.Vector2(1,1),s.normalTexture.scale!==void 0)){const u=s.normalTexture.scale;c.normalScale.set(u,u)}if(s.occlusionTexture!==void 0&&o!==I.MeshBasicMaterial&&(a.push(t.assignTexture(c,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(c.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==I.MeshBasicMaterial){const u=s.emissiveFactor;c.emissive=new I.Color().setRGB(u[0],u[1],u[2],I.LinearSRGBColorSpace)}return s.emissiveTexture!==void 0&&o!==I.MeshBasicMaterial&&a.push(t.assignTexture(c,"emissiveMap",s.emissiveTexture,I.SRGBColorSpace)),Promise.all(a).then(function(){const u=new o(c);return s.name&&(u.name=s.name),Ze(u,s),t.associations.set(u,{materials:e}),s.extensions&&ot(i,u,s),u})}createUniqueName(e){const t=I.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,r=this.extensions,i=this.primitiveCache;function s(c){return r[ye.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c,t).then(function(A){return Cn(A,c,t)})}const o=[];for(let c=0,A=e.length;c<A;c++){const a=e[c],f=Kr(a),u=i[f];if(u)o.push(u.promise);else{let b;a.extensions&&a.extensions[ye.KHR_DRACO_MESH_COMPRESSION]?b=s(a):b=Cn(new I.BufferGeometry,a,t),i[f]={primitive:a,promise:b},o.push(b)}}return Promise.all(o)}loadMesh(e){const t=this,r=this.json,i=this.extensions,s=r.meshes[e],o=s.primitives,c=[];for(let A=0,a=o.length;A<a;A++){const f=o[A].material===void 0?Hr(this.cache):this.getDependency("material",o[A].material);c.push(f)}return c.push(t.loadGeometries(o)),Promise.all(c).then(function(A){const a=A.slice(0,A.length-1),f=A[A.length-1],u=[];for(let d=0,E=f.length;d<E;d++){const g=f[d],l=o[d];let h;const p=a[d];if(l.mode===Ye.TRIANGLES||l.mode===Ye.TRIANGLE_STRIP||l.mode===Ye.TRIANGLE_FAN||l.mode===void 0)h=s.isSkinnedMesh===!0?new I.SkinnedMesh(g,p):new I.Mesh(g,p),h.isSkinnedMesh===!0&&h.normalizeSkinWeights(),l.mode===Ye.TRIANGLE_STRIP?h.geometry=En(h.geometry,I.TriangleStripDrawMode):l.mode===Ye.TRIANGLE_FAN&&(h.geometry=En(h.geometry,I.TriangleFanDrawMode));else if(l.mode===Ye.LINES)h=new I.LineSegments(g,p);else if(l.mode===Ye.LINE_STRIP)h=new I.Line(g,p);else if(l.mode===Ye.LINE_LOOP)h=new I.LineLoop(g,p);else if(l.mode===Ye.POINTS)h=new I.Points(g,p);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+l.mode);Object.keys(h.geometry.morphAttributes).length>0&&qr(h,s),h.name=t.createUniqueName(s.name||"mesh_"+e),Ze(h,s),l.extensions&&ot(i,h,l),t.assignFinalMaterial(h),u.push(h)}for(let d=0,E=u.length;d<E;d++)t.associations.set(u[d],{meshes:e,primitives:d});if(u.length===1)return s.extensions&&ot(i,u[0],s),u[0];const b=new I.Group;s.extensions&&ot(i,b,s),t.associations.set(b,{meshes:e});for(let d=0,E=u.length;d<E;d++)b.add(u[d]);return b})}loadCamera(e){let t;const r=this.json.cameras[e],i=r[r.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return r.type==="perspective"?t=new I.PerspectiveCamera(I.MathUtils.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):r.type==="orthographic"&&(t=new I.OrthographicCamera(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),r.name&&(t.name=this.createUniqueName(r.name)),Ze(t,r),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],r=[];for(let i=0,s=t.joints.length;i<s;i++)r.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?r.push(this.getDependency("accessor",t.inverseBindMatrices)):r.push(null),Promise.all(r).then(function(i){const s=i.pop(),o=i,c=[],A=[];for(let a=0,f=o.length;a<f;a++){const u=o[a];if(u){c.push(u);const b=new I.Matrix4;s!==null&&b.fromArray(s.array,a*16),A.push(b)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[a])}return new I.Skeleton(c,A)})}loadAnimation(e){const t=this.json,r=this,i=t.animations[e],s=i.name?i.name:"animation_"+e,o=[],c=[],A=[],a=[],f=[];for(let u=0,b=i.channels.length;u<b;u++){const d=i.channels[u],E=i.samplers[d.sampler],g=d.target,l=g.node,h=i.parameters!==void 0?i.parameters[E.input]:E.input,p=i.parameters!==void 0?i.parameters[E.output]:E.output;g.node!==void 0&&(o.push(this.getDependency("node",l)),c.push(this.getDependency("accessor",h)),A.push(this.getDependency("accessor",p)),a.push(E),f.push(g))}return Promise.all([Promise.all(o),Promise.all(c),Promise.all(A),Promise.all(a),Promise.all(f)]).then(function(u){const b=u[0],d=u[1],E=u[2],g=u[3],l=u[4],h=[];for(let C=0,m=b.length;C<m;C++){const y=b[C],v=d[C],S=E[C],U=g[C],w=l[C];if(y===void 0)continue;y.updateMatrix&&y.updateMatrix();const M=r._createAnimationTracks(y,v,S,U,w);if(M)for(let _=0;_<M.length;_++)h.push(M[_])}const p=new I.AnimationClip(s,void 0,h);return Ze(p,i),p})}createNodeMesh(e){const t=this.json,r=this,i=t.nodes[e];return i.mesh===void 0?null:r.getDependency("mesh",i.mesh).then(function(s){const o=r._getNodeRef(r.meshCache,i.mesh,s);return i.weights!==void 0&&o.traverse(function(c){if(c.isMesh)for(let A=0,a=i.weights.length;A<a;A++)c.morphTargetInfluences[A]=i.weights[A]}),o})}loadNode(e){const t=this.json,r=this,i=t.nodes[e],s=r._loadNodeShallow(e),o=[],c=i.children||[];for(let a=0,f=c.length;a<f;a++)o.push(r.getDependency("node",c[a]));const A=i.skin===void 0?Promise.resolve(null):r.getDependency("skin",i.skin);return Promise.all([s,Promise.all(o),A]).then(function(a){const f=a[0],u=a[1],b=a[2];b!==null&&f.traverse(function(d){d.isSkinnedMesh&&d.bind(b,Vr)});for(let d=0,E=u.length;d<E;d++)f.add(u[d]);return f})}_loadNodeShallow(e){const t=this.json,r=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?i.createUniqueName(s.name):"",c=[],A=i._invokeOne(function(a){return a.createNodeMesh&&a.createNodeMesh(e)});return A&&c.push(A),s.camera!==void 0&&c.push(i.getDependency("camera",s.camera).then(function(a){return i._getNodeRef(i.cameraCache,s.camera,a)})),i._invokeAll(function(a){return a.createNodeAttachment&&a.createNodeAttachment(e)}).forEach(function(a){c.push(a)}),this.nodeCache[e]=Promise.all(c).then(function(a){let f;if(s.isBone===!0?f=new I.Bone:a.length>1?f=new I.Group:a.length===1?f=a[0]:f=new I.Object3D,f!==a[0])for(let u=0,b=a.length;u<b;u++)f.add(a[u]);if(s.name&&(f.userData.name=s.name,f.name=o),Ze(f,s),s.extensions&&ot(r,f,s),s.matrix!==void 0){const u=new I.Matrix4;u.fromArray(s.matrix),f.applyMatrix4(u)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);if(!i.associations.has(f))i.associations.set(f,{});else if(s.mesh!==void 0&&i.meshCache.refs[s.mesh]>1){const u=i.associations.get(f);i.associations.set(f,{...u})}return i.associations.get(f).nodes=e,f}),this.nodeCache[e]}loadScene(e){const t=this.extensions,r=this.json.scenes[e],i=this,s=new I.Group;r.name&&(s.name=i.createUniqueName(r.name)),Ze(s,r),r.extensions&&ot(t,s,r);const o=r.nodes||[],c=[];for(let A=0,a=o.length;A<a;A++)c.push(i.getDependency("node",o[A]));return Promise.all(c).then(function(A){for(let f=0,u=A.length;f<u;f++)s.add(A[f]);const a=f=>{const u=new Map;for(const[b,d]of i.associations)(b instanceof I.Material||b instanceof I.Texture)&&u.set(b,d);return f.traverse(b=>{const d=i.associations.get(b);d!=null&&u.set(b,d)}),u};return i.associations=a(s),s})}_createAnimationTracks(e,t,r,i,s){const o=[],c=e.name?e.name:e.uuid,A=[];nt[s.path]===nt.weights?e.traverse(function(b){b.morphTargetInfluences&&A.push(b.name?b.name:b.uuid)}):A.push(c);let a;switch(nt[s.path]){case nt.weights:a=I.NumberKeyframeTrack;break;case nt.rotation:a=I.QuaternionKeyframeTrack;break;case nt.translation:case nt.scale:a=I.VectorKeyframeTrack;break;default:r.itemSize===1?a=I.NumberKeyframeTrack:a=I.VectorKeyframeTrack;break}const f=i.interpolation!==void 0?Ur[i.interpolation]:I.InterpolateLinear,u=this._getArrayFromAccessor(r);for(let b=0,d=A.length;b<d;b++){const E=new a(A[b]+"."+nt[s.path],t.array,u,f);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(E),o.push(E)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const r=Yt(t.constructor),i=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)i[s]=t[s]*r;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(r){const i=this instanceof I.QuaternionKeyframeTrack?Gr:Hn;return new i(this.times,this.values,this.getValueSize()/3,r)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Wr(n,e,t){const r=e.attributes,i=new I.Box3;if(r.POSITION!==void 0){const c=t.json.accessors[r.POSITION],A=c.min,a=c.max;if(A!==void 0&&a!==void 0){if(i.set(new I.Vector3(A[0],A[1],A[2]),new I.Vector3(a[0],a[1],a[2])),c.normalized){const f=Yt(ct[c.componentType]);i.min.multiplyScalar(f),i.max.multiplyScalar(f)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const c=new I.Vector3,A=new I.Vector3;for(let a=0,f=s.length;a<f;a++){const u=s[a];if(u.POSITION!==void 0){const b=t.json.accessors[u.POSITION],d=b.min,E=b.max;if(d!==void 0&&E!==void 0){if(A.setX(Math.max(Math.abs(d[0]),Math.abs(E[0]))),A.setY(Math.max(Math.abs(d[1]),Math.abs(E[1]))),A.setZ(Math.max(Math.abs(d[2]),Math.abs(E[2]))),b.normalized){const g=Yt(ct[b.componentType]);A.multiplyScalar(g)}c.max(A)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(c)}n.boundingBox=i;const o=new I.Sphere;i.getCenter(o.center),o.radius=i.min.distanceTo(i.max)/2,n.boundingSphere=o}function Cn(n,e,t){const r=e.attributes,i=[];function s(o,c){return t.getDependency("accessor",o).then(function(A){n.setAttribute(c,A)})}for(const o in r){const c=Vt[o]||o.toLowerCase();c in n.attributes||i.push(s(r[o],c))}if(e.indices!==void 0&&!n.index){const o=t.getDependency("accessor",e.indices).then(function(c){n.setIndex(c)});i.push(o)}return I.ColorManagement.workingColorSpace!==I.LinearSRGBColorSpace&&"COLOR_0"in r&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${I.ColorManagement.workingColorSpace}" not supported.`),Ze(n,e),Wr(n,e,t),Promise.all(i).then(function(){return e.targets!==void 0?jr(n,e.targets,t):n})}const Nt=new WeakMap;class Jr extends I.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,r,i){const s=new I.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{this.parse(o,t,i)},r,i)}parse(e,t,r=()=>{}){this.decodeDracoFile(e,t,null,null,I.SRGBColorSpace,r).catch(r)}decodeDracoFile(e,t,r,i,s=I.LinearSRGBColorSpace,o=()=>{}){const c={attributeIDs:r||this.defaultAttributeIDs,attributeTypes:i||this.defaultAttributeTypes,useUniqueIDs:!!r,vertexColorSpace:s};return this.decodeGeometry(e,c).then(t).catch(o)}decodeGeometry(e,t){const r=JSON.stringify(t);if(Nt.has(e)){const A=Nt.get(e);if(A.key===r)return A.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i;const s=this.workerNextTaskID++,o=e.byteLength,c=this._getWorker(s,o).then(A=>(i=A,new Promise((a,f)=>{i._callbacks[s]={resolve:a,reject:f},i.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(A=>this._createGeometry(A.geometry));return c.catch(()=>!0).then(()=>{i&&s&&this._releaseTask(i,s)}),Nt.set(e,{key:r,promise:c}),c}_createGeometry(e){const t=new I.BufferGeometry;e.index&&t.setIndex(new I.BufferAttribute(e.index.array,1));for(let r=0;r<e.attributes.length;r++){const{name:i,array:s,itemSize:o,stride:c,vertexColorSpace:A}=e.attributes[r];let a;if(o===c)a=new I.BufferAttribute(s,o);else{const f=new I.InterleavedBuffer(s,c);a=new I.InterleavedBufferAttribute(f,o,0)}i==="color"&&(this._assignVertexColorSpace(a,A),a.normalized=!(s instanceof Float32Array)),t.setAttribute(i,a)}return t}_assignVertexColorSpace(e,t){if(t!==I.SRGBColorSpace)return;const r=new I.Color;for(let i=0,s=e.count;i<s;i++)r.fromBufferAttribute(e,i),I.ColorManagement.colorSpaceToWorking(r,I.SRGBColorSpace),e.setXYZ(i,r.r,r.g,r.b)}_loadLibrary(e,t){const r=new I.FileLoader(this.manager);return r.setPath(this.decoderPath),r.setResponseType(t),r.setWithCredentials(this.withCredentials),new Promise((i,s)=>{r.load(e,i,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(r=>{const i=r[0];e||(this.decoderConfig.wasmBinary=r[1]);const s=Xr.toString(),o=["/* draco decoder */",i,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(`
|
|
2
|
-
`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const i=new Worker(this.workerSourceURL);i._callbacks={},i._taskCosts={},i._taskLoad=0,i.postMessage({type:"init",decoderConfig:this.decoderConfig}),i.onmessage=function(s){const o=s.data;switch(o.type){case"decode":i._callbacks[o.id].resolve(o);break;case"error":i._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(i)}else this.workerPool.sort(function(i,s){return i._taskLoad>s._taskLoad?-1:1});const r=this.workerPool[this.workerPool.length-1];return r._taskCosts[e]=t,r._taskLoad+=t,r})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function Xr(){let n,e;onmessage=function(o){const c=o.data;switch(c.type){case"init":n=c.decoderConfig,e=new Promise(function(f){n.onModuleLoaded=function(u){f({draco:u})},DracoDecoderModule(n)});break;case"decode":const A=c.buffer,a=c.taskConfig;e.then(f=>{const u=f.draco,b=new u.Decoder;try{const d=t(u,b,new Int8Array(A),a),E=d.attributes.map(g=>g.array.buffer);d.index&&E.push(d.index.array.buffer),self.postMessage({type:"decode",id:c.id,geometry:d},E)}catch(d){console.error(d),self.postMessage({type:"error",id:c.id,error:d.message})}finally{u.destroy(b)}});break}};function t(o,c,A,a){const f=a.attributeIDs,u=a.attributeTypes;let b,d;const E=c.GetEncodedGeometryType(A);if(E===o.TRIANGULAR_MESH)b=new o.Mesh,d=c.DecodeArrayToMesh(A,A.byteLength,b);else if(E===o.POINT_CLOUD)b=new o.PointCloud,d=c.DecodeArrayToPointCloud(A,A.byteLength,b);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!d.ok()||b.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+d.error_msg());const g={index:null,attributes:[]};for(const l in f){const h=self[u[l]];let p,C;if(a.useUniqueIDs)C=f[l],p=c.GetAttributeByUniqueId(b,C);else{if(C=c.GetAttributeId(b,o[f[l]]),C===-1)continue;p=c.GetAttribute(b,C)}const m=i(o,c,b,l,h,p);l==="color"&&(m.vertexColorSpace=a.vertexColorSpace),g.attributes.push(m)}return E===o.TRIANGULAR_MESH&&(g.index=r(o,c,b)),o.destroy(b),g}function r(o,c,A){const f=A.num_faces()*3,u=f*4,b=o._malloc(u);c.GetTrianglesUInt32Array(A,u,b);const d=new Uint32Array(o.HEAPF32.buffer,b,f).slice();return o._free(b),{array:d,itemSize:1}}function i(o,c,A,a,f,u){const b=A.num_points(),d=u.num_components(),E=s(o,f),g=d*f.BYTES_PER_ELEMENT,l=Math.ceil(g/4)*4,h=l/f.BYTES_PER_ELEMENT,p=b*g,C=b*l,m=o._malloc(p);c.GetAttributeDataArrayForAllPoints(A,u,E,p,m);const y=new f(o.HEAPF32.buffer,m,p/f.BYTES_PER_ELEMENT);let v;if(g===l)v=y.slice();else{v=new f(C/f.BYTES_PER_ELEMENT);let S=0;for(let U=0,w=y.length;U<w;U++){for(let M=0;M<d;M++)v[S+M]=y[U*d+M];S+=h}}return o._free(m),{name:a,count:b,itemSize:d,array:v,stride:h}}function s(o,c){switch(c){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}class Zr{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const r=this.workersResolve[e];if(r&&r(t),this.queue.length){const{resolve:i,msg:s,transfer:o}=this.queue.shift();this.workersResolve[e]=i,this.workers[e].postMessage(s,o)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(r=>{const i=this._getIdleWorker();i!==-1?(this._initWorker(i),this.workerStatus|=1<<i,this.workersResolve[i]=r,this.workers[i].postMessage(e,t)):this.queue.push({resolve:r,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const $r=0,Bn=2,eo=1,yn=2,to=0,no=1,io=10,ro=0,jn=9,qn=15,Kn=16,zn=22,Vn=37,Yn=43,Wn=76,Jn=83,Xn=97,Zn=100,$n=103,ei=109,ti=122,ni=123,ii=131,ri=132,oi=133,si=134,ai=137,Ai=138,ci=139,li=140,ui=141,hi=142,fi=145,di=146,pi=148,gi=152,Wt=153,oo=154,Jt=155,so=156,Ei=157,Ii=158,mi=165,bi=166,Ci=1000054e3,Bi=1000054001,yi=1000054004,Ti=1000054005,nn=1000066e3,Ri=1000066004;class ft{constructor(e,t,r,i){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(e.buffer,e.byteOffset+t,r),this._littleEndian=i,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint8Array(e){const t=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,e);return this._offset+=e,t}_skip(e){return this._offset+=e,this}_scan(e,t=0){const r=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==t&&i<e;)i++,this._offset++;return i<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+r,i)}}const qe=[171,75,84,88,32,50,48,187,13,10,26,10];function Tn(n){return new TextDecoder().decode(n)}function ao(n){const e=new Uint8Array(n.buffer,n.byteOffset,qe.length);if(e[0]!==qe[0]||e[1]!==qe[1]||e[2]!==qe[2]||e[3]!==qe[3]||e[4]!==qe[4]||e[5]!==qe[5]||e[6]!==qe[6]||e[7]!==qe[7]||e[8]!==qe[8]||e[9]!==qe[9]||e[10]!==qe[10]||e[11]!==qe[11])throw new Error("Missing KTX 2.0 identifier.");const t={vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null},r=17*Uint32Array.BYTES_PER_ELEMENT,i=new ft(n,qe.length,r,!0);t.vkFormat=i._nextUint32(),t.typeSize=i._nextUint32(),t.pixelWidth=i._nextUint32(),t.pixelHeight=i._nextUint32(),t.pixelDepth=i._nextUint32(),t.layerCount=i._nextUint32(),t.faceCount=i._nextUint32(),t.levelCount=i._nextUint32(),t.supercompressionScheme=i._nextUint32();const s=i._nextUint32(),o=i._nextUint32(),c=i._nextUint32(),A=i._nextUint32(),a=i._nextUint64(),f=i._nextUint64(),u=3*Math.max(t.levelCount,1)*8,b=new ft(n,qe.length+r,u,!0);for(let ie=0,re=Math.max(t.levelCount,1);ie<re;ie++)t.levels.push({levelData:new Uint8Array(n.buffer,n.byteOffset+b._nextUint64(),b._nextUint64()),uncompressedByteLength:b._nextUint64()});const d=new ft(n,s,o,!0);d._skip(4);const E=d._nextUint16(),g=d._nextUint16(),l=d._nextUint16(),h=d._nextUint16(),p={vendorId:E,descriptorType:g,versionNumber:l,colorModel:d._nextUint8(),colorPrimaries:d._nextUint8(),transferFunction:d._nextUint8(),flags:d._nextUint8(),texelBlockDimension:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],bytesPlane:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],samples:[]},C=(h/4-6)/4;for(let ie=0;ie<C;ie++){const re={bitOffset:d._nextUint16(),bitLength:d._nextUint8(),channelType:d._nextUint8(),samplePosition:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};64&re.channelType?(re.sampleLower=d._nextInt32(),re.sampleUpper=d._nextInt32()):(re.sampleLower=d._nextUint32(),re.sampleUpper=d._nextUint32()),p.samples[ie]=re}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(p);const m=new ft(n,c,A,!0);for(;m._offset<A;){const ie=m._nextUint32(),re=m._scan(ie),ee=Tn(re);if(t.keyValue[ee]=m._nextUint8Array(ie-re.byteLength-1),ee.match(/^ktx/i)){const le=Tn(t.keyValue[ee]);t.keyValue[ee]=le.substring(0,le.lastIndexOf("\0"))}m._skip(ie%4?4-ie%4:0)}if(f<=0)return t;const y=new ft(n,a,f,!0),v=y._nextUint16(),S=y._nextUint16(),U=y._nextUint32(),w=y._nextUint32(),M=y._nextUint32(),_=y._nextUint32(),k=[];for(let ie=0,re=Math.max(t.levelCount,1);ie<re;ie++)k.push({imageFlags:y._nextUint32(),rgbSliceByteOffset:y._nextUint32(),rgbSliceByteLength:y._nextUint32(),alphaSliceByteOffset:y._nextUint32(),alphaSliceByteLength:y._nextUint32()});const D=a+y._offset,L=D+U,V=L+w,W=V+M,j=new Uint8Array(n.buffer,n.byteOffset+D,U),J=new Uint8Array(n.buffer,n.byteOffset+L,w),Z=new Uint8Array(n.buffer,n.byteOffset+V,M),Ae=new Uint8Array(n.buffer,n.byteOffset+W,_);return t.globalData={endpointCount:v,selectorCount:S,imageDescs:k,endpointsData:j,selectorsData:J,tablesData:Z,extendedData:Ae},t}let Dt,$e,Xt;const Ot={env:{emscripten_notify_memory_growth:function(n){Xt=new Uint8Array($e.exports.memory.buffer)}}};class Ao{init(){return Dt||(Dt=typeof fetch<"u"?fetch("data:application/wasm;base64,"+Rn).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,Ot)).then(this._init):WebAssembly.instantiate(Buffer.from(Rn,"base64"),Ot).then(this._init),Dt)}_init(e){$e=e.instance,Ot.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!$e)throw new Error("ZSTDDecoder: Await .init() before decoding.");const r=e.byteLength,i=$e.exports.malloc(r);Xt.set(e,i),t=t||Number($e.exports.ZSTD_findDecompressedSize(i,r));const s=$e.exports.malloc(t),o=$e.exports.ZSTD_decompress(s,t,i,r),c=Xt.slice(s,s+o);return $e.exports.free(i),$e.exports.free(s),c}}const Rn="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgA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HBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAA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QShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAE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EECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQa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QQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoi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ADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBS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P//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",co="display-p3",lo="display-p3-linear";({...I.ColorManagement.spaces[I.SRGBColorSpace]});const Ft=new WeakMap;let Mt=0,Pt;class We extends I.Loader{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new Zr,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}async detectSupportAsync(e){return console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await e.init(),this.detectSupport(e)}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:e.hasFeature("texture-compression-etc1"),etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-s3tc"),bptcSupported:e.hasFeature("texture-compression-bc"),pvrtcSupported:e.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:e.extensions.has("WEBGL_compressed_texture_astc")&&e.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},typeof navigator<"u"&&navigator.platform.indexOf("Linux")>=0&&navigator.userAgent.indexOf("Firefox")>=0&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){const e=new I.FileLoader(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),r=new I.FileLoader(this.manager);r.setPath(this.transcoderPath),r.setResponseType("arraybuffer"),r.setWithCredentials(this.withCredentials);const i=r.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,i]).then(([s,o])=>{const c=We.BasisWorker.toString(),A=["/* constants */","let _EngineFormat = "+JSON.stringify(We.EngineFormat),"let _EngineType = "+JSON.stringify(We.EngineType),"let _TranscoderFormat = "+JSON.stringify(We.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(We.BasisFormat),"/* basis_transcoder.js */",s,"/* worker */",c.substring(c.indexOf("{")+1,c.lastIndexOf("}"))].join(`
|
|
3
|
-
`);this.workerSourceURL=URL.createObjectURL(new Blob([A])),this.transcoderBinary=o,this.workerPool.setWorkerCreator(()=>{const a=new Worker(this.workerSourceURL),f=this.transcoderBinary.slice(0);return a.postMessage({type:"init",config:this.workerConfig,transcoderBinary:f},[f]),a})}),Mt>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Mt++}return this.transcoderPending}load(e,t,r,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const s=new I.FileLoader(this.manager);s.setPath(this.path),s.setCrossOrigin(this.crossOrigin),s.setWithCredentials(this.withCredentials),s.setRequestHeader(this.requestHeader),s.setResponseType("arraybuffer"),s.load(e,o=>{this.parse(o,t,i)},r,i)}parse(e,t,r){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(Ft.has(e))return Ft.get(e).promise.then(t).catch(r);this._createTexture(e).then(i=>t?t(i):null).catch(r)}_createTextureFrom(e,t){const{type:r,error:i,data:{faces:s,width:o,height:c,format:A,type:a,dfdFlags:f}}=e;if(r==="error")return Promise.reject(i);let u;if(t.faceCount===6)u=new I.CompressedCubeTexture(s,A,a);else{const b=s[0].mipmaps;u=t.layerCount>1?new I.CompressedArrayTexture(b,o,c,t.layerCount,A,a):new I.CompressedTexture(b,o,c,A,a)}return u.minFilter=s[0].mipmaps.length===1?I.LinearFilter:I.LinearMipmapLinearFilter,u.magFilter=I.LinearFilter,u.generateMipmaps=!1,u.needsUpdate=!0,u.colorSpace=Qi(t),u.premultiplyAlpha=!!(f&eo),u}async _createTexture(e,t={}){const r=ao(new Uint8Array(e)),i=r.vkFormat===nn&&r.dataFormatDescriptor[0].colorModel===167;if(!(r.vkFormat===ro||i&&!this.workerConfig.astcHDRSupported))return ho(r);const o=t,c=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:o},[e])).then(A=>this._createTextureFrom(A.data,r));return Ft.set(e,{promise:c}),c}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Mt--}}We.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2};We.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25};We.EngineFormat={RGBAFormat:I.RGBAFormat,RGBA_ASTC_4x4_Format:I.RGBA_ASTC_4x4_Format,RGB_BPTC_UNSIGNED_Format:I.RGB_BPTC_UNSIGNED_Format,RGBA_BPTC_Format:I.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:I.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:I.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:I.RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:I.RGB_ETC1_Format,RGB_ETC2_Format:I.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:I.RGB_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format:I.RGBA_S3TC_DXT1_Format};We.EngineType={UnsignedByteType:I.UnsignedByteType,HalfFloatType:I.HalfFloatType,FloatType:I.FloatType};We.BasisWorker=function(){let n,e,t;const r=_EngineFormat,i=_EngineType,s=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",function(E){const g=E.data;switch(g.type){case"init":n=g.config,c(g.transcoderBinary);break;case"transcode":e.then(()=>{try{const{faces:l,buffers:h,width:p,height:C,hasAlpha:m,format:y,type:v,dfdFlags:S}=A(g.buffer);self.postMessage({type:"transcode",id:g.id,data:{faces:l,width:p,height:C,hasAlpha:m,format:y,type:v,dfdFlags:S}},h)}catch(l){console.error(l),self.postMessage({type:"error",id:g.id,error:l.message})}});break}});function c(E){e=new Promise(g=>{t={wasmBinary:E,onRuntimeInitialized:g},BASIS(t)}).then(()=>{t.initializeBasis(),t.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function A(E){const g=new t.KTX2File(new Uint8Array(E));function l(){g.close(),g.delete()}if(!g.isValid())throw l(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");let h;if(g.isUASTC())h=o.UASTC;else if(g.isETC1S())h=o.ETC1S;else if(g.isHDR())h=o.UASTC_HDR;else throw new Error("THREE.KTX2Loader: Unknown Basis encoding");const p=g.getWidth(),C=g.getHeight(),m=g.getLayers()||1,y=g.getLevels(),v=g.getFaces(),S=g.getHasAlpha(),U=g.getDFDFlags(),{transcoderFormat:w,engineFormat:M,engineType:_}=u(h,p,C,S);if(!p||!C||!y)throw l(),new Error("THREE.KTX2Loader: Invalid texture");if(!g.startTranscoding())throw l(),new Error("THREE.KTX2Loader: .startTranscoding failed");const k=[],D=[];for(let L=0;L<v;L++){const V=[];for(let W=0;W<y;W++){const j=[];let J,Z;for(let ie=0;ie<m;ie++){const re=g.getImageLevelInfo(W,ie,L);L===0&&W===0&&ie===0&&(re.origWidth%4!==0||re.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),y>1?(J=re.origWidth,Z=re.origHeight):(J=re.width,Z=re.height);let ee=new Uint8Array(g.getImageTranscodedSizeInBytes(W,ie,0,w));const le=g.transcodeImage(ee,W,ie,L,w,0,-1,-1);if(_===i.HalfFloatType&&(ee=new Uint16Array(ee.buffer,ee.byteOffset,ee.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!le)throw l(),new Error("THREE.KTX2Loader: .transcodeImage failed.");j.push(ee)}const Ae=d(j);V.push({data:Ae,width:J,height:Z}),D.push(Ae.buffer)}k.push({mipmaps:V,width:p,height:C,format:M,type:_})}return l(),{faces:k,buffers:D,width:p,height:C,hasAlpha:S,dfdFlags:U,format:M,type:_}}const a=[{if:"astcSupported",basisFormat:[o.UASTC],transcoderFormat:[s.ASTC_4x4,s.ASTC_4x4],engineFormat:[r.RGBA_ASTC_4x4_Format,r.RGBA_ASTC_4x4_Format],engineType:[i.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.BC7_M5,s.BC7_M5],engineFormat:[r.RGBA_BPTC_Format,r.RGBA_BPTC_Format],engineType:[i.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.BC1,s.BC3],engineFormat:[r.RGBA_S3TC_DXT1_Format,r.RGBA_S3TC_DXT5_Format],engineType:[i.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.ETC1,s.ETC2],engineFormat:[r.RGB_ETC2_Format,r.RGBA_ETC2_EAC_Format],engineType:[i.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.ETC1],engineFormat:[r.RGB_ETC1_Format],engineType:[i.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.PVRTC1_4_RGB,s.PVRTC1_4_RGBA],engineFormat:[r.RGB_PVRTC_4BPPV1_Format,r.RGBA_PVRTC_4BPPV1_Format],engineType:[i.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[o.UASTC_HDR],transcoderFormat:[s.BC6H],engineFormat:[r.RGB_BPTC_UNSIGNED_Format],engineType:[i.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.RGBA32,s.RGBA32],engineFormat:[r.RGBAFormat,r.RGBAFormat],engineType:[i.UnsignedByteType,i.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[o.UASTC_HDR],transcoderFormat:[s.RGBA_HALF],engineFormat:[r.RGBAFormat],engineType:[i.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],f={[o.ETC1S]:a.filter(E=>E.basisFormat.includes(o.ETC1S)).sort((E,g)=>E.priorityETC1S-g.priorityETC1S),[o.UASTC]:a.filter(E=>E.basisFormat.includes(o.UASTC)).sort((E,g)=>E.priorityUASTC-g.priorityUASTC),[o.UASTC_HDR]:a.filter(E=>E.basisFormat.includes(o.UASTC_HDR)).sort((E,g)=>E.priorityHDR-g.priorityHDR)};function u(E,g,l,h){const p=f[E];for(let C=0;C<p.length;C++){const m=p[C];if(m.if&&!n[m.if]||!m.basisFormat.includes(E)||h&&m.transcoderFormat.length<2||m.needsPowerOfTwo&&!(b(g)&&b(l)))continue;const y=m.transcoderFormat[h?1:0],v=m.engineFormat[h?1:0],S=m.engineType[0];return{transcoderFormat:y,engineFormat:v,engineType:S}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}function b(E){return E<=2?!0:(E&E-1)===0&&E!==0}function d(E){if(E.length===1)return E[0];let g=0;for(let p=0;p<E.length;p++){const C=E[p];g+=C.byteLength}const l=new Uint8Array(g);let h=0;for(let p=0;p<E.length;p++){const C=E[p];l.set(C,h),h+=C.byteLength}return l}};const uo=new Set([I.RGBAFormat,I.RGBFormat,I.RGFormat,I.RedFormat]),Gt={[ei]:I.RGBAFormat,[$n]:I.RGFormat,[Zn]:I.RedFormat,[Xn]:I.RGBAFormat,[Jn]:I.RGFormat,[Wn]:I.RedFormat,[Yn]:I.RGBAFormat,[Vn]:I.RGBAFormat,[zn]:I.RGFormat,[Kn]:I.RGFormat,[qn]:I.RedFormat,[jn]:I.RedFormat,[ni]:I.RGBFormat,[ti]:I.RGBFormat,[gi]:I.RGBA_ETC2_EAC_Format,[pi]:I.RGB_ETC2_Format,[Wt]:I.R11_EAC_Format,[oo]:I.SIGNED_R11_EAC_Format,[Jt]:I.RG11_EAC_Format,[so]:I.SIGNED_RG11_EAC_Format,[nn]:I.RGBA_ASTC_4x4_Format,[Ii]:I.RGBA_ASTC_4x4_Format,[Ei]:I.RGBA_ASTC_4x4_Format,[Ri]:I.RGBA_ASTC_6x6_Format,[bi]:I.RGBA_ASTC_6x6_Format,[mi]:I.RGBA_ASTC_6x6_Format,[si]:I.RGBA_S3TC_DXT1_Format,[oi]:I.RGBA_S3TC_DXT1_Format,[ri]:I.RGB_S3TC_DXT1_Format,[ii]:I.RGB_S3TC_DXT1_Format,[Ai]:I.RGBA_S3TC_DXT3_Format,[ai]:I.RGBA_S3TC_DXT3_Format,[li]:I.SIGNED_RED_RGTC1_Format,[ci]:I.RED_RGTC1_Format,[hi]:I.SIGNED_RED_GREEN_RGTC2_Format,[ui]:I.RED_GREEN_RGTC2_Format,[di]:I.RGBA_BPTC_Format,[fi]:I.RGBA_BPTC_Format,[Ti]:I.RGBA_PVRTC_4BPPV1_Format,[Bi]:I.RGBA_PVRTC_4BPPV1_Format,[yi]:I.RGBA_PVRTC_2BPPV1_Format,[Ci]:I.RGBA_PVRTC_2BPPV1_Format},At={[ei]:I.FloatType,[$n]:I.FloatType,[Zn]:I.FloatType,[Xn]:I.HalfFloatType,[Jn]:I.HalfFloatType,[Wn]:I.HalfFloatType,[Yn]:I.UnsignedByteType,[Vn]:I.UnsignedByteType,[zn]:I.UnsignedByteType,[Kn]:I.UnsignedByteType,[qn]:I.UnsignedByteType,[jn]:I.UnsignedByteType,[ni]:I.UnsignedInt5999Type,[ti]:I.UnsignedInt101111Type,[gi]:I.UnsignedByteType,[pi]:I.UnsignedByteType,[Wt]:I.UnsignedByteType,[Wt]:I.UnsignedByteType,[Jt]:I.UnsignedByteType,[Jt]:I.UnsignedByteType,[nn]:I.HalfFloatType,[Ii]:I.UnsignedByteType,[Ei]:I.UnsignedByteType,[Ri]:I.HalfFloatType,[bi]:I.UnsignedByteType,[mi]:I.UnsignedByteType,[si]:I.UnsignedByteType,[oi]:I.UnsignedByteType,[ri]:I.UnsignedByteType,[ii]:I.UnsignedByteType,[Ai]:I.UnsignedByteType,[ai]:I.UnsignedByteType,[li]:I.UnsignedByteType,[ci]:I.UnsignedByteType,[hi]:I.UnsignedByteType,[ui]:I.UnsignedByteType,[di]:I.UnsignedByteType,[fi]:I.UnsignedByteType,[Ti]:I.UnsignedByteType,[Bi]:I.UnsignedByteType,[yi]:I.UnsignedByteType,[Ci]:I.UnsignedByteType};async function ho(n){const{vkFormat:e}=n;if(Gt[e]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+e);At[e]===void 0&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+e);let t;n.supercompressionScheme===Bn&&(Pt||(Pt=new Promise(async o=>{const c=new Ao;await c.init(),o(c)})),t=await Pt);const r=[];for(let o=0;o<n.levels.length;o++){const c=Math.max(1,n.pixelWidth>>o),A=Math.max(1,n.pixelHeight>>o),a=n.pixelDepth?Math.max(1,n.pixelDepth>>o):0,f=n.levels[o];let u;if(n.supercompressionScheme===$r)u=f.levelData;else if(n.supercompressionScheme===Bn)u=t.decode(f.levelData,f.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let b;At[e]===I.FloatType?b=new Float32Array(u.buffer,u.byteOffset,u.byteLength/Float32Array.BYTES_PER_ELEMENT):At[e]===I.HalfFloatType?b=new Uint16Array(u.buffer,u.byteOffset,u.byteLength/Uint16Array.BYTES_PER_ELEMENT):At[e]===I.UnsignedInt5999Type||At[e]===I.UnsignedInt101111Type?b=new Uint32Array(u.buffer,u.byteOffset,u.byteLength/Uint32Array.BYTES_PER_ELEMENT):b=u,r.push({data:b,width:c,height:A,depth:a})}const i=n.levelCount===0||r.length>1;let s;if(uo.has(Gt[e]))s=n.pixelDepth===0?new I.DataTexture(r[0].data,n.pixelWidth,n.pixelHeight):new I.Data3DTexture(r[0].data,n.pixelWidth,n.pixelHeight,n.pixelDepth),s.minFilter=i?I.NearestMipmapNearestFilter:I.NearestFilter,s.magFilter=I.NearestFilter,s.generateMipmaps=n.levelCount===0;else{if(n.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");s=new I.CompressedTexture(r,n.pixelWidth,n.pixelHeight),s.minFilter=i?I.LinearMipmapLinearFilter:I.LinearFilter,s.magFilter=I.LinearFilter}return s.mipmaps=r,s.type=At[e],s.format=Gt[e],s.colorSpace=Qi(n),s.needsUpdate=!0,Promise.resolve(s)}function Qi(n){const e=n.dataFormatDescriptor[0];return e.colorPrimaries===no?e.transferFunction===yn?I.SRGBColorSpace:I.LinearSRGBColorSpace:e.colorPrimaries===io?e.transferFunction===yn?co:lo:(e.colorPrimaries===to||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${e.colorPrimaries}"`),I.NoColorSpace)}class rn{name;time;duration;isPaused;playCount;interpolants;constructor(e,t){this.name=t||e.name,this.time=0,this.duration=e.duration,this.isPaused=!1,this.playCount=0,this.interpolants={};for(const r of e.tracks){const i=r.getValueSize();let s;r.ValueTypeName==="quaternion"?s=new se.QuaternionLinearInterpolant(r.times,r.values,i):s=new se.LinearInterpolant(r.times,r.values,i),this.interpolants[r.name]=s}}init(e){}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}prepare3D(e){}cleanup3D(e){}setPause(e){this.isPaused=e}setTime(e){this.time=e}update(e){this.time+=e,this.time>this.duration&&(this.time-=this.duration,this.playCount++);const t={};for(const[r,i]of Object.entries(this.interpolants)){const[s,o]=r.split(".");let c=t[s];c||(c={},t[s]=c);const A=i.evaluate(this.time);if(o==="position")c.loc=new Ie(A[0],A[1],A[2]);else if(o==="quaternion")c.quat=new we(A[0],A[1],A[2],A[3]);else if(o==="scale")c.scale=new Ie(A[0],A[1],A[2]);else if(o==="morphTargetInfluences"){c.morphs||(c.morphs=[]);const a=Array.from(A);c.morphs.push({name:s,vals:a})}else console.warn(`ClipPoseMotion: update. unknown property(${o})`)}return t}}var wi=(function(){var n="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q:Odkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;w8Wqdbk;esezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9Uc;WFbGgocjdaocjd6EhDaicefhocbhqdnindndndnaeaq9nmbaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxalc9WGgmTmecbhPawcjdfhsaohzinaraz9Rax6mvarazaxfgo9RcK6mvczhlcbhHinalgic9WfgOawcj;cbffhldndndndndnazaOco4fRbbaHcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgOco4gAaAciSgAE86bbawcj;cbfaifglcGfaoclfaAfgARbbaOcl4ciGgCaCciSgCE86bbalcVfaAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc7faAaCfgARbbaOciGgOaOciSgOE86bbalctfaAaOfgARbbaoRbegOco4gCaCciSgCE86bbalc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc93faAaCfgARbbaOciGgOaOciSgOE86bbalc94faAaOfgARbbaoRbdgOco4gCaCciSgCE86bbalc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc97faAaCfgARbbaOciGgOaOciSgOE86bbalc98faAaOfgORbbaoRbigoco4gAaAciSgAE86bbalc99faOaAfgORbbaocl4ciGgAaAciSgAE86bbalc9:faOaAfgORbbaocd4ciGgAaAciSgAE86bbalcufaOaAfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgOcl4gAaAcsSgAE86bbawcj;cbfaifglcGfaocwfaAfgARbbaOcsGgOaOcsSgOE86bbalcVfaAaOfgORbbaoRbegAcl4gCaCcsSgCE86bbalc7faOaCfgORbbaAcsGgAaAcsSgAE86bbalctfaOaAfgORbbaoRbdgAcl4gCaCcsSgCE86bbalc91faOaCfgORbbaAcsGgAaAcsSgAE86bbalc4faOaAfgORbbaoRbigAcl4gCaCcsSgCE86bbalc93faOaCfgORbbaAcsGgAaAcsSgAE86bbalc94faOaAfgORbbaoRblgAcl4gCaCcsSgCE86bbalc95faOaCfgORbbaAcsGgAaAcsSgAE86bbalc96faOaAfgORbbaoRbvgAcl4gCaCcsSgCE86bbalc97faOaCfgORbbaAcsGgAaAcsSgAE86bbalc98faOaAfgORbbaoRbogAcl4gCaCcsSgCE86bbalc99faOaCfgORbbaAcsGgAaAcsSgAE86bbalc9:faOaAfgORbbaoRbrgocl4gAaAcsSgAE86bbalcufaOaAfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaHcdfhHaiczfhlarao9RcL0mekkaiam6mvaoTmvdnakTmbawaPfRbbhHawcj;cbfhlashiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkkascefhsaohzaPcefgPad9hmbxikkcbc99arao9Radcaadca0ESEhoxlkaoaxad2fhCdnakmbadhlinaoTmlarao9Rax6mlaoaxfhoalcufglmbkaChoxekcbhmawcjdfhAinarao9Rax6miawamfRbbhHawcj;cbfhlaAhiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkaAcefhAaoaxfhoamcefgmad9hmbkaChokabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekc9:hokavcj;ebf8Kjjjjbaok;cseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklzNbb",e="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q:6dkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq:p9sqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:N8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhlaicefhodnaeTmbadTmbalc;WFbGglcjdalcjd6EhwcbhDinawaeaD9RaDawfae6Egqcsfglc9WGgkci2hxakcethmalcl4cifcd4hPabaDad2fhsakc;ab6hzcbhHincbhOaohAdndninaraA9RaP6meavcj;cbfaOak2fhCaAaPfhocbhidnazmbarao9Rc;Gb6mbcbhlinaCalfhidndndndndnaAalco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklbaoczfhokdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklzaoczfhokdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklaaoczfhokdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaoclfaYpQbfaXc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaocwfaYpQbfaXc:q:yjjbfRbbfhoxekaiaopbbbpkl8Waoczfhokalc;abfhialcjefak0meaihlarao9Rc;Fb0mbkkdnaiak9pmbaici4hlinarao9RcK6miaCaifhXdndndndndnaAaico4fRbbalcoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpkbbxikaXaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaXaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaXaopbbbpkbbaoczfhokalcdfhlaiczfgiak6mbkkaoTmeaohAaOcefgOclSmdxbkkc9:hoxlkdnakTmbavcjdfaHfhiavaHfpbdbhYcbhXinaiavcj;cbfaXfglpblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLalakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEalamfpblbg3cep9Ta3aQp9op9Hp9rg3alaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfhiaXczfgXak6mbkkaHclfgHad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfgDae6mbkkcbc99arao9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk::seHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),r=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var i=WebAssembly.validate(t)?c(e):c(n),s,o=WebAssembly.instantiate(i,{}).then(function(h){s=h.instance,s.exports.__wasm_call_ctors()});function c(h){for(var p=new Uint8Array(h.length),C=0;C<h.length;++C){var m=h.charCodeAt(C);p[C]=m>96?m-97:m>64?m-39:m+4}for(var y=0,C=0;C<h.length;++C)p[y++]=p[C]<60?r[p[C]]:(p[C]-60)*64+p[++C];return p.buffer.slice(0,y)}function A(h,p,C,m,y,v,S){var U=h.exports.sbrk,w=m+3&-4,M=U(w*y),_=U(v.length),k=new Uint8Array(h.exports.memory.buffer);k.set(v,_);var D=p(M,m,y,_,v.length);if(D==0&&S&&S(M,w,y),C.set(k.subarray(M,M+m*y)),U(M-U(0)),D!=0)throw new Error("Malformed buffer data: "+D)}var a={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},f={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},u=[],b=0;function d(h){var p={object:new Worker(h),pending:0,requests:{}};return p.object.onmessage=function(C){var m=C.data;p.pending-=m.count,p.requests[m.id][m.action](m.value),delete p.requests[m.id]},p}function E(h){for(var p="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(i)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+l.name+";"+A.toString()+l.toString(),C=new Blob([p],{type:"text/javascript"}),m=URL.createObjectURL(C),y=u.length;y<h;++y)u[y]=d(m);for(var y=h;y<u.length;++y)u[y].object.postMessage({});u.length=h,URL.revokeObjectURL(m)}function g(h,p,C,m,y){for(var v=u[0],S=1;S<u.length;++S)u[S].pending<v.pending&&(v=u[S]);return new Promise(function(U,w){var M=new Uint8Array(C),_=++b;v.pending+=h,v.requests[_]={resolve:U,reject:w},v.object.postMessage({id:_,count:h,size:p,source:M,mode:m,filter:y},[M.buffer])})}function l(h){var p=h.data;if(!p.id)return self.close();self.ready.then(function(C){try{var m=new Uint8Array(p.count*p.size);A(C,C.exports[p.mode],m,p.count,p.size,p.source,C.exports[p.filter]),self.postMessage({id:p.id,count:p.count,action:"resolve",value:m},[m.buffer])}catch(y){self.postMessage({id:p.id,count:p.count,action:"reject",value:y})}})}return{ready:o,supported:!0,useWorkers:function(h){E(h)},decodeVertexBuffer:function(h,p,C,m,y){A(s,s.exports.meshopt_decodeVertexBuffer,h,p,C,m,s.exports[a[y]])},decodeIndexBuffer:function(h,p,C,m){A(s,s.exports.meshopt_decodeIndexBuffer,h,p,C,m)},decodeIndexSequence:function(h,p,C,m){A(s,s.exports.meshopt_decodeIndexSequence,h,p,C,m)},decodeGltfBuffer:function(h,p,C,m,y,v){A(s,s.exports[f[y]],h,p,C,m,s.exports[a[v]])},decodeGltfBufferAsync:function(h,p,C,m,y){return u.length>0?g(h,p,C,f[m],a[y]):o.then(function(){var v=new Uint8Array(h*p);return A(s,s.exports[f[m]],v,h,p,C,s.exports[a[y]]),v})}}})();function fo(n){return"morphTargetDictionary"in n&&n.morphTargetDictionary!==void 0&&"morphTargetInfluences"in n&&Array.isArray(n.morphTargetInfluences)}const po={draco:"https://unpkg.com/three@0.182/examples/jsm/libs/draco/",ktx2:"https://unpkg.com/three@0.182.0/examples/jsm/libs/basis/",meshopt:!0};function vi(n={}){const e={...po,...n};let t=new Gn;const r=new Jr;if(r.setDecoderPath(e.draco),t.setDRACOLoader(r),e.renderer){const i=new We;i.setTranscoderPath(e.ktx2),i.detectSupport(e.renderer),t.setKTX2Loader(i)}e.meshopt&&t.setMeshoptDecoder(wi),on=t}let on=new Gn;on.setMeshoptDecoder(wi);class go extends Me{ready;gltf;constructor(e){super(),this.ready=this.asyncInit(e)}initObject(){return new se.Object3D}async asyncInit(e){if(kn(e)){console.log(`File: ${e}`),this.gltf=await on.loadAsync(e),this.bones={},this.skeletons=[],this.morphs={},this.gltf.scene.traverse(r=>{if(r.userData.a3js={objectA3:this},fo(r)){const{morphTargetDictionary:i,morphTargetInfluences:s}=r;Object.keys(i).forEach(o=>{const c=r.name+"."+o,A=i[o];this.morphs[c]={array:s,idx:A},console.log(`morphName="${c}"`)})}r instanceof se.Bone&&(this.bones[r.name]=r),r instanceof se.SkinnedMesh&&this.skeletons.push(r.skeleton)});const t={};this.gltf.animations.forEach(r=>{t[r.name]=new rn(r),console.log(`anim.name="${r.name}"`)}),this.setPoseMotions(t),this.object.add(this.gltf.scene)}else{const t=new se.BoxGeometry,r=new se.MeshStandardMaterial({color:16711680}),i=new se.Mesh(t,r);this.object.add(i)}return this}}class ki extends HTMLElement{ro;base;renderer;css2DRenderer;scene;camera;controller;camera3js;clock;_canvas;_css2DCanvas;constructor(e){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
|
|
1
|
+
"use strict";var qi=Object.create;var hn=Object.defineProperty;var Ki=Object.getOwnPropertyDescriptor;var zi=Object.getOwnPropertyNames;var Wi=Object.getPrototypeOf,Vi=Object.prototype.hasOwnProperty;var Yi=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zi(e))!Vi.call(r,n)&&n!==t&&hn(r,n,{get:()=>e[n],enumerable:!(i=Ki(e,n))||i.enumerable});return r};var Ji=(r,e,t)=>(t=r!=null?qi(Wi(r)):{},Yi(e||!r||!r.__esModule?hn(t,"default",{value:r,enumerable:!0}):t,r));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("three"),_n=require("fflate");function Xi(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const ae=Xi(m);function Ln(r){return typeof r=="string"}function tn(r){return r.isMesh===!0}function Zi(r){return r.type==="RoundedBoxGeometry"}function $i(r){return r.type==="BoxGeometry"}function er(r){return r.type==="SphereGeometry"}function tr(r){return r.type==="IcosahedronGeometry"}function nr(r){return r.type==="CylinderGeometry"}function ir(r){return r.type==="CapsuleGeometry"}function rr(r){return r.isBone===!0}function or(r){return r.isPerspectiveCamera===!0}class ce{_x;_y;_z;get x(){return this._x}get y(){return this._y}get z(){return this._z}constructor(e,t,i){typeof e=="number"?(this._x=e,this._y=t,this._z=i):typeof e>"u"?this._x=this._y=this._z=0:(this._x=e.x,this._y=e.y,this._z=e.z)}clone(){return new ce(this)}normalize(){const e=this._x*this._x+this._y*this._y+this._z*this._z,t=Math.sqrt(e);return t!==0?(this._x/=t,this._y/=t,this._z/=t):console.warn("Vec3.normalize."),this}negate(){return this._x*=-1,this._y*=-1,this._z*=-1,this}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)}set(e,t,i){return typeof e=="number"?(this._x=e,this._y=t,this._z=i):(this._x=e.x,this._y=e.y,this._z=e.z),this}add(e,t,i){return typeof e=="number"?(this._x+=e,this._y+=t,this._z+=i):(this._x+=e.x,this._y+=e.y,this._z+=e.z),this}sub(e,t,i){return typeof e=="number"?(this._x-=e,this._y-=t,this._z-=i):(this._x-=e.x,this._y-=e.y,this._z-=e.z),this}scale(e){return this._x*=e,this._y*=e,this._z*=e,this}cross(e,t){return this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this}apply(e,t,i,n){const s=new Ce;typeof e=="number"?s.set(e,t,i,n):s.set(e);const o=new Ce(this._x,this._y,this._z,0),c=new Ce(s).conjugate();return s.mul(o).mul(c),this._x=s.x,this._y=s.y,this._z=s.z,this}lerp(e,t,i){this._x=(1-i)*e.x+i*t.x,this._y=(1-i)*e.y+i*t.y,this._z=(1-i)*e.z+i*t.z}}class Ce{_x;_y;_z;_w;get x(){return this._x}get y(){return this._y}get z(){return this._z}get w(){return this._w}constructor(e,t,i,n){typeof e=="number"?(this._x=e,this._y=t,this._z=i,this._w=n):typeof e>"u"?(this._x=this._y=this._z=0,this._w=1):(this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w)}clone(){return new Ce(this)}normalize(){const e=this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w,t=Math.sqrt(e);return t!==0?(this._x/=t,this._y/=t,this._z/=t,this._w/=t):console.warn("Quat.normalize."),this}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this}set(e,t,i,n){return typeof e=="number"?(this._x=e,this._y=t,this._z=i,this._w=n):(this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w),this}mul(e,t,i,n){const s=new Ce(this),o=new Ce;return typeof e=="number"?o.set(e,t,i,n):o.set(e),this._x=s.w*o.x+s.x*o.w+s.y*o.z-s.z*o.y,this._y=s.w*o.y-s.x*o.z+s.y*o.w+s.z*o.x,this._z=s.w*o.z+s.x*o.y-s.y*o.x+s.z*o.w,this._w=s.w*o.w-s.x*o.x-s.y*o.y-s.z*o.z,this}lerp(e,t,i){this._x=(1-i)*e.x+i*t.x,this._y=(1-i)*e.y+i*t.y,this._z=(1-i)*e.z+i*t.z,this._w=(1-i)*e.w+i*t.w}slerp(e,t,i){if(i<0||i>1){console.warn("Quat.slerp(): t must be in [0,1]");return}const n=e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w;if(n<.9995){const s=Math.acos(n),o=Math.sin((1-i)*s)/Math.sin(s),c=Math.sin(i*s)/Math.sin(s);this._x=o*e.x+c*t.x,this._y=o*e.y+c*t.y,this._z=o*e.z+c*t.z,this._w=o*e.w+c*t.w}else{this._x=(1-i)*e.x+i*t.x,this._y=(1-i)*e.y+i*t.y,this._z=(1-i)*e.z+i*t.z,this._w=(1-i)*e.w+i*t.w;const s=Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w);s<1e-4?(console.warn("Quat.slerp(); ???!"),this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w):(this._x*=1/s,this._y*=1/s,this._z*=1/s,this._w*=1/s)}}}function st(r,e,t){t.normalize();const i=r.clone().sub(e).normalize(),n=new ce().cross(i,t).normalize(),s=new ce().cross(n,i),o=n.x,c=s.x,A=-i.x,a=n.y,f=s.y,u=-i.y,b=n.z,d=s.z,I=-i.z,g=o+f+I;if(g>0){const l=Math.sqrt(g+1)*2;return new Ce((d-u)/l,(A-b)/l,(a-c)/l,.25*l)}else if(o>f&&o>I){const l=Math.sqrt(1+o-f-I)*2;return new Ce(.25*l,(c+a)/l,(A+b)/l,(d-u)/l)}else if(f>I){const l=Math.sqrt(1+f-o-I)*2;return new Ce((c+a)/l,.25*l,(u+d)/l,(A-b)/l)}else{const l=Math.sqrt(1+I-o-f)*2;return new Ce((A+b)/l,(u+d)/l,.25*l,(a-c)/l)}}function At(r,e="XYZ"){const t=new Ce(0,0,0,1);for(let i=0;i<3;i++)switch(e.charAt(i)){case"X":t.mul(new Ce(Math.sin(r.x),0,0,Math.cos(r.x)));break;case"Y":t.mul(new Ce(0,Math.sin(r.y),0,Math.cos(r.y)));break;case"Z":t.mul(new Ce(0,0,Math.sin(r.z),Math.cos(r.z)));break}return t}class He{loc;quat;scale;constructor(){this.loc=new ce,this.quat=new Ce,this.scale=new ce(1,1,1)}set(e){if(e instanceof He)this.loc.set(e.loc),this.quat.set(e.quat),this.scale.set(e.scale);else{const t=e.trans;this.loc.set(t.loc),this.quat.set(t.quat),this.scale.set(t.scale)}return this}write(e){e instanceof xe?(e.object.position.set(this.loc.x,this.loc.y,this.loc.z),e.object.quaternion.set(this.quat.x,this.quat.y,this.quat.z,this.quat.w),e.object.scale.set(this.scale.x,this.scale.y,this.scale.z)):(e.position.set(this.loc.x,this.loc.y,this.loc.z),e.quaternion.set(this.quat.x,this.quat.y,this.quat.z,this.quat.w),e.scale.set(this.scale.x,this.scale.y,this.scale.z))}blend(e,t){return this.loc.lerp(this.loc,e.loc,t),this.quat.slerp(this.quat,e.quat,t),this.scale.lerp(this.scale,e.scale,t),this}clone(){const e=new He;return e.set(this),e}}const Wt={rigidBody:"dynamic",collider:"solid",meshCollider:"convex_hull",mass:1,friction:.5,restitution:.5,membership:1,filter:1,collisionDetection:!1};let Ge;const tt=new Map;class gt{static RAPIER;isInitialized=!1;constructor(){}async init(){if(!gt.RAPIER){const e=await import("@dimforge/rapier3d-compat");await e.init(),gt.RAPIER=e,Ge=e,this.isInitialized=!0}}createWorld(e){let t=.016666666666666666;this.isRapierWorldOption(e)&&(t=e.timestep);const i=new Ge.World(e.gravity);return new xn(i,t)}isRapierWorldOption(e){return"timestep"in e}}class xn{world;timestep;collisionEventQueue;constructor(e,t){this.world=e,this.timestep=t,this.collisionEventQueue=new Ge.EventQueue(!0),this.world.integrationParameters.dt=this.timestep}add(e){e.addOneselfToPhysics(this)}remove(e){e.removeOneselfFromPhysics(this)}update(e){const t=Math.ceil(e/this.timestep);for(let i=0;i<t;i++)this.world.step(this.collisionEventQueue)}getCollisions(){const e=[];return this.collisionEventQueue.drainCollisionEvents((t,i,n)=>{const s=tt.get(t),o=tt.get(i);s&&o&&e.push({objectA:s,partOfA:t,objectB:o,partOfB:i,started:n})}),e}}class fn{trans;objectA3;bodyDesc;body;colliderDescs;colliders;completeOption;constructor(e={}){this.completeOption={...Wt,...e},this.trans=new He,this.colliderDescs=[],this.colliders=[]}makeBodyDesc(){let e;switch(this.completeOption.rigidBody){case"dynamic":e=Ge.RigidBodyDesc.dynamic();break;case"kinematic":e=Ge.RigidBodyDesc.kinematicPositionBased();break;case"fixed":e=Ge.RigidBodyDesc.fixed();break}return e.setTranslation(this.trans.loc.x,this.trans.loc.y,this.trans.loc.z),e.setRotation({x:this.trans.quat.x,y:this.trans.quat.y,z:this.trans.quat.z,w:this.trans.quat.w}),e}configColliderDescs(){if(!this.objectA3)return;const e=this.completeOption,t=[];this.objectA3.object.traverse(n=>{if(tn(n)){const s=Ar(n.geometry),o=e.membership<<16|e.filter;if(s)s.colliderDesc.setCollisionGroups(o),e.collisionDetection&&s.colliderDesc.setActiveEvents(Ge.ActiveEvents.COLLISION_EVENTS),this.colliderDescs.push(s.colliderDesc),s.colliderDesc.setRestitution(e.restitution).setFriction(e.friction),t.push(s.volume);else{let c,A;switch(e.meshCollider){case"tri_mesh":c=sr(n),A=dn(n.geometry);break;case"convex_hull":c=ar(n),A=dn(n.geometry);break}c&&(c.setCollisionGroups(o),e.collisionDetection&&c.setActiveEvents(Ge.ActiveEvents.COLLISION_EVENTS),this.colliderDescs.push(c),t.push(A))}}});let i=t.reduce((n,s)=>n+s,0);for(let n=0;n<this.colliderDescs.length;n++)this.colliderDescs[n].setRestitution(e.restitution),this.colliderDescs[n].setFriction(e.friction),this.colliderDescs[n].setMass(e.mass*(t[n]/i))}init(e,t){this.trans.set(e),this.objectA3=t,this.colliderDescs=[],this.colliders=[],this.bodyDesc=this.makeBodyDesc(),this.configColliderDescs()}addOneselfToPhysics(e){this.bodyDesc&&(this.body=e.world.createRigidBody(this.bodyDesc),this.colliderDescs.forEach(t=>{const i=e.world.createCollider(t,this.body);this.colliders.push(i),this.objectA3&&tt.set(i.handle,this.objectA3)}))}removeOneselfFromPhysics(e){this.body&&e.world.removeRigidBody(this.body),this.colliders.forEach(t=>{e.world.removeCollider(t,!1),tt.delete(t.handle)})}setLocation(e){}setLocationNow(e){this.body?this.body.setTranslation(e,!0):this.bodyDesc?.setTranslation(e.x,e.y,e.z),this.trans.loc.set(e)}setQuat(e){}setQuatNow(e){this.body?this.body.setRotation(e,!0):this.bodyDesc?.setRotation(e),this.trans.quat.set(e)}setScale(e){}setScaleNow(e){}setLinvel(e){this.body?this.body.setLinvel({x:e.x,y:e.y,z:e.z},!0):this.bodyDesc?.setLinvel(e.x,e.y,e.z)}setAngvel(e){this.body?this.body.setAngvel({x:e.x,y:e.y,z:e.z},!0):this.bodyDesc?.setAngvel({x:e.x,y:e.y,z:e.z})}resetForce(){this.body?.resetForces(!0)}addForce(e){this.body?.addForce({x:e.x,y:e.y,z:e.z},!0)}addForceAtPoint(e,t){this.body?.addForceAtPoint({x:e.x,y:e.y,z:e.z},{x:t.x,y:t.y,z:t.z},!0)}resetTorque(){this.body?.resetTorques(!0)}addTorque(e){this.body?.addTorque({x:e.x,y:e.y,z:e.z},!0)}applyImpulse(e){this.body?.applyImpulse({x:e.x,y:e.y,z:e.z},!0)}applyImpulseAtPoint(e,t){this.body?.applyImpulseAtPoint({x:e.x,y:e.y,z:e.z},{x:t.x,y:t.y,z:t.z},!0)}applyTorqueImpulse(e){this.body?.applyTorqueImpulse({x:e.x,y:e.y,z:e.z},!0)}update(e){if(this.body){const t=this.body.translation();this.trans.loc.set(t.x,t.y,t.z);const i=this.body.rotation();this.trans.quat.set(i.x,i.y,i.z,i.w)}}}function sr(r){let e=null;if(tn(r)){const t=r;t.updateWorldMatrix(!0,!0);const i=t.geometry.clone();i.applyMatrix4(t.matrixWorld);const n=i.attributes.position.array;let s=i.index?i.index.array:null;if(s)s instanceof Uint32Array||(s=new Uint32Array(s));else{const o=i.attributes.position.count;s=new Uint32Array(o);for(let c=0;c<o;c++)s[c]=c}n instanceof Float32Array&&(e=Ge.ColliderDesc.trimesh(n,s))}return e}function ar(r){let e=null;if(tn(r)){const t=r;t.updateWorldMatrix(!0,!0);const i=t.geometry.clone();i.applyMatrix4(t.matrixWorld);const n=i.attributes.position.array;n instanceof Float32Array&&(e=Ge.ColliderDesc.convexHull(n))}return e}function dn(r){const e=r.attributes.position;if(!e)throw new Error("position attribute not found");const t=r.index,i=e.array;let n=0;const s=new ae.Vector3,o=new ae.Vector3,c=new ae.Vector3;if(t){const A=t.array;for(let a=0;a<A.length;a+=3){const f=A[a]*3,u=A[a+1]*3,b=A[a+2]*3;s.set(i[f],i[f+1],i[f+2]),o.set(i[u],i[u+1],i[u+2]),c.set(i[b],i[b+1],i[b+2]),n+=s.dot(o.clone().cross(c))}}else for(let A=0;A<i.length;A+=9)s.set(i[A],i[A+1],i[A+2]),o.set(i[A+3],i[A+4],i[A+5]),c.set(i[A+6],i[A+7],i[A+8]),n+=s.dot(o.clone().cross(c));return Math.abs(n)/6}function Ar(r){if(Zi(r)){const e=r.parameters,t=typeof e?.width=="number"?e.width/2:.5,i=typeof e?.height=="number"?e.height/2:.5,n=typeof e?.depth=="number"?e.depth/2:.5,s=.1;return{colliderDesc:Ge.ColliderDesc.roundCuboid(t-s,i-s,n-s,s),volume:2*t*2*i*2*n}}else if($i(r)){const e=r.parameters,t=typeof e?.width=="number"?e.width/2:.5,i=typeof e?.height=="number"?e.height/2:.5,n=typeof e?.depth=="number"?e.depth/2:.5;return{colliderDesc:Ge.ColliderDesc.cuboid(t,i,n),volume:2*t*2*i*2*n}}else if(er(r)){const e=r.parameters,t=typeof e?.radius=="number"?e.radius:1;return{colliderDesc:Ge.ColliderDesc.ball(t),volume:4/3*Math.PI*t*t*t}}else if(tr(r)){const e=r.parameters,t=typeof e?.radius=="number"?e.radius:1;return{colliderDesc:Ge.ColliderDesc.ball(t),volume:4/3*Math.PI*t*t*t}}else if(nr(r)){const e=r.parameters,t=typeof e?.radiusBottom=="number"?e.radiusBottom:.5,i=typeof e?.height=="number"?e.height:.5;return{colliderDesc:Ge.ColliderDesc.cylinder(i/2,t),volume:Math.PI*t*t*i}}else if(ir(r)){const e=r.parameters,t=typeof e?.radius=="number"?e.radius:.5,i=typeof e?.height=="number"?e.height:.5;return{colliderDesc:Ge.ColliderDesc.capsule(i/2,t),volume:4/3*Math.PI*t*t*t+Math.PI*t*t*i}}return null}const Vt=new gt;async function cr(){await Vt.init()}class Nn{scene;objects;avatar;physicsWorld=null;physicsDt=1/60;collisionListener;rapierLines;constructor(){this.scene=new ae.Scene,this.objects=[],Vt.isInitialized&&(this.physicsWorld=Vt.createWorld({gravity:{x:0,y:-9.81,z:0},timestep:this.physicsDt}))}add(e){if(this.scene.add(e.object),this.objects.push(e),e.scene=this,this.physicsWorld){e.transformMotion.addOneselfToPhysics(this.physicsWorld);for(const t of Object.values(e.poseMotions))t.addOneselfToPhysics(this.physicsWorld)}}remove(e){this.scene.remove(e.object);{const t=this.objects.indexOf(e);this.objects[t]=this.objects[this.objects.length-1],this.objects.pop()}if(e.scene=void 0,this.physicsWorld){e.transformMotion.removeOneselfFromPhysics(this.physicsWorld);for(const t of Object.values(e.poseMotions))t.removeOneselfFromPhysics(this.physicsWorld)}}setAvatar(e){this.avatar=e}setCollisionListener(e){this.collisionListener=e}update(e){if(this.physicsWorld){this.physicsWorld.update(e);const t=this.physicsWorld.getCollisions();if(t.forEach(i=>{i.objectA.handleCollision(i.objectB,i.started,i.partOfA,i.partOfB),i.objectB.handleCollision(i.objectA,i.started,i.partOfB,i.partOfA)}),this.collisionListener&&t.length>0&&this.collisionListener(t),this.rapierLines&&this.physicsWorld instanceof xn){const{vertices:i,colors:n}=this.physicsWorld.world.debugRender();this.rapierLines.geometry.setAttribute("position",new ae.BufferAttribute(i,3)),this.rapierLines.geometry.setAttribute("color",new ae.BufferAttribute(n,4))}}for(const t of this.objects)t.update(e)}rapierDebug(e){e?(this.rapierLines=new ae.LineSegments(new ae.BufferGeometry,new ae.LineBasicMaterial({vertexColors:!0})),this.scene.add(this.rapierLines)):this.rapierLines&&(this.scene.remove(this.rapierLines),this.rapierLines=void 0)}}class Et{trans;constructor(){this.trans=new He}init(e,t){this.trans.set(e)}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}setLocation(e){this.trans.loc.set(e)}setLocationNow(e){this.trans.loc.set(e)}setQuat(e){this.trans.quat.set(e)}setQuatNow(e){this.trans.quat.set(e)}setScale(e){this.trans.scale.set(e)}setScaleNow(e){this.trans.scale.set(e)}setLinvel(e){}setAngvel(e){}resetForce(){}addForce(e){}addForceAtPoint(e,t){}resetTorque(){}addTorque(e){}applyImpulse(e){}applyImpulseAtPoint(e,t){}applyTorqueImpulse(e){}update(e){}}class lr{trans;constructor(){this.trans=new He}init(e,t){this.trans.set(e)}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}setLocation(e){}setLocationNow(e){}setQuat(e){}setQuatNow(e){}setScale(e){}setScaleNow(e){}setLinvel(e){}setAngvel(e){}resetForce(){}addForce(e){}addForceAtPoint(e,t){}resetTorque(){}addTorque(e){}applyImpulse(e){}applyImpulseAtPoint(e,t){}applyTorqueImpulse(e){}update(e){}}class Dn{firstTrans;trans;lastTrans;nowTime;duration;constructor(){this.firstTrans=new He,this.trans=new He,this.lastTrans=new He,this.nowTime=0,this.duration=1}init(e,t){this.firstTrans.set(e),this.trans.set(e),this.lastTrans.set(e)}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}setLocation(e){this.firstTrans.set(this.trans),this.lastTrans.loc.set(e),this.nowTime=0}setLocationNow(e){this.setLocation(e),this.nowTime=1}setQuat(e){this.firstTrans.set(this.trans),this.lastTrans.quat.set(e),this.nowTime=0}setQuatNow(e){this.setQuat(e),this.nowTime=1}setScale(e){this.firstTrans.set(this.trans),this.lastTrans.scale.set(e),this.nowTime=0}setScaleNow(e){this.setScale(e),this.nowTime=1}setLinvel(e){}setAngvel(e){}resetForce(){}addForce(e){}addForceAtPoint(e,t){}resetTorque(){}addTorque(e){}applyImpulse(e){}applyImpulseAtPoint(e,t){}applyTorqueImpulse(e){}smoothstep(e){return e*e*(3-2*e)}update(e){this.nowTime+=e,this.nowTime>this.duration&&(this.nowTime=this.duration);const t=this.nowTime/this.duration,i=this.smoothstep(t);this.trans.set(this.firstTrans),this.trans.blend(this.lastTrans,i)}}const Bt=new ce,Tt=new ce;class ur extends Et{up;target;constructor(e){super(),this.up=new ce(0,1,0),this.target=e}setTarget(e){this.target=e}init(e,t){super.init(e,t),t.upVector?this.up=t.upVector:this.up=xe.defaultUpVector}setQuat(e){}setQuatNow(e){}update(e){Bt.set(this.trans.loc),Tt.set(this.target.trans.loc);const t=st(Bt,Tt,this.up);this.trans.quat.set(t)}}class hr extends Dn{up;target;constructor(e){super(),this.up=new ce(0,1,0),this.target=e}init(e,t){super.init(e,t),t.upVector?this.up=t.upVector:this.up=xe.defaultUpVector}setQuat(e){}setQuatNow(e){}update(e){super.update(e),Bt.set(this.trans.loc),Tt.set(this.target.trans.loc);const t=st(Bt,Tt,this.up);this.trans.quat.set(t)}}const fr={offset:.01,auto:!0,height:1.5,radius:.3};class Fn{trans;objectA3;completeOption;controller;bodyDesc;body;colliderDesc;collider;capsuleCenter;nextLocation;tmpV1;tmpV2;constructor(e={}){this.completeOption={...fr,...e},this.trans=new He,this.capsuleCenter=new ce,this.nextLocation=new ce,this.tmpV1=new ce,this.tmpV2=new ce}init(e,t){if(this.trans.set(e),this.completeOption.auto){const i=new ae.Box3().setFromObject(t.object),n=new ae.Vector3;i.getSize(n),this.completeOption.radius=Math.max(n.x,n.z)/2,this.completeOption.height=n.y-this.completeOption.radius*2,i.getCenter(n),this.capsuleCenter.set(n)}this.bodyDesc=Ge.RigidBodyDesc.kinematicPositionBased(),this.colliderDesc=Ge.ColliderDesc.capsule(this.completeOption.height,this.completeOption.radius),this.bodyDesc.setTranslation(e.loc.x,e.loc.y,e.loc.z),this.trans.set(t),this.bodyDesc.setRotation({x:e.quat.x,y:e.quat.y,z:e.quat.z,w:e.quat.w})}addOneselfToPhysics(e){this.controller=e.world.createCharacterController(this.completeOption.offset),this.bodyDesc&&(this.body=e.world.createRigidBody(this.bodyDesc)),this.colliderDesc&&(this.collider=e.world.createCollider(this.colliderDesc,this.body)),this.collider&&this.objectA3&&tt.set(this.collider.handle,this.objectA3)}removeOneselfFromPhysics(e){this.body&&e.world.removeRigidBody(this.body),this.collider&&(e.world.removeCollider(this.collider,!1),tt.delete(this.collider.handle))}setLocation(e){this.tmpV1.set(e),this.tmpV1.add(this.capsuleCenter),this.nextLocation.set(this.tmpV1)}setLocationNow(e){this.tmpV1.set(e),this.tmpV1.add(this.capsuleCenter),e=this.tmpV1,this.body?this.body.setNextKinematicTranslation(e):this.bodyDesc?.setTranslation(e.x,e.y,e.z),this.trans.loc.set(e),this.nextLocation.set(e)}setQuat(e){this.body?this.body.setRotation(e,!1):this.bodyDesc?.setRotation(e),this.trans.loc.set(e)}setQuatNow(e){this.body?this.body.setRotation(e,!1):this.bodyDesc?.setRotation(e),this.trans.quat.set(e)}setScale(e){}setScaleNow(e){}setLinvel(e){}setAngvel(e){}resetForce(){}addForce(e){}addForceAtPoint(e,t){}resetTorque(){}addTorque(e){}applyImpulse(e){}applyImpulseAtPoint(e,t){}applyTorqueImpulse(e){}isGrounded(){return this.controller?this.controller.computedGrounded():!1}update(e){if(!this.body||!this.controller||!this.collider)return;this.trans.quat.set(this.body.rotation()),this.tmpV1.set(this.body.translation()),this.tmpV2.set(this.nextLocation),this.tmpV2.sub(this.tmpV1),this.controller.computeColliderMovement(this.collider,this.tmpV2);const t=this.controller.computedMovement();this.tmpV1.add(t.x,t.y,t.z),this.body.setNextKinematicTranslation(this.tmpV1),this.tmpV1.sub(this.capsuleCenter),this.trans.loc.set(this.tmpV1),this.nextLocation.set(this.tmpV1)}}const H={v0:new ce,v1:new ce,v2:new ce,v3:new ce,v4:new ce,q0:new Ce,q1:new Ce,q2:new Ce,q3:new Ce,q4:new Ce,t0:new He,t1:new He,t2:new He,t3:new He,t4:new He};function dr(r){return new Promise(e=>{setTimeout(()=>{e()},r)})}async function Mn(r){const t=await(await fetch(r)).arrayBuffer(),i=await new Promise((n,s)=>{_n.unzip(new Uint8Array(t),(o,c)=>{o?s(o):n(c)})});return{zipUrl:r,unzipped:i}}function nn(r,e){if(e=e.replace(/^\.\//,"").replace(/^\//,""),r.unzipped[e])return _n.strFromU8(r.unzipped[e]);throw new Error(`readStringFromUnzippedA3(): no file at ${e}`)}function pr(r,e){if(e=e.replace(/^\.\//,"").replace(/^\//,""),r.unzipped[e]){const t=Er(e);return new Blob([new Uint8Array(r.unzipped[e])],{type:t})}else throw new Error(`readBlobFromUnzippedA3(): no file at ${e}`)}const gr={"image/png":/\.png$/i,"image/jpeg":/\.(jpg|jpeg)$/i,"image/gif":/\.gif$/i,"model/vrml":/\.wrl$/i,"application/xml":/\.xml$/i,"application/octet-stream":/\.bvh/i,"audio/x-wav":/\.wav/i,"audio/mpeg":/\.mp3/i,"audio/ogg":/\.ogg/i,"text/plain":/\.(txt|text)$/i,"model/gltf+json":/\.gltf$/i,"model/gltf-binary":/\.glb$/i};function Er(r){for(const[e,t]of Object.entries(gr))if(t.test(r))return e;return"application/octet-stream"}function wt(r,e){if(!e)return r;const t={...r};for(const i in e)typeof r[i]=="object"&&typeof e[i]=="object"?t[i]=wt(r[i],e[i]):t[i]=e[i];return t}class xe{static defaultRotationOrder="XYZ";static defaultUpVector=new ce(0,1,0);rotationOrder;upVector;object;scene;balloon;transformMotion;poseMotions;statePoseMotion;emotePoseMotion;currentPoseMotion;parent;children=[];clickListener;skeletons;bones;morphs;morphsOverwrite;constructor(e){this.skeletons=[],this.bones={},this.morphs={},this.morphsOverwrite=!1,this.object=this.initObject(e),this.object.traverse(t=>{t.userData.a3js={objectA3:this}}),this.transformMotion=this.initTransformMotion(e),this.poseMotions=this.initPoseMotions(e)}initTransformMotion(e){return new Et}setTransformMotion(e){H.t0.set(this.transformMotion.trans),e.init(H.t0,this),this.transformMotion=e}getTransformMotion(){return this.transformMotion}setTransformMotionMode(e,t){if(e==="Default")this.setTransformMotion(new Et);else if(e==="Interpolation")this.setTransformMotion(new Dn);else if(e==="Billboard")this.setTransformMotion(new ur(t));else if(e==="InterpolationBillboard")this.setTransformMotion(new hr(t));else if(e==="SimplePhysics"){const i={...Wt,...t};this.setTransformMotion(new fn(i))}}initPoseMotions(e){return{}}setPoseMotions(e){this.poseMotions=e}getPoseMotions(){return this.poseMotions}getPoseMotion(e){return this.poseMotions[e]}addPoseMotion(e,t){this.poseMotions[e]=t}removePoseMotion(e){const t=this.poseMotions[e];return delete this.poseMotions[e],t}getPoseMotionNames(){return Object.keys(this.poseMotions)}setState(e){const t=this.poseMotions[e];t&&(this.statePoseMotion=t,this.statePoseMotion.playCount=0,this.statePoseMotion.time=0,this.currentPoseMotion=this.statePoseMotion)}setEmote(e){this.emotePoseMotion=this.poseMotions[e],this.emotePoseMotion&&(this.emotePoseMotion.playCount=0,this.emotePoseMotion.time=0,this.currentPoseMotion=this.emotePoseMotion)}setMorphsOverwrite(e){this.morphsOverwrite=e}morph(e,t){if(e in this.morphs){const{array:i,idx:n}=this.morphs[e];i[n]=t}}getMorphNames(){return Object.keys(this.morphs)}initSimplePhysics(e){const t={...Wt,...e};this.setTransformMotion(new fn(t)),this.poseMotions={}}pose={};update(e){this.transformMotion.update(e),this.transformMotion.trans.write(this);let t;if(this.emotePoseMotion&&this.emotePoseMotion.playCount<=0?(t=this.emotePoseMotion.update(e),this.emotePoseMotion.playCount>0&&(this.emotePoseMotion.cleanup3D(this),this.emotePoseMotion=void 0,this.statePoseMotion&&this.statePoseMotion.prepare3D(this))):this.statePoseMotion&&(t=this.statePoseMotion.update(e)),t&&this.bones)for(const[i,n]of Object.entries(t)){const s=this.bones[i];if(s&&(n.loc&&s.position.set(n.loc.x,n.loc.y,n.loc.z),n.quat&&s.quaternion.set(n.quat.x,n.quat.y,n.quat.z,n.quat.w),n.scale&&s.scale.set(n.scale.x,n.scale.y,n.scale.z)),!this.morphsOverwrite&&n.morphs){for(const o of n.morphs)for(const c of Object.keys(this.morphs))if(c.startsWith(o.name)){const{array:A}=this.morphs[c];for(let a=0;a<A.length;a++)A[a]=o.vals[a];break}}}this.object.updateMatrixWorld(!0),this.skeletons.forEach(i=>{i.update()}),this.children.forEach(i=>{i.update(e)})}add(e){if(e.scene){console.warn("ObjectA3.add(obj) is ignored.");return}if(e.parent){console.warn("ObjectA3.add(obj) is ignored.");return}this.children.push(e),e.parent=this,this.object.add(e.object)}remove(e){if(e.parent!==this){console.warn("ObjectA3.remove(obj) is ignored.");return}const t=this.children.indexOf(e);this.children.splice(t,1),e.parent=void 0,this.object.remove(e.object)}setBalloon(e){this.balloon?this.balloon.message=e:this.balloon=new Ir(e)}setClickListener(e){this.clickListener=e}handleCollision(e,t,i,n){}async clicked(){this.clickListener&&await this.clickListener(this)}get trans(){return this.transformMotion.trans.clone()}get loc(){return this.trans.loc}setLocation(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.setLocation(H.v0)}setLocationNow(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.setLocationNow(H.v0)}get quat(){return this.trans.quat}setQuat(e,t,i,n){typeof e=="number"?H.q0.set(e,t,i,n):H.q0.set(e),this.transformMotion.setQuat(H.q0)}setQuatNow(e,t,i,n){typeof e=="number"?H.q0.set(e,t,i,n):H.q0.set(e),this.transformMotion.setQuatNow(H.q0)}get scale(){return this.trans.scale}setScale(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.setScale(H.v0)}setScaleNow(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.setScaleNow(H.v0)}setRotation(e,t,i){const n=new ce;typeof e=="number"?n.set(e,t,i):n.set(e),n.scale(Math.PI/360);const s=this.rotationOrder?this.rotationOrder:xe.defaultRotationOrder,o=At(n,s);this.setQuat(o)}setRotationNow(e,t,i){const n=new ce;typeof e=="number"?n.set(e,t,i):n.set(e);const s=this.rotationOrder?this.rotationOrder:xe.defaultRotationOrder,o=new Ce(0,0,0,1);for(let c=0;c<3;c++)switch(s.charAt(c)){case"X":o.mul(new Ce(Math.sin(n.x),0,0,Math.cos(n.x)));break;case"Y":o.mul(new Ce(0,Math.sin(n.y),0,Math.cos(n.y)));break;case"Z":o.mul(new Ce(0,0,Math.sin(n.z),Math.cos(n.z)));break}this.setQuatNow(o)}lookAt(e,t,i){const n=new ce;typeof e=="number"?n.set(e,t,i):e instanceof xe?n.set(e.loc):n.set(e);const s=this.upVector?this.upVector:xe.defaultUpVector,o=st(this.loc,n,s);this.setQuat(o)}lookAtNow(e,t,i){const n=new ce;typeof e=="number"?n.set(e,t,i):e instanceof xe?n.set(e.loc):n.set(e);const s=this.upVector?this.upVector:xe.defaultUpVector,o=st(this.loc,n,s);this.setQuatNow(o)}getUnitVecX(){return new ce(1,0,0).apply(this.object.quaternion)}getUnitVecY(){return new ce(0,1,0).apply(this.object.quaternion)}getUnitVecZ(){return new ce(0,0,1).apply(this.object.quaternion)}addLocation(e,t,i){const n=new ce;n.set(this.loc),typeof e=="number"?n.add(e,t,i):n.add(e),this.setLocation(n)}addLocationNow(e,t,i){const n=new ce;n.set(this.loc),typeof e=="number"?n.add(e,t,i):n.add(e),this.setLocationNow(n)}mulQuat(e,t,i,n){const s=new Ce;s.set(this.quat),typeof e=="number"?s.mul(e,t,i,n):s.mul(e),this.setQuat(s)}mulQuatNow(e,t,i,n){const s=new Ce;s.set(this.quat),typeof e=="number"?s.mul(e,t,i,n):s.mul(e),this.setQuatNow(s)}mulRotation(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),H.v0.scale(Math.PI/360);const n=this.rotationOrder?this.rotationOrder:xe.defaultRotationOrder,s=At(H.v0,n);H.q0.set(this.quat),H.q0.mul(s),this.setQuat(H.q0)}mulRotationNow(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),H.v0.scale(Math.PI/360);const n=this.rotationOrder?this.rotationOrder:xe.defaultRotationOrder,s=At(H.v0,n);H.q0.set(this.quat),H.q0.mul(s),this.setQuatNow(H.q0)}mulScale(e,t,i){H.v0.set(this.scale),typeof e=="number"?H.v0.set(H.v0.x*e,H.v0.y*t,H.v0.z*i):H.v0.set(H.v0.x*e.x,H.v0.y*e.y,H.v0.z*e.z),this.setScale(H.v0)}mulScaleNow(e,t,i){H.v0.set(this.scale),typeof e=="number"?H.v0.set(H.v0.x*e,H.v0.y*t,H.v0.z*i):H.v0.set(H.v0.x*e.x,H.v0.y*e.y,H.v0.z*e.z),this.setScaleNow(H.v0)}moveForward(e){H.v0.set(this.getUnitVecZ()),H.v0.scale(e),this.addLocation(H.v0)}moveForwardNow(e){H.v0.set(this.getUnitVecZ()),H.v0.scale(e),this.addLocationNow(H.v0)}moveBackward(e){H.v0.set(this.getUnitVecZ()),H.v0.scale(-e),this.addLocation(H.v0)}moveBackwardNow(e){H.v0.set(this.getUnitVecZ()),H.v0.scale(-e),this.addLocationNow(H.v0)}moveRight(e){H.v0.set(this.getUnitVecX()),H.v0.scale(-e),this.addLocation(H.v0)}moveRightNow(e){H.v0.set(this.getUnitVecX()),H.v0.scale(-e),this.addLocationNow(H.v0)}moveLeft(e){H.v0.set(this.getUnitVecX()),H.v0.scale(e),this.addLocation(H.v0)}moveLeftNow(e){H.v0.set(this.getUnitVecX()),H.v0.scale(e),this.addLocationNow(H.v0)}moveUp(e){H.v0.set(this.getUnitVecY()),H.v0.scale(e),this.addLocation(H.v0)}moveUpNow(e){H.v0.set(this.getUnitVecY()),H.v0.scale(e),this.addLocationNow(H.v0)}moveDown(e){H.v0.set(this.getUnitVecY()),H.v0.scale(-e),this.addLocation(H.v0)}moveDownNow(e){H.v0.set(this.getUnitVecY()),H.v0.scale(-e),this.addLocationNow(H.v0)}turnUp(e){this.mulRotation(-e,0,0)}turnUpNow(e){this.mulRotationNow(-e,0,0)}turnDown(e){this.mulRotation(e,0,0)}turnDownNow(e){this.mulRotationNow(e,0,0)}turnRight(e){this.mulRotation(0,-e,0)}turnRightNow(e){this.mulRotationNow(0,-e,0)}turnLeft(e){this.mulRotation(0,e,0)}turnLeftNow(e){this.mulRotationNow(0,e,0)}rollRight(e){this.mulRotation(0,0,e)}rollRightNow(e){this.mulRotationNow(0,0,e)}rollLeft(e){this.mulRotation(0,0,-e)}rollLeftNow(e){this.mulRotationNow(0,0,-e)}setLinvel(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.setLinvel(H.v0)}setAngvel(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.setAngvel(H.v0)}resetForce(){this.transformMotion.resetForce()}addForce(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.addForce(H.v0)}addForceAtPoint(e,t,i,n,s,o){if(typeof e=="number")if(typeof t=="number")H.v0.set(e,t,i),H.v1.set(n,s,o);else{console.warn("ObjectA3.addForceAtPoint(): type of arguments mismatch.");return}else if(typeof t=="number"){console.warn("ObjectA3.addForceAtPoint(): type of arguments mismatch.");return}else H.v0.set(e),H.v1.set(t);this.transformMotion.addForceAtPoint(H.v0,H.v1)}resetTorque(){this.transformMotion.resetTorque()}addTorque(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.addTorque(H.v0)}applyImpulse(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.applyImpulse(H.v0)}applyImpulseAtPoint(e,t,i,n,s,o){if(typeof e=="number")if(typeof t=="number")H.v0.set(e,t,i),H.v1.set(n,s,o);else{console.warn("ObjectA3.addForceAtPoint(): type of arguments mismatch.");return}else if(typeof t=="number"){console.warn("ObjectA3.addForceAtPoint(): type of arguments mismatch.");return}else H.v0.set(e),H.v1.set(t);this.transformMotion.applyImpulseAtPoint(H.v0,H.v1)}applyTorqueImpulse(e,t,i){typeof e=="number"?H.v0.set(e,t,i):H.v0.set(e),this.transformMotion.applyTorqueImpulse(H.v0)}isGrounded(){return this.transformMotion instanceof Fn?this.transformMotion.isGrounded():this.loc.y<=0}}class Ir{message;dir;offsetTop;offsetRight;offsetLeft;offsetBottom;constructor(e){this.message=e,this.dir="RIGHT",this.offsetTop={x:0,y:2},this.offsetRight={x:1,y:1},this.offsetLeft={x:-1,y:1},this.offsetBottom={x:0,y:0}}}class On extends xe{controller;setController(e){this.controller=e}setLocation(e,t,i){const n=new ce;typeof e=="number"?(super.setLocation(e,t,i),n.set(e,t,i)):(super.setLocation(e),n.set(e)),this.controller?.setCameraLocation(n)}lookAt(e,t,i){const n=new ce;typeof e=="number"?n.set(e,t,i):e instanceof xe?n.set(e.loc):n.set(e);const s=this.upVector?this.upVector:xe.defaultUpVector,o=st(this.loc,n,s);o.mul(new Ce(s.x,s.y,s.z,0)),this.setQuat(o)}lookAtNow(e,t,i){const n=new ce;typeof e=="number"?n.set(e,t,i):e instanceof xe?n.set(e.loc):n.set(e);const s=this.upVector?this.upVector:xe.defaultUpVector,o=st(this.loc,n,s);o.mul(new Ce(s.x,s.y,s.z,0)),this.setQuatNow(o)}}class vt{view;constructor(){}setView(e){this.view=e}update(e){}activate(){}deactivate(){}keyDown(e){}keyUp(e){}keyPress(e){}mouseDown(e){}mouseUp(e){}mouseMove(e){}mouseClick(e){}mouseEnter(e){}mouseLeave(e){}mouseWheel(e){}touchStart(e){}touchEnd(e){}touchMove(e){}touchCancel(e){}setCameraLocation(e){}setCameraLocationNow(e){}setCameraQuat(e){}setCameraQuatNow(e){}setCameraScale(e){}setCameraScaleNow(e){}}class Pn extends vt{preMouse;leftClick=!1;rightClick=!1;target;cameraLoc=new ce(0,0,3);cameraQuat=new Ce(0,0,0,1);constructor(e,t,i){super(),this.preMouse={x:0,y:0},typeof e=="number"?this.target=new ce(e,t,i):this.target=new ce(e)}update(e){this.view&&(this.view.camera.setLocation(this.cameraLoc),this.view.camera.setQuat(this.cameraQuat))}mouseDown(e){e.button===0?(this.leftClick=!0,this.preMouse.x=e.clientX,this.preMouse.y=e.clientY):e.button===2&&(this.rightClick=!0,this.preMouse.x=e.clientX,this.preMouse.y=e.clientY)}mouseMove(e){if(this.view){if(this.leftClick){const i=.01*(e.clientX-this.preMouse.x),n=.01*(e.clientY-this.preMouse.y),s=Math.sin(-i),o=Math.cos(-i),c=Math.sin(-n),A=Math.cos(-n),a=new ce(1,0,0).apply(this.cameraQuat),f=new ce(0,1,0).apply(this.cameraQuat),u=new Ce(a.x*c,a.y*c,a.z*c,A),b=new Ce(f.x*s,f.y*s,f.z*s,o),d=new ce(this.cameraLoc);d.sub(this.target),d.apply(u),d.apply(b),d.add(this.target),this.cameraLoc.set(d);const I=st(this.cameraLoc,this.target,new ce(0,1,0));I.mul(new Ce(0,1,0,0)),this.cameraQuat.set(I),this.preMouse.x=e.clientX,this.preMouse.y=e.clientY}else if(this.rightClick){H.v0.set(this.target),H.v0.sub(this.view.camera.loc);const i=.005*H.v0.length(),n=i*(e.clientX-this.preMouse.x),s=i*(e.clientY-this.preMouse.y);this.view.camera.moveRight(n),this.view.camera.moveUp(s);const o=this.view.camera.getUnitVecX(),c=this.view.camera.getUnitVecY();o.scale(-n),c.scale(s),this.target.add(o),this.target.add(c),this.preMouse.x=e.clientX,this.preMouse.y=e.clientY}}}mouseUp(e){e.button===0?this.leftClick=!1:e.button===2&&(this.rightClick=!1)}mouseWheel(e){const t=new ce(this.target).sub(this.cameraLoc);e.deltaY>0?t.scale(.05):e.deltaY<0&&t.scale(-.05),this.cameraLoc.add(t)}setCameraLocation(e){this.cameraLoc.set(e)}setCameraLocationNow(e){this.cameraLoc.set(e)}}class mr extends vt{_offset;constructor(){super(),this._offset=new ce(0,5,-10)}update(e){if(!this.view||!this.view.scene.avatar)return;const t=new He;t.set(this.view.scene.avatar),H.v0.set(this._offset),H.v0.apply(t.quat),H.v0.add(t.loc),this.view.camera.setLocationNow(H.v0),this.view.camera.lookAt(this.view.scene.avatar)}}class br extends vt{_keyW;_keyA;_keyS;_keyD;_keyLeft;_keyRight;_keySpace;_offset;_avatarNextLoc;_avatarNextQuat;_velY;constructor(){super(),this._keyW=this._keyA=this._keyS=this._keyD=!1,this._keyLeft=this._keyRight=!1,this._keySpace=!1,this._offset=new ce(0,5,-10),this._avatarNextLoc=new ce,this._avatarNextQuat=new Ce,this._velY=0}keyDown(e){e.code==="KeyW"?this._keyW=!0:e.code==="KeyA"?this._keyA=!0:e.code==="KeyS"?this._keyS=!0:e.code==="KeyD"?this._keyD=!0:e.code==="ArrowLeft"?this._keyLeft=!0:e.code==="ArrowRight"?this._keyRight=!0:e.code==="Space"&&(this._keySpace=!0)}keyUp(e){e.code==="KeyW"?this._keyW=!1:e.code==="KeyA"?this._keyA=!1:e.code==="KeyS"?this._keyS=!1:e.code==="KeyD"?this._keyD=!1:e.code==="ArrowLeft"?this._keyLeft=!1:e.code==="ArrowRight"?this._keyRight=!1:e.code==="Space"&&(this._keySpace=!1)}update(e){if(!this.view||!this.view.scene.avatar)return;const t=this.view.scene.avatar,i=new He;i.set(t);const n=t.getUnitVecZ().scale(.1),s=t.getUnitVecX().scale(.1);H.v0.set(this._offset),H.v0.apply(i.quat),H.v0.add(i.loc),this.view.camera.setLocationNow(H.v0),this.view.camera.lookAt(i.loc),this._avatarNextLoc.set(i.loc),this._avatarNextQuat.set(i.quat),this._keyW&&this._avatarNextLoc.add(n),this._keyA&&this._avatarNextLoc.add(s),this._keyS&&this._avatarNextLoc.sub(n),this._keyD&&this._avatarNextLoc.sub(s),this._velY+=-9.8*e*.1,t.isGrounded()&&(this._velY=0,this._keySpace&&(this._velY=.5)),this._avatarNextLoc.add(0,this._velY,0),this._keyLeft&&this._avatarNextQuat.mul(At(new ce(0,.01,0))),this._keyRight&&this._avatarNextQuat.mul(At(new ce(0,-.01,0))),t.setLocationNow(this._avatarNextLoc),t.setQuat(this._avatarNextQuat)}}const Cr={type:"audio",autoplay:!1,loop:!1,volume:1,positional:{refDistance:1,maxDistance:1e3,rolloffFactor:1,directional:{coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0}}};async function yr(){try{ot.listener.context.state!=="running"&&await ot.listener.context.resume()}catch{console.warn("AudioContext resume failed. Did you call on user gesture?")}}class ot extends xe{static listener=new ae.AudioListener;static audioLoader=new ae.AudioLoader;ready;config;sound;constructor(e,t={}){super(),this.config=wt(Cr,t),this.ready=this.asyncInit(e)}initObject(){return new ae.Object3D}async asyncInit(e){if(this.config.type==="positional"){const t=new ae.PositionalAudio(ot.listener);t.setRefDistance(this.config.positional.refDistance),t.setMaxDistance(this.config.positional.maxDistance),t.setRolloffFactor(this.config.positional.rolloffFactor);const i=this.config.positional.directional;t.setDirectionalCone(i.coneInnerAngle,i.coneOuterAngle,i.coneOuterGain),t.setVolume(this.config.volume),t.setLoop(this.config.loop),this.sound=t}else{const t=new ae.Audio(ot.listener);t.setVolume(this.config.volume),t.setLoop(this.config.loop),this.sound=t}return this.object.add(this.sound),new Promise(t=>{ot.audioLoader.load(e,i=>{this.sound&&this.sound.setBuffer(i),t(this)})})}play(){this.sound?.play()}}class Gn{scene;camera;controller;constructor(e){this.scene=new Nn,this.camera=e,this.camera.setAudioListener(ot.listener),this.scene.scene.add(this.camera.object),this.camera.setLocation(0,0,3),this.controller=new Pn(0,0,0),this.controller.setView(this),this.controller.activate(),this.camera.setController(this.controller)}replaceScene(e){this.scene.scene.remove(this.camera.object),e.scene.add(this.camera.object);const t=this.scene;return this.scene=e,t}updateScene(e){this.scene.update(e),this.controller?.update(e),this.camera.update(e)}setController(e){this.controller.deactivate(),this.controller=e,this.controller.setView(this),this.controller.activate(),this.camera.setController(e)}worldToScreen(e){throw new Error("ViewBaseはworldToScreen()は実装していません")}screenToWorld(e,t,i){throw new Error("ViewBaseはscreenToWorld()は実装していません")}cameraToScreen(e){throw new Error("ViewBaseはcameraToScreen()は実装していません")}screenToCamera(e,t,i){throw new Error("ViewBaseはscreenToCamera()は実装していません")}async waitForRender(){throw new Error("ViewBaseはwaitForRender()は実装していません")}}class It extends On{camera;headLight;constructor(e){super(),this.camera=e,this.headLight=new ae.SpotLight(16777215,1,0,Math.PI/3,0,0),this.headLight.rotation.x=3.14/2,this.object.add(this.camera),this.object.add(this.headLight)}initObject(){return new ae.Object3D}setAudioListener(e){this.camera.add(e)}getHeadLight(){return this.headLight}setAspect(e){or(this.camera)&&(this.camera.aspect=e,this.camera.updateProjectionMatrix())}setHeadLightEnable(e){e?this.headLight.intensity=1:this.headLight.intensity=0}calcNDC(e){const t=new ae.Vector3(e.x,e.y,e.z);return t.project(this.camera),{x:t.x,y:t.y}}}class Un extends m.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new m.Vector2(.5,.5),this.addEventListener("removed",function(){this.traverse(function(t){t.element&&t.element instanceof t.element.ownerDocument.defaultView.Element&&t.element.parentNode!==null&&t.element.remove()})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const lt=new m.Vector3,pn=new m.Matrix4,gn=new m.Matrix4,En=new m.Vector3,In=new m.Vector3;class Hn{constructor(e={}){const t=this;let i,n,s,o;const c={objects:new WeakMap},A=e.element!==void 0?e.element:document.createElement("div");A.style.overflow="hidden",this.domElement=A,this.sortObjects=!0,this.getSize=function(){return{width:i,height:n}},this.render=function(I,g){I.matrixWorldAutoUpdate===!0&&I.updateMatrixWorld(),g.parent===null&&g.matrixWorldAutoUpdate===!0&&g.updateMatrixWorld(),pn.copy(g.matrixWorldInverse),gn.multiplyMatrices(g.projectionMatrix,pn),f(I,I,g),this.sortObjects&&d(I)},this.setSize=function(I,g){i=I,n=g,s=i/2,o=n/2,A.style.width=I+"px",A.style.height=g+"px"};function a(I){I.isCSS2DObject&&(I.element.style.display="none");for(let g=0,l=I.children.length;g<l;g++)a(I.children[g])}function f(I,g,l){if(I.visible===!1){a(I);return}if(I.isCSS2DObject){lt.setFromMatrixPosition(I.matrixWorld),lt.applyMatrix4(gn);const h=lt.z>=-1&<.z<=1&&I.layers.test(l.layers)===!0,p=I.element;p.style.display=h===!0?"":"none",h===!0&&(I.onBeforeRender(t,g,l),p.style.transform="translate("+-100*I.center.x+"%,"+-100*I.center.y+"%)translate("+(lt.x*s+s)+"px,"+(-lt.y*o+o)+"px)",p.parentNode!==A&&A.appendChild(p),I.onAfterRender(t,g,l));const C={distanceToCameraSquared:u(l,I)};c.objects.set(I,C)}for(let h=0,p=I.children.length;h<p;h++)f(I.children[h],g,l)}function u(I,g){return En.setFromMatrixPosition(I.matrixWorld),In.setFromMatrixPosition(g.matrixWorld),En.distanceToSquared(In)}function b(I){const g=[];return I.traverseVisible(function(l){l.isCSS2DObject&&g.push(l)}),g}function d(I){const g=b(I).sort(function(h,p){if(h.renderOrder!==p.renderOrder)return p.renderOrder-h.renderOrder;const C=c.objects.get(h).distanceToCameraSquared,E=c.objects.get(p).distanceToCameraSquared;return C-E}),l=g.length;for(let h=0,p=g.length;h<p;h++)g[h].element.style.zIndex=l-h}}}function mn(r,e){if(e===m.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),r;if(e===m.TriangleFanDrawMode||e===m.TriangleStripDrawMode){let t=r.getIndex();if(t===null){const o=[],c=r.getAttribute("position");if(c!==void 0){for(let A=0;A<c.count;A++)o.push(A);r.setIndex(o),t=r.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),r}const i=t.count-2,n=[];if(e===m.TriangleFanDrawMode)for(let o=1;o<=i;o++)n.push(t.getX(0)),n.push(t.getX(o)),n.push(t.getX(o+1));else for(let o=0;o<i;o++)o%2===0?(n.push(t.getX(o)),n.push(t.getX(o+1)),n.push(t.getX(o+2))):(n.push(t.getX(o+2)),n.push(t.getX(o+1)),n.push(t.getX(o)));n.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=r.clone();return s.setIndex(n),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),r}class jn extends m.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new vr(t)}),this.register(function(t){return new Qr(t)}),this.register(function(t){return new Mr(t)}),this.register(function(t){return new Or(t)}),this.register(function(t){return new Pr(t)}),this.register(function(t){return new Sr(t)}),this.register(function(t){return new _r(t)}),this.register(function(t){return new Lr(t)}),this.register(function(t){return new xr(t)}),this.register(function(t){return new wr(t)}),this.register(function(t){return new Nr(t)}),this.register(function(t){return new kr(t)}),this.register(function(t){return new Fr(t)}),this.register(function(t){return new Dr(t)}),this.register(function(t){return new Tr(t)}),this.register(function(t){return new Gr(t)}),this.register(function(t){return new Ur(t)})}load(e,t,i,n){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const a=m.LoaderUtils.extractUrlBase(e);o=m.LoaderUtils.resolveURL(a,this.path)}else o=m.LoaderUtils.extractUrlBase(e);this.manager.itemStart(e);const c=function(a){n?n(a):console.error(a),s.manager.itemError(e),s.manager.itemEnd(e)},A=new m.FileLoader(this.manager);A.setPath(this.path),A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(e,function(a){try{s.parse(a,o,function(f){t(f),s.manager.itemEnd(e)},c)}catch(f){c(f)}},i,c)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,i,n){let s;const o={},c={},A=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(A.decode(new Uint8Array(e,0,4))===qn){try{o[Re.KHR_BINARY_GLTF]=new Hr(e)}catch(u){n&&n(u);return}s=JSON.parse(o[Re.KHR_BINARY_GLTF].content)}else s=JSON.parse(A.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){n&&n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const a=new to(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});a.fileLoader.setRequestHeader(this.requestHeader);for(let f=0;f<this.pluginCallbacks.length;f++){const u=this.pluginCallbacks[f](a);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),c[u.name]=u,o[u.name]=!0}if(s.extensionsUsed)for(let f=0;f<s.extensionsUsed.length;++f){const u=s.extensionsUsed[f],b=s.extensionsRequired||[];switch(u){case Re.KHR_MATERIALS_UNLIT:o[u]=new Rr;break;case Re.KHR_DRACO_MESH_COMPRESSION:o[u]=new jr(s,this.dracoLoader);break;case Re.KHR_TEXTURE_TRANSFORM:o[u]=new qr;break;case Re.KHR_MESH_QUANTIZATION:o[u]=new Kr;break;default:b.indexOf(u)>=0&&c[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}a.setExtensions(o),a.setPlugins(c),a.parse(i,n)}parseAsync(e,t){const i=this;return new Promise(function(n,s){i.parse(e,t,n,s)})}}function Br(){let r={};return{get:function(e){return r[e]},add:function(e,t){r[e]=t},remove:function(e){delete r[e]},removeAll:function(){r={}}}}const Re={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Tr{constructor(e){this.parser=e,this.name=Re.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,n=t.length;i<n;i++){const s=t[i];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,i="light:"+e;let n=t.cache.get(i);if(n)return n;const s=t.json,A=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let a;const f=new m.Color(16777215);A.color!==void 0&&f.setRGB(A.color[0],A.color[1],A.color[2],m.LinearSRGBColorSpace);const u=A.range!==void 0?A.range:0;switch(A.type){case"directional":a=new m.DirectionalLight(f),a.target.position.set(0,0,-1),a.add(a.target);break;case"point":a=new m.PointLight(f),a.distance=u;break;case"spot":a=new m.SpotLight(f),a.distance=u,A.spot=A.spot||{},A.spot.innerConeAngle=A.spot.innerConeAngle!==void 0?A.spot.innerConeAngle:0,A.spot.outerConeAngle=A.spot.outerConeAngle!==void 0?A.spot.outerConeAngle:Math.PI/4,a.angle=A.spot.outerConeAngle,a.penumbra=1-A.spot.innerConeAngle/A.spot.outerConeAngle,a.target.position.set(0,0,-1),a.add(a.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+A.type)}return a.position.set(0,0,0),$e(a,A),A.intensity!==void 0&&(a.intensity=A.intensity),a.name=t.createUniqueName(A.name||"light_"+e),n=Promise.resolve(a),t.cache.add(i,n),n}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,i=this.parser,s=i.json.nodes[e],c=(s.extensions&&s.extensions[this.name]||{}).light;return c===void 0?null:this._loadLight(c).then(function(A){return i._getNodeRef(t.cache,c,A)})}}class Rr{constructor(){this.name=Re.KHR_MATERIALS_UNLIT}getMaterialType(){return m.MeshBasicMaterial}extendParams(e,t,i){const n=[];e.color=new m.Color(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],m.LinearSRGBColorSpace),e.opacity=o[3]}s.baseColorTexture!==void 0&&n.push(i.assignTexture(e,"map",s.baseColorTexture,m.SRGBColorSpace))}return Promise.all(n)}}class wr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name].emissiveStrength;return s!==void 0&&(t.emissiveIntensity=s),Promise.resolve()}}class vr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],o=n.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(i.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(i.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(i.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const c=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new m.Vector2(c,c)}return Promise.all(s)}}class Qr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_DISPERSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return t.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class kr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],o=n.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(i.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(i.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class Sr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_SHEEN}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new m.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=n.extensions[this.name];if(o.sheenColorFactor!==void 0){const c=o.sheenColorFactor;t.sheenColor.setRGB(c[0],c[1],c[2],m.LinearSRGBColorSpace)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(i.assignTexture(t,"sheenColorMap",o.sheenColorTexture,m.SRGBColorSpace)),o.sheenRoughnessTexture!==void 0&&s.push(i.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class _r{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],o=n.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(i.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class Lr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_VOLUME}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],o=n.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(i.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const c=o.attenuationColor||[1,1,1];return t.attenuationColor=new m.Color().setRGB(c[0],c[1],c[2],m.LinearSRGBColorSpace),Promise.all(s)}}class xr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_IOR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return t.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class Nr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_SPECULAR}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],o=n.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(i.assignTexture(t,"specularIntensityMap",o.specularTexture));const c=o.specularColorFactor||[1,1,1];return t.specularColor=new m.Color().setRGB(c[0],c[1],c[2],m.LinearSRGBColorSpace),o.specularColorTexture!==void 0&&s.push(i.assignTexture(t,"specularColorMap",o.specularColorTexture,m.SRGBColorSpace)),Promise.all(s)}}class Dr{constructor(e){this.parser=e,this.name=Re.EXT_MATERIALS_BUMP}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],o=n.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(i.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class Fr{constructor(e){this.parser=e,this.name=Re.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const i=this.parser.json.materials[e];return!i.extensions||!i.extensions[this.name]?null:m.MeshPhysicalMaterial}extendMaterialParams(e,t){const i=this.parser,n=i.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],o=n.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(i.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class Mr{constructor(e){this.parser=e,this.name=Re.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,i=t.json,n=i.textures[e];if(!n.extensions||!n.extensions[this.name])return null;const s=n.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class Or{constructor(e){this.parser=e,this.name=Re.EXT_TEXTURE_WEBP}loadTexture(e){const t=this.name,i=this.parser,n=i.json,s=n.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],c=n.images[o.source];let A=i.textureLoader;if(c.uri){const a=i.options.manager.getHandler(c.uri);a!==null&&(A=a)}return i.loadTextureImage(e,o.source,A)}}class Pr{constructor(e){this.parser=e,this.name=Re.EXT_TEXTURE_AVIF}loadTexture(e){const t=this.name,i=this.parser,n=i.json,s=n.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],c=n.images[o.source];let A=i.textureLoader;if(c.uri){const a=i.options.manager.getHandler(c.uri);a!==null&&(A=a)}return i.loadTextureImage(e,o.source,A)}}class Gr{constructor(e){this.name=Re.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const n=i.extensions[this.name],s=this.parser.getDependency("buffer",n.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(c){const A=n.byteOffset||0,a=n.byteLength||0,f=n.count,u=n.byteStride,b=new Uint8Array(c,A,a);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(f,u,b,n.mode,n.filter).then(function(d){return d.buffer}):o.ready.then(function(){const d=new ArrayBuffer(f*u);return o.decodeGltfBuffer(new Uint8Array(d),f,u,b,n.mode,n.filter),d})})}else return null}}class Ur{constructor(e){this.name=Re.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const n=t.meshes[i.mesh];for(const a of n.primitives)if(a.mode!==Ye.TRIANGLES&&a.mode!==Ye.TRIANGLE_STRIP&&a.mode!==Ye.TRIANGLE_FAN&&a.mode!==void 0)return null;const o=i.extensions[this.name].attributes,c=[],A={};for(const a in o)c.push(this.parser.getDependency("accessor",o[a]).then(f=>(A[a]=f,A[a])));return c.length<1?null:(c.push(this.parser.createNodeMesh(e)),Promise.all(c).then(a=>{const f=a.pop(),u=f.isGroup?f.children:[f],b=a[0].count,d=[];for(const I of u){const g=new m.Matrix4,l=new m.Vector3,h=new m.Quaternion,p=new m.Vector3(1,1,1),C=new m.InstancedMesh(I.geometry,I.material,b);for(let E=0;E<b;E++)A.TRANSLATION&&l.fromBufferAttribute(A.TRANSLATION,E),A.ROTATION&&h.fromBufferAttribute(A.ROTATION,E),A.SCALE&&p.fromBufferAttribute(A.SCALE,E),C.setMatrixAt(E,g.compose(l,h,p));for(const E in A)if(E==="_COLOR_0"){const B=A[E];C.instanceColor=new m.InstancedBufferAttribute(B.array,B.itemSize,B.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&I.geometry.setAttribute(E,A[E]);m.Object3D.prototype.copy.call(C,I),this.parser.assignFinalMaterial(C),d.push(C)}return f.isGroup?(f.clear(),f.add(...d),f):d[0]}))}}const qn="glTF",ft=12,bn={JSON:1313821514,BIN:5130562};class Hr{constructor(e){this.name=Re.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,ft),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==qn)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-ft,s=new DataView(e,ft);let o=0;for(;o<n;){const c=s.getUint32(o,!0);o+=4;const A=s.getUint32(o,!0);if(o+=4,A===bn.JSON){const a=new Uint8Array(e,ft+o,c);this.content=i.decode(a)}else if(A===bn.BIN){const a=ft+o;this.body=e.slice(a,a+c)}o+=c}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class jr{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Re.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const i=this.json,n=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,c={},A={},a={};for(const f in o){const u=Yt[f]||f.toLowerCase();c[u]=o[f]}for(const f in e.attributes){const u=Yt[f]||f.toLowerCase();if(o[f]!==void 0){const b=i.accessors[e.attributes[f]],d=ht[b.componentType];a[u]=d.name,A[u]=b.normalized===!0}}return t.getDependency("bufferView",s).then(function(f){return new Promise(function(u,b){n.decodeDracoFile(f,function(d){for(const I in d.attributes){const g=d.attributes[I],l=A[I];l!==void 0&&(g.normalized=l)}u(d)},c,a,m.LinearSRGBColorSpace,b)})})}}class qr{constructor(){this.name=Re.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class Kr{constructor(){this.name=Re.KHR_MESH_QUANTIZATION}}class Kn extends m.Interpolant{constructor(e,t,i,n){super(e,t,i,n)}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,n=this.valueSize,s=e*n*3+n;for(let o=0;o!==n;o++)t[o]=i[s+o];return t}interpolate_(e,t,i,n){const s=this.resultBuffer,o=this.sampleValues,c=this.valueSize,A=c*2,a=c*3,f=n-t,u=(i-t)/f,b=u*u,d=b*u,I=e*a,g=I-a,l=-2*d+3*b,h=d-b,p=1-l,C=h-b+u;for(let E=0;E!==c;E++){const B=o[g+E+c],Q=o[g+E+A]*f,S=o[I+E+c],U=o[I+E]*f;s[E]=p*B+C*Q+l*S+h*U}return s}}const zr=new m.Quaternion;class Wr extends Kn{interpolate_(e,t,i,n){const s=super.interpolate_(e,t,i,n);return zr.fromArray(s).normalize().toArray(s),s}}const Ye={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},ht={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Cn={9728:m.NearestFilter,9729:m.LinearFilter,9984:m.NearestMipmapNearestFilter,9985:m.LinearMipmapNearestFilter,9986:m.NearestMipmapLinearFilter,9987:m.LinearMipmapLinearFilter},yn={33071:m.ClampToEdgeWrapping,33648:m.MirroredRepeatWrapping,10497:m.RepeatWrapping},Nt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Yt={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},rt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Vr={CUBICSPLINE:void 0,LINEAR:m.InterpolateLinear,STEP:m.InterpolateDiscrete},Dt={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Yr(r){return r.DefaultMaterial===void 0&&(r.DefaultMaterial=new m.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:m.FrontSide})),r.DefaultMaterial}function at(r,e,t){for(const i in t.extensions)r[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function $e(r,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(r.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function Jr(r,e,t){let i=!1,n=!1,s=!1;for(let a=0,f=e.length;a<f;a++){const u=e[a];if(u.POSITION!==void 0&&(i=!0),u.NORMAL!==void 0&&(n=!0),u.COLOR_0!==void 0&&(s=!0),i&&n&&s)break}if(!i&&!n&&!s)return Promise.resolve(r);const o=[],c=[],A=[];for(let a=0,f=e.length;a<f;a++){const u=e[a];if(i){const b=u.POSITION!==void 0?t.getDependency("accessor",u.POSITION):r.attributes.position;o.push(b)}if(n){const b=u.NORMAL!==void 0?t.getDependency("accessor",u.NORMAL):r.attributes.normal;c.push(b)}if(s){const b=u.COLOR_0!==void 0?t.getDependency("accessor",u.COLOR_0):r.attributes.color;A.push(b)}}return Promise.all([Promise.all(o),Promise.all(c),Promise.all(A)]).then(function(a){const f=a[0],u=a[1],b=a[2];return i&&(r.morphAttributes.position=f),n&&(r.morphAttributes.normal=u),s&&(r.morphAttributes.color=b),r.morphTargetsRelative=!0,r})}function Xr(r,e){if(r.updateMorphTargets(),e.weights!==void 0)for(let t=0,i=e.weights.length;t<i;t++)r.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(r.morphTargetInfluences.length===t.length){r.morphTargetDictionary={};for(let i=0,n=t.length;i<n;i++)r.morphTargetDictionary[t[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Zr(r){let e;const t=r.extensions&&r.extensions[Re.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+Ft(t.attributes):e=r.indices+":"+Ft(r.attributes)+":"+r.mode,r.targets!==void 0)for(let i=0,n=r.targets.length;i<n;i++)e+=":"+Ft(r.targets[i]);return e}function Ft(r){let e="";const t=Object.keys(r).sort();for(let i=0,n=t.length;i<n;i++)e+=t[i]+":"+r[t[i]]+";";return e}function Jt(r){switch(r){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function $r(r){return r.search(/\.jpe?g($|\?)/i)>0||r.search(/^data\:image\/jpeg/)===0?"image/jpeg":r.search(/\.webp($|\?)/i)>0||r.search(/^data\:image\/webp/)===0?"image/webp":r.search(/\.ktx2($|\?)/i)>0||r.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const eo=new m.Matrix4;class to{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new Br,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,n=-1,s=!1,o=-1;if(typeof navigator<"u"){const c=navigator.userAgent;i=/^((?!chrome|android).)*safari/i.test(c)===!0;const A=c.match(/Version\/(\d+)/);n=i&&A?parseInt(A[1],10):-1,s=c.indexOf("Firefox")>-1,o=s?c.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||i&&n<17||s&&o<98?this.textureLoader=new m.TextureLoader(this.options.manager):this.textureLoader=new m.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new m.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,n=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const c={scene:o[0][n.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:n.asset,parser:i,userData:{}};return at(s,c,n),$e(c,n),Promise.all(i._invokeAll(function(A){return A.afterRoot&&A.afterRoot(c)})).then(function(){for(const A of c.scenes)A.updateMatrixWorld();e(c)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let n=0,s=t.length;n<s;n++){const o=t[n].joints;for(let c=0,A=o.length;c<A;c++)e[o[c]].isBone=!0}for(let n=0,s=e.length;n<s;n++){const o=e[n];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(i[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,i){if(e.refs[t]<=1)return i;const n=i.clone(),s=(o,c)=>{const A=this.associations.get(o);A!=null&&this.associations.set(c,A);for(const[a,f]of o.children.entries())s(f,c.children[a])};return s(i,n),n.name+="_instance_"+e.uses[t]++,n}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i<t.length;i++){const n=e(t[i]);if(n)return n}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const i=[];for(let n=0;n<t.length;n++){const s=e(t[n]);s&&i.push(s)}return i}getDependency(e,t){const i=e+":"+t;let n=this.cache.get(i);if(!n){switch(e){case"scene":n=this.loadScene(t);break;case"node":n=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":n=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":n=this.loadAccessor(t);break;case"bufferView":n=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":n=this.loadBuffer(t);break;case"material":n=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":n=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":n=this.loadSkin(t);break;case"animation":n=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":n=this.loadCamera(t);break;default:if(n=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!n)throw new Error("Unknown type: "+e);break}this.cache.add(i,n)}return n}getDependencies(e){let t=this.cache.get(e);if(!t){const i=this,n=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(n.map(function(s,o){return i.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],i=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Re.KHR_BINARY_GLTF].body);const n=this.options;return new Promise(function(s,o){i.load(m.LoaderUtils.resolveURL(t.uri,n.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(i){const n=t.byteLength||0,s=t.byteOffset||0;return i.slice(s,s+n)})}loadAccessor(e){const t=this,i=this.json,n=this.json.accessors[e];if(n.bufferView===void 0&&n.sparse===void 0){const o=Nt[n.type],c=ht[n.componentType],A=n.normalized===!0,a=new c(n.count*o);return Promise.resolve(new m.BufferAttribute(a,o,A))}const s=[];return n.bufferView!==void 0?s.push(this.getDependency("bufferView",n.bufferView)):s.push(null),n.sparse!==void 0&&(s.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(s).then(function(o){const c=o[0],A=Nt[n.type],a=ht[n.componentType],f=a.BYTES_PER_ELEMENT,u=f*A,b=n.byteOffset||0,d=n.bufferView!==void 0?i.bufferViews[n.bufferView].byteStride:void 0,I=n.normalized===!0;let g,l;if(d&&d!==u){const h=Math.floor(b/d),p="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+h+":"+n.count;let C=t.cache.get(p);C||(g=new a(c,h*d,n.count*d/f),C=new m.InterleavedBuffer(g,d/f),t.cache.add(p,C)),l=new m.InterleavedBufferAttribute(C,A,b%d/f,I)}else c===null?g=new a(n.count*A):g=new a(c,b,n.count*A),l=new m.BufferAttribute(g,A,I);if(n.sparse!==void 0){const h=Nt.SCALAR,p=ht[n.sparse.indices.componentType],C=n.sparse.indices.byteOffset||0,E=n.sparse.values.byteOffset||0,B=new p(o[1],C,n.sparse.count*h),Q=new a(o[2],E,n.sparse.count*A);c!==null&&(l=new m.BufferAttribute(l.array.slice(),l.itemSize,l.normalized)),l.normalized=!1;for(let S=0,U=B.length;S<U;S++){const v=B[S];if(l.setX(v,Q[S*A]),A>=2&&l.setY(v,Q[S*A+1]),A>=3&&l.setZ(v,Q[S*A+2]),A>=4&&l.setW(v,Q[S*A+3]),A>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}l.normalized=I}return l})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let c=this.textureLoader;if(o.uri){const A=i.manager.getHandler(o.uri);A!==null&&(c=A)}return this.loadTextureImage(e,s,c)}loadTextureImage(e,t,i){const n=this,s=this.json,o=s.textures[e],c=s.images[t],A=(c.uri||c.bufferView)+":"+o.sampler;if(this.textureCache[A])return this.textureCache[A];const a=this.loadImageSource(t,i).then(function(f){f.flipY=!1,f.name=o.name||c.name||"",f.name===""&&typeof c.uri=="string"&&c.uri.startsWith("data:image/")===!1&&(f.name=c.uri);const b=(s.samplers||{})[o.sampler]||{};return f.magFilter=Cn[b.magFilter]||m.LinearFilter,f.minFilter=Cn[b.minFilter]||m.LinearMipmapLinearFilter,f.wrapS=yn[b.wrapS]||m.RepeatWrapping,f.wrapT=yn[b.wrapT]||m.RepeatWrapping,f.generateMipmaps=!f.isCompressedTexture&&f.minFilter!==m.NearestFilter&&f.minFilter!==m.LinearFilter,n.associations.set(f,{textures:e}),f}).catch(function(){return null});return this.textureCache[A]=a,a}loadImageSource(e,t){const i=this,n=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());const o=n.images[e],c=self.URL||self.webkitURL;let A=o.uri||"",a=!1;if(o.bufferView!==void 0)A=i.getDependency("bufferView",o.bufferView).then(function(u){a=!0;const b=new Blob([u],{type:o.mimeType});return A=c.createObjectURL(b),A});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const f=Promise.resolve(A).then(function(u){return new Promise(function(b,d){let I=b;t.isImageBitmapLoader===!0&&(I=function(g){const l=new m.Texture(g);l.needsUpdate=!0,b(l)}),t.load(m.LoaderUtils.resolveURL(u,s.path),I,void 0,d)})}).then(function(u){return a===!0&&c.revokeObjectURL(A),$e(u,o),u.userData.mimeType=o.mimeType||$r(o.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",A),u});return this.sourceCache[e]=f,f}assignTexture(e,t,i,n){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Re.KHR_TEXTURE_TRANSFORM]){const c=i.extensions!==void 0?i.extensions[Re.KHR_TEXTURE_TRANSFORM]:void 0;if(c){const A=s.associations.get(o);o=s.extensions[Re.KHR_TEXTURE_TRANSFORM].extendTexture(o,c),s.associations.set(o,A)}}return n!==void 0&&(o.colorSpace=n),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const n=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const c="PointsMaterial:"+i.uuid;let A=this.cache.get(c);A||(A=new m.PointsMaterial,m.Material.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,A.sizeAttenuation=!1,this.cache.add(c,A)),i=A}else if(e.isLine){const c="LineBasicMaterial:"+i.uuid;let A=this.cache.get(c);A||(A=new m.LineBasicMaterial,m.Material.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,this.cache.add(c,A)),i=A}if(n||s||o){let c="ClonedMaterial:"+i.uuid+":";n&&(c+="derivative-tangents:"),s&&(c+="vertex-colors:"),o&&(c+="flat-shading:");let A=this.cache.get(c);A||(A=i.clone(),s&&(A.vertexColors=!0),o&&(A.flatShading=!0),n&&(A.normalScale&&(A.normalScale.y*=-1),A.clearcoatNormalScale&&(A.clearcoatNormalScale.y*=-1)),this.cache.add(c,A),this.associations.set(A,this.associations.get(i))),i=A}e.material=i}getMaterialType(){return m.MeshStandardMaterial}loadMaterial(e){const t=this,i=this.json,n=this.extensions,s=i.materials[e];let o;const c={},A=s.extensions||{},a=[];if(A[Re.KHR_MATERIALS_UNLIT]){const u=n[Re.KHR_MATERIALS_UNLIT];o=u.getMaterialType(),a.push(u.extendParams(c,s,t))}else{const u=s.pbrMetallicRoughness||{};if(c.color=new m.Color(1,1,1),c.opacity=1,Array.isArray(u.baseColorFactor)){const b=u.baseColorFactor;c.color.setRGB(b[0],b[1],b[2],m.LinearSRGBColorSpace),c.opacity=b[3]}u.baseColorTexture!==void 0&&a.push(t.assignTexture(c,"map",u.baseColorTexture,m.SRGBColorSpace)),c.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,c.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(a.push(t.assignTexture(c,"metalnessMap",u.metallicRoughnessTexture)),a.push(t.assignTexture(c,"roughnessMap",u.metallicRoughnessTexture))),o=this._invokeOne(function(b){return b.getMaterialType&&b.getMaterialType(e)}),a.push(Promise.all(this._invokeAll(function(b){return b.extendMaterialParams&&b.extendMaterialParams(e,c)})))}s.doubleSided===!0&&(c.side=m.DoubleSide);const f=s.alphaMode||Dt.OPAQUE;if(f===Dt.BLEND?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,f===Dt.MASK&&(c.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==m.MeshBasicMaterial&&(a.push(t.assignTexture(c,"normalMap",s.normalTexture)),c.normalScale=new m.Vector2(1,1),s.normalTexture.scale!==void 0)){const u=s.normalTexture.scale;c.normalScale.set(u,u)}if(s.occlusionTexture!==void 0&&o!==m.MeshBasicMaterial&&(a.push(t.assignTexture(c,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(c.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==m.MeshBasicMaterial){const u=s.emissiveFactor;c.emissive=new m.Color().setRGB(u[0],u[1],u[2],m.LinearSRGBColorSpace)}return s.emissiveTexture!==void 0&&o!==m.MeshBasicMaterial&&a.push(t.assignTexture(c,"emissiveMap",s.emissiveTexture,m.SRGBColorSpace)),Promise.all(a).then(function(){const u=new o(c);return s.name&&(u.name=s.name),$e(u,s),t.associations.set(u,{materials:e}),s.extensions&&at(n,u,s),u})}createUniqueName(e){const t=m.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,n=this.primitiveCache;function s(c){return i[Re.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c,t).then(function(A){return Bn(A,c,t)})}const o=[];for(let c=0,A=e.length;c<A;c++){const a=e[c],f=Zr(a),u=n[f];if(u)o.push(u.promise);else{let b;a.extensions&&a.extensions[Re.KHR_DRACO_MESH_COMPRESSION]?b=s(a):b=Bn(new m.BufferGeometry,a,t),n[f]={primitive:a,promise:b},o.push(b)}}return Promise.all(o)}loadMesh(e){const t=this,i=this.json,n=this.extensions,s=i.meshes[e],o=s.primitives,c=[];for(let A=0,a=o.length;A<a;A++){const f=o[A].material===void 0?Yr(this.cache):this.getDependency("material",o[A].material);c.push(f)}return c.push(t.loadGeometries(o)),Promise.all(c).then(function(A){const a=A.slice(0,A.length-1),f=A[A.length-1],u=[];for(let d=0,I=f.length;d<I;d++){const g=f[d],l=o[d];let h;const p=a[d];if(l.mode===Ye.TRIANGLES||l.mode===Ye.TRIANGLE_STRIP||l.mode===Ye.TRIANGLE_FAN||l.mode===void 0)h=s.isSkinnedMesh===!0?new m.SkinnedMesh(g,p):new m.Mesh(g,p),h.isSkinnedMesh===!0&&h.normalizeSkinWeights(),l.mode===Ye.TRIANGLE_STRIP?h.geometry=mn(h.geometry,m.TriangleStripDrawMode):l.mode===Ye.TRIANGLE_FAN&&(h.geometry=mn(h.geometry,m.TriangleFanDrawMode));else if(l.mode===Ye.LINES)h=new m.LineSegments(g,p);else if(l.mode===Ye.LINE_STRIP)h=new m.Line(g,p);else if(l.mode===Ye.LINE_LOOP)h=new m.LineLoop(g,p);else if(l.mode===Ye.POINTS)h=new m.Points(g,p);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+l.mode);Object.keys(h.geometry.morphAttributes).length>0&&Xr(h,s),h.name=t.createUniqueName(s.name||"mesh_"+e),$e(h,s),l.extensions&&at(n,h,l),t.assignFinalMaterial(h),u.push(h)}for(let d=0,I=u.length;d<I;d++)t.associations.set(u[d],{meshes:e,primitives:d});if(u.length===1)return s.extensions&&at(n,u[0],s),u[0];const b=new m.Group;s.extensions&&at(n,b,s),t.associations.set(b,{meshes:e});for(let d=0,I=u.length;d<I;d++)b.add(u[d]);return b})}loadCamera(e){let t;const i=this.json.cameras[e],n=i[i.type];if(!n){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?t=new m.PerspectiveCamera(m.MathUtils.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):i.type==="orthographic"&&(t=new m.OrthographicCamera(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),i.name&&(t.name=this.createUniqueName(i.name)),$e(t,i),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],i=[];for(let n=0,s=t.joints.length;n<s;n++)i.push(this._loadNodeShallow(t.joints[n]));return t.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",t.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(n){const s=n.pop(),o=n,c=[],A=[];for(let a=0,f=o.length;a<f;a++){const u=o[a];if(u){c.push(u);const b=new m.Matrix4;s!==null&&b.fromArray(s.array,a*16),A.push(b)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[a])}return new m.Skeleton(c,A)})}loadAnimation(e){const t=this.json,i=this,n=t.animations[e],s=n.name?n.name:"animation_"+e,o=[],c=[],A=[],a=[],f=[];for(let u=0,b=n.channels.length;u<b;u++){const d=n.channels[u],I=n.samplers[d.sampler],g=d.target,l=g.node,h=n.parameters!==void 0?n.parameters[I.input]:I.input,p=n.parameters!==void 0?n.parameters[I.output]:I.output;g.node!==void 0&&(o.push(this.getDependency("node",l)),c.push(this.getDependency("accessor",h)),A.push(this.getDependency("accessor",p)),a.push(I),f.push(g))}return Promise.all([Promise.all(o),Promise.all(c),Promise.all(A),Promise.all(a),Promise.all(f)]).then(function(u){const b=u[0],d=u[1],I=u[2],g=u[3],l=u[4],h=[];for(let C=0,E=b.length;C<E;C++){const B=b[C],Q=d[C],S=I[C],U=g[C],v=l[C];if(B===void 0)continue;B.updateMatrix&&B.updateMatrix();const O=i._createAnimationTracks(B,Q,S,U,v);if(O)for(let L=0;L<O.length;L++)h.push(O[L])}const p=new m.AnimationClip(s,void 0,h);return $e(p,n),p})}createNodeMesh(e){const t=this.json,i=this,n=t.nodes[e];return n.mesh===void 0?null:i.getDependency("mesh",n.mesh).then(function(s){const o=i._getNodeRef(i.meshCache,n.mesh,s);return n.weights!==void 0&&o.traverse(function(c){if(c.isMesh)for(let A=0,a=n.weights.length;A<a;A++)c.morphTargetInfluences[A]=n.weights[A]}),o})}loadNode(e){const t=this.json,i=this,n=t.nodes[e],s=i._loadNodeShallow(e),o=[],c=n.children||[];for(let a=0,f=c.length;a<f;a++)o.push(i.getDependency("node",c[a]));const A=n.skin===void 0?Promise.resolve(null):i.getDependency("skin",n.skin);return Promise.all([s,Promise.all(o),A]).then(function(a){const f=a[0],u=a[1],b=a[2];b!==null&&f.traverse(function(d){d.isSkinnedMesh&&d.bind(b,eo)});for(let d=0,I=u.length;d<I;d++)f.add(u[d]);return f})}_loadNodeShallow(e){const t=this.json,i=this.extensions,n=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?n.createUniqueName(s.name):"",c=[],A=n._invokeOne(function(a){return a.createNodeMesh&&a.createNodeMesh(e)});return A&&c.push(A),s.camera!==void 0&&c.push(n.getDependency("camera",s.camera).then(function(a){return n._getNodeRef(n.cameraCache,s.camera,a)})),n._invokeAll(function(a){return a.createNodeAttachment&&a.createNodeAttachment(e)}).forEach(function(a){c.push(a)}),this.nodeCache[e]=Promise.all(c).then(function(a){let f;if(s.isBone===!0?f=new m.Bone:a.length>1?f=new m.Group:a.length===1?f=a[0]:f=new m.Object3D,f!==a[0])for(let u=0,b=a.length;u<b;u++)f.add(a[u]);if(s.name&&(f.userData.name=s.name,f.name=o),$e(f,s),s.extensions&&at(i,f,s),s.matrix!==void 0){const u=new m.Matrix4;u.fromArray(s.matrix),f.applyMatrix4(u)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);if(!n.associations.has(f))n.associations.set(f,{});else if(s.mesh!==void 0&&n.meshCache.refs[s.mesh]>1){const u=n.associations.get(f);n.associations.set(f,{...u})}return n.associations.get(f).nodes=e,f}),this.nodeCache[e]}loadScene(e){const t=this.extensions,i=this.json.scenes[e],n=this,s=new m.Group;i.name&&(s.name=n.createUniqueName(i.name)),$e(s,i),i.extensions&&at(t,s,i);const o=i.nodes||[],c=[];for(let A=0,a=o.length;A<a;A++)c.push(n.getDependency("node",o[A]));return Promise.all(c).then(function(A){for(let f=0,u=A.length;f<u;f++)s.add(A[f]);const a=f=>{const u=new Map;for(const[b,d]of n.associations)(b instanceof m.Material||b instanceof m.Texture)&&u.set(b,d);return f.traverse(b=>{const d=n.associations.get(b);d!=null&&u.set(b,d)}),u};return n.associations=a(s),s})}_createAnimationTracks(e,t,i,n,s){const o=[],c=e.name?e.name:e.uuid,A=[];rt[s.path]===rt.weights?e.traverse(function(b){b.morphTargetInfluences&&A.push(b.name?b.name:b.uuid)}):A.push(c);let a;switch(rt[s.path]){case rt.weights:a=m.NumberKeyframeTrack;break;case rt.rotation:a=m.QuaternionKeyframeTrack;break;case rt.translation:case rt.scale:a=m.VectorKeyframeTrack;break;default:i.itemSize===1?a=m.NumberKeyframeTrack:a=m.VectorKeyframeTrack;break}const f=n.interpolation!==void 0?Vr[n.interpolation]:m.InterpolateLinear,u=this._getArrayFromAccessor(i);for(let b=0,d=A.length;b<d;b++){const I=new a(A[b]+"."+rt[s.path],t.array,u,f);n.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(I),o.push(I)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const i=Jt(t.constructor),n=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)n[s]=t[s]*i;t=n}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(i){const n=this instanceof m.QuaternionKeyframeTrack?Wr:Kn;return new n(this.times,this.values,this.getValueSize()/3,i)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function no(r,e,t){const i=e.attributes,n=new m.Box3;if(i.POSITION!==void 0){const c=t.json.accessors[i.POSITION],A=c.min,a=c.max;if(A!==void 0&&a!==void 0){if(n.set(new m.Vector3(A[0],A[1],A[2]),new m.Vector3(a[0],a[1],a[2])),c.normalized){const f=Jt(ht[c.componentType]);n.min.multiplyScalar(f),n.max.multiplyScalar(f)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const c=new m.Vector3,A=new m.Vector3;for(let a=0,f=s.length;a<f;a++){const u=s[a];if(u.POSITION!==void 0){const b=t.json.accessors[u.POSITION],d=b.min,I=b.max;if(d!==void 0&&I!==void 0){if(A.setX(Math.max(Math.abs(d[0]),Math.abs(I[0]))),A.setY(Math.max(Math.abs(d[1]),Math.abs(I[1]))),A.setZ(Math.max(Math.abs(d[2]),Math.abs(I[2]))),b.normalized){const g=Jt(ht[b.componentType]);A.multiplyScalar(g)}c.max(A)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}n.expandByVector(c)}r.boundingBox=n;const o=new m.Sphere;n.getCenter(o.center),o.radius=n.min.distanceTo(n.max)/2,r.boundingSphere=o}function Bn(r,e,t){const i=e.attributes,n=[];function s(o,c){return t.getDependency("accessor",o).then(function(A){r.setAttribute(c,A)})}for(const o in i){const c=Yt[o]||o.toLowerCase();c in r.attributes||n.push(s(i[o],c))}if(e.indices!==void 0&&!r.index){const o=t.getDependency("accessor",e.indices).then(function(c){r.setIndex(c)});n.push(o)}return m.ColorManagement.workingColorSpace!==m.LinearSRGBColorSpace&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${m.ColorManagement.workingColorSpace}" not supported.`),$e(r,e),no(r,e,t),Promise.all(n).then(function(){return e.targets!==void 0?Jr(r,e.targets,t):r})}const Mt=new WeakMap;class io extends m.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,n){const s=new m.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{this.parse(o,t,n)},i,n)}parse(e,t,i=()=>{}){this.decodeDracoFile(e,t,null,null,m.SRGBColorSpace,i).catch(i)}decodeDracoFile(e,t,i,n,s=m.LinearSRGBColorSpace,o=()=>{}){const c={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:s};return this.decodeGeometry(e,c).then(t).catch(o)}decodeGeometry(e,t){const i=JSON.stringify(t);if(Mt.has(e)){const A=Mt.get(e);if(A.key===i)return A.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let n;const s=this.workerNextTaskID++,o=e.byteLength,c=this._getWorker(s,o).then(A=>(n=A,new Promise((a,f)=>{n._callbacks[s]={resolve:a,reject:f},n.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(A=>this._createGeometry(A.geometry));return c.catch(()=>!0).then(()=>{n&&s&&this._releaseTask(n,s)}),Mt.set(e,{key:i,promise:c}),c}_createGeometry(e){const t=new m.BufferGeometry;e.index&&t.setIndex(new m.BufferAttribute(e.index.array,1));for(let i=0;i<e.attributes.length;i++){const{name:n,array:s,itemSize:o,stride:c,vertexColorSpace:A}=e.attributes[i];let a;if(o===c)a=new m.BufferAttribute(s,o);else{const f=new m.InterleavedBuffer(s,c);a=new m.InterleavedBufferAttribute(f,o,0)}n==="color"&&(this._assignVertexColorSpace(a,A),a.normalized=!(s instanceof Float32Array)),t.setAttribute(n,a)}return t}_assignVertexColorSpace(e,t){if(t!==m.SRGBColorSpace)return;const i=new m.Color;for(let n=0,s=e.count;n<s;n++)i.fromBufferAttribute(e,n),m.ColorManagement.colorSpaceToWorking(i,m.SRGBColorSpace),e.setXYZ(n,i.r,i.g,i.b)}_loadLibrary(e,t){const i=new m.FileLoader(this.manager);return i.setPath(this.decoderPath),i.setResponseType(t),i.setWithCredentials(this.withCredentials),new Promise((n,s)=>{i.load(e,n,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(i=>{const n=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=ro.toString(),o=["/* draco decoder */",n,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(`
|
|
2
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const n=new Worker(this.workerSourceURL);n._callbacks={},n._taskCosts={},n._taskLoad=0,n.postMessage({type:"init",decoderConfig:this.decoderConfig}),n.onmessage=function(s){const o=s.data;switch(o.type){case"decode":n._callbacks[o.id].resolve(o);break;case"error":n._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(n)}else this.workerPool.sort(function(n,s){return n._taskLoad>s._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function ro(){let r,e;onmessage=function(o){const c=o.data;switch(c.type){case"init":r=c.decoderConfig,e=new Promise(function(f){r.onModuleLoaded=function(u){f({draco:u})},DracoDecoderModule(r)});break;case"decode":const A=c.buffer,a=c.taskConfig;e.then(f=>{const u=f.draco,b=new u.Decoder;try{const d=t(u,b,new Int8Array(A),a),I=d.attributes.map(g=>g.array.buffer);d.index&&I.push(d.index.array.buffer),self.postMessage({type:"decode",id:c.id,geometry:d},I)}catch(d){console.error(d),self.postMessage({type:"error",id:c.id,error:d.message})}finally{u.destroy(b)}});break}};function t(o,c,A,a){const f=a.attributeIDs,u=a.attributeTypes;let b,d;const I=c.GetEncodedGeometryType(A);if(I===o.TRIANGULAR_MESH)b=new o.Mesh,d=c.DecodeArrayToMesh(A,A.byteLength,b);else if(I===o.POINT_CLOUD)b=new o.PointCloud,d=c.DecodeArrayToPointCloud(A,A.byteLength,b);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!d.ok()||b.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+d.error_msg());const g={index:null,attributes:[]};for(const l in f){const h=self[u[l]];let p,C;if(a.useUniqueIDs)C=f[l],p=c.GetAttributeByUniqueId(b,C);else{if(C=c.GetAttributeId(b,o[f[l]]),C===-1)continue;p=c.GetAttribute(b,C)}const E=n(o,c,b,l,h,p);l==="color"&&(E.vertexColorSpace=a.vertexColorSpace),g.attributes.push(E)}return I===o.TRIANGULAR_MESH&&(g.index=i(o,c,b)),o.destroy(b),g}function i(o,c,A){const f=A.num_faces()*3,u=f*4,b=o._malloc(u);c.GetTrianglesUInt32Array(A,u,b);const d=new Uint32Array(o.HEAPF32.buffer,b,f).slice();return o._free(b),{array:d,itemSize:1}}function n(o,c,A,a,f,u){const b=A.num_points(),d=u.num_components(),I=s(o,f),g=d*f.BYTES_PER_ELEMENT,l=Math.ceil(g/4)*4,h=l/f.BYTES_PER_ELEMENT,p=b*g,C=b*l,E=o._malloc(p);c.GetAttributeDataArrayForAllPoints(A,u,I,p,E);const B=new f(o.HEAPF32.buffer,E,p/f.BYTES_PER_ELEMENT);let Q;if(g===l)Q=B.slice();else{Q=new f(C/f.BYTES_PER_ELEMENT);let S=0;for(let U=0,v=B.length;U<v;U++){for(let O=0;O<d;O++)Q[S+O]=B[U*d+O];S+=h}}return o._free(E),{name:a,count:b,itemSize:d,array:Q,stride:h}}function s(o,c){switch(c){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}class oo{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e<this.pool;e++)if(!(this.workerStatus&1<<e))return e;return-1}_onMessage(e,t){const i=this.workersResolve[e];if(i&&i(t),this.queue.length){const{resolve:n,msg:s,transfer:o}=this.queue.shift();this.workersResolve[e]=n,this.workers[e].postMessage(s,o)}else this.workerStatus^=1<<e}setWorkerCreator(e){this.workerCreator=e}setWorkerLimit(e){this.pool=e}postMessage(e,t){return new Promise(i=>{const n=this._getIdleWorker();n!==-1?(this._initWorker(n),this.workerStatus|=1<<n,this.workersResolve[n]=i,this.workers[n].postMessage(e,t)):this.queue.push({resolve:i,msg:e,transfer:t})})}dispose(){this.workers.forEach(e=>e.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const so=0,Tn=2,ao=1,Rn=2,Ao=0,co=1,lo=10,uo=0,zn=9,Wn=15,Vn=16,Yn=22,Jn=37,Xn=43,Zn=76,$n=83,ei=97,ti=100,ni=103,ii=109,ri=122,oi=123,si=131,ai=132,Ai=133,ci=134,li=137,ui=138,hi=139,fi=140,di=141,pi=142,gi=145,Ei=146,Ii=148,mi=152,Xt=153,ho=154,Zt=155,fo=156,bi=157,Ci=158,yi=165,Bi=166,Ti=1000054e3,Ri=1000054001,wi=1000054004,vi=1000054005,rn=1000066e3,Qi=1000066004;class dt{constructor(e,t,i,n){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(e.buffer,e.byteOffset+t,i),this._littleEndian=n,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint8Array(e){const t=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,e);return this._offset+=e,t}_skip(e){return this._offset+=e,this}_scan(e,t=0){const i=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==t&&n<e;)n++,this._offset++;return n<e&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,n)}}const ze=[171,75,84,88,32,50,48,187,13,10,26,10];function wn(r){return new TextDecoder().decode(r)}function po(r){const e=new Uint8Array(r.buffer,r.byteOffset,ze.length);if(e[0]!==ze[0]||e[1]!==ze[1]||e[2]!==ze[2]||e[3]!==ze[3]||e[4]!==ze[4]||e[5]!==ze[5]||e[6]!==ze[6]||e[7]!==ze[7]||e[8]!==ze[8]||e[9]!==ze[9]||e[10]!==ze[10]||e[11]!==ze[11])throw new Error("Missing KTX 2.0 identifier.");const t={vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null},i=17*Uint32Array.BYTES_PER_ELEMENT,n=new dt(r,ze.length,i,!0);t.vkFormat=n._nextUint32(),t.typeSize=n._nextUint32(),t.pixelWidth=n._nextUint32(),t.pixelHeight=n._nextUint32(),t.pixelDepth=n._nextUint32(),t.layerCount=n._nextUint32(),t.faceCount=n._nextUint32(),t.levelCount=n._nextUint32(),t.supercompressionScheme=n._nextUint32();const s=n._nextUint32(),o=n._nextUint32(),c=n._nextUint32(),A=n._nextUint32(),a=n._nextUint64(),f=n._nextUint64(),u=3*Math.max(t.levelCount,1)*8,b=new dt(r,ze.length+i,u,!0);for(let re=0,oe=Math.max(t.levelCount,1);re<oe;re++)t.levels.push({levelData:new Uint8Array(r.buffer,r.byteOffset+b._nextUint64(),b._nextUint64()),uncompressedByteLength:b._nextUint64()});const d=new dt(r,s,o,!0);d._skip(4);const I=d._nextUint16(),g=d._nextUint16(),l=d._nextUint16(),h=d._nextUint16(),p={vendorId:I,descriptorType:g,versionNumber:l,colorModel:d._nextUint8(),colorPrimaries:d._nextUint8(),transferFunction:d._nextUint8(),flags:d._nextUint8(),texelBlockDimension:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],bytesPlane:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],samples:[]},C=(h/4-6)/4;for(let re=0;re<C;re++){const oe={bitOffset:d._nextUint16(),bitLength:d._nextUint8(),channelType:d._nextUint8(),samplePosition:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};64&oe.channelType?(oe.sampleLower=d._nextInt32(),oe.sampleUpper=d._nextInt32()):(oe.sampleLower=d._nextUint32(),oe.sampleUpper=d._nextUint32()),p.samples[re]=oe}t.dataFormatDescriptor.length=0,t.dataFormatDescriptor.push(p);const E=new dt(r,c,A,!0);for(;E._offset<A;){const re=E._nextUint32(),oe=E._scan(re),te=wn(oe);if(t.keyValue[te]=E._nextUint8Array(re-oe.byteLength-1),te.match(/^ktx/i)){const he=wn(t.keyValue[te]);t.keyValue[te]=he.substring(0,he.lastIndexOf("\0"))}E._skip(re%4?4-re%4:0)}if(f<=0)return t;const B=new dt(r,a,f,!0),Q=B._nextUint16(),S=B._nextUint16(),U=B._nextUint32(),v=B._nextUint32(),O=B._nextUint32(),L=B._nextUint32(),k=[];for(let re=0,oe=Math.max(t.levelCount,1);re<oe;re++)k.push({imageFlags:B._nextUint32(),rgbSliceByteOffset:B._nextUint32(),rgbSliceByteLength:B._nextUint32(),alphaSliceByteOffset:B._nextUint32(),alphaSliceByteLength:B._nextUint32()});const D=a+B._offset,_=D+U,V=_+v,J=V+O,q=new Uint8Array(r.buffer,r.byteOffset+D,U),X=new Uint8Array(r.buffer,r.byteOffset+_,v),$=new Uint8Array(r.buffer,r.byteOffset+V,O),le=new Uint8Array(r.buffer,r.byteOffset+J,L);return t.globalData={endpointCount:Q,selectorCount:S,imageDescs:k,endpointsData:q,selectorsData:X,tablesData:$,extendedData:le},t}let Ot,et,$t;const Pt={env:{emscripten_notify_memory_growth:function(r){$t=new Uint8Array(et.exports.memory.buffer)}}};class go{init(){return Ot||(Ot=typeof fetch<"u"?fetch("data:application/wasm;base64,"+vn).then(e=>e.arrayBuffer()).then(e=>WebAssembly.instantiate(e,Pt)).then(this._init):WebAssembly.instantiate(Buffer.from(vn,"base64"),Pt).then(this._init),Ot)}_init(e){et=e.instance,Pt.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!et)throw new Error("ZSTDDecoder: Await .init() before decoding.");const i=e.byteLength,n=et.exports.malloc(i);$t.set(e,n),t=t||Number(et.exports.ZSTD_findDecompressedSize(n,i));const s=et.exports.malloc(t),o=et.exports.ZSTD_decompress(s,t,n,i),c=$t.slice(s,s+o);return et.exports.free(n),et.exports.free(s),c}}const vn="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwg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ADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQN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iAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIAN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KEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgB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gB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMII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AAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",Eo="display-p3",Io="display-p3-linear";({...m.ColorManagement.spaces[m.SRGBColorSpace]});const Gt=new WeakMap;let Ut=0,Ht;class Je extends m.Loader{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new oo,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}async detectSupportAsync(e){return console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await e.init(),this.detectSupport(e)}detectSupport(e){return e.isWebGPURenderer===!0?this.workerConfig={astcSupported:e.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:e.hasFeature("texture-compression-etc1"),etc2Supported:e.hasFeature("texture-compression-etc2"),dxtSupported:e.hasFeature("texture-compression-s3tc"),bptcSupported:e.hasFeature("texture-compression-bc"),pvrtcSupported:e.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:e.extensions.has("WEBGL_compressed_texture_astc")&&e.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},typeof navigator<"u"&&navigator.platform.indexOf("Linux")>=0&&navigator.userAgent.indexOf("Firefox")>=0&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){const e=new m.FileLoader(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),i=new m.FileLoader(this.manager);i.setPath(this.transcoderPath),i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const n=i.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,n]).then(([s,o])=>{const c=Je.BasisWorker.toString(),A=["/* constants */","let _EngineFormat = "+JSON.stringify(Je.EngineFormat),"let _EngineType = "+JSON.stringify(Je.EngineType),"let _TranscoderFormat = "+JSON.stringify(Je.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Je.BasisFormat),"/* basis_transcoder.js */",s,"/* worker */",c.substring(c.indexOf("{")+1,c.lastIndexOf("}"))].join(`
|
|
3
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([A])),this.transcoderBinary=o,this.workerPool.setWorkerCreator(()=>{const a=new Worker(this.workerSourceURL),f=this.transcoderBinary.slice(0);return a.postMessage({type:"init",config:this.workerConfig,transcoderBinary:f},[f]),a})}),Ut>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Ut++}return this.transcoderPending}load(e,t,i,n){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const s=new m.FileLoader(this.manager);s.setPath(this.path),s.setCrossOrigin(this.crossOrigin),s.setWithCredentials(this.withCredentials),s.setRequestHeader(this.requestHeader),s.setResponseType("arraybuffer"),s.load(e,o=>{this.parse(o,t,n)},i,n)}parse(e,t,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(Gt.has(e))return Gt.get(e).promise.then(t).catch(i);this._createTexture(e).then(n=>t?t(n):null).catch(i)}_createTextureFrom(e,t){const{type:i,error:n,data:{faces:s,width:o,height:c,format:A,type:a,dfdFlags:f}}=e;if(i==="error")return Promise.reject(n);let u;if(t.faceCount===6)u=new m.CompressedCubeTexture(s,A,a);else{const b=s[0].mipmaps;u=t.layerCount>1?new m.CompressedArrayTexture(b,o,c,t.layerCount,A,a):new m.CompressedTexture(b,o,c,A,a)}return u.minFilter=s[0].mipmaps.length===1?m.LinearFilter:m.LinearMipmapLinearFilter,u.magFilter=m.LinearFilter,u.generateMipmaps=!1,u.needsUpdate=!0,u.colorSpace=ki(t),u.premultiplyAlpha=!!(f&ao),u}async _createTexture(e,t={}){const i=po(new Uint8Array(e)),n=i.vkFormat===rn&&i.dataFormatDescriptor[0].colorModel===167;if(!(i.vkFormat===uo||n&&!this.workerConfig.astcHDRSupported))return bo(i);const o=t,c=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:o},[e])).then(A=>this._createTextureFrom(A.data,i));return Gt.set(e,{promise:c}),c}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Ut--}}Je.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2};Je.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25};Je.EngineFormat={RGBAFormat:m.RGBAFormat,RGBA_ASTC_4x4_Format:m.RGBA_ASTC_4x4_Format,RGB_BPTC_UNSIGNED_Format:m.RGB_BPTC_UNSIGNED_Format,RGBA_BPTC_Format:m.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:m.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:m.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:m.RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:m.RGB_ETC1_Format,RGB_ETC2_Format:m.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:m.RGB_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format:m.RGBA_S3TC_DXT1_Format};Je.EngineType={UnsignedByteType:m.UnsignedByteType,HalfFloatType:m.HalfFloatType,FloatType:m.FloatType};Je.BasisWorker=function(){let r,e,t;const i=_EngineFormat,n=_EngineType,s=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",function(I){const g=I.data;switch(g.type){case"init":r=g.config,c(g.transcoderBinary);break;case"transcode":e.then(()=>{try{const{faces:l,buffers:h,width:p,height:C,hasAlpha:E,format:B,type:Q,dfdFlags:S}=A(g.buffer);self.postMessage({type:"transcode",id:g.id,data:{faces:l,width:p,height:C,hasAlpha:E,format:B,type:Q,dfdFlags:S}},h)}catch(l){console.error(l),self.postMessage({type:"error",id:g.id,error:l.message})}});break}});function c(I){e=new Promise(g=>{t={wasmBinary:I,onRuntimeInitialized:g},BASIS(t)}).then(()=>{t.initializeBasis(),t.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function A(I){const g=new t.KTX2File(new Uint8Array(I));function l(){g.close(),g.delete()}if(!g.isValid())throw l(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");let h;if(g.isUASTC())h=o.UASTC;else if(g.isETC1S())h=o.ETC1S;else if(g.isHDR())h=o.UASTC_HDR;else throw new Error("THREE.KTX2Loader: Unknown Basis encoding");const p=g.getWidth(),C=g.getHeight(),E=g.getLayers()||1,B=g.getLevels(),Q=g.getFaces(),S=g.getHasAlpha(),U=g.getDFDFlags(),{transcoderFormat:v,engineFormat:O,engineType:L}=u(h,p,C,S);if(!p||!C||!B)throw l(),new Error("THREE.KTX2Loader: Invalid texture");if(!g.startTranscoding())throw l(),new Error("THREE.KTX2Loader: .startTranscoding failed");const k=[],D=[];for(let _=0;_<Q;_++){const V=[];for(let J=0;J<B;J++){const q=[];let X,$;for(let re=0;re<E;re++){const oe=g.getImageLevelInfo(J,re,_);_===0&&J===0&&re===0&&(oe.origWidth%4!==0||oe.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),B>1?(X=oe.origWidth,$=oe.origHeight):(X=oe.width,$=oe.height);let te=new Uint8Array(g.getImageTranscodedSizeInBytes(J,re,0,v));const he=g.transcodeImage(te,J,re,_,v,0,-1,-1);if(L===n.HalfFloatType&&(te=new Uint16Array(te.buffer,te.byteOffset,te.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!he)throw l(),new Error("THREE.KTX2Loader: .transcodeImage failed.");q.push(te)}const le=d(q);V.push({data:le,width:X,height:$}),D.push(le.buffer)}k.push({mipmaps:V,width:p,height:C,format:O,type:L})}return l(),{faces:k,buffers:D,width:p,height:C,hasAlpha:S,dfdFlags:U,format:O,type:L}}const a=[{if:"astcSupported",basisFormat:[o.UASTC],transcoderFormat:[s.ASTC_4x4,s.ASTC_4x4],engineFormat:[i.RGBA_ASTC_4x4_Format,i.RGBA_ASTC_4x4_Format],engineType:[n.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.BC7_M5,s.BC7_M5],engineFormat:[i.RGBA_BPTC_Format,i.RGBA_BPTC_Format],engineType:[n.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.BC1,s.BC3],engineFormat:[i.RGBA_S3TC_DXT1_Format,i.RGBA_S3TC_DXT5_Format],engineType:[n.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.ETC1,s.ETC2],engineFormat:[i.RGB_ETC2_Format,i.RGBA_ETC2_EAC_Format],engineType:[n.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.ETC1],engineFormat:[i.RGB_ETC1_Format],engineType:[n.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.PVRTC1_4_RGB,s.PVRTC1_4_RGBA],engineFormat:[i.RGB_PVRTC_4BPPV1_Format,i.RGBA_PVRTC_4BPPV1_Format],engineType:[n.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[o.UASTC_HDR],transcoderFormat:[s.BC6H],engineFormat:[i.RGB_BPTC_UNSIGNED_Format],engineType:[n.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[o.ETC1S,o.UASTC],transcoderFormat:[s.RGBA32,s.RGBA32],engineFormat:[i.RGBAFormat,i.RGBAFormat],engineType:[n.UnsignedByteType,n.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[o.UASTC_HDR],transcoderFormat:[s.RGBA_HALF],engineFormat:[i.RGBAFormat],engineType:[n.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],f={[o.ETC1S]:a.filter(I=>I.basisFormat.includes(o.ETC1S)).sort((I,g)=>I.priorityETC1S-g.priorityETC1S),[o.UASTC]:a.filter(I=>I.basisFormat.includes(o.UASTC)).sort((I,g)=>I.priorityUASTC-g.priorityUASTC),[o.UASTC_HDR]:a.filter(I=>I.basisFormat.includes(o.UASTC_HDR)).sort((I,g)=>I.priorityHDR-g.priorityHDR)};function u(I,g,l,h){const p=f[I];for(let C=0;C<p.length;C++){const E=p[C];if(E.if&&!r[E.if]||!E.basisFormat.includes(I)||h&&E.transcoderFormat.length<2||E.needsPowerOfTwo&&!(b(g)&&b(l)))continue;const B=E.transcoderFormat[h?1:0],Q=E.engineFormat[h?1:0],S=E.engineType[0];return{transcoderFormat:B,engineFormat:Q,engineType:S}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}function b(I){return I<=2?!0:(I&I-1)===0&&I!==0}function d(I){if(I.length===1)return I[0];let g=0;for(let p=0;p<I.length;p++){const C=I[p];g+=C.byteLength}const l=new Uint8Array(g);let h=0;for(let p=0;p<I.length;p++){const C=I[p];l.set(C,h),h+=C.byteLength}return l}};const mo=new Set([m.RGBAFormat,m.RGBFormat,m.RGFormat,m.RedFormat]),jt={[ii]:m.RGBAFormat,[ni]:m.RGFormat,[ti]:m.RedFormat,[ei]:m.RGBAFormat,[$n]:m.RGFormat,[Zn]:m.RedFormat,[Xn]:m.RGBAFormat,[Jn]:m.RGBAFormat,[Yn]:m.RGFormat,[Vn]:m.RGFormat,[Wn]:m.RedFormat,[zn]:m.RedFormat,[oi]:m.RGBFormat,[ri]:m.RGBFormat,[mi]:m.RGBA_ETC2_EAC_Format,[Ii]:m.RGB_ETC2_Format,[Xt]:m.R11_EAC_Format,[ho]:m.SIGNED_R11_EAC_Format,[Zt]:m.RG11_EAC_Format,[fo]:m.SIGNED_RG11_EAC_Format,[rn]:m.RGBA_ASTC_4x4_Format,[Ci]:m.RGBA_ASTC_4x4_Format,[bi]:m.RGBA_ASTC_4x4_Format,[Qi]:m.RGBA_ASTC_6x6_Format,[Bi]:m.RGBA_ASTC_6x6_Format,[yi]:m.RGBA_ASTC_6x6_Format,[ci]:m.RGBA_S3TC_DXT1_Format,[Ai]:m.RGBA_S3TC_DXT1_Format,[ai]:m.RGB_S3TC_DXT1_Format,[si]:m.RGB_S3TC_DXT1_Format,[ui]:m.RGBA_S3TC_DXT3_Format,[li]:m.RGBA_S3TC_DXT3_Format,[fi]:m.SIGNED_RED_RGTC1_Format,[hi]:m.RED_RGTC1_Format,[pi]:m.SIGNED_RED_GREEN_RGTC2_Format,[di]:m.RED_GREEN_RGTC2_Format,[Ei]:m.RGBA_BPTC_Format,[gi]:m.RGBA_BPTC_Format,[vi]:m.RGBA_PVRTC_4BPPV1_Format,[Ri]:m.RGBA_PVRTC_4BPPV1_Format,[wi]:m.RGBA_PVRTC_2BPPV1_Format,[Ti]:m.RGBA_PVRTC_2BPPV1_Format},ut={[ii]:m.FloatType,[ni]:m.FloatType,[ti]:m.FloatType,[ei]:m.HalfFloatType,[$n]:m.HalfFloatType,[Zn]:m.HalfFloatType,[Xn]:m.UnsignedByteType,[Jn]:m.UnsignedByteType,[Yn]:m.UnsignedByteType,[Vn]:m.UnsignedByteType,[Wn]:m.UnsignedByteType,[zn]:m.UnsignedByteType,[oi]:m.UnsignedInt5999Type,[ri]:m.UnsignedInt101111Type,[mi]:m.UnsignedByteType,[Ii]:m.UnsignedByteType,[Xt]:m.UnsignedByteType,[Xt]:m.UnsignedByteType,[Zt]:m.UnsignedByteType,[Zt]:m.UnsignedByteType,[rn]:m.HalfFloatType,[Ci]:m.UnsignedByteType,[bi]:m.UnsignedByteType,[Qi]:m.HalfFloatType,[Bi]:m.UnsignedByteType,[yi]:m.UnsignedByteType,[ci]:m.UnsignedByteType,[Ai]:m.UnsignedByteType,[ai]:m.UnsignedByteType,[si]:m.UnsignedByteType,[ui]:m.UnsignedByteType,[li]:m.UnsignedByteType,[fi]:m.UnsignedByteType,[hi]:m.UnsignedByteType,[pi]:m.UnsignedByteType,[di]:m.UnsignedByteType,[Ei]:m.UnsignedByteType,[gi]:m.UnsignedByteType,[vi]:m.UnsignedByteType,[Ri]:m.UnsignedByteType,[wi]:m.UnsignedByteType,[Ti]:m.UnsignedByteType};async function bo(r){const{vkFormat:e}=r;if(jt[e]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+e);ut[e]===void 0&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+e);let t;r.supercompressionScheme===Tn&&(Ht||(Ht=new Promise(async o=>{const c=new go;await c.init(),o(c)})),t=await Ht);const i=[];for(let o=0;o<r.levels.length;o++){const c=Math.max(1,r.pixelWidth>>o),A=Math.max(1,r.pixelHeight>>o),a=r.pixelDepth?Math.max(1,r.pixelDepth>>o):0,f=r.levels[o];let u;if(r.supercompressionScheme===so)u=f.levelData;else if(r.supercompressionScheme===Tn)u=t.decode(f.levelData,f.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let b;ut[e]===m.FloatType?b=new Float32Array(u.buffer,u.byteOffset,u.byteLength/Float32Array.BYTES_PER_ELEMENT):ut[e]===m.HalfFloatType?b=new Uint16Array(u.buffer,u.byteOffset,u.byteLength/Uint16Array.BYTES_PER_ELEMENT):ut[e]===m.UnsignedInt5999Type||ut[e]===m.UnsignedInt101111Type?b=new Uint32Array(u.buffer,u.byteOffset,u.byteLength/Uint32Array.BYTES_PER_ELEMENT):b=u,i.push({data:b,width:c,height:A,depth:a})}const n=r.levelCount===0||i.length>1;let s;if(mo.has(jt[e]))s=r.pixelDepth===0?new m.DataTexture(i[0].data,r.pixelWidth,r.pixelHeight):new m.Data3DTexture(i[0].data,r.pixelWidth,r.pixelHeight,r.pixelDepth),s.minFilter=n?m.NearestMipmapNearestFilter:m.NearestFilter,s.magFilter=m.NearestFilter,s.generateMipmaps=r.levelCount===0;else{if(r.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");s=new m.CompressedTexture(i,r.pixelWidth,r.pixelHeight),s.minFilter=n?m.LinearMipmapLinearFilter:m.LinearFilter,s.magFilter=m.LinearFilter}return s.mipmaps=i,s.type=ut[e],s.format=jt[e],s.colorSpace=ki(r),s.needsUpdate=!0,Promise.resolve(s)}function ki(r){const e=r.dataFormatDescriptor[0];return e.colorPrimaries===co?e.transferFunction===Rn?m.SRGBColorSpace:m.LinearSRGBColorSpace:e.colorPrimaries===lo?e.transferFunction===Rn?Eo:Io:(e.colorPrimaries===Ao||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${e.colorPrimaries}"`),m.NoColorSpace)}class on{name;time;duration;isPaused;playCount;interpolants;constructor(e,t){this.name=t||e.name,this.time=0,this.duration=e.duration,this.isPaused=!1,this.playCount=0,this.interpolants={};for(const i of e.tracks){const n=i.getValueSize();let s;i.ValueTypeName==="quaternion"?s=new ae.QuaternionLinearInterpolant(i.times,i.values,n):s=new ae.LinearInterpolant(i.times,i.values,n),this.interpolants[i.name]=s}}init(e){}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}prepare3D(e){}cleanup3D(e){}setPause(e){this.isPaused=e}setTime(e){this.time=e}update(e){this.time+=e,this.time>this.duration&&(this.time-=this.duration,this.playCount++);const t={};for(const[i,n]of Object.entries(this.interpolants)){const[s,o]=i.split(".");let c=t[s];c||(c={},t[s]=c);const A=n.evaluate(this.time);if(o==="position")c.loc=new ce(A[0],A[1],A[2]);else if(o==="quaternion")c.quat=new Ce(A[0],A[1],A[2],A[3]);else if(o==="scale")c.scale=new ce(A[0],A[1],A[2]);else if(o==="morphTargetInfluences"){c.morphs||(c.morphs=[]);const a=Array.from(A);c.morphs.push({name:s,vals:a})}else console.warn(`ClipPoseMotion: update. unknown property(${o})`)}return t}}var Si=(function(){var r="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q:Odkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq;w8Wqdbk;esezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9Uc;WFbGgocjdaocjd6EhDaicefhocbhqdnindndndnaeaq9nmbaDaeaq9RaqaDfae6Egkcsfglcl4cifcd4hxalc9WGgmTmecbhPawcjdfhsaohzinaraz9Rax6mvarazaxfgo9RcK6mvczhlcbhHinalgic9WfgOawcj;cbffhldndndndndnazaOco4fRbbaHcoG4ciGPlbedibkal9cb83ibalcwf9cb83ibxikalaoRblaoRbbgOco4gAaAciSgAE86bbawcj;cbfaifglcGfaoclfaAfgARbbaOcl4ciGgCaCciSgCE86bbalcVfaAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc7faAaCfgARbbaOciGgOaOciSgOE86bbalctfaAaOfgARbbaoRbegOco4gCaCciSgCE86bbalc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc93faAaCfgARbbaOciGgOaOciSgOE86bbalc94faAaOfgARbbaoRbdgOco4gCaCciSgCE86bbalc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbalc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbalc97faAaCfgARbbaOciGgOaOciSgOE86bbalc98faAaOfgORbbaoRbigoco4gAaAciSgAE86bbalc99faOaAfgORbbaocl4ciGgAaAciSgAE86bbalc9:faOaAfgORbbaocd4ciGgAaAciSgAE86bbalcufaOaAfglRbbaociGgoaociSgoE86bbalaofhoxdkalaoRbwaoRbbgOcl4gAaAcsSgAE86bbawcj;cbfaifglcGfaocwfaAfgARbbaOcsGgOaOcsSgOE86bbalcVfaAaOfgORbbaoRbegAcl4gCaCcsSgCE86bbalc7faOaCfgORbbaAcsGgAaAcsSgAE86bbalctfaOaAfgORbbaoRbdgAcl4gCaCcsSgCE86bbalc91faOaCfgORbbaAcsGgAaAcsSgAE86bbalc4faOaAfgORbbaoRbigAcl4gCaCcsSgCE86bbalc93faOaCfgORbbaAcsGgAaAcsSgAE86bbalc94faOaAfgORbbaoRblgAcl4gCaCcsSgCE86bbalc95faOaCfgORbbaAcsGgAaAcsSgAE86bbalc96faOaAfgORbbaoRbvgAcl4gCaCcsSgCE86bbalc97faOaCfgORbbaAcsGgAaAcsSgAE86bbalc98faOaAfgORbbaoRbogAcl4gCaCcsSgCE86bbalc99faOaCfgORbbaAcsGgAaAcsSgAE86bbalc9:faOaAfgORbbaoRbrgocl4gAaAcsSgAE86bbalcufaOaAfglRbbaocsGgoaocsSgoE86bbalaofhoxekalao8Pbb83bbalcwfaocwf8Pbb83bbaoczfhokdnaiam9pmbaHcdfhHaiczfhlarao9RcL0mekkaiam6mvaoTmvdnakTmbawaPfRbbhHawcj;cbfhlashiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkkascefhsaohzaPcefgPad9hmbxikkcbc99arao9Radcaadca0ESEhoxlkaoaxad2fhCdnakmbadhlinaoTmlarao9Rax6mlaoaxfhoalcufglmbkaChoxekcbhmawcjdfhAinarao9Rax6miawamfRbbhHawcj;cbfhlaAhiakhOinaialRbbgzce4cbazceG9R7aHfgH86bbaiadfhialcefhlaOcufgOmbkaAcefhAaoaxfhoamcefgmad9hmbkaChokabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqaombkc9:hoxekc9:hokavcj;ebf8Kjjjjbaok;cseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;oiliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabaiavcefciGfcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavciGfgkcd7cetfaD87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:OhDxekcjjjj94hDkabaiavcufciGfcetfaD87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohvxekcjjjj94hvkabakcetfav87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklzNbb",e="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q:6dkr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq:p9sqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:N8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhlaicefhodnaeTmbadTmbalc;WFbGglcjdalcjd6EhwcbhDinawaeaD9RaDawfae6Egqcsfglc9WGgkci2hxakcethmalcl4cifcd4hPabaDad2fhsakc;ab6hzcbhHincbhOaohAdndninaraA9RaP6meavcj;cbfaOak2fhCaAaPfhocbhidnazmbarao9Rc;Gb6mbcbhlinaCalfhidndndndndnaAalco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklbaoczfhokdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaiaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaiaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaiaopbbbpklzaoczfhokdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaiaopbblaopbbbgQclp:meaQpm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ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WaocwfaYpQbfaXc:q:yjjbfRbbfhoxekaiaopbbbpkl8Waoczfhokalc;abfhialcjefak0meaihlarao9Rc;Fb0mbkkdnaiak9pmbaici4hlinarao9RcK6miaCaifhXdndndndndnaAaico4fRbbalcoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpkbbxikaXaopbblaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaoclfaYpQbfaKc:q:yjjbfRbbfhoxdkaXaopbbwaopbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkbbaocwfaYpQbfaKc:q:yjjbfRbbfhoxekaXaopbbbpkbbaoczfhokalcdfhlaiczfgiak6mbkkaoTmeaohAaOcefgOclSmdxbkkc9:hoxlkdnakTmbavcjdfaHfhiavaHfpbdbhYcbhXinaiavcj;cbfaXfglpblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLalakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEalamfpblbg3cep9Ta3aQp9op9Hp9rg3alaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfglaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaladfglaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaladfglaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaladfglaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaladfhiaXczfgXak6mbkkaHclfgHad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfgDae6mbkkcbc99arao9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk::seHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgwce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhDaicefgqarfhidnaeTmbcmcsawceSEhkcbhxcbhmcbhPcbhwcbhlindnaiaD9nmbc9:hoxikdndnaqRbbgoc;Ve0mbavc;abfalaocu7gscl4fcsGcitfgzydlhrazydbhzdnaocsGgHak9pmbavawasfcsGcdtfydbaxaHEhoaHThsdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkaxasfhxcdhHavawcdtfaoBdbawasfhwcehsalhOxdkdndnaHcsSmbaHc987aHamffcefhoxekaicefhoai8SbbgHcFeGhsdndnaHcu9mmbaohixekaicvfhiascFbGhscrhHdninao8SbbgOcFbGaHtasVhsaOcu9kmeaocefhoaHcrfgHc8J9hmbxdkkaocefhikasce4cbasceG9R7amfhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhHavawcdtfaoBdbcehsawcefhwalhOaohmxekdnaocpe0mbaxcefgHavawaDaocsGfRbbgocl49RcsGcdtfydbaocz6gzEhravawao9RcsGcdtfydbaHazfgAaocsGgHEhoaHThCdndnadcd9hmbabaPcetfgHax87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHaxBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfaxBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgOaxBdlaOarBdbavawazfgwcsGcdtfaoBdbalcefcsGhOawaCfhwaxhzaAaCfhxxekaxcbaiRbbgOEgzaoc;:eSgHfhraOcsGhCaOcl4hAdndnaOcs0mbarcefhoxekarhoavawaA9RcsGcdtfydbhrkdndnaCmbaocefhxxekaohxavawaO9RcsGcdtfydbhokdndnaHTmbaicefhHxekaicdfhHai8SbegscFeGhzdnascu9kmbaicofhXazcFbGhzcrhidninaH8SbbgscFbGaitazVhzascu9kmeaHcefhHaicrfgic8J9hmbkaXhHxekaHcefhHkazce4cbazceG9R7amfgmhzkdndnaAcsSmbaHhsxekaHcefhsaH8SbbgicFeGhrdnaicu9kmbaHcvfhXarcFbGhrcrhidninas8SbbgHcFbGaitarVhraHcu9kmeascefhsaicrfgic8J9hmbkaXhsxekascefhskarce4cbarceG9R7amfgmhrkdndnaCcsSmbashixekascefhias8SbbgocFeGhHdnaocu9kmbascvfhXaHcFbGhHcrhodninai8SbbgscFbGaotaHVhHascu9kmeaicefhiaocrfgoc8J9hmbkaXhixekaicefhikaHce4cbaHceG9R7amfgmhokdndnadcd9hmbabaPcetfgHaz87ebaHclfao87ebaHcdfar87ebxekabaPcdtfgHazBdbaHcwfaoBdbaHclfarBdbkcdhsavawcdtfazBdbavawcefgwcsGcdtfarBdbcihHavc;abfalcitfgXazBdlaXarBdbavawaOcz6aAcsSVfgwcsGcdtfaoBdbawaCTaCcsSVfhwalcefcsGhOkaqcefhqavc;abfaOcitfgOarBdlaOaoBdbavc;abfalasfcsGcitfgraoBdlarazBdbawcsGhwalaHfcsGhlaPcifgPae6mbkkcbc99aiaDSEhokavc;aef8Kjjjjbaok:flevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaic8Etc8F91aicd47avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:wPliuo97eue978Jjjjjbca9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskdnalTmbcbhvabhdinadczfgxaxpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiaeciGgvcitgdfcbcaad9R;8kbaiabalcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;Meawaqawamp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaDakp;Mearp;Keamp9oaqakp;Mearp;Keczp:Rep9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaialciGgecdtgdVcbc;abad9R;8kbaiabavcdtfgvad;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkavaiad;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var n=WebAssembly.validate(t)?c(e):c(r),s,o=WebAssembly.instantiate(n,{}).then(function(h){s=h.instance,s.exports.__wasm_call_ctors()});function c(h){for(var p=new Uint8Array(h.length),C=0;C<h.length;++C){var E=h.charCodeAt(C);p[C]=E>96?E-97:E>64?E-39:E+4}for(var B=0,C=0;C<h.length;++C)p[B++]=p[C]<60?i[p[C]]:(p[C]-60)*64+p[++C];return p.buffer.slice(0,B)}function A(h,p,C,E,B,Q,S){var U=h.exports.sbrk,v=E+3&-4,O=U(v*B),L=U(Q.length),k=new Uint8Array(h.exports.memory.buffer);k.set(Q,L);var D=p(O,E,B,L,Q.length);if(D==0&&S&&S(O,v,B),C.set(k.subarray(O,O+E*B)),U(O-U(0)),D!=0)throw new Error("Malformed buffer data: "+D)}var a={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},f={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},u=[],b=0;function d(h){var p={object:new Worker(h),pending:0,requests:{}};return p.object.onmessage=function(C){var E=C.data;p.pending-=E.count,p.requests[E.id][E.action](E.value),delete p.requests[E.id]},p}function I(h){for(var p="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(n)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+l.name+";"+A.toString()+l.toString(),C=new Blob([p],{type:"text/javascript"}),E=URL.createObjectURL(C),B=u.length;B<h;++B)u[B]=d(E);for(var B=h;B<u.length;++B)u[B].object.postMessage({});u.length=h,URL.revokeObjectURL(E)}function g(h,p,C,E,B){for(var Q=u[0],S=1;S<u.length;++S)u[S].pending<Q.pending&&(Q=u[S]);return new Promise(function(U,v){var O=new Uint8Array(C),L=++b;Q.pending+=h,Q.requests[L]={resolve:U,reject:v},Q.object.postMessage({id:L,count:h,size:p,source:O,mode:E,filter:B},[O.buffer])})}function l(h){var p=h.data;if(!p.id)return self.close();self.ready.then(function(C){try{var E=new Uint8Array(p.count*p.size);A(C,C.exports[p.mode],E,p.count,p.size,p.source,C.exports[p.filter]),self.postMessage({id:p.id,count:p.count,action:"resolve",value:E},[E.buffer])}catch(B){self.postMessage({id:p.id,count:p.count,action:"reject",value:B})}})}return{ready:o,supported:!0,useWorkers:function(h){I(h)},decodeVertexBuffer:function(h,p,C,E,B){A(s,s.exports.meshopt_decodeVertexBuffer,h,p,C,E,s.exports[a[B]])},decodeIndexBuffer:function(h,p,C,E){A(s,s.exports.meshopt_decodeIndexBuffer,h,p,C,E)},decodeIndexSequence:function(h,p,C,E){A(s,s.exports.meshopt_decodeIndexSequence,h,p,C,E)},decodeGltfBuffer:function(h,p,C,E,B,Q){A(s,s.exports[f[B]],h,p,C,E,s.exports[a[Q]])},decodeGltfBufferAsync:function(h,p,C,E,B){return u.length>0?g(h,p,C,f[E],a[B]):o.then(function(){var Q=new Uint8Array(h*p);return A(s,s.exports[f[E]],Q,h,p,C,s.exports[a[B]]),Q})}}})();function Co(r){return"morphTargetDictionary"in r&&r.morphTargetDictionary!==void 0&&"morphTargetInfluences"in r&&Array.isArray(r.morphTargetInfluences)}const yo={draco:"https://unpkg.com/three@0.182/examples/jsm/libs/draco/",ktx2:"https://unpkg.com/three@0.182.0/examples/jsm/libs/basis/",meshopt:!0};function _i(r={}){const e={...yo,...r};let t=new jn;const i=new io;if(i.setDecoderPath(e.draco),t.setDRACOLoader(i),e.renderer){const n=new Je;n.setTranscoderPath(e.ktx2),n.detectSupport(e.renderer),t.setKTX2Loader(n)}e.meshopt&&t.setMeshoptDecoder(Si),sn=t}let sn=new jn;sn.setMeshoptDecoder(Si);class Bo extends xe{ready;gltf;constructor(e){super(),this.ready=this.asyncInit(e)}initObject(){return new ae.Object3D}async asyncInit(e){if(Ln(e)){this.gltf=await sn.loadAsync(e),this.bones={},this.skeletons=[],this.morphs={},this.gltf.scene.traverse(i=>{if(i.userData.a3js={objectA3:this},Co(i)){const{morphTargetDictionary:n,morphTargetInfluences:s}=i;Object.keys(n).forEach(o=>{const c=i.name+"."+o,A=n[o];this.morphs[c]={array:s,idx:A}})}i instanceof ae.Bone&&(this.bones[i.name]=i),i instanceof ae.SkinnedMesh&&this.skeletons.push(i.skeleton)});const t={};this.gltf.animations.forEach(i=>{t[i.name]=new on(i)}),this.setPoseMotions(t),this.object.add(this.gltf.scene)}else{const t=new ae.BoxGeometry,i=new ae.MeshStandardMaterial({color:16711680}),n=new ae.Mesh(t,i);this.object.add(n)}return this}}class an extends HTMLElement{ro;base;renderer;css2DRenderer;scene;camera;controller;camera3js;timer;_canvas;_css2DCanvas;constructor(e){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
|
|
4
4
|
<style>
|
|
5
5
|
:host {
|
|
6
6
|
width: 100%;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
</style>
|
|
25
25
|
<slot></slog>
|
|
26
|
-
`,e||(e={}),e.camera||(e.camera=new
|
|
26
|
+
`,e||(e={}),e.camera||(e.camera=new ae.PerspectiveCamera(75,300/150,.1,1e3)),this.camera3js=e.camera;const t=new It(e.camera);this.base=new Gn(t),this.scene=this.base.scene,this.camera=this.base.camera,this.controller=this.base.controller,this.timer=new ae.Timer,this.timer.connect(document);const i={antialias:e.antialias?e.antialias:!1,alpha:e.transparent?e.transparent:!1};this.renderer=new ae.WebGLRenderer(i),_i({renderer:this.renderer}),this.renderer.setSize(600,300),"opaque"in e&&this.renderer.setClearAlpha(0),this._canvas=this.renderer.domElement,this._canvas.width=600,this._canvas.height=300,this.appendChild(this._canvas),this.css2DRenderer=new Hn,this._css2DCanvas=this.css2DRenderer.domElement,this._css2DCanvas.style.position="absolute",this._css2DCanvas.style.top="0px",this.appendChild(this._css2DCanvas),this.animationFrameId=requestAnimationFrame(this.renderingLoop),this._css2DCanvas.addEventListener("click",this.myMouseClickedListener),window.addEventListener("keydown",n=>{this.controller?.keyDown(n)}),window.addEventListener("keyup",n=>{this.controller?.keyUp(n)}),window.addEventListener("keypress",n=>{this.controller?.keyPress(n)}),this._css2DCanvas.addEventListener("mousedown",n=>{this.controller?.mouseDown(n)}),this._css2DCanvas.addEventListener("mouseup",n=>{this.controller?.mouseUp(n)}),this._css2DCanvas.addEventListener("mousemove",n=>{this.controller?.mouseMove(n)}),this._css2DCanvas.addEventListener("click",n=>{this.controller?.mouseClick(n)}),this._css2DCanvas.addEventListener("mouseenter",n=>{this.controller?.mouseEnter(n)}),this._css2DCanvas.addEventListener("mouseleave",n=>{this.controller?.mouseLeave(n)}),this._css2DCanvas.addEventListener("wheel",n=>{this.controller?.mouseWheel(n)}),this._css2DCanvas.addEventListener("touchstart",n=>{this.controller?.touchStart(n)}),this._css2DCanvas.addEventListener("touchmove",n=>{this.controller?.touchMove(n)}),this._css2DCanvas.addEventListener("touchend",n=>{this.controller?.touchEnd(n)}),this._css2DCanvas.addEventListener("touchcancel",n=>{this.controller?.touchCancel(n)})}connectedCallback(){this.ro=new ResizeObserver(()=>{const e=window.devicePixelRatio||1,t=Math.floor(this.clientWidth*e),i=Math.floor(this.clientHeight*e);(this._canvas.width!==t||this._canvas.height!==i)&&(this._canvas.width=t,this._canvas.height=i,To(this.camera3js)&&(this.camera3js.aspect=t/i,this.camera3js.updateProjectionMatrix()),this.renderer.setSize(t,i),this.css2DRenderer.setSize(t,i))}),this.ro.observe(this)}disconnectedCallback(){this.ro?.disconnect()}replaceScene(e){return this.scene=e,this.base.replaceScene(e)}setController(e){this.controller=e,this.base.setController(e)}animationFrameId=-1;renderingLoop=()=>{this.animationFrameId=requestAnimationFrame(this.renderingLoop),this.timer.update();const e=this.timer.getDelta();this.base.updateScene(e),this.renderer.render(this.scene.scene,this.camera3js),this.css2DRenderer.render(this.scene.scene,this.camera3js),this.waitingRenderResolves.forEach(t=>{t(e)}),this.waitingRenderResolves=[]};waitingRenderResolves=[];waitForRender(){return new Promise(e=>{this.waitingRenderResolves.push(e)})}worldToScreen(e){const t=new ae.Vector3(e.x,e.y,e.z);t.project(this.camera3js);const i=new ae.Vector2;this.renderer.getSize(i);const n=(t.x+1)/2*i.x,s=(1-t.y)/2*i.y;return{x:n,y:s}}screenToWorld(e,t,i){const n=new ae.Vector3(e/this._canvas.clientWidth*2-1,-(t/this._canvas.clientHeight)*2+1,.5);n.unproject(this.camera3js);const s=n.sub(this.camera3js.position).normalize();return new ce(this.camera3js.position.clone().add(s.multiplyScalar(i)))}cameraToScreen(e){const i=new ae.Vector3(e.x,e.y,e.z).applyMatrix4(this.camera3js.matrixWorld);return H.v0.set(i),this.worldToScreen(H.v0)}screenToCamera(e,t,i){const n=this.screenToWorld(e,t,i),s=new ae.Vector3(n.x,n.y,n.z);return n.set(s.applyMatrix4(this.camera3js.matrixWorldInverse)),n}myMouseClickedListener=async e=>{if(this.camera instanceof It){const t=new ae.Raycaster,i=new ae.Vector2,n=e.target.getBoundingClientRect(),s=e.clientX-n.left,o=e.clientY-n.top;i.x=2*(s/n.width)-1,i.y=-2*(o/n.height)+1,t.setFromCamera(i,this.camera.camera);const c=t.intersectObjects(this.scene.scene.children),A=[];c.forEach(a=>{const f=a.object.userData.a3js?.objectA3;A.push({three:a.object,a3js:f})}),A.length>0&&await A[0].a3js.clicked(),this.dispatchEvent(new CustomEvent("click3d",{detail:{value:A}}))}};alert(e,t){return new Promise(i=>{const n=document.createElement("div");n.style.cssText="position: absolute; top: 0px; width: 100%; height: 100%; display: flex; flex-direction: column;";const s=document.createElement("p");s.style.cssText="width: 80%; margin: 0 auto; color: red; text-align: center; border: 3px solid red;",s.textContent=e,n.appendChild(s);const o=document.createElement("button");o.textContent="OK!",n.appendChild(o),this.appendChild(n),o.addEventListener("click",async()=>{t&&await t(),this.removeChild(n),i()})})}}customElements.define("canvas-a3",an);function To(r){return r.isPerspectiveCamera===!0}class Li extends HTMLElement{_resizeObserver;_dragging=!1;_resizing=!1;_resizeDir="";_startMouseX=0;_startMouseY=0;_startLeft=0;_startTop=0;_startWidth=0;_startHeight=0;_borderSize=5;_canvas;_css2DCanvas;_titleEl=null;_titleBar=null;_closeBtn=null;base;renderer;css2DRenderer;scene;camera;controller;camera3js;timer;constructor(e=600,t=300){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
|
|
27
27
|
<style>
|
|
28
28
|
:host {
|
|
29
29
|
position: absolute;
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<div class="content">
|
|
69
69
|
<slot></slot>
|
|
70
70
|
</div>
|
|
71
|
-
`,this.camera3js=new
|
|
71
|
+
`,this.camera3js=new ae.PerspectiveCamera(75,e/t,.1,1e3),this.camera3js.aspect=e/t;const i=new It(this.camera3js);this.base=new Gn(i),this.scene=this.base.scene,this.camera=this.base.camera,this.controller=this.base.controller,this.timer=new ae.Timer,this.timer.connect(document),this.renderer=new ae.WebGLRenderer,_i({renderer:this.renderer}),this.renderer.setSize(e,t),this._canvas=this.renderer.domElement,this._canvas.width=e,this._canvas.width=t,this.appendChild(this._canvas),this.css2DRenderer=new Hn,this.css2DRenderer.setSize(e,t),this._css2DCanvas=this.css2DRenderer.domElement,this._css2DCanvas.style.position="absolute",this._css2DCanvas.style.top="28px",this.appendChild(this._css2DCanvas),this._css2DCanvas.addEventListener("click",this.myMouseClickedListener),window.addEventListener("keydown",n=>{this.controller?.keyDown(n)}),window.addEventListener("keyup",n=>{this.controller?.keyUp(n)}),window.addEventListener("keypress",n=>{this.controller?.keyPress(n)}),this._css2DCanvas.addEventListener("mousedown",n=>{this.controller?.mouseDown(n)}),this._css2DCanvas.addEventListener("mouseup",n=>{this.controller?.mouseUp(n)}),this._css2DCanvas.addEventListener("mousemove",n=>{this.controller?.mouseMove(n)}),this._css2DCanvas.addEventListener("click",n=>{this.controller?.mouseClick(n)}),this._css2DCanvas.addEventListener("mouseenter",n=>{this.controller?.mouseEnter(n)}),this._css2DCanvas.addEventListener("mouseleave",n=>{this.controller?.mouseLeave(n)}),this._css2DCanvas.addEventListener("wheel",n=>{this.controller?.mouseWheel(n)}),this._css2DCanvas.addEventListener("touchstart",n=>{this.controller?.touchStart(n)}),this._css2DCanvas.addEventListener("touchmove",n=>{this.controller?.touchMove(n)}),this._css2DCanvas.addEventListener("touchend",n=>{this.controller?.touchEnd(n)}),this._css2DCanvas.addEventListener("touchcancel",n=>{this.controller?.touchCancel(n)}),document.body?document.body.appendChild(this):document.addEventListener("DOMContentLoaded",()=>{document.body.append(this)},{once:!0}),this.animationFrameId=requestAnimationFrame(this.renderingLoop)}_resizeCanvasToContent(){const e=this.shadowRoot.querySelector(".content");let t=e.clientWidth,i=e.clientHeight;const n=window.devicePixelRatio||1,s=Math.floor(t*n),o=Math.floor(i*n);(this._canvas.width!==s||this._canvas.height!==o)&&(this._canvas.width=s,this._canvas.height=o,this.camera3js.aspect=s/o,this.camera3js.updateProjectionMatrix(),this.renderer.setSize(s,o),this.css2DRenderer.setSize(s,o))}connectedCallback(){this._titleEl=this.shadowRoot.querySelector(".title"),this._titleEl.textContent=this.getAttribute("title")??"Window",this._titleBar=this.shadowRoot.querySelector(".titlebar"),this._closeBtn=this.shadowRoot.querySelector(".close"),this._titleBar.addEventListener("mousedown",this._onDragStart),this._closeBtn.addEventListener("click",()=>this.remove()),this.addEventListener("mousemove",this._onHover),this.addEventListener("mousedown",this._onResizeStart),document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp),this._resizeObserver=new ResizeObserver(()=>{this._canvas&&this._resizeCanvasToContent()});const e=this.shadowRoot.querySelector(".content");this._resizeObserver.observe(e),this._resizeCanvasToContent()}disconnectedCallback(){document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),this._resizeObserver?.disconnect()}_onDragStart=e=>{this._resizeDir||(this._dragging=!0,this._startMouseX=e.clientX,this._startMouseY=e.clientY,this._startLeft=this.offsetLeft,this._startTop=this.offsetTop)};_onHover=e=>{if(this._dragging||this._resizing)return;const t=this.getBoundingClientRect(),i=e.clientX-t.left,n=e.clientY-t.top,s=this._borderSize;let o="";n<s?o+="n":n>t.height-s&&(o+="s"),i<s?o+="w":i>t.width-s&&(o+="e"),this._resizeDir=o,this.style.cursor=this._cursorFromDir(o)};_cursorFromDir(e){switch(e){case"n":return"ns-resize";case"s":return"ns-resize";case"e":return"ew-resize";case"w":return"ew-resize";case"ne":return"nesw-resize";case"sw":return"nesw-resize";case"nw":return"nwse-resize";case"se":return"nwse-resize";default:return"default"}}_onResizeStart=e=>{this._resizeDir&&(this._resizing=!0,this._startMouseX=e.clientX,this._startMouseY=e.clientY,this._startLeft=this.offsetLeft,this._startTop=this.offsetTop,this._startWidth=this.offsetWidth,this._startHeight=this.offsetHeight)};_onMouseMove=e=>{if(this._dragging&&(this.style.left=`${this._startLeft+(e.clientX-this._startMouseX)}px`,this.style.top=`${this._startTop+(e.clientY-this._startMouseY)}px`),this._resizing){const t=e.clientX-this._startMouseX,i=e.clientY-this._startMouseY;this._resizeDir.includes("e")&&(this.style.width=`${this._startWidth+t}px`),this._resizeDir.includes("s")&&(this.style.height=`${this._startHeight+i}px`),this._resizeDir.includes("w")&&(this.style.width=`${this._startWidth-t}px`,this.style.left=`${this._startLeft+t}px`),this._resizeDir.includes("n")&&(this.style.height=`${this._startHeight-i}px`,this.style.top=`${this._startTop+i}px`)}};_onMouseUp=()=>{this._dragging=!1,this._resizing=!1};replaceScene(e){return this.scene=e,this.base.replaceScene(e)}setController(e){this.controller=e,this.base.setController(e)}animationFrameId=-1;renderingLoop=()=>{this.animationFrameId=requestAnimationFrame(this.renderingLoop),this.timer.update();const e=this.timer.getDelta();this.base.updateScene(e),this.renderer.render(this.scene.scene,this.camera3js),this.css2DRenderer.render(this.scene.scene,this.camera3js),this.waitingRenderResolves.forEach(t=>{t(e)}),this.waitingRenderResolves=[]};waitingRenderResolves=[];waitForRender(){return new Promise(e=>{this.waitingRenderResolves.push(e)})}worldToScreen(e){const t=new ae.Vector3(e.x,e.y,e.z);t.project(this.camera3js);const i=new ae.Vector2;this.renderer.getSize(i);const n=(t.x+1)/2*i.x,s=(1-t.y)/2*i.y;return{x:n,y:s}}screenToWorld(e,t,i){const n=new ae.Vector3(e/this._canvas.clientWidth*2-1,-(t/this._canvas.clientHeight)*2+1,.5);n.unproject(this.camera3js);const s=n.sub(this.camera3js.position).normalize();return new ce(this.camera3js.position.clone().add(s.multiplyScalar(i)))}cameraToScreen(e){const i=new ae.Vector3(e.x,e.y,e.z).applyMatrix4(this.camera3js.matrixWorld);return H.v0.set(i),this.worldToScreen(H.v0)}screenToCamera(e,t,i){const n=this.screenToWorld(e,t,i),s=new ae.Vector3(n.x,n.y,n.z);return n.set(s.applyMatrix4(this.camera3js.matrixWorldInverse)),n}myMouseClickedListener=async e=>{if(this.camera instanceof It){const t=new ae.Raycaster,i=new ae.Vector2,n=e.target.getBoundingClientRect(),s=e.clientX-n.left,o=e.clientY-n.top;i.x=2*(s/n.width)-1,i.y=-2*(o/n.height)+1,t.setFromCamera(i,this.camera.camera);const c=t.intersectObjects(this.scene.scene.children),A=[];c.forEach(a=>{const f=a.object.userData.a3js?.objectA3;A.push({three:a.object,a3js:f})}),A.length>0&&await A[0].a3js.clicked(),this.dispatchEvent(new CustomEvent("click3d",{detail:{value:A}}))}};alert(e,t){return new Promise(i=>{const n=document.createElement("div");n.style.cssText="position: absolute; top: 28px; width: 100%; height: 100%; display: flex; flex-direction: column;";const s=document.createElement("p");s.style.cssText="width: 80%; margin: 0 auto; color: red; text-align: center; border: 3px solid red;",s.textContent=e,n.appendChild(s);const o=document.createElement("button");o.textContent="OK!",n.appendChild(o),this.appendChild(n),o.addEventListener("click",async()=>{t&&await t(),this.removeChild(n),i()})})}}customElements.define("window-a3",Li);const Ro=`
|
|
72
72
|
color: white;
|
|
73
73
|
padding: 5px 10px;
|
|
74
74
|
background: rgba(0, 0, 0, 0.6);
|
|
@@ -77,66 +77,66 @@
|
|
|
77
77
|
font-family: sans-serif;
|
|
78
78
|
font-size: 14px;
|
|
79
79
|
pointer-events: none; /* マウスイベントを透過させて背後の操作を邪魔しない */
|
|
80
|
-
`,Qn={testMode:!0};class
|
|
81
|
-
`)A=0,a-=o;else{const b=Bo(u,s,A,a,t);r=="tb"?(A=0,a+=t.ascender*s):A+=b.offsetX,c.push(b.path)}}return c}function Bo(n,e,t,r,i){const s=i.glyphs[n]||i.glyphs["?"];if(!s){console.error('THREE.Font: character "'+n+'" does not exists in font family '+i.familyName+".");return}const o=new I.ShapePath;let c,A,a,f,u,b,d,E;if(s.o){const g=s._cachedOutline||(s._cachedOutline=s.o.split(" "));for(let l=0,h=g.length;l<h;)switch(g[l++]){case"m":c=g[l++]*e+t,A=g[l++]*e+r,o.moveTo(c,A);break;case"l":c=g[l++]*e+t,A=g[l++]*e+r,o.lineTo(c,A);break;case"q":a=g[l++]*e+t,f=g[l++]*e+r,u=g[l++]*e+t,b=g[l++]*e+r,o.quadraticCurveTo(u,b,a,f);break;case"b":a=g[l++]*e+t,f=g[l++]*e+r,u=g[l++]*e+t,b=g[l++]*e+r,d=g[l++]*e+t,E=g[l++]*e+r,o.bezierCurveTo(u,b,d,E,a,f);break}}return{offsetX:s.ha*e,path:o}}class yo extends I.ExtrudeGeometry{constructor(e,t={}){const r=t.font;if(r===void 0)super();else{const i=r.generateShapes(e,t.size,t.direction);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(i,t)}this.type="TextGeometry"}}let yt=null;async function To(n){if(n.match(/.zip$/i)){let e=n.substring(n.lastIndexOf("/"));e=e.substring(0,e.length-4);const t=await xn(n),r=tn(t,e);yt=new Li(JSON.parse(r))}else yt=await new bo().loadAsync(n)}class Ro extends Me{initObject(e){let t;if(kn(e)?t=e:t="ERROR",yt==null){const r=new se.BoxGeometry,i=new se.MeshStandardMaterial({color:16711680});return new se.Mesh(r,i)}else{const r={font:yt,size:1,depth:.5,curveSegments:12},i=new yo(t,r);i.center();const s=new se.MeshStandardMaterial({color:65280});return new se.Mesh(i,s)}}}var Ce=(n,e)=>()=>(e||(e={exports:{}},n(e.exports,e)),e.exports),_i=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.VERSION=void 0,n.VERSION="9.0.1"}),ke=Ce((n,e)=>{var t=n&&n.__spreadArray||function(F,Y){for(var q=0,ne=Y.length,de=F.length;q<ne;q++,de++)F[de]=Y[q];return F};Object.defineProperty(n,"__esModule",{value:!0}),n.toFastProperties=n.timer=n.peek=n.isES2015MapSupported=n.PRINT_WARNING=n.PRINT_ERROR=n.packArray=n.IDENTITY=n.NOOP=n.merge=n.groupBy=n.defaults=n.assignNoOverwrite=n.assign=n.zipObject=n.sortBy=n.indexOf=n.some=n.difference=n.every=n.isObject=n.isRegExp=n.isArray=n.partial=n.uniq=n.compact=n.reduce=n.findAll=n.find=n.cloneObj=n.cloneArr=n.contains=n.has=n.pick=n.reject=n.filter=n.dropRight=n.drop=n.isFunction=n.isUndefined=n.isString=n.forEach=n.last=n.first=n.flatten=n.map=n.mapValues=n.values=n.keys=n.isEmpty=void 0;function r(F){return F&&F.length===0}n.isEmpty=r;function i(F){return F==null?[]:Object.keys(F)}n.keys=i;function s(F){for(var Y=[],q=Object.keys(F),ne=0;ne<q.length;ne++)Y.push(F[q[ne]]);return Y}n.values=s;function o(F,Y){for(var q=[],ne=i(F),de=0;de<ne.length;de++){var Te=ne[de];q.push(Y.call(null,F[Te],Te))}return q}n.mapValues=o;function c(F,Y){for(var q=[],ne=0;ne<F.length;ne++)q.push(Y.call(null,F[ne],ne));return q}n.map=c;function A(F){for(var Y=[],q=0;q<F.length;q++){var ne=F[q];Array.isArray(ne)?Y=Y.concat(A(ne)):Y.push(ne)}return Y}n.flatten=A;function a(F){return r(F)?void 0:F[0]}n.first=a;function f(F){var Y=F&&F.length;return Y?F[Y-1]:void 0}n.last=f;function u(F,Y){if(Array.isArray(F))for(var q=0;q<F.length;q++)Y.call(null,F[q],q);else if(W(F))for(var ne=i(F),q=0;q<ne.length;q++){var de=ne[q],Te=F[de];Y.call(null,Te,de)}else throw Error("non exhaustive match")}n.forEach=u;function b(F){return typeof F=="string"}n.isString=b;function d(F){return F===void 0}n.isUndefined=d;function E(F){return F instanceof Function}n.isFunction=E;function g(F,Y){return Y===void 0&&(Y=1),F.slice(Y,F.length)}n.drop=g;function l(F,Y){return Y===void 0&&(Y=1),F.slice(0,F.length-Y)}n.dropRight=l;function h(F,Y){var q=[];if(Array.isArray(F))for(var ne=0;ne<F.length;ne++){var de=F[ne];Y.call(null,de)&&q.push(de)}return q}n.filter=h;function p(F,Y){return h(F,function(q){return!Y(q)})}n.reject=p;function C(F,Y){for(var q=Object.keys(F),ne={},de=0;de<q.length;de++){var Te=q[de],R=F[Te];Y(R)&&(ne[Te]=R)}return ne}n.pick=C;function m(F,Y){return W(F)?F.hasOwnProperty(Y):!1}n.has=m;function y(F,Y){return U(F,function(q){return q===Y})!==void 0}n.contains=y;function v(F){for(var Y=[],q=0;q<F.length;q++)Y.push(F[q]);return Y}n.cloneArr=v;function S(F){var Y={};for(var q in F)Object.prototype.hasOwnProperty.call(F,q)&&(Y[q]=F[q]);return Y}n.cloneObj=S;function U(F,Y){for(var q=0;q<F.length;q++){var ne=F[q];if(Y.call(null,ne))return ne}}n.find=U;function w(F,Y){for(var q=[],ne=0;ne<F.length;ne++){var de=F[ne];Y.call(null,de)&&q.push(de)}return q}n.findAll=w;function M(F,Y,q){for(var ne=Array.isArray(F),de=ne?F:s(F),Te=ne?[]:i(F),R=q,B=0;B<de.length;B++)R=Y.call(null,R,de[B],ne?B:Te[B]);return R}n.reduce=M;function _(F){return p(F,function(Y){return Y==null})}n.compact=_;function k(F,Y){Y===void 0&&(Y=function(ne){return ne});var q=[];return M(F,function(ne,de){var Te=Y(de);return y(q,Te)?ne:(q.push(Te),ne.concat(de))},[])}n.uniq=k;function D(F){for(var Y=[],q=1;q<arguments.length;q++)Y[q-1]=arguments[q];var ne=[null],de=ne.concat(Y);return Function.bind.apply(F,de)}n.partial=D;function L(F){return Array.isArray(F)}n.isArray=L;function V(F){return F instanceof RegExp}n.isRegExp=V;function W(F){return F instanceof Object}n.isObject=W;function j(F,Y){for(var q=0;q<F.length;q++)if(!Y(F[q],q))return!1;return!0}n.every=j;function J(F,Y){return p(F,function(q){return y(Y,q)})}n.difference=J;function Z(F,Y){for(var q=0;q<F.length;q++)if(Y(F[q]))return!0;return!1}n.some=Z;function Ae(F,Y){for(var q=0;q<F.length;q++)if(F[q]===Y)return q;return-1}n.indexOf=Ae;function ie(F,Y){var q=v(F);return q.sort(function(ne,de){return Y(ne)-Y(de)}),q}n.sortBy=ie;function re(F,Y){if(F.length!==Y.length)throw Error("can't zipObject with different number of keys and values!");for(var q={},ne=0;ne<F.length;ne++)q[F[ne]]=Y[ne];return q}n.zipObject=re;function ee(F){for(var Y=[],q=1;q<arguments.length;q++)Y[q-1]=arguments[q];for(var ne=0;ne<Y.length;ne++)for(var de=Y[ne],Te=i(de),R=0;R<Te.length;R++){var B=Te[R];F[B]=de[B]}return F}n.assign=ee;function le(F){for(var Y=[],q=1;q<arguments.length;q++)Y[q-1]=arguments[q];for(var ne=0;ne<Y.length;ne++)for(var de=Y[ne],Te=i(de),R=0;R<Te.length;R++){var B=Te[R];m(F,B)||(F[B]=de[B])}return F}n.assignNoOverwrite=le;function P(){for(var F=[],Y=0;Y<arguments.length;Y++)F[Y]=arguments[Y];return le.apply(void 0,t([{}],F))}n.defaults=P;function H(F,Y){var q={};return u(F,function(ne){var de=Y(ne),Te=q[de];Te?Te.push(ne):q[de]=[ne]}),q}n.groupBy=H;function z(F,Y){for(var q=S(F),ne=i(Y),de=0;de<ne.length;de++){var Te=ne[de],R=Y[Te];q[Te]=R}return q}n.merge=z;function X(){}n.NOOP=X;function te(F){return F}n.IDENTITY=te;function ae(F){for(var Y=[],q=0;q<F.length;q++){var ne=F[q];Y.push(ne!==void 0?ne:void 0)}return Y}n.packArray=ae;function me(F){console&&console.error&&console.error("Error: "+F)}n.PRINT_ERROR=me;function ge(F){console&&console.warn&&console.warn("Warning: "+F)}n.PRINT_WARNING=ge;function _e(){return typeof Map=="function"}n.isES2015MapSupported=_e;function Ge(F){return F[F.length-1]}n.peek=Ge;function Ve(F){var Y=new Date().getTime(),q=F(),ne=new Date().getTime(),de=ne-Y;return{time:de,value:q}}n.timer=Ve;function Pe(F){function Y(){}Y.prototype=F;var q=new Y;function ne(){return typeof q.bar}return ne(),ne(),F}n.toFastProperties=Pe}),sn=Ce((n,e)=>{(function(t,r){typeof define=="function"&&define.amd?define([],r):typeof e=="object"&&e.exports?e.exports=r():t.regexpToAst=r()})(typeof self<"u"?self:n,function(){function t(){}t.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},t.prototype.restoreState=function(l){this.idx=l.idx,this.input=l.input,this.groupIdx=l.groupIdx},t.prototype.pattern=function(l){this.idx=0,this.input=l,this.groupIdx=0,this.consumeChar("/");var h=this.disjunction();this.consumeChar("/");for(var p={type:"Flags",loc:{begin:this.idx,end:l.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":A(p,"global");break;case"i":A(p,"ignoreCase");break;case"m":A(p,"multiLine");break;case"u":A(p,"unicode");break;case"y":A(p,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:p,value:h,loc:this.loc(0)}},t.prototype.disjunction=function(){var l=[],h=this.idx;for(l.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),l.push(this.alternative());return{type:"Disjunction",value:l,loc:this.loc(h)}},t.prototype.alternative=function(){for(var l=[],h=this.idx;this.isTerm();)l.push(this.term());return{type:"Alternative",value:l,loc:this.loc(h)}},t.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},t.prototype.assertion=function(){var l=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(l)};case"$":return{type:"EndAnchor",loc:this.loc(l)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(l)};case"B":return{type:"NonWordBoundary",loc:this.loc(l)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var h;switch(this.popChar()){case"=":h="Lookahead";break;case"!":h="NegativeLookahead";break}a(h);var p=this.disjunction();return this.consumeChar(")"),{type:h,value:p,loc:this.loc(l)}}f()},t.prototype.quantifier=function(l){var h,p=this.idx;switch(this.popChar()){case"*":h={atLeast:0,atMost:1/0};break;case"+":h={atLeast:1,atMost:1/0};break;case"?":h={atLeast:0,atMost:1};break;case"{":var C=this.integerIncludingZero();switch(this.popChar()){case"}":h={atLeast:C,atMost:C};break;case",":var m;this.isDigit()?(m=this.integerIncludingZero(),h={atLeast:C,atMost:m}):h={atLeast:C,atMost:1/0},this.consumeChar("}");break}if(l===!0&&h===void 0)return;a(h);break}if(!(l===!0&&h===void 0))return a(h),this.peekChar(0)==="?"?(this.consumeChar("?"),h.greedy=!1):h.greedy=!0,h.type="Quantifier",h.loc=this.loc(p),h},t.prototype.atom=function(){var l,h=this.idx;switch(this.peekChar()){case".":l=this.dotAll();break;case"\\":l=this.atomEscape();break;case"[":l=this.characterClass();break;case"(":l=this.group();break}return l===void 0&&this.isPatternCharacter()&&(l=this.patternCharacter()),a(l),l.loc=this.loc(h),this.isQuantifier()&&(l.quantifier=this.quantifier()),l},t.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[o(`
|
|
82
|
-
`),o("\r"),o("\u2028"),o("\u2029")]}},t.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.decimalEscapeAtom=function(){var l=this.positiveInteger();return{type:"GroupBackReference",value:l}},t.prototype.characterClassEscape=function(){var l,h=!1;switch(this.popChar()){case"d":l=b;break;case"D":l=b,h=!0;break;case"s":l=
|
|
80
|
+
`,Qn={testMode:!0};class wo extends xe{constructor(e={}){super(e);const t={...Qn,...e};this.setTransformMotion(new kn(t))}initObject(){const e=new ae.BoxGeometry,t=new ae.MeshStandardMaterial({color:65280}),i=new ae.Mesh(e,t),n=document.createElement("div");n.textContent="Hello Box!",n.style.cssText=Ro;const s=new Un(n);return s.position.set(0,.8,0),i.add(s),i}initTransformMotion(e){const t=wt(Qn,e);return new kn(t)}}class kn extends Et{testMode=!0;rot=new ce;constructor(e){super(),this.testMode=e.testMode}update(e){if(super.update(e),this.testMode){this.rot.add(e,e,e);const t=At(this.rot);this.trans.quat.set(t)}}}class vo extends m.Loader{constructor(e){super(e)}load(e,t,i,n){const s=this,o=new m.FileLoader(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(c){const A=s.parse(JSON.parse(c));t&&t(A)},i,n)}parse(e){return new xi(e)}}class xi{constructor(e){this.isFont=!0,this.type="Font",this.data=e}generateShapes(e,t=100,i="ltr"){const n=[],s=Qo(e,t,this.data,i);for(let o=0,c=s.length;o<c;o++)n.push(...s[o].toShapes());return n}}function Qo(r,e,t,i){const n=Array.from(r),s=e/t.resolution,o=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*s,c=[];let A=0,a=0;(i=="rtl"||i=="tb")&&n.reverse();for(let f=0;f<n.length;f++){const u=n[f];if(u===`
|
|
81
|
+
`)A=0,a-=o;else{const b=ko(u,s,A,a,t);i=="tb"?(A=0,a+=t.ascender*s):A+=b.offsetX,c.push(b.path)}}return c}function ko(r,e,t,i,n){const s=n.glyphs[r]||n.glyphs["?"];if(!s){console.error('THREE.Font: character "'+r+'" does not exists in font family '+n.familyName+".");return}const o=new m.ShapePath;let c,A,a,f,u,b,d,I;if(s.o){const g=s._cachedOutline||(s._cachedOutline=s.o.split(" "));for(let l=0,h=g.length;l<h;)switch(g[l++]){case"m":c=g[l++]*e+t,A=g[l++]*e+i,o.moveTo(c,A);break;case"l":c=g[l++]*e+t,A=g[l++]*e+i,o.lineTo(c,A);break;case"q":a=g[l++]*e+t,f=g[l++]*e+i,u=g[l++]*e+t,b=g[l++]*e+i,o.quadraticCurveTo(u,b,a,f);break;case"b":a=g[l++]*e+t,f=g[l++]*e+i,u=g[l++]*e+t,b=g[l++]*e+i,d=g[l++]*e+t,I=g[l++]*e+i,o.bezierCurveTo(u,b,d,I,a,f);break}}return{offsetX:s.ha*e,path:o}}class So extends m.ExtrudeGeometry{constructor(e,t={}){const i=t.font;if(i===void 0)super();else{const n=i.generateShapes(e,t.size,t.direction);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(n,t)}this.type="TextGeometry"}}let Rt=null;async function _o(r){if(r.match(/.zip$/i)){let e=r.substring(r.lastIndexOf("/"));e=e.substring(0,e.length-4);const t=await Mn(r),i=nn(t,e);Rt=new xi(JSON.parse(i))}else Rt=await new vo().loadAsync(r)}class Lo extends xe{initObject(e){let t;if(Ln(e)?t=e:t="ERROR",Rt==null){const i=new ae.BoxGeometry,n=new ae.MeshStandardMaterial({color:16711680});return new ae.Mesh(i,n)}else{const i={font:Rt,size:1,depth:.5,curveSegments:12},n=new So(t,i);n.center();const s=new ae.MeshStandardMaterial({color:65280});return new ae.Mesh(n,s)}}}var Be=(r,e)=>()=>(e||(e={exports:{}},r(e.exports,e)),e.exports),Ni=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.VERSION=void 0,r.VERSION="9.0.1"}),Se=Be((r,e)=>{var t=r&&r.__spreadArray||function(M,Y){for(var K=0,ie=Y.length,ge=M.length;K<ie;K++,ge++)M[ge]=Y[K];return M};Object.defineProperty(r,"__esModule",{value:!0}),r.toFastProperties=r.timer=r.peek=r.isES2015MapSupported=r.PRINT_WARNING=r.PRINT_ERROR=r.packArray=r.IDENTITY=r.NOOP=r.merge=r.groupBy=r.defaults=r.assignNoOverwrite=r.assign=r.zipObject=r.sortBy=r.indexOf=r.some=r.difference=r.every=r.isObject=r.isRegExp=r.isArray=r.partial=r.uniq=r.compact=r.reduce=r.findAll=r.find=r.cloneObj=r.cloneArr=r.contains=r.has=r.pick=r.reject=r.filter=r.dropRight=r.drop=r.isFunction=r.isUndefined=r.isString=r.forEach=r.last=r.first=r.flatten=r.map=r.mapValues=r.values=r.keys=r.isEmpty=void 0;function i(M){return M&&M.length===0}r.isEmpty=i;function n(M){return M==null?[]:Object.keys(M)}r.keys=n;function s(M){for(var Y=[],K=Object.keys(M),ie=0;ie<K.length;ie++)Y.push(M[K[ie]]);return Y}r.values=s;function o(M,Y){for(var K=[],ie=n(M),ge=0;ge<ie.length;ge++){var we=ie[ge];K.push(Y.call(null,M[we],we))}return K}r.mapValues=o;function c(M,Y){for(var K=[],ie=0;ie<M.length;ie++)K.push(Y.call(null,M[ie],ie));return K}r.map=c;function A(M){for(var Y=[],K=0;K<M.length;K++){var ie=M[K];Array.isArray(ie)?Y=Y.concat(A(ie)):Y.push(ie)}return Y}r.flatten=A;function a(M){return i(M)?void 0:M[0]}r.first=a;function f(M){var Y=M&&M.length;return Y?M[Y-1]:void 0}r.last=f;function u(M,Y){if(Array.isArray(M))for(var K=0;K<M.length;K++)Y.call(null,M[K],K);else if(J(M))for(var ie=n(M),K=0;K<ie.length;K++){var ge=ie[K],we=M[ge];Y.call(null,we,ge)}else throw Error("non exhaustive match")}r.forEach=u;function b(M){return typeof M=="string"}r.isString=b;function d(M){return M===void 0}r.isUndefined=d;function I(M){return M instanceof Function}r.isFunction=I;function g(M,Y){return Y===void 0&&(Y=1),M.slice(Y,M.length)}r.drop=g;function l(M,Y){return Y===void 0&&(Y=1),M.slice(0,M.length-Y)}r.dropRight=l;function h(M,Y){var K=[];if(Array.isArray(M))for(var ie=0;ie<M.length;ie++){var ge=M[ie];Y.call(null,ge)&&K.push(ge)}return K}r.filter=h;function p(M,Y){return h(M,function(K){return!Y(K)})}r.reject=p;function C(M,Y){for(var K=Object.keys(M),ie={},ge=0;ge<K.length;ge++){var we=K[ge],R=M[we];Y(R)&&(ie[we]=R)}return ie}r.pick=C;function E(M,Y){return J(M)?M.hasOwnProperty(Y):!1}r.has=E;function B(M,Y){return U(M,function(K){return K===Y})!==void 0}r.contains=B;function Q(M){for(var Y=[],K=0;K<M.length;K++)Y.push(M[K]);return Y}r.cloneArr=Q;function S(M){var Y={};for(var K in M)Object.prototype.hasOwnProperty.call(M,K)&&(Y[K]=M[K]);return Y}r.cloneObj=S;function U(M,Y){for(var K=0;K<M.length;K++){var ie=M[K];if(Y.call(null,ie))return ie}}r.find=U;function v(M,Y){for(var K=[],ie=0;ie<M.length;ie++){var ge=M[ie];Y.call(null,ge)&&K.push(ge)}return K}r.findAll=v;function O(M,Y,K){for(var ie=Array.isArray(M),ge=ie?M:s(M),we=ie?[]:n(M),R=K,y=0;y<ge.length;y++)R=Y.call(null,R,ge[y],ie?y:we[y]);return R}r.reduce=O;function L(M){return p(M,function(Y){return Y==null})}r.compact=L;function k(M,Y){Y===void 0&&(Y=function(ie){return ie});var K=[];return O(M,function(ie,ge){var we=Y(ge);return B(K,we)?ie:(K.push(we),ie.concat(ge))},[])}r.uniq=k;function D(M){for(var Y=[],K=1;K<arguments.length;K++)Y[K-1]=arguments[K];var ie=[null],ge=ie.concat(Y);return Function.bind.apply(M,ge)}r.partial=D;function _(M){return Array.isArray(M)}r.isArray=_;function V(M){return M instanceof RegExp}r.isRegExp=V;function J(M){return M instanceof Object}r.isObject=J;function q(M,Y){for(var K=0;K<M.length;K++)if(!Y(M[K],K))return!1;return!0}r.every=q;function X(M,Y){return p(M,function(K){return B(Y,K)})}r.difference=X;function $(M,Y){for(var K=0;K<M.length;K++)if(Y(M[K]))return!0;return!1}r.some=$;function le(M,Y){for(var K=0;K<M.length;K++)if(M[K]===Y)return K;return-1}r.indexOf=le;function re(M,Y){var K=Q(M);return K.sort(function(ie,ge){return Y(ie)-Y(ge)}),K}r.sortBy=re;function oe(M,Y){if(M.length!==Y.length)throw Error("can't zipObject with different number of keys and values!");for(var K={},ie=0;ie<M.length;ie++)K[M[ie]]=Y[ie];return K}r.zipObject=oe;function te(M){for(var Y=[],K=1;K<arguments.length;K++)Y[K-1]=arguments[K];for(var ie=0;ie<Y.length;ie++)for(var ge=Y[ie],we=n(ge),R=0;R<we.length;R++){var y=we[R];M[y]=ge[y]}return M}r.assign=te;function he(M){for(var Y=[],K=1;K<arguments.length;K++)Y[K-1]=arguments[K];for(var ie=0;ie<Y.length;ie++)for(var ge=Y[ie],we=n(ge),R=0;R<we.length;R++){var y=we[R];E(M,y)||(M[y]=ge[y])}return M}r.assignNoOverwrite=he;function P(){for(var M=[],Y=0;Y<arguments.length;Y++)M[Y]=arguments[Y];return he.apply(void 0,t([{}],M))}r.defaults=P;function j(M,Y){var K={};return u(M,function(ie){var ge=Y(ie),we=K[ge];we?we.push(ie):K[ge]=[ie]}),K}r.groupBy=j;function W(M,Y){for(var K=S(M),ie=n(Y),ge=0;ge<ie.length;ge++){var we=ie[ge],R=Y[we];K[we]=R}return K}r.merge=W;function Z(){}r.NOOP=Z;function ne(M){return M}r.IDENTITY=ne;function Ae(M){for(var Y=[],K=0;K<M.length;K++){var ie=M[K];Y.push(ie!==void 0?ie:void 0)}return Y}r.packArray=Ae;function be(M){console&&console.error&&console.error("Error: "+M)}r.PRINT_ERROR=be;function Ie(M){console&&console.warn&&console.warn("Warning: "+M)}r.PRINT_WARNING=Ie;function Ne(){return typeof Map=="function"}r.isES2015MapSupported=Ne;function je(M){return M[M.length-1]}r.peek=je;function Ve(M){var Y=new Date().getTime(),K=M(),ie=new Date().getTime(),ge=ie-Y;return{time:ge,value:K}}r.timer=Ve;function Ue(M){function Y(){}Y.prototype=M;var K=new Y;function ie(){return typeof K.bar}return ie(),ie(),M}r.toFastProperties=Ue}),An=Be((r,e)=>{(function(t,i){typeof define=="function"&&define.amd?define([],i):typeof e=="object"&&e.exports?e.exports=i():t.regexpToAst=i()})(typeof self<"u"?self:r,function(){function t(){}t.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},t.prototype.restoreState=function(l){this.idx=l.idx,this.input=l.input,this.groupIdx=l.groupIdx},t.prototype.pattern=function(l){this.idx=0,this.input=l,this.groupIdx=0,this.consumeChar("/");var h=this.disjunction();this.consumeChar("/");for(var p={type:"Flags",loc:{begin:this.idx,end:l.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":A(p,"global");break;case"i":A(p,"ignoreCase");break;case"m":A(p,"multiLine");break;case"u":A(p,"unicode");break;case"y":A(p,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:p,value:h,loc:this.loc(0)}},t.prototype.disjunction=function(){var l=[],h=this.idx;for(l.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),l.push(this.alternative());return{type:"Disjunction",value:l,loc:this.loc(h)}},t.prototype.alternative=function(){for(var l=[],h=this.idx;this.isTerm();)l.push(this.term());return{type:"Alternative",value:l,loc:this.loc(h)}},t.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},t.prototype.assertion=function(){var l=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(l)};case"$":return{type:"EndAnchor",loc:this.loc(l)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(l)};case"B":return{type:"NonWordBoundary",loc:this.loc(l)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var h;switch(this.popChar()){case"=":h="Lookahead";break;case"!":h="NegativeLookahead";break}a(h);var p=this.disjunction();return this.consumeChar(")"),{type:h,value:p,loc:this.loc(l)}}f()},t.prototype.quantifier=function(l){var h,p=this.idx;switch(this.popChar()){case"*":h={atLeast:0,atMost:1/0};break;case"+":h={atLeast:1,atMost:1/0};break;case"?":h={atLeast:0,atMost:1};break;case"{":var C=this.integerIncludingZero();switch(this.popChar()){case"}":h={atLeast:C,atMost:C};break;case",":var E;this.isDigit()?(E=this.integerIncludingZero(),h={atLeast:C,atMost:E}):h={atLeast:C,atMost:1/0},this.consumeChar("}");break}if(l===!0&&h===void 0)return;a(h);break}if(!(l===!0&&h===void 0))return a(h),this.peekChar(0)==="?"?(this.consumeChar("?"),h.greedy=!1):h.greedy=!0,h.type="Quantifier",h.loc=this.loc(p),h},t.prototype.atom=function(){var l,h=this.idx;switch(this.peekChar()){case".":l=this.dotAll();break;case"\\":l=this.atomEscape();break;case"[":l=this.characterClass();break;case"(":l=this.group();break}return l===void 0&&this.isPatternCharacter()&&(l=this.patternCharacter()),a(l),l.loc=this.loc(h),this.isQuantifier()&&(l.quantifier=this.quantifier()),l},t.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[o(`
|
|
82
|
+
`),o("\r"),o("\u2028"),o("\u2029")]}},t.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.decimalEscapeAtom=function(){var l=this.positiveInteger();return{type:"GroupBackReference",value:l}},t.prototype.characterClassEscape=function(){var l,h=!1;switch(this.popChar()){case"d":l=b;break;case"D":l=b,h=!0;break;case"s":l=I;break;case"S":l=I,h=!0;break;case"w":l=d;break;case"W":l=d,h=!0;break}return a(l),{type:"Set",value:l,complement:h}},t.prototype.controlEscapeAtom=function(){var l;switch(this.popChar()){case"f":l=o("\f");break;case"n":l=o(`
|
|
83
83
|
`);break;case"r":l=o("\r");break;case"t":l=o(" ");break;case"v":l=o("\v");break}return a(l),{type:"Character",value:l}},t.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var l=this.popChar();if(/[a-zA-Z]/.test(l)===!1)throw Error("Invalid ");var h=l.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:h}},t.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:o("\0")}},t.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},t.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},t.prototype.identityEscapeAtom=function(){var l=this.popChar();return{type:"Character",value:o(l)}},t.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case`
|
|
84
|
-
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var l=this.popChar();return{type:"Character",value:o(l)}}},t.prototype.characterClass=function(){var l=[],h=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),h=!0);this.isClassAtom();){var p=this.classAtom(),C=p.type==="Character";if(C&&this.isRangeDash()){this.consumeChar("-");var
|
|
85
|
-
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},t.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:o("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.group=function(){var l=!0;(this.consumeChar("("),this.peekChar(0))==="?"?(this.consumeChar("?"),this.consumeChar(":"),l=!1):this.groupIdx++;var h=this.disjunction();this.consumeChar(")");var p={type:"Group",capturing:l,value:h};return l&&(p.idx=this.groupIdx),p},t.prototype.positiveInteger=function(){var l=this.popChar();if(s.test(l)===!1)throw Error("Expecting a positive integer");for(;
|
|
86
|
-
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:o(l)}}},t.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},t.prototype.isRangeDash=function(){return this.peekChar()==="-"&&this.isClassAtom(1)},t.prototype.isDigit=function(){return
|
|
84
|
+
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var l=this.popChar();return{type:"Character",value:o(l)}}},t.prototype.characterClass=function(){var l=[],h=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),h=!0);this.isClassAtom();){var p=this.classAtom(),C=p.type==="Character";if(C&&this.isRangeDash()){this.consumeChar("-");var E=this.classAtom(),B=E.type==="Character";if(B){if(E.value<p.value)throw Error("Range out of order in character class");l.push({from:p.value,to:E.value})}else c(p.value,l),l.push(o("-")),c(E.value,l)}else c(p.value,l)}return this.consumeChar("]"),{type:"Set",complement:h,value:l}},t.prototype.classAtom=function(){switch(this.peekChar()){case"]":case`
|
|
85
|
+
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},t.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:o("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.group=function(){var l=!0;(this.consumeChar("("),this.peekChar(0))==="?"?(this.consumeChar("?"),this.consumeChar(":"),l=!1):this.groupIdx++;var h=this.disjunction();this.consumeChar(")");var p={type:"Group",capturing:l,value:h};return l&&(p.idx=this.groupIdx),p},t.prototype.positiveInteger=function(){var l=this.popChar();if(s.test(l)===!1)throw Error("Expecting a positive integer");for(;n.test(this.peekChar(0));)l+=this.popChar();return parseInt(l,10)},t.prototype.integerIncludingZero=function(){var l=this.popChar();if(n.test(l)===!1)throw Error("Expecting an integer");for(;n.test(this.peekChar(0));)l+=this.popChar();return parseInt(l,10)},t.prototype.patternCharacter=function(){var l=this.popChar();switch(l){case`
|
|
86
|
+
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:o(l)}}},t.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},t.prototype.isRangeDash=function(){return this.peekChar()==="-"&&this.isClassAtom(1)},t.prototype.isDigit=function(){return n.test(this.peekChar(0))},t.prototype.isClassAtom=function(l){switch(l===void 0&&(l=0),this.peekChar(l)){case"]":case`
|
|
87
87
|
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},t.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},t.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},t.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}},t.prototype.isQuantifier=function(){var l=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(l)}},t.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
|
88
|
-
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},t.prototype.parseHexDigits=function(l){for(var h="",p=0;p<l;p++){var C=this.popChar();if(
|
|
89
|
-
`),o("\r"),o(" "),o("\v"),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o("\u2028"),o("\u2029"),o(" "),o(" "),o(" "),o("\uFEFF")];function g(){}return g.prototype.visitChildren=function(l){for(var h in l){var p=l[h];l.hasOwnProperty(h)&&(p.type!==void 0?this.visit(p):Array.isArray(p)&&p.forEach(function(C){this.visit(C)},this))}},g.prototype.visit=function(l){switch(l.type){case"Pattern":this.visitPattern(l);break;case"Flags":this.visitFlags(l);break;case"Disjunction":this.visitDisjunction(l);break;case"Alternative":this.visitAlternative(l);break;case"StartAnchor":this.visitStartAnchor(l);break;case"EndAnchor":this.visitEndAnchor(l);break;case"WordBoundary":this.visitWordBoundary(l);break;case"NonWordBoundary":this.visitNonWordBoundary(l);break;case"Lookahead":this.visitLookahead(l);break;case"NegativeLookahead":this.visitNegativeLookahead(l);break;case"Character":this.visitCharacter(l);break;case"Set":this.visitSet(l);break;case"Group":this.visitGroup(l);break;case"GroupBackReference":this.visitGroupBackReference(l);break;case"Quantifier":this.visitQuantifier(l);break}this.visitChildren(l)},g.prototype.visitPattern=function(l){},g.prototype.visitFlags=function(l){},g.prototype.visitDisjunction=function(l){},g.prototype.visitAlternative=function(l){},g.prototype.visitStartAnchor=function(l){},g.prototype.visitEndAnchor=function(l){},g.prototype.visitWordBoundary=function(l){},g.prototype.visitNonWordBoundary=function(l){},g.prototype.visitLookahead=function(l){},g.prototype.visitNegativeLookahead=function(l){},g.prototype.visitCharacter=function(l){},g.prototype.visitSet=function(l){},g.prototype.visitGroup=function(l){},g.prototype.visitGroupBackReference=function(l){},g.prototype.visitQuantifier=function(l){},{RegExpParser:t,BaseRegExpVisitor:g,VERSION:"0.5.0"}})}),
|
|
90
|
-
`;function c(g,l){l===void 0&&(l=!1);try{var h=
|
|
88
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},t.prototype.parseHexDigits=function(l){for(var h="",p=0;p<l;p++){var C=this.popChar();if(i.test(C)===!1)throw Error("Expecting a HexDecimal digits");h+=C}var E=parseInt(h,16);return{type:"Character",value:E}},t.prototype.peekChar=function(l){return l===void 0&&(l=0),this.input[this.idx+l]},t.prototype.popChar=function(){var l=this.peekChar(0);return this.consumeChar(),l},t.prototype.consumeChar=function(l){if(l!==void 0&&this.input[this.idx]!==l)throw Error("Expected: '"+l+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++},t.prototype.loc=function(l){return{begin:l,end:this.idx}};var i=/[0-9a-fA-F]/,n=/[0-9]/,s=/[1-9]/;function o(l){return l.charCodeAt(0)}function c(l,h){l.length!==void 0?l.forEach(function(p){h.push(p)}):h.push(l)}function A(l,h){if(l[h]===!0)throw"duplicate flag "+h;l[h]=!0}function a(l){if(l===void 0)throw Error("Internal Error - Should never get here!")}function f(){throw Error("Internal Error - Should never get here!")}var u,b=[];for(u=o("0");u<=o("9");u++)b.push(u);var d=[o("_")].concat(b);for(u=o("a");u<=o("z");u++)d.push(u);for(u=o("A");u<=o("Z");u++)d.push(u);var I=[o(" "),o("\f"),o(`
|
|
89
|
+
`),o("\r"),o(" "),o("\v"),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o(" "),o("\u2028"),o("\u2029"),o(" "),o(" "),o(" "),o("\uFEFF")];function g(){}return g.prototype.visitChildren=function(l){for(var h in l){var p=l[h];l.hasOwnProperty(h)&&(p.type!==void 0?this.visit(p):Array.isArray(p)&&p.forEach(function(C){this.visit(C)},this))}},g.prototype.visit=function(l){switch(l.type){case"Pattern":this.visitPattern(l);break;case"Flags":this.visitFlags(l);break;case"Disjunction":this.visitDisjunction(l);break;case"Alternative":this.visitAlternative(l);break;case"StartAnchor":this.visitStartAnchor(l);break;case"EndAnchor":this.visitEndAnchor(l);break;case"WordBoundary":this.visitWordBoundary(l);break;case"NonWordBoundary":this.visitNonWordBoundary(l);break;case"Lookahead":this.visitLookahead(l);break;case"NegativeLookahead":this.visitNegativeLookahead(l);break;case"Character":this.visitCharacter(l);break;case"Set":this.visitSet(l);break;case"Group":this.visitGroup(l);break;case"GroupBackReference":this.visitGroupBackReference(l);break;case"Quantifier":this.visitQuantifier(l);break}this.visitChildren(l)},g.prototype.visitPattern=function(l){},g.prototype.visitFlags=function(l){},g.prototype.visitDisjunction=function(l){},g.prototype.visitAlternative=function(l){},g.prototype.visitStartAnchor=function(l){},g.prototype.visitEndAnchor=function(l){},g.prototype.visitWordBoundary=function(l){},g.prototype.visitNonWordBoundary=function(l){},g.prototype.visitLookahead=function(l){},g.prototype.visitNegativeLookahead=function(l){},g.prototype.visitCharacter=function(l){},g.prototype.visitSet=function(l){},g.prototype.visitGroup=function(l){},g.prototype.visitGroupBackReference=function(l){},g.prototype.visitQuantifier=function(l){},{RegExpParser:t,BaseRegExpVisitor:g,VERSION:"0.5.0"}})}),cn=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.clearRegExpParserCache=r.getRegExpAst=void 0;var e=An(),t={},i=new e.RegExpParser;function n(o){var c=o.toString();if(t.hasOwnProperty(c))return t[c];var A=i.pattern(c);return t[c]=A,A}r.getRegExpAst=n;function s(){t={}}r.clearRegExpParserCache=s}),xo=Be(r=>{var e=r&&r.__extends||(function(){var g=function(l,h){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,C){p.__proto__=C}||function(p,C){for(var E in C)Object.prototype.hasOwnProperty.call(C,E)&&(p[E]=C[E])},g(l,h)};return function(l,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");g(l,h);function p(){this.constructor=l}l.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.canMatchCharCode=r.firstCharOptimizedIndices=r.getOptimizedStartCodesIndices=r.failedOptimizationPrefixMsg=void 0;var t=An(),i=Se(),n=cn(),s=Di(),o="Complement Sets are not supported for first char optimization";r.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations:
|
|
90
|
+
`;function c(g,l){l===void 0&&(l=!1);try{var h=n.getRegExpAst(g),p=A(h.value,{},h.flags.ignoreCase);return p}catch(E){if(E.message===o)l&&i.PRINT_WARNING(""+r.failedOptimizationPrefixMsg+(" Unable to optimize: < "+g.toString()+` >
|
|
91
91
|
`)+` Complement Sets cannot be automatically optimized.
|
|
92
92
|
This will disable the lexer's first char optimizations.
|
|
93
93
|
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var C="";l&&(C=`
|
|
94
94
|
This will disable the lexer's first char optimizations.
|
|
95
|
-
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),
|
|
95
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),i.PRINT_ERROR(r.failedOptimizationPrefixMsg+`
|
|
96
96
|
`+(" Failed parsing: < "+g.toString()+` >
|
|
97
97
|
`)+(" Using the regexp-to-ast library version: "+t.VERSION+`
|
|
98
|
-
`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+C)}}return[]}
|
|
99
|
-
`],tracer:function(R,
|
|
98
|
+
`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+C)}}return[]}r.getOptimizedStartCodesIndices=c;function A(g,l,h){switch(g.type){case"Disjunction":for(var p=0;p<g.value.length;p++)A(g.value[p],l,h);break;case"Alternative":for(var C=g.value,p=0;p<C.length;p++){var E=C[p];switch(E.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var B=E;switch(B.type){case"Character":a(B.value,l,h);break;case"Set":if(B.complement===!0)throw Error(o);i.forEach(B.value,function(U){if(typeof U=="number")a(U,l,h);else{var v=U;if(h===!0)for(var O=v.from;O<=v.to;O++)a(O,l,h);else{for(var O=v.from;O<=v.to&&O<s.minOptimizationVal;O++)a(O,l,h);if(v.to>=s.minOptimizationVal)for(var L=v.from>=s.minOptimizationVal?v.from:s.minOptimizationVal,k=v.to,D=s.charCodeToOptimizedIndex(L),_=s.charCodeToOptimizedIndex(k),V=D;V<=_;V++)l[V]=V}}});break;case"Group":A(B.value,l,h);break;default:throw Error("Non Exhaustive Match")}var Q=B.quantifier!==void 0&&B.quantifier.atLeast===0;if(B.type==="Group"&&b(B)===!1||B.type!=="Group"&&Q===!1)break}break;default:throw Error("non exhaustive match!")}return i.values(l)}r.firstCharOptimizedIndices=A;function a(g,l,h){var p=s.charCodeToOptimizedIndex(g);l[p]=p,h===!0&&f(g,l)}function f(g,l){var h=String.fromCharCode(g),p=h.toUpperCase();if(p!==h){var C=s.charCodeToOptimizedIndex(p.charCodeAt(0));l[C]=C}else{var E=h.toLowerCase();if(E!==h){var C=s.charCodeToOptimizedIndex(E.charCodeAt(0));l[C]=C}}}function u(g,l){return i.find(g.value,function(h){if(typeof h=="number")return i.contains(l,h);var p=h;return i.find(l,function(C){return p.from<=C&&C<=p.to})!==void 0})}function b(g){return g.quantifier&&g.quantifier.atLeast===0?!0:g.value?i.isArray(g.value)?i.every(g.value,b):b(g.value):!1}var d=(function(g){e(l,g);function l(h){var p=g.call(this)||this;return p.targetCharCodes=h,p.found=!1,p}return l.prototype.visitChildren=function(h){if(this.found!==!0){switch(h.type){case"Lookahead":this.visitLookahead(h);return;case"NegativeLookahead":this.visitNegativeLookahead(h);return}g.prototype.visitChildren.call(this,h)}},l.prototype.visitCharacter=function(h){i.contains(this.targetCharCodes,h.value)&&(this.found=!0)},l.prototype.visitSet=function(h){h.complement?u(h,this.targetCharCodes)===void 0&&(this.found=!0):u(h,this.targetCharCodes)!==void 0&&(this.found=!0)},l})(t.BaseRegExpVisitor);function I(g,l){if(l instanceof RegExp){var h=n.getRegExpAst(l),p=new d(g);return p.visit(h),p.found}else return i.find(l,function(C){return i.contains(g,C.charCodeAt(0))})!==void 0}r.canMatchCharCode=I}),Di=Be(r=>{var e=r&&r.__extends||(function(){var P=function(j,W){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Z,ne){Z.__proto__=ne}||function(Z,ne){for(var Ae in ne)Object.prototype.hasOwnProperty.call(ne,Ae)&&(Z[Ae]=ne[Ae])},P(j,W)};return function(j,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");P(j,W);function Z(){this.constructor=j}j.prototype=W===null?Object.create(W):(Z.prototype=W.prototype,new Z)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.charCodeToOptimizedIndex=r.minOptimizationVal=r.buildLineBreakIssueMessage=r.LineTerminatorOptimizedTester=r.isShortPattern=r.isCustomPattern=r.cloneEmptyGroups=r.performWarningRuntimeChecks=r.performRuntimeChecks=r.addStickyFlag=r.addStartOfInput=r.findUnreachablePatterns=r.findModesThatDoNotExist=r.findInvalidGroupType=r.findDuplicatePatterns=r.findUnsupportedFlags=r.findStartOfInputAnchor=r.findEmptyMatchRegExps=r.findEndOfInputAnchor=r.findInvalidPatterns=r.findMissingPatterns=r.validatePatterns=r.analyzeTokenTypes=r.enableSticky=r.disableSticky=r.SUPPORT_STICKY=r.MODES=r.DEFAULT_MODE=void 0;var t=An(),i=Qt(),n=Se(),s=xo(),o=cn(),c="PATTERN";r.DEFAULT_MODE="defaultMode",r.MODES="modes",r.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function A(){r.SUPPORT_STICKY=!1}r.disableSticky=A;function a(){r.SUPPORT_STICKY=!0}r.enableSticky=a;function f(P,j){j=n.defaults(j,{useSticky:r.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
99
|
+
`],tracer:function(R,y){return y()}});var W=j.tracer;W("initCharCodeToOptimizedIndexMap",function(){he()});var Z;W("Reject Lexer.NA",function(){Z=n.reject(P,function(R){return R[c]===i.Lexer.NA})});var ne=!1,Ae;W("Transform Patterns",function(){ne=!1,Ae=n.map(Z,function(R){var y=R[c];if(n.isRegExp(y)){var T=y.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!y.ignoreCase?T:T.length===2&&T[0]==="\\"&&!n.contains(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:j.useSticky?k(y):L(y)}else{if(n.isFunction(y))return ne=!0,{exec:y};if(n.has(y,"exec"))return ne=!0,y;if(typeof y=="string"){if(y.length===1)return y;var x=y.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),w=new RegExp(x);return j.useSticky?k(w):L(w)}else throw Error("non exhaustive match")}})});var be,Ie,Ne,je,Ve;W("misc mapping",function(){be=n.map(Z,function(R){return R.tokenTypeIdx}),Ie=n.map(Z,function(R){var y=R.GROUP;if(y!==i.Lexer.SKIPPED){if(n.isString(y))return y;if(n.isUndefined(y))return!1;throw Error("non exhaustive match")}}),Ne=n.map(Z,function(R){var y=R.LONGER_ALT;if(y){var T=n.indexOf(Z,y);return T}}),je=n.map(Z,function(R){return R.PUSH_MODE}),Ve=n.map(Z,function(R){return n.has(R,"POP_MODE")})});var Ue;W("Line Terminator Handling",function(){var R=le(j.lineTerminatorCharacters);Ue=n.map(Z,function(y){return!1}),j.positionTracking!=="onlyOffset"&&(Ue=n.map(Z,function(y){if(n.has(y,"LINE_BREAKS"))return y.LINE_BREAKS;if(X(y,R)===!1)return s.canMatchCharCode(R,y.PATTERN)}))});var M,Y,K,ie;W("Misc Mapping #2",function(){M=n.map(Z,J),Y=n.map(Ae,q),K=n.reduce(Z,function(R,y){var T=y.GROUP;return n.isString(T)&&T!==i.Lexer.SKIPPED&&(R[T]=[]),R},{}),ie=n.map(Ae,function(R,y){return{pattern:Ae[y],longerAlt:Ne[y],canLineTerminator:Ue[y],isCustom:M[y],short:Y[y],group:Ie[y],push:je[y],pop:Ve[y],tokenTypeIdx:be[y],tokenType:Z[y]}})});var ge=!0,we=[];return j.safeMode||W("First Char Optimization",function(){we=n.reduce(Z,function(R,y,T){if(typeof y.PATTERN=="string"){var x=y.PATTERN.charCodeAt(0),w=te(x);re(R,w,ie[T])}else if(n.isArray(y.START_CHARS_HINT)){var N;n.forEach(y.START_CHARS_HINT,function(G){var z=typeof G=="string"?G.charCodeAt(0):G,ee=te(z);N!==ee&&(N=ee,re(R,ee,ie[T]))})}else if(n.isRegExp(y.PATTERN))if(y.PATTERN.unicode)ge=!1,j.ensureOptimizations&&n.PRINT_ERROR(""+s.failedOptimizationPrefixMsg+(" Unable to analyze < "+y.PATTERN.toString()+` > pattern.
|
|
100
100
|
`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
101
101
|
This will disable the lexer's first char optimizations.
|
|
102
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var
|
|
102
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var F=s.getOptimizedStartCodesIndices(y.PATTERN,j.ensureOptimizations);n.isEmpty(F)&&(ge=!1),n.forEach(F,function(G){re(R,G,ie[T])})}else j.ensureOptimizations&&n.PRINT_ERROR(""+s.failedOptimizationPrefixMsg+(" TokenType: <"+y.name+`> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
103
103
|
`)+` This will disable the lexer's first char optimizations.
|
|
104
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),
|
|
105
|
-
Token Type: ->`+
|
|
106
|
-
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:
|
|
107
|
-
Token Type: ->`+
|
|
108
|
-
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:
|
|
109
|
-
`+("Because it appears AFTER the Token Type ->"+
|
|
110
|
-
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
|
|
111
|
-
`,type:
|
|
112
|
-
`,type:
|
|
113
|
-
`,type:
|
|
114
|
-
`),type:
|
|
104
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),ge=!1;return R},[])}),W("ArrayPacking",function(){we=n.packArray(we)}),{emptyGroups:K,patternIdxToConfig:ie,charCodeToPatternIdxToConfig:we,hasCustom:ne,canBeOptimized:ge}}r.analyzeTokenTypes=f;function u(P,j){var W=[],Z=d(P);W=W.concat(Z.errors);var ne=I(Z.valid),Ae=ne.valid;return W=W.concat(ne.errors),W=W.concat(b(Ae)),W=W.concat(Q(Ae)),W=W.concat(S(Ae,j)),W=W.concat(U(Ae)),W}r.validatePatterns=u;function b(P){var j=[],W=n.filter(P,function(Z){return n.isRegExp(Z[c])});return j=j.concat(l(W)),j=j.concat(C(W)),j=j.concat(E(W)),j=j.concat(B(W)),j=j.concat(h(W)),j}function d(P){var j=n.filter(P,function(ne){return!n.has(ne,c)}),W=n.map(j,function(ne){return{message:"Token Type: ->"+ne.name+"<- missing static 'PATTERN' property",type:i.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[ne]}}),Z=n.difference(P,j);return{errors:W,valid:Z}}r.findMissingPatterns=d;function I(P){var j=n.filter(P,function(ne){var Ae=ne[c];return!n.isRegExp(Ae)&&!n.isFunction(Ae)&&!n.has(Ae,"exec")&&!n.isString(Ae)}),W=n.map(j,function(ne){return{message:"Token Type: ->"+ne.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:i.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[ne]}}),Z=n.difference(P,j);return{errors:W,valid:Z}}r.findInvalidPatterns=I;var g=/[^\\][\$]/;function l(P){var j=(function(ne){e(Ae,ne);function Ae(){var be=ne!==null&&ne.apply(this,arguments)||this;return be.found=!1,be}return Ae.prototype.visitEndAnchor=function(be){this.found=!0},Ae})(t.BaseRegExpVisitor),W=n.filter(P,function(ne){var Ae=ne[c];try{var be=o.getRegExpAst(Ae),Ie=new j;return Ie.visit(be),Ie.found}catch{return g.test(Ae.source)}}),Z=n.map(W,function(ne){return{message:`Unexpected RegExp Anchor Error:
|
|
105
|
+
Token Type: ->`+ne.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
106
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:i.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[ne]}});return Z}r.findEndOfInputAnchor=l;function h(P){var j=n.filter(P,function(Z){var ne=Z[c];return ne.test("")}),W=n.map(j,function(Z){return{message:"Token Type: ->"+Z.name+"<- static 'PATTERN' must not match an empty string",type:i.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[Z]}});return W}r.findEmptyMatchRegExps=h;var p=/[^\\[][\^]|^\^/;function C(P){var j=(function(ne){e(Ae,ne);function Ae(){var be=ne!==null&&ne.apply(this,arguments)||this;return be.found=!1,be}return Ae.prototype.visitStartAnchor=function(be){this.found=!0},Ae})(t.BaseRegExpVisitor),W=n.filter(P,function(ne){var Ae=ne[c];try{var be=o.getRegExpAst(Ae),Ie=new j;return Ie.visit(be),Ie.found}catch{return p.test(Ae.source)}}),Z=n.map(W,function(ne){return{message:`Unexpected RegExp Anchor Error:
|
|
107
|
+
Token Type: ->`+ne.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
108
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:i.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[ne]}});return Z}r.findStartOfInputAnchor=C;function E(P){var j=n.filter(P,function(Z){var ne=Z[c];return ne instanceof RegExp&&(ne.multiline||ne.global)}),W=n.map(j,function(Z){return{message:"Token Type: ->"+Z.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:i.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[Z]}});return W}r.findUnsupportedFlags=E;function B(P){var j=[],W=n.map(P,function(Ae){return n.reduce(P,function(be,Ie){return Ae.PATTERN.source===Ie.PATTERN.source&&!n.contains(j,Ie)&&Ie.PATTERN!==i.Lexer.NA&&(j.push(Ie),be.push(Ie)),be},[])});W=n.compact(W);var Z=n.filter(W,function(Ae){return Ae.length>1}),ne=n.map(Z,function(Ae){var be=n.map(Ae,function(Ne){return Ne.name}),Ie=n.first(Ae).PATTERN;return{message:"The same RegExp pattern ->"+Ie+"<-"+("has been used in all of the following Token Types: "+be.join(", ")+" <-"),type:i.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:Ae}});return ne}r.findDuplicatePatterns=B;function Q(P){var j=n.filter(P,function(Z){if(!n.has(Z,"GROUP"))return!1;var ne=Z.GROUP;return ne!==i.Lexer.SKIPPED&&ne!==i.Lexer.NA&&!n.isString(ne)}),W=n.map(j,function(Z){return{message:"Token Type: ->"+Z.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:i.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[Z]}});return W}r.findInvalidGroupType=Q;function S(P,j){var W=n.filter(P,function(ne){return ne.PUSH_MODE!==void 0&&!n.contains(j,ne.PUSH_MODE)}),Z=n.map(W,function(ne){var Ae="Token Type: ->"+ne.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+ne.PUSH_MODE+"<-which does not exist";return{message:Ae,type:i.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[ne]}});return Z}r.findModesThatDoNotExist=S;function U(P){var j=[],W=n.reduce(P,function(Z,ne,Ae){var be=ne.PATTERN;return be===i.Lexer.NA||(n.isString(be)?Z.push({str:be,idx:Ae,tokenType:ne}):n.isRegExp(be)&&O(be)&&Z.push({str:be.source,idx:Ae,tokenType:ne})),Z},[]);return n.forEach(P,function(Z,ne){n.forEach(W,function(Ae){var be=Ae.str,Ie=Ae.idx,Ne=Ae.tokenType;if(ne<Ie&&v(be,Z.PATTERN)){var je="Token: ->"+Ne.name+`<- can never be matched.
|
|
109
|
+
`+("Because it appears AFTER the Token Type ->"+Z.name+"<-")+`in the lexer's definition.
|
|
110
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;j.push({message:je,type:i.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[Z,Ne]})}})}),j}r.findUnreachablePatterns=U;function v(P,j){if(n.isRegExp(j)){var W=j.exec(P);return W!==null&&W.index===0}else{if(n.isFunction(j))return j(P,0,[],{});if(n.has(j,"exec"))return j.exec(P,0,[],{});if(typeof j=="string")return j===P;throw Error("non exhaustive match")}}function O(P){var j=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return n.find(j,function(W){return P.source.indexOf(W)!==-1})===void 0}function L(P){var j=P.ignoreCase?"i":"";return new RegExp("^(?:"+P.source+")",j)}r.addStartOfInput=L;function k(P){var j=P.ignoreCase?"iy":"y";return new RegExp(""+P.source,j)}r.addStickyFlag=k;function D(P,j,W){var Z=[];return n.has(P,r.DEFAULT_MODE)||Z.push({message:"A MultiMode Lexer cannot be initialized without a <"+r.DEFAULT_MODE+`> property in its definition
|
|
111
|
+
`,type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),n.has(P,r.MODES)||Z.push({message:"A MultiMode Lexer cannot be initialized without a <"+r.MODES+`> property in its definition
|
|
112
|
+
`,type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),n.has(P,r.MODES)&&n.has(P,r.DEFAULT_MODE)&&!n.has(P.modes,P.defaultMode)&&Z.push({message:"A MultiMode Lexer cannot be initialized with a "+r.DEFAULT_MODE+": <"+P.defaultMode+`>which does not exist
|
|
113
|
+
`,type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),n.has(P,r.MODES)&&n.forEach(P.modes,function(ne,Ae){n.forEach(ne,function(be,Ie){n.isUndefined(be)&&Z.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+Ae+"> at index: <"+Ie+`>
|
|
114
|
+
`),type:i.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),Z}r.performRuntimeChecks=D;function _(P,j,W){var Z=[],ne=!1,Ae=n.compact(n.flatten(n.mapValues(P.modes,function(Ne){return Ne}))),be=n.reject(Ae,function(Ne){return Ne[c]===i.Lexer.NA}),Ie=le(W);return j&&n.forEach(be,function(Ne){var je=X(Ne,Ie);if(je!==!1){var Ve=$(Ne,je),Ue={message:Ve,type:je.issue,tokenType:Ne};Z.push(Ue)}else n.has(Ne,"LINE_BREAKS")?Ne.LINE_BREAKS===!0&&(ne=!0):s.canMatchCharCode(Ie,Ne.PATTERN)&&(ne=!0)}),j&&!ne&&Z.push({message:`Warning: No LINE_BREAKS Found.
|
|
115
115
|
This Lexer has been defined to track line and column information,
|
|
116
116
|
But none of the Token Types can be identified as matching a line terminator.
|
|
117
117
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
118
|
-
for details.`,type:
|
|
118
|
+
for details.`,type:i.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),Z}r.performWarningRuntimeChecks=_;function V(P){var j={},W=n.keys(P);return n.forEach(W,function(Z){var ne=P[Z];if(n.isArray(ne))j[Z]=[];else throw Error("non exhaustive match")}),j}r.cloneEmptyGroups=V;function J(P){var j=P.PATTERN;if(n.isRegExp(j))return!1;if(n.isFunction(j)||n.has(j,"exec"))return!0;if(n.isString(j))return!1;throw Error("non exhaustive match")}r.isCustomPattern=J;function q(P){return n.isString(P)&&P.length===1?P.charCodeAt(0):!1}r.isShortPattern=q,r.LineTerminatorOptimizedTester={test:function(P){for(var j=P.length,W=this.lastIndex;W<j;W++){var Z=P.charCodeAt(W);if(Z===10)return this.lastIndex=W+1,!0;if(Z===13)return P.charCodeAt(W+1)===10?this.lastIndex=W+2:this.lastIndex=W+1,!0}return!1},lastIndex:0};function X(P,j){if(n.has(P,"LINE_BREAKS"))return!1;if(n.isRegExp(P.PATTERN)){try{s.canMatchCharCode(j,P.PATTERN)}catch(W){return{issue:i.LexerDefinitionErrorType.IDENTIFY_TERMINATOR,errMsg:W.message}}return!1}else{if(n.isString(P.PATTERN))return!1;if(J(P))return{issue:i.LexerDefinitionErrorType.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function $(P,j){if(j.issue===i.LexerDefinitionErrorType.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
|
119
119
|
`+(" The problem is in the <"+P.name+`> Token Type
|
|
120
|
-
`)+(" Root cause: "+
|
|
121
|
-
`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(
|
|
120
|
+
`)+(" Root cause: "+j.errMsg+`.
|
|
121
|
+
`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(j.issue===i.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
122
122
|
`+(" The problem is in the <"+P.name+`> Token Type
|
|
123
|
-
`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}
|
|
124
|
-
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:
|
|
125
|
-
a boolean 2nd argument is no longer supported`);this.config=t.merge(o,f);var b=this.config.traceInitPerf;b===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof b=="number"&&(this.traceInitMaxIdent=b,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var d,
|
|
126
|
-
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(f.safeMode&&f.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');u.trackStartLines=/full|onlyStart/i.test(u.config.positionTracking),u.trackEndLines=/full/i.test(u.config.positionTracking),t.isArray(a)?(d={modes:{}},d.modes[e.DEFAULT_MODE]=t.cloneArr(a),d[e.DEFAULT_MODE]=e.DEFAULT_MODE):(
|
|
123
|
+
`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}r.buildLineBreakIssueMessage=$;function le(P){var j=n.map(P,function(W){return n.isString(W)&&W.length>0?W.charCodeAt(0):W});return j}function re(P,j,W){P[j]===void 0?P[j]=[W]:P[j].push(W)}r.minOptimizationVal=256;var oe=[];function te(P){return P<r.minOptimizationVal?P:oe[P]}r.charCodeToOptimizedIndex=te;function he(){if(n.isEmpty(oe)){oe=new Array(65536);for(var P=0;P<65536;P++)oe[P]=P>255?255+~~(P/255):P}}}),mt=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isTokenType=r.hasExtendingTokensTypesMapProperty=r.hasExtendingTokensTypesProperty=r.hasCategoriesProperty=r.hasShortKeyProperty=r.singleAssignCategoriesToksMap=r.assignCategoriesMapProp=r.assignCategoriesTokensProp=r.assignTokenDefaultProps=r.expandCategories=r.augmentTokenTypes=r.tokenIdxToClass=r.tokenShortNameIdx=r.tokenStructuredMatcherNoCategories=r.tokenStructuredMatcher=void 0;var e=Se();function t(g,l){var h=g.tokenTypeIdx;return h===l.tokenTypeIdx?!0:l.isParent===!0&&l.categoryMatchesMap[h]===!0}r.tokenStructuredMatcher=t;function i(g,l){return g.tokenTypeIdx===l.tokenTypeIdx}r.tokenStructuredMatcherNoCategories=i,r.tokenShortNameIdx=1,r.tokenIdxToClass={};function n(g){var l=s(g);o(l),A(l),c(l),e.forEach(l,function(h){h.isParent=h.categoryMatches.length>0})}r.augmentTokenTypes=n;function s(g){for(var l=e.cloneArr(g),h=g,p=!0;p;){h=e.compact(e.flatten(e.map(h,function(E){return E.CATEGORIES})));var C=e.difference(h,l);l=l.concat(C),e.isEmpty(C)?p=!1:h=C}return l}r.expandCategories=s;function o(g){e.forEach(g,function(l){f(l)||(r.tokenIdxToClass[r.tokenShortNameIdx]=l,l.tokenTypeIdx=r.tokenShortNameIdx++),u(l)&&!e.isArray(l.CATEGORIES)&&(l.CATEGORIES=[l.CATEGORIES]),u(l)||(l.CATEGORIES=[]),b(l)||(l.categoryMatches=[]),d(l)||(l.categoryMatchesMap={})})}r.assignTokenDefaultProps=o;function c(g){e.forEach(g,function(l){l.categoryMatches=[],e.forEach(l.categoryMatchesMap,function(h,p){l.categoryMatches.push(r.tokenIdxToClass[p].tokenTypeIdx)})})}r.assignCategoriesTokensProp=c;function A(g){e.forEach(g,function(l){a([],l)})}r.assignCategoriesMapProp=A;function a(g,l){e.forEach(g,function(h){l.categoryMatchesMap[h.tokenTypeIdx]=!0}),e.forEach(l.CATEGORIES,function(h){var p=g.concat(l);e.contains(p,h)||a(p,h)})}r.singleAssignCategoriesToksMap=a;function f(g){return e.has(g,"tokenTypeIdx")}r.hasShortKeyProperty=f;function u(g){return e.has(g,"CATEGORIES")}r.hasCategoriesProperty=u;function b(g){return e.has(g,"categoryMatches")}r.hasExtendingTokensTypesProperty=b;function d(g){return e.has(g,"categoryMatchesMap")}r.hasExtendingTokensTypesMapProperty=d;function I(g){return e.has(g,"tokenTypeIdx")}r.isTokenType=I}),Fi=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.defaultLexerErrorProvider=void 0,r.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,i,n,s){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+","+(" skipped "+i+" characters.")}}}),Qt=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Lexer=r.LexerDefinitionErrorType=void 0;var e=Di(),t=Se(),i=mt(),n=Fi(),s=cn();(function(A){A[A.MISSING_PATTERN=0]="MISSING_PATTERN",A[A.INVALID_PATTERN=1]="INVALID_PATTERN",A[A.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",A[A.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",A[A.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",A[A.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",A[A.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",A[A.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",A[A.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",A[A.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",A[A.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",A[A.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",A[A.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",A[A.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",A[A.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",A[A.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",A[A.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(r.LexerDefinitionErrorType||(r.LexerDefinitionErrorType={}));var o={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
124
|
+
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:n.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(o);var c=(function(){function A(a,f){var u=this;if(f===void 0&&(f=o),this.lexerDefinition=a,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof f=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
125
|
+
a boolean 2nd argument is no longer supported`);this.config=t.merge(o,f);var b=this.config.traceInitPerf;b===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof b=="number"&&(this.traceInitMaxIdent=b,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var d,I=!0;u.TRACE_INIT("Lexer Config handling",function(){if(u.config.lineTerminatorsPattern===o.lineTerminatorsPattern)u.config.lineTerminatorsPattern=e.LineTerminatorOptimizedTester;else if(u.config.lineTerminatorCharacters===o.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
126
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(f.safeMode&&f.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');u.trackStartLines=/full|onlyStart/i.test(u.config.positionTracking),u.trackEndLines=/full/i.test(u.config.positionTracking),t.isArray(a)?(d={modes:{}},d.modes[e.DEFAULT_MODE]=t.cloneArr(a),d[e.DEFAULT_MODE]=e.DEFAULT_MODE):(I=!1,d=t.cloneObj(a))}),u.config.skipValidations===!1&&(u.TRACE_INIT("performRuntimeChecks",function(){u.lexerDefinitionErrors=u.lexerDefinitionErrors.concat(e.performRuntimeChecks(d,u.trackStartLines,u.config.lineTerminatorCharacters))}),u.TRACE_INIT("performWarningRuntimeChecks",function(){u.lexerDefinitionWarning=u.lexerDefinitionWarning.concat(e.performWarningRuntimeChecks(d,u.trackStartLines,u.config.lineTerminatorCharacters))})),d.modes=d.modes?d.modes:{},t.forEach(d.modes,function(p,C){d.modes[C]=t.reject(p,function(E){return t.isUndefined(E)})});var g=t.keys(d.modes);if(t.forEach(d.modes,function(p,C){u.TRACE_INIT("Mode: <"+C+"> processing",function(){if(u.modes.push(C),u.config.skipValidations===!1&&u.TRACE_INIT("validatePatterns",function(){u.lexerDefinitionErrors=u.lexerDefinitionErrors.concat(e.validatePatterns(p,g))}),t.isEmpty(u.lexerDefinitionErrors)){i.augmentTokenTypes(p);var E;u.TRACE_INIT("analyzeTokenTypes",function(){E=e.analyzeTokenTypes(p,{lineTerminatorCharacters:u.config.lineTerminatorCharacters,positionTracking:f.positionTracking,ensureOptimizations:f.ensureOptimizations,safeMode:f.safeMode,tracer:u.TRACE_INIT.bind(u)})}),u.patternIdxToConfig[C]=E.patternIdxToConfig,u.charCodeToPatternIdxToConfig[C]=E.charCodeToPatternIdxToConfig,u.emptyGroups=t.merge(u.emptyGroups,E.emptyGroups),u.hasCustom=E.hasCustom||u.hasCustom,u.canModeBeOptimized[C]=E.canBeOptimized}})}),u.defaultMode=d.defaultMode,!t.isEmpty(u.lexerDefinitionErrors)&&!u.config.deferDefinitionErrorsHandling){var l=t.map(u.lexerDefinitionErrors,function(p){return p.message}),h=l.join(`-----------------------
|
|
127
127
|
`);throw new Error(`Errors detected in definition of Lexer:
|
|
128
|
-
`+h)}t.forEach(u.lexerDefinitionWarning,function(p){t.PRINT_WARNING(p.message)}),u.TRACE_INIT("Choosing sub-methods implementations",function(){if(e.SUPPORT_STICKY?(u.chopInput=t.IDENTITY,u.match=u.matchWithTest):(u.updateLastIndex=t.NOOP,u.match=u.matchWithExec),
|
|
128
|
+
`+h)}t.forEach(u.lexerDefinitionWarning,function(p){t.PRINT_WARNING(p.message)}),u.TRACE_INIT("Choosing sub-methods implementations",function(){if(e.SUPPORT_STICKY?(u.chopInput=t.IDENTITY,u.match=u.matchWithTest):(u.updateLastIndex=t.NOOP,u.match=u.matchWithExec),I&&(u.handleModes=t.NOOP),u.trackStartLines===!1&&(u.computeNewColumn=t.IDENTITY),u.trackEndLines===!1&&(u.updateTokenEndLineColumnLocation=t.NOOP),/full/i.test(u.config.positionTracking))u.createTokenInstance=u.createFullToken;else if(/onlyStart/i.test(u.config.positionTracking))u.createTokenInstance=u.createStartOnlyToken;else if(/onlyOffset/i.test(u.config.positionTracking))u.createTokenInstance=u.createOffsetOnlyToken;else throw Error('Invalid <positionTracking> config option: "'+u.config.positionTracking+'"');u.hasCustom?(u.addToken=u.addTokenUsingPush,u.handlePayload=u.handlePayloadWithCustom):(u.addToken=u.addTokenUsingMemberAccess,u.handlePayload=u.handlePayloadNoCustom)}),u.TRACE_INIT("Failed Optimization Warnings",function(){var p=t.reduce(u.canModeBeOptimized,function(C,E,B){return E===!1&&C.push(B),C},[]);if(f.ensureOptimizations&&!t.isEmpty(p))throw Error("Lexer Modes: < "+p.join(", ")+` > cannot be optimized.
|
|
129
129
|
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
130
|
-
Or inspect the console log for details on how to resolve these issues.`)}),u.TRACE_INIT("clearRegExpParserCache",function(){s.clearRegExpParserCache()}),u.TRACE_INIT("toFastProperties",function(){t.toFastProperties(u)})})}return A.prototype.tokenize=function(a,f){if(f===void 0&&(f=this.defaultMode),!t.isEmpty(this.lexerDefinitionErrors)){var u=t.map(this.lexerDefinitionErrors,function(
|
|
130
|
+
Or inspect the console log for details on how to resolve these issues.`)}),u.TRACE_INIT("clearRegExpParserCache",function(){s.clearRegExpParserCache()}),u.TRACE_INIT("toFastProperties",function(){t.toFastProperties(u)})})}return A.prototype.tokenize=function(a,f){if(f===void 0&&(f=this.defaultMode),!t.isEmpty(this.lexerDefinitionErrors)){var u=t.map(this.lexerDefinitionErrors,function(I){return I.message}),b=u.join(`-----------------------
|
|
131
131
|
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
132
|
-
`+b)}var d=this.tokenizeInternal(a,f);return d},A.prototype.tokenizeInternal=function(a,f){var u=this,b,d,
|
|
133
|
-
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return e.has(m,A)&&(v.CATEGORIES=m[A]),r.augmentTokenTypes([v]),e.has(m,a)&&(v.LABEL=m[a]),e.has(m,f)&&(v.GROUP=m[f]),e.has(m,b)&&(v.POP_MODE=m[b]),e.has(m,u)&&(v.PUSH_MODE=m[u]),e.has(m,d)&&(v.LONGER_ALT=m[d]),e.has(m,E)&&(v.LINE_BREAKS=m[E]),e.has(m,g)&&(v.START_CHARS_HINT=m[g]),v}n.EOF=l({name:"EOF",pattern:t.Lexer.NA}),r.augmentTokenTypes([n.EOF]);function p(m,y,v,S,U,w,M,_){return{image:y,startOffset:v,endOffset:S,startLine:U,endLine:w,startColumn:M,endColumn:_,tokenTypeIdx:m.tokenTypeIdx,tokenType:m}}n.createTokenInstance=p;function C(m,y){return r.tokenStructuredMatcher(m,y)}n.tokenMatcher=C}),ze=Ce(n=>{var e=n&&n.__extends||(function(){var h=function(p,C){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,y){m.__proto__=y}||function(m,y){for(var v in y)Object.prototype.hasOwnProperty.call(y,v)&&(m[v]=y[v])},h(p,C)};return function(p,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");h(p,C);function m(){this.constructor=p}p.prototype=C===null?Object.create(C):(m.prototype=C.prototype,new m)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.serializeProduction=n.serializeGrammar=n.Terminal=n.Alternation=n.RepetitionWithSeparator=n.Repetition=n.RepetitionMandatoryWithSeparator=n.RepetitionMandatory=n.Option=n.Alternative=n.Rule=n.NonTerminal=n.AbstractProduction=void 0;var t=ke(),r=st(),i=(function(){function h(p){this._definition=p}return Object.defineProperty(h.prototype,"definition",{get:function(){return this._definition},set:function(p){this._definition=p},enumerable:!1,configurable:!0}),h.prototype.accept=function(p){p.visit(this),t.forEach(this.definition,function(C){C.accept(p)})},h})();n.AbstractProduction=i;var s=(function(h){e(p,h);function p(C){var m=h.call(this,[])||this;return m.idx=1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return Object.defineProperty(p.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(C){},enumerable:!1,configurable:!0}),p.prototype.accept=function(C){C.visit(this)},p})(i);n.NonTerminal=s;var o=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.orgText="",t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return p})(i);n.Rule=o;var c=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.ignoreAmbiguities=!1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return p})(i);n.Alternative=c;var A=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.idx=1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return p})(i);n.Option=A;var a=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.idx=1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return p})(i);n.RepetitionMandatory=a;var f=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.idx=1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return p})(i);n.RepetitionMandatoryWithSeparator=f;var u=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.idx=1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return p})(i);n.Repetition=u;var b=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.idx=1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return p})(i);n.RepetitionWithSeparator=b;var d=(function(h){e(p,h);function p(C){var m=h.call(this,C.definition)||this;return m.idx=1,m.ignoreAmbiguities=!1,m.hasPredicates=!1,t.assign(m,t.pick(C,function(y){return y!==void 0})),m}return Object.defineProperty(p.prototype,"definition",{get:function(){return this._definition},set:function(C){this._definition=C},enumerable:!1,configurable:!0}),p})(i);n.Alternation=d;var E=(function(){function h(p){this.idx=1,t.assign(this,t.pick(p,function(C){return C!==void 0}))}return h.prototype.accept=function(p){p.visit(this)},h})();n.Terminal=E;function g(h){return t.map(h,l)}n.serializeGrammar=g;function l(h){function p(y){return t.map(y,l)}if(h instanceof s)return{type:"NonTerminal",name:h.nonTerminalName,idx:h.idx};if(h instanceof c)return{type:"Alternative",definition:p(h.definition)};if(h instanceof A)return{type:"Option",idx:h.idx,definition:p(h.definition)};if(h instanceof a)return{type:"RepetitionMandatory",idx:h.idx,definition:p(h.definition)};if(h instanceof f)return{type:"RepetitionMandatoryWithSeparator",idx:h.idx,separator:l(new E({terminalType:h.separator})),definition:p(h.definition)};if(h instanceof b)return{type:"RepetitionWithSeparator",idx:h.idx,separator:l(new E({terminalType:h.separator})),definition:p(h.definition)};if(h instanceof u)return{type:"Repetition",idx:h.idx,definition:p(h.definition)};if(h instanceof d)return{type:"Alternation",idx:h.idx,definition:p(h.definition)};if(h instanceof E){var C={type:"Terminal",name:h.terminalType.name,label:r.tokenLabel(h.terminalType),idx:h.idx},m=h.terminalType.PATTERN;return h.terminalType.PATTERN&&(C.pattern=t.isRegExp(m)?m.source:m),C}else{if(h instanceof o)return{type:"Rule",name:h.name,orgText:h.orgText,definition:p(h.definition)};throw Error("non exhaustive match")}}n.serializeProduction=l}),An=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RestWalker=void 0;var e=ke(),t=ze(),r=(function(){function s(){}return s.prototype.walk=function(o,c){var A=this;c===void 0&&(c=[]),e.forEach(o.definition,function(a,f){var u=e.drop(o.definition,f+1);if(a instanceof t.NonTerminal)A.walkProdRef(a,u,c);else if(a instanceof t.Terminal)A.walkTerminal(a,u,c);else if(a instanceof t.Alternative)A.walkFlat(a,u,c);else if(a instanceof t.Option)A.walkOption(a,u,c);else if(a instanceof t.RepetitionMandatory)A.walkAtLeastOne(a,u,c);else if(a instanceof t.RepetitionMandatoryWithSeparator)A.walkAtLeastOneSep(a,u,c);else if(a instanceof t.RepetitionWithSeparator)A.walkManySep(a,u,c);else if(a instanceof t.Repetition)A.walkMany(a,u,c);else if(a instanceof t.Alternation)A.walkOr(a,u,c);else throw Error("non exhaustive match")})},s.prototype.walkTerminal=function(o,c,A){},s.prototype.walkProdRef=function(o,c,A){},s.prototype.walkFlat=function(o,c,A){var a=c.concat(A);this.walk(o,a)},s.prototype.walkOption=function(o,c,A){var a=c.concat(A);this.walk(o,a)},s.prototype.walkAtLeastOne=function(o,c,A){var a=[new t.Option({definition:o.definition})].concat(c,A);this.walk(o,a)},s.prototype.walkAtLeastOneSep=function(o,c,A){var a=i(o,c,A);this.walk(o,a)},s.prototype.walkMany=function(o,c,A){var a=[new t.Option({definition:o.definition})].concat(c,A);this.walk(o,a)},s.prototype.walkManySep=function(o,c,A){var a=i(o,c,A);this.walk(o,a)},s.prototype.walkOr=function(o,c,A){var a=this,f=c.concat(A);e.forEach(o.definition,function(u){var b=new t.Alternative({definition:[u]});a.walk(b,f)})},s})();n.RestWalker=r;function i(s,o,c){var A=[new t.Option({definition:[new t.Terminal({terminalType:s.separator})].concat(s.definition)})],a=A.concat(o,c);return a}}),It=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GAstVisitor=void 0;var e=ze(),t=(function(){function r(){}return r.prototype.visit=function(i){var s=i;switch(s.constructor){case e.NonTerminal:return this.visitNonTerminal(s);case e.Alternative:return this.visitAlternative(s);case e.Option:return this.visitOption(s);case e.RepetitionMandatory:return this.visitRepetitionMandatory(s);case e.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(s);case e.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(s);case e.Repetition:return this.visitRepetition(s);case e.Alternation:return this.visitAlternation(s);case e.Terminal:return this.visitTerminal(s);case e.Rule:return this.visitRule(s);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(i){},r.prototype.visitAlternative=function(i){},r.prototype.visitOption=function(i){},r.prototype.visitRepetition=function(i){},r.prototype.visitRepetitionMandatory=function(i){},r.prototype.visitRepetitionMandatoryWithSeparator=function(i){},r.prototype.visitRepetitionWithSeparator=function(i){},r.prototype.visitAlternation=function(i){},r.prototype.visitTerminal=function(i){},r.prototype.visitRule=function(i){},r})();n.GAstVisitor=t}),Qt=Ce(n=>{var e=n&&n.__extends||(function(){var b=function(d,E){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,l){g.__proto__=l}||function(g,l){for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(g[h]=l[h])},b(d,E)};return function(d,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");b(d,E);function g(){this.constructor=d}d.prototype=E===null?Object.create(E):(g.prototype=E.prototype,new g)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.collectMethods=n.DslMethodsCollectorVisitor=n.getProductionDslName=n.isBranchingProd=n.isOptionalProd=n.isSequenceProd=void 0;var t=ke(),r=ze(),i=It();function s(b){return b instanceof r.Alternative||b instanceof r.Option||b instanceof r.Repetition||b instanceof r.RepetitionMandatory||b instanceof r.RepetitionMandatoryWithSeparator||b instanceof r.RepetitionWithSeparator||b instanceof r.Terminal||b instanceof r.Rule}n.isSequenceProd=s;function o(b,d){d===void 0&&(d=[]);var E=b instanceof r.Option||b instanceof r.Repetition||b instanceof r.RepetitionWithSeparator;return E?!0:b instanceof r.Alternation?t.some(b.definition,function(g){return o(g,d)}):b instanceof r.NonTerminal&&t.contains(d,b)?!1:b instanceof r.AbstractProduction?(b instanceof r.NonTerminal&&d.push(b),t.every(b.definition,function(g){return o(g,d)})):!1}n.isOptionalProd=o;function c(b){return b instanceof r.Alternation}n.isBranchingProd=c;function A(b){if(b instanceof r.NonTerminal)return"SUBRULE";if(b instanceof r.Option)return"OPTION";if(b instanceof r.Alternation)return"OR";if(b instanceof r.RepetitionMandatory)return"AT_LEAST_ONE";if(b instanceof r.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(b instanceof r.RepetitionWithSeparator)return"MANY_SEP";if(b instanceof r.Repetition)return"MANY";if(b instanceof r.Terminal)return"CONSUME";throw Error("non exhaustive match")}n.getProductionDslName=A;var a=(function(b){e(d,b);function d(){var E=b!==null&&b.apply(this,arguments)||this;return E.separator="-",E.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},E}return d.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},d.prototype.visitTerminal=function(E){var g=E.terminalType.name+this.separator+"Terminal";t.has(this.dslMethods,g)||(this.dslMethods[g]=[]),this.dslMethods[g].push(E)},d.prototype.visitNonTerminal=function(E){var g=E.nonTerminalName+this.separator+"Terminal";t.has(this.dslMethods,g)||(this.dslMethods[g]=[]),this.dslMethods[g].push(E)},d.prototype.visitOption=function(E){this.dslMethods.option.push(E)},d.prototype.visitRepetitionWithSeparator=function(E){this.dslMethods.repetitionWithSeparator.push(E)},d.prototype.visitRepetitionMandatory=function(E){this.dslMethods.repetitionMandatory.push(E)},d.prototype.visitRepetitionMandatoryWithSeparator=function(E){this.dslMethods.repetitionMandatoryWithSeparator.push(E)},d.prototype.visitRepetition=function(E){this.dslMethods.repetition.push(E)},d.prototype.visitAlternation=function(E){this.dslMethods.alternation.push(E)},d})(i.GAstVisitor);n.DslMethodsCollectorVisitor=a;var f=new a;function u(b){f.reset(),b.accept(f);var d=f.dslMethods;return f.reset(),d}n.collectMethods=u}),Di=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.firstForTerminal=n.firstForBranching=n.firstForSequence=n.first=void 0;var e=ke(),t=ze(),r=Qt();function i(A){if(A instanceof t.NonTerminal)return i(A.referencedRule);if(A instanceof t.Terminal)return c(A);if(r.isSequenceProd(A))return s(A);if(r.isBranchingProd(A))return o(A);throw Error("non exhaustive match")}n.first=i;function s(A){for(var a=[],f=A.definition,u=0,b=f.length>u,d,E=!0;b&&E;)d=f[u],E=r.isOptionalProd(d),a=a.concat(i(d)),u=u+1,b=f.length>u;return e.uniq(a)}n.firstForSequence=s;function o(A){var a=e.map(A.definition,function(f){return i(f)});return e.uniq(e.flatten(a))}n.firstForBranching=o;function c(A){return[A.terminalType]}n.firstForTerminal=c}),Oi=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IN=void 0,n.IN="_~IN~_"}),wo=Ce(n=>{var e=n&&n.__extends||(function(){var u=function(b,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,g){E.__proto__=g}||function(E,g){for(var l in g)Object.prototype.hasOwnProperty.call(g,l)&&(E[l]=g[l])},u(b,d)};return function(b,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(b,d);function E(){this.constructor=b}b.prototype=d===null?Object.create(d):(E.prototype=d.prototype,new E)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.buildInProdFollowPrefix=n.buildBetweenProdsFollowPrefix=n.computeAllProdsFollows=n.ResyncFollowsWalker=void 0;var t=An(),r=Di(),i=ke(),s=Oi(),o=ze(),c=(function(u){e(b,u);function b(d){var E=u.call(this)||this;return E.topProd=d,E.follows={},E}return b.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},b.prototype.walkTerminal=function(d,E,g){},b.prototype.walkProdRef=function(d,E,g){var l=a(d.referencedRule,d.idx)+this.topProd.name,h=E.concat(g),p=new o.Alternative({definition:h}),C=r.first(p);this.follows[l]=C},b})(t.RestWalker);n.ResyncFollowsWalker=c;function A(u){var b={};return i.forEach(u,function(d){var E=new c(d).startWalking();i.assign(b,E)}),b}n.computeAllProdsFollows=A;function a(u,b){return u.name+b+s.IN}n.buildBetweenProdsFollowPrefix=a;function f(u){var b=u.terminalType.name;return b+u.idx+s.IN}n.buildInProdFollowPrefix=f}),wt=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.defaultGrammarValidatorErrorProvider=n.defaultGrammarResolverErrorProvider=n.defaultParserErrorProvider=void 0;var e=st(),t=ke(),r=ke(),i=ze(),s=Qt();n.defaultParserErrorProvider={buildMismatchTokenMessage:function(o){var c=o.expected,A=o.actual;o.previous,o.ruleName;var a=e.hasTokenLabel(c),f=a?"--> "+e.tokenLabel(c)+" <--":"token of type --> "+c.name+" <--",u="Expecting "+f+" but found --> '"+A.image+"' <--";return u},buildNotAllInputParsedMessage:function(o){var c=o.firstRedundant;return o.ruleName,"Redundant input, expecting EOF but found: "+c.image},buildNoViableAltMessage:function(o){var c=o.expectedPathsPerAlt,A=o.actual;o.previous;var a=o.customUserDescription;o.ruleName;var f="Expecting: ",u=r.first(A).image,b=`
|
|
134
|
-
but found: '`+u+"'";if(a)return f+a+b;var d=
|
|
132
|
+
`+b)}var d=this.tokenizeInternal(a,f);return d},A.prototype.tokenizeInternal=function(a,f){var u=this,b,d,I,g,l,h,p,C,E,B,Q,S,U,v,O=a,L=O.length,k=0,D=0,_=this.hasCustom?0:Math.floor(a.length/10),V=new Array(_),J=[],q=this.trackStartLines?1:void 0,X=this.trackStartLines?1:void 0,$=e.cloneEmptyGroups(this.emptyGroups),le=this.trackStartLines,re=this.config.lineTerminatorsPattern,oe=0,te=[],he=[],P=[],j=[];Object.freeze(j);var W=void 0;function Z(){return te}function ne(N){var F=e.charCodeToOptimizedIndex(N),G=he[F];return G===void 0?j:G}var Ae=function(N){if(P.length===1&&N.tokenType.PUSH_MODE===void 0){var F=u.config.errorMessageProvider.buildUnableToPopLexerModeMessage(N);J.push({offset:N.startOffset,line:N.startLine!==void 0?N.startLine:void 0,column:N.startColumn!==void 0?N.startColumn:void 0,length:N.image.length,message:F})}else{P.pop();var G=t.last(P);te=u.patternIdxToConfig[G],he=u.charCodeToPatternIdxToConfig[G],oe=te.length;var z=u.canModeBeOptimized[G]&&u.config.safeMode===!1;he&&z?W=ne:W=Z}};function be(N){P.push(N),he=this.charCodeToPatternIdxToConfig[N],te=this.patternIdxToConfig[N],oe=te.length,oe=te.length;var F=this.canModeBeOptimized[N]&&this.config.safeMode===!1;he&&F?W=ne:W=Z}be.call(this,f);for(var Ie;k<L;){l=null;var Ne=O.charCodeAt(k),je=W(Ne),Ve=je.length;for(b=0;b<Ve;b++){Ie=je[b];var Ue=Ie.pattern;h=null;var M=Ie.short;if(M!==!1?Ne===M&&(l=Ue):Ie.isCustom===!0?(v=Ue.exec(O,k,V,$),v!==null?(l=v[0],v.payload!==void 0&&(h=v.payload)):l=null):(this.updateLastIndex(Ue,k),l=this.match(Ue,a,k)),l!==null){if(g=Ie.longerAlt,g!==void 0){var Y=te[g],K=Y.pattern;p=null,Y.isCustom===!0?(v=K.exec(O,k,V,$),v!==null?(I=v[0],v.payload!==void 0&&(p=v.payload)):I=null):(this.updateLastIndex(K,k),I=this.match(K,a,k)),I&&I.length>l.length&&(l=I,h=p,Ie=Y)}break}}if(l!==null){if(C=l.length,E=Ie.group,E!==void 0&&(B=Ie.tokenTypeIdx,Q=this.createTokenInstance(l,k,B,Ie.tokenType,q,X,C),this.handlePayload(Q,h),E===!1?D=this.addToken(V,D,Q):$[E].push(Q)),a=this.chopInput(a,C),k=k+C,X=this.computeNewColumn(X,C),le===!0&&Ie.canLineTerminator===!0){var ie=0,ge=void 0,we=void 0;re.lastIndex=0;do ge=re.test(l),ge===!0&&(we=re.lastIndex-1,ie++);while(ge===!0);ie!==0&&(q=q+ie,X=C-we,this.updateTokenEndLineColumnLocation(Q,E,we,ie,q,X,C))}this.handleModes(Ie,Ae,be,Q)}else{for(var R=k,y=q,T=X,x=!1;!x&&k<L;)for(O.charCodeAt(k),a=this.chopInput(a,1),k++,d=0;d<oe;d++){var w=te[d],Ue=w.pattern,M=w.short;if(M!==!1?O.charCodeAt(k)===M&&(x=!0):w.isCustom===!0?x=Ue.exec(O,k,V,$)!==null:(this.updateLastIndex(Ue,k),x=Ue.exec(a)!==null),x===!0)break}S=k-R,U=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(O,R,S,y,T),J.push({offset:R,line:y,column:T,length:S,message:U})}}return this.hasCustom||(V.length=D),{tokens:V,groups:$,errors:J}},A.prototype.handleModes=function(a,f,u,b){if(a.pop===!0){var d=a.push;f(b),d!==void 0&&u.call(this,d)}else a.push!==void 0&&u.call(this,a.push)},A.prototype.chopInput=function(a,f){return a.substring(f)},A.prototype.updateLastIndex=function(a,f){a.lastIndex=f},A.prototype.updateTokenEndLineColumnLocation=function(a,f,u,b,d,I,g){var l,h;f!==void 0&&(l=u===g-1,h=l?-1:0,b===1&&l===!0||(a.endLine=d+h,a.endColumn=I-1+-h))},A.prototype.computeNewColumn=function(a,f){return a+f},A.prototype.createTokenInstance=function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];return null},A.prototype.createOffsetOnlyToken=function(a,f,u,b){return{image:a,startOffset:f,tokenTypeIdx:u,tokenType:b}},A.prototype.createStartOnlyToken=function(a,f,u,b,d,I){return{image:a,startOffset:f,startLine:d,startColumn:I,tokenTypeIdx:u,tokenType:b}},A.prototype.createFullToken=function(a,f,u,b,d,I,g){return{image:a,startOffset:f,endOffset:f+g-1,startLine:d,endLine:d,startColumn:I,endColumn:I+g-1,tokenTypeIdx:u,tokenType:b}},A.prototype.addToken=function(a,f,u){return 666},A.prototype.addTokenUsingPush=function(a,f,u){return a.push(u),f},A.prototype.addTokenUsingMemberAccess=function(a,f,u){return a[f]=u,f++,f},A.prototype.handlePayload=function(a,f){},A.prototype.handlePayloadNoCustom=function(a,f){},A.prototype.handlePayloadWithCustom=function(a,f){f!==null&&(a.payload=f)},A.prototype.match=function(a,f,u){return null},A.prototype.matchWithTest=function(a,f,u){var b=a.test(f);return b===!0?f.substring(u,a.lastIndex):null},A.prototype.matchWithExec=function(a,f){var u=a.exec(f);return u!==null?u[0]:u},A.prototype.TRACE_INIT=function(a,f){if(this.traceInitPerf===!0){this.traceInitIndent++;var u=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(u+"--> <"+a+">");var b=t.timer(f),d=b.time,I=b.value,g=d>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&g(u+"<-- <"+a+"> time: "+d+"ms"),this.traceInitIndent--,I}else return f()},A.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",A.NA=/NOT_APPLICABLE/,A})();r.Lexer=c}),ct=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tokenMatcher=r.createTokenInstance=r.EOF=r.createToken=r.hasTokenLabel=r.tokenName=r.tokenLabel=void 0;var e=Se(),t=Qt(),i=mt();function n(E){return o(E)?E.LABEL:E.name}r.tokenLabel=n;function s(E){return E.name}r.tokenName=s;function o(E){return e.isString(E.LABEL)&&E.LABEL!==""}r.hasTokenLabel=o;var c="parent",A="categories",a="label",f="group",u="push_mode",b="pop_mode",d="longer_alt",I="line_breaks",g="start_chars_hint";function l(E){return h(E)}r.createToken=l;function h(E){var B=E.pattern,Q={};if(Q.name=E.name,e.isUndefined(B)||(Q.PATTERN=B),e.has(E,c))throw`The parent property is no longer supported.
|
|
133
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return e.has(E,A)&&(Q.CATEGORIES=E[A]),i.augmentTokenTypes([Q]),e.has(E,a)&&(Q.LABEL=E[a]),e.has(E,f)&&(Q.GROUP=E[f]),e.has(E,b)&&(Q.POP_MODE=E[b]),e.has(E,u)&&(Q.PUSH_MODE=E[u]),e.has(E,d)&&(Q.LONGER_ALT=E[d]),e.has(E,I)&&(Q.LINE_BREAKS=E[I]),e.has(E,g)&&(Q.START_CHARS_HINT=E[g]),Q}r.EOF=l({name:"EOF",pattern:t.Lexer.NA}),i.augmentTokenTypes([r.EOF]);function p(E,B,Q,S,U,v,O,L){return{image:B,startOffset:Q,endOffset:S,startLine:U,endLine:v,startColumn:O,endColumn:L,tokenTypeIdx:E.tokenTypeIdx,tokenType:E}}r.createTokenInstance=p;function C(E,B){return i.tokenStructuredMatcher(E,B)}r.tokenMatcher=C}),We=Be(r=>{var e=r&&r.__extends||(function(){var h=function(p,C){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,B){E.__proto__=B}||function(E,B){for(var Q in B)Object.prototype.hasOwnProperty.call(B,Q)&&(E[Q]=B[Q])},h(p,C)};return function(p,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");h(p,C);function E(){this.constructor=p}p.prototype=C===null?Object.create(C):(E.prototype=C.prototype,new E)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.serializeProduction=r.serializeGrammar=r.Terminal=r.Alternation=r.RepetitionWithSeparator=r.Repetition=r.RepetitionMandatoryWithSeparator=r.RepetitionMandatory=r.Option=r.Alternative=r.Rule=r.NonTerminal=r.AbstractProduction=void 0;var t=Se(),i=ct(),n=(function(){function h(p){this._definition=p}return Object.defineProperty(h.prototype,"definition",{get:function(){return this._definition},set:function(p){this._definition=p},enumerable:!1,configurable:!0}),h.prototype.accept=function(p){p.visit(this),t.forEach(this.definition,function(C){C.accept(p)})},h})();r.AbstractProduction=n;var s=(function(h){e(p,h);function p(C){var E=h.call(this,[])||this;return E.idx=1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return Object.defineProperty(p.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(C){},enumerable:!1,configurable:!0}),p.prototype.accept=function(C){C.visit(this)},p})(n);r.NonTerminal=s;var o=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.orgText="",t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return p})(n);r.Rule=o;var c=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.ignoreAmbiguities=!1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return p})(n);r.Alternative=c;var A=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.idx=1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return p})(n);r.Option=A;var a=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.idx=1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return p})(n);r.RepetitionMandatory=a;var f=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.idx=1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return p})(n);r.RepetitionMandatoryWithSeparator=f;var u=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.idx=1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return p})(n);r.Repetition=u;var b=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.idx=1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return p})(n);r.RepetitionWithSeparator=b;var d=(function(h){e(p,h);function p(C){var E=h.call(this,C.definition)||this;return E.idx=1,E.ignoreAmbiguities=!1,E.hasPredicates=!1,t.assign(E,t.pick(C,function(B){return B!==void 0})),E}return Object.defineProperty(p.prototype,"definition",{get:function(){return this._definition},set:function(C){this._definition=C},enumerable:!1,configurable:!0}),p})(n);r.Alternation=d;var I=(function(){function h(p){this.idx=1,t.assign(this,t.pick(p,function(C){return C!==void 0}))}return h.prototype.accept=function(p){p.visit(this)},h})();r.Terminal=I;function g(h){return t.map(h,l)}r.serializeGrammar=g;function l(h){function p(B){return t.map(B,l)}if(h instanceof s)return{type:"NonTerminal",name:h.nonTerminalName,idx:h.idx};if(h instanceof c)return{type:"Alternative",definition:p(h.definition)};if(h instanceof A)return{type:"Option",idx:h.idx,definition:p(h.definition)};if(h instanceof a)return{type:"RepetitionMandatory",idx:h.idx,definition:p(h.definition)};if(h instanceof f)return{type:"RepetitionMandatoryWithSeparator",idx:h.idx,separator:l(new I({terminalType:h.separator})),definition:p(h.definition)};if(h instanceof b)return{type:"RepetitionWithSeparator",idx:h.idx,separator:l(new I({terminalType:h.separator})),definition:p(h.definition)};if(h instanceof u)return{type:"Repetition",idx:h.idx,definition:p(h.definition)};if(h instanceof d)return{type:"Alternation",idx:h.idx,definition:p(h.definition)};if(h instanceof I){var C={type:"Terminal",name:h.terminalType.name,label:i.tokenLabel(h.terminalType),idx:h.idx},E=h.terminalType.PATTERN;return h.terminalType.PATTERN&&(C.pattern=t.isRegExp(E)?E.source:E),C}else{if(h instanceof o)return{type:"Rule",name:h.name,orgText:h.orgText,definition:p(h.definition)};throw Error("non exhaustive match")}}r.serializeProduction=l}),ln=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RestWalker=void 0;var e=Se(),t=We(),i=(function(){function s(){}return s.prototype.walk=function(o,c){var A=this;c===void 0&&(c=[]),e.forEach(o.definition,function(a,f){var u=e.drop(o.definition,f+1);if(a instanceof t.NonTerminal)A.walkProdRef(a,u,c);else if(a instanceof t.Terminal)A.walkTerminal(a,u,c);else if(a instanceof t.Alternative)A.walkFlat(a,u,c);else if(a instanceof t.Option)A.walkOption(a,u,c);else if(a instanceof t.RepetitionMandatory)A.walkAtLeastOne(a,u,c);else if(a instanceof t.RepetitionMandatoryWithSeparator)A.walkAtLeastOneSep(a,u,c);else if(a instanceof t.RepetitionWithSeparator)A.walkManySep(a,u,c);else if(a instanceof t.Repetition)A.walkMany(a,u,c);else if(a instanceof t.Alternation)A.walkOr(a,u,c);else throw Error("non exhaustive match")})},s.prototype.walkTerminal=function(o,c,A){},s.prototype.walkProdRef=function(o,c,A){},s.prototype.walkFlat=function(o,c,A){var a=c.concat(A);this.walk(o,a)},s.prototype.walkOption=function(o,c,A){var a=c.concat(A);this.walk(o,a)},s.prototype.walkAtLeastOne=function(o,c,A){var a=[new t.Option({definition:o.definition})].concat(c,A);this.walk(o,a)},s.prototype.walkAtLeastOneSep=function(o,c,A){var a=n(o,c,A);this.walk(o,a)},s.prototype.walkMany=function(o,c,A){var a=[new t.Option({definition:o.definition})].concat(c,A);this.walk(o,a)},s.prototype.walkManySep=function(o,c,A){var a=n(o,c,A);this.walk(o,a)},s.prototype.walkOr=function(o,c,A){var a=this,f=c.concat(A);e.forEach(o.definition,function(u){var b=new t.Alternative({definition:[u]});a.walk(b,f)})},s})();r.RestWalker=i;function n(s,o,c){var A=[new t.Option({definition:[new t.Terminal({terminalType:s.separator})].concat(s.definition)})],a=A.concat(o,c);return a}}),bt=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.GAstVisitor=void 0;var e=We(),t=(function(){function i(){}return i.prototype.visit=function(n){var s=n;switch(s.constructor){case e.NonTerminal:return this.visitNonTerminal(s);case e.Alternative:return this.visitAlternative(s);case e.Option:return this.visitOption(s);case e.RepetitionMandatory:return this.visitRepetitionMandatory(s);case e.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(s);case e.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(s);case e.Repetition:return this.visitRepetition(s);case e.Alternation:return this.visitAlternation(s);case e.Terminal:return this.visitTerminal(s);case e.Rule:return this.visitRule(s);default:throw Error("non exhaustive match")}},i.prototype.visitNonTerminal=function(n){},i.prototype.visitAlternative=function(n){},i.prototype.visitOption=function(n){},i.prototype.visitRepetition=function(n){},i.prototype.visitRepetitionMandatory=function(n){},i.prototype.visitRepetitionMandatoryWithSeparator=function(n){},i.prototype.visitRepetitionWithSeparator=function(n){},i.prototype.visitAlternation=function(n){},i.prototype.visitTerminal=function(n){},i.prototype.visitRule=function(n){},i})();r.GAstVisitor=t}),kt=Be(r=>{var e=r&&r.__extends||(function(){var b=function(d,I){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,l){g.__proto__=l}||function(g,l){for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(g[h]=l[h])},b(d,I)};return function(d,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");b(d,I);function g(){this.constructor=d}d.prototype=I===null?Object.create(I):(g.prototype=I.prototype,new g)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.collectMethods=r.DslMethodsCollectorVisitor=r.getProductionDslName=r.isBranchingProd=r.isOptionalProd=r.isSequenceProd=void 0;var t=Se(),i=We(),n=bt();function s(b){return b instanceof i.Alternative||b instanceof i.Option||b instanceof i.Repetition||b instanceof i.RepetitionMandatory||b instanceof i.RepetitionMandatoryWithSeparator||b instanceof i.RepetitionWithSeparator||b instanceof i.Terminal||b instanceof i.Rule}r.isSequenceProd=s;function o(b,d){d===void 0&&(d=[]);var I=b instanceof i.Option||b instanceof i.Repetition||b instanceof i.RepetitionWithSeparator;return I?!0:b instanceof i.Alternation?t.some(b.definition,function(g){return o(g,d)}):b instanceof i.NonTerminal&&t.contains(d,b)?!1:b instanceof i.AbstractProduction?(b instanceof i.NonTerminal&&d.push(b),t.every(b.definition,function(g){return o(g,d)})):!1}r.isOptionalProd=o;function c(b){return b instanceof i.Alternation}r.isBranchingProd=c;function A(b){if(b instanceof i.NonTerminal)return"SUBRULE";if(b instanceof i.Option)return"OPTION";if(b instanceof i.Alternation)return"OR";if(b instanceof i.RepetitionMandatory)return"AT_LEAST_ONE";if(b instanceof i.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(b instanceof i.RepetitionWithSeparator)return"MANY_SEP";if(b instanceof i.Repetition)return"MANY";if(b instanceof i.Terminal)return"CONSUME";throw Error("non exhaustive match")}r.getProductionDslName=A;var a=(function(b){e(d,b);function d(){var I=b!==null&&b.apply(this,arguments)||this;return I.separator="-",I.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},I}return d.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},d.prototype.visitTerminal=function(I){var g=I.terminalType.name+this.separator+"Terminal";t.has(this.dslMethods,g)||(this.dslMethods[g]=[]),this.dslMethods[g].push(I)},d.prototype.visitNonTerminal=function(I){var g=I.nonTerminalName+this.separator+"Terminal";t.has(this.dslMethods,g)||(this.dslMethods[g]=[]),this.dslMethods[g].push(I)},d.prototype.visitOption=function(I){this.dslMethods.option.push(I)},d.prototype.visitRepetitionWithSeparator=function(I){this.dslMethods.repetitionWithSeparator.push(I)},d.prototype.visitRepetitionMandatory=function(I){this.dslMethods.repetitionMandatory.push(I)},d.prototype.visitRepetitionMandatoryWithSeparator=function(I){this.dslMethods.repetitionMandatoryWithSeparator.push(I)},d.prototype.visitRepetition=function(I){this.dslMethods.repetition.push(I)},d.prototype.visitAlternation=function(I){this.dslMethods.alternation.push(I)},d})(n.GAstVisitor);r.DslMethodsCollectorVisitor=a;var f=new a;function u(b){f.reset(),b.accept(f);var d=f.dslMethods;return f.reset(),d}r.collectMethods=u}),Mi=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.firstForTerminal=r.firstForBranching=r.firstForSequence=r.first=void 0;var e=Se(),t=We(),i=kt();function n(A){if(A instanceof t.NonTerminal)return n(A.referencedRule);if(A instanceof t.Terminal)return c(A);if(i.isSequenceProd(A))return s(A);if(i.isBranchingProd(A))return o(A);throw Error("non exhaustive match")}r.first=n;function s(A){for(var a=[],f=A.definition,u=0,b=f.length>u,d,I=!0;b&&I;)d=f[u],I=i.isOptionalProd(d),a=a.concat(n(d)),u=u+1,b=f.length>u;return e.uniq(a)}r.firstForSequence=s;function o(A){var a=e.map(A.definition,function(f){return n(f)});return e.uniq(e.flatten(a))}r.firstForBranching=o;function c(A){return[A.terminalType]}r.firstForTerminal=c}),Oi=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IN=void 0,r.IN="_~IN~_"}),No=Be(r=>{var e=r&&r.__extends||(function(){var u=function(b,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,g){I.__proto__=g}||function(I,g){for(var l in g)Object.prototype.hasOwnProperty.call(g,l)&&(I[l]=g[l])},u(b,d)};return function(b,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(b,d);function I(){this.constructor=b}b.prototype=d===null?Object.create(d):(I.prototype=d.prototype,new I)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.buildInProdFollowPrefix=r.buildBetweenProdsFollowPrefix=r.computeAllProdsFollows=r.ResyncFollowsWalker=void 0;var t=ln(),i=Mi(),n=Se(),s=Oi(),o=We(),c=(function(u){e(b,u);function b(d){var I=u.call(this)||this;return I.topProd=d,I.follows={},I}return b.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},b.prototype.walkTerminal=function(d,I,g){},b.prototype.walkProdRef=function(d,I,g){var l=a(d.referencedRule,d.idx)+this.topProd.name,h=I.concat(g),p=new o.Alternative({definition:h}),C=i.first(p);this.follows[l]=C},b})(t.RestWalker);r.ResyncFollowsWalker=c;function A(u){var b={};return n.forEach(u,function(d){var I=new c(d).startWalking();n.assign(b,I)}),b}r.computeAllProdsFollows=A;function a(u,b){return u.name+b+s.IN}r.buildBetweenProdsFollowPrefix=a;function f(u){var b=u.terminalType.name;return b+u.idx+s.IN}r.buildInProdFollowPrefix=f}),St=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.defaultGrammarValidatorErrorProvider=r.defaultGrammarResolverErrorProvider=r.defaultParserErrorProvider=void 0;var e=ct(),t=Se(),i=Se(),n=We(),s=kt();r.defaultParserErrorProvider={buildMismatchTokenMessage:function(o){var c=o.expected,A=o.actual;o.previous,o.ruleName;var a=e.hasTokenLabel(c),f=a?"--> "+e.tokenLabel(c)+" <--":"token of type --> "+c.name+" <--",u="Expecting "+f+" but found --> '"+A.image+"' <--";return u},buildNotAllInputParsedMessage:function(o){var c=o.firstRedundant;return o.ruleName,"Redundant input, expecting EOF but found: "+c.image},buildNoViableAltMessage:function(o){var c=o.expectedPathsPerAlt,A=o.actual;o.previous;var a=o.customUserDescription;o.ruleName;var f="Expecting: ",u=i.first(A).image,b=`
|
|
134
|
+
but found: '`+u+"'";if(a)return f+a+b;var d=i.reduce(c,function(h,p){return h.concat(p)},[]),I=i.map(d,function(h){return"["+i.map(h,function(p){return e.tokenLabel(p)}).join(", ")+"]"}),g=i.map(I,function(h,p){return" "+(p+1)+". "+h}),l=`one of these possible Token sequences:
|
|
135
135
|
`+g.join(`
|
|
136
|
-
`);return f+l+b},buildEarlyExitMessage:function(o){var c=o.expectedIterationPaths,A=o.actual,a=o.customUserDescription;o.ruleName;var f="Expecting: ",u=
|
|
137
|
-
but found: '`+u+"'";if(a)return f+a+b;var d=
|
|
138
|
-
`+("<"+d.join(" ,")+">");return f+
|
|
139
|
-
inside top level rule: ->`+o.name+"<-";return A}},
|
|
136
|
+
`);return f+l+b},buildEarlyExitMessage:function(o){var c=o.expectedIterationPaths,A=o.actual,a=o.customUserDescription;o.ruleName;var f="Expecting: ",u=i.first(A).image,b=`
|
|
137
|
+
but found: '`+u+"'";if(a)return f+a+b;var d=i.map(c,function(g){return"["+i.map(g,function(l){return e.tokenLabel(l)}).join(",")+"]"}),I=`expecting at least one iteration which starts with one of these possible Token sequences::
|
|
138
|
+
`+("<"+d.join(" ,")+">");return f+I+b}},Object.freeze(r.defaultParserErrorProvider),r.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(o,c){var A="Invalid grammar, reference to a rule which is not defined: ->"+c.nonTerminalName+`<-
|
|
139
|
+
inside top level rule: ->`+o.name+"<-";return A}},r.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(o,c){function A(l){return l instanceof n.Terminal?l.terminalType.name:l instanceof n.NonTerminal?l.nonTerminalName:""}var a=o.name,f=i.first(c),u=f.idx,b=s.getProductionDslName(f),d=A(f),I=u>0,g="->"+b+(I?u:"")+"<- "+(d?"with argument: ->"+d+"<-":"")+`
|
|
140
140
|
appears more than once (`+c.length+" times) in the top level rule: ->"+a+`<-.
|
|
141
141
|
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
142
142
|
`;return g=g.replace(/[ \t]+/g," "),g=g.replace(/\s\s+/g,`
|
|
@@ -144,11 +144,11 @@ inside top level rule: ->`+o.name+"<-";return A}},n.defaultGrammarValidatorError
|
|
|
144
144
|
`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+o.name+`>.
|
|
145
145
|
`)+`To resolve this make sure each Terminal and Non-Terminal names are unique
|
|
146
146
|
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
|
147
|
-
and Non-Terminal names start with a lower case letter.`;return c},buildAlternationPrefixAmbiguityError:function(o){var c=
|
|
147
|
+
and Non-Terminal names start with a lower case letter.`;return c},buildAlternationPrefixAmbiguityError:function(o){var c=i.map(o.prefixPath,function(f){return e.tokenLabel(f)}).join(", "),A=o.alternation.idx===0?"":o.alternation.idx,a="Ambiguous alternatives: <"+o.ambiguityIndices.join(" ,")+`> due to common lookahead prefix
|
|
148
148
|
`+("in <OR"+A+"> inside <"+o.topLevelRule.name+`> Rule,
|
|
149
149
|
`)+("<"+c+`> may appears as a prefix path in all these alternatives.
|
|
150
150
|
`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
|
151
|
-
For Further details.`;return a},buildAlternationAmbiguityError:function(o){var c=
|
|
151
|
+
For Further details.`;return a},buildAlternationAmbiguityError:function(o){var c=i.map(o.prefixPath,function(f){return e.tokenLabel(f)}).join(", "),A=o.alternation.idx===0?"":o.alternation.idx,a="Ambiguous Alternatives Detected: <"+o.ambiguityIndices.join(" ,")+"> in <OR"+A+">"+(" inside <"+o.topLevelRule.name+`> Rule,
|
|
152
152
|
`)+("<"+c+`> may appears as a prefix path in all these alternatives.
|
|
153
153
|
`);return a=a+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
154
154
|
For Further details.`,a},buildEmptyRepetitionError:function(o){var c=s.getProductionDslName(o.repetition);o.repetition.idx!==0&&(c+=o.repetition.idx);var A="The repetition <"+c+"> within Rule <"+o.topLevelRule.name+`> can never consume any tokens.
|
|
@@ -160,33 +160,33 @@ This could lead to an infinite loop.`;return A},buildTokenNameError:function(o){
|
|
|
160
160
|
`)+(`without consuming any Tokens. The grammar path that causes this is:
|
|
161
161
|
`+a+`
|
|
162
162
|
`)+` To fix this refactor your grammar to remove the left recursion.
|
|
163
|
-
see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return f},buildInvalidRuleNameError:function(o){return"deprecated"},buildDuplicateRuleNameError:function(o){var c;o.topLevelRule instanceof i.Rule?c=o.topLevelRule.name:c=o.topLevelRule;var A="Duplicate definition, rule: ->"+c+"<- is already defined in the grammar: ->"+o.grammarName+"<-";return A}}}),vo=Ce(n=>{var e=n&&n.__extends||(function(){var c=function(A,a){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var b in u)Object.prototype.hasOwnProperty.call(u,b)&&(f[b]=u[b])},c(A,a)};return function(A,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");c(A,a);function f(){this.constructor=A}A.prototype=a===null?Object.create(a):(f.prototype=a.prototype,new f)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.GastRefResolverVisitor=n.resolveGrammar=void 0;var t=Je(),r=ke(),i=It();function s(c,A){var a=new o(c,A);return a.resolveRefs(),a.errors}n.resolveGrammar=s;var o=(function(c){e(A,c);function A(a,f){var u=c.call(this)||this;return u.nameToTopRule=a,u.errMsgProvider=f,u.errors=[],u}return A.prototype.resolveRefs=function(){var a=this;r.forEach(r.values(this.nameToTopRule),function(f){a.currTopLevel=f,f.accept(a)})},A.prototype.visitNonTerminal=function(a){var f=this.nameToTopRule[a.nonTerminalName];if(f)a.referencedRule=f;else{var u=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,a);this.errors.push({message:u,type:t.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:a.nonTerminalName})}},A})(i.GAstVisitor);n.GastRefResolverVisitor=o}),vt=Ce(n=>{var e=n&&n.__extends||(function(){var l=function(h,p){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,m){C.__proto__=m}||function(C,m){for(var y in m)Object.prototype.hasOwnProperty.call(m,y)&&(C[y]=m[y])},l(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");l(h,p);function C(){this.constructor=h}h.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.nextPossibleTokensAfter=n.possiblePathsFrom=n.NextTerminalAfterAtLeastOneSepWalker=n.NextTerminalAfterAtLeastOneWalker=n.NextTerminalAfterManySepWalker=n.NextTerminalAfterManyWalker=n.AbstractNextTerminalAfterProductionWalker=n.NextAfterTokenWalker=n.AbstractNextPossibleTokensWalker=void 0;var t=An(),r=ke(),i=Di(),s=ze(),o=(function(l){e(h,l);function h(p,C){var m=l.call(this)||this;return m.topProd=p,m.path=C,m.possibleTokTypes=[],m.nextProductionName="",m.nextProductionOccurrence=0,m.found=!1,m.isAtEndOfPath=!1,m}return h.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=r.cloneArr(this.path.ruleStack).reverse(),this.occurrenceStack=r.cloneArr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},h.prototype.walk=function(p,C){C===void 0&&(C=[]),this.found||l.prototype.walk.call(this,p,C)},h.prototype.walkProdRef=function(p,C,m){if(p.referencedRule.name===this.nextProductionName&&p.idx===this.nextProductionOccurrence){var y=C.concat(m);this.updateExpectedNext(),this.walk(p.referencedRule,y)}},h.prototype.updateExpectedNext=function(){r.isEmpty(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},h})(t.RestWalker);n.AbstractNextPossibleTokensWalker=o;var c=(function(l){e(h,l);function h(p,C){var m=l.call(this,p,C)||this;return m.path=C,m.nextTerminalName="",m.nextTerminalOccurrence=0,m.nextTerminalName=m.path.lastTok.name,m.nextTerminalOccurrence=m.path.lastTokOccurrence,m}return h.prototype.walkTerminal=function(p,C,m){if(this.isAtEndOfPath&&p.terminalType.name===this.nextTerminalName&&p.idx===this.nextTerminalOccurrence&&!this.found){var y=C.concat(m),v=new s.Alternative({definition:y});this.possibleTokTypes=i.first(v),this.found=!0}},h})(o);n.NextAfterTokenWalker=c;var A=(function(l){e(h,l);function h(p,C){var m=l.call(this)||this;return m.topRule=p,m.occurrence=C,m.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},m}return h.prototype.startWalking=function(){return this.walk(this.topRule),this.result},h})(t.RestWalker);n.AbstractNextTerminalAfterProductionWalker=A;var a=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkMany=function(p,C,m){if(p.idx===this.occurrence){var y=r.first(C.concat(m));this.result.isEndOfRule=y===void 0,y instanceof s.Terminal&&(this.result.token=y.terminalType,this.result.occurrence=y.idx)}else l.prototype.walkMany.call(this,p,C,m)},h})(A);n.NextTerminalAfterManyWalker=a;var f=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkManySep=function(p,C,m){if(p.idx===this.occurrence){var y=r.first(C.concat(m));this.result.isEndOfRule=y===void 0,y instanceof s.Terminal&&(this.result.token=y.terminalType,this.result.occurrence=y.idx)}else l.prototype.walkManySep.call(this,p,C,m)},h})(A);n.NextTerminalAfterManySepWalker=f;var u=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkAtLeastOne=function(p,C,m){if(p.idx===this.occurrence){var y=r.first(C.concat(m));this.result.isEndOfRule=y===void 0,y instanceof s.Terminal&&(this.result.token=y.terminalType,this.result.occurrence=y.idx)}else l.prototype.walkAtLeastOne.call(this,p,C,m)},h})(A);n.NextTerminalAfterAtLeastOneWalker=u;var b=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkAtLeastOneSep=function(p,C,m){if(p.idx===this.occurrence){var y=r.first(C.concat(m));this.result.isEndOfRule=y===void 0,y instanceof s.Terminal&&(this.result.token=y.terminalType,this.result.occurrence=y.idx)}else l.prototype.walkAtLeastOneSep.call(this,p,C,m)},h})(A);n.NextTerminalAfterAtLeastOneSepWalker=b;function d(l,h,p){p===void 0&&(p=[]),p=r.cloneArr(p);var C=[],m=0;function y(w){return w.concat(r.drop(l,m+1))}function v(w){var M=d(y(w),h,p);return C.concat(M)}for(;p.length<h&&m<l.length;){var S=l[m];if(S instanceof s.Alternative||S instanceof s.NonTerminal)return v(S.definition);if(S instanceof s.Option)C=v(S.definition);else if(S instanceof s.RepetitionMandatory){var U=S.definition.concat([new s.Repetition({definition:S.definition})]);return v(U)}else if(S instanceof s.RepetitionMandatoryWithSeparator){var U=[new s.Alternative({definition:S.definition}),new s.Repetition({definition:[new s.Terminal({terminalType:S.separator})].concat(S.definition)})];return v(U)}else if(S instanceof s.RepetitionWithSeparator){var U=S.definition.concat([new s.Repetition({definition:[new s.Terminal({terminalType:S.separator})].concat(S.definition)})]);C=v(U)}else if(S instanceof s.Repetition){var U=S.definition.concat([new s.Repetition({definition:S.definition})]);C=v(U)}else{if(S instanceof s.Alternation)return r.forEach(S.definition,function(w){r.isEmpty(w.definition)===!1&&(C=v(w.definition))}),C;if(S instanceof s.Terminal)p.push(S.terminalType);else throw Error("non exhaustive match")}m++}return C.push({partialPath:p,suffixDef:r.drop(l,m)}),C}n.possiblePathsFrom=d;function E(l,h,p,C){var m="EXIT_NONE_TERMINAL",y=[m],v="EXIT_ALTERNATIVE",S=!1,U=h.length,w=U-C-1,M=[],_=[];for(_.push({idx:-1,def:l,ruleStack:[],occurrenceStack:[]});!r.isEmpty(_);){var k=_.pop();if(k===v){S&&r.last(_).idx<=w&&_.pop();continue}var D=k.def,L=k.idx,V=k.ruleStack,W=k.occurrenceStack;if(!r.isEmpty(D)){var j=D[0];if(j===m){var J={idx:L,def:r.drop(D),ruleStack:r.dropRight(V),occurrenceStack:r.dropRight(W)};_.push(J)}else if(j instanceof s.Terminal)if(L<U-1){var Z=L+1,Ae=h[Z];if(p(Ae,j.terminalType)){var J={idx:Z,def:r.drop(D),ruleStack:V,occurrenceStack:W};_.push(J)}}else if(L===U-1)M.push({nextTokenType:j.terminalType,nextTokenOccurrence:j.idx,ruleStack:V,occurrenceStack:W}),S=!0;else throw Error("non exhaustive match");else if(j instanceof s.NonTerminal){var ie=r.cloneArr(V);ie.push(j.nonTerminalName);var re=r.cloneArr(W);re.push(j.idx);var J={idx:L,def:j.definition.concat(y,r.drop(D)),ruleStack:ie,occurrenceStack:re};_.push(J)}else if(j instanceof s.Option){var ee={idx:L,def:r.drop(D),ruleStack:V,occurrenceStack:W};_.push(ee),_.push(v);var le={idx:L,def:j.definition.concat(r.drop(D)),ruleStack:V,occurrenceStack:W};_.push(le)}else if(j instanceof s.RepetitionMandatory){var P=new s.Repetition({definition:j.definition,idx:j.idx}),H=j.definition.concat([P],r.drop(D)),J={idx:L,def:H,ruleStack:V,occurrenceStack:W};_.push(J)}else if(j instanceof s.RepetitionMandatoryWithSeparator){var z=new s.Terminal({terminalType:j.separator}),P=new s.Repetition({definition:[z].concat(j.definition),idx:j.idx}),H=j.definition.concat([P],r.drop(D)),J={idx:L,def:H,ruleStack:V,occurrenceStack:W};_.push(J)}else if(j instanceof s.RepetitionWithSeparator){var ee={idx:L,def:r.drop(D),ruleStack:V,occurrenceStack:W};_.push(ee),_.push(v);var z=new s.Terminal({terminalType:j.separator}),X=new s.Repetition({definition:[z].concat(j.definition),idx:j.idx}),H=j.definition.concat([X],r.drop(D)),le={idx:L,def:H,ruleStack:V,occurrenceStack:W};_.push(le)}else if(j instanceof s.Repetition){var ee={idx:L,def:r.drop(D),ruleStack:V,occurrenceStack:W};_.push(ee),_.push(v);var X=new s.Repetition({definition:j.definition,idx:j.idx}),H=j.definition.concat([X],r.drop(D)),le={idx:L,def:H,ruleStack:V,occurrenceStack:W};_.push(le)}else if(j instanceof s.Alternation)for(var te=j.definition.length-1;te>=0;te--){var ae=j.definition[te],me={idx:L,def:ae.definition.concat(r.drop(D)),ruleStack:V,occurrenceStack:W};_.push(me),_.push(v)}else if(j instanceof s.Alternative)_.push({idx:L,def:j.definition.concat(r.drop(D)),ruleStack:V,occurrenceStack:W});else if(j instanceof s.Rule)_.push(g(j,L,V,W));else throw Error("non exhaustive match")}}return M}n.nextPossibleTokensAfter=E;function g(l,h,p,C){var m=r.cloneArr(p);m.push(l.name);var y=r.cloneArr(C);return y.push(1),{idx:h,def:l.definition,ruleStack:m,occurrenceStack:y}}}),kt=Ce(n=>{var e=n&&n.__extends||(function(){var w=function(M,_){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,D){k.__proto__=D}||function(k,D){for(var L in D)Object.prototype.hasOwnProperty.call(D,L)&&(k[L]=D[L])},w(M,_)};return function(M,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");w(M,_);function k(){this.constructor=M}M.prototype=_===null?Object.create(_):(k.prototype=_.prototype,new k)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.areTokenCategoriesNotUsed=n.isStrictPrefixOfPath=n.containsPath=n.getLookaheadPathsForOptionalProd=n.getLookaheadPathsForOr=n.lookAheadSequenceFromAlternatives=n.buildSingleAlternativeLookaheadFunction=n.buildAlternativesLookAheadFunc=n.buildLookaheadFuncForOptionalProd=n.buildLookaheadFuncForOr=n.getProdType=n.PROD_TYPE=void 0;var t=ke(),r=vt(),i=An(),s=Et(),o=ze(),c=It(),A;(function(w){w[w.OPTION=0]="OPTION",w[w.REPETITION=1]="REPETITION",w[w.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",w[w.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",w[w.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",w[w.ALTERNATION=5]="ALTERNATION"})(A=n.PROD_TYPE||(n.PROD_TYPE={}));function a(w){if(w instanceof o.Option)return A.OPTION;if(w instanceof o.Repetition)return A.REPETITION;if(w instanceof o.RepetitionMandatory)return A.REPETITION_MANDATORY;if(w instanceof o.RepetitionMandatoryWithSeparator)return A.REPETITION_MANDATORY_WITH_SEPARATOR;if(w instanceof o.RepetitionWithSeparator)return A.REPETITION_WITH_SEPARATOR;if(w instanceof o.Alternation)return A.ALTERNATION;throw Error("non exhaustive match")}n.getProdType=a;function f(w,M,_,k,D,L){var V=m(w,M,_),W=U(V)?s.tokenStructuredMatcherNoCategories:s.tokenStructuredMatcher;return L(V,k,W,D)}n.buildLookaheadFuncForOr=f;function u(w,M,_,k,D,L){var V=y(w,M,D,_),W=U(V)?s.tokenStructuredMatcherNoCategories:s.tokenStructuredMatcher;return L(V[0],W,k)}n.buildLookaheadFuncForOptionalProd=u;function b(w,M,_,k){var D=w.length,L=t.every(w,function(j){return t.every(j,function(J){return J.length===1})});if(M)return function(j){for(var J=t.map(j,function(X){return X.GATE}),Z=0;Z<D;Z++){var Ae=w[Z],ie=Ae.length,re=J[Z];if(!(re!==void 0&&re.call(this)===!1))e:for(var ee=0;ee<ie;ee++){for(var le=Ae[ee],P=le.length,H=0;H<P;H++){var z=this.LA(H+1);if(_(z,le[H])===!1)continue e}return Z}}};if(L&&!k){var V=t.map(w,function(j){return t.flatten(j)}),W=t.reduce(V,function(j,J,Z){return t.forEach(J,function(Ae){t.has(j,Ae.tokenTypeIdx)||(j[Ae.tokenTypeIdx]=Z),t.forEach(Ae.categoryMatches,function(ie){t.has(j,ie)||(j[ie]=Z)})}),j},[]);return function(){var j=this.LA(1);return W[j.tokenTypeIdx]}}else return function(){for(var j=0;j<D;j++){var J=w[j],Z=J.length;e:for(var Ae=0;Ae<Z;Ae++){for(var ie=J[Ae],re=ie.length,ee=0;ee<re;ee++){var le=this.LA(ee+1);if(_(le,ie[ee])===!1)continue e}return j}}}}n.buildAlternativesLookAheadFunc=b;function d(w,M,_){var k=t.every(w,function(J){return J.length===1}),D=w.length;if(k&&!_){var L=t.flatten(w);if(L.length===1&&t.isEmpty(L[0].categoryMatches)){var V=L[0],W=V.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===W}}else{var j=t.reduce(L,function(J,Z,Ae){return J[Z.tokenTypeIdx]=!0,t.forEach(Z.categoryMatches,function(ie){J[ie]=!0}),J},[]);return function(){var J=this.LA(1);return j[J.tokenTypeIdx]===!0}}}else return function(){e:for(var J=0;J<D;J++){for(var Z=w[J],Ae=Z.length,ie=0;ie<Ae;ie++){var re=this.LA(ie+1);if(M(re,Z[ie])===!1)continue e}return!0}return!1}}n.buildSingleAlternativeLookaheadFunction=d;var E=(function(w){e(M,w);function M(_,k,D){var L=w.call(this)||this;return L.topProd=_,L.targetOccurrence=k,L.targetProdType=D,L}return M.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},M.prototype.checkIsTarget=function(_,k,D,L){return _.idx===this.targetOccurrence&&this.targetProdType===k?(this.restDef=D.concat(L),!0):!1},M.prototype.walkOption=function(_,k,D){this.checkIsTarget(_,A.OPTION,k,D)||w.prototype.walkOption.call(this,_,k,D)},M.prototype.walkAtLeastOne=function(_,k,D){this.checkIsTarget(_,A.REPETITION_MANDATORY,k,D)||w.prototype.walkOption.call(this,_,k,D)},M.prototype.walkAtLeastOneSep=function(_,k,D){this.checkIsTarget(_,A.REPETITION_MANDATORY_WITH_SEPARATOR,k,D)||w.prototype.walkOption.call(this,_,k,D)},M.prototype.walkMany=function(_,k,D){this.checkIsTarget(_,A.REPETITION,k,D)||w.prototype.walkOption.call(this,_,k,D)},M.prototype.walkManySep=function(_,k,D){this.checkIsTarget(_,A.REPETITION_WITH_SEPARATOR,k,D)||w.prototype.walkOption.call(this,_,k,D)},M})(i.RestWalker),g=(function(w){e(M,w);function M(_,k,D){var L=w.call(this)||this;return L.targetOccurrence=_,L.targetProdType=k,L.targetRef=D,L.result=[],L}return M.prototype.checkIsTarget=function(_,k){_.idx===this.targetOccurrence&&this.targetProdType===k&&(this.targetRef===void 0||_===this.targetRef)&&(this.result=_.definition)},M.prototype.visitOption=function(_){this.checkIsTarget(_,A.OPTION)},M.prototype.visitRepetition=function(_){this.checkIsTarget(_,A.REPETITION)},M.prototype.visitRepetitionMandatory=function(_){this.checkIsTarget(_,A.REPETITION_MANDATORY)},M.prototype.visitRepetitionMandatoryWithSeparator=function(_){this.checkIsTarget(_,A.REPETITION_MANDATORY_WITH_SEPARATOR)},M.prototype.visitRepetitionWithSeparator=function(_){this.checkIsTarget(_,A.REPETITION_WITH_SEPARATOR)},M.prototype.visitAlternation=function(_){this.checkIsTarget(_,A.ALTERNATION)},M})(c.GAstVisitor);function l(w){for(var M=new Array(w),_=0;_<w;_++)M[_]=[];return M}function h(w){for(var M=[""],_=0;_<w.length;_++){for(var k=w[_],D=[],L=0;L<M.length;L++){var V=M[L];D.push(V+"_"+k.tokenTypeIdx);for(var W=0;W<k.categoryMatches.length;W++){var j="_"+k.categoryMatches[W];D.push(V+j)}}M=D}return M}function p(w,M,_){for(var k=0;k<w.length;k++)if(k!==_)for(var D=w[k],L=0;L<M.length;L++){var V=M[L];if(D[V]===!0)return!1}return!0}function C(w,M){for(var _=t.map(w,function(Z){return r.possiblePathsFrom([Z],1)}),k=l(_.length),D=t.map(_,function(Z){var Ae={};return t.forEach(Z,function(ie){var re=h(ie.partialPath);t.forEach(re,function(ee){Ae[ee]=!0})}),Ae}),L=_,V=1;V<=M;V++){var W=L;L=l(W.length);for(var j=function(Z){for(var Ae=W[Z],ie=0;ie<Ae.length;ie++){var re=Ae[ie].partialPath,ee=Ae[ie].suffixDef,le=h(re),P=p(D,le,Z);if(P||t.isEmpty(ee)||re.length===M){var H=k[Z];if(v(H,re)===!1){H.push(re);for(var z=0;z<le.length;z++){var X=le[z];D[Z][X]=!0}}}else{var te=r.possiblePathsFrom(ee,V+1,re);L[Z]=L[Z].concat(te),t.forEach(te,function(ae){var me=h(ae.partialPath);t.forEach(me,function(ge){D[Z][ge]=!0})})}}},J=0;J<W.length;J++)j(J)}return k}n.lookAheadSequenceFromAlternatives=C;function m(w,M,_,k){var D=new g(w,A.ALTERNATION,k);return M.accept(D),C(D.result,_)}n.getLookaheadPathsForOr=m;function y(w,M,_,k){var D=new g(w,_);M.accept(D);var L=D.result,V=new E(M,w,_),W=V.startWalking(),j=new o.Alternative({definition:L}),J=new o.Alternative({definition:W});return C([j,J],k)}n.getLookaheadPathsForOptionalProd=y;function v(w,M){e:for(var _=0;_<w.length;_++){var k=w[_];if(k.length===M.length){for(var D=0;D<k.length;D++){var L=M[D],V=k[D],W=L===V||V.categoryMatchesMap[L.tokenTypeIdx]!==void 0;if(W===!1)continue e}return!0}}return!1}n.containsPath=v;function S(w,M){return w.length<M.length&&t.every(w,function(_,k){var D=M[k];return _===D||D.categoryMatchesMap[_.tokenTypeIdx]})}n.isStrictPrefixOfPath=S;function U(w){return t.every(w,function(M){return t.every(M,function(_){return t.every(_,function(k){return t.isEmpty(k.categoryMatches)})})})}n.areTokenCategoriesNotUsed=U}),Fi=Ce(n=>{var e=n&&n.__extends||(function(){var k=function(D,L){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,W){V.__proto__=W}||function(V,W){for(var j in W)Object.prototype.hasOwnProperty.call(W,j)&&(V[j]=W[j])},k(D,L)};return function(D,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");k(D,L);function V(){this.constructor=D}D.prototype=L===null?Object.create(L):(V.prototype=L.prototype,new V)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.checkPrefixAlternativesAmbiguities=n.validateSomeNonEmptyLookaheadPath=n.validateTooManyAlts=n.RepetionCollector=n.validateAmbiguousAlternationAlternatives=n.validateEmptyOrAlternative=n.getFirstNoneTerminal=n.validateNoLeftRecursion=n.validateRuleIsOverridden=n.validateRuleDoesNotAlreadyExist=n.OccurrenceValidationCollector=n.identifyProductionForDuplicates=n.validateGrammar=void 0;var t=ke(),r=ke(),i=Je(),s=Qt(),o=kt(),c=vt(),A=ze(),a=It();function f(k,D,L,V,W){var j=t.map(k,function(P){return u(P,V)}),J=t.map(k,function(P){return h(P,P,V)}),Z=[],Ae=[],ie=[];r.every(J,r.isEmpty)&&(Z=r.map(k,function(P){return m(P,V)}),Ae=r.map(k,function(P){return y(P,D,V)}),ie=U(k,D,V));var re=_(k,L,V),ee=r.map(k,function(P){return S(P,V)}),le=r.map(k,function(P){return g(P,k,W,V)});return t.flatten(j.concat(ie,J,Z,Ae,re,ee,le))}n.validateGrammar=f;function u(k,D){var L=new E;k.accept(L);var V=L.allProductions,W=t.groupBy(V,b),j=t.pick(W,function(Z){return Z.length>1}),J=t.map(t.values(j),function(Z){var Ae=t.first(Z),ie=D.buildDuplicateFoundError(k,Z),re=s.getProductionDslName(Ae),ee={message:ie,type:i.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:k.name,dslName:re,occurrence:Ae.idx},le=d(Ae);return le&&(ee.parameter=le),ee});return J}function b(k){return s.getProductionDslName(k)+"_#_"+k.idx+"_#_"+d(k)}n.identifyProductionForDuplicates=b;function d(k){return k instanceof A.Terminal?k.terminalType.name:k instanceof A.NonTerminal?k.nonTerminalName:""}var E=(function(k){e(D,k);function D(){var L=k!==null&&k.apply(this,arguments)||this;return L.allProductions=[],L}return D.prototype.visitNonTerminal=function(L){this.allProductions.push(L)},D.prototype.visitOption=function(L){this.allProductions.push(L)},D.prototype.visitRepetitionWithSeparator=function(L){this.allProductions.push(L)},D.prototype.visitRepetitionMandatory=function(L){this.allProductions.push(L)},D.prototype.visitRepetitionMandatoryWithSeparator=function(L){this.allProductions.push(L)},D.prototype.visitRepetition=function(L){this.allProductions.push(L)},D.prototype.visitAlternation=function(L){this.allProductions.push(L)},D.prototype.visitTerminal=function(L){this.allProductions.push(L)},D})(a.GAstVisitor);n.OccurrenceValidationCollector=E;function g(k,D,L,V){var W=[],j=r.reduce(D,function(Z,Ae){return Ae.name===k.name?Z+1:Z},0);if(j>1){var J=V.buildDuplicateRuleNameError({topLevelRule:k,grammarName:L});W.push({message:J,type:i.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:k.name})}return W}n.validateRuleDoesNotAlreadyExist=g;function l(k,D,L){var V=[],W;return t.contains(D,k)||(W="Invalid rule override, rule: ->"+k+"<- cannot be overridden in the grammar: ->"+L+"<-as it is not defined in any of the super grammars ",V.push({message:W,type:i.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:k})),V}n.validateRuleIsOverridden=l;function h(k,D,L,V){V===void 0&&(V=[]);var W=[],j=p(D.definition);if(t.isEmpty(j))return[];var J=k.name,Z=t.contains(j,k);Z&&W.push({message:L.buildLeftRecursionError({topLevelRule:k,leftRecursionPath:V}),type:i.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:J});var Ae=t.difference(j,V.concat([k])),ie=t.map(Ae,function(re){var ee=t.cloneArr(V);return ee.push(re),h(k,re,L,ee)});return W.concat(t.flatten(ie))}n.validateNoLeftRecursion=h;function p(k){var D=[];if(t.isEmpty(k))return D;var L=t.first(k);if(L instanceof A.NonTerminal)D.push(L.referencedRule);else if(L instanceof A.Alternative||L instanceof A.Option||L instanceof A.RepetitionMandatory||L instanceof A.RepetitionMandatoryWithSeparator||L instanceof A.RepetitionWithSeparator||L instanceof A.Repetition)D=D.concat(p(L.definition));else if(L instanceof A.Alternation)D=t.flatten(t.map(L.definition,function(J){return p(J.definition)}));else if(!(L instanceof A.Terminal))throw Error("non exhaustive match");var V=s.isOptionalProd(L),W=k.length>1;if(V&&W){var j=t.drop(k);return D.concat(p(j))}else return D}n.getFirstNoneTerminal=p;var C=(function(k){e(D,k);function D(){var L=k!==null&&k.apply(this,arguments)||this;return L.alternations=[],L}return D.prototype.visitAlternation=function(L){this.alternations.push(L)},D})(a.GAstVisitor);function m(k,D){var L=new C;k.accept(L);var V=L.alternations,W=t.reduce(V,function(j,J){var Z=t.dropRight(J.definition),Ae=t.map(Z,function(ie,re){var ee=c.nextPossibleTokensAfter([ie],[],null,1);return t.isEmpty(ee)?{message:D.buildEmptyAlternationError({topLevelRule:k,alternation:J,emptyChoiceIdx:re}),type:i.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:k.name,occurrence:J.idx,alternative:re+1}:null});return j.concat(t.compact(Ae))},[]);return W}n.validateEmptyOrAlternative=m;function y(k,D,L){var V=new C;k.accept(V);var W=V.alternations;W=r.reject(W,function(J){return J.ignoreAmbiguities===!0});var j=t.reduce(W,function(J,Z){var Ae=Z.idx,ie=Z.maxLookahead||D,re=o.getLookaheadPathsForOr(Ae,k,ie,Z),ee=w(re,Z,k,L),le=M(re,Z,k,L);return J.concat(ee,le)},[]);return j}n.validateAmbiguousAlternationAlternatives=y;var v=(function(k){e(D,k);function D(){var L=k!==null&&k.apply(this,arguments)||this;return L.allProductions=[],L}return D.prototype.visitRepetitionWithSeparator=function(L){this.allProductions.push(L)},D.prototype.visitRepetitionMandatory=function(L){this.allProductions.push(L)},D.prototype.visitRepetitionMandatoryWithSeparator=function(L){this.allProductions.push(L)},D.prototype.visitRepetition=function(L){this.allProductions.push(L)},D})(a.GAstVisitor);n.RepetionCollector=v;function S(k,D){var L=new C;k.accept(L);var V=L.alternations,W=t.reduce(V,function(j,J){return J.definition.length>255&&j.push({message:D.buildTooManyAlternativesError({topLevelRule:k,alternation:J}),type:i.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:k.name,occurrence:J.idx}),j},[]);return W}n.validateTooManyAlts=S;function U(k,D,L){var V=[];return r.forEach(k,function(W){var j=new v;W.accept(j);var J=j.allProductions;r.forEach(J,function(Z){var Ae=o.getProdType(Z),ie=Z.maxLookahead||D,re=Z.idx,ee=o.getLookaheadPathsForOptionalProd(re,W,Ae,ie),le=ee[0];if(r.isEmpty(r.flatten(le))){var P=L.buildEmptyRepetitionError({topLevelRule:W,repetition:Z});V.push({message:P,type:i.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:W.name})}})}),V}n.validateSomeNonEmptyLookaheadPath=U;function w(k,D,L,V){var W=[],j=r.reduce(k,function(Z,Ae,ie){return D.definition[ie].ignoreAmbiguities===!0||r.forEach(Ae,function(re){var ee=[ie];r.forEach(k,function(le,P){ie!==P&&o.containsPath(le,re)&&D.definition[P].ignoreAmbiguities!==!0&&ee.push(P)}),ee.length>1&&!o.containsPath(W,re)&&(W.push(re),Z.push({alts:ee,path:re}))}),Z},[]),J=t.map(j,function(Z){var Ae=r.map(Z.alts,function(re){return re+1}),ie=V.buildAlternationAmbiguityError({topLevelRule:L,alternation:D,ambiguityIndices:Ae,prefixPath:Z.path});return{message:ie,type:i.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:L.name,occurrence:D.idx,alternatives:[Z.alts]}});return J}function M(k,D,L,V){var W=[],j=r.reduce(k,function(J,Z,Ae){var ie=r.map(Z,function(re){return{idx:Ae,path:re}});return J.concat(ie)},[]);return r.forEach(j,function(J){var Z=D.definition[J.idx];if(Z.ignoreAmbiguities!==!0){var Ae=J.idx,ie=J.path,re=r.findAll(j,function(le){return D.definition[le.idx].ignoreAmbiguities!==!0&&le.idx<Ae&&o.isStrictPrefixOfPath(le.path,ie)}),ee=r.map(re,function(le){var P=[le.idx+1,Ae+1],H=D.idx===0?"":D.idx,z=V.buildAlternationPrefixAmbiguityError({topLevelRule:L,alternation:D,ambiguityIndices:P,prefixPath:le.path});return{message:z,type:i.ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,ruleName:L.name,occurrence:H,alternatives:P}});W=W.concat(ee)}}),W}n.checkPrefixAlternativesAmbiguities=M;function _(k,D,L){var V=[],W=r.map(D,function(j){return j.name});return r.forEach(k,function(j){var J=j.name;if(r.contains(W,J)){var Z=L.buildNamespaceConflictError(j);V.push({message:Z,type:i.ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:J})}}),V}}),ko=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.validateGrammar=n.resolveGrammar=void 0;var e=ke(),t=vo(),r=Fi(),i=wt();function s(c){c=e.defaults(c,{errMsgProvider:i.defaultGrammarResolverErrorProvider});var A={};return e.forEach(c.rules,function(a){A[a.name]=a}),t.resolveGrammar(A,c.errMsgProvider)}n.resolveGrammar=s;function o(c){return c=e.defaults(c,{errMsgProvider:i.defaultGrammarValidatorErrorProvider}),r.validateGrammar(c.rules,c.maxLookahead,c.tokenTypes,c.errMsgProvider,c.grammarName)}n.validateGrammar=o}),mt=Ce(n=>{var e=n&&n.__extends||(function(){var E=function(g,l){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var C in p)Object.prototype.hasOwnProperty.call(p,C)&&(h[C]=p[C])},E(g,l)};return function(g,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");E(g,l);function h(){this.constructor=g}g.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}})();Object.defineProperty(n,"__esModule",{value:!0}),n.EarlyExitException=n.NotAllInputParsedException=n.NoViableAltException=n.MismatchedTokenException=n.isRecognitionException=void 0;var t=ke(),r="MismatchedTokenException",i="NoViableAltException",s="EarlyExitException",o="NotAllInputParsedException",c=[r,i,s,o];Object.freeze(c);function A(E){return t.contains(c,E.name)}n.isRecognitionException=A;var a=(function(E){e(g,E);function g(l,h){var p=this.constructor,C=E.call(this,l)||this;return C.token=h,C.resyncedTokens=[],Object.setPrototypeOf(C,p.prototype),Error.captureStackTrace&&Error.captureStackTrace(C,C.constructor),C}return g})(Error),f=(function(E){e(g,E);function g(l,h,p){var C=E.call(this,l,h)||this;return C.previousToken=p,C.name=r,C}return g})(a);n.MismatchedTokenException=f;var u=(function(E){e(g,E);function g(l,h,p){var C=E.call(this,l,h)||this;return C.previousToken=p,C.name=i,C}return g})(a);n.NoViableAltException=u;var b=(function(E){e(g,E);function g(l,h){var p=E.call(this,l,h)||this;return p.name=o,p}return g})(a);n.NotAllInputParsedException=b;var d=(function(E){e(g,E);function g(l,h,p){var C=E.call(this,l,h)||this;return C.previousToken=p,C.name=s,C}return g})(a);n.EarlyExitException=d}),Mi=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.attemptInRepetitionRecovery=n.Recoverable=n.InRuleRecoveryException=n.IN_RULE_RECOVERY_EXCEPTION=n.EOF_FOLLOW_KEY=void 0;var e=st(),t=ke(),r=mt(),i=Oi(),s=Je();n.EOF_FOLLOW_KEY={},n.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function o(a){this.name=n.IN_RULE_RECOVERY_EXCEPTION,this.message=a}n.InRuleRecoveryException=o,o.prototype=Error.prototype;var c=(function(){function a(){}return a.prototype.initRecoverable=function(f){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=t.has(f,"recoveryEnabled")?f.recoveryEnabled:s.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=A)},a.prototype.getTokenToInsert=function(f){var u=e.createTokenInstance(f,"",NaN,NaN,NaN,NaN,NaN,NaN);return u.isInsertedInRecovery=!0,u},a.prototype.canTokenTypeBeInsertedInRecovery=function(f){return!0},a.prototype.tryInRepetitionRecovery=function(f,u,b,d){for(var E=this,g=this.findReSyncTokenType(),l=this.exportLexerState(),h=[],p=!1,C=this.LA(1),m=this.LA(1),y=function(){var v=E.LA(0),S=E.errorMessageProvider.buildMismatchTokenMessage({expected:d,actual:C,previous:v,ruleName:E.getCurrRuleFullName()}),U=new r.MismatchedTokenException(S,C,E.LA(0));U.resyncedTokens=t.dropRight(h),E.SAVE_ERROR(U)};!p;)if(this.tokenMatcher(m,d)){y();return}else if(b.call(this)){y(),f.apply(this,u);return}else this.tokenMatcher(m,g)?p=!0:(m=this.SKIP_TOKEN(),this.addToResyncTokens(m,h));this.importLexerState(l)},a.prototype.shouldInRepetitionRecoveryBeTried=function(f,u,b){return!(b===!1||f===void 0||u===void 0||this.tokenMatcher(this.LA(1),f)||this.isBackTracking()||this.canPerformInRuleRecovery(f,this.getFollowsForInRuleRecovery(f,u)))},a.prototype.getFollowsForInRuleRecovery=function(f,u){var b=this.getCurrentGrammarPath(f,u),d=this.getNextPossibleTokenTypes(b);return d},a.prototype.tryInRuleRecovery=function(f,u){if(this.canRecoverWithSingleTokenInsertion(f,u)){var b=this.getTokenToInsert(f);return b}if(this.canRecoverWithSingleTokenDeletion(f)){var d=this.SKIP_TOKEN();return this.consumeToken(),d}throw new o("sad sad panda")},a.prototype.canPerformInRuleRecovery=function(f,u){return this.canRecoverWithSingleTokenInsertion(f,u)||this.canRecoverWithSingleTokenDeletion(f)},a.prototype.canRecoverWithSingleTokenInsertion=function(f,u){var b=this;if(!this.canTokenTypeBeInsertedInRecovery(f)||t.isEmpty(u))return!1;var d=this.LA(1),E=t.find(u,function(g){return b.tokenMatcher(d,g)})!==void 0;return E},a.prototype.canRecoverWithSingleTokenDeletion=function(f){var u=this.tokenMatcher(this.LA(2),f);return u},a.prototype.isInCurrentRuleReSyncSet=function(f){var u=this.getCurrFollowKey(),b=this.getFollowSetFromFollowKey(u);return t.contains(b,f)},a.prototype.findReSyncTokenType=function(){for(var f=this.flattenFollowSet(),u=this.LA(1),b=2;;){var d=u.tokenType;if(t.contains(f,d))return d;u=this.LA(b),b++}},a.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return n.EOF_FOLLOW_KEY;var f=this.getLastExplicitRuleShortName(),u=this.getLastExplicitRuleOccurrenceIndex(),b=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(f),idxInCallingRule:u,inRule:this.shortRuleNameToFullName(b)}},a.prototype.buildFullFollowKeyStack=function(){var f=this,u=this.RULE_STACK,b=this.RULE_OCCURRENCE_STACK;return t.map(u,function(d,E){return E===0?n.EOF_FOLLOW_KEY:{ruleName:f.shortRuleNameToFullName(d),idxInCallingRule:b[E],inRule:f.shortRuleNameToFullName(u[E-1])}})},a.prototype.flattenFollowSet=function(){var f=this,u=t.map(this.buildFullFollowKeyStack(),function(b){return f.getFollowSetFromFollowKey(b)});return t.flatten(u)},a.prototype.getFollowSetFromFollowKey=function(f){if(f===n.EOF_FOLLOW_KEY)return[e.EOF];var u=f.ruleName+f.idxInCallingRule+i.IN+f.inRule;return this.resyncFollows[u]},a.prototype.addToResyncTokens=function(f,u){return this.tokenMatcher(f,e.EOF)||u.push(f),u},a.prototype.reSyncTo=function(f){for(var u=[],b=this.LA(1);this.tokenMatcher(b,f)===!1;)b=this.SKIP_TOKEN(),this.addToResyncTokens(b,u);return t.dropRight(u)},a.prototype.attemptInRepetitionRecovery=function(f,u,b,d,E,g,l){},a.prototype.getCurrentGrammarPath=function(f,u){var b=this.getHumanReadableRuleStack(),d=t.cloneArr(this.RULE_OCCURRENCE_STACK),E={ruleStack:b,occurrenceStack:d,lastTok:f,lastTokOccurrence:u};return E},a.prototype.getHumanReadableRuleStack=function(){var f=this;return t.map(this.RULE_STACK,function(u){return f.shortRuleNameToFullName(u)})},a})();n.Recoverable=c;function A(a,f,u,b,d,E,g){var l=this.getKeyForAutomaticLookahead(b,d),h=this.firstAfterRepMap[l];if(h===void 0){var p=this.getCurrRuleFullName(),C=this.getGAstProductions()[p],m=new E(C,d);h=m.startWalking(),this.firstAfterRepMap[l]=h}var y=h.token,v=h.occurrence,S=h.isEndOfRule;this.RULE_STACK.length===1&&S&&y===void 0&&(y=e.EOF,v=1),this.shouldInRepetitionRecoveryBeTried(y,v,g)&&this.tryInRepetitionRecovery(a,f,u,y)}n.attemptInRepetitionRecovery=A}),cn=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getKeyForAutomaticLookahead=n.AT_LEAST_ONE_SEP_IDX=n.MANY_SEP_IDX=n.AT_LEAST_ONE_IDX=n.MANY_IDX=n.OPTION_IDX=n.OR_IDX=n.BITS_FOR_ALT_IDX=n.BITS_FOR_RULE_IDX=n.BITS_FOR_OCCURRENCE_IDX=n.BITS_FOR_METHOD_TYPE=void 0,n.BITS_FOR_METHOD_TYPE=4,n.BITS_FOR_OCCURRENCE_IDX=8,n.BITS_FOR_RULE_IDX=12,n.BITS_FOR_ALT_IDX=8,n.OR_IDX=1<<n.BITS_FOR_OCCURRENCE_IDX,n.OPTION_IDX=2<<n.BITS_FOR_OCCURRENCE_IDX,n.MANY_IDX=3<<n.BITS_FOR_OCCURRENCE_IDX,n.AT_LEAST_ONE_IDX=4<<n.BITS_FOR_OCCURRENCE_IDX,n.MANY_SEP_IDX=5<<n.BITS_FOR_OCCURRENCE_IDX,n.AT_LEAST_ONE_SEP_IDX=6<<n.BITS_FOR_OCCURRENCE_IDX;function e(t,r,i){return i|r|t}n.getKeyForAutomaticLookahead=e,32-n.BITS_FOR_ALT_IDX}),So=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LooksAhead=void 0;var e=kt(),t=ke(),r=Je(),i=cn(),s=Qt(),o=(function(){function c(){}return c.prototype.initLooksAhead=function(A){this.dynamicTokensEnabled=t.has(A,"dynamicTokensEnabled")?A.dynamicTokensEnabled:r.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=t.has(A,"maxLookahead")?A.maxLookahead:r.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=t.isES2015MapSupported()?new Map:[],t.isES2015MapSupported()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},c.prototype.preComputeLookaheadFunctions=function(A){var a=this;t.forEach(A,function(f){a.TRACE_INIT(f.name+" Rule Lookahead",function(){var u=s.collectMethods(f),b=u.alternation,d=u.repetition,E=u.option,g=u.repetitionMandatory,l=u.repetitionMandatoryWithSeparator,h=u.repetitionWithSeparator;t.forEach(b,function(p){var C=p.idx===0?"":p.idx;a.TRACE_INIT(""+s.getProductionDslName(p)+C,function(){var m=e.buildLookaheadFuncForOr(p.idx,f,p.maxLookahead||a.maxLookahead,p.hasPredicates,a.dynamicTokensEnabled,a.lookAheadBuilderForAlternatives),y=i.getKeyForAutomaticLookahead(a.fullRuleNameToShort[f.name],i.OR_IDX,p.idx);a.setLaFuncCache(y,m)})}),t.forEach(d,function(p){a.computeLookaheadFunc(f,p.idx,i.MANY_IDX,e.PROD_TYPE.REPETITION,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(E,function(p){a.computeLookaheadFunc(f,p.idx,i.OPTION_IDX,e.PROD_TYPE.OPTION,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(g,function(p){a.computeLookaheadFunc(f,p.idx,i.AT_LEAST_ONE_IDX,e.PROD_TYPE.REPETITION_MANDATORY,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(l,function(p){a.computeLookaheadFunc(f,p.idx,i.AT_LEAST_ONE_SEP_IDX,e.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(h,function(p){a.computeLookaheadFunc(f,p.idx,i.MANY_SEP_IDX,e.PROD_TYPE.REPETITION_WITH_SEPARATOR,p.maxLookahead,s.getProductionDslName(p))})})})},c.prototype.computeLookaheadFunc=function(A,a,f,u,b,d){var E=this;this.TRACE_INIT(""+d+(a===0?"":a),function(){var g=e.buildLookaheadFuncForOptionalProd(a,A,b||E.maxLookahead,E.dynamicTokensEnabled,u,E.lookAheadBuilderForOptional),l=i.getKeyForAutomaticLookahead(E.fullRuleNameToShort[A.name],f,a);E.setLaFuncCache(l,g)})},c.prototype.lookAheadBuilderForOptional=function(A,a,f){return e.buildSingleAlternativeLookaheadFunction(A,a,f)},c.prototype.lookAheadBuilderForAlternatives=function(A,a,f,u){return e.buildAlternativesLookAheadFunc(A,a,f,u)},c.prototype.getKeyForAutomaticLookahead=function(A,a){var f=this.getLastExplicitRuleShortName();return i.getKeyForAutomaticLookahead(f,A,a)},c.prototype.getLaFuncFromCache=function(A){},c.prototype.getLaFuncFromMap=function(A){return this.lookAheadFuncsCache.get(A)},c.prototype.getLaFuncFromObj=function(A){return this.lookAheadFuncsCache[A]},c.prototype.setLaFuncCache=function(A,a){},c.prototype.setLaFuncCacheUsingMap=function(A,a){this.lookAheadFuncsCache.set(A,a)},c.prototype.setLaFuncUsingObj=function(A,a){this.lookAheadFuncsCache[A]=a},c})();n.LooksAhead=o}),Lo=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addNoneTerminalToCst=n.addTerminalToCst=n.setNodeLocationFull=n.setNodeLocationOnlyOffset=void 0;function e(s,o){isNaN(s.startOffset)===!0?(s.startOffset=o.startOffset,s.endOffset=o.endOffset):s.endOffset<o.endOffset&&(s.endOffset=o.endOffset)}n.setNodeLocationOnlyOffset=e;function t(s,o){isNaN(s.startOffset)===!0?(s.startOffset=o.startOffset,s.startColumn=o.startColumn,s.startLine=o.startLine,s.endOffset=o.endOffset,s.endColumn=o.endColumn,s.endLine=o.endLine):s.endOffset<o.endOffset&&(s.endOffset=o.endOffset,s.endColumn=o.endColumn,s.endLine=o.endLine)}n.setNodeLocationFull=t;function r(s,o,c){s.children[c]===void 0?s.children[c]=[o]:s.children[c].push(o)}n.addTerminalToCst=r;function i(s,o,c){s.children[o]===void 0?s.children[o]=[c]:s.children[o].push(c)}n.addNoneTerminalToCst=i}),Pi=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.defineNameProp=n.functionName=n.classNameFromInstance=void 0;var e=ke();function t(o){return i(o.constructor)}n.classNameFromInstance=t;var r="name";function i(o){var c=o.name;return c||"anonymous"}n.functionName=i;function s(o,c){var A=Object.getOwnPropertyDescriptor(o,r);return e.isUndefined(A)||A.configurable?(Object.defineProperty(o,r,{enumerable:!1,configurable:!0,writable:!1,value:c}),!0):!1}n.defineNameProp=s}),_o=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.validateRedundantMethods=n.validateMissingCstMethods=n.validateVisitor=n.CstVisitorDefinitionError=n.createBaseVisitorConstructorWithDefaults=n.createBaseSemanticVisitorConstructor=n.defaultVisit=void 0;var e=ke(),t=Pi();function r(u,b){for(var d=e.keys(u),E=d.length,g=0;g<E;g++)for(var l=d[g],h=u[l],p=h.length,C=0;C<p;C++){var m=h[C];m.tokenTypeIdx===void 0&&this[m.name](m.children,b)}}n.defaultVisit=r;function i(u,b){var d=function(){};t.defineNameProp(d,u+"BaseSemantics");var E={visit:function(g,l){if(e.isArray(g)&&(g=g[0]),!e.isUndefined(g))return this[g.name](g.children,l)},validateVisitor:function(){var g=c(this,b);if(!e.isEmpty(g)){var l=e.map(g,function(h){return h.msg});throw Error("Errors Detected in CST Visitor <"+t.functionName(this.constructor)+`>:
|
|
163
|
+
see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return f},buildInvalidRuleNameError:function(o){return"deprecated"},buildDuplicateRuleNameError:function(o){var c;o.topLevelRule instanceof n.Rule?c=o.topLevelRule.name:c=o.topLevelRule;var A="Duplicate definition, rule: ->"+c+"<- is already defined in the grammar: ->"+o.grammarName+"<-";return A}}}),Do=Be(r=>{var e=r&&r.__extends||(function(){var c=function(A,a){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var b in u)Object.prototype.hasOwnProperty.call(u,b)&&(f[b]=u[b])},c(A,a)};return function(A,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");c(A,a);function f(){this.constructor=A}A.prototype=a===null?Object.create(a):(f.prototype=a.prototype,new f)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.GastRefResolverVisitor=r.resolveGrammar=void 0;var t=Xe(),i=Se(),n=bt();function s(c,A){var a=new o(c,A);return a.resolveRefs(),a.errors}r.resolveGrammar=s;var o=(function(c){e(A,c);function A(a,f){var u=c.call(this)||this;return u.nameToTopRule=a,u.errMsgProvider=f,u.errors=[],u}return A.prototype.resolveRefs=function(){var a=this;i.forEach(i.values(this.nameToTopRule),function(f){a.currTopLevel=f,f.accept(a)})},A.prototype.visitNonTerminal=function(a){var f=this.nameToTopRule[a.nonTerminalName];if(f)a.referencedRule=f;else{var u=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,a);this.errors.push({message:u,type:t.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:a.nonTerminalName})}},A})(n.GAstVisitor);r.GastRefResolverVisitor=o}),_t=Be(r=>{var e=r&&r.__extends||(function(){var l=function(h,p){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var B in E)Object.prototype.hasOwnProperty.call(E,B)&&(C[B]=E[B])},l(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");l(h,p);function C(){this.constructor=h}h.prototype=p===null?Object.create(p):(C.prototype=p.prototype,new C)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.nextPossibleTokensAfter=r.possiblePathsFrom=r.NextTerminalAfterAtLeastOneSepWalker=r.NextTerminalAfterAtLeastOneWalker=r.NextTerminalAfterManySepWalker=r.NextTerminalAfterManyWalker=r.AbstractNextTerminalAfterProductionWalker=r.NextAfterTokenWalker=r.AbstractNextPossibleTokensWalker=void 0;var t=ln(),i=Se(),n=Mi(),s=We(),o=(function(l){e(h,l);function h(p,C){var E=l.call(this)||this;return E.topProd=p,E.path=C,E.possibleTokTypes=[],E.nextProductionName="",E.nextProductionOccurrence=0,E.found=!1,E.isAtEndOfPath=!1,E}return h.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=i.cloneArr(this.path.ruleStack).reverse(),this.occurrenceStack=i.cloneArr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},h.prototype.walk=function(p,C){C===void 0&&(C=[]),this.found||l.prototype.walk.call(this,p,C)},h.prototype.walkProdRef=function(p,C,E){if(p.referencedRule.name===this.nextProductionName&&p.idx===this.nextProductionOccurrence){var B=C.concat(E);this.updateExpectedNext(),this.walk(p.referencedRule,B)}},h.prototype.updateExpectedNext=function(){i.isEmpty(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},h})(t.RestWalker);r.AbstractNextPossibleTokensWalker=o;var c=(function(l){e(h,l);function h(p,C){var E=l.call(this,p,C)||this;return E.path=C,E.nextTerminalName="",E.nextTerminalOccurrence=0,E.nextTerminalName=E.path.lastTok.name,E.nextTerminalOccurrence=E.path.lastTokOccurrence,E}return h.prototype.walkTerminal=function(p,C,E){if(this.isAtEndOfPath&&p.terminalType.name===this.nextTerminalName&&p.idx===this.nextTerminalOccurrence&&!this.found){var B=C.concat(E),Q=new s.Alternative({definition:B});this.possibleTokTypes=n.first(Q),this.found=!0}},h})(o);r.NextAfterTokenWalker=c;var A=(function(l){e(h,l);function h(p,C){var E=l.call(this)||this;return E.topRule=p,E.occurrence=C,E.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},E}return h.prototype.startWalking=function(){return this.walk(this.topRule),this.result},h})(t.RestWalker);r.AbstractNextTerminalAfterProductionWalker=A;var a=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkMany=function(p,C,E){if(p.idx===this.occurrence){var B=i.first(C.concat(E));this.result.isEndOfRule=B===void 0,B instanceof s.Terminal&&(this.result.token=B.terminalType,this.result.occurrence=B.idx)}else l.prototype.walkMany.call(this,p,C,E)},h})(A);r.NextTerminalAfterManyWalker=a;var f=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkManySep=function(p,C,E){if(p.idx===this.occurrence){var B=i.first(C.concat(E));this.result.isEndOfRule=B===void 0,B instanceof s.Terminal&&(this.result.token=B.terminalType,this.result.occurrence=B.idx)}else l.prototype.walkManySep.call(this,p,C,E)},h})(A);r.NextTerminalAfterManySepWalker=f;var u=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkAtLeastOne=function(p,C,E){if(p.idx===this.occurrence){var B=i.first(C.concat(E));this.result.isEndOfRule=B===void 0,B instanceof s.Terminal&&(this.result.token=B.terminalType,this.result.occurrence=B.idx)}else l.prototype.walkAtLeastOne.call(this,p,C,E)},h})(A);r.NextTerminalAfterAtLeastOneWalker=u;var b=(function(l){e(h,l);function h(){return l!==null&&l.apply(this,arguments)||this}return h.prototype.walkAtLeastOneSep=function(p,C,E){if(p.idx===this.occurrence){var B=i.first(C.concat(E));this.result.isEndOfRule=B===void 0,B instanceof s.Terminal&&(this.result.token=B.terminalType,this.result.occurrence=B.idx)}else l.prototype.walkAtLeastOneSep.call(this,p,C,E)},h})(A);r.NextTerminalAfterAtLeastOneSepWalker=b;function d(l,h,p){p===void 0&&(p=[]),p=i.cloneArr(p);var C=[],E=0;function B(v){return v.concat(i.drop(l,E+1))}function Q(v){var O=d(B(v),h,p);return C.concat(O)}for(;p.length<h&&E<l.length;){var S=l[E];if(S instanceof s.Alternative||S instanceof s.NonTerminal)return Q(S.definition);if(S instanceof s.Option)C=Q(S.definition);else if(S instanceof s.RepetitionMandatory){var U=S.definition.concat([new s.Repetition({definition:S.definition})]);return Q(U)}else if(S instanceof s.RepetitionMandatoryWithSeparator){var U=[new s.Alternative({definition:S.definition}),new s.Repetition({definition:[new s.Terminal({terminalType:S.separator})].concat(S.definition)})];return Q(U)}else if(S instanceof s.RepetitionWithSeparator){var U=S.definition.concat([new s.Repetition({definition:[new s.Terminal({terminalType:S.separator})].concat(S.definition)})]);C=Q(U)}else if(S instanceof s.Repetition){var U=S.definition.concat([new s.Repetition({definition:S.definition})]);C=Q(U)}else{if(S instanceof s.Alternation)return i.forEach(S.definition,function(v){i.isEmpty(v.definition)===!1&&(C=Q(v.definition))}),C;if(S instanceof s.Terminal)p.push(S.terminalType);else throw Error("non exhaustive match")}E++}return C.push({partialPath:p,suffixDef:i.drop(l,E)}),C}r.possiblePathsFrom=d;function I(l,h,p,C){var E="EXIT_NONE_TERMINAL",B=[E],Q="EXIT_ALTERNATIVE",S=!1,U=h.length,v=U-C-1,O=[],L=[];for(L.push({idx:-1,def:l,ruleStack:[],occurrenceStack:[]});!i.isEmpty(L);){var k=L.pop();if(k===Q){S&&i.last(L).idx<=v&&L.pop();continue}var D=k.def,_=k.idx,V=k.ruleStack,J=k.occurrenceStack;if(!i.isEmpty(D)){var q=D[0];if(q===E){var X={idx:_,def:i.drop(D),ruleStack:i.dropRight(V),occurrenceStack:i.dropRight(J)};L.push(X)}else if(q instanceof s.Terminal)if(_<U-1){var $=_+1,le=h[$];if(p(le,q.terminalType)){var X={idx:$,def:i.drop(D),ruleStack:V,occurrenceStack:J};L.push(X)}}else if(_===U-1)O.push({nextTokenType:q.terminalType,nextTokenOccurrence:q.idx,ruleStack:V,occurrenceStack:J}),S=!0;else throw Error("non exhaustive match");else if(q instanceof s.NonTerminal){var re=i.cloneArr(V);re.push(q.nonTerminalName);var oe=i.cloneArr(J);oe.push(q.idx);var X={idx:_,def:q.definition.concat(B,i.drop(D)),ruleStack:re,occurrenceStack:oe};L.push(X)}else if(q instanceof s.Option){var te={idx:_,def:i.drop(D),ruleStack:V,occurrenceStack:J};L.push(te),L.push(Q);var he={idx:_,def:q.definition.concat(i.drop(D)),ruleStack:V,occurrenceStack:J};L.push(he)}else if(q instanceof s.RepetitionMandatory){var P=new s.Repetition({definition:q.definition,idx:q.idx}),j=q.definition.concat([P],i.drop(D)),X={idx:_,def:j,ruleStack:V,occurrenceStack:J};L.push(X)}else if(q instanceof s.RepetitionMandatoryWithSeparator){var W=new s.Terminal({terminalType:q.separator}),P=new s.Repetition({definition:[W].concat(q.definition),idx:q.idx}),j=q.definition.concat([P],i.drop(D)),X={idx:_,def:j,ruleStack:V,occurrenceStack:J};L.push(X)}else if(q instanceof s.RepetitionWithSeparator){var te={idx:_,def:i.drop(D),ruleStack:V,occurrenceStack:J};L.push(te),L.push(Q);var W=new s.Terminal({terminalType:q.separator}),Z=new s.Repetition({definition:[W].concat(q.definition),idx:q.idx}),j=q.definition.concat([Z],i.drop(D)),he={idx:_,def:j,ruleStack:V,occurrenceStack:J};L.push(he)}else if(q instanceof s.Repetition){var te={idx:_,def:i.drop(D),ruleStack:V,occurrenceStack:J};L.push(te),L.push(Q);var Z=new s.Repetition({definition:q.definition,idx:q.idx}),j=q.definition.concat([Z],i.drop(D)),he={idx:_,def:j,ruleStack:V,occurrenceStack:J};L.push(he)}else if(q instanceof s.Alternation)for(var ne=q.definition.length-1;ne>=0;ne--){var Ae=q.definition[ne],be={idx:_,def:Ae.definition.concat(i.drop(D)),ruleStack:V,occurrenceStack:J};L.push(be),L.push(Q)}else if(q instanceof s.Alternative)L.push({idx:_,def:q.definition.concat(i.drop(D)),ruleStack:V,occurrenceStack:J});else if(q instanceof s.Rule)L.push(g(q,_,V,J));else throw Error("non exhaustive match")}}return O}r.nextPossibleTokensAfter=I;function g(l,h,p,C){var E=i.cloneArr(p);E.push(l.name);var B=i.cloneArr(C);return B.push(1),{idx:h,def:l.definition,ruleStack:E,occurrenceStack:B}}}),Lt=Be(r=>{var e=r&&r.__extends||(function(){var v=function(O,L){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,D){k.__proto__=D}||function(k,D){for(var _ in D)Object.prototype.hasOwnProperty.call(D,_)&&(k[_]=D[_])},v(O,L)};return function(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");v(O,L);function k(){this.constructor=O}O.prototype=L===null?Object.create(L):(k.prototype=L.prototype,new k)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.areTokenCategoriesNotUsed=r.isStrictPrefixOfPath=r.containsPath=r.getLookaheadPathsForOptionalProd=r.getLookaheadPathsForOr=r.lookAheadSequenceFromAlternatives=r.buildSingleAlternativeLookaheadFunction=r.buildAlternativesLookAheadFunc=r.buildLookaheadFuncForOptionalProd=r.buildLookaheadFuncForOr=r.getProdType=r.PROD_TYPE=void 0;var t=Se(),i=_t(),n=ln(),s=mt(),o=We(),c=bt(),A;(function(v){v[v.OPTION=0]="OPTION",v[v.REPETITION=1]="REPETITION",v[v.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",v[v.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",v[v.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",v[v.ALTERNATION=5]="ALTERNATION"})(A=r.PROD_TYPE||(r.PROD_TYPE={}));function a(v){if(v instanceof o.Option)return A.OPTION;if(v instanceof o.Repetition)return A.REPETITION;if(v instanceof o.RepetitionMandatory)return A.REPETITION_MANDATORY;if(v instanceof o.RepetitionMandatoryWithSeparator)return A.REPETITION_MANDATORY_WITH_SEPARATOR;if(v instanceof o.RepetitionWithSeparator)return A.REPETITION_WITH_SEPARATOR;if(v instanceof o.Alternation)return A.ALTERNATION;throw Error("non exhaustive match")}r.getProdType=a;function f(v,O,L,k,D,_){var V=E(v,O,L),J=U(V)?s.tokenStructuredMatcherNoCategories:s.tokenStructuredMatcher;return _(V,k,J,D)}r.buildLookaheadFuncForOr=f;function u(v,O,L,k,D,_){var V=B(v,O,D,L),J=U(V)?s.tokenStructuredMatcherNoCategories:s.tokenStructuredMatcher;return _(V[0],J,k)}r.buildLookaheadFuncForOptionalProd=u;function b(v,O,L,k){var D=v.length,_=t.every(v,function(q){return t.every(q,function(X){return X.length===1})});if(O)return function(q){for(var X=t.map(q,function(Z){return Z.GATE}),$=0;$<D;$++){var le=v[$],re=le.length,oe=X[$];if(!(oe!==void 0&&oe.call(this)===!1))e:for(var te=0;te<re;te++){for(var he=le[te],P=he.length,j=0;j<P;j++){var W=this.LA(j+1);if(L(W,he[j])===!1)continue e}return $}}};if(_&&!k){var V=t.map(v,function(q){return t.flatten(q)}),J=t.reduce(V,function(q,X,$){return t.forEach(X,function(le){t.has(q,le.tokenTypeIdx)||(q[le.tokenTypeIdx]=$),t.forEach(le.categoryMatches,function(re){t.has(q,re)||(q[re]=$)})}),q},[]);return function(){var q=this.LA(1);return J[q.tokenTypeIdx]}}else return function(){for(var q=0;q<D;q++){var X=v[q],$=X.length;e:for(var le=0;le<$;le++){for(var re=X[le],oe=re.length,te=0;te<oe;te++){var he=this.LA(te+1);if(L(he,re[te])===!1)continue e}return q}}}}r.buildAlternativesLookAheadFunc=b;function d(v,O,L){var k=t.every(v,function(X){return X.length===1}),D=v.length;if(k&&!L){var _=t.flatten(v);if(_.length===1&&t.isEmpty(_[0].categoryMatches)){var V=_[0],J=V.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===J}}else{var q=t.reduce(_,function(X,$,le){return X[$.tokenTypeIdx]=!0,t.forEach($.categoryMatches,function(re){X[re]=!0}),X},[]);return function(){var X=this.LA(1);return q[X.tokenTypeIdx]===!0}}}else return function(){e:for(var X=0;X<D;X++){for(var $=v[X],le=$.length,re=0;re<le;re++){var oe=this.LA(re+1);if(O(oe,$[re])===!1)continue e}return!0}return!1}}r.buildSingleAlternativeLookaheadFunction=d;var I=(function(v){e(O,v);function O(L,k,D){var _=v.call(this)||this;return _.topProd=L,_.targetOccurrence=k,_.targetProdType=D,_}return O.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},O.prototype.checkIsTarget=function(L,k,D,_){return L.idx===this.targetOccurrence&&this.targetProdType===k?(this.restDef=D.concat(_),!0):!1},O.prototype.walkOption=function(L,k,D){this.checkIsTarget(L,A.OPTION,k,D)||v.prototype.walkOption.call(this,L,k,D)},O.prototype.walkAtLeastOne=function(L,k,D){this.checkIsTarget(L,A.REPETITION_MANDATORY,k,D)||v.prototype.walkOption.call(this,L,k,D)},O.prototype.walkAtLeastOneSep=function(L,k,D){this.checkIsTarget(L,A.REPETITION_MANDATORY_WITH_SEPARATOR,k,D)||v.prototype.walkOption.call(this,L,k,D)},O.prototype.walkMany=function(L,k,D){this.checkIsTarget(L,A.REPETITION,k,D)||v.prototype.walkOption.call(this,L,k,D)},O.prototype.walkManySep=function(L,k,D){this.checkIsTarget(L,A.REPETITION_WITH_SEPARATOR,k,D)||v.prototype.walkOption.call(this,L,k,D)},O})(n.RestWalker),g=(function(v){e(O,v);function O(L,k,D){var _=v.call(this)||this;return _.targetOccurrence=L,_.targetProdType=k,_.targetRef=D,_.result=[],_}return O.prototype.checkIsTarget=function(L,k){L.idx===this.targetOccurrence&&this.targetProdType===k&&(this.targetRef===void 0||L===this.targetRef)&&(this.result=L.definition)},O.prototype.visitOption=function(L){this.checkIsTarget(L,A.OPTION)},O.prototype.visitRepetition=function(L){this.checkIsTarget(L,A.REPETITION)},O.prototype.visitRepetitionMandatory=function(L){this.checkIsTarget(L,A.REPETITION_MANDATORY)},O.prototype.visitRepetitionMandatoryWithSeparator=function(L){this.checkIsTarget(L,A.REPETITION_MANDATORY_WITH_SEPARATOR)},O.prototype.visitRepetitionWithSeparator=function(L){this.checkIsTarget(L,A.REPETITION_WITH_SEPARATOR)},O.prototype.visitAlternation=function(L){this.checkIsTarget(L,A.ALTERNATION)},O})(c.GAstVisitor);function l(v){for(var O=new Array(v),L=0;L<v;L++)O[L]=[];return O}function h(v){for(var O=[""],L=0;L<v.length;L++){for(var k=v[L],D=[],_=0;_<O.length;_++){var V=O[_];D.push(V+"_"+k.tokenTypeIdx);for(var J=0;J<k.categoryMatches.length;J++){var q="_"+k.categoryMatches[J];D.push(V+q)}}O=D}return O}function p(v,O,L){for(var k=0;k<v.length;k++)if(k!==L)for(var D=v[k],_=0;_<O.length;_++){var V=O[_];if(D[V]===!0)return!1}return!0}function C(v,O){for(var L=t.map(v,function($){return i.possiblePathsFrom([$],1)}),k=l(L.length),D=t.map(L,function($){var le={};return t.forEach($,function(re){var oe=h(re.partialPath);t.forEach(oe,function(te){le[te]=!0})}),le}),_=L,V=1;V<=O;V++){var J=_;_=l(J.length);for(var q=function($){for(var le=J[$],re=0;re<le.length;re++){var oe=le[re].partialPath,te=le[re].suffixDef,he=h(oe),P=p(D,he,$);if(P||t.isEmpty(te)||oe.length===O){var j=k[$];if(Q(j,oe)===!1){j.push(oe);for(var W=0;W<he.length;W++){var Z=he[W];D[$][Z]=!0}}}else{var ne=i.possiblePathsFrom(te,V+1,oe);_[$]=_[$].concat(ne),t.forEach(ne,function(Ae){var be=h(Ae.partialPath);t.forEach(be,function(Ie){D[$][Ie]=!0})})}}},X=0;X<J.length;X++)q(X)}return k}r.lookAheadSequenceFromAlternatives=C;function E(v,O,L,k){var D=new g(v,A.ALTERNATION,k);return O.accept(D),C(D.result,L)}r.getLookaheadPathsForOr=E;function B(v,O,L,k){var D=new g(v,L);O.accept(D);var _=D.result,V=new I(O,v,L),J=V.startWalking(),q=new o.Alternative({definition:_}),X=new o.Alternative({definition:J});return C([q,X],k)}r.getLookaheadPathsForOptionalProd=B;function Q(v,O){e:for(var L=0;L<v.length;L++){var k=v[L];if(k.length===O.length){for(var D=0;D<k.length;D++){var _=O[D],V=k[D],J=_===V||V.categoryMatchesMap[_.tokenTypeIdx]!==void 0;if(J===!1)continue e}return!0}}return!1}r.containsPath=Q;function S(v,O){return v.length<O.length&&t.every(v,function(L,k){var D=O[k];return L===D||D.categoryMatchesMap[L.tokenTypeIdx]})}r.isStrictPrefixOfPath=S;function U(v){return t.every(v,function(O){return t.every(O,function(L){return t.every(L,function(k){return t.isEmpty(k.categoryMatches)})})})}r.areTokenCategoriesNotUsed=U}),Pi=Be(r=>{var e=r&&r.__extends||(function(){var k=function(D,_){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,J){V.__proto__=J}||function(V,J){for(var q in J)Object.prototype.hasOwnProperty.call(J,q)&&(V[q]=J[q])},k(D,_)};return function(D,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");k(D,_);function V(){this.constructor=D}D.prototype=_===null?Object.create(_):(V.prototype=_.prototype,new V)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.checkPrefixAlternativesAmbiguities=r.validateSomeNonEmptyLookaheadPath=r.validateTooManyAlts=r.RepetionCollector=r.validateAmbiguousAlternationAlternatives=r.validateEmptyOrAlternative=r.getFirstNoneTerminal=r.validateNoLeftRecursion=r.validateRuleIsOverridden=r.validateRuleDoesNotAlreadyExist=r.OccurrenceValidationCollector=r.identifyProductionForDuplicates=r.validateGrammar=void 0;var t=Se(),i=Se(),n=Xe(),s=kt(),o=Lt(),c=_t(),A=We(),a=bt();function f(k,D,_,V,J){var q=t.map(k,function(P){return u(P,V)}),X=t.map(k,function(P){return h(P,P,V)}),$=[],le=[],re=[];i.every(X,i.isEmpty)&&($=i.map(k,function(P){return E(P,V)}),le=i.map(k,function(P){return B(P,D,V)}),re=U(k,D,V));var oe=L(k,_,V),te=i.map(k,function(P){return S(P,V)}),he=i.map(k,function(P){return g(P,k,J,V)});return t.flatten(q.concat(re,X,$,le,oe,te,he))}r.validateGrammar=f;function u(k,D){var _=new I;k.accept(_);var V=_.allProductions,J=t.groupBy(V,b),q=t.pick(J,function($){return $.length>1}),X=t.map(t.values(q),function($){var le=t.first($),re=D.buildDuplicateFoundError(k,$),oe=s.getProductionDslName(le),te={message:re,type:n.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:k.name,dslName:oe,occurrence:le.idx},he=d(le);return he&&(te.parameter=he),te});return X}function b(k){return s.getProductionDslName(k)+"_#_"+k.idx+"_#_"+d(k)}r.identifyProductionForDuplicates=b;function d(k){return k instanceof A.Terminal?k.terminalType.name:k instanceof A.NonTerminal?k.nonTerminalName:""}var I=(function(k){e(D,k);function D(){var _=k!==null&&k.apply(this,arguments)||this;return _.allProductions=[],_}return D.prototype.visitNonTerminal=function(_){this.allProductions.push(_)},D.prototype.visitOption=function(_){this.allProductions.push(_)},D.prototype.visitRepetitionWithSeparator=function(_){this.allProductions.push(_)},D.prototype.visitRepetitionMandatory=function(_){this.allProductions.push(_)},D.prototype.visitRepetitionMandatoryWithSeparator=function(_){this.allProductions.push(_)},D.prototype.visitRepetition=function(_){this.allProductions.push(_)},D.prototype.visitAlternation=function(_){this.allProductions.push(_)},D.prototype.visitTerminal=function(_){this.allProductions.push(_)},D})(a.GAstVisitor);r.OccurrenceValidationCollector=I;function g(k,D,_,V){var J=[],q=i.reduce(D,function($,le){return le.name===k.name?$+1:$},0);if(q>1){var X=V.buildDuplicateRuleNameError({topLevelRule:k,grammarName:_});J.push({message:X,type:n.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:k.name})}return J}r.validateRuleDoesNotAlreadyExist=g;function l(k,D,_){var V=[],J;return t.contains(D,k)||(J="Invalid rule override, rule: ->"+k+"<- cannot be overridden in the grammar: ->"+_+"<-as it is not defined in any of the super grammars ",V.push({message:J,type:n.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:k})),V}r.validateRuleIsOverridden=l;function h(k,D,_,V){V===void 0&&(V=[]);var J=[],q=p(D.definition);if(t.isEmpty(q))return[];var X=k.name,$=t.contains(q,k);$&&J.push({message:_.buildLeftRecursionError({topLevelRule:k,leftRecursionPath:V}),type:n.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:X});var le=t.difference(q,V.concat([k])),re=t.map(le,function(oe){var te=t.cloneArr(V);return te.push(oe),h(k,oe,_,te)});return J.concat(t.flatten(re))}r.validateNoLeftRecursion=h;function p(k){var D=[];if(t.isEmpty(k))return D;var _=t.first(k);if(_ instanceof A.NonTerminal)D.push(_.referencedRule);else if(_ instanceof A.Alternative||_ instanceof A.Option||_ instanceof A.RepetitionMandatory||_ instanceof A.RepetitionMandatoryWithSeparator||_ instanceof A.RepetitionWithSeparator||_ instanceof A.Repetition)D=D.concat(p(_.definition));else if(_ instanceof A.Alternation)D=t.flatten(t.map(_.definition,function(X){return p(X.definition)}));else if(!(_ instanceof A.Terminal))throw Error("non exhaustive match");var V=s.isOptionalProd(_),J=k.length>1;if(V&&J){var q=t.drop(k);return D.concat(p(q))}else return D}r.getFirstNoneTerminal=p;var C=(function(k){e(D,k);function D(){var _=k!==null&&k.apply(this,arguments)||this;return _.alternations=[],_}return D.prototype.visitAlternation=function(_){this.alternations.push(_)},D})(a.GAstVisitor);function E(k,D){var _=new C;k.accept(_);var V=_.alternations,J=t.reduce(V,function(q,X){var $=t.dropRight(X.definition),le=t.map($,function(re,oe){var te=c.nextPossibleTokensAfter([re],[],null,1);return t.isEmpty(te)?{message:D.buildEmptyAlternationError({topLevelRule:k,alternation:X,emptyChoiceIdx:oe}),type:n.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:k.name,occurrence:X.idx,alternative:oe+1}:null});return q.concat(t.compact(le))},[]);return J}r.validateEmptyOrAlternative=E;function B(k,D,_){var V=new C;k.accept(V);var J=V.alternations;J=i.reject(J,function(X){return X.ignoreAmbiguities===!0});var q=t.reduce(J,function(X,$){var le=$.idx,re=$.maxLookahead||D,oe=o.getLookaheadPathsForOr(le,k,re,$),te=v(oe,$,k,_),he=O(oe,$,k,_);return X.concat(te,he)},[]);return q}r.validateAmbiguousAlternationAlternatives=B;var Q=(function(k){e(D,k);function D(){var _=k!==null&&k.apply(this,arguments)||this;return _.allProductions=[],_}return D.prototype.visitRepetitionWithSeparator=function(_){this.allProductions.push(_)},D.prototype.visitRepetitionMandatory=function(_){this.allProductions.push(_)},D.prototype.visitRepetitionMandatoryWithSeparator=function(_){this.allProductions.push(_)},D.prototype.visitRepetition=function(_){this.allProductions.push(_)},D})(a.GAstVisitor);r.RepetionCollector=Q;function S(k,D){var _=new C;k.accept(_);var V=_.alternations,J=t.reduce(V,function(q,X){return X.definition.length>255&&q.push({message:D.buildTooManyAlternativesError({topLevelRule:k,alternation:X}),type:n.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:k.name,occurrence:X.idx}),q},[]);return J}r.validateTooManyAlts=S;function U(k,D,_){var V=[];return i.forEach(k,function(J){var q=new Q;J.accept(q);var X=q.allProductions;i.forEach(X,function($){var le=o.getProdType($),re=$.maxLookahead||D,oe=$.idx,te=o.getLookaheadPathsForOptionalProd(oe,J,le,re),he=te[0];if(i.isEmpty(i.flatten(he))){var P=_.buildEmptyRepetitionError({topLevelRule:J,repetition:$});V.push({message:P,type:n.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:J.name})}})}),V}r.validateSomeNonEmptyLookaheadPath=U;function v(k,D,_,V){var J=[],q=i.reduce(k,function($,le,re){return D.definition[re].ignoreAmbiguities===!0||i.forEach(le,function(oe){var te=[re];i.forEach(k,function(he,P){re!==P&&o.containsPath(he,oe)&&D.definition[P].ignoreAmbiguities!==!0&&te.push(P)}),te.length>1&&!o.containsPath(J,oe)&&(J.push(oe),$.push({alts:te,path:oe}))}),$},[]),X=t.map(q,function($){var le=i.map($.alts,function(oe){return oe+1}),re=V.buildAlternationAmbiguityError({topLevelRule:_,alternation:D,ambiguityIndices:le,prefixPath:$.path});return{message:re,type:n.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:_.name,occurrence:D.idx,alternatives:[$.alts]}});return X}function O(k,D,_,V){var J=[],q=i.reduce(k,function(X,$,le){var re=i.map($,function(oe){return{idx:le,path:oe}});return X.concat(re)},[]);return i.forEach(q,function(X){var $=D.definition[X.idx];if($.ignoreAmbiguities!==!0){var le=X.idx,re=X.path,oe=i.findAll(q,function(he){return D.definition[he.idx].ignoreAmbiguities!==!0&&he.idx<le&&o.isStrictPrefixOfPath(he.path,re)}),te=i.map(oe,function(he){var P=[he.idx+1,le+1],j=D.idx===0?"":D.idx,W=V.buildAlternationPrefixAmbiguityError({topLevelRule:_,alternation:D,ambiguityIndices:P,prefixPath:he.path});return{message:W,type:n.ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,ruleName:_.name,occurrence:j,alternatives:P}});J=J.concat(te)}}),J}r.checkPrefixAlternativesAmbiguities=O;function L(k,D,_){var V=[],J=i.map(D,function(q){return q.name});return i.forEach(k,function(q){var X=q.name;if(i.contains(J,X)){var $=_.buildNamespaceConflictError(q);V.push({message:$,type:n.ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:X})}}),V}}),Fo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.validateGrammar=r.resolveGrammar=void 0;var e=Se(),t=Do(),i=Pi(),n=St();function s(c){c=e.defaults(c,{errMsgProvider:n.defaultGrammarResolverErrorProvider});var A={};return e.forEach(c.rules,function(a){A[a.name]=a}),t.resolveGrammar(A,c.errMsgProvider)}r.resolveGrammar=s;function o(c){return c=e.defaults(c,{errMsgProvider:n.defaultGrammarValidatorErrorProvider}),i.validateGrammar(c.rules,c.maxLookahead,c.tokenTypes,c.errMsgProvider,c.grammarName)}r.validateGrammar=o}),Ct=Be(r=>{var e=r&&r.__extends||(function(){var I=function(g,l){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var C in p)Object.prototype.hasOwnProperty.call(p,C)&&(h[C]=p[C])},I(g,l)};return function(g,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");I(g,l);function h(){this.constructor=g}g.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.EarlyExitException=r.NotAllInputParsedException=r.NoViableAltException=r.MismatchedTokenException=r.isRecognitionException=void 0;var t=Se(),i="MismatchedTokenException",n="NoViableAltException",s="EarlyExitException",o="NotAllInputParsedException",c=[i,n,s,o];Object.freeze(c);function A(I){return t.contains(c,I.name)}r.isRecognitionException=A;var a=(function(I){e(g,I);function g(l,h){var p=this.constructor,C=I.call(this,l)||this;return C.token=h,C.resyncedTokens=[],Object.setPrototypeOf(C,p.prototype),Error.captureStackTrace&&Error.captureStackTrace(C,C.constructor),C}return g})(Error),f=(function(I){e(g,I);function g(l,h,p){var C=I.call(this,l,h)||this;return C.previousToken=p,C.name=i,C}return g})(a);r.MismatchedTokenException=f;var u=(function(I){e(g,I);function g(l,h,p){var C=I.call(this,l,h)||this;return C.previousToken=p,C.name=n,C}return g})(a);r.NoViableAltException=u;var b=(function(I){e(g,I);function g(l,h){var p=I.call(this,l,h)||this;return p.name=o,p}return g})(a);r.NotAllInputParsedException=b;var d=(function(I){e(g,I);function g(l,h,p){var C=I.call(this,l,h)||this;return C.previousToken=p,C.name=s,C}return g})(a);r.EarlyExitException=d}),Gi=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.attemptInRepetitionRecovery=r.Recoverable=r.InRuleRecoveryException=r.IN_RULE_RECOVERY_EXCEPTION=r.EOF_FOLLOW_KEY=void 0;var e=ct(),t=Se(),i=Ct(),n=Oi(),s=Xe();r.EOF_FOLLOW_KEY={},r.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function o(a){this.name=r.IN_RULE_RECOVERY_EXCEPTION,this.message=a}r.InRuleRecoveryException=o,o.prototype=Error.prototype;var c=(function(){function a(){}return a.prototype.initRecoverable=function(f){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=t.has(f,"recoveryEnabled")?f.recoveryEnabled:s.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=A)},a.prototype.getTokenToInsert=function(f){var u=e.createTokenInstance(f,"",NaN,NaN,NaN,NaN,NaN,NaN);return u.isInsertedInRecovery=!0,u},a.prototype.canTokenTypeBeInsertedInRecovery=function(f){return!0},a.prototype.tryInRepetitionRecovery=function(f,u,b,d){for(var I=this,g=this.findReSyncTokenType(),l=this.exportLexerState(),h=[],p=!1,C=this.LA(1),E=this.LA(1),B=function(){var Q=I.LA(0),S=I.errorMessageProvider.buildMismatchTokenMessage({expected:d,actual:C,previous:Q,ruleName:I.getCurrRuleFullName()}),U=new i.MismatchedTokenException(S,C,I.LA(0));U.resyncedTokens=t.dropRight(h),I.SAVE_ERROR(U)};!p;)if(this.tokenMatcher(E,d)){B();return}else if(b.call(this)){B(),f.apply(this,u);return}else this.tokenMatcher(E,g)?p=!0:(E=this.SKIP_TOKEN(),this.addToResyncTokens(E,h));this.importLexerState(l)},a.prototype.shouldInRepetitionRecoveryBeTried=function(f,u,b){return!(b===!1||f===void 0||u===void 0||this.tokenMatcher(this.LA(1),f)||this.isBackTracking()||this.canPerformInRuleRecovery(f,this.getFollowsForInRuleRecovery(f,u)))},a.prototype.getFollowsForInRuleRecovery=function(f,u){var b=this.getCurrentGrammarPath(f,u),d=this.getNextPossibleTokenTypes(b);return d},a.prototype.tryInRuleRecovery=function(f,u){if(this.canRecoverWithSingleTokenInsertion(f,u)){var b=this.getTokenToInsert(f);return b}if(this.canRecoverWithSingleTokenDeletion(f)){var d=this.SKIP_TOKEN();return this.consumeToken(),d}throw new o("sad sad panda")},a.prototype.canPerformInRuleRecovery=function(f,u){return this.canRecoverWithSingleTokenInsertion(f,u)||this.canRecoverWithSingleTokenDeletion(f)},a.prototype.canRecoverWithSingleTokenInsertion=function(f,u){var b=this;if(!this.canTokenTypeBeInsertedInRecovery(f)||t.isEmpty(u))return!1;var d=this.LA(1),I=t.find(u,function(g){return b.tokenMatcher(d,g)})!==void 0;return I},a.prototype.canRecoverWithSingleTokenDeletion=function(f){var u=this.tokenMatcher(this.LA(2),f);return u},a.prototype.isInCurrentRuleReSyncSet=function(f){var u=this.getCurrFollowKey(),b=this.getFollowSetFromFollowKey(u);return t.contains(b,f)},a.prototype.findReSyncTokenType=function(){for(var f=this.flattenFollowSet(),u=this.LA(1),b=2;;){var d=u.tokenType;if(t.contains(f,d))return d;u=this.LA(b),b++}},a.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return r.EOF_FOLLOW_KEY;var f=this.getLastExplicitRuleShortName(),u=this.getLastExplicitRuleOccurrenceIndex(),b=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(f),idxInCallingRule:u,inRule:this.shortRuleNameToFullName(b)}},a.prototype.buildFullFollowKeyStack=function(){var f=this,u=this.RULE_STACK,b=this.RULE_OCCURRENCE_STACK;return t.map(u,function(d,I){return I===0?r.EOF_FOLLOW_KEY:{ruleName:f.shortRuleNameToFullName(d),idxInCallingRule:b[I],inRule:f.shortRuleNameToFullName(u[I-1])}})},a.prototype.flattenFollowSet=function(){var f=this,u=t.map(this.buildFullFollowKeyStack(),function(b){return f.getFollowSetFromFollowKey(b)});return t.flatten(u)},a.prototype.getFollowSetFromFollowKey=function(f){if(f===r.EOF_FOLLOW_KEY)return[e.EOF];var u=f.ruleName+f.idxInCallingRule+n.IN+f.inRule;return this.resyncFollows[u]},a.prototype.addToResyncTokens=function(f,u){return this.tokenMatcher(f,e.EOF)||u.push(f),u},a.prototype.reSyncTo=function(f){for(var u=[],b=this.LA(1);this.tokenMatcher(b,f)===!1;)b=this.SKIP_TOKEN(),this.addToResyncTokens(b,u);return t.dropRight(u)},a.prototype.attemptInRepetitionRecovery=function(f,u,b,d,I,g,l){},a.prototype.getCurrentGrammarPath=function(f,u){var b=this.getHumanReadableRuleStack(),d=t.cloneArr(this.RULE_OCCURRENCE_STACK),I={ruleStack:b,occurrenceStack:d,lastTok:f,lastTokOccurrence:u};return I},a.prototype.getHumanReadableRuleStack=function(){var f=this;return t.map(this.RULE_STACK,function(u){return f.shortRuleNameToFullName(u)})},a})();r.Recoverable=c;function A(a,f,u,b,d,I,g){var l=this.getKeyForAutomaticLookahead(b,d),h=this.firstAfterRepMap[l];if(h===void 0){var p=this.getCurrRuleFullName(),C=this.getGAstProductions()[p],E=new I(C,d);h=E.startWalking(),this.firstAfterRepMap[l]=h}var B=h.token,Q=h.occurrence,S=h.isEndOfRule;this.RULE_STACK.length===1&&S&&B===void 0&&(B=e.EOF,Q=1),this.shouldInRepetitionRecoveryBeTried(B,Q,g)&&this.tryInRepetitionRecovery(a,f,u,B)}r.attemptInRepetitionRecovery=A}),un=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getKeyForAutomaticLookahead=r.AT_LEAST_ONE_SEP_IDX=r.MANY_SEP_IDX=r.AT_LEAST_ONE_IDX=r.MANY_IDX=r.OPTION_IDX=r.OR_IDX=r.BITS_FOR_ALT_IDX=r.BITS_FOR_RULE_IDX=r.BITS_FOR_OCCURRENCE_IDX=r.BITS_FOR_METHOD_TYPE=void 0,r.BITS_FOR_METHOD_TYPE=4,r.BITS_FOR_OCCURRENCE_IDX=8,r.BITS_FOR_RULE_IDX=12,r.BITS_FOR_ALT_IDX=8,r.OR_IDX=1<<r.BITS_FOR_OCCURRENCE_IDX,r.OPTION_IDX=2<<r.BITS_FOR_OCCURRENCE_IDX,r.MANY_IDX=3<<r.BITS_FOR_OCCURRENCE_IDX,r.AT_LEAST_ONE_IDX=4<<r.BITS_FOR_OCCURRENCE_IDX,r.MANY_SEP_IDX=5<<r.BITS_FOR_OCCURRENCE_IDX,r.AT_LEAST_ONE_SEP_IDX=6<<r.BITS_FOR_OCCURRENCE_IDX;function e(t,i,n){return n|i|t}r.getKeyForAutomaticLookahead=e,32-r.BITS_FOR_ALT_IDX}),Mo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LooksAhead=void 0;var e=Lt(),t=Se(),i=Xe(),n=un(),s=kt(),o=(function(){function c(){}return c.prototype.initLooksAhead=function(A){this.dynamicTokensEnabled=t.has(A,"dynamicTokensEnabled")?A.dynamicTokensEnabled:i.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=t.has(A,"maxLookahead")?A.maxLookahead:i.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=t.isES2015MapSupported()?new Map:[],t.isES2015MapSupported()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},c.prototype.preComputeLookaheadFunctions=function(A){var a=this;t.forEach(A,function(f){a.TRACE_INIT(f.name+" Rule Lookahead",function(){var u=s.collectMethods(f),b=u.alternation,d=u.repetition,I=u.option,g=u.repetitionMandatory,l=u.repetitionMandatoryWithSeparator,h=u.repetitionWithSeparator;t.forEach(b,function(p){var C=p.idx===0?"":p.idx;a.TRACE_INIT(""+s.getProductionDslName(p)+C,function(){var E=e.buildLookaheadFuncForOr(p.idx,f,p.maxLookahead||a.maxLookahead,p.hasPredicates,a.dynamicTokensEnabled,a.lookAheadBuilderForAlternatives),B=n.getKeyForAutomaticLookahead(a.fullRuleNameToShort[f.name],n.OR_IDX,p.idx);a.setLaFuncCache(B,E)})}),t.forEach(d,function(p){a.computeLookaheadFunc(f,p.idx,n.MANY_IDX,e.PROD_TYPE.REPETITION,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(I,function(p){a.computeLookaheadFunc(f,p.idx,n.OPTION_IDX,e.PROD_TYPE.OPTION,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(g,function(p){a.computeLookaheadFunc(f,p.idx,n.AT_LEAST_ONE_IDX,e.PROD_TYPE.REPETITION_MANDATORY,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(l,function(p){a.computeLookaheadFunc(f,p.idx,n.AT_LEAST_ONE_SEP_IDX,e.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,p.maxLookahead,s.getProductionDslName(p))}),t.forEach(h,function(p){a.computeLookaheadFunc(f,p.idx,n.MANY_SEP_IDX,e.PROD_TYPE.REPETITION_WITH_SEPARATOR,p.maxLookahead,s.getProductionDslName(p))})})})},c.prototype.computeLookaheadFunc=function(A,a,f,u,b,d){var I=this;this.TRACE_INIT(""+d+(a===0?"":a),function(){var g=e.buildLookaheadFuncForOptionalProd(a,A,b||I.maxLookahead,I.dynamicTokensEnabled,u,I.lookAheadBuilderForOptional),l=n.getKeyForAutomaticLookahead(I.fullRuleNameToShort[A.name],f,a);I.setLaFuncCache(l,g)})},c.prototype.lookAheadBuilderForOptional=function(A,a,f){return e.buildSingleAlternativeLookaheadFunction(A,a,f)},c.prototype.lookAheadBuilderForAlternatives=function(A,a,f,u){return e.buildAlternativesLookAheadFunc(A,a,f,u)},c.prototype.getKeyForAutomaticLookahead=function(A,a){var f=this.getLastExplicitRuleShortName();return n.getKeyForAutomaticLookahead(f,A,a)},c.prototype.getLaFuncFromCache=function(A){},c.prototype.getLaFuncFromMap=function(A){return this.lookAheadFuncsCache.get(A)},c.prototype.getLaFuncFromObj=function(A){return this.lookAheadFuncsCache[A]},c.prototype.setLaFuncCache=function(A,a){},c.prototype.setLaFuncCacheUsingMap=function(A,a){this.lookAheadFuncsCache.set(A,a)},c.prototype.setLaFuncUsingObj=function(A,a){this.lookAheadFuncsCache[A]=a},c})();r.LooksAhead=o}),Oo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addNoneTerminalToCst=r.addTerminalToCst=r.setNodeLocationFull=r.setNodeLocationOnlyOffset=void 0;function e(s,o){isNaN(s.startOffset)===!0?(s.startOffset=o.startOffset,s.endOffset=o.endOffset):s.endOffset<o.endOffset&&(s.endOffset=o.endOffset)}r.setNodeLocationOnlyOffset=e;function t(s,o){isNaN(s.startOffset)===!0?(s.startOffset=o.startOffset,s.startColumn=o.startColumn,s.startLine=o.startLine,s.endOffset=o.endOffset,s.endColumn=o.endColumn,s.endLine=o.endLine):s.endOffset<o.endOffset&&(s.endOffset=o.endOffset,s.endColumn=o.endColumn,s.endLine=o.endLine)}r.setNodeLocationFull=t;function i(s,o,c){s.children[c]===void 0?s.children[c]=[o]:s.children[c].push(o)}r.addTerminalToCst=i;function n(s,o,c){s.children[o]===void 0?s.children[o]=[c]:s.children[o].push(c)}r.addNoneTerminalToCst=n}),Ui=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.defineNameProp=r.functionName=r.classNameFromInstance=void 0;var e=Se();function t(o){return n(o.constructor)}r.classNameFromInstance=t;var i="name";function n(o){var c=o.name;return c||"anonymous"}r.functionName=n;function s(o,c){var A=Object.getOwnPropertyDescriptor(o,i);return e.isUndefined(A)||A.configurable?(Object.defineProperty(o,i,{enumerable:!1,configurable:!0,writable:!1,value:c}),!0):!1}r.defineNameProp=s}),Po=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.validateRedundantMethods=r.validateMissingCstMethods=r.validateVisitor=r.CstVisitorDefinitionError=r.createBaseVisitorConstructorWithDefaults=r.createBaseSemanticVisitorConstructor=r.defaultVisit=void 0;var e=Se(),t=Ui();function i(u,b){for(var d=e.keys(u),I=d.length,g=0;g<I;g++)for(var l=d[g],h=u[l],p=h.length,C=0;C<p;C++){var E=h[C];E.tokenTypeIdx===void 0&&this[E.name](E.children,b)}}r.defaultVisit=i;function n(u,b){var d=function(){};t.defineNameProp(d,u+"BaseSemantics");var I={visit:function(g,l){if(e.isArray(g)&&(g=g[0]),!e.isUndefined(g))return this[g.name](g.children,l)},validateVisitor:function(){var g=c(this,b);if(!e.isEmpty(g)){var l=e.map(g,function(h){return h.msg});throw Error("Errors Detected in CST Visitor <"+t.functionName(this.constructor)+`>:
|
|
164
164
|
`+(""+l.join(`
|
|
165
165
|
|
|
166
166
|
`).replace(/\n/g,`
|
|
167
|
-
`)))}}};return d.prototype=
|
|
167
|
+
`)))}}};return d.prototype=I,d.prototype.constructor=d,d._RULE_NAMES=b,d}r.createBaseSemanticVisitorConstructor=n;function s(u,b,d){var I=function(){};t.defineNameProp(I,u+"BaseSemanticsWithDefaults");var g=Object.create(d.prototype);return e.forEach(b,function(l){g[l]=i}),I.prototype=g,I.prototype.constructor=I,I}r.createBaseVisitorConstructorWithDefaults=s;var o;(function(u){u[u.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",u[u.MISSING_METHOD=1]="MISSING_METHOD"})(o=r.CstVisitorDefinitionError||(r.CstVisitorDefinitionError={}));function c(u,b){var d=A(u,b),I=f(u,b);return d.concat(I)}r.validateVisitor=c;function A(u,b){var d=e.map(b,function(I){if(!e.isFunction(u[I]))return{msg:"Missing visitor method: <"+I+"> on "+t.functionName(u.constructor)+" CST Visitor.",type:o.MISSING_METHOD,methodName:I}});return e.compact(d)}r.validateMissingCstMethods=A;var a=["constructor","visit","validateVisitor"];function f(u,b){var d=[];for(var I in u)e.isFunction(u[I])&&!e.contains(a,I)&&!e.contains(b,I)&&d.push({msg:"Redundant visitor method: <"+I+"> on "+t.functionName(u.constructor)+` CST Visitor
|
|
168
168
|
There is no Grammar Rule corresponding to this method's name.
|
|
169
|
-
`,type:o.REDUNDANT_METHOD,methodName:E});return d}n.validateRedundantMethods=f}),xo=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TreeBuilder=void 0;var e=Lo(),t=ke(),r=_o(),i=Je(),s=(function(){function o(){}return o.prototype.initTreeBuilder=function(c){if(this.CST_STACK=[],this.outputCst=c.outputCst,this.nodeLocationTracking=t.has(c,"nodeLocationTracking")?c.nodeLocationTracking:i.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=t.NOOP,this.cstFinallyStateUpdate=t.NOOP,this.cstPostTerminal=t.NOOP,this.cstPostNonTerminal=t.NOOP,this.cstPostRule=t.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=e.setNodeLocationFull,this.setNodeLocationFromNode=e.setNodeLocationFull,this.cstPostRule=t.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=t.NOOP,this.setNodeLocationFromNode=t.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=e.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=e.setNodeLocationOnlyOffset,this.cstPostRule=t.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=t.NOOP,this.setNodeLocationFromNode=t.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=t.NOOP,this.setNodeLocationFromNode=t.NOOP,this.cstPostRule=t.NOOP,this.setInitialNodeLocation=t.NOOP;else throw Error('Invalid <nodeLocationTracking> config option: "'+c.nodeLocationTracking+'"')},o.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(c){c.location={startOffset:NaN,endOffset:NaN}},o.prototype.setInitialNodeLocationOnlyOffsetRegular=function(c){c.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},o.prototype.setInitialNodeLocationFullRecovery=function(c){c.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},o.prototype.setInitialNodeLocationFullRegular=function(c){var A=this.LA(1);c.location={startOffset:A.startOffset,startLine:A.startLine,startColumn:A.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},o.prototype.cstInvocationStateUpdate=function(c,A){var a={name:c,children:{}};this.setInitialNodeLocation(a),this.CST_STACK.push(a)},o.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},o.prototype.cstPostRuleFull=function(c){var A=this.LA(0),a=c.location;a.startOffset<=A.startOffset?(a.endOffset=A.endOffset,a.endLine=A.endLine,a.endColumn=A.endColumn):(a.startOffset=NaN,a.startLine=NaN,a.startColumn=NaN)},o.prototype.cstPostRuleOnlyOffset=function(c){var A=this.LA(0),a=c.location;a.startOffset<=A.startOffset?a.endOffset=A.endOffset:a.startOffset=NaN},o.prototype.cstPostTerminal=function(c,A){var a=this.CST_STACK[this.CST_STACK.length-1];e.addTerminalToCst(a,A,c),this.setNodeLocationFromToken(a.location,A)},o.prototype.cstPostNonTerminal=function(c,A){var a=this.CST_STACK[this.CST_STACK.length-1];e.addNoneTerminalToCst(a,A,c),this.setNodeLocationFromNode(a.location,c.location)},o.prototype.getBaseCstVisitorConstructor=function(){if(t.isUndefined(this.baseCstVisitorConstructor)){var c=r.createBaseSemanticVisitorConstructor(this.className,t.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=c,c}return this.baseCstVisitorConstructor},o.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(t.isUndefined(this.baseCstVisitorWithDefaultsConstructor)){var c=r.createBaseVisitorConstructorWithDefaults(this.className,t.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=c,c}return this.baseCstVisitorWithDefaultsConstructor},o.prototype.getLastExplicitRuleShortName=function(){var c=this.RULE_STACK;return c[c.length-1]},o.prototype.getPreviousExplicitRuleShortName=function(){var c=this.RULE_STACK;return c[c.length-2]},o.prototype.getLastExplicitRuleOccurrenceIndex=function(){var c=this.RULE_OCCURRENCE_STACK;return c[c.length-1]},o})();n.TreeBuilder=s}),No=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LexerAdapter=void 0;var e=Je(),t=(function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(i){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=i,this.tokVectorLength=i.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):e.END_OF_FILE},r.prototype.LA=function(i){var s=this.currIdx+i;return s<0||this.tokVectorLength<=s?e.END_OF_FILE:this.tokVector[s]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(i){this.currIdx=i},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r})();n.LexerAdapter=t}),Do=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RecognizerApi=void 0;var e=ke(),t=mt(),r=Je(),i=wt(),s=Fi(),o=ze(),c=(function(){function A(){}return A.prototype.ACTION=function(a){return a.call(this)},A.prototype.consume=function(a,f,u){return this.consumeInternal(f,a,u)},A.prototype.subrule=function(a,f,u){return this.subruleInternal(f,a,u)},A.prototype.option=function(a,f){return this.optionInternal(f,a)},A.prototype.or=function(a,f){return this.orInternal(f,a)},A.prototype.many=function(a,f){return this.manyInternal(a,f)},A.prototype.atLeastOne=function(a,f){return this.atLeastOneInternal(a,f)},A.prototype.CONSUME=function(a,f){return this.consumeInternal(a,0,f)},A.prototype.CONSUME1=function(a,f){return this.consumeInternal(a,1,f)},A.prototype.CONSUME2=function(a,f){return this.consumeInternal(a,2,f)},A.prototype.CONSUME3=function(a,f){return this.consumeInternal(a,3,f)},A.prototype.CONSUME4=function(a,f){return this.consumeInternal(a,4,f)},A.prototype.CONSUME5=function(a,f){return this.consumeInternal(a,5,f)},A.prototype.CONSUME6=function(a,f){return this.consumeInternal(a,6,f)},A.prototype.CONSUME7=function(a,f){return this.consumeInternal(a,7,f)},A.prototype.CONSUME8=function(a,f){return this.consumeInternal(a,8,f)},A.prototype.CONSUME9=function(a,f){return this.consumeInternal(a,9,f)},A.prototype.SUBRULE=function(a,f){return this.subruleInternal(a,0,f)},A.prototype.SUBRULE1=function(a,f){return this.subruleInternal(a,1,f)},A.prototype.SUBRULE2=function(a,f){return this.subruleInternal(a,2,f)},A.prototype.SUBRULE3=function(a,f){return this.subruleInternal(a,3,f)},A.prototype.SUBRULE4=function(a,f){return this.subruleInternal(a,4,f)},A.prototype.SUBRULE5=function(a,f){return this.subruleInternal(a,5,f)},A.prototype.SUBRULE6=function(a,f){return this.subruleInternal(a,6,f)},A.prototype.SUBRULE7=function(a,f){return this.subruleInternal(a,7,f)},A.prototype.SUBRULE8=function(a,f){return this.subruleInternal(a,8,f)},A.prototype.SUBRULE9=function(a,f){return this.subruleInternal(a,9,f)},A.prototype.OPTION=function(a){return this.optionInternal(a,0)},A.prototype.OPTION1=function(a){return this.optionInternal(a,1)},A.prototype.OPTION2=function(a){return this.optionInternal(a,2)},A.prototype.OPTION3=function(a){return this.optionInternal(a,3)},A.prototype.OPTION4=function(a){return this.optionInternal(a,4)},A.prototype.OPTION5=function(a){return this.optionInternal(a,5)},A.prototype.OPTION6=function(a){return this.optionInternal(a,6)},A.prototype.OPTION7=function(a){return this.optionInternal(a,7)},A.prototype.OPTION8=function(a){return this.optionInternal(a,8)},A.prototype.OPTION9=function(a){return this.optionInternal(a,9)},A.prototype.OR=function(a){return this.orInternal(a,0)},A.prototype.OR1=function(a){return this.orInternal(a,1)},A.prototype.OR2=function(a){return this.orInternal(a,2)},A.prototype.OR3=function(a){return this.orInternal(a,3)},A.prototype.OR4=function(a){return this.orInternal(a,4)},A.prototype.OR5=function(a){return this.orInternal(a,5)},A.prototype.OR6=function(a){return this.orInternal(a,6)},A.prototype.OR7=function(a){return this.orInternal(a,7)},A.prototype.OR8=function(a){return this.orInternal(a,8)},A.prototype.OR9=function(a){return this.orInternal(a,9)},A.prototype.MANY=function(a){this.manyInternal(0,a)},A.prototype.MANY1=function(a){this.manyInternal(1,a)},A.prototype.MANY2=function(a){this.manyInternal(2,a)},A.prototype.MANY3=function(a){this.manyInternal(3,a)},A.prototype.MANY4=function(a){this.manyInternal(4,a)},A.prototype.MANY5=function(a){this.manyInternal(5,a)},A.prototype.MANY6=function(a){this.manyInternal(6,a)},A.prototype.MANY7=function(a){this.manyInternal(7,a)},A.prototype.MANY8=function(a){this.manyInternal(8,a)},A.prototype.MANY9=function(a){this.manyInternal(9,a)},A.prototype.MANY_SEP=function(a){this.manySepFirstInternal(0,a)},A.prototype.MANY_SEP1=function(a){this.manySepFirstInternal(1,a)},A.prototype.MANY_SEP2=function(a){this.manySepFirstInternal(2,a)},A.prototype.MANY_SEP3=function(a){this.manySepFirstInternal(3,a)},A.prototype.MANY_SEP4=function(a){this.manySepFirstInternal(4,a)},A.prototype.MANY_SEP5=function(a){this.manySepFirstInternal(5,a)},A.prototype.MANY_SEP6=function(a){this.manySepFirstInternal(6,a)},A.prototype.MANY_SEP7=function(a){this.manySepFirstInternal(7,a)},A.prototype.MANY_SEP8=function(a){this.manySepFirstInternal(8,a)},A.prototype.MANY_SEP9=function(a){this.manySepFirstInternal(9,a)},A.prototype.AT_LEAST_ONE=function(a){this.atLeastOneInternal(0,a)},A.prototype.AT_LEAST_ONE1=function(a){return this.atLeastOneInternal(1,a)},A.prototype.AT_LEAST_ONE2=function(a){this.atLeastOneInternal(2,a)},A.prototype.AT_LEAST_ONE3=function(a){this.atLeastOneInternal(3,a)},A.prototype.AT_LEAST_ONE4=function(a){this.atLeastOneInternal(4,a)},A.prototype.AT_LEAST_ONE5=function(a){this.atLeastOneInternal(5,a)},A.prototype.AT_LEAST_ONE6=function(a){this.atLeastOneInternal(6,a)},A.prototype.AT_LEAST_ONE7=function(a){this.atLeastOneInternal(7,a)},A.prototype.AT_LEAST_ONE8=function(a){this.atLeastOneInternal(8,a)},A.prototype.AT_LEAST_ONE9=function(a){this.atLeastOneInternal(9,a)},A.prototype.AT_LEAST_ONE_SEP=function(a){this.atLeastOneSepFirstInternal(0,a)},A.prototype.AT_LEAST_ONE_SEP1=function(a){this.atLeastOneSepFirstInternal(1,a)},A.prototype.AT_LEAST_ONE_SEP2=function(a){this.atLeastOneSepFirstInternal(2,a)},A.prototype.AT_LEAST_ONE_SEP3=function(a){this.atLeastOneSepFirstInternal(3,a)},A.prototype.AT_LEAST_ONE_SEP4=function(a){this.atLeastOneSepFirstInternal(4,a)},A.prototype.AT_LEAST_ONE_SEP5=function(a){this.atLeastOneSepFirstInternal(5,a)},A.prototype.AT_LEAST_ONE_SEP6=function(a){this.atLeastOneSepFirstInternal(6,a)},A.prototype.AT_LEAST_ONE_SEP7=function(a){this.atLeastOneSepFirstInternal(7,a)},A.prototype.AT_LEAST_ONE_SEP8=function(a){this.atLeastOneSepFirstInternal(8,a)},A.prototype.AT_LEAST_ONE_SEP9=function(a){this.atLeastOneSepFirstInternal(9,a)},A.prototype.RULE=function(a,f,u){if(u===void 0&&(u=r.DEFAULT_RULE_CONFIG),e.contains(this.definedRulesNames,a)){var b=i.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:a,grammarName:this.className}),d={message:b,type:r.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:a};this.definitionErrors.push(d)}this.definedRulesNames.push(a);var E=this.defineRule(a,f,u);return this[a]=E,E},A.prototype.OVERRIDE_RULE=function(a,f,u){u===void 0&&(u=r.DEFAULT_RULE_CONFIG);var b=[];b=b.concat(s.validateRuleIsOverridden(a,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(b);var d=this.defineRule(a,f,u);return this[a]=d,d},A.prototype.BACKTRACK=function(a,f){return function(){this.isBackTrackingStack.push(1);var u=this.saveRecogState();try{return a.apply(this,f),!0}catch(b){if(t.isRecognitionException(b))return!1;throw b}finally{this.reloadRecogState(u),this.isBackTrackingStack.pop()}}},A.prototype.getGAstProductions=function(){return this.gastProductionsCache},A.prototype.getSerializedGastProductions=function(){return o.serializeGrammar(e.values(this.gastProductionsCache))},A})();n.RecognizerApi=c}),Oo=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RecognizerEngine=void 0;var e=ke(),t=cn(),r=mt(),i=kt(),s=vt(),o=Je(),c=Mi(),A=st(),a=Et(),f=Pi(),u=(function(){function b(){}return b.prototype.initRecognizerEngine=function(d,E){if(this.className=f.classNameFromInstance(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=a.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},e.has(E,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
169
|
+
`,type:o.REDUNDANT_METHOD,methodName:I});return d}r.validateRedundantMethods=f}),Go=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TreeBuilder=void 0;var e=Oo(),t=Se(),i=Po(),n=Xe(),s=(function(){function o(){}return o.prototype.initTreeBuilder=function(c){if(this.CST_STACK=[],this.outputCst=c.outputCst,this.nodeLocationTracking=t.has(c,"nodeLocationTracking")?c.nodeLocationTracking:n.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=t.NOOP,this.cstFinallyStateUpdate=t.NOOP,this.cstPostTerminal=t.NOOP,this.cstPostNonTerminal=t.NOOP,this.cstPostRule=t.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=e.setNodeLocationFull,this.setNodeLocationFromNode=e.setNodeLocationFull,this.cstPostRule=t.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=t.NOOP,this.setNodeLocationFromNode=t.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=e.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=e.setNodeLocationOnlyOffset,this.cstPostRule=t.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=t.NOOP,this.setNodeLocationFromNode=t.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=t.NOOP,this.setNodeLocationFromNode=t.NOOP,this.cstPostRule=t.NOOP,this.setInitialNodeLocation=t.NOOP;else throw Error('Invalid <nodeLocationTracking> config option: "'+c.nodeLocationTracking+'"')},o.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(c){c.location={startOffset:NaN,endOffset:NaN}},o.prototype.setInitialNodeLocationOnlyOffsetRegular=function(c){c.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},o.prototype.setInitialNodeLocationFullRecovery=function(c){c.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},o.prototype.setInitialNodeLocationFullRegular=function(c){var A=this.LA(1);c.location={startOffset:A.startOffset,startLine:A.startLine,startColumn:A.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},o.prototype.cstInvocationStateUpdate=function(c,A){var a={name:c,children:{}};this.setInitialNodeLocation(a),this.CST_STACK.push(a)},o.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},o.prototype.cstPostRuleFull=function(c){var A=this.LA(0),a=c.location;a.startOffset<=A.startOffset?(a.endOffset=A.endOffset,a.endLine=A.endLine,a.endColumn=A.endColumn):(a.startOffset=NaN,a.startLine=NaN,a.startColumn=NaN)},o.prototype.cstPostRuleOnlyOffset=function(c){var A=this.LA(0),a=c.location;a.startOffset<=A.startOffset?a.endOffset=A.endOffset:a.startOffset=NaN},o.prototype.cstPostTerminal=function(c,A){var a=this.CST_STACK[this.CST_STACK.length-1];e.addTerminalToCst(a,A,c),this.setNodeLocationFromToken(a.location,A)},o.prototype.cstPostNonTerminal=function(c,A){var a=this.CST_STACK[this.CST_STACK.length-1];e.addNoneTerminalToCst(a,A,c),this.setNodeLocationFromNode(a.location,c.location)},o.prototype.getBaseCstVisitorConstructor=function(){if(t.isUndefined(this.baseCstVisitorConstructor)){var c=i.createBaseSemanticVisitorConstructor(this.className,t.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=c,c}return this.baseCstVisitorConstructor},o.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(t.isUndefined(this.baseCstVisitorWithDefaultsConstructor)){var c=i.createBaseVisitorConstructorWithDefaults(this.className,t.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=c,c}return this.baseCstVisitorWithDefaultsConstructor},o.prototype.getLastExplicitRuleShortName=function(){var c=this.RULE_STACK;return c[c.length-1]},o.prototype.getPreviousExplicitRuleShortName=function(){var c=this.RULE_STACK;return c[c.length-2]},o.prototype.getLastExplicitRuleOccurrenceIndex=function(){var c=this.RULE_OCCURRENCE_STACK;return c[c.length-1]},o})();r.TreeBuilder=s}),Uo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LexerAdapter=void 0;var e=Xe(),t=(function(){function i(){}return i.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(i.prototype,"input",{get:function(){return this.tokVector},set:function(n){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=n,this.tokVectorLength=n.length},enumerable:!1,configurable:!0}),i.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):e.END_OF_FILE},i.prototype.LA=function(n){var s=this.currIdx+n;return s<0||this.tokVectorLength<=s?e.END_OF_FILE:this.tokVector[s]},i.prototype.consumeToken=function(){this.currIdx++},i.prototype.exportLexerState=function(){return this.currIdx},i.prototype.importLexerState=function(n){this.currIdx=n},i.prototype.resetLexerState=function(){this.currIdx=-1},i.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},i.prototype.getLexerPosition=function(){return this.exportLexerState()},i})();r.LexerAdapter=t}),Ho=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RecognizerApi=void 0;var e=Se(),t=Ct(),i=Xe(),n=St(),s=Pi(),o=We(),c=(function(){function A(){}return A.prototype.ACTION=function(a){return a.call(this)},A.prototype.consume=function(a,f,u){return this.consumeInternal(f,a,u)},A.prototype.subrule=function(a,f,u){return this.subruleInternal(f,a,u)},A.prototype.option=function(a,f){return this.optionInternal(f,a)},A.prototype.or=function(a,f){return this.orInternal(f,a)},A.prototype.many=function(a,f){return this.manyInternal(a,f)},A.prototype.atLeastOne=function(a,f){return this.atLeastOneInternal(a,f)},A.prototype.CONSUME=function(a,f){return this.consumeInternal(a,0,f)},A.prototype.CONSUME1=function(a,f){return this.consumeInternal(a,1,f)},A.prototype.CONSUME2=function(a,f){return this.consumeInternal(a,2,f)},A.prototype.CONSUME3=function(a,f){return this.consumeInternal(a,3,f)},A.prototype.CONSUME4=function(a,f){return this.consumeInternal(a,4,f)},A.prototype.CONSUME5=function(a,f){return this.consumeInternal(a,5,f)},A.prototype.CONSUME6=function(a,f){return this.consumeInternal(a,6,f)},A.prototype.CONSUME7=function(a,f){return this.consumeInternal(a,7,f)},A.prototype.CONSUME8=function(a,f){return this.consumeInternal(a,8,f)},A.prototype.CONSUME9=function(a,f){return this.consumeInternal(a,9,f)},A.prototype.SUBRULE=function(a,f){return this.subruleInternal(a,0,f)},A.prototype.SUBRULE1=function(a,f){return this.subruleInternal(a,1,f)},A.prototype.SUBRULE2=function(a,f){return this.subruleInternal(a,2,f)},A.prototype.SUBRULE3=function(a,f){return this.subruleInternal(a,3,f)},A.prototype.SUBRULE4=function(a,f){return this.subruleInternal(a,4,f)},A.prototype.SUBRULE5=function(a,f){return this.subruleInternal(a,5,f)},A.prototype.SUBRULE6=function(a,f){return this.subruleInternal(a,6,f)},A.prototype.SUBRULE7=function(a,f){return this.subruleInternal(a,7,f)},A.prototype.SUBRULE8=function(a,f){return this.subruleInternal(a,8,f)},A.prototype.SUBRULE9=function(a,f){return this.subruleInternal(a,9,f)},A.prototype.OPTION=function(a){return this.optionInternal(a,0)},A.prototype.OPTION1=function(a){return this.optionInternal(a,1)},A.prototype.OPTION2=function(a){return this.optionInternal(a,2)},A.prototype.OPTION3=function(a){return this.optionInternal(a,3)},A.prototype.OPTION4=function(a){return this.optionInternal(a,4)},A.prototype.OPTION5=function(a){return this.optionInternal(a,5)},A.prototype.OPTION6=function(a){return this.optionInternal(a,6)},A.prototype.OPTION7=function(a){return this.optionInternal(a,7)},A.prototype.OPTION8=function(a){return this.optionInternal(a,8)},A.prototype.OPTION9=function(a){return this.optionInternal(a,9)},A.prototype.OR=function(a){return this.orInternal(a,0)},A.prototype.OR1=function(a){return this.orInternal(a,1)},A.prototype.OR2=function(a){return this.orInternal(a,2)},A.prototype.OR3=function(a){return this.orInternal(a,3)},A.prototype.OR4=function(a){return this.orInternal(a,4)},A.prototype.OR5=function(a){return this.orInternal(a,5)},A.prototype.OR6=function(a){return this.orInternal(a,6)},A.prototype.OR7=function(a){return this.orInternal(a,7)},A.prototype.OR8=function(a){return this.orInternal(a,8)},A.prototype.OR9=function(a){return this.orInternal(a,9)},A.prototype.MANY=function(a){this.manyInternal(0,a)},A.prototype.MANY1=function(a){this.manyInternal(1,a)},A.prototype.MANY2=function(a){this.manyInternal(2,a)},A.prototype.MANY3=function(a){this.manyInternal(3,a)},A.prototype.MANY4=function(a){this.manyInternal(4,a)},A.prototype.MANY5=function(a){this.manyInternal(5,a)},A.prototype.MANY6=function(a){this.manyInternal(6,a)},A.prototype.MANY7=function(a){this.manyInternal(7,a)},A.prototype.MANY8=function(a){this.manyInternal(8,a)},A.prototype.MANY9=function(a){this.manyInternal(9,a)},A.prototype.MANY_SEP=function(a){this.manySepFirstInternal(0,a)},A.prototype.MANY_SEP1=function(a){this.manySepFirstInternal(1,a)},A.prototype.MANY_SEP2=function(a){this.manySepFirstInternal(2,a)},A.prototype.MANY_SEP3=function(a){this.manySepFirstInternal(3,a)},A.prototype.MANY_SEP4=function(a){this.manySepFirstInternal(4,a)},A.prototype.MANY_SEP5=function(a){this.manySepFirstInternal(5,a)},A.prototype.MANY_SEP6=function(a){this.manySepFirstInternal(6,a)},A.prototype.MANY_SEP7=function(a){this.manySepFirstInternal(7,a)},A.prototype.MANY_SEP8=function(a){this.manySepFirstInternal(8,a)},A.prototype.MANY_SEP9=function(a){this.manySepFirstInternal(9,a)},A.prototype.AT_LEAST_ONE=function(a){this.atLeastOneInternal(0,a)},A.prototype.AT_LEAST_ONE1=function(a){return this.atLeastOneInternal(1,a)},A.prototype.AT_LEAST_ONE2=function(a){this.atLeastOneInternal(2,a)},A.prototype.AT_LEAST_ONE3=function(a){this.atLeastOneInternal(3,a)},A.prototype.AT_LEAST_ONE4=function(a){this.atLeastOneInternal(4,a)},A.prototype.AT_LEAST_ONE5=function(a){this.atLeastOneInternal(5,a)},A.prototype.AT_LEAST_ONE6=function(a){this.atLeastOneInternal(6,a)},A.prototype.AT_LEAST_ONE7=function(a){this.atLeastOneInternal(7,a)},A.prototype.AT_LEAST_ONE8=function(a){this.atLeastOneInternal(8,a)},A.prototype.AT_LEAST_ONE9=function(a){this.atLeastOneInternal(9,a)},A.prototype.AT_LEAST_ONE_SEP=function(a){this.atLeastOneSepFirstInternal(0,a)},A.prototype.AT_LEAST_ONE_SEP1=function(a){this.atLeastOneSepFirstInternal(1,a)},A.prototype.AT_LEAST_ONE_SEP2=function(a){this.atLeastOneSepFirstInternal(2,a)},A.prototype.AT_LEAST_ONE_SEP3=function(a){this.atLeastOneSepFirstInternal(3,a)},A.prototype.AT_LEAST_ONE_SEP4=function(a){this.atLeastOneSepFirstInternal(4,a)},A.prototype.AT_LEAST_ONE_SEP5=function(a){this.atLeastOneSepFirstInternal(5,a)},A.prototype.AT_LEAST_ONE_SEP6=function(a){this.atLeastOneSepFirstInternal(6,a)},A.prototype.AT_LEAST_ONE_SEP7=function(a){this.atLeastOneSepFirstInternal(7,a)},A.prototype.AT_LEAST_ONE_SEP8=function(a){this.atLeastOneSepFirstInternal(8,a)},A.prototype.AT_LEAST_ONE_SEP9=function(a){this.atLeastOneSepFirstInternal(9,a)},A.prototype.RULE=function(a,f,u){if(u===void 0&&(u=i.DEFAULT_RULE_CONFIG),e.contains(this.definedRulesNames,a)){var b=n.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:a,grammarName:this.className}),d={message:b,type:i.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:a};this.definitionErrors.push(d)}this.definedRulesNames.push(a);var I=this.defineRule(a,f,u);return this[a]=I,I},A.prototype.OVERRIDE_RULE=function(a,f,u){u===void 0&&(u=i.DEFAULT_RULE_CONFIG);var b=[];b=b.concat(s.validateRuleIsOverridden(a,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(b);var d=this.defineRule(a,f,u);return this[a]=d,d},A.prototype.BACKTRACK=function(a,f){return function(){this.isBackTrackingStack.push(1);var u=this.saveRecogState();try{return a.apply(this,f),!0}catch(b){if(t.isRecognitionException(b))return!1;throw b}finally{this.reloadRecogState(u),this.isBackTrackingStack.pop()}}},A.prototype.getGAstProductions=function(){return this.gastProductionsCache},A.prototype.getSerializedGastProductions=function(){return o.serializeGrammar(e.values(this.gastProductionsCache))},A})();r.RecognizerApi=c}),jo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RecognizerEngine=void 0;var e=Se(),t=un(),i=Ct(),n=Lt(),s=_t(),o=Xe(),c=Gi(),A=ct(),a=mt(),f=Ui(),u=(function(){function b(){}return b.prototype.initRecognizerEngine=function(d,I){if(this.className=f.classNameFromInstance(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=a.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},e.has(I,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
170
170
|
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
171
171
|
For Further details.`);if(e.isArray(d)){if(e.isEmpty(d))throw Error(`A Token Vocabulary cannot be empty.
|
|
172
172
|
Note that the first argument for the parser constructor
|
|
173
173
|
is no longer a Token vector (since v4.0).`);if(typeof d[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
|
174
174
|
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
175
|
-
For Further details.`)}if(e.isArray(d))this.tokensMap=e.reduce(d,function(p,C){return p[C.name]=C,p},{});else if(e.has(d,"modes")&&e.every(e.flatten(e.values(d.modes)),a.isTokenType)){var g=e.flatten(e.values(d.modes)),l=e.uniq(g);this.tokensMap=e.reduce(l,function(p,C){return p[C.name]=C,p},{})}else if(e.isObject(d))this.tokensMap=e.cloneObj(d);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=A.EOF;var h=e.every(e.values(d),function(p){return e.isEmpty(p.categoryMatches)});this.tokenMatcher=h?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher,a.augmentTokenTypes(e.values(this.tokensMap))},b.prototype.defineRule=function(d,
|
|
176
|
-
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var l=e.has(g,"resyncEnabled")?g.resyncEnabled:o.DEFAULT_RULE_CONFIG.resyncEnabled,h=e.has(g,"recoveryValueFunc")?g.recoveryValueFunc:o.DEFAULT_RULE_CONFIG.recoveryValueFunc,p=this.ruleShortNameIdx<<t.BITS_FOR_METHOD_TYPE+t.BITS_FOR_OCCURRENCE_IDX;this.ruleShortNameIdx++,this.shortRuleNameToFull[p]=d,this.fullRuleNameToShort[d]=p;function C(v){try{if(this.outputCst===!0){E.apply(this,v);var S=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(S),S}else return E.apply(this,v)}catch(U){return this.invokeRuleCatch(U,l,h)}finally{this.ruleFinallyStateUpdate()}}var m=function(v,S){return v===void 0&&(v=0),this.ruleInvocationStateUpdate(p,d,v),C.call(this,S)},y="ruleName";return m[y]=d,m.originalGrammarAction=E,m},b.prototype.invokeRuleCatch=function(d,E,g){var l=this.RULE_STACK.length===1,h=E&&!this.isBackTracking()&&this.recoveryEnabled;if(r.isRecognitionException(d)){var p=d;if(h){var C=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(C))if(p.resyncedTokens=this.reSyncTo(C),this.outputCst){var m=this.CST_STACK[this.CST_STACK.length-1];return m.recoveredNode=!0,m}else return g();else{if(this.outputCst){var m=this.CST_STACK[this.CST_STACK.length-1];m.recoveredNode=!0,p.partialCstResult=m}throw p}}else{if(l)return this.moveToTerminatedState(),g();throw p}}else throw d},b.prototype.optionInternal=function(d,E){var g=this.getKeyForAutomaticLookahead(t.OPTION_IDX,E);return this.optionInternalLogic(d,E,g)},b.prototype.optionInternalLogic=function(d,E,g){var l=this,h=this.getLaFuncFromCache(g),p,C;if(d.DEF!==void 0){if(p=d.DEF,C=d.GATE,C!==void 0){var m=h;h=function(){return C.call(l)&&m.call(l)}}}else p=d;if(h.call(this)===!0)return p.call(this)},b.prototype.atLeastOneInternal=function(d,E){var g=this.getKeyForAutomaticLookahead(t.AT_LEAST_ONE_IDX,d);return this.atLeastOneInternalLogic(d,E,g)},b.prototype.atLeastOneInternalLogic=function(d,E,g){var l=this,h=this.getLaFuncFromCache(g),p,C;if(E.DEF!==void 0){if(p=E.DEF,C=E.GATE,C!==void 0){var m=h;h=function(){return C.call(l)&&m.call(l)}}}else p=E;if(h.call(this)===!0)for(var y=this.doSingleRepetition(p);h.call(this)===!0&&y===!0;)y=this.doSingleRepetition(p);else throw this.raiseEarlyExitException(d,i.PROD_TYPE.REPETITION_MANDATORY,E.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[d,E],h,t.AT_LEAST_ONE_IDX,d,s.NextTerminalAfterAtLeastOneWalker)},b.prototype.atLeastOneSepFirstInternal=function(d,E){var g=this.getKeyForAutomaticLookahead(t.AT_LEAST_ONE_SEP_IDX,d);this.atLeastOneSepFirstInternalLogic(d,E,g)},b.prototype.atLeastOneSepFirstInternalLogic=function(d,E,g){var l=this,h=E.DEF,p=E.SEP,C=this.getLaFuncFromCache(g);if(C.call(this)===!0){h.call(this);for(var m=function(){return l.tokenMatcher(l.LA(1),p)};this.tokenMatcher(this.LA(1),p)===!0;)this.CONSUME(p),h.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[d,p,m,h,s.NextTerminalAfterAtLeastOneSepWalker],m,t.AT_LEAST_ONE_SEP_IDX,d,s.NextTerminalAfterAtLeastOneSepWalker)}else throw this.raiseEarlyExitException(d,i.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,E.ERR_MSG)},b.prototype.manyInternal=function(d,E){var g=this.getKeyForAutomaticLookahead(t.MANY_IDX,d);return this.manyInternalLogic(d,E,g)},b.prototype.manyInternalLogic=function(d,E,g){var l=this,h=this.getLaFuncFromCache(g),p,C;if(E.DEF!==void 0){if(p=E.DEF,C=E.GATE,C!==void 0){var m=h;h=function(){return C.call(l)&&m.call(l)}}}else p=E;for(var y=!0;h.call(this)===!0&&y===!0;)y=this.doSingleRepetition(p);this.attemptInRepetitionRecovery(this.manyInternal,[d,E],h,t.MANY_IDX,d,s.NextTerminalAfterManyWalker,y)},b.prototype.manySepFirstInternal=function(d,E){var g=this.getKeyForAutomaticLookahead(t.MANY_SEP_IDX,d);this.manySepFirstInternalLogic(d,E,g)},b.prototype.manySepFirstInternalLogic=function(d,E,g){var l=this,h=E.DEF,p=E.SEP,C=this.getLaFuncFromCache(g);if(C.call(this)===!0){h.call(this);for(var m=function(){return l.tokenMatcher(l.LA(1),p)};this.tokenMatcher(this.LA(1),p)===!0;)this.CONSUME(p),h.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[d,p,m,h,s.NextTerminalAfterManySepWalker],m,t.MANY_SEP_IDX,d,s.NextTerminalAfterManySepWalker)}},b.prototype.repetitionSepSecondInternal=function(d,E,g,l,h){for(;g();)this.CONSUME(E),l.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[d,E,g,l,h],g,t.AT_LEAST_ONE_SEP_IDX,d,h)},b.prototype.doSingleRepetition=function(d){var E=this.getLexerPosition();d.call(this);var g=this.getLexerPosition();return g>E},b.prototype.orInternal=function(d,E){var g=this.getKeyForAutomaticLookahead(t.OR_IDX,E),l=e.isArray(d)?d:d.DEF,h=this.getLaFuncFromCache(g),p=h.call(this,l);if(p!==void 0){var C=l[p];return C.ALT.call(this)}this.raiseNoAltException(E,d.ERR_MSG)},b.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var d=this.LA(1),E=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:d,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new r.NotAllInputParsedException(E,d))}},b.prototype.subruleInternal=function(d,E,g){var l;try{var h=g!==void 0?g.ARGS:void 0;return l=d.call(this,E,h),this.cstPostNonTerminal(l,g!==void 0&&g.LABEL!==void 0?g.LABEL:d.ruleName),l}catch(p){this.subruleInternalError(p,g,d.ruleName)}},b.prototype.subruleInternalError=function(d,E,g){throw r.isRecognitionException(d)&&d.partialCstResult!==void 0&&(this.cstPostNonTerminal(d.partialCstResult,E!==void 0&&E.LABEL!==void 0?E.LABEL:g),delete d.partialCstResult),d},b.prototype.consumeInternal=function(d,E,g){var l;try{var h=this.LA(1);this.tokenMatcher(h,d)===!0?(this.consumeToken(),l=h):this.consumeInternalError(d,h,g)}catch(p){l=this.consumeInternalRecovery(d,E,p)}return this.cstPostTerminal(g!==void 0&&g.LABEL!==void 0?g.LABEL:d.name,l),l},b.prototype.consumeInternalError=function(d,E,g){var l,h=this.LA(0);throw g!==void 0&&g.ERR_MSG?l=g.ERR_MSG:l=this.errorMessageProvider.buildMismatchTokenMessage({expected:d,actual:E,previous:h,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new r.MismatchedTokenException(l,E,h))},b.prototype.consumeInternalRecovery=function(d,E,g){if(this.recoveryEnabled&&g.name==="MismatchedTokenException"&&!this.isBackTracking()){var l=this.getFollowsForInRuleRecovery(d,E);try{return this.tryInRuleRecovery(d,l)}catch(h){throw h.name===c.IN_RULE_RECOVERY_EXCEPTION?g:h}}else throw g},b.prototype.saveRecogState=function(){var d=this.errors,E=e.cloneArr(this.RULE_STACK);return{errors:d,lexerState:this.exportLexerState(),RULE_STACK:E,CST_STACK:this.CST_STACK}},b.prototype.reloadRecogState=function(d){this.errors=d.errors,this.importLexerState(d.lexerState),this.RULE_STACK=d.RULE_STACK},b.prototype.ruleInvocationStateUpdate=function(d,E,g){this.RULE_OCCURRENCE_STACK.push(g),this.RULE_STACK.push(d),this.cstInvocationStateUpdate(E,d)},b.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},b.prototype.getCurrRuleFullName=function(){var d=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[d]},b.prototype.shortRuleNameToFullName=function(d){return this.shortRuleNameToFull[d]},b.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),A.EOF)},b.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},b})();n.RecognizerEngine=u}),Fo=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorHandler=void 0;var e=mt(),t=ke(),r=kt(),i=Je(),s=(function(){function o(){}return o.prototype.initErrorHandler=function(c){this._errors=[],this.errorMessageProvider=t.has(c,"errorMessageProvider")?c.errorMessageProvider:i.DEFAULT_PARSER_CONFIG.errorMessageProvider},o.prototype.SAVE_ERROR=function(c){if(e.isRecognitionException(c))return c.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:t.cloneArr(this.RULE_OCCURRENCE_STACK)},this._errors.push(c),c;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(o.prototype,"errors",{get:function(){return t.cloneArr(this._errors)},set:function(c){this._errors=c},enumerable:!1,configurable:!0}),o.prototype.raiseEarlyExitException=function(c,A,a){for(var f=this.getCurrRuleFullName(),u=this.getGAstProductions()[f],b=r.getLookaheadPathsForOptionalProd(c,u,A,this.maxLookahead),d=b[0],E=[],g=1;g<=this.maxLookahead;g++)E.push(this.LA(g));var l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:d,actual:E,previous:this.LA(0),customUserDescription:a,ruleName:f});throw this.SAVE_ERROR(new e.EarlyExitException(l,this.LA(1),this.LA(0)))},o.prototype.raiseNoAltException=function(c,A){for(var a=this.getCurrRuleFullName(),f=this.getGAstProductions()[a],u=r.getLookaheadPathsForOr(c,f,this.maxLookahead),b=[],d=1;d<=this.maxLookahead;d++)b.push(this.LA(d));var E=this.LA(0),g=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:u,actual:b,previous:E,customUserDescription:A,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new e.NoViableAltException(g,this.LA(1),E))},o})();n.ErrorHandler=s}),Mo=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ContentAssist=void 0;var e=vt(),t=ke(),r=(function(){function i(){}return i.prototype.initContentAssist=function(){},i.prototype.computeContentAssist=function(s,o){var c=this.gastProductionsCache[s];if(t.isUndefined(c))throw Error("Rule ->"+s+"<- does not exist in this grammar.");return e.nextPossibleTokensAfter([c],o,this.tokenMatcher,this.maxLookahead)},i.prototype.getNextPossibleTokenTypes=function(s){var o=t.first(s.ruleStack),c=this.getGAstProductions(),A=c[o],a=new e.NextAfterTokenWalker(A,s).startWalking();return a},i})();n.ContentAssist=r}),Po=Ce(n=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GastRecorder=void 0;var e=ke(),t=ze(),r=Rt(),i=Et(),s=st(),o=Je(),c=cn(),A={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(A);var a=!0,f=Math.pow(2,c.BITS_FOR_OCCURRENCE_IDX)-1,u=s.createToken({name:"RECORDING_PHASE_TOKEN",pattern:r.Lexer.NA});i.augmentTokenTypes([u]);var b=s.createTokenInstance(u,`This IToken indicates the Parser is in Recording Phase
|
|
175
|
+
For Further details.`)}if(e.isArray(d))this.tokensMap=e.reduce(d,function(p,C){return p[C.name]=C,p},{});else if(e.has(d,"modes")&&e.every(e.flatten(e.values(d.modes)),a.isTokenType)){var g=e.flatten(e.values(d.modes)),l=e.uniq(g);this.tokensMap=e.reduce(l,function(p,C){return p[C.name]=C,p},{})}else if(e.isObject(d))this.tokensMap=e.cloneObj(d);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=A.EOF;var h=e.every(e.values(d),function(p){return e.isEmpty(p.categoryMatches)});this.tokenMatcher=h?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher,a.augmentTokenTypes(e.values(this.tokensMap))},b.prototype.defineRule=function(d,I,g){if(this.selfAnalysisDone)throw Error("Grammar rule <"+d+`> may not be defined after the 'performSelfAnalysis' method has been called'
|
|
176
|
+
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var l=e.has(g,"resyncEnabled")?g.resyncEnabled:o.DEFAULT_RULE_CONFIG.resyncEnabled,h=e.has(g,"recoveryValueFunc")?g.recoveryValueFunc:o.DEFAULT_RULE_CONFIG.recoveryValueFunc,p=this.ruleShortNameIdx<<t.BITS_FOR_METHOD_TYPE+t.BITS_FOR_OCCURRENCE_IDX;this.ruleShortNameIdx++,this.shortRuleNameToFull[p]=d,this.fullRuleNameToShort[d]=p;function C(Q){try{if(this.outputCst===!0){I.apply(this,Q);var S=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(S),S}else return I.apply(this,Q)}catch(U){return this.invokeRuleCatch(U,l,h)}finally{this.ruleFinallyStateUpdate()}}var E=function(Q,S){return Q===void 0&&(Q=0),this.ruleInvocationStateUpdate(p,d,Q),C.call(this,S)},B="ruleName";return E[B]=d,E.originalGrammarAction=I,E},b.prototype.invokeRuleCatch=function(d,I,g){var l=this.RULE_STACK.length===1,h=I&&!this.isBackTracking()&&this.recoveryEnabled;if(i.isRecognitionException(d)){var p=d;if(h){var C=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(C))if(p.resyncedTokens=this.reSyncTo(C),this.outputCst){var E=this.CST_STACK[this.CST_STACK.length-1];return E.recoveredNode=!0,E}else return g();else{if(this.outputCst){var E=this.CST_STACK[this.CST_STACK.length-1];E.recoveredNode=!0,p.partialCstResult=E}throw p}}else{if(l)return this.moveToTerminatedState(),g();throw p}}else throw d},b.prototype.optionInternal=function(d,I){var g=this.getKeyForAutomaticLookahead(t.OPTION_IDX,I);return this.optionInternalLogic(d,I,g)},b.prototype.optionInternalLogic=function(d,I,g){var l=this,h=this.getLaFuncFromCache(g),p,C;if(d.DEF!==void 0){if(p=d.DEF,C=d.GATE,C!==void 0){var E=h;h=function(){return C.call(l)&&E.call(l)}}}else p=d;if(h.call(this)===!0)return p.call(this)},b.prototype.atLeastOneInternal=function(d,I){var g=this.getKeyForAutomaticLookahead(t.AT_LEAST_ONE_IDX,d);return this.atLeastOneInternalLogic(d,I,g)},b.prototype.atLeastOneInternalLogic=function(d,I,g){var l=this,h=this.getLaFuncFromCache(g),p,C;if(I.DEF!==void 0){if(p=I.DEF,C=I.GATE,C!==void 0){var E=h;h=function(){return C.call(l)&&E.call(l)}}}else p=I;if(h.call(this)===!0)for(var B=this.doSingleRepetition(p);h.call(this)===!0&&B===!0;)B=this.doSingleRepetition(p);else throw this.raiseEarlyExitException(d,n.PROD_TYPE.REPETITION_MANDATORY,I.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[d,I],h,t.AT_LEAST_ONE_IDX,d,s.NextTerminalAfterAtLeastOneWalker)},b.prototype.atLeastOneSepFirstInternal=function(d,I){var g=this.getKeyForAutomaticLookahead(t.AT_LEAST_ONE_SEP_IDX,d);this.atLeastOneSepFirstInternalLogic(d,I,g)},b.prototype.atLeastOneSepFirstInternalLogic=function(d,I,g){var l=this,h=I.DEF,p=I.SEP,C=this.getLaFuncFromCache(g);if(C.call(this)===!0){h.call(this);for(var E=function(){return l.tokenMatcher(l.LA(1),p)};this.tokenMatcher(this.LA(1),p)===!0;)this.CONSUME(p),h.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[d,p,E,h,s.NextTerminalAfterAtLeastOneSepWalker],E,t.AT_LEAST_ONE_SEP_IDX,d,s.NextTerminalAfterAtLeastOneSepWalker)}else throw this.raiseEarlyExitException(d,n.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,I.ERR_MSG)},b.prototype.manyInternal=function(d,I){var g=this.getKeyForAutomaticLookahead(t.MANY_IDX,d);return this.manyInternalLogic(d,I,g)},b.prototype.manyInternalLogic=function(d,I,g){var l=this,h=this.getLaFuncFromCache(g),p,C;if(I.DEF!==void 0){if(p=I.DEF,C=I.GATE,C!==void 0){var E=h;h=function(){return C.call(l)&&E.call(l)}}}else p=I;for(var B=!0;h.call(this)===!0&&B===!0;)B=this.doSingleRepetition(p);this.attemptInRepetitionRecovery(this.manyInternal,[d,I],h,t.MANY_IDX,d,s.NextTerminalAfterManyWalker,B)},b.prototype.manySepFirstInternal=function(d,I){var g=this.getKeyForAutomaticLookahead(t.MANY_SEP_IDX,d);this.manySepFirstInternalLogic(d,I,g)},b.prototype.manySepFirstInternalLogic=function(d,I,g){var l=this,h=I.DEF,p=I.SEP,C=this.getLaFuncFromCache(g);if(C.call(this)===!0){h.call(this);for(var E=function(){return l.tokenMatcher(l.LA(1),p)};this.tokenMatcher(this.LA(1),p)===!0;)this.CONSUME(p),h.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[d,p,E,h,s.NextTerminalAfterManySepWalker],E,t.MANY_SEP_IDX,d,s.NextTerminalAfterManySepWalker)}},b.prototype.repetitionSepSecondInternal=function(d,I,g,l,h){for(;g();)this.CONSUME(I),l.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[d,I,g,l,h],g,t.AT_LEAST_ONE_SEP_IDX,d,h)},b.prototype.doSingleRepetition=function(d){var I=this.getLexerPosition();d.call(this);var g=this.getLexerPosition();return g>I},b.prototype.orInternal=function(d,I){var g=this.getKeyForAutomaticLookahead(t.OR_IDX,I),l=e.isArray(d)?d:d.DEF,h=this.getLaFuncFromCache(g),p=h.call(this,l);if(p!==void 0){var C=l[p];return C.ALT.call(this)}this.raiseNoAltException(I,d.ERR_MSG)},b.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var d=this.LA(1),I=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:d,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new i.NotAllInputParsedException(I,d))}},b.prototype.subruleInternal=function(d,I,g){var l;try{var h=g!==void 0?g.ARGS:void 0;return l=d.call(this,I,h),this.cstPostNonTerminal(l,g!==void 0&&g.LABEL!==void 0?g.LABEL:d.ruleName),l}catch(p){this.subruleInternalError(p,g,d.ruleName)}},b.prototype.subruleInternalError=function(d,I,g){throw i.isRecognitionException(d)&&d.partialCstResult!==void 0&&(this.cstPostNonTerminal(d.partialCstResult,I!==void 0&&I.LABEL!==void 0?I.LABEL:g),delete d.partialCstResult),d},b.prototype.consumeInternal=function(d,I,g){var l;try{var h=this.LA(1);this.tokenMatcher(h,d)===!0?(this.consumeToken(),l=h):this.consumeInternalError(d,h,g)}catch(p){l=this.consumeInternalRecovery(d,I,p)}return this.cstPostTerminal(g!==void 0&&g.LABEL!==void 0?g.LABEL:d.name,l),l},b.prototype.consumeInternalError=function(d,I,g){var l,h=this.LA(0);throw g!==void 0&&g.ERR_MSG?l=g.ERR_MSG:l=this.errorMessageProvider.buildMismatchTokenMessage({expected:d,actual:I,previous:h,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new i.MismatchedTokenException(l,I,h))},b.prototype.consumeInternalRecovery=function(d,I,g){if(this.recoveryEnabled&&g.name==="MismatchedTokenException"&&!this.isBackTracking()){var l=this.getFollowsForInRuleRecovery(d,I);try{return this.tryInRuleRecovery(d,l)}catch(h){throw h.name===c.IN_RULE_RECOVERY_EXCEPTION?g:h}}else throw g},b.prototype.saveRecogState=function(){var d=this.errors,I=e.cloneArr(this.RULE_STACK);return{errors:d,lexerState:this.exportLexerState(),RULE_STACK:I,CST_STACK:this.CST_STACK}},b.prototype.reloadRecogState=function(d){this.errors=d.errors,this.importLexerState(d.lexerState),this.RULE_STACK=d.RULE_STACK},b.prototype.ruleInvocationStateUpdate=function(d,I,g){this.RULE_OCCURRENCE_STACK.push(g),this.RULE_STACK.push(d),this.cstInvocationStateUpdate(I,d)},b.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},b.prototype.getCurrRuleFullName=function(){var d=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[d]},b.prototype.shortRuleNameToFullName=function(d){return this.shortRuleNameToFull[d]},b.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),A.EOF)},b.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},b})();r.RecognizerEngine=u}),qo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorHandler=void 0;var e=Ct(),t=Se(),i=Lt(),n=Xe(),s=(function(){function o(){}return o.prototype.initErrorHandler=function(c){this._errors=[],this.errorMessageProvider=t.has(c,"errorMessageProvider")?c.errorMessageProvider:n.DEFAULT_PARSER_CONFIG.errorMessageProvider},o.prototype.SAVE_ERROR=function(c){if(e.isRecognitionException(c))return c.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:t.cloneArr(this.RULE_OCCURRENCE_STACK)},this._errors.push(c),c;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(o.prototype,"errors",{get:function(){return t.cloneArr(this._errors)},set:function(c){this._errors=c},enumerable:!1,configurable:!0}),o.prototype.raiseEarlyExitException=function(c,A,a){for(var f=this.getCurrRuleFullName(),u=this.getGAstProductions()[f],b=i.getLookaheadPathsForOptionalProd(c,u,A,this.maxLookahead),d=b[0],I=[],g=1;g<=this.maxLookahead;g++)I.push(this.LA(g));var l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:d,actual:I,previous:this.LA(0),customUserDescription:a,ruleName:f});throw this.SAVE_ERROR(new e.EarlyExitException(l,this.LA(1),this.LA(0)))},o.prototype.raiseNoAltException=function(c,A){for(var a=this.getCurrRuleFullName(),f=this.getGAstProductions()[a],u=i.getLookaheadPathsForOr(c,f,this.maxLookahead),b=[],d=1;d<=this.maxLookahead;d++)b.push(this.LA(d));var I=this.LA(0),g=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:u,actual:b,previous:I,customUserDescription:A,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new e.NoViableAltException(g,this.LA(1),I))},o})();r.ErrorHandler=s}),Ko=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ContentAssist=void 0;var e=_t(),t=Se(),i=(function(){function n(){}return n.prototype.initContentAssist=function(){},n.prototype.computeContentAssist=function(s,o){var c=this.gastProductionsCache[s];if(t.isUndefined(c))throw Error("Rule ->"+s+"<- does not exist in this grammar.");return e.nextPossibleTokensAfter([c],o,this.tokenMatcher,this.maxLookahead)},n.prototype.getNextPossibleTokenTypes=function(s){var o=t.first(s.ruleStack),c=this.getGAstProductions(),A=c[o],a=new e.NextAfterTokenWalker(A,s).startWalking();return a},n})();r.ContentAssist=i}),zo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.GastRecorder=void 0;var e=Se(),t=We(),i=Qt(),n=mt(),s=ct(),o=Xe(),c=un(),A={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(A);var a=!0,f=Math.pow(2,c.BITS_FOR_OCCURRENCE_IDX)-1,u=s.createToken({name:"RECORDING_PHASE_TOKEN",pattern:i.Lexer.NA});n.augmentTokenTypes([u]);var b=s.createTokenInstance(u,`This IToken indicates the Parser is in Recording Phase
|
|
177
177
|
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(b);var d={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
178
|
-
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},
|
|
178
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},I=(function(){function C(){}return C.prototype.initGastRecorder=function(E){this.recordingProdStack=[],this.RECORDING_PHASE=!1},C.prototype.enableRecording=function(){var E=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var B=function(S){var U=S>0?S:"";E["CONSUME"+U]=function(v,O){return this.consumeInternalRecord(v,S,O)},E["SUBRULE"+U]=function(v,O){return this.subruleInternalRecord(v,S,O)},E["OPTION"+U]=function(v){return this.optionInternalRecord(v,S)},E["OR"+U]=function(v){return this.orInternalRecord(v,S)},E["MANY"+U]=function(v){this.manyInternalRecord(S,v)},E["MANY_SEP"+U]=function(v){this.manySepFirstInternalRecord(S,v)},E["AT_LEAST_ONE"+U]=function(v){this.atLeastOneInternalRecord(S,v)},E["AT_LEAST_ONE_SEP"+U]=function(v){this.atLeastOneSepFirstInternalRecord(S,v)}},Q=0;Q<10;Q++)B(Q);E.consume=function(S,U,v){return this.consumeInternalRecord(U,S,v)},E.subrule=function(S,U,v){return this.subruleInternalRecord(U,S,v)},E.option=function(S,U){return this.optionInternalRecord(U,S)},E.or=function(S,U){return this.orInternalRecord(U,S)},E.many=function(S,U){this.manyInternalRecord(S,U)},E.atLeastOne=function(S,U){this.atLeastOneInternalRecord(S,U)},E.ACTION=E.ACTION_RECORD,E.BACKTRACK=E.BACKTRACK_RECORD,E.LA=E.LA_RECORD})},C.prototype.disableRecording=function(){var E=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var B=0;B<10;B++){var Q=B>0?B:"";delete E["CONSUME"+Q],delete E["SUBRULE"+Q],delete E["OPTION"+Q],delete E["OR"+Q],delete E["MANY"+Q],delete E["MANY_SEP"+Q],delete E["AT_LEAST_ONE"+Q],delete E["AT_LEAST_ONE_SEP"+Q]}delete E.consume,delete E.subrule,delete E.option,delete E.or,delete E.many,delete E.atLeastOne,delete E.ACTION,delete E.BACKTRACK,delete E.LA})},C.prototype.ACTION_RECORD=function(E){},C.prototype.BACKTRACK_RECORD=function(E,B){return function(){return!0}},C.prototype.LA_RECORD=function(E){return o.END_OF_FILE},C.prototype.topLevelRuleRecord=function(E,B){try{var Q=new t.Rule({definition:[],name:E});return Q.name=E,this.recordingProdStack.push(Q),B.call(this),this.recordingProdStack.pop(),Q}catch(S){if(S.KNOWN_RECORDER_ERROR!==!0)try{S.message=S.message+`
|
|
179
179
|
This error was thrown during the "grammar recording phase" For more info see:
|
|
180
|
-
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw S}throw S}},C.prototype.optionInternalRecord=function(
|
|
181
|
-
inside top level rule: <`+this.recordingProdStack[0].name+">"));throw S.KNOWN_RECORDER_ERROR=!0,S}var U=e.peek(this.recordingProdStack),
|
|
182
|
-
inside top level rule: <`+this.recordingProdStack[0].name+">"));throw S.KNOWN_RECORDER_ERROR=!0,S}var U=e.peek(this.recordingProdStack),
|
|
183
|
-
`+("Idx value must be a none negative value smaller than "+(f+1)));throw
|
|
180
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw S}throw S}},C.prototype.optionInternalRecord=function(E,B){return g.call(this,t.Option,E,B)},C.prototype.atLeastOneInternalRecord=function(E,B){g.call(this,t.RepetitionMandatory,B,E)},C.prototype.atLeastOneSepFirstInternalRecord=function(E,B){g.call(this,t.RepetitionMandatoryWithSeparator,B,E,a)},C.prototype.manyInternalRecord=function(E,B){g.call(this,t.Repetition,B,E)},C.prototype.manySepFirstInternalRecord=function(E,B){g.call(this,t.RepetitionWithSeparator,B,E,a)},C.prototype.orInternalRecord=function(E,B){return l.call(this,E,B)},C.prototype.subruleInternalRecord=function(E,B,Q){if(p(B),!E||e.has(E,"ruleName")===!1){var S=new Error("<SUBRULE"+h(B)+"> argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(E)+">")+(`
|
|
181
|
+
inside top level rule: <`+this.recordingProdStack[0].name+">"));throw S.KNOWN_RECORDER_ERROR=!0,S}var U=e.peek(this.recordingProdStack),v=E.ruleName,O=new t.NonTerminal({idx:B,nonTerminalName:v,referencedRule:void 0});return U.definition.push(O),this.outputCst?d:A},C.prototype.consumeInternalRecord=function(E,B,Q){if(p(B),!n.hasShortKeyProperty(E)){var S=new Error("<CONSUME"+h(B)+"> argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(E)+">")+(`
|
|
182
|
+
inside top level rule: <`+this.recordingProdStack[0].name+">"));throw S.KNOWN_RECORDER_ERROR=!0,S}var U=e.peek(this.recordingProdStack),v=new t.Terminal({idx:B,terminalType:E});return U.definition.push(v),b},C})();r.GastRecorder=I;function g(C,E,B,Q){Q===void 0&&(Q=!1),p(B);var S=e.peek(this.recordingProdStack),U=e.isFunction(E)?E:E.DEF,v=new C({definition:[],idx:B});return Q&&(v.separator=E.SEP),e.has(E,"MAX_LOOKAHEAD")&&(v.maxLookahead=E.MAX_LOOKAHEAD),this.recordingProdStack.push(v),U.call(this),S.definition.push(v),this.recordingProdStack.pop(),A}function l(C,E){var B=this;p(E);var Q=e.peek(this.recordingProdStack),S=e.isArray(C)===!1,U=S===!1?C:C.DEF,v=new t.Alternation({definition:[],idx:E,ignoreAmbiguities:S&&C.IGNORE_AMBIGUITIES===!0});e.has(C,"MAX_LOOKAHEAD")&&(v.maxLookahead=C.MAX_LOOKAHEAD);var O=e.some(U,function(L){return e.isFunction(L.GATE)});return v.hasPredicates=O,Q.definition.push(v),e.forEach(U,function(L){var k=new t.Alternative({definition:[]});v.definition.push(k),e.has(L,"IGNORE_AMBIGUITIES")?k.ignoreAmbiguities=L.IGNORE_AMBIGUITIES:e.has(L,"GATE")&&(k.ignoreAmbiguities=!0),B.recordingProdStack.push(k),L.ALT.call(B),B.recordingProdStack.pop()}),A}function h(C){return C===0?"":""+C}function p(C){if(C<0||C>f){var E=new Error("Invalid DSL Method idx value: <"+C+`>
|
|
183
|
+
`+("Idx value must be a none negative value smaller than "+(f+1)));throw E.KNOWN_RECORDER_ERROR=!0,E}}}),Wo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PerformanceTracer=void 0;var e=Se(),t=Xe(),i=(function(){function n(){}return n.prototype.initPerformanceTracer=function(s){if(e.has(s,"traceInitPerf")){var o=s.traceInitPerf,c=typeof o=="number";this.traceInitMaxIdent=c?o:1/0,this.traceInitPerf=c?o>0:o}else this.traceInitMaxIdent=0,this.traceInitPerf=t.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},n.prototype.TRACE_INIT=function(s,o){if(this.traceInitPerf===!0){this.traceInitIndent++;var c=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(c+"--> <"+s+">");var A=e.timer(o),a=A.time,f=A.value,u=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(c+"<-- <"+s+"> time: "+a+"ms"),this.traceInitIndent--,f}else return o()},n})();r.PerformanceTracer=i}),Vo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.applyMixins=void 0;function e(t,i){i.forEach(function(n){var s=n.prototype;Object.getOwnPropertyNames(s).forEach(function(o){if(o!=="constructor"){var c=Object.getOwnPropertyDescriptor(s,o);c&&(c.get||c.set)?Object.defineProperty(t.prototype,o,c):t.prototype[o]=n.prototype[o]}})})}r.applyMixins=e}),Xe=Be(r=>{var e=r&&r.__extends||(function(){var Q=function(S,U){return Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,O){v.__proto__=O}||function(v,O){for(var L in O)Object.prototype.hasOwnProperty.call(O,L)&&(v[L]=O[L])},Q(S,U)};return function(S,U){if(typeof U!="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");Q(S,U);function v(){this.constructor=S}S.prototype=U===null?Object.create(U):(v.prototype=U.prototype,new v)}})();Object.defineProperty(r,"__esModule",{value:!0}),r.EmbeddedActionsParser=r.CstParser=r.Parser=r.EMPTY_ALT=r.ParserDefinitionErrorType=r.DEFAULT_RULE_CONFIG=r.DEFAULT_PARSER_CONFIG=r.END_OF_FILE=void 0;var t=Se(),i=No(),n=ct(),s=St(),o=Fo(),c=Gi(),A=Mo(),a=Go(),f=Uo(),u=Ho(),b=jo(),d=qo(),I=Ko(),g=zo(),l=Wo(),h=Vo();r.END_OF_FILE=n.createTokenInstance(n.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(r.END_OF_FILE),r.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:s.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),r.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0}),(function(Q){Q[Q.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",Q[Q.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",Q[Q.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",Q[Q.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",Q[Q.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",Q[Q.LEFT_RECURSION=5]="LEFT_RECURSION",Q[Q.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",Q[Q.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",Q[Q.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",Q[Q.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",Q[Q.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",Q[Q.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",Q[Q.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(r.ParserDefinitionErrorType||(r.ParserDefinitionErrorType={}));function p(Q){return Q===void 0&&(Q=void 0),function(){return Q}}r.EMPTY_ALT=p;var C=(function(){function Q(S,U){this.definitionErrors=[],this.selfAnalysisDone=!1;var v=this;if(v.initErrorHandler(U),v.initLexerAdapter(),v.initLooksAhead(U),v.initRecognizerEngine(S,U),v.initRecoverable(U),v.initTreeBuilder(U),v.initContentAssist(),v.initGastRecorder(U),v.initPerformanceTracer(U),t.has(U,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
184
184
|
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
185
185
|
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
186
|
-
For further details.`);this.skipValidations=t.has(U,"skipValidations")?U.skipValidations:
|
|
186
|
+
For further details.`);this.skipValidations=t.has(U,"skipValidations")?U.skipValidations:r.DEFAULT_PARSER_CONFIG.skipValidations}return Q.performSelfAnalysis=function(S){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},Q.prototype.performSelfAnalysis=function(){var S=this;this.TRACE_INIT("performSelfAnalysis",function(){var U;S.selfAnalysisDone=!0;var v=S.className;S.TRACE_INIT("toFastProps",function(){t.toFastProperties(S)}),S.TRACE_INIT("Grammar Recording",function(){try{S.enableRecording(),t.forEach(S.definedRulesNames,function(L){var k=S[L],D=k.originalGrammarAction,_=void 0;S.TRACE_INIT(L+" Rule",function(){_=S.topLevelRuleRecord(L,D)}),S.gastProductionsCache[L]=_})}finally{S.disableRecording()}});var O=[];if(S.TRACE_INIT("Grammar Resolving",function(){O=o.resolveGrammar({rules:t.values(S.gastProductionsCache)}),S.definitionErrors=S.definitionErrors.concat(O)}),S.TRACE_INIT("Grammar Validations",function(){if(t.isEmpty(O)&&S.skipValidations===!1){var L=o.validateGrammar({rules:t.values(S.gastProductionsCache),maxLookahead:S.maxLookahead,tokenTypes:t.values(S.tokensMap),errMsgProvider:s.defaultGrammarValidatorErrorProvider,grammarName:v});S.definitionErrors=S.definitionErrors.concat(L)}}),t.isEmpty(S.definitionErrors)&&(S.recoveryEnabled&&S.TRACE_INIT("computeAllProdsFollows",function(){var L=i.computeAllProdsFollows(t.values(S.gastProductionsCache));S.resyncFollows=L}),S.TRACE_INIT("ComputeLookaheadFunctions",function(){S.preComputeLookaheadFunctions(t.values(S.gastProductionsCache))})),!Q.DEFER_DEFINITION_ERRORS_HANDLING&&!t.isEmpty(S.definitionErrors))throw U=t.map(S.definitionErrors,function(L){return L.message}),new Error(`Parser Definition Errors detected:
|
|
187
187
|
`+U.join(`
|
|
188
188
|
-------------------------------
|
|
189
|
-
`))})},
|
|
189
|
+
`))})},Q.DEFER_DEFINITION_ERRORS_HANDLING=!1,Q})();r.Parser=C,h.applyMixins(C,[c.Recoverable,A.LooksAhead,a.TreeBuilder,f.LexerAdapter,b.RecognizerEngine,u.RecognizerApi,d.ErrorHandler,I.ContentAssist,g.GastRecorder,l.PerformanceTracer]);var E=(function(Q){e(S,Q);function S(U,v){v===void 0&&(v=r.DEFAULT_PARSER_CONFIG);var O=this,L=t.cloneObj(v);return L.outputCst=!0,O=Q.call(this,U,L)||this,O}return S})(C);r.CstParser=E;var B=(function(Q){e(S,Q);function S(U,v){v===void 0&&(v=r.DEFAULT_PARSER_CONFIG);var O=this,L=t.cloneObj(v);return L.outputCst=!1,O=Q.call(this,U,L)||this,O}return S})(C);r.EmbeddedActionsParser=B}),Yo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSyntaxDiagramsCode=void 0;var e=Ni();function t(i,n){var s=n===void 0?{}:n,o=s.resourceBase,c=o===void 0?"https://unpkg.com/chevrotain@"+e.VERSION+"/diagrams/":o,A=s.css,a=A===void 0?"https://unpkg.com/chevrotain@"+e.VERSION+"/diagrams/diagrams.css":A,f=`
|
|
190
190
|
<!-- This is a generated file -->
|
|
191
191
|
<!DOCTYPE html>
|
|
192
192
|
<meta charset="utf-8">
|
|
@@ -205,17 +205,85 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
205
205
|
<script src='`+c+`src/main.js'><\/script>
|
|
206
206
|
`,d=`
|
|
207
207
|
<div id="diagrams" align="center"></div>
|
|
208
|
-
`,
|
|
208
|
+
`,I=`
|
|
209
209
|
<script>
|
|
210
|
-
window.serializedGrammar = `+JSON.stringify(
|
|
210
|
+
window.serializedGrammar = `+JSON.stringify(i,null," ")+`;
|
|
211
211
|
<\/script>
|
|
212
212
|
`,g=`
|
|
213
213
|
<script>
|
|
214
214
|
var diagramsDiv = document.getElementById("diagrams");
|
|
215
215
|
main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);
|
|
216
216
|
<\/script>
|
|
217
|
-
`;return f+u+b+d+
|
|
217
|
+
`;return f+u+b+d+I+g}r.createSyntaxDiagramsCode=t}),Jo=Be(r=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Parser=r.createSyntaxDiagramsCode=r.clearCache=r.GAstVisitor=r.serializeProduction=r.serializeGrammar=r.Terminal=r.Rule=r.RepetitionWithSeparator=r.RepetitionMandatoryWithSeparator=r.RepetitionMandatory=r.Repetition=r.Option=r.NonTerminal=r.Alternative=r.Alternation=r.defaultLexerErrorProvider=r.NoViableAltException=r.NotAllInputParsedException=r.MismatchedTokenException=r.isRecognitionException=r.EarlyExitException=r.defaultParserErrorProvider=r.tokenName=r.tokenMatcher=r.tokenLabel=r.EOF=r.createTokenInstance=r.createToken=r.LexerDefinitionErrorType=r.Lexer=r.EMPTY_ALT=r.ParserDefinitionErrorType=r.EmbeddedActionsParser=r.CstParser=r.VERSION=void 0;var e=Ni();Object.defineProperty(r,"VERSION",{enumerable:!0,get:function(){return e.VERSION}});var t=Xe();Object.defineProperty(r,"CstParser",{enumerable:!0,get:function(){return t.CstParser}}),Object.defineProperty(r,"EmbeddedActionsParser",{enumerable:!0,get:function(){return t.EmbeddedActionsParser}}),Object.defineProperty(r,"ParserDefinitionErrorType",{enumerable:!0,get:function(){return t.ParserDefinitionErrorType}}),Object.defineProperty(r,"EMPTY_ALT",{enumerable:!0,get:function(){return t.EMPTY_ALT}});var i=Qt();Object.defineProperty(r,"Lexer",{enumerable:!0,get:function(){return i.Lexer}}),Object.defineProperty(r,"LexerDefinitionErrorType",{enumerable:!0,get:function(){return i.LexerDefinitionErrorType}});var n=ct();Object.defineProperty(r,"createToken",{enumerable:!0,get:function(){return n.createToken}}),Object.defineProperty(r,"createTokenInstance",{enumerable:!0,get:function(){return n.createTokenInstance}}),Object.defineProperty(r,"EOF",{enumerable:!0,get:function(){return n.EOF}}),Object.defineProperty(r,"tokenLabel",{enumerable:!0,get:function(){return n.tokenLabel}}),Object.defineProperty(r,"tokenMatcher",{enumerable:!0,get:function(){return n.tokenMatcher}}),Object.defineProperty(r,"tokenName",{enumerable:!0,get:function(){return n.tokenName}});var s=St();Object.defineProperty(r,"defaultParserErrorProvider",{enumerable:!0,get:function(){return s.defaultParserErrorProvider}});var o=Ct();Object.defineProperty(r,"EarlyExitException",{enumerable:!0,get:function(){return o.EarlyExitException}}),Object.defineProperty(r,"isRecognitionException",{enumerable:!0,get:function(){return o.isRecognitionException}}),Object.defineProperty(r,"MismatchedTokenException",{enumerable:!0,get:function(){return o.MismatchedTokenException}}),Object.defineProperty(r,"NotAllInputParsedException",{enumerable:!0,get:function(){return o.NotAllInputParsedException}}),Object.defineProperty(r,"NoViableAltException",{enumerable:!0,get:function(){return o.NoViableAltException}});var c=Fi();Object.defineProperty(r,"defaultLexerErrorProvider",{enumerable:!0,get:function(){return c.defaultLexerErrorProvider}});var A=We();Object.defineProperty(r,"Alternation",{enumerable:!0,get:function(){return A.Alternation}}),Object.defineProperty(r,"Alternative",{enumerable:!0,get:function(){return A.Alternative}}),Object.defineProperty(r,"NonTerminal",{enumerable:!0,get:function(){return A.NonTerminal}}),Object.defineProperty(r,"Option",{enumerable:!0,get:function(){return A.Option}}),Object.defineProperty(r,"Repetition",{enumerable:!0,get:function(){return A.Repetition}}),Object.defineProperty(r,"RepetitionMandatory",{enumerable:!0,get:function(){return A.RepetitionMandatory}}),Object.defineProperty(r,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return A.RepetitionMandatoryWithSeparator}}),Object.defineProperty(r,"RepetitionWithSeparator",{enumerable:!0,get:function(){return A.RepetitionWithSeparator}}),Object.defineProperty(r,"Rule",{enumerable:!0,get:function(){return A.Rule}}),Object.defineProperty(r,"Terminal",{enumerable:!0,get:function(){return A.Terminal}});var a=We();Object.defineProperty(r,"serializeGrammar",{enumerable:!0,get:function(){return a.serializeGrammar}}),Object.defineProperty(r,"serializeProduction",{enumerable:!0,get:function(){return a.serializeProduction}});var f=bt();Object.defineProperty(r,"GAstVisitor",{enumerable:!0,get:function(){return f.GAstVisitor}});function u(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API.
|
|
218
218
|
It performs no action other than printing this message.
|
|
219
|
-
Please avoid using it as it will be completely removed in the future`)}
|
|
220
|
-
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return E})();n.Parser=d});const dt=jo();class qo extends I.Loader{constructor(e){super(e)}load(e,t,r,i){const s=this,o=s.path===""?I.LoaderUtils.extractUrlBase(e):s.path,c=new I.FileLoader(s.manager);c.setPath(s.path),c.setRequestHeader(s.requestHeader),c.setWithCredentials(s.withCredentials),c.load(e,function(A){try{t(s.parse(A,o))}catch(a){i?i(a):console.error(a),s.manager.itemError(e)}},r,i)}parse(e,t){const r={};function i(R){const B=s(),T=new Ko(B.tokens),x=new Vo(B.tokenVocabulary),Q=o(x.getBaseCstVisitorConstructor()),N=T.lex(R);x.input=N.tokens;const O=x.vrml();if(x.errors.length>0)throw console.error(x.errors),Error("THREE.VRMLLoader2: Parsing errors detected.");return Q.visit(O)}function s(){const R=dt.createToken,B=R({name:"RouteIdentifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*[\.][^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*/}),T=R({name:"Identifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]([^\0-\x20\x22\x27\x23\x2b\x2c\x2e\x5b\x5d\x5c\x7b\x7d])*/,longer_alt:B}),x=["Anchor","Billboard","Collision","Group","Transform","Inline","LOD","Switch","AudioClip","DirectionalLight","PointLight","Script","Shape","Sound","SpotLight","WorldInfo","CylinderSensor","PlaneSensor","ProximitySensor","SphereSensor","TimeSensor","TouchSensor","VisibilitySensor","Box","Cone","Cylinder","ElevationGrid","Extrusion","IndexedFaceSet","IndexedLineSet","PointSet","Sphere","Color","Coordinate","Normal","TextureCoordinate","Appearance","FontStyle","ImageTexture","Material","MovieTexture","PixelTexture","TextureTransform","ColorInterpolator","CoordinateInterpolator","NormalInterpolator","OrientationInterpolator","PositionInterpolator","ScalarInterpolator","Background","Fog","NavigationInfo","Viewpoint","Text"],Q=R({name:"Version",pattern:/#VRML.*/,longer_alt:T}),N=R({name:"NodeName",pattern:new RegExp(x.join("|")),longer_alt:T}),O=R({name:"DEF",pattern:/DEF/,longer_alt:T}),G=R({name:"USE",pattern:/USE/,longer_alt:T}),K=R({name:"ROUTE",pattern:/ROUTE/,longer_alt:T}),$=R({name:"TO",pattern:/TO/,longer_alt:T}),oe=R({name:"StringLiteral",pattern:/"(?:[^\\"\n\r]|\\[bfnrtv"\\/]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*"/}),Ee=R({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]+/}),ve=R({name:"NumberLiteral",pattern:/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/}),Fe=R({name:"TrueLiteral",pattern:/TRUE/}),Se=R({name:"FalseLiteral",pattern:/FALSE/}),be=R({name:"NullLiteral",pattern:/NULL/}),Be=R({name:"LSquare",pattern:/\[/}),Le=R({name:"RSquare",pattern:/]/}),Ne=R({name:"LCurly",pattern:/{/}),Qe=R({name:"RCurly",pattern:/}/}),Oe=R({name:"Comment",pattern:/#.*/,group:dt.Lexer.SKIPPED}),He=[R({name:"WhiteSpace",pattern:/[ ,\s]/,group:dt.Lexer.SKIPPED}),N,O,G,K,$,Fe,Se,be,Q,T,B,oe,Ee,ve,Be,Le,Ne,Qe,Oe],je={};for(let Re=0,ue=He.length;Re<ue;Re++){const he=He[Re];je[he.name]=he}return{tokens:He,tokenVocabulary:je}}function o(R){class B extends R{constructor(){super(),this.validateVisitor()}vrml(Q){const N={version:this.visit(Q.version),nodes:[],routes:[]};for(let O=0,G=Q.node.length;O<G;O++){const K=Q.node[O];N.nodes.push(this.visit(K))}if(Q.route)for(let O=0,G=Q.route.length;O<G;O++){const K=Q.route[O];N.routes.push(this.visit(K))}return N}version(Q){return Q.Version[0].image}node(Q){const N={name:Q.NodeName[0].image,fields:[]};if(Q.field)for(let O=0,G=Q.field.length;O<G;O++){const K=Q.field[O];N.fields.push(this.visit(K))}return Q.def&&(N.DEF=this.visit(Q.def[0])),N}field(Q){const N={name:Q.Identifier[0].image,type:null,values:null};let O;return Q.singleFieldValue&&(O=this.visit(Q.singleFieldValue[0])),Q.multiFieldValue&&(O=this.visit(Q.multiFieldValue[0])),N.type=O.type,N.values=O.values,N}def(Q){return(Q.Identifier||Q.NodeName)[0].image}use(Q){return{USE:(Q.Identifier||Q.NodeName)[0].image}}singleFieldValue(Q){return T(this,Q)}multiFieldValue(Q){return T(this,Q)}route(Q){return{FROM:Q.RouteIdentifier[0].image,TO:Q.RouteIdentifier[1].image}}}function T(x,Q){const N={type:null,values:[]};if(Q.node){N.type="node";for(let O=0,G=Q.node.length;O<G;O++){const K=Q.node[O];N.values.push(x.visit(K))}}if(Q.use){N.type="use";for(let O=0,G=Q.use.length;O<G;O++){const K=Q.use[O];N.values.push(x.visit(K))}}if(Q.StringLiteral){N.type="string";for(let O=0,G=Q.StringLiteral.length;O<G;O++){const K=Q.StringLiteral[O];N.values.push(K.image.replace(/'|"/g,""))}}if(Q.NumberLiteral){N.type="number";for(let O=0,G=Q.NumberLiteral.length;O<G;O++){const K=Q.NumberLiteral[O];N.values.push(parseFloat(K.image))}}if(Q.HexLiteral){N.type="hex";for(let O=0,G=Q.HexLiteral.length;O<G;O++){const K=Q.HexLiteral[O];N.values.push(K.image)}}if(Q.TrueLiteral){N.type="boolean";for(let O=0,G=Q.TrueLiteral.length;O<G;O++)Q.TrueLiteral[O].image==="TRUE"&&N.values.push(!0)}if(Q.FalseLiteral){N.type="boolean";for(let O=0,G=Q.FalseLiteral.length;O<G;O++)Q.FalseLiteral[O].image==="FALSE"&&N.values.push(!1)}return Q.NullLiteral&&(N.type="null",Q.NullLiteral.forEach(function(){N.values.push(null)})),N}return new B}function c(R){const B=R.nodes,T=new I.Scene;for(let x=0,Q=B.length;x<Q;x++){const N=B[x];A(N)}for(let x=0,Q=B.length;x<Q;x++){const N=B[x],O=a(N);O instanceof I.Object3D&&T.add(O),N.name==="WorldInfo"&&(T.userData.worldInfo=O)}return T}function A(R){R.DEF&&(r[R.DEF]=R);const B=R.fields;for(let T=0,x=B.length;T<x;T++){const Q=B[T];if(Q.type==="node"){const N=Q.values;for(let O=0,G=N.length;O<G;O++)A(N[O])}}}function a(R){return R.USE?W(R.USE):(R.build!==void 0||(R.build=f(R)),R.build)}function f(R){const B=R.name;let T;switch(B){case"Anchor":case"Group":case"Transform":case"Collision":T=u(R);break;case"Background":T=b(R);break;case"Shape":T=d(R);break;case"Appearance":T=E(R);break;case"Material":T=g(R);break;case"ImageTexture":T=C(R);break;case"PixelTexture":T=p(R);break;case"TextureTransform":T=m(R);break;case"IndexedFaceSet":T=S(R);break;case"IndexedLineSet":T=U(R);break;case"PointSet":T=w(R);break;case"Box":T=M(R);break;case"Cone":T=_(R);break;case"Cylinder":T=k(R);break;case"Sphere":T=D(R);break;case"ElevationGrid":T=L(R);break;case"Extrusion":T=V(R);break;case"Color":case"Coordinate":case"Normal":case"TextureCoordinate":T=y(R);break;case"WorldInfo":T=v(R);break;case"Billboard":case"Inline":case"LOD":case"Switch":case"AudioClip":case"DirectionalLight":case"PointLight":case"Script":case"Sound":case"SpotLight":case"CylinderSensor":case"PlaneSensor":case"ProximitySensor":case"SphereSensor":case"TimeSensor":case"TouchSensor":case"VisibilitySensor":case"Text":case"FontStyle":case"MovieTexture":case"ColorInterpolator":case"CoordinateInterpolator":case"NormalInterpolator":case"OrientationInterpolator":case"PositionInterpolator":case"ScalarInterpolator":case"Fog":case"NavigationInfo":case"Viewpoint":break;default:console.warn("THREE.VRMLLoader2: Unknown node:",B);break}return T!==void 0&&R.DEF!==void 0&&T.hasOwnProperty("name")===!0&&(T.name=R.DEF),T}function u(R){const B=new I.Group,T=R.fields;for(let x=0,Q=T.length;x<Q;x++){const N=T[x],O=N.name,G=N.values;switch(O){case"bboxCenter":break;case"bboxSize":break;case"center":break;case"children":j(G,B);break;case"description":break;case"collide":break;case"parameter":break;case"rotation":const K=new I.Vector3(G[0],G[1],G[2]).normalize(),$=G[3];B.quaternion.setFromAxisAngle(K,$);break;case"scale":B.scale.set(G[0],G[1],G[2]);break;case"scaleOrientation":break;case"translation":B.position.set(G[0],G[1],G[2]);break;case"proxy":break;case"url":break;default:console.warn("THREE.VRMLLoader2: Unknown field:",O);break}}return B}function b(R){const B=new I.Group;let T,x,Q,N;const O=R.fields;for(let K=0,$=O.length;K<$;K++){const oe=O[K],Ee=oe.name,ve=oe.values;switch(Ee){case"groundAngle":T=ve;break;case"groundColor":x=ve;break;case"backUrl":break;case"bottomUrl":break;case"frontUrl":break;case"leftUrl":break;case"rightUrl":break;case"topUrl":break;case"skyAngle":Q=ve;break;case"skyColor":N=ve;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",Ee);break}}const G=1e4;if(N){const K=new I.SphereGeometry(G,32,16),$=new I.MeshBasicMaterial({fog:!1,side:I.BackSide,depthWrite:!1,depthTest:!1});N.length>3?(q(K,G,Q,F(N),!0),$.vertexColors=!0):$.color.setRGB(N[0],N[1],N[2],I.SRGBColorSpace);const oe=new I.Mesh(K,$);B.add(oe)}if(x&&x.length>0){const K=new I.SphereGeometry(G,32,16,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),$=new I.MeshBasicMaterial({fog:!1,side:I.BackSide,vertexColors:!0,depthWrite:!1,depthTest:!1});q(K,G,T,F(x),!1);const oe=new I.Mesh(K,$);B.add(oe)}return B.renderOrder=-1/0,B}function d(R){const B=R.fields;let T=new I.MeshBasicMaterial({name:I.Loader.DEFAULT_MATERIAL_NAME,color:0}),x;for(let N=0,O=B.length;N<O;N++){const G=B[N],K=G.name,$=G.values;switch(K){case"appearance":$[0]!==null&&(T=a($[0]));break;case"geometry":$[0]!==null&&(x=a($[0]));break;default:console.warn("THREE.VRMLLoader2: Unknown field:",K);break}}let Q;if(x&&x.attributes.position){const N=x._type;if(N==="points"){const O=new I.PointsMaterial({name:I.Loader.DEFAULT_MATERIAL_NAME,color:16777215,opacity:T.opacity,transparent:T.transparent});x.attributes.color!==void 0?O.vertexColors=!0:T.isMeshPhongMaterial&&O.color.copy(T.emissive),Q=new I.Points(x,O)}else if(N==="line"){const O=new I.LineBasicMaterial({name:I.Loader.DEFAULT_MATERIAL_NAME,color:16777215,opacity:T.opacity,transparent:T.transparent});x.attributes.color!==void 0?O.vertexColors=!0:T.isMeshPhongMaterial&&O.color.copy(T.emissive),Q=new I.LineSegments(x,O)}else x._solid!==void 0&&(T.side=x._solid?I.FrontSide:I.DoubleSide),x.attributes.color!==void 0&&(T.vertexColors=!0),Q=new I.Mesh(x,T)}else Q=new I.Object3D,Q.visible=!1;return Q}function E(R){let B=new I.MeshPhongMaterial,T;const x=R.fields;for(let Q=0,N=x.length;Q<N;Q++){const O=x[Q],G=O.name,K=O.values;switch(G){case"material":if(K[0]!==null){const oe=a(K[0]);oe.diffuseColor&&B.color.copy(oe.diffuseColor),oe.emissiveColor&&B.emissive.copy(oe.emissiveColor),oe.shininess&&(B.shininess=oe.shininess),oe.specularColor&&B.specular.copy(oe.specularColor),oe.transparency&&(B.opacity=1-oe.transparency),oe.transparency>0&&(B.transparent=!0)}else B=new I.MeshBasicMaterial({name:I.Loader.DEFAULT_MATERIAL_NAME,color:0});break;case"texture":const $=K[0];$!==null&&($.name==="ImageTexture"||$.name==="PixelTexture"||$.USE)&&(B.map=a($));break;case"textureTransform":K[0]!==null&&(T=a(K[0]));break;default:console.warn("THREE.VRMLLoader2: Unknown field:",G);break}}if(B.map){if(B.map.__type){switch(B.map.__type){case Xe.INTENSITY_ALPHA:B.opacity=1;break;case Xe.RGB:B.color.set(16777215);break;case Xe.RGBA:B.color.set(16777215),B.opacity=1;break}delete B.map.__type}T&&(B.map.center.copy(T.center),B.map.rotation=T.rotation,B.map.repeat.copy(T.scale),B.map.offset.copy(T.translation))}return B}function g(R){const B={},T=R.fields;for(let x=0,Q=T.length;x<Q;x++){const N=T[x],O=N.name,G=N.values;switch(O){case"ambientIntensity":break;case"diffuseColor":B.diffuseColor=new I.Color().setRGB(G[0],G[1],G[2],I.SRGBColorSpace);break;case"emissiveColor":B.emissiveColor=new I.Color().setRGB(G[0],G[1],G[2],I.SRGBColorSpace);break;case"shininess":B.shininess=G[0];break;case"specularColor":B.specularColor=new I.Color().setRGB(G[0],G[1],G[2],I.SRGBColorSpace);break;case"transparency":B.transparency=G[0];break;default:console.warn("THREE.VRMLLoader2: Unknown field:",O);break}}return B}function l(R,B,T){let x;switch(B){case Xe.INTENSITY:x=parseInt(R),T.r=x,T.g=x,T.b=x,T.a=1;break;case Xe.INTENSITY_ALPHA:x=parseInt("0x"+R.substring(2,4)),T.r=x,T.g=x,T.b=x,T.a=parseInt("0x"+R.substring(4,6));break;case Xe.RGB:T.r=parseInt("0x"+R.substring(2,4)),T.g=parseInt("0x"+R.substring(4,6)),T.b=parseInt("0x"+R.substring(6,8)),T.a=1;break;case Xe.RGBA:T.r=parseInt("0x"+R.substring(2,4)),T.g=parseInt("0x"+R.substring(4,6)),T.b=parseInt("0x"+R.substring(6,8)),T.a=parseInt("0x"+R.substring(8,10));break}}function h(R){let B;switch(R){case 1:B=Xe.INTENSITY;break;case 2:B=Xe.INTENSITY_ALPHA;break;case 3:B=Xe.RGB;break;case 4:B=Xe.RGBA;break}return B}function p(R){let B,T=I.RepeatWrapping,x=I.RepeatWrapping;const Q=R.fields;for(let N=0,O=Q.length;N<O;N++){const G=Q[N],K=G.name,$=G.values;switch(K){case"image":const oe=$[0],Ee=$[1],ve=$[2],Fe=h(ve),Se=new Uint8Array(4*oe*Ee),be={r:0,g:0,b:0,a:0};for(let Be=3,Le=0,Ne=$.length;Be<Ne;Be++,Le++){l($[Be],Fe,be);const Qe=Le*4;Se[Qe+0]=be.r,Se[Qe+1]=be.g,Se[Qe+2]=be.b,Se[Qe+3]=be.a}B=new I.DataTexture(Se,oe,Ee),B.colorSpace=I.SRGBColorSpace,B.needsUpdate=!0,B.__type=Fe;break;case"repeatS":$[0]===!1&&(T=I.ClampToEdgeWrapping);break;case"repeatT":$[0]===!1&&(x=I.ClampToEdgeWrapping);break;default:console.warn("THREE.VRMLLoader2: Unknown field:",K);break}}return B&&(B.wrapS=T,B.wrapT=x),B}function C(R){let B,T=I.RepeatWrapping,x=I.RepeatWrapping;const Q=R.fields;for(let N=0,O=Q.length;N<O;N++){const G=Q[N],K=G.name,$=G.values;switch(K){case"url":const oe=$[0];oe&&(B=ne.load(oe));break;case"repeatS":$[0]===!1&&(T=I.ClampToEdgeWrapping);break;case"repeatT":$[0]===!1&&(x=I.ClampToEdgeWrapping);break;default:console.warn("THREE.VRMLLoader2: Unknown field:",K);break}}return B&&(B.wrapS=T,B.wrapT=x,B.colorSpace=I.SRGBColorSpace),B}function m(R){const B={center:new I.Vector2,rotation:new I.Vector2,scale:new I.Vector2,translation:new I.Vector2},T=R.fields;for(let x=0,Q=T.length;x<Q;x++){const N=T[x],O=N.name,G=N.values;switch(O){case"center":B.center.set(G[0],G[1]);break;case"rotation":B.rotation=G[0];break;case"scale":B.scale.set(G[0],G[1]);break;case"translation":B.translation.set(G[0],G[1]);break;default:console.warn("THREE.VRMLLoader2: Unknown field:",O);break}}return B}function y(R){return R.fields[0].values}function v(R){const B={},T=R.fields;for(let x=0,Q=T.length;x<Q;x++){const N=T[x],O=N.name,G=N.values;switch(O){case"title":B.title=G[0];break;case"info":B.info=G;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",O);break}}return B}function S(R){let B,T,x,Q,N=!0,O=!0,G=0,K,$,oe,Ee,ve=!0,Fe=!0;const Se=R.fields;for(let xe=0,He=Se.length;xe<He;xe++){const je=Se[xe],Re=je.name,ue=je.values;switch(Re){case"color":const he=ue[0];he!==null&&(B=a(he));break;case"coord":const ce=ue[0];ce!==null&&(T=a(ce));break;case"normal":const fe=ue[0];fe!==null&&(x=a(fe));break;case"texCoord":const pe=ue[0];pe!==null&&(Q=a(pe));break;case"ccw":N=ue[0];break;case"colorIndex":K=ue;break;case"colorPerVertex":ve=ue[0];break;case"convex":break;case"coordIndex":$=ue;break;case"creaseAngle":G=ue[0];break;case"normalIndex":oe=ue;break;case"normalPerVertex":Fe=ue[0];break;case"solid":O=ue[0];break;case"texCoordIndex":Ee=ue;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",Re);break}}if($===void 0)return console.warn("THREE.VRMLLoader2: Missing coordIndex."),new I.BufferGeometry;const be=J($,N);let Be,Le,Ne;if(B){if(ve===!0)if(K&&K.length>0){const xe=J(K,N);Be=te(be,xe,B,3)}else Be=ge(be,new I.Float32BufferAttribute(B,3));else if(K&&K.length>0){const xe=Ae(B,K),He=Z(xe,$);Be=ae(be,He)}else{const xe=Z(B,$);Be=ae(be,xe)}Y(Be)}if(x)if(Fe===!0)if(oe&&oe.length>0){const xe=J(oe,N);Le=te(be,xe,x,3)}else Le=ge(be,new I.Float32BufferAttribute(x,3));else if(oe&&oe.length>0){const xe=Ae(x,oe),He=Z(xe,$);Le=ae(be,He)}else{const xe=Z(x,$);Le=ae(be,xe)}else Le=Ve(be,T,G);if(Q)if(Ee&&Ee.length>0){const xe=J(Ee,N);Ne=te(be,xe,Q,2)}else Ne=ge(be,new I.Float32BufferAttribute(Q,2));const Qe=new I.BufferGeometry,Oe=ge(be,new I.Float32BufferAttribute(T,3));return Qe.setAttribute("position",Oe),Qe.setAttribute("normal",Le),Be&&Qe.setAttribute("color",Be),Ne&&Qe.setAttribute("uv",Ne),Qe._solid=O,Qe._type="mesh",Qe}function U(R){let B,T,x,Q,N=!0;const O=R.fields;for(let Ee=0,ve=O.length;Ee<ve;Ee++){const Fe=O[Ee],Se=Fe.name,be=Fe.values;switch(Se){case"color":const Be=be[0];Be!==null&&(B=a(Be));break;case"coord":const Le=be[0];Le!==null&&(T=a(Le));break;case"colorIndex":x=be;break;case"colorPerVertex":N=be[0];break;case"coordIndex":Q=be;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",Se);break}}let G;const K=ie(Q);if(B){if(N===!0)if(x.length>0){const Ee=ie(x);G=te(K,Ee,B,3)}else G=ge(K,new I.Float32BufferAttribute(B,3));else if(x.length>0){const Ee=Ae(B,x),ve=re(Ee,Q);G=me(K,ve)}else{const Ee=re(B,Q);G=me(K,Ee)}Y(G)}const $=new I.BufferGeometry,oe=ge(K,new I.Float32BufferAttribute(T,3));return $.setAttribute("position",oe),G&&$.setAttribute("color",G),$._type="line",$}function w(R){let B,T;const x=R.fields;for(let N=0,O=x.length;N<O;N++){const G=x[N],K=G.name,$=G.values;switch(K){case"color":const oe=$[0];oe!==null&&(B=a(oe));break;case"coord":const Ee=$[0];Ee!==null&&(T=a(Ee));break;default:console.warn("THREE.VRMLLoader2: Unknown field:",K);break}}const Q=new I.BufferGeometry;if(Q.setAttribute("position",new I.Float32BufferAttribute(T,3)),B){const N=new I.Float32BufferAttribute(B,3);Y(N),Q.setAttribute("color",N)}return Q._type="points",Q}function M(R){const B=new I.Vector3(2,2,2),T=R.fields;for(let Q=0,N=T.length;Q<N;Q++){const O=T[Q],G=O.name,K=O.values;G==="size"?(B.x=K[0],B.y=K[1],B.z=K[2]):console.warn("THREE.VRMLLoader2: Unknown field:",G)}return new I.BoxGeometry(B.x,B.y,B.z)}function _(R){let B=1,T=2,x=!1;const Q=R.fields;for(let O=0,G=Q.length;O<G;O++){const K=Q[O],$=K.name,oe=K.values;switch($){case"bottom":x=!oe[0];break;case"bottomRadius":B=oe[0];break;case"height":T=oe[0];break;case"side":break;default:console.warn("THREE.VRMLLoader2: Unknown field:",$);break}}return new I.ConeGeometry(B,T,16,1,x)}function k(R){let B=1,T=2;const x=R.fields;for(let N=0,O=x.length;N<O;N++){const G=x[N],K=G.name,$=G.values;switch(K){case"bottom":break;case"radius":B=$[0];break;case"height":T=$[0];break;case"side":break;case"top":break;default:console.warn("THREE.VRMLLoader2: Unknown field:",K);break}}return new I.CylinderGeometry(B,B,T,16,1)}function D(R){let B=1;const T=R.fields;for(let Q=0,N=T.length;Q<N;Q++){const O=T[Q],G=O.name,K=O.values;G==="radius"?B=K[0]:console.warn("THREE.VRMLLoader2: Unknown field:",G)}return new I.SphereGeometry(B,16,16)}function L(R){let B,T,x,Q,N=!0,O=!0,G=!0,K=!0,$=0,oe=2,Ee=2,ve=1,Fe=1;const Se=R.fields;for(let ue=0,he=Se.length;ue<he;ue++){const ce=Se[ue],fe=ce.name,pe=ce.values;switch(fe){case"color":const De=pe[0];De!==null&&(B=a(De));break;case"normal":const et=pe[0];et!==null&&(T=a(et));break;case"texCoord":const tt=pe[0];tt!==null&&(x=a(tt));break;case"height":Q=pe;break;case"ccw":K=pe[0];break;case"colorPerVertex":N=pe[0];break;case"creaseAngle":$=pe[0];break;case"normalPerVertex":O=pe[0];break;case"solid":G=pe[0];break;case"xDimension":oe=pe[0];break;case"xSpacing":ve=pe[0];break;case"zDimension":Ee=pe[0];break;case"zSpacing":Fe=pe[0];break;default:console.warn("THREE.VRMLLoader2: Unknown field:",fe);break}}const be=[],Be=[],Le=[],Ne=[];for(let ue=0;ue<Ee;ue++)for(let he=0;he<oe;he++){const ce=ue*oe+he,fe=ve*ue,pe=Q[ce],De=Fe*he;if(be.push(fe,pe,De),B&&N===!0){const et=B[ce*3+0],tt=B[ce*3+1],St=B[ce*3+2];Le.push(et,tt,St)}if(T&&O===!0){const et=T[ce*3+0],tt=T[ce*3+1],St=T[ce*3+2];Be.push(et,tt,St)}if(x){const et=x[ce*2+0],tt=x[ce*2+1];Ne.push(et,tt)}else Ne.push(ue/(oe-1),he/(Ee-1))}const Qe=[];for(let ue=0;ue<oe-1;ue++)for(let he=0;he<Ee-1;he++){const ce=ue+he*oe,fe=ue+(he+1)*oe,pe=ue+1+(he+1)*oe,De=ue+1+he*oe;K===!0?(Qe.push(ce,pe,fe),Qe.push(pe,ce,De)):(Qe.push(ce,fe,pe),Qe.push(pe,De,ce))}const Oe=ge(Qe,new I.Float32BufferAttribute(be,3)),xe=ge(Qe,new I.Float32BufferAttribute(Ne,2));let He,je;if(B){if(N===!1){for(let ue=0;ue<oe-1;ue++)for(let he=0;he<Ee-1;he++){const ce=ue+he*(oe-1),fe=B[ce*3+0],pe=B[ce*3+1],De=B[ce*3+2];Le.push(fe,pe,De),Le.push(fe,pe,De),Le.push(fe,pe,De),Le.push(fe,pe,De),Le.push(fe,pe,De),Le.push(fe,pe,De)}He=new I.Float32BufferAttribute(Le,3)}else He=ge(Qe,new I.Float32BufferAttribute(Le,3));Y(He)}if(T)if(O===!1){for(let ue=0;ue<oe-1;ue++)for(let he=0;he<Ee-1;he++){const ce=ue+he*(oe-1),fe=T[ce*3+0],pe=T[ce*3+1],De=T[ce*3+2];Be.push(fe,pe,De),Be.push(fe,pe,De),Be.push(fe,pe,De),Be.push(fe,pe,De),Be.push(fe,pe,De),Be.push(fe,pe,De)}je=new I.Float32BufferAttribute(Be,3)}else je=ge(Qe,new I.Float32BufferAttribute(Be,3));else je=Ve(Qe,be,$);const Re=new I.BufferGeometry;return Re.setAttribute("position",Oe),Re.setAttribute("normal",je),Re.setAttribute("uv",xe),He&&Re.setAttribute("color",He),Re._solid=G,Re._type="mesh",Re}function V(R){let B=[1,1,1,-1,-1,-1,-1,1,1,1],T=[0,0,0,0,1,0],x,Q,N=!0,O=!0,G=0,K=!0,$=!0;const oe=R.fields;for(let Re=0,ue=oe.length;Re<ue;Re++){const he=oe[Re],ce=he.name,fe=he.values;switch(ce){case"beginCap":N=fe[0];break;case"ccw":O=fe[0];break;case"convex":break;case"creaseAngle":G=fe[0];break;case"crossSection":B=fe;break;case"endCap":K=fe[0];break;case"orientation":Q=fe;break;case"scale":x=fe;break;case"solid":$=fe[0];break;case"spine":T=fe;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",ce);break}}const Ee=B[0]===B[B.length-2]&&B[1]===B[B.length-1],ve=[],Fe=new I.Vector3,Se=new I.Vector3,be=new I.Vector3,Be=new I.Vector3,Le=new I.Quaternion;for(let Re=0,ue=0,he=0,ce=T.length;Re<ce;Re+=3,ue+=2,he+=4){Fe.fromArray(T,Re),Se.x=x?x[ue+0]:1,Se.y=1,Se.z=x?x[ue+1]:1,be.x=Q?Q[he+0]:0,be.y=Q?Q[he+1]:0,be.z=Q?Q[he+2]:1;const fe=Q?Q[he+3]:0;for(let pe=0,De=B.length;pe<De;pe+=2)Be.x=B[pe+0],Be.y=0,Be.z=B[pe+1],Be.multiply(Se),Le.setFromAxisAngle(be,fe),Be.applyQuaternion(Le),Be.add(Fe),ve.push(Be.x,Be.y,Be.z)}const Ne=[],Qe=T.length/3,Oe=B.length/2;for(let Re=0;Re<Qe-1;Re++)for(let ue=0;ue<Oe-1;ue++){const he=ue+Re*Oe;let ce=ue+1+Re*Oe;const fe=ue+(Re+1)*Oe;let pe=ue+1+(Re+1)*Oe;ue===Oe-2&&Ee===!0&&(ce=Re*Oe,pe=(Re+1)*Oe),O===!0?(Ne.push(he,ce,fe),Ne.push(fe,ce,pe)):(Ne.push(he,fe,ce),Ne.push(fe,pe,ce))}if(N===!0||K===!0){const Re=[];for(let ce=0,fe=B.length;ce<fe;ce+=2)Re.push(new I.Vector2(B[ce],B[ce+1]));const ue=I.ShapeUtils.triangulateShape(Re,[]),he=[];for(let ce=0,fe=ue.length;ce<fe;ce++){const pe=ue[ce];he.push(pe[0],pe[1],pe[2])}if(N===!0)for(let ce=0,fe=he.length;ce<fe;ce+=3)O===!0?Ne.push(he[ce+0],he[ce+1],he[ce+2]):Ne.push(he[ce+0],he[ce+2],he[ce+1]);if(K===!0){const ce=Oe*(Qe-1);for(let fe=0,pe=he.length;fe<pe;fe+=3)O===!0?Ne.push(ce+he[fe+0],ce+he[fe+2],ce+he[fe+1]):Ne.push(ce+he[fe+0],ce+he[fe+1],ce+he[fe+2])}}const xe=ge(Ne,new I.Float32BufferAttribute(ve,3)),He=Ve(Ne,ve,G),je=new I.BufferGeometry;return je.setAttribute("position",xe),je.setAttribute("normal",He),je._solid=$,je._type="mesh",je}function W(R){const B=r[R],T=a(B);return T.isObject3D||T.isMaterial?T.clone():T}function j(R,B){for(let T=0,x=R.length;T<x;T++){const Q=a(R[T]);Q instanceof I.Object3D&&B.add(Q)}}function J(R,B){const T=[];let x=0;for(let Q=0,N=R.length;Q<N;Q++){const O=R[x],G=R[Q+(B?1:2)],K=R[Q+(B?2:1)];T.push(O,G,K),(R[Q+3]===-1||Q+3>=N)&&(Q+=3,x=Q+1)}return T}function Z(R,B){const T=[];let x=0;for(let Q=0,N=B.length;Q<N;Q++){const O=x*3,G=R[O],K=R[O+1],$=R[O+2];T.push(G,K,$),(B[Q+3]===-1||Q+3>=N)&&(Q+=3,x++)}return T}function Ae(R,B){const T=[];for(let x=0,Q=B.length;x<Q;x++){const O=B[x]*3,G=R[O],K=R[O+1],$=R[O+2];T.push(G,K,$)}return T}function ie(R){const B=[];for(let T=0,x=R.length;T<x;T++){const Q=R[T],N=R[T+1];B.push(Q,N),(R[T+2]===-1||T+2>=x)&&(T+=2)}return B}function re(R,B){const T=[];let x=0;for(let Q=0,N=B.length;Q<N;Q++){const O=x*3,G=R[O],K=R[O+1],$=R[O+2];T.push(G,K,$),(B[Q+2]===-1||Q+2>=N)&&(Q+=2,x++)}return T}const ee=new I.Vector3,le=new I.Vector3,P=new I.Vector3,H=new I.Vector2,z=new I.Vector2,X=new I.Vector2;function te(R,B,T,x){const Q=[];for(let N=0,O=R.length;N<O;N+=3){const G=B[N],K=B[N+1],$=B[N+2];x===2?(H.fromArray(T,G*x),z.fromArray(T,K*x),X.fromArray(T,$*x),Q.push(H.x,H.y),Q.push(z.x,z.y),Q.push(X.x,X.y)):(ee.fromArray(T,G*x),le.fromArray(T,K*x),P.fromArray(T,$*x),Q.push(ee.x,ee.y,ee.z),Q.push(le.x,le.y,le.z),Q.push(P.x,P.y,P.z))}return new I.Float32BufferAttribute(Q,x)}function ae(R,B){const T=[];for(let x=0,Q=0,N=R.length;x<N;x+=3,Q++)ee.fromArray(B,Q*3),T.push(ee.x,ee.y,ee.z),T.push(ee.x,ee.y,ee.z),T.push(ee.x,ee.y,ee.z);return new I.Float32BufferAttribute(T,3)}function me(R,B){const T=[];for(let x=0,Q=0,N=R.length;x<N;x+=2,Q++)ee.fromArray(B,Q*3),T.push(ee.x,ee.y,ee.z),T.push(ee.x,ee.y,ee.z);return new I.Float32BufferAttribute(T,3)}function ge(R,B){const T=B.array,x=B.itemSize,Q=new T.constructor(R.length*x);let N=0,O=0;for(let G=0,K=R.length;G<K;G++){N=R[G]*x;for(let $=0;$<x;$++)Q[O++]=T[N++]}return new I.Float32BufferAttribute(Q,x)}const _e=new I.Vector3,Ge=new I.Vector3;function Ve(R,B,T){const x=[],Q={};for(let O=0,G=R.length;O<G;O+=3){const K=R[O],$=R[O+1],oe=R[O+2],Ee=new Yo(K,$,oe);ee.fromArray(B,K*3),le.fromArray(B,$*3),P.fromArray(B,oe*3),Ge.subVectors(P,le),_e.subVectors(ee,le),Ge.cross(_e),Ge.normalize(),Ee.normal.copy(Ge),Q[K]===void 0&&(Q[K]=[]),Q[$]===void 0&&(Q[$]=[]),Q[oe]===void 0&&(Q[oe]=[]),Q[K].push(Ee.normal),Q[$].push(Ee.normal),Q[oe].push(Ee.normal),x.push(Ee)}const N=[];for(let O=0,G=x.length;O<G;O++){const K=x[O],$=Pe(Q[K.a],K.normal,T),oe=Pe(Q[K.b],K.normal,T),Ee=Pe(Q[K.c],K.normal,T);ee.fromArray(B,K.a*3),le.fromArray(B,K.b*3),P.fromArray(B,K.c*3),N.push($.x,$.y,$.z),N.push(oe.x,oe.y,oe.z),N.push(Ee.x,Ee.y,Ee.z)}return new I.Float32BufferAttribute(N,3)}function Pe(R,B,T){const x=new I.Vector3;if(T===0)x.copy(B);else for(let Q=0,N=R.length;Q<N;Q++)R[Q].angleTo(B)<T&&x.add(R[Q]);return x.normalize()}function F(R){const B=[];for(let T=0,x=R.length;T<x;T+=3)B.push(new I.Color(R[T],R[T+1],R[T+2]));return B}function Y(R){const B=new I.Color;for(let T=0;T<R.count;T++)B.fromBufferAttribute(R,T),I.ColorManagement.colorSpaceToWorking(B,I.SRGBColorSpace),R.setXYZ(T,B.r,B.g,B.b)}function q(R,B,T,x,Q){const N=[],O=Q===!0?0:Math.PI;for(let ve=0,Fe=x.length;ve<Fe;ve++){let Se=ve===0?0:T[ve-1];Se=Q===!0?Se:O-Se;const be=new I.Vector3;be.setFromSphericalCoords(B,Se,0),N.push(be)}const G=R.index,K=R.attributes.position,$=new I.BufferAttribute(new Float32Array(R.attributes.position.count*3),3),oe=new I.Vector3,Ee=new I.Color;for(let ve=0;ve<G.count;ve++){const Fe=G.getX(ve);oe.fromBufferAttribute(K,Fe);let Se,be,Be=1;for(let Qe=1;Qe<N.length;Qe++){Se=Qe-1,be=Qe;const Oe=N[Se],xe=N[be];if(Q===!0){if(oe.y<=Oe.y&&oe.y>xe.y){Be=Math.abs(Oe.y-oe.y)/Math.abs(Oe.y-xe.y);break}}else if(oe.y>=Oe.y&&oe.y<xe.y){Be=Math.abs(Oe.y-oe.y)/Math.abs(Oe.y-xe.y);break}}const Le=x[Se],Ne=x[be];Ee.copy(Le).lerp(Ne,Be),I.ColorManagement.colorSpaceToWorking(Ee,I.SRGBColorSpace),$.setXYZ(Fe,Ee.r,Ee.g,Ee.b)}R.setAttribute("color",$)}const ne=new I.TextureLoader(this.manager);if(ne.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),e.indexOf("#VRML V2.0")===-1)throw Error("THREE.VRMLLexer: Version of VRML asset not supported.");const de=i(e);return c(de)}}class Ko{constructor(e){this.lexer=new dt.Lexer(e)}lex(e){const t=this.lexer.tokenize(e);if(t.errors.length>0)throw console.error(t.errors),Error("THREE.VRMLLexer: Lexing errors detected.");return t}}const zo=dt.CstParser;class Vo extends zo{constructor(e){super(e);const t=this,r=e.Version,i=e.LCurly,s=e.RCurly,o=e.LSquare,c=e.RSquare,A=e.Identifier,a=e.RouteIdentifier,f=e.StringLiteral,u=e.HexLiteral,b=e.NumberLiteral,d=e.TrueLiteral,E=e.FalseLiteral,g=e.NullLiteral,l=e.DEF,h=e.USE,p=e.ROUTE,C=e.TO,m=e.NodeName;t.RULE("vrml",function(){t.SUBRULE(t.version),t.AT_LEAST_ONE(function(){t.SUBRULE(t.node)}),t.MANY(function(){t.SUBRULE(t.route)})}),t.RULE("version",function(){t.CONSUME(r)}),t.RULE("node",function(){t.OPTION(function(){t.SUBRULE(t.def)}),t.CONSUME(m),t.CONSUME(i),t.MANY(function(){t.SUBRULE(t.field)}),t.CONSUME(s)}),t.RULE("field",function(){t.CONSUME(A),t.OR2([{ALT:function(){t.SUBRULE(t.singleFieldValue)}},{ALT:function(){t.SUBRULE(t.multiFieldValue)}}])}),t.RULE("def",function(){t.CONSUME(l),t.OR([{ALT:function(){t.CONSUME(A)}},{ALT:function(){t.CONSUME(m)}}])}),t.RULE("use",function(){t.CONSUME(h),t.OR([{ALT:function(){t.CONSUME(A)}},{ALT:function(){t.CONSUME(m)}}])}),t.RULE("singleFieldValue",function(){t.AT_LEAST_ONE(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(f)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(b)}},{ALT:function(){t.CONSUME(d)}},{ALT:function(){t.CONSUME(E)}},{ALT:function(){t.CONSUME(g)}}])})}),t.RULE("multiFieldValue",function(){t.CONSUME(o),t.MANY(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(f)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(b)}},{ALT:function(){t.CONSUME(g)}}])}),t.CONSUME(c)}),t.RULE("route",function(){t.CONSUME(p),t.CONSUME(a),t.CONSUME(C),t.CONSUME2(a)}),this.performSelfAnalysis()}}class Yo{constructor(e,t,r){this.a=e,this.b=t,this.c=r,this.normal=new I.Vector3}}const Xe={INTENSITY:1,INTENSITY_ALPHA:2,RGB:3,RGBA:4};class Wo extends I.Loader{constructor(e){super(e),this.animateBonePositions=!0,this.animateBoneRotations=!0,this.animateBoneScales=!0}load(e,t,r,i){const s=this,o=new I.FileLoader(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(c){try{t(s.parse(c))}catch(A){i?i(A):console.error(A),s.manager.itemError(e)}},r,i)}parse(e){function t(d){c(d)!=="HIERARCHY"&&console.error("THREE.BVHLoader2: HIERARCHY expected.");const E=[],g=i(d,c(d),E);c(d)!=="MOTION"&&console.error("THREE.BVHLoader2: MOTION expected.");let l=c(d).split(/[\s]+/);const h=parseInt(l[1]);isNaN(h)&&console.error("THREE.BVHLoader2: Failed to read number of frames."),l=c(d).split(/[\s]+/);const p=parseFloat(l[2]);isNaN(p)&&console.error("THREE.BVHLoader2: Failed to read frame time.");for(let C=0;C<h;C++)l=c(d).split(/[\s]+/),r(l,C*p,g);return E}function r(d,E,g){if(g.type==="ENDSITE")return;const l={time:E,position:new I.Vector3,rotation:new I.Quaternion,scale:new I.Vector3(1,1,1)};g.frames.push(l);const h=new I.Quaternion,p=new I.Vector3(1,0,0),C=new I.Vector3(0,1,0),m=new I.Vector3(0,0,1);for(let y=0;y<g.channels.length;y++)switch(g.channels[y]){case"Xposition":l.position.x=parseFloat(d.shift().trim());break;case"Yposition":l.position.y=parseFloat(d.shift().trim());break;case"Zposition":l.position.z=parseFloat(d.shift().trim());break;case"Xrotation":h.setFromAxisAngle(p,parseFloat(d.shift().trim())*Math.PI/180),l.rotation.multiply(h);break;case"Yrotation":h.setFromAxisAngle(C,parseFloat(d.shift().trim())*Math.PI/180),l.rotation.multiply(h);break;case"Zrotation":h.setFromAxisAngle(m,parseFloat(d.shift().trim())*Math.PI/180),l.rotation.multiply(h);break;case"Xscale":l.scale.x=parseFloat(d.shift().trim());break;case"Yscale":l.scale.y=parseFloat(d.shift().trim());break;case"Zscale":l.scale.z=parseFloat(d.shift().trim());break;default:console.warn("THREE.BVHLoader2: Invalid channel type.")}for(let y=0;y<g.children.length;y++)r(d,E,g.children[y])}function i(d,E,g){const l={name:"",type:"",frames:[]};g.push(l);let h=E.split(/[\s]+/);h[0].toUpperCase()==="END"&&h[1].toUpperCase()==="SITE"?(l.type="ENDSITE",l.name="ENDSITE"):(l.name=h[1],l.type=h[0].toUpperCase()),c(d)!=="{"&&console.error("THREE.BVHLoader2: Expected opening { after type & name"),h=c(d).split(/[\s]+/),h[0]!=="OFFSET"&&console.error("THREE.BVHLoader2: Expected OFFSET but got: "+h[0]),h.length!==4&&console.error("THREE.BVHLoader2: Invalid number of values for OFFSET.");const p=new I.Vector3(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));if((isNaN(p.x)||isNaN(p.y)||isNaN(p.z))&&console.error("THREE.BVHLoader2: Invalid values of OFFSET."),l.offset=p,l.type!=="ENDSITE"){h=c(d).split(/[\s]+/),h[0]!=="CHANNELS"&&console.error("THREE.BVHLoader2: Expected CHANNELS definition.");const C=parseInt(h[1]);l.channels=h.splice(2,C),l.children=[]}for(;;){const C=c(d);if(C==="}")return l;l.children.push(i(d,C,g))}}function s(d,E){const g=new I.Bone;if(E.push(g),g.position.add(d.offset),g.name=d.name,d.type!=="ENDSITE")for(let l=0;l<d.children.length;l++)g.add(s(d.children[l],E));return g}function o(d){const E=[];for(let g=0;g<d.length;g++){const l=d[g];if(l.type==="ENDSITE")continue;const h=[],p=[],C=[],m=[];for(let y=0;y<l.frames.length;y++){const v=l.frames[y];h.push(v.time),p.push(v.position.x+l.offset.x),p.push(v.position.y+l.offset.y),p.push(v.position.z+l.offset.z),C.push(v.rotation.x),C.push(v.rotation.y),C.push(v.rotation.z),C.push(v.rotation.w),m.push(v.scale.x),m.push(v.scale.y),m.push(v.scale.z)}A.animateBonePositions&&E.push(new I.VectorKeyframeTrack(l.name+".position",h,p)),A.animateBoneRotations&&E.push(new I.QuaternionKeyframeTrack(l.name+".quaternion",h,C)),A.animateBoneScales&&E.push(new I.VectorKeyframeTrack(l.name+".scale",h,m))}return new I.AnimationClip("animation",-1,E)}function c(d){let E;for(;(E=d.shift().trim()).length===0;);return E}const A=this,a=e.split(/[\r\n]+/g),f=t(a),u=[];s(f[0],u);const b=o(f);return{skeleton:new I.Skeleton(u),clip:b}}}let bt;async function Jo(n,e){return bt||(bt=new qo),bt.manager.setURLModifier(r=>(r.startsWith("./")&&(r=r.substring(2)),URL.createObjectURL(lr(n,r)))),await bt.loadAsync(e)}let Ut;async function Xo(n,e){Ut||(Ut=new Wo);const t=tn(n,e);return await Ut.parse(t)}function Zo(n){const e=n.clip.clone(),t=n.skeleton.bones[0].clone(!0),r=[];t.traverse(s=>{s instanceof se.Bone&&r.push(s)});const i=new se.Skeleton(r);return i.calculateInverses(),{clip:e,skeleton:i}}class $o{isDummy=!0;skeleton=new se.Skeleton([new se.Bone]);clip=new se.AnimationClip("dummy")}const Ht={},jt={};class Zt extends Me{ready;actions;comment=null;constructor(e){super(),this.actions={},this.ready=this.asyncInit(e)}initObject(){return new se.Object3D}async asyncInit(e){const t=await xn(e),r=new DOMParser,i=tn(t,"CATALOG.XML"),s=r.parseFromString(i,"application/xml");if(s.querySelector("parsererror"))return console.error("Acerola3D.asyncInit(): CATALOG.XML parse error."),this;const o="http://acerola3d.sourceforge.jp/a3/catalog",c=s.getElementsByTagNameNS(o,"c");c[0]&&(this.comment=c[0].textContent);const A=s.getElementsByTagNameNS(o,"a"),a={},f={};let u;for(const b of Array.from(A)){const d=b.getAttribute("an");if(d){u||(u=d);let E;const g=b.getAttribute("bvh");if(g){const U=t.zipUrl+"!"+g;Ht[U]||(Ht[U]=await Xo(t,g)),E=Zo(Ht[U]),E&&E.clip.tracks.forEach(w=>{w.setInterpolation(se.InterpolateDiscrete)})}else E=new $o;const l={};E.skeleton.bones.forEach(U=>{l[U.name]=U});const h=b.getAttribute("scale"),p=h?Number(h):1,C=b.getAttribute("offset"),m=new Ie;if(C){const U=C.split(" ");m.set(Number(U[0]),Number(U[1]),Number(U[2]))}const y={},v=b.getElementsByTagNameNS(o,"p");for(const U of Array.from(v)){const w=U.getAttribute("name"),M=U.getAttribute("wrl");if(w&&M){const _=t.zipUrl+"!"+M;jt[_]||(jt[_]=await Jo(t,M)),y[w]=jt[_].clone(!0)}}const S=new se.Object3D;S.add(E.skeleton.bones[0]),Gi(S,y),S.position.add(m),S.scale.set(p,p,p),S.traverse(U=>{U.userData.a3js={objectA3:this}}),a[d]={name:d,root:S,bones:l,skeleton:E.skeleton,bvh:E,scale:p,offset:m,parts:y},console.log(`actionName=${d}`),f[d]=new es(E.clip,d)}}return this.actions=a,this.setPoseMotions(f),u&&this.setState(u),this}addActionRoot(e){const t=this.actions[e];t&&(this.object.add(t.root),this.bones=t.bones,this.skeletons=[t.skeleton])}removeActionRoot(e){const t=this.actions[e];t&&(this.object.remove(t.root),this.bones={},this.skeletons=[])}}function Gi(n,e){if(tr(n)){const t=e[n.name];t&&n.add(t)}n.children&&n.children.forEach(t=>{Gi(t,e)})}class es extends rn{prepare3D(e){e instanceof Zt&&e.addActionRoot(this.name)}cleanup3D(e){e instanceof Zt&&e.removeActionRoot(this.name)}}class ts extends Me{constructor(e){super(e)}initObject(e){return e}}class ns extends Me{constructor(...e){super(e)}initObject(e){const t=e.filter(A=>typeof A=="number"),r=e.filter(A=>typeof A=="string"),i=new se.BoxGeometry(...t),s=r.length>0?r[0]:"rgb(128,128,128)",o=new se.MeshStandardMaterial({color:s});return new se.Mesh(i,o)}}class is extends Me{constructor(...e){super(e)}initObject(e){const t=e.filter(A=>typeof A=="number"),r=e.filter(A=>typeof A=="string"),i=new se.SphereGeometry(...t),s=r.length>0?r[0]:"rgb(128,128,128)",o=new se.MeshStandardMaterial({color:s});return new se.Mesh(i,o)}}class rs extends Me{constructor(e){super(e)}initObject(e){return new Mn(e)}}const os={offset:.01,auto:!0,height:1.5,radius:.3};class ss{objectA3;completeOption;controller;bodyDesc;body;colliderDesc;collider;preLocation;nextLocation;tmpVec3;constructor(e,t={}){if(this.completeOption={...os,...t},this.objectA3=e,this.preLocation=new Ie,this.nextLocation=new Ie,this.tmpVec3=new Ie,this.completeOption.auto){const r=new se.Box3().setFromObject(e.object),i=new se.Vector3;r.getSize(i),this.completeOption.radius=Math.max(i.x,i.z)/2,this.completeOption.height=i.y-this.completeOption.radius*2}this.bodyDesc=Ue.RigidBodyDesc.kinematicPositionBased(),this.colliderDesc=Ue.ColliderDesc.capsule(this.completeOption.height,this.completeOption.radius),this.bodyDesc.setTranslation(e.loc.x,e.loc.y,e.loc.z),this.preLocation.set(e.loc),this.bodyDesc.setRotation({x:e.quat.x,y:e.quat.y,z:e.quat.z,w:e.quat.w})}init(e){}addOneselfToPhysics(e){this.controller=e.world.createCharacterController(this.completeOption.offset),this.body=e.world.createRigidBody(this.bodyDesc),this.collider=e.world.createCollider(this.colliderDesc,this.body),this.collider&&ut.set(this.collider.handle,this.objectA3)}removeOneselfFromPhysics(e){this.body&&e.world.removeRigidBody(this.body),this.collider&&(e.world.removeCollider(this.collider,!1),ut.delete(this.collider.handle))}getTrans(e){return this.body?this.body.translation():this.bodyDesc.translation,e}setLocation(e){this.nextLocation.set(e)}setLocationNow(e){this.body?this.body.setNextKinematicTranslation(e):this.bodyDesc.setTranslation(e.x,e.y,e.z)}setQuat(e){this.body?this.body.setRotation(e,!1):this.bodyDesc.setRotation(e)}setQuatNow(e){this.body?this.body.setRotation(e,!1):this.bodyDesc.setRotation(e)}setScale(e){}setScaleNow(e){}isGrounded(){return this.controller?this.controller.computedGrounded():!1}update(e,t){if(!this.body||!this.controller||!this.collider)return t;this.tmpVec3.set(this.nextLocation),this.tmpVec3.sub(this.preLocation),this.controller.computeColliderMovement(this.collider,this.tmpVec3);const r=this.controller.computedMovement();this.tmpVec3.set(this.body.translation()),this.tmpVec3.add(r.x,r.y,r.z),this.body.setNextKinematicTranslation(this.tmpVec3);const i=this.body.translation();t.loc.set(i.x,i.y,i.z);const s=this.body.rotation();return t.quat.set(s.x,s.y,s.z,s.w),t}}exports.Acerola3D=Zt;exports.Box=ns;exports.Camera=Nn;exports.Canvas=ki;exports.CharactorRootMotion=ss;exports.ClipPoseMotion=rn;exports.ControllerBase=Dn;exports.GLTF=go;exports.GeneralCamera=gt;exports.HTML=rs;exports.ObjectA3=Me;exports.OrbitController=On;exports.Quat=we;exports.RapierPhysicsEngine=pt;exports.Scene=Ln;exports.Sound=rt;exports.Sphere=is;exports.Test=mo;exports.Text3D=Ro;exports.ThreeJS=ts;exports.Vec3=Ie;exports.Window=Si;exports.asyncSleep=cr;exports.deepMerge=Tt;exports.getQuatOfLookAt=lt;exports.initFont=To;exports.initPhysics=sr;exports.initSound=pr;exports.vec3EulerToQuat=en;
|
|
219
|
+
Please avoid using it as it will be completely removed in the future`)}r.clearCache=u;var b=Yo();Object.defineProperty(r,"createSyntaxDiagramsCode",{enumerable:!0,get:function(){return b.createSyntaxDiagramsCode}});var d=(function(){function I(){throw new Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.
|
|
220
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return I})();r.Parser=d});const pt=Jo();class Xo extends m.Loader{constructor(e){super(e)}load(e,t,i,n){const s=this,o=s.path===""?m.LoaderUtils.extractUrlBase(e):s.path,c=new m.FileLoader(s.manager);c.setPath(s.path),c.setRequestHeader(s.requestHeader),c.setWithCredentials(s.withCredentials),c.load(e,function(A){try{t(s.parse(A,o))}catch(a){n?n(a):console.error(a),s.manager.itemError(e)}},i,n)}parse(e,t){const i={};function n(R){const y=s(),T=new Zo(y.tokens),x=new es(y.tokenVocabulary),w=o(x.getBaseCstVisitorConstructor()),N=T.lex(R);x.input=N.tokens;const F=x.vrml();if(x.errors.length>0)throw console.error(x.errors),Error("THREE.VRMLLoader2: Parsing errors detected.");return w.visit(F)}function s(){const R=pt.createToken,y=R({name:"RouteIdentifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*[\.][^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*/}),T=R({name:"Identifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]([^\0-\x20\x22\x27\x23\x2b\x2c\x2e\x5b\x5d\x5c\x7b\x7d])*/,longer_alt:y}),x=["Anchor","Billboard","Collision","Group","Transform","Inline","LOD","Switch","AudioClip","DirectionalLight","PointLight","Script","Shape","Sound","SpotLight","WorldInfo","CylinderSensor","PlaneSensor","ProximitySensor","SphereSensor","TimeSensor","TouchSensor","VisibilitySensor","Box","Cone","Cylinder","ElevationGrid","Extrusion","IndexedFaceSet","IndexedLineSet","PointSet","Sphere","Color","Coordinate","Normal","TextureCoordinate","Appearance","FontStyle","ImageTexture","Material","MovieTexture","PixelTexture","TextureTransform","ColorInterpolator","CoordinateInterpolator","NormalInterpolator","OrientationInterpolator","PositionInterpolator","ScalarInterpolator","Background","Fog","NavigationInfo","Viewpoint","Text"],w=R({name:"Version",pattern:/#VRML.*/,longer_alt:T}),N=R({name:"NodeName",pattern:new RegExp(x.join("|")),longer_alt:T}),F=R({name:"DEF",pattern:/DEF/,longer_alt:T}),G=R({name:"USE",pattern:/USE/,longer_alt:T}),z=R({name:"ROUTE",pattern:/ROUTE/,longer_alt:T}),ee=R({name:"TO",pattern:/TO/,longer_alt:T}),se=R({name:"StringLiteral",pattern:/"(?:[^\\"\n\r]|\\[bfnrtv"\\/]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*"/}),me=R({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]+/}),ke=R({name:"NumberLiteral",pattern:/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/}),Pe=R({name:"TrueLiteral",pattern:/TRUE/}),_e=R({name:"FalseLiteral",pattern:/FALSE/}),ye=R({name:"NullLiteral",pattern:/NULL/}),Te=R({name:"LSquare",pattern:/\[/}),Le=R({name:"RSquare",pattern:/]/}),Fe=R({name:"LCurly",pattern:/{/}),Qe=R({name:"RCurly",pattern:/}/}),Oe=R({name:"Comment",pattern:/#.*/,group:pt.Lexer.SKIPPED}),qe=[R({name:"WhiteSpace",pattern:/[ ,\s]/,group:pt.Lexer.SKIPPED}),N,F,G,z,ee,Pe,_e,ye,w,T,y,se,me,ke,Te,Le,Fe,Qe,Oe],Ke={};for(let ve=0,fe=qe.length;ve<fe;ve++){const de=qe[ve];Ke[de.name]=de}return{tokens:qe,tokenVocabulary:Ke}}function o(R){class y extends R{constructor(){super(),this.validateVisitor()}vrml(w){const N={version:this.visit(w.version),nodes:[],routes:[]};for(let F=0,G=w.node.length;F<G;F++){const z=w.node[F];N.nodes.push(this.visit(z))}if(w.route)for(let F=0,G=w.route.length;F<G;F++){const z=w.route[F];N.routes.push(this.visit(z))}return N}version(w){return w.Version[0].image}node(w){const N={name:w.NodeName[0].image,fields:[]};if(w.field)for(let F=0,G=w.field.length;F<G;F++){const z=w.field[F];N.fields.push(this.visit(z))}return w.def&&(N.DEF=this.visit(w.def[0])),N}field(w){const N={name:w.Identifier[0].image,type:null,values:null};let F;return w.singleFieldValue&&(F=this.visit(w.singleFieldValue[0])),w.multiFieldValue&&(F=this.visit(w.multiFieldValue[0])),N.type=F.type,N.values=F.values,N}def(w){return(w.Identifier||w.NodeName)[0].image}use(w){return{USE:(w.Identifier||w.NodeName)[0].image}}singleFieldValue(w){return T(this,w)}multiFieldValue(w){return T(this,w)}route(w){return{FROM:w.RouteIdentifier[0].image,TO:w.RouteIdentifier[1].image}}}function T(x,w){const N={type:null,values:[]};if(w.node){N.type="node";for(let F=0,G=w.node.length;F<G;F++){const z=w.node[F];N.values.push(x.visit(z))}}if(w.use){N.type="use";for(let F=0,G=w.use.length;F<G;F++){const z=w.use[F];N.values.push(x.visit(z))}}if(w.StringLiteral){N.type="string";for(let F=0,G=w.StringLiteral.length;F<G;F++){const z=w.StringLiteral[F];N.values.push(z.image.replace(/'|"/g,""))}}if(w.NumberLiteral){N.type="number";for(let F=0,G=w.NumberLiteral.length;F<G;F++){const z=w.NumberLiteral[F];N.values.push(parseFloat(z.image))}}if(w.HexLiteral){N.type="hex";for(let F=0,G=w.HexLiteral.length;F<G;F++){const z=w.HexLiteral[F];N.values.push(z.image)}}if(w.TrueLiteral){N.type="boolean";for(let F=0,G=w.TrueLiteral.length;F<G;F++)w.TrueLiteral[F].image==="TRUE"&&N.values.push(!0)}if(w.FalseLiteral){N.type="boolean";for(let F=0,G=w.FalseLiteral.length;F<G;F++)w.FalseLiteral[F].image==="FALSE"&&N.values.push(!1)}return w.NullLiteral&&(N.type="null",w.NullLiteral.forEach(function(){N.values.push(null)})),N}return new y}function c(R){const y=R.nodes,T=new m.Scene;for(let x=0,w=y.length;x<w;x++){const N=y[x];A(N)}for(let x=0,w=y.length;x<w;x++){const N=y[x],F=a(N);F instanceof m.Object3D&&T.add(F),N.name==="WorldInfo"&&(T.userData.worldInfo=F)}return T}function A(R){R.DEF&&(i[R.DEF]=R);const y=R.fields;for(let T=0,x=y.length;T<x;T++){const w=y[T];if(w.type==="node"){const N=w.values;for(let F=0,G=N.length;F<G;F++)A(N[F])}}}function a(R){return R.USE?J(R.USE):(R.build!==void 0||(R.build=f(R)),R.build)}function f(R){const y=R.name;let T;switch(y){case"Anchor":case"Group":case"Transform":case"Collision":T=u(R);break;case"Background":T=b(R);break;case"Shape":T=d(R);break;case"Appearance":T=I(R);break;case"Material":T=g(R);break;case"ImageTexture":T=C(R);break;case"PixelTexture":T=p(R);break;case"TextureTransform":T=E(R);break;case"IndexedFaceSet":T=S(R);break;case"IndexedLineSet":T=U(R);break;case"PointSet":T=v(R);break;case"Box":T=O(R);break;case"Cone":T=L(R);break;case"Cylinder":T=k(R);break;case"Sphere":T=D(R);break;case"ElevationGrid":T=_(R);break;case"Extrusion":T=V(R);break;case"Color":case"Coordinate":case"Normal":case"TextureCoordinate":T=B(R);break;case"WorldInfo":T=Q(R);break;case"Billboard":case"Inline":case"LOD":case"Switch":case"AudioClip":case"DirectionalLight":case"PointLight":case"Script":case"Sound":case"SpotLight":case"CylinderSensor":case"PlaneSensor":case"ProximitySensor":case"SphereSensor":case"TimeSensor":case"TouchSensor":case"VisibilitySensor":case"Text":case"FontStyle":case"MovieTexture":case"ColorInterpolator":case"CoordinateInterpolator":case"NormalInterpolator":case"OrientationInterpolator":case"PositionInterpolator":case"ScalarInterpolator":case"Fog":case"NavigationInfo":case"Viewpoint":break;default:console.warn("THREE.VRMLLoader2: Unknown node:",y);break}return T!==void 0&&R.DEF!==void 0&&T.hasOwnProperty("name")===!0&&(T.name=R.DEF),T}function u(R){const y=new m.Group,T=R.fields;for(let x=0,w=T.length;x<w;x++){const N=T[x],F=N.name,G=N.values;switch(F){case"bboxCenter":break;case"bboxSize":break;case"center":break;case"children":q(G,y);break;case"description":break;case"collide":break;case"parameter":break;case"rotation":const z=new m.Vector3(G[0],G[1],G[2]).normalize(),ee=G[3];y.quaternion.setFromAxisAngle(z,ee);break;case"scale":y.scale.set(G[0],G[1],G[2]);break;case"scaleOrientation":break;case"translation":y.position.set(G[0],G[1],G[2]);break;case"proxy":break;case"url":break;default:console.warn("THREE.VRMLLoader2: Unknown field:",F);break}}return y}function b(R){const y=new m.Group;let T,x,w,N;const F=R.fields;for(let z=0,ee=F.length;z<ee;z++){const se=F[z],me=se.name,ke=se.values;switch(me){case"groundAngle":T=ke;break;case"groundColor":x=ke;break;case"backUrl":break;case"bottomUrl":break;case"frontUrl":break;case"leftUrl":break;case"rightUrl":break;case"topUrl":break;case"skyAngle":w=ke;break;case"skyColor":N=ke;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",me);break}}const G=1e4;if(N){const z=new m.SphereGeometry(G,32,16),ee=new m.MeshBasicMaterial({fog:!1,side:m.BackSide,depthWrite:!1,depthTest:!1});N.length>3?(K(z,G,w,M(N),!0),ee.vertexColors=!0):ee.color.setRGB(N[0],N[1],N[2],m.SRGBColorSpace);const se=new m.Mesh(z,ee);y.add(se)}if(x&&x.length>0){const z=new m.SphereGeometry(G,32,16,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),ee=new m.MeshBasicMaterial({fog:!1,side:m.BackSide,vertexColors:!0,depthWrite:!1,depthTest:!1});K(z,G,T,M(x),!1);const se=new m.Mesh(z,ee);y.add(se)}return y.renderOrder=-1/0,y}function d(R){const y=R.fields;let T=new m.MeshBasicMaterial({name:m.Loader.DEFAULT_MATERIAL_NAME,color:0}),x;for(let N=0,F=y.length;N<F;N++){const G=y[N],z=G.name,ee=G.values;switch(z){case"appearance":ee[0]!==null&&(T=a(ee[0]));break;case"geometry":ee[0]!==null&&(x=a(ee[0]));break;default:console.warn("THREE.VRMLLoader2: Unknown field:",z);break}}let w;if(x&&x.attributes.position){const N=x._type;if(N==="points"){const F=new m.PointsMaterial({name:m.Loader.DEFAULT_MATERIAL_NAME,color:16777215,opacity:T.opacity,transparent:T.transparent});x.attributes.color!==void 0?F.vertexColors=!0:T.isMeshPhongMaterial&&F.color.copy(T.emissive),w=new m.Points(x,F)}else if(N==="line"){const F=new m.LineBasicMaterial({name:m.Loader.DEFAULT_MATERIAL_NAME,color:16777215,opacity:T.opacity,transparent:T.transparent});x.attributes.color!==void 0?F.vertexColors=!0:T.isMeshPhongMaterial&&F.color.copy(T.emissive),w=new m.LineSegments(x,F)}else x._solid!==void 0&&(T.side=x._solid?m.FrontSide:m.DoubleSide),x.attributes.color!==void 0&&(T.vertexColors=!0),w=new m.Mesh(x,T)}else w=new m.Object3D,w.visible=!1;return w}function I(R){let y=new m.MeshPhongMaterial,T;const x=R.fields;for(let w=0,N=x.length;w<N;w++){const F=x[w],G=F.name,z=F.values;switch(G){case"material":if(z[0]!==null){const se=a(z[0]);se.diffuseColor&&y.color.copy(se.diffuseColor),se.emissiveColor&&y.emissive.copy(se.emissiveColor),se.shininess&&(y.shininess=se.shininess),se.specularColor&&y.specular.copy(se.specularColor),se.transparency&&(y.opacity=1-se.transparency),se.transparency>0&&(y.transparent=!0)}else y=new m.MeshBasicMaterial({name:m.Loader.DEFAULT_MATERIAL_NAME,color:0});break;case"texture":const ee=z[0];ee!==null&&(ee.name==="ImageTexture"||ee.name==="PixelTexture"||ee.USE)&&(y.map=a(ee));break;case"textureTransform":z[0]!==null&&(T=a(z[0]));break;default:console.warn("THREE.VRMLLoader2: Unknown field:",G);break}}if(y.map){if(y.map.__type){switch(y.map.__type){case Ze.INTENSITY_ALPHA:y.opacity=1;break;case Ze.RGB:y.color.set(16777215);break;case Ze.RGBA:y.color.set(16777215),y.opacity=1;break}delete y.map.__type}T&&(y.map.center.copy(T.center),y.map.rotation=T.rotation,y.map.repeat.copy(T.scale),y.map.offset.copy(T.translation))}return y}function g(R){const y={},T=R.fields;for(let x=0,w=T.length;x<w;x++){const N=T[x],F=N.name,G=N.values;switch(F){case"ambientIntensity":break;case"diffuseColor":y.diffuseColor=new m.Color().setRGB(G[0],G[1],G[2],m.SRGBColorSpace);break;case"emissiveColor":y.emissiveColor=new m.Color().setRGB(G[0],G[1],G[2],m.SRGBColorSpace);break;case"shininess":y.shininess=G[0];break;case"specularColor":y.specularColor=new m.Color().setRGB(G[0],G[1],G[2],m.SRGBColorSpace);break;case"transparency":y.transparency=G[0];break;default:console.warn("THREE.VRMLLoader2: Unknown field:",F);break}}return y}function l(R,y,T){let x;switch(y){case Ze.INTENSITY:x=parseInt(R),T.r=x,T.g=x,T.b=x,T.a=1;break;case Ze.INTENSITY_ALPHA:x=parseInt("0x"+R.substring(2,4)),T.r=x,T.g=x,T.b=x,T.a=parseInt("0x"+R.substring(4,6));break;case Ze.RGB:T.r=parseInt("0x"+R.substring(2,4)),T.g=parseInt("0x"+R.substring(4,6)),T.b=parseInt("0x"+R.substring(6,8)),T.a=1;break;case Ze.RGBA:T.r=parseInt("0x"+R.substring(2,4)),T.g=parseInt("0x"+R.substring(4,6)),T.b=parseInt("0x"+R.substring(6,8)),T.a=parseInt("0x"+R.substring(8,10));break}}function h(R){let y;switch(R){case 1:y=Ze.INTENSITY;break;case 2:y=Ze.INTENSITY_ALPHA;break;case 3:y=Ze.RGB;break;case 4:y=Ze.RGBA;break}return y}function p(R){let y,T=m.RepeatWrapping,x=m.RepeatWrapping;const w=R.fields;for(let N=0,F=w.length;N<F;N++){const G=w[N],z=G.name,ee=G.values;switch(z){case"image":const se=ee[0],me=ee[1],ke=ee[2],Pe=h(ke),_e=new Uint8Array(4*se*me),ye={r:0,g:0,b:0,a:0};for(let Te=3,Le=0,Fe=ee.length;Te<Fe;Te++,Le++){l(ee[Te],Pe,ye);const Qe=Le*4;_e[Qe+0]=ye.r,_e[Qe+1]=ye.g,_e[Qe+2]=ye.b,_e[Qe+3]=ye.a}y=new m.DataTexture(_e,se,me),y.colorSpace=m.SRGBColorSpace,y.needsUpdate=!0,y.__type=Pe;break;case"repeatS":ee[0]===!1&&(T=m.ClampToEdgeWrapping);break;case"repeatT":ee[0]===!1&&(x=m.ClampToEdgeWrapping);break;default:console.warn("THREE.VRMLLoader2: Unknown field:",z);break}}return y&&(y.wrapS=T,y.wrapT=x),y}function C(R){let y,T=m.RepeatWrapping,x=m.RepeatWrapping;const w=R.fields;for(let N=0,F=w.length;N<F;N++){const G=w[N],z=G.name,ee=G.values;switch(z){case"url":const se=ee[0];se&&(y=ie.load(se));break;case"repeatS":ee[0]===!1&&(T=m.ClampToEdgeWrapping);break;case"repeatT":ee[0]===!1&&(x=m.ClampToEdgeWrapping);break;default:console.warn("THREE.VRMLLoader2: Unknown field:",z);break}}return y&&(y.wrapS=T,y.wrapT=x,y.colorSpace=m.SRGBColorSpace),y}function E(R){const y={center:new m.Vector2,rotation:new m.Vector2,scale:new m.Vector2,translation:new m.Vector2},T=R.fields;for(let x=0,w=T.length;x<w;x++){const N=T[x],F=N.name,G=N.values;switch(F){case"center":y.center.set(G[0],G[1]);break;case"rotation":y.rotation=G[0];break;case"scale":y.scale.set(G[0],G[1]);break;case"translation":y.translation.set(G[0],G[1]);break;default:console.warn("THREE.VRMLLoader2: Unknown field:",F);break}}return y}function B(R){return R.fields[0].values}function Q(R){const y={},T=R.fields;for(let x=0,w=T.length;x<w;x++){const N=T[x],F=N.name,G=N.values;switch(F){case"title":y.title=G[0];break;case"info":y.info=G;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",F);break}}return y}function S(R){let y,T,x,w,N=!0,F=!0,G=0,z,ee,se,me,ke=!0,Pe=!0;const _e=R.fields;for(let De=0,qe=_e.length;De<qe;De++){const Ke=_e[De],ve=Ke.name,fe=Ke.values;switch(ve){case"color":const de=fe[0];de!==null&&(y=a(de));break;case"coord":const ue=fe[0];ue!==null&&(T=a(ue));break;case"normal":const pe=fe[0];pe!==null&&(x=a(pe));break;case"texCoord":const Ee=fe[0];Ee!==null&&(w=a(Ee));break;case"ccw":N=fe[0];break;case"colorIndex":z=fe;break;case"colorPerVertex":ke=fe[0];break;case"convex":break;case"coordIndex":ee=fe;break;case"creaseAngle":G=fe[0];break;case"normalIndex":se=fe;break;case"normalPerVertex":Pe=fe[0];break;case"solid":F=fe[0];break;case"texCoordIndex":me=fe;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",ve);break}}if(ee===void 0)return console.warn("THREE.VRMLLoader2: Missing coordIndex."),new m.BufferGeometry;const ye=X(ee,N);let Te,Le,Fe;if(y){if(ke===!0)if(z&&z.length>0){const De=X(z,N);Te=ne(ye,De,y,3)}else Te=Ie(ye,new m.Float32BufferAttribute(y,3));else if(z&&z.length>0){const De=le(y,z),qe=$(De,ee);Te=Ae(ye,qe)}else{const De=$(y,ee);Te=Ae(ye,De)}Y(Te)}if(x)if(Pe===!0)if(se&&se.length>0){const De=X(se,N);Le=ne(ye,De,x,3)}else Le=Ie(ye,new m.Float32BufferAttribute(x,3));else if(se&&se.length>0){const De=le(x,se),qe=$(De,ee);Le=Ae(ye,qe)}else{const De=$(x,ee);Le=Ae(ye,De)}else Le=Ve(ye,T,G);if(w)if(me&&me.length>0){const De=X(me,N);Fe=ne(ye,De,w,2)}else Fe=Ie(ye,new m.Float32BufferAttribute(w,2));const Qe=new m.BufferGeometry,Oe=Ie(ye,new m.Float32BufferAttribute(T,3));return Qe.setAttribute("position",Oe),Qe.setAttribute("normal",Le),Te&&Qe.setAttribute("color",Te),Fe&&Qe.setAttribute("uv",Fe),Qe._solid=F,Qe._type="mesh",Qe}function U(R){let y,T,x,w,N=!0;const F=R.fields;for(let me=0,ke=F.length;me<ke;me++){const Pe=F[me],_e=Pe.name,ye=Pe.values;switch(_e){case"color":const Te=ye[0];Te!==null&&(y=a(Te));break;case"coord":const Le=ye[0];Le!==null&&(T=a(Le));break;case"colorIndex":x=ye;break;case"colorPerVertex":N=ye[0];break;case"coordIndex":w=ye;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",_e);break}}let G;const z=re(w);if(y){if(N===!0)if(x.length>0){const me=re(x);G=ne(z,me,y,3)}else G=Ie(z,new m.Float32BufferAttribute(y,3));else if(x.length>0){const me=le(y,x),ke=oe(me,w);G=be(z,ke)}else{const me=oe(y,w);G=be(z,me)}Y(G)}const ee=new m.BufferGeometry,se=Ie(z,new m.Float32BufferAttribute(T,3));return ee.setAttribute("position",se),G&&ee.setAttribute("color",G),ee._type="line",ee}function v(R){let y,T;const x=R.fields;for(let N=0,F=x.length;N<F;N++){const G=x[N],z=G.name,ee=G.values;switch(z){case"color":const se=ee[0];se!==null&&(y=a(se));break;case"coord":const me=ee[0];me!==null&&(T=a(me));break;default:console.warn("THREE.VRMLLoader2: Unknown field:",z);break}}const w=new m.BufferGeometry;if(w.setAttribute("position",new m.Float32BufferAttribute(T,3)),y){const N=new m.Float32BufferAttribute(y,3);Y(N),w.setAttribute("color",N)}return w._type="points",w}function O(R){const y=new m.Vector3(2,2,2),T=R.fields;for(let w=0,N=T.length;w<N;w++){const F=T[w],G=F.name,z=F.values;G==="size"?(y.x=z[0],y.y=z[1],y.z=z[2]):console.warn("THREE.VRMLLoader2: Unknown field:",G)}return new m.BoxGeometry(y.x,y.y,y.z)}function L(R){let y=1,T=2,x=!1;const w=R.fields;for(let F=0,G=w.length;F<G;F++){const z=w[F],ee=z.name,se=z.values;switch(ee){case"bottom":x=!se[0];break;case"bottomRadius":y=se[0];break;case"height":T=se[0];break;case"side":break;default:console.warn("THREE.VRMLLoader2: Unknown field:",ee);break}}return new m.ConeGeometry(y,T,16,1,x)}function k(R){let y=1,T=2;const x=R.fields;for(let N=0,F=x.length;N<F;N++){const G=x[N],z=G.name,ee=G.values;switch(z){case"bottom":break;case"radius":y=ee[0];break;case"height":T=ee[0];break;case"side":break;case"top":break;default:console.warn("THREE.VRMLLoader2: Unknown field:",z);break}}return new m.CylinderGeometry(y,y,T,16,1)}function D(R){let y=1;const T=R.fields;for(let w=0,N=T.length;w<N;w++){const F=T[w],G=F.name,z=F.values;G==="radius"?y=z[0]:console.warn("THREE.VRMLLoader2: Unknown field:",G)}return new m.SphereGeometry(y,16,16)}function _(R){let y,T,x,w,N=!0,F=!0,G=!0,z=!0,ee=0,se=2,me=2,ke=1,Pe=1;const _e=R.fields;for(let fe=0,de=_e.length;fe<de;fe++){const ue=_e[fe],pe=ue.name,Ee=ue.values;switch(pe){case"color":const Me=Ee[0];Me!==null&&(y=a(Me));break;case"normal":const nt=Ee[0];nt!==null&&(T=a(nt));break;case"texCoord":const it=Ee[0];it!==null&&(x=a(it));break;case"height":w=Ee;break;case"ccw":z=Ee[0];break;case"colorPerVertex":N=Ee[0];break;case"creaseAngle":ee=Ee[0];break;case"normalPerVertex":F=Ee[0];break;case"solid":G=Ee[0];break;case"xDimension":se=Ee[0];break;case"xSpacing":ke=Ee[0];break;case"zDimension":me=Ee[0];break;case"zSpacing":Pe=Ee[0];break;default:console.warn("THREE.VRMLLoader2: Unknown field:",pe);break}}const ye=[],Te=[],Le=[],Fe=[];for(let fe=0;fe<me;fe++)for(let de=0;de<se;de++){const ue=fe*se+de,pe=ke*fe,Ee=w[ue],Me=Pe*de;if(ye.push(pe,Ee,Me),y&&N===!0){const nt=y[ue*3+0],it=y[ue*3+1],xt=y[ue*3+2];Le.push(nt,it,xt)}if(T&&F===!0){const nt=T[ue*3+0],it=T[ue*3+1],xt=T[ue*3+2];Te.push(nt,it,xt)}if(x){const nt=x[ue*2+0],it=x[ue*2+1];Fe.push(nt,it)}else Fe.push(fe/(se-1),de/(me-1))}const Qe=[];for(let fe=0;fe<se-1;fe++)for(let de=0;de<me-1;de++){const ue=fe+de*se,pe=fe+(de+1)*se,Ee=fe+1+(de+1)*se,Me=fe+1+de*se;z===!0?(Qe.push(ue,Ee,pe),Qe.push(Ee,ue,Me)):(Qe.push(ue,pe,Ee),Qe.push(Ee,Me,ue))}const Oe=Ie(Qe,new m.Float32BufferAttribute(ye,3)),De=Ie(Qe,new m.Float32BufferAttribute(Fe,2));let qe,Ke;if(y){if(N===!1){for(let fe=0;fe<se-1;fe++)for(let de=0;de<me-1;de++){const ue=fe+de*(se-1),pe=y[ue*3+0],Ee=y[ue*3+1],Me=y[ue*3+2];Le.push(pe,Ee,Me),Le.push(pe,Ee,Me),Le.push(pe,Ee,Me),Le.push(pe,Ee,Me),Le.push(pe,Ee,Me),Le.push(pe,Ee,Me)}qe=new m.Float32BufferAttribute(Le,3)}else qe=Ie(Qe,new m.Float32BufferAttribute(Le,3));Y(qe)}if(T)if(F===!1){for(let fe=0;fe<se-1;fe++)for(let de=0;de<me-1;de++){const ue=fe+de*(se-1),pe=T[ue*3+0],Ee=T[ue*3+1],Me=T[ue*3+2];Te.push(pe,Ee,Me),Te.push(pe,Ee,Me),Te.push(pe,Ee,Me),Te.push(pe,Ee,Me),Te.push(pe,Ee,Me),Te.push(pe,Ee,Me)}Ke=new m.Float32BufferAttribute(Te,3)}else Ke=Ie(Qe,new m.Float32BufferAttribute(Te,3));else Ke=Ve(Qe,ye,ee);const ve=new m.BufferGeometry;return ve.setAttribute("position",Oe),ve.setAttribute("normal",Ke),ve.setAttribute("uv",De),qe&&ve.setAttribute("color",qe),ve._solid=G,ve._type="mesh",ve}function V(R){let y=[1,1,1,-1,-1,-1,-1,1,1,1],T=[0,0,0,0,1,0],x,w,N=!0,F=!0,G=0,z=!0,ee=!0;const se=R.fields;for(let ve=0,fe=se.length;ve<fe;ve++){const de=se[ve],ue=de.name,pe=de.values;switch(ue){case"beginCap":N=pe[0];break;case"ccw":F=pe[0];break;case"convex":break;case"creaseAngle":G=pe[0];break;case"crossSection":y=pe;break;case"endCap":z=pe[0];break;case"orientation":w=pe;break;case"scale":x=pe;break;case"solid":ee=pe[0];break;case"spine":T=pe;break;default:console.warn("THREE.VRMLLoader2: Unknown field:",ue);break}}const me=y[0]===y[y.length-2]&&y[1]===y[y.length-1],ke=[],Pe=new m.Vector3,_e=new m.Vector3,ye=new m.Vector3,Te=new m.Vector3,Le=new m.Quaternion;for(let ve=0,fe=0,de=0,ue=T.length;ve<ue;ve+=3,fe+=2,de+=4){Pe.fromArray(T,ve),_e.x=x?x[fe+0]:1,_e.y=1,_e.z=x?x[fe+1]:1,ye.x=w?w[de+0]:0,ye.y=w?w[de+1]:0,ye.z=w?w[de+2]:1;const pe=w?w[de+3]:0;for(let Ee=0,Me=y.length;Ee<Me;Ee+=2)Te.x=y[Ee+0],Te.y=0,Te.z=y[Ee+1],Te.multiply(_e),Le.setFromAxisAngle(ye,pe),Te.applyQuaternion(Le),Te.add(Pe),ke.push(Te.x,Te.y,Te.z)}const Fe=[],Qe=T.length/3,Oe=y.length/2;for(let ve=0;ve<Qe-1;ve++)for(let fe=0;fe<Oe-1;fe++){const de=fe+ve*Oe;let ue=fe+1+ve*Oe;const pe=fe+(ve+1)*Oe;let Ee=fe+1+(ve+1)*Oe;fe===Oe-2&&me===!0&&(ue=ve*Oe,Ee=(ve+1)*Oe),F===!0?(Fe.push(de,ue,pe),Fe.push(pe,ue,Ee)):(Fe.push(de,pe,ue),Fe.push(pe,Ee,ue))}if(N===!0||z===!0){const ve=[];for(let ue=0,pe=y.length;ue<pe;ue+=2)ve.push(new m.Vector2(y[ue],y[ue+1]));const fe=m.ShapeUtils.triangulateShape(ve,[]),de=[];for(let ue=0,pe=fe.length;ue<pe;ue++){const Ee=fe[ue];de.push(Ee[0],Ee[1],Ee[2])}if(N===!0)for(let ue=0,pe=de.length;ue<pe;ue+=3)F===!0?Fe.push(de[ue+0],de[ue+1],de[ue+2]):Fe.push(de[ue+0],de[ue+2],de[ue+1]);if(z===!0){const ue=Oe*(Qe-1);for(let pe=0,Ee=de.length;pe<Ee;pe+=3)F===!0?Fe.push(ue+de[pe+0],ue+de[pe+2],ue+de[pe+1]):Fe.push(ue+de[pe+0],ue+de[pe+1],ue+de[pe+2])}}const De=Ie(Fe,new m.Float32BufferAttribute(ke,3)),qe=Ve(Fe,ke,G),Ke=new m.BufferGeometry;return Ke.setAttribute("position",De),Ke.setAttribute("normal",qe),Ke._solid=ee,Ke._type="mesh",Ke}function J(R){const y=i[R],T=a(y);return T.isObject3D||T.isMaterial?T.clone():T}function q(R,y){for(let T=0,x=R.length;T<x;T++){const w=a(R[T]);w instanceof m.Object3D&&y.add(w)}}function X(R,y){const T=[];let x=0;for(let w=0,N=R.length;w<N;w++){const F=R[x],G=R[w+(y?1:2)],z=R[w+(y?2:1)];T.push(F,G,z),(R[w+3]===-1||w+3>=N)&&(w+=3,x=w+1)}return T}function $(R,y){const T=[];let x=0;for(let w=0,N=y.length;w<N;w++){const F=x*3,G=R[F],z=R[F+1],ee=R[F+2];T.push(G,z,ee),(y[w+3]===-1||w+3>=N)&&(w+=3,x++)}return T}function le(R,y){const T=[];for(let x=0,w=y.length;x<w;x++){const F=y[x]*3,G=R[F],z=R[F+1],ee=R[F+2];T.push(G,z,ee)}return T}function re(R){const y=[];for(let T=0,x=R.length;T<x;T++){const w=R[T],N=R[T+1];y.push(w,N),(R[T+2]===-1||T+2>=x)&&(T+=2)}return y}function oe(R,y){const T=[];let x=0;for(let w=0,N=y.length;w<N;w++){const F=x*3,G=R[F],z=R[F+1],ee=R[F+2];T.push(G,z,ee),(y[w+2]===-1||w+2>=N)&&(w+=2,x++)}return T}const te=new m.Vector3,he=new m.Vector3,P=new m.Vector3,j=new m.Vector2,W=new m.Vector2,Z=new m.Vector2;function ne(R,y,T,x){const w=[];for(let N=0,F=R.length;N<F;N+=3){const G=y[N],z=y[N+1],ee=y[N+2];x===2?(j.fromArray(T,G*x),W.fromArray(T,z*x),Z.fromArray(T,ee*x),w.push(j.x,j.y),w.push(W.x,W.y),w.push(Z.x,Z.y)):(te.fromArray(T,G*x),he.fromArray(T,z*x),P.fromArray(T,ee*x),w.push(te.x,te.y,te.z),w.push(he.x,he.y,he.z),w.push(P.x,P.y,P.z))}return new m.Float32BufferAttribute(w,x)}function Ae(R,y){const T=[];for(let x=0,w=0,N=R.length;x<N;x+=3,w++)te.fromArray(y,w*3),T.push(te.x,te.y,te.z),T.push(te.x,te.y,te.z),T.push(te.x,te.y,te.z);return new m.Float32BufferAttribute(T,3)}function be(R,y){const T=[];for(let x=0,w=0,N=R.length;x<N;x+=2,w++)te.fromArray(y,w*3),T.push(te.x,te.y,te.z),T.push(te.x,te.y,te.z);return new m.Float32BufferAttribute(T,3)}function Ie(R,y){const T=y.array,x=y.itemSize,w=new T.constructor(R.length*x);let N=0,F=0;for(let G=0,z=R.length;G<z;G++){N=R[G]*x;for(let ee=0;ee<x;ee++)w[F++]=T[N++]}return new m.Float32BufferAttribute(w,x)}const Ne=new m.Vector3,je=new m.Vector3;function Ve(R,y,T){const x=[],w={};for(let F=0,G=R.length;F<G;F+=3){const z=R[F],ee=R[F+1],se=R[F+2],me=new ts(z,ee,se);te.fromArray(y,z*3),he.fromArray(y,ee*3),P.fromArray(y,se*3),je.subVectors(P,he),Ne.subVectors(te,he),je.cross(Ne),je.normalize(),me.normal.copy(je),w[z]===void 0&&(w[z]=[]),w[ee]===void 0&&(w[ee]=[]),w[se]===void 0&&(w[se]=[]),w[z].push(me.normal),w[ee].push(me.normal),w[se].push(me.normal),x.push(me)}const N=[];for(let F=0,G=x.length;F<G;F++){const z=x[F],ee=Ue(w[z.a],z.normal,T),se=Ue(w[z.b],z.normal,T),me=Ue(w[z.c],z.normal,T);te.fromArray(y,z.a*3),he.fromArray(y,z.b*3),P.fromArray(y,z.c*3),N.push(ee.x,ee.y,ee.z),N.push(se.x,se.y,se.z),N.push(me.x,me.y,me.z)}return new m.Float32BufferAttribute(N,3)}function Ue(R,y,T){const x=new m.Vector3;if(T===0)x.copy(y);else for(let w=0,N=R.length;w<N;w++)R[w].angleTo(y)<T&&x.add(R[w]);return x.normalize()}function M(R){const y=[];for(let T=0,x=R.length;T<x;T+=3)y.push(new m.Color(R[T],R[T+1],R[T+2]));return y}function Y(R){const y=new m.Color;for(let T=0;T<R.count;T++)y.fromBufferAttribute(R,T),m.ColorManagement.colorSpaceToWorking(y,m.SRGBColorSpace),R.setXYZ(T,y.r,y.g,y.b)}function K(R,y,T,x,w){const N=[],F=w===!0?0:Math.PI;for(let ke=0,Pe=x.length;ke<Pe;ke++){let _e=ke===0?0:T[ke-1];_e=w===!0?_e:F-_e;const ye=new m.Vector3;ye.setFromSphericalCoords(y,_e,0),N.push(ye)}const G=R.index,z=R.attributes.position,ee=new m.BufferAttribute(new Float32Array(R.attributes.position.count*3),3),se=new m.Vector3,me=new m.Color;for(let ke=0;ke<G.count;ke++){const Pe=G.getX(ke);se.fromBufferAttribute(z,Pe);let _e,ye,Te=1;for(let Qe=1;Qe<N.length;Qe++){_e=Qe-1,ye=Qe;const Oe=N[_e],De=N[ye];if(w===!0){if(se.y<=Oe.y&&se.y>De.y){Te=Math.abs(Oe.y-se.y)/Math.abs(Oe.y-De.y);break}}else if(se.y>=Oe.y&&se.y<De.y){Te=Math.abs(Oe.y-se.y)/Math.abs(Oe.y-De.y);break}}const Le=x[_e],Fe=x[ye];me.copy(Le).lerp(Fe,Te),m.ColorManagement.colorSpaceToWorking(me,m.SRGBColorSpace),ee.setXYZ(Pe,me.r,me.g,me.b)}R.setAttribute("color",ee)}const ie=new m.TextureLoader(this.manager);if(ie.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),e.indexOf("#VRML V2.0")===-1)throw Error("THREE.VRMLLexer: Version of VRML asset not supported.");const ge=n(e);return c(ge)}}class Zo{constructor(e){this.lexer=new pt.Lexer(e)}lex(e){const t=this.lexer.tokenize(e);if(t.errors.length>0)throw console.error(t.errors),Error("THREE.VRMLLexer: Lexing errors detected.");return t}}const $o=pt.CstParser;class es extends $o{constructor(e){super(e);const t=this,i=e.Version,n=e.LCurly,s=e.RCurly,o=e.LSquare,c=e.RSquare,A=e.Identifier,a=e.RouteIdentifier,f=e.StringLiteral,u=e.HexLiteral,b=e.NumberLiteral,d=e.TrueLiteral,I=e.FalseLiteral,g=e.NullLiteral,l=e.DEF,h=e.USE,p=e.ROUTE,C=e.TO,E=e.NodeName;t.RULE("vrml",function(){t.SUBRULE(t.version),t.AT_LEAST_ONE(function(){t.SUBRULE(t.node)}),t.MANY(function(){t.SUBRULE(t.route)})}),t.RULE("version",function(){t.CONSUME(i)}),t.RULE("node",function(){t.OPTION(function(){t.SUBRULE(t.def)}),t.CONSUME(E),t.CONSUME(n),t.MANY(function(){t.SUBRULE(t.field)}),t.CONSUME(s)}),t.RULE("field",function(){t.CONSUME(A),t.OR2([{ALT:function(){t.SUBRULE(t.singleFieldValue)}},{ALT:function(){t.SUBRULE(t.multiFieldValue)}}])}),t.RULE("def",function(){t.CONSUME(l),t.OR([{ALT:function(){t.CONSUME(A)}},{ALT:function(){t.CONSUME(E)}}])}),t.RULE("use",function(){t.CONSUME(h),t.OR([{ALT:function(){t.CONSUME(A)}},{ALT:function(){t.CONSUME(E)}}])}),t.RULE("singleFieldValue",function(){t.AT_LEAST_ONE(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(f)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(b)}},{ALT:function(){t.CONSUME(d)}},{ALT:function(){t.CONSUME(I)}},{ALT:function(){t.CONSUME(g)}}])})}),t.RULE("multiFieldValue",function(){t.CONSUME(o),t.MANY(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(f)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(b)}},{ALT:function(){t.CONSUME(g)}}])}),t.CONSUME(c)}),t.RULE("route",function(){t.CONSUME(p),t.CONSUME(a),t.CONSUME(C),t.CONSUME2(a)}),this.performSelfAnalysis()}}class ts{constructor(e,t,i){this.a=e,this.b=t,this.c=i,this.normal=new m.Vector3}}const Ze={INTENSITY:1,INTENSITY_ALPHA:2,RGB:3,RGBA:4};class ns extends m.Loader{constructor(e){super(e),this.animateBonePositions=!0,this.animateBoneRotations=!0,this.animateBoneScales=!0}load(e,t,i,n){const s=this,o=new m.FileLoader(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(c){try{t(s.parse(c))}catch(A){n?n(A):console.error(A),s.manager.itemError(e)}},i,n)}parse(e){function t(d){c(d)!=="HIERARCHY"&&console.error("THREE.BVHLoader2: HIERARCHY expected.");const I=[],g=n(d,c(d),I);c(d)!=="MOTION"&&console.error("THREE.BVHLoader2: MOTION expected.");let l=c(d).split(/[\s]+/);const h=parseInt(l[1]);isNaN(h)&&console.error("THREE.BVHLoader2: Failed to read number of frames."),l=c(d).split(/[\s]+/);const p=parseFloat(l[2]);isNaN(p)&&console.error("THREE.BVHLoader2: Failed to read frame time.");for(let C=0;C<h;C++)l=c(d).split(/[\s]+/),i(l,C*p,g);return I}function i(d,I,g){if(g.type==="ENDSITE")return;const l={time:I,position:new m.Vector3,rotation:new m.Quaternion,scale:new m.Vector3(1,1,1)};g.frames.push(l);const h=new m.Quaternion,p=new m.Vector3(1,0,0),C=new m.Vector3(0,1,0),E=new m.Vector3(0,0,1);for(let B=0;B<g.channels.length;B++)switch(g.channels[B]){case"Xposition":l.position.x=parseFloat(d.shift().trim());break;case"Yposition":l.position.y=parseFloat(d.shift().trim());break;case"Zposition":l.position.z=parseFloat(d.shift().trim());break;case"Xrotation":h.setFromAxisAngle(p,parseFloat(d.shift().trim())*Math.PI/180),l.rotation.multiply(h);break;case"Yrotation":h.setFromAxisAngle(C,parseFloat(d.shift().trim())*Math.PI/180),l.rotation.multiply(h);break;case"Zrotation":h.setFromAxisAngle(E,parseFloat(d.shift().trim())*Math.PI/180),l.rotation.multiply(h);break;case"Xscale":l.scale.x=parseFloat(d.shift().trim());break;case"Yscale":l.scale.y=parseFloat(d.shift().trim());break;case"Zscale":l.scale.z=parseFloat(d.shift().trim());break;default:console.warn("THREE.BVHLoader2: Invalid channel type.")}for(let B=0;B<g.children.length;B++)i(d,I,g.children[B])}function n(d,I,g){const l={name:"",type:"",frames:[]};g.push(l);let h=I.split(/[\s]+/);h[0].toUpperCase()==="END"&&h[1].toUpperCase()==="SITE"?(l.type="ENDSITE",l.name="ENDSITE"):(l.name=h[1],l.type=h[0].toUpperCase()),c(d)!=="{"&&console.error("THREE.BVHLoader2: Expected opening { after type & name"),h=c(d).split(/[\s]+/),h[0]!=="OFFSET"&&console.error("THREE.BVHLoader2: Expected OFFSET but got: "+h[0]),h.length!==4&&console.error("THREE.BVHLoader2: Invalid number of values for OFFSET.");const p=new m.Vector3(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));if((isNaN(p.x)||isNaN(p.y)||isNaN(p.z))&&console.error("THREE.BVHLoader2: Invalid values of OFFSET."),l.offset=p,l.type!=="ENDSITE"){h=c(d).split(/[\s]+/),h[0]!=="CHANNELS"&&console.error("THREE.BVHLoader2: Expected CHANNELS definition.");const C=parseInt(h[1]);l.channels=h.splice(2,C),l.children=[]}for(;;){const C=c(d);if(C==="}")return l;l.children.push(n(d,C,g))}}function s(d,I){const g=new m.Bone;if(I.push(g),g.position.add(d.offset),g.name=d.name,d.type!=="ENDSITE")for(let l=0;l<d.children.length;l++)g.add(s(d.children[l],I));return g}function o(d){const I=[];for(let g=0;g<d.length;g++){const l=d[g];if(l.type==="ENDSITE")continue;const h=[],p=[],C=[],E=[];for(let B=0;B<l.frames.length;B++){const Q=l.frames[B];h.push(Q.time),p.push(Q.position.x+l.offset.x),p.push(Q.position.y+l.offset.y),p.push(Q.position.z+l.offset.z),C.push(Q.rotation.x),C.push(Q.rotation.y),C.push(Q.rotation.z),C.push(Q.rotation.w),E.push(Q.scale.x),E.push(Q.scale.y),E.push(Q.scale.z)}A.animateBonePositions&&I.push(new m.VectorKeyframeTrack(l.name+".position",h,p)),A.animateBoneRotations&&I.push(new m.QuaternionKeyframeTrack(l.name+".quaternion",h,C)),A.animateBoneScales&&I.push(new m.VectorKeyframeTrack(l.name+".scale",h,E))}return new m.AnimationClip("animation",-1,I)}function c(d){let I;for(;(I=d.shift().trim()).length===0;);return I}const A=this,a=e.split(/[\r\n]+/g),f=t(a),u=[];s(f[0],u);const b=o(f);return{skeleton:new m.Skeleton(u),clip:b}}}let yt;async function is(r,e){return yt||(yt=new Xo),yt.manager.setURLModifier(i=>(i.startsWith("./")&&(i=i.substring(2)),URL.createObjectURL(pr(r,i)))),await yt.loadAsync(e)}let qt;async function rs(r,e){qt||(qt=new ns);const t=nn(r,e);return await qt.parse(t)}function os(r){const e=r.clip.clone(),t=r.skeleton.bones[0].clone(!0),i=[];t.traverse(s=>{s instanceof ae.Bone&&i.push(s)});const n=new ae.Skeleton(i);return n.calculateInverses(),{clip:e,skeleton:n}}class Sn{isDummy=!0;skeleton=new ae.Skeleton([new ae.Bone]);clip=new ae.AnimationClip("dummy")}const Kt={},zt={};class en extends xe{ready;actions;comment=null;constructor(e){super(),this.actions={},this.ready=this.asyncInit(e)}initObject(){return new ae.Object3D}async asyncInit(e){const t=await Mn(e),i=new DOMParser,n=nn(t,"CATALOG.XML"),s=i.parseFromString(n,"application/xml");if(s.querySelector("parsererror"))return console.error("Acerola3D.asyncInit(): CATALOG.XML parse error."),this;const o="http://acerola3d.sourceforge.jp/a3/catalog",c=s.getElementsByTagNameNS(o,"c");c[0]&&(this.comment=c[0].textContent);const A=s.getElementsByTagNameNS(o,"a"),a={},f={};let u;for(const b of Array.from(A)){const d=b.getAttribute("an");if(d){u||(u=d);let I;const g=b.getAttribute("bvh");if(g){const U=t.zipUrl+"!"+g;Kt[U]||(Kt[U]=await rs(t,g)),I=os(Kt[U]),I&&I.clip.tracks.forEach(v=>{v.setInterpolation(ae.InterpolateDiscrete)})}else I=new Sn;const l={};I.skeleton.bones.forEach(U=>{l[U.name]=U});const h=b.getAttribute("scale"),p=h?Number(h):1,C=b.getAttribute("offset"),E=new ce;if(C){const U=C.split(" ");E.set(Number(U[0]),Number(U[1]),Number(U[2]))}const B={},Q=b.getElementsByTagNameNS(o,"p");for(const U of Array.from(Q)){const v=U.getAttribute("name"),O=U.getAttribute("wrl");if(v&&O){const L=t.zipUrl+"!"+O;zt[L]||(zt[L]=await is(t,O)),B[v]=zt[L].clone(!0)}}const S=new ae.Object3D;S.add(I.skeleton.bones[0]),I instanceof Sn?Object.values(B).forEach(U=>{S.add(U)}):Hi(S,B),S.position.add(E),S.scale.set(p,p,p),S.traverse(U=>{U.userData.a3js={objectA3:this}}),a[d]={name:d,root:S,bones:l,skeleton:I.skeleton,bvh:I,scale:p,offset:E,parts:B},f[d]=new on(I.clip,d)}}return this.actions=a,this.setPoseMotions(f),u&&this.setState(u),this}addAction(e){this.actions[e.name]=e}removeAction(e){const t=this.actions[e];return delete this.actions[e],t}addActionRoot(e){const t=this.actions[e];t&&(this.object.add(t.root),this.bones=t.bones,this.skeletons=[t.skeleton])}removeActionRoot(e){const t=this.actions[e];t&&(this.object.remove(t.root),this.bones={},this.skeletons=[])}setState(e){const t=this.poseMotions[e],i=this.actions[e];if(t&&i){const n=this.currentPoseMotion?.name;n&&this.removeActionRoot(n),this.addActionRoot(e),super.setState(e)}}setEmote(e){const t=this.poseMotions[e],i=this.actions[e];if(t&&i){const n=this.currentPoseMotion?.name;n&&this.removeActionRoot(n),this.addActionRoot(e),super.setEmote(e)}}}function Hi(r,e){if(rr(r)){const t=e[r.name];t&&r.add(t)}r.children&&r.children.forEach(t=>{Hi(t,e)})}class ss extends xe{constructor(e){super(e)}initObject(e){return e}}class as extends xe{constructor(...e){super(e)}initObject(e){const t=e.filter(A=>typeof A=="number"),i=e.filter(A=>typeof A=="string"),n=new ae.BoxGeometry(...t),s=i.length>0?i[0]:"rgb(128,128,128)",o=new ae.MeshStandardMaterial({color:s});return new ae.Mesh(n,o)}}class As extends xe{constructor(...e){super(e)}initObject(e){const t=e.filter(A=>typeof A=="number"),i=e.filter(A=>typeof A=="string"),n=new ae.SphereGeometry(...t),s=i.length>0?i[0]:"rgb(128,128,128)",o=new ae.MeshStandardMaterial({color:s});return new ae.Mesh(n,o)}}class cs extends xe{constructor(){super()}initObject(){const e=new ae.Object3D,t=new ae.DirectionalLight(16777215);t.position.set(1,1,1),e.add(t);const i=new ae.AmbientLight(4210752);return e.add(i),e}}class ls extends xe{constructor(e){super(e)}initObject(e){const t=new ae.PlaneGeometry(1,1),i=new ae.TextureLoader().load(e),n=new ae.MeshBasicMaterial({map:i});return new ae.Mesh(t,n)}}class us extends xe{constructor(e){super(e)}initObject(e){return new Un(e)}}const hs={touchDevice:navigator.maxTouchPoints>0};class ji extends HTMLElement{option;canvas;scene;camera;controller;_maxDistance;_leftActive;_leftCenter;leftJoystick;_rightActive;_rightCenter;rightJoystick;leftButton;rightButton;keys;constructor(e={}){super(),this.option={...hs,...e},this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=`
|
|
221
|
+
<style>
|
|
222
|
+
:host {
|
|
223
|
+
.game-ui {
|
|
224
|
+
position: relative;
|
|
225
|
+
}
|
|
226
|
+
.joystick {
|
|
227
|
+
position: absolute;
|
|
228
|
+
width: 120px;
|
|
229
|
+
height: 120px;
|
|
230
|
+
border-radius: 50%;
|
|
231
|
+
background: rgba(255,255,255,0.08);
|
|
232
|
+
border: 2px solid rgba(255,255,255,0.2);
|
|
233
|
+
backdrop-filter: blur(4px);
|
|
234
|
+
}
|
|
235
|
+
.stick {
|
|
236
|
+
position: absolute;
|
|
237
|
+
width: 60px;
|
|
238
|
+
height: 60px;
|
|
239
|
+
border-radius: 50%;
|
|
240
|
+
background: rgba(255,255,255,0.4);
|
|
241
|
+
top: 50%;
|
|
242
|
+
left: 50%;
|
|
243
|
+
transform: translate(-50%, -50%);
|
|
244
|
+
}
|
|
245
|
+
.joystick.left {
|
|
246
|
+
bottom: 40px;
|
|
247
|
+
left: 30px;
|
|
248
|
+
}
|
|
249
|
+
.joystick.right {
|
|
250
|
+
bottom: 40px;
|
|
251
|
+
right: 30px;
|
|
252
|
+
}
|
|
253
|
+
.btn {
|
|
254
|
+
position: absolute;
|
|
255
|
+
border-radius: 50%;
|
|
256
|
+
border: none;
|
|
257
|
+
color: white;
|
|
258
|
+
font-size: 14px;
|
|
259
|
+
background: rgba(255,255,255,0.15);
|
|
260
|
+
border: 2px solid rgba(255,255,255,0.3);
|
|
261
|
+
backdrop-filter: blur(4px);
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
}
|
|
264
|
+
.btn.left {
|
|
265
|
+
width: 90px;
|
|
266
|
+
height: 90px;
|
|
267
|
+
bottom: 50px;
|
|
268
|
+
left: 200px;
|
|
269
|
+
}
|
|
270
|
+
.btn.right {
|
|
271
|
+
width: 90px;
|
|
272
|
+
height: 90px;
|
|
273
|
+
bottom: 50px;
|
|
274
|
+
right: 200px;
|
|
275
|
+
}
|
|
276
|
+
.btn:active {
|
|
277
|
+
transform: scale(0.9);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
</style>
|
|
281
|
+
<div class="game-ui">
|
|
282
|
+
<slot></slot>
|
|
283
|
+
<div class="joystick left"><div class="stick"></div></div>
|
|
284
|
+
<div class="joystick right"><div class="stick"></div></div>
|
|
285
|
+
<button class="btn left">L</button>
|
|
286
|
+
<button class="btn right">R</button>
|
|
287
|
+
</div>
|
|
288
|
+
`,this.canvas=new an,this.append(this.canvas),this.scene=this.canvas.scene,this.camera=this.canvas.camera,this.controller=this.canvas.controller,this._maxDistance=40,this._leftActive=!1,this._leftCenter={x:0,y:0},this.leftJoystick={x:0,y:0},this._rightActive=!1,this._rightCenter={x:0,y:0},this.rightJoystick={x:0,y:0},this.leftButton=!1,this.rightButton=!1,this.keys=new Set;const t=this.shadowRoot.querySelector(".joystick.left .stick");if(!t)return;t.addEventListener("pointerdown",o=>{this._leftActive=!0;const c=t.getBoundingClientRect();this._leftCenter.x=c.left+c.width/2,this._leftCenter.y=c.top+c.height/2,t.setPointerCapture(o.pointerId)}),t.addEventListener("pointermove",o=>{if(!this._leftActive)return;const c=o.clientX-this._leftCenter.x,A=o.clientY-this._leftCenter.y,a=Math.sqrt(c*c+A*A);let f=c,u=A;if(a>40){const b=Math.atan2(A,c);f=Math.cos(b)*this._maxDistance,u=Math.sin(b)*this._maxDistance}t.style.transform=`translate(calc(-50% + ${f}px), calc(-50% + ${u}px))`,this.leftJoystick.x=f/this._maxDistance,this.leftJoystick.y=-(u/this._maxDistance)}),t.addEventListener("pointerup",()=>{this._leftActive=!1,t.style.transform="translate(-50%, -50%)",this.leftJoystick.x=0,this.leftJoystick.y=0});const i=this.shadowRoot.querySelector(".joystick.right .stick");if(!i)return;i.addEventListener("pointerdown",o=>{this._rightActive=!0;const c=i.getBoundingClientRect();this._rightCenter.x=c.left+c.width/2,this._rightCenter.y=c.top+c.height/2,i.setPointerCapture(o.pointerId)}),i.addEventListener("pointermove",o=>{if(!this._rightActive)return;const c=o.clientX-this._rightCenter.x,A=o.clientY-this._rightCenter.y,a=Math.sqrt(c*c+A*A);let f=c,u=A;if(a>40){const b=Math.atan2(A,c);f=Math.cos(b)*this._maxDistance,u=Math.sin(b)*this._maxDistance}i.style.transform=`translate(calc(-50% + ${f}px), calc(-50% + ${u}px))`,this.rightJoystick.x=f/this._maxDistance,this.rightJoystick.y=-(u/this._maxDistance)}),i.addEventListener("pointerup",()=>{this._rightActive=!1,i.style.transform="translate(-50%, -50%)",this.rightJoystick.x=0,this.rightJoystick.y=0});const n=this.shadowRoot.querySelector(".btn.left");if(!n)return;n.addEventListener("pointerdown",()=>{this.leftButton=!0}),n.addEventListener("pointerup",()=>{this.leftButton=!1});const s=this.shadowRoot.querySelector(".btn.right");s&&(s.addEventListener("pointerdown",()=>{this.rightButton=!0}),s.addEventListener("pointerup",()=>{this.rightButton=!1}),window.addEventListener("keydown",o=>{this.keys.add(o.code),this.updateUIFromKeyInfo()}),window.addEventListener("keyup",o=>{this.keys.delete(o.code),this.updateUIFromKeyInfo()}),this.option.touchDevice||(this.shadowRoot.querySelectorAll(".joystick").forEach(o=>{o.style.display="none"}),this.shadowRoot.querySelectorAll(".btn").forEach(o=>{o.style.display="none"})))}updateUIFromKeyInfo(){const e={x:0,y:0},t={x:0,y:0};this.keys.has("KeyW")&&(e.y+=1),this.keys.has("KeyA")&&(e.x-=1),this.keys.has("KeyS")&&(e.y-=1),this.keys.has("KeyD")&&(e.x+=1),this.keys.has("ArrowUp")&&(t.y+=1),this.keys.has("ArrowLeft")&&(t.x-=1),this.keys.has("ArrowDown")&&(t.y-=1),this.keys.has("ArrowRight")&&(t.x+=1);const i=Math.sqrt(e.x*e.x+e.y*e.y);i>0&&(e.x/=i,e.y/=i),this.leftJoystick=e;const n=Math.sqrt(t.x*t.x+t.y*t.y);n>0&&(t.x/=n,t.y/=n),this.rightJoystick=t,this.keys.has("Space")?this.leftButton=!0:this.leftButton=!1,this.keys.has("Enter")?this.rightButton=!0:this.rightButton=!1}replaceScene(e){return this.canvas.replaceScene(e)}setController(e){this.canvas.setController(e)}worldToScreen(e){return this.canvas.worldToScreen(e)}screenToWorld(e,t,i){return this.canvas.screenToWorld(e,t,i)}cameraToScreen(e){return this.canvas.cameraToScreen(e)}screenToCamera(e,t,i){return this.canvas.screenToCamera(e,t,i)}waitForRender(){return this.canvas.waitForRender()}}customElements.define("game-canvas-a3",ji);const fs={mass:1e3,defaultLocation:{x:0,y:1,z:0},defaultQuat:{x:0,y:0,z:0,w:1},chassisWidth:2,chassisHeight:1,chassisLength:4,wheelFLPosition:{x:1,y:0,z:1.5},wheelFRPosition:{x:-1,y:0,z:1.5},wheelRLPosition:{x:1,y:0,z:-1.5},wheelRRPosition:{x:-1,y:0,z:-1.5},wheelFLRadius:.3,wheelFRRadius:.3,wheelRLRadius:.3,wheelRRRadius:.3,wheelFLWidth:.4,wheelFRWidth:.4,wheelRLWidth:.4,wheelRRWidth:.4,wheelFLSuspensionRestLength:.8,wheelFRSuspensionRestLength:.8,wheelRLSuspensionRestLength:.8,wheelRRSuspensionRestLength:.8,wheelFLDirection:{x:0,y:-1,z:0},wheelFRDirection:{x:0,y:-1,z:0},wheelRLDirection:{x:0,y:-1,z:0},wheelRRDirection:{x:0,y:-1,z:0},wheelFLAxle:{x:-1,y:0,z:0},wheelFRAxle:{x:-1,y:0,z:0},wheelRLAxle:{x:-1,y:0,z:0},wheelRRAxle:{x:-1,y:0,z:0},wheelFLSuspensionStiffness:24,wheelFRSuspensionStiffness:24,wheelRLSuspensionStiffness:24,wheelRRSuspensionStiffness:24,wheelFLWheelFrictionSlip:1e3,wheelFRWheelFrictionSlip:1e3,wheelRLWheelFrictionSlip:1e3,wheelRRWheelFrictionSlip:1e3};class ds{opt;trans;pose;constructor(e){this.opt={...fs,...e},this.trans=new ps(this),this.pose=new gs(this)}handle(e){this.trans.controller&&(this.trans.controller.setWheelSteering(0,e),this.trans.controller.setWheelSteering(1,e))}accelerator(e){this.trans.controller&&(this.trans.controller.setWheelEngineForce(0,e),this.trans.controller.setWheelEngineForce(1,e),this.trans.controller.setWheelEngineForce(2,e),this.trans.controller.setWheelEngineForce(3,e))}brake(e){this.trans.controller&&(this.trans.controller.setWheelBrake(0,e),this.trans.controller.setWheelBrake(1,e),this.trans.controller.setWheelBrake(2,e),this.trans.controller.setWheelBrake(3,e))}reset(){this.trans.chassisBody&&(this.trans.chassisBody.setTranslation(this.opt.defaultLocation,!0),this.trans.chassisBody.setRotation(this.opt.defaultQuat,!0),this.trans.chassisBody.setLinvel({x:0,y:0,z:0},!0),this.trans.chassisBody.setAngvel({x:0,y:0,z:0},!0))}}class ps{cm;trans;objectA3;controller;chassisBodyDesc;chassisBody;chassisColliderDesc;chassisCollider;constructor(e){this.cm=e,this.trans=new He}init(e,t){this.trans.set(e),this.objectA3=t,this.chassisBodyDesc=new Ge.RigidBodyDesc(Ge.RigidBodyType.Dynamic),this.chassisColliderDesc=Ge.ColliderDesc.cuboid(this.cm.opt.chassisWidth/2,this.cm.opt.chassisHeight/2,this.cm.opt.chassisLength/2),this.chassisColliderDesc.setMass(this.cm.opt.mass)}addOneselfToPhysics(e){this.chassisBodyDesc&&(this.chassisBody=e.world.createRigidBody(this.chassisBodyDesc),this.chassisBody.setTranslation(this.cm.opt.defaultLocation,!0),this.chassisBody.setRotation(this.cm.opt.defaultQuat,!0)),this.chassisColliderDesc&&(this.chassisCollider=e.world.createCollider(this.chassisColliderDesc,this.chassisBody)),this.chassisCollider&&this.objectA3&&tt.set(this.chassisCollider.handle,this.objectA3),this.chassisBody&&(this.controller=e.world.createVehicleController(this.chassisBody)),this.controller&&(this.controller.addWheel(this.cm.opt.wheelFLPosition,this.cm.opt.wheelFLDirection,this.cm.opt.wheelFLAxle,this.cm.opt.wheelFLSuspensionRestLength,this.cm.opt.wheelFLRadius),this.controller.setWheelSuspensionStiffness(0,this.cm.opt.wheelFLSuspensionStiffness),this.controller.setWheelFrictionSlip(0,this.cm.opt.wheelFLWheelFrictionSlip),this.controller.addWheel(this.cm.opt.wheelFRPosition,this.cm.opt.wheelFRDirection,this.cm.opt.wheelFRAxle,this.cm.opt.wheelFRSuspensionRestLength,this.cm.opt.wheelFRRadius),this.controller.setWheelSuspensionStiffness(1,this.cm.opt.wheelFRSuspensionStiffness),this.controller.setWheelFrictionSlip(1,this.cm.opt.wheelFRWheelFrictionSlip),this.controller.addWheel(this.cm.opt.wheelRLPosition,this.cm.opt.wheelRLDirection,this.cm.opt.wheelRLAxle,this.cm.opt.wheelRLSuspensionRestLength,this.cm.opt.wheelRLRadius),this.controller.setWheelSuspensionStiffness(2,this.cm.opt.wheelRLSuspensionStiffness),this.controller.setWheelFrictionSlip(2,this.cm.opt.wheelRLWheelFrictionSlip),this.controller.addWheel(this.cm.opt.wheelRRPosition,this.cm.opt.wheelRRDirection,this.cm.opt.wheelRRAxle,this.cm.opt.wheelRRSuspensionRestLength,this.cm.opt.wheelRRRadius),this.controller.setWheelSuspensionStiffness(3,this.cm.opt.wheelRRSuspensionStiffness),this.controller.setWheelFrictionSlip(3,this.cm.opt.wheelRRWheelFrictionSlip))}removeOneselfFromPhysics(e){this.chassisBody&&e.world.removeRigidBody(this.chassisBody),this.chassisCollider&&(e.world.removeCollider(this.chassisCollider,!1),tt.delete(this.chassisCollider.handle))}setLocation(e){}setLocationNow(e){}setQuat(e){}setQuatNow(e){}setScale(e){}setScaleNow(e){}setLinvel(e){}setAngvel(e){}resetForce(){}addForce(e){}addForceAtPoint(e,t){}resetTorque(){}addTorque(e){}applyImpulse(e){}applyImpulseAtPoint(e,t){}applyTorqueImpulse(e){}isGrounded(){if(!this.controller)return!0;let e=!1;return e||=this.controller.wheelIsInContact(0),e||=this.controller.wheelIsInContact(1),e||=this.controller.wheelIsInContact(2),e||=this.controller.wheelIsInContact(3),e}update(e){this.controller?.updateVehicle(e),this.chassisBody&&this.trans.loc.set(this.chassisBody.translation()),this.chassisBody&&this.trans.quat.set(this.chassisBody.rotation())}}class gs{cm;name;playCount;time;constructor(e){this.cm=e,this.name="default",this.playCount=0,this.time=0}prepare3D(e){e instanceof en&&e.addActionRoot("default")}cleanup3D(e){e instanceof en&&e.removeActionRoot("default")}addOneselfToPhysics(e){}removeOneselfFromPhysics(e){}setPause(e){}setTime(e){}update(e){if(!this.cm.trans.chassisBody)return{};if(!this.cm.trans.controller)return{};const t=new ce(this.cm.trans.chassisBody.translation()),n=new Ce(this.cm.trans.chassisBody.rotation()).clone().conjugate(),s=new ce(this.cm.trans.chassisBody.translation());s.sub(t);const o=new Ce(this.cm.trans.chassisBody.rotation());o.mul(n);const c=new Ce,A=new ce,a=new Ce;{const l=new ce(this.cm.opt.wheelFLAxle),h=new ce(this.cm.opt.wheelFLPosition),p=this.cm.trans.controller.wheelSuspensionLength(0)||0,C=this.cm.trans.controller.wheelSteering(0)||0,E=this.cm.trans.controller.wheelRotation(0)||0;A.set(h),A.sub(0,p,0),a.set(0,Math.sin(C/2),0,Math.cos(C/2)),c.set(l.x*Math.sin(E/2),l.y*Math.sin(E/2),l.z*Math.sin(E/2),Math.cos(E/2)),a.mul(c)}const f=new ce,u=new Ce;{const l=new ce(this.cm.opt.wheelFRAxle),h=new ce(this.cm.opt.wheelFRPosition),p=this.cm.trans.controller.wheelSuspensionLength(1)||0,C=this.cm.trans.controller.wheelSteering(1)||0,E=this.cm.trans.controller.wheelRotation(1)||0;f.set(h),f.sub(0,p,0),u.set(0,Math.sin(C/2),0,Math.cos(C/2)),c.set(l.x*Math.sin(E/2),l.y*Math.sin(E/2),l.z*Math.sin(E/2),Math.cos(E/2)),u.mul(c)}const b=new ce,d=new Ce;{const l=new ce(this.cm.opt.wheelRLAxle),h=new ce(this.cm.opt.wheelRLPosition),p=this.cm.trans.controller.wheelSuspensionLength(2)||0,C=this.cm.trans.controller.wheelSteering(2)||0,E=this.cm.trans.controller.wheelRotation(2)||0;b.set(h),b.sub(0,p,0),d.set(0,Math.sin(C/2),0,Math.cos(C/2)),c.set(l.x*Math.sin(E/2),l.y*Math.sin(E/2),l.z*Math.sin(E/2),Math.cos(E/2)),d.mul(c)}const I=new ce,g=new Ce;{const l=new ce(this.cm.opt.wheelRRAxle),h=new ce(this.cm.opt.wheelRRPosition),p=this.cm.trans.controller.wheelSuspensionLength(3)||0,C=this.cm.trans.controller.wheelSteering(3)||0,E=this.cm.trans.controller.wheelRotation(3)||0;I.set(h),I.sub(0,p,0),g.set(0,Math.sin(C/2),0,Math.cos(C/2)),c.set(l.x*Math.sin(E/2),l.y*Math.sin(E/2),l.z*Math.sin(E/2),Math.cos(E/2)),g.mul(c)}return{chassis:{loc:s,quat:o},frontRight:{loc:f,quat:u},frontLeft:{loc:A,quat:a},rearRight:{loc:I,quat:g},rearLeft:{loc:b,quat:d}}}}exports.Acerola3D=en;exports.AvatarController=br;exports.Box=as;exports.Camera=On;exports.Canvas=an;exports.CarMotion=ds;exports.CharactorTransformMotion=Fn;exports.ClipPoseMotion=on;exports.ControllerBase=vt;exports.DefaultTransformMotion=Et;exports.FixedTransformMotion=lr;exports.FollowAvatarController=mr;exports.GLTF=Bo;exports.GameCanvas=ji;exports.GeneralCamera=It;exports.HTML=us;exports.Image=ls;exports.ObjectA3=xe;exports.OrbitController=Pn;exports.Quat=Ce;exports.RapierPhysicsEngine=gt;exports.Scene=Nn;exports.Sound=ot;exports.Sphere=As;exports.StandardLights=cs;exports.Test=wo;exports.Text3D=Lo;exports.ThreeJS=ss;exports.Transform=He;exports.Vec3=ce;exports.Window=Li;exports.asyncSleep=dr;exports.collisionMap=tt;exports.deepMerge=wt;exports.getQuatOfLookAt=st;exports.initFont=_o;exports.initPhysics=cr;exports.initSound=yr;exports.vec3EulerToQuat=At;
|
|
221
289
|
//# sourceMappingURL=a3js.cjs.js.map
|