1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[96007],{96007:(e,t,r)=>{r.d(t,{STLLoader:()=>o});var n=r(85339);class o extends n.aHM{constructor(e){super(e)}load(e,t,r,o){let a=this,l=new n.Y9S(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(r){try{t(a.parse(r))}catch(t){o?o(t):console.error(t),a.manager.itemError(e)}},r,o)}parse(e){let t=function(e){if("string"!=typeof e)return e;{let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=255&e.charCodeAt(r);return t.buffer||t}}(e);return!function(e){let t=new DataView(e);if(84+50*t.getUint32(80,!0)===t.byteLength)return!0;let r=[115,111,108,105,100];for(let e=0;e<5;e++)if(function(e,t,r){for(let n=0,o=e.length;n<o;n++)if(e[n]!==t.getUint8(r+n))return!1;return!0}(r,t,e))return!1;return!0}(t)?function(e){let t,r=new n.LoY,o=/solid([\s\S]*?)endsolid/g,a=/facet([\s\S]*?)endfacet/g,l=/solid\s(.+)/,s=0,i=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,u=RegExp("vertex"+i+i+i,"g"),f=RegExp("normal"+i+i+i,"g"),g=[],c=[],h=[],p=new n.Pq0,d=0,w=0,F=0;for(;null!==(t=o.exec(e));){w=F;let e=t[0],n=null!==(t=l.exec(e))?t[1]:"";for(h.push(n);null!==(t=a.exec(e));){let e=0,r=0,n=t[0];for(;null!==(t=f.exec(n));)p.x=parseFloat(t[1]),p.y=parseFloat(t[2]),p.z=parseFloat(t[3]),r++;for(;null!==(t=u.exec(n));)g.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3])),c.push(p.x,p.y,p.z),e++,F++;1!==r&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+s),3!==e&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+s),s++}let o=w,i=F-w;r.userData.groupNames=h,r.addGroup(o,i,d),d++}return r.setAttribute("position",new n.qtW(g,3)),r.setAttribute("normal",new n.qtW(c,3)),r}("string"!=typeof e?new TextDecoder().decode(e):e):function(e){let t,r,o,a,l=new DataView(e),s=l.getUint32(80,!0),i,u,f,g=!1,c;for(let e=0;e<70;e++)0x434f4c4f==l.getUint32(e,!1)&&82==l.getUint8(e+4)&&61==l.getUint8(e+5)&&(g=!0,c=new Float32Array(3*s*3),t=l.getUint8(e+6)/255,r=l.getUint8(e+7)/255,o=l.getUint8(e+8)/255,a=l.getUint8(e+9)/255);let h=new n.LoY,p=new Float32Array(3*s*3),d=new Float32Array(3*s*3),w=new n.Q1f;for(let e=0;e<s;e++){let a=84+50*e,s=l.getFloat32(a,!0),h=l.getFloat32(a+4,!0),F=l.getFloat32(a+8,!0);if(g){let e=l.getUint16(a+48,!0);(32768&e)==0?(i=(31&e)/31,u=(e>>5&31)/31,f=(e>>10&31)/31):(i=t,u=r,f=o)}for(let t=1;t<=3;t++){let r=a+12*t,o=3*e*3+(t-1)*3;p[o]=l.getFloat32(r,!0),p[o+1]=l.getFloat32(r+4,!0),p[o+2]=l.getFloat32(r+8,!0),d[o]=s,d[o+1]=h,d[o+2]=F,g&&(w.setRGB(i,u,f,n.er$),c[o]=w.r,c[o+1]=w.g,c[o+2]=w.b)}}return h.setAttribute("position",new n.THS(p,3)),h.setAttribute("normal",new n.THS(d,3)),g&&(h.setAttribute("color",new n.THS(c,3)),h.hasColors=!0,h.alpha=a),h}(t)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.