1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,261386,e=>{"use strict";var t=e.i(906334),a=e.i(320778),n=e.i(984622),i=e.i(747990),r=e.i(229677);e.i(276436);var s=e.i(974557),o=e.i(22766),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(function(e,l){var c=(0,s.createSlot)("Primitive.".concat(l)),u=r.forwardRef(function(e,t){var r=e.asChild,s=(0,i._)(e,["asChild"]),u=r?c:l;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(u,(0,n._)((0,a._)({},s),{ref:t}))});return u.displayName="Primitive.".concat(l),(0,n._)((0,a._)({},e),(0,t._)({},l,u))},{});e.s(["Primitive",0,l])},227427,e=>{"use strict";var t=e.i(229677);e.s(["usePrevious",0,function(e){var a=t.useRef({value:e,previous:e});return t.useMemo(function(){return a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous},[e])}])},667961,e=>{"use strict";var t=e.i(762815),a=e.i(229677),n=e.i(440131);e.s(["useSize",0,function(e){var i=(0,t._)(a.useState(void 0),2),r=i[0],s=i[1];return(0,n.useLayoutEffect)(function(){if(e){s({width:e.offsetWidth,height:e.offsetHeight});var t=new ResizeObserver(function(t){if(Array.isArray(t)&&t.length){var a,n,i=t[0];if("borderBoxSize"in i){var r=i.borderBoxSize,o=Array.isArray(r)?r[0]:r;a=o.inlineSize,n=o.blockSize}else a=e.offsetWidth,n=e.offsetHeight;s({width:a,height:n})}});return t.observe(e,{box:"border-box"}),function(){return t.unobserve(e)}}s(void 0)},[e]),r}])},915116,e=>{"use strict";var t=e.i(320778),a=e.i(984622),n=e.i(229677),i=e.i(11106),r=e.i(22766),s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o=n.forwardRef(function(e,n){return(0,r.jsx)(i.Primitive.span,(0,a._)((0,t._)({},e),{ref:n,style:(0,t._)({},s,e.style)}))});o.displayName="VisuallyHidden",e.s(["Root",0,o,"VISUALLY_HIDDEN_STYLES",0,s])},595967,e=>{"use strict";var t=(0,e.i(433162).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},480728,e=>{"use strict";var t=(0,e.i(433162).default)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["default",0,t])},153922,e=>{"use strict";var t=(0,e.i(433162).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["default",0,t])},439103,e=>{"use strict";var t=(0,e.i(433162).default)("file-box",[["path",{d:"M14.5 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.8",key:"1kchwa"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11.7 14.2 7 17l-4.7-2.8",key:"1yk8tc"}],["path",{d:"M3 13.1a2 2 0 0 0-.999 1.76v3.24a2 2 0 0 0 .969 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01z",key:"19flxy"}],["path",{d:"M7 17v5",key:"1yj1jh"}]]);e.s(["default",0,t])},675881,e=>{"use strict";var t=(0,e.i(433162).default)("gem",[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);e.s(["default",0,t])},375085,e=>{"use strict";var t=(0,e.i(433162).default)("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);e.s(["default",0,t])},129933,e=>{"use strict";var t=(0,e.i(433162).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},88705,e=>{"use strict";var t=(0,e.i(433162).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594
11.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["default",0,t])},566250,e=>{"use strict";var t=(0,e.i(433162).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},961529,e=>{"use strict";var t=(0,e.i(433162).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["default",0,t])},73034,e=>{"use strict";var t=(0,e.i(433162).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["default",0,t])},399637,e=>{"use strict";var t=(0,e.i(433162).default)("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);e.s(["default",0,t])},277771,e=>{"use strict";var t=(0,e.i(433162).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["default",0,t])},578317,e=>{"use strict";var t=e.i(22766),a=e.i(273443),n=e.i(520133),i=/(<a\s+href='[^']*'>[^<]*<\/a>|\*\*[^*]+\*\*)/g,r=/^<a\s+href='([^']*)'>(.*?)<\/a>$/;e.s(["FAQAccordion",0,function(e){var s=e.faqs,o=e.heading,l=e.headingClassName;return(0,t.jsxs)("div",{className:"max-w-3xl mx-auto",children:[o&&(0,t.jsx)("h2",{id:"faq-heading",className:void 0===l?"text-[26px] md:text-[32px] font-bold text-foreground leading-tight tracking-tight text-center mb-7":l,children:o}),(0,t.jsx)(a.Accordion,{type:"single",collapsible:!0,className:"overflow-hidden rounded-lg bg-card",children:s.map(function(e,s){return(0,t.jsxs)(a.AccordionItem,{value:"faq-".concat(s),className:"border-b-0 border-t border-raised px-6 first:border-t-0",children:[(0,t.jsx)(a.AccordionTrigger,{className:"py-5 text-left text-[15.5px] font-semibold text-foreground hover:no-underline [&>svg]:h-4 [&>svg]:w-4 [&>svg]:text-[color:var(--text-t4)] [&>svg]:shrink-0",children:e.question}),(0,t.jsx)(a.AccordionContent,{className:"pb-6 pr-8 text-[13.5px] leading-[1.75] text-[color:var(--text-t2)] [text-wrap:pretty]",children:e.answer.split("\n\n").map(function(e,a){var s=e.split("\n");return(0,t.jsx)("p",{className:a>0?"mt-4":"",children:s.map(function(e,a){var s=e.split(i).map(function(e,a){if(e.startsWith("**")&&e.endsWith("**"))return(0,t.jsx)("strong",{className:"font-semibold text-foreground",children:e.slice(2,-2)},a);var i=e.match(r);return i?(0,t.jsx)(n.Link,{href:i[1],className:"text-primary underline underline-offset-2 hover:text-primary/80 transition-colors",children:i[2]},a):e});return(0,t.jsxs)("span",{children:[a>0&&(0,t.jsx)("br",{}),s]},a)})},a)})})]},s)})})]})}])},358664,e=>{"use strict";var t=e.i(438682),a=e.i(762815),n=e.i(10264),i=e.i(50477),r=e.i(22766),s=e.i(229677),o=e.i(566250),l=e.i(595967),c=e.i(83285),u=e.i(386979),d=e.i(129933),p=e.i(235675),f=e.i(975157);function h(e){var t,i=e.report,h=e.compact,v=void 0!==h&&h,m=e.showTitle,x=e.className,g=(0,p.useTranslations)("tools.3d-accessory-generator.download.printReadiness"),y=(0,a._)((0,s.useState)(!v),2),M=y[0],b=y[1],k="ready"===i.overall,w=i.checks.wallThickness,j=i.checks.baseContact,_=i.checks.orientation,N=i.watertightDetail,z=[{label:g("watertight"),value:i.checks.watertight.pass?g("passed"):N?g("openEdges",{openEdges:N.openEdges,loops:N.boundaryLoops}):g("needsReview"),pass:i.checks.watertight.pass},{label:g("manifold"),value:i.checks.manifold.pass?g("passed"):"".concat(i.checks.manifold.nonManifoldEdges," ").concat(g("nonManifoldEdges")),pass:i.checks.manifold.pass},{label:g("wallThickness"),value:"skipped"===w.status?g("skipped"):"".concat(null!=(t=w.p5MM)?t:w.minMM," mm"),pass:"pass"===w.status,warning:"warn"===w.status||"skipped"===w.status},{label:g("shells"),value:g("shellCount",{count:i.checks.shells.count}),pass:1===i.checks.shells.count},{label:g("baseContact"),value:"skipped"===j.status?g("skipped"):"".concat(j.areaMM2," mm²"),pass:"pass"===j.status,warning:"pass"!==j.status}].concat((0,n._)(_?[{label:g("orientation"),value:"skipped"===_.status?g("skipped"):"pass"===_.status?g("passed"):g("flippedFaces",{count:_.flippedFaces}),pass:"pass"===_.status,warning:"skipped"===_.status}]:[])),A=z.filter(function(e){return e.pass}).length;return(0,r.jsxs)("section",{className:(0,f.cn)("rounded-lg border border-border bg-card p-4",v&&"p-3",x),"aria-label":g("title"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[k?(0,r.jsx)(l.default,{className:"size-4 shrink-0 text-success-text"}):(0,r.jsx)(o.default,{className:"size-4 shrink-0 text-warning-text"}),(0,r.jsxs)("div",{className:"min-w-0",children:[!v&&(void 0===m||m)&&(0,r.jsx)("h3",{className:"text-sm font-semibold",children:g("title")}),(0,r.jsx)("p",{className:(0,f.cn)("text-sm font-medium",k?"text-success-text":"text-warning-text"),children:g(k?"ready":"needsReview")})]})]}),v?(0,r.jsxs)("button",{type:"button",onClick:function(){return b(function(e){return!e})},className:"inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[g(M?"hideDetails":"details"),M?(0,r.jsx)(u.default,{className:"size-3"}):(0,r.jsx)(c.default,{className:"size-3"})]}):(0,r.jsxs)("span",{className:"font-mono text-[11.5px] text-muted-foreground",children:[A,"/",z.length]})]}),(!v||M)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ul",{className:"mt-2 text-[12.5px]",children:z.map(function(e){return(0,r.jsxs)("li",{className:"flex h-[34px] items-center justify-between gap-3 border-t border-border/50 first:border-t-0",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-muted-foreground",children:[e.pass?(0,r.jsx)(l.default,{className:"size-3.5 shrink-0 text-success-text"}):e.warning?(0,r.jsx)(d.default,{className:"size-3.5 shrink-0 text-warning-text"}):(0,r.jsx)(o.default,{className:"size-3.5 shrink-0 text-warning-text"}),e.label]}),(0,r.jsx)("span",{className:(0,f.cn)("font-mono text-xs font-medium",e.pass?"text-muted-foreground":"text-warning-text"),children:e.value})]},e.label)})}),i.stats&&(0,r.jsxs)("p",{className:"mt-2 border-t border-border/50 pt-2.5 font-mono text-[11px] text-muted-foreground",children:[g("volume"),": ",(i.stats.volumeMM3/1e3).toFixed(1)," cm³ · ",g("surfaceArea"),":"," ",(i.stats.surfaceAreaMM2/100).toFixed(1)," cm²"]}),(0,r.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:g(k?"footnoteReady":"footnoteReview")})]})]})}e.s(["PrintReadinessCard",0,function(e){var n=e.assetId,o=e.initialReport,l=void 0===o?null:o,c=e.compact,u=void 0!==c&&c,d=e.className,v=(0,p.useTranslations)("tools.3d-accessory-generator.download.printReadiness"),m=(0,a._)((0,s.use
1State)(l),2),x=m[0],g=m[1],y=(0,a._)((0,s.useState)(!l),2),M=y[0],b=y[1];return((0,s.useEffect)(function(){if(!l){var e=!1;return fetch("/api/roblox/assets/".concat(n,"/print-report")).then(function(e){return(0,t._)(function(){return(0,i._)(this,function(t){return[2,e.ok?e.json():Promise.reject(Error("Print report unavailable"))]})})()}).then(function(t){e||g(t.data)}).catch(function(){e||g(null)}).finally(function(){e||b(!1)}),function(){e=!0}}},[n,l]),M)?(0,r.jsx)("div",{className:(0,f.cn)("h-24 animate-pulse rounded-lg border border-border bg-card",u&&"h-10",d),"aria-label":v("loading")}):x?(0,r.jsx)(h,{report:x,compact:u,className:d}):null},"PrintReportChecklist",0,h,"summarizePrintReport",0,function(e){var t=[e.checks.watertight.pass,e.checks.manifold.pass,"pass"===e.checks.wallThickness.status,1===e.checks.shells.count,"pass"===e.checks.baseContact.status].concat((0,n._)(e.checks.orientation?["pass"===e.checks.orientation.status]:[]));return{passed:t.filter(Boolean).length,total:t.length}}])},792543,e=>{"use strict";var t=e.i(320778),a=e.i(984622),n=e.i(762815),i=e.i(22766),r=e.i(229677);e.s(["InViewReveal",0,function(e){var s=e.children,o=e.delay,l=e.className,c=e.as,u=e.style,d=(0,r.useRef)(null),p=(0,n._)((0,r.useState)(""),2),f=p[0],h=p[1];(0,r.useEffect)(function(){var e=d.current;if(e){var t=function(){return h("lf-reveal-armed lf-revealed")},a=e.getBoundingClientRect(),i=new IntersectionObserver(function(e){(0,n._)(e,1)[0].isIntersecting&&(t(),i.disconnect())},{rootMargin:"-50px",threshold:0});return i.observe(e),a.top<window.innerHeight-50&&a.bottom>50?t():h("lf-reveal-armed"),function(){return i.disconnect()}}},[]);var v=(0,a._)((0,t._)({},u),{"--lf-reveal-delay":"".concat(.04+(void 0===o?0:o),"s")}),m="lf-reveal ".concat(f," ").concat(null!=l?l:"");return(0,i.jsx)(void 0===c?"div":c,{ref:function(e){d.current=e},className:m,style:v,children:s})}])},110204,e=>{"use strict";var t=e.i(320778),a=e.i(747990),n=e.i(22766),i=e.i(984622),r=e.i(229677),s=e.i(261386),o=r.forwardRef(function(e,a){return(0,n.jsx)(s.Primitive.label,(0,i._)((0,t._)({},e),{ref:a,onMouseDown:function(t){var a;t.target.closest("button, input, select, textarea")||(null==(a=e.onMouseDown)||a.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}))});o.displayName="Label";var l=e.i(975157);e.s(["Label",0,function(e){var i=e.className,r=(0,a._)(e,["className"]);return(0,n.jsx)(o,(0,t._)({"data-slot":"label",className:(0,l.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",i)},r))}],110204)},409091,e=>{"use strict";var t=e.i(86264),a=e.i(828385),n=e.i(906334),i=e.i(320778),r=e.i(984622),s=e.i(762815),o=e.i(10264),l=function(){function e(a){(0,t._)(this,e),(0,n._)(this,"parent",void 0),this.parent=new Int32Array(a);for(var i=0;i<a;i++)this.parent[i]=i}return(0,a._)(e,[{key:"find",value:function(e){for(var t=e;this.parent[t]!==t;)t=this.parent[t];for(;this.parent[e]!==e;){var a=this.parent[e];this.parent[e]=t,e=a}return t}},{key:"union",value:function(e,t){var a=this.find(e),n=this.find(t);a!==n&&(this.parent[n]=a)}}]),e}();function c(e){return{watertight:{pass:!1,openEdges:0},manifold:{pass:!1,nonManifoldEdges:0},degenerateTriangles:{pass:0===e,count:e},shells:{count:0},wallThickness:{status:"skipped",sampleCount:0,hitRatio:0},baseContact:{status:"skipped"},orientation:p()}}function u(e,t){for(var a=[],n=new Map,i=Math.floor(e.length/3),r=new Uint32Array(i),s=function(e){if(0===e.length)return 1e-9;var t=h(e);return Math.max(1e-9,1e-6*Math.hypot(t.maxX-t.minX,t.maxY-t.minY,t.maxZ-t.minZ))}(e),o=0;o<i;o++){var l=e[3*o],c=e[3*o+1],u=e[3*o+2],d="".concat(Math.round(l/s),":").concat(Math.round(c/s),":").concat(Math.round(u/s)),p=n.get(d);void 0===p&&(p=a.length/3,n.set(d,p),a.push(l,c,u)),r[o]=p}for(var f=null!=t?t:Uint32Array.from({length:i},function(e,t){return t}),v=[],m=0,x=0;x+2<f.length;x+=3){var g=r[f[x]],y=r[f[x+1]],M=r[f[x+2]];if(g===y||y===M||M===g){m++;continue}v.push(g,y,M)}return{mesh:{positions:new Float32Array(a),indices:new Uint32Array(v)},degenerateTriangles:m}}function d(e,t,a,n){var i=t<a?"".concat(t,":").concat(a):"".concat(a,":").concat(t),r=e.get(i),s={face:n,a:t,b:a};r?r.push(s):e.set(i,[s])}function p(){return{status:"skipped",flippedFaces:0,outward:!1}}function f(e,t,a){var n=3*a,i=3*t[n],r=3*t[n+1],s=3*t[n+2],o=e[i],l=e[i+1],c=e[i+2],u=e[r],d=e[r+1],p=e[r+2],f=e[s],h=e[s+1],v=e[s+2];return(o*(d*v-p*h)+l*(p*f-u*v)+c*(u*h-d*f))/6}function h(e){for(var t=1/0,a=1/0,n=1/0,i=-1/0,r=-1/0,s=-1/0,o=0;o<e.length;o+=3){var l=e[o],c=e[o+1],u=e[o+2];
1t=Math.min(t,l),a=Math.min(a,c),n=Math.min(n,u),i=Math.max(i,l),r=Math.max(r,c),s=Math.max(s,u)}return{minX:t,minY:a,minZ:n,maxX:i,maxY:r,maxZ:s}}function v(e,t,a,n){var i=e[3*a]-e[3*t],r=e[3*a+1]-e[3*t+1],s=e[3*a+2]-e[3*t+2],o=e[3*n]-e[3*t],l=e[3*n+1]-e[3*t+1],c=e[3*n+2]-e[3*t+2],u=r*c-s*l,d=s*o-i*c,p=i*l-r*o;return u*u+d*d+p*p}function m(e,t,a,n,i,r,s,o,l,c,u,d){for(var p=.5*Math.min(a.stepX,a.stepY,a.stepZ),f=Math.hypot(t.maxX-t.minX,t.maxY-t.minY,t.maxZ-t.minZ),h=1.01*f,v=1e-4*f,m=3*n,g=e.indices[m],M=e.indices[m+1],b=e.indices[m+2],k=new Set,w=.001*p;w<=h&&!y(u,d);w+=p){var j=i+o*w,_=r+l*w,N=s+c*w;if(j<t.minX||j>t.maxX||_<t.minY||_>t.maxY||N<t.minZ||N>t.maxZ)break;var z=x(j,t.minX,a.stepX,a.size)+a.size*(x(_,t.minY,a.stepY,a.size)+a.size*x(N,t.minZ,a.stepZ,a.size)),A=!0,R=!1,S=void 0;try{for(var Y,C,T=(null!=(Y=a.cells.get(z))?Y:[])[Symbol.iterator]();!(A=(C=T.next()).done);A=!0){var L=C.value;if(!(L===n||k.has(L))){k.add(L);var X=function(e,t,a,n,i,r,s,o){var l=3*t,c=3*e.indices[l],u=3*e.indices[l+1],d=3*e.indices[l+2],p=e.positions[c],f=e.positions[c+1],h=e.positions[c+2],v=e.positions[u]-p,m=e.positions[u+1]-f,x=e.positions[u+2]-h,g=e.positions[d]-p,y=e.positions[d+1]-f,M=e.positions[d+2]-h,b=s*M-o*y,k=o*g-r*M,w=r*y-s*g,j=v*b+m*k+x*w;if(1e-9>Math.abs(j))return;var _=1/j,N=a-p,z=n-f,A=i-h,R=(N*b+z*k+A*w)*_;if(!(R<0)&&!(R>1)){var S=z*x-A*m,Y=A*v-N*x,C=N*m-z*v,T=(r*S+s*Y+o*C)*_;if(!(T<0)&&!(R+T>1)){var L=(g*S+y*Y+M*C)*_;if(!(L<=0))return{distance:L,exiting:(m*M-x*y)*r+(x*g-v*M)*s+(v*y-m*g)*o>0}}}}(e,L,i,r,s,o,l,c);if(X&&!(X.distance<v&&function(e,t,a,n,i){for(var r=3*t,s=r;s<r+3;s++){var o=e.indices[s];if(o===a||o===n||o===i)return!0}return!1}(e,L,g,M,b)))return X.exiting?X.distance:void 0}}}catch(e){R=!0,S=e}finally{try{A||null==T.return||T.return()}finally{if(R)throw S}}}}function x(e,t,a,n){return Math.max(0,Math.min(n-1,Math.floor((e-t)/a)))}function g(e){return Math.round(100*e)/100}function y(e,t){return Date.now()-e>t}e.s(["MAX_PRINT_REPORT_TRIANGLES",0,15e5,"analyzeIndexedMesh",0,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Date.now(),n=null!=(K=t.timeLimitMs)?K:5e3,M=null!=(G=t.maxTriangles)?G:15e5,b=u(e.positions,e.indices),k=b.mesh,w=Math.floor(k.indices.length/3),j=h(k.positions),_=null!=(Q=t.heightMM)?Q:32,N=j.maxY>j.minY?_/(j.maxY-j.minY):1;if(1!==N)for(var z=0;z<k.positions.length;z++)k.positions[z]*=N;var A=h(k.positions),R={x:(W=A).maxX-W.minX,y:W.maxY-W.minY,z:W.maxZ-W.minZ},S=function(e){for(var t=0,a=0,n=0;n<e.indices.length/3;n++)a+=Math.sqrt(v(e.positions,e.indices[3*n],e.indices[3*n+1],e.indices[3*n+2]))/2,t+=f(e.positions,e.indices,n);return{volumeMM3:g(Math.abs(t)),surfaceAreaMM2:g(a)}}(k),Y=function(e,t){var a;return(0,r._)((0,i._)({version:1,computedAt:new Date().toISOString(),heightMM:_,checks:e,triangleCount:w,bboxMM:R,overall:e.watertight.pass&&e.manifold.pass&&"fail"!==e.wallThickness.status&&(null==(a=e.orientation)?void 0:a.status)!=="fail"?"ready":"needs_review"},t?{watertightDetail:t}:{}),{stats:S,implementation:"typescript-index-adjacency"})};if(0===w||w>M||y(a,n))return Y(c(b.degenerateTriangles));for(var C=new l(w),T=new Map,L=new Uint8Array(w),X=b.degenerateTriangles,E=!1,Z=0;Z<w;Z++){if((2047&Z)==0&&y(a,n)){E=!0;break}var P=3*Z,q=k.indices[P],H=k.indices[P+1],I=k.indices[P+2];if(1e-24>v(k.positions,q,H,I)){X++;continue}L[Z]=1,d(T,q,H,Z),d(T,H,I,Z),d(T,I,q,Z)}if(E)return Y(c(X));var D=0,F=0,O=[],U=!0,V=!1,B=void 0;try{for(var W,K,G,Q,$,J,ee=T.values()[Symbol.iterator]();!(U=(J=ee.next()).done);U=!0){var et=J.value;1===et.length&&(D++,O.push(et[0])),et.length>2&&F++;for(var ea=1;ea<et.length;ea++)C.union(et[0].face,et[ea].face)}}catch(e){V=!0,B=e}finally{try{U||null==ee.return||ee.return()}finally{if(V)throw B}}for(var en=new Set,ei=0;ei<w;ei++)L[ei]&&en.add(C.find(ei));var er=function(e,t,a,n){if(0===e.length)return 0;for(var i=new l(t),r=new Set,s=0;s<e.length;s++){if((2047&s)==0&&y(a,n))return;var o=e[s];i.union(o.a,o.b),r.add(o.a),r.add(o.b)}var c=new Set,u=!0,d=!1,p=void 0;try{for(var f,h=r[Symbol.iterator]();!(u=(f=h.next()).done);u=!0){var v=f.value;c.add(i.find(v))}}catch(e){d=!0,p=e}finally{try{u||null==h.return||h.return()}finally{if(d)throw p}}return c.size}(O,k.positions.length/3,a,n),es=void 0===er?{orientation:p()}:function(e,t,a,n,i){var r=e.indices.length/3,s=Array.from({length:r},function(){return[]}),o=0,l=!0,c=!1,u=void 0;try{for(var d,h=t.values()[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var v=d.value;if((2047&o++)==0&&y(n,i))return{orientation:p()};for(var m=0;m<v.length;m++)for(var x=m+1;x<v.length;x++){var M=+(v[m].a===v[x].a&&v[m].b===v[x].b);s[v[m].face].push({face:v[x].face,flip:M}),s[v[x].face].push({face:v[m].face,flip:M})}}}catch(e){c=!0,u=e}finally{try{l||null==h.return||h.return()}finally{if(c)throw u}}for(var b=new Int8Array(r).fill(-1),k=0,w=!0,j=0,_=0;_<r;_++)if(a[_]&&-1===b[_]){b[_]=0;for(var N=[],z=[_],A=0;A<z.length;A++){if((2047&A)==0&&y(n,i))return{orientation:p()};var R=z[A];N.push(R);var S=!0,Y=!1,C=void 0;try{for(var T,L=s[R][Symbol.iterator]();!(S=(T=L.next()).done);S=!0){var X=T.value,E=b[R]^X.flip;-1===b[X.face]&&(b[X.face]=E,E&&k++,z.push(X.face))}}catch(e){Y=!0,C=e}finally{try{S||null==L.return||L.return()}finally{if(Y)throw C}}}var Z=0,P=!0,q=!1,H=void 0;try{for(var I,D=N[Symbol.iterator]();!(P=(I=D.next()).done);P=!0){var F=I.value,O=1===b[F]?-1:1;Z+=O*f(e.positions,e.indices,F)}}catch(e){q=!0,H=e}finally{try{P||null==D.return||D.return()}finally{if(q)throw H}}Z<=0&&(w=!1),j+=Math.abs(Z)}return{orientation:{status:0===k&&w?"pass":"fail",flippedFaces:k,outward:w},volumeMM3:g(j)}}(k,T,L,a,n),eo=es.orientation;void 0!==es.volumeMM3&&(S=(0,r._)((0,i._)({},S),{volumeMM3:es.volumeMM3}));
1var el=y(a,n)?{status:"skipped",sampleCount:0,hitRatio:0}:function(e,t,a,n,i){var r=function(e,t,a,n){for(var i=Math.max((t.maxX-t.minX)/32,1e-9),r=Math.max((t.maxY-t.minY)/32,1e-9),l=Math.max((t.maxZ-t.minZ)/32,1e-9),c=new Map,u=e.indices.length/3,d=0;d<u;d++){if((1023&d)==0&&y(a,n))return null;for(var p=(0,s._)(function(e,t){var a,n,i,r,s,l,c=3*t,u=[3*e.indices[c],3*e.indices[c+1],3*e.indices[c+2]],d=u.map(function(t){return e.positions[t]}),p=u.map(function(t){return e.positions[t+1]}),f=u.map(function(t){return e.positions[t+2]});return[(a=Math).min.apply(a,(0,o._)(d)),(n=Math).min.apply(n,(0,o._)(p)),(i=Math).min.apply(i,(0,o._)(f)),(r=Math).max.apply(r,(0,o._)(d)),(s=Math).max.apply(s,(0,o._)(p)),(l=Math).max.apply(l,(0,o._)(f))]}(e,d),6),f=p[0],h=p[1],v=p[2],m=p[3],g=p[4],M=p[5],b=x(f,t.minX,i,32),k=x(m,t.minX,i,32),w=x(h,t.minY,r,32),j=x(g,t.minY,r,32),_=x(v,t.minZ,l,32),N=x(M,t.minZ,l,32),z=b;z<=k;z++)for(var A=w;A<=j;A++)for(var R=_;R<=N;R++){var S=z+32*(A+32*R),Y=c.get(S);Y?Y.push(d):c.set(S,[d])}}return{cells:c,size:32,stepX:i,stepY:r,stepZ:l}}(e,t,a,n);if(!r||y(a,n))return{status:"skipped",sampleCount:0,hitRatio:0};for(var l=[],c=0x9e3779b9,u=e.indices.length/3,d=0;d<i;d++){if(y(a,n))return{status:"skipped",sampleCount:d,hitRatio:0===d?0:l.length/d};var p=function(e,t,a,n,i,r){var o=(0,s._)(function(e,t){var a=3*t,n=3*e.indices[a],i=3*e.indices[a+1],r=3*e.indices[a+2],s=e.positions[n],o=e.positions[n+1],l=e.positions[n+2],c=e.positions[i],u=e.positions[i+1],d=e.positions[i+2],p=e.positions[r],f=e.positions[r+1],h=e.positions[r+2],v=(u-o)*(h-l)-(d-l)*(f-o),m=(d-l)*(p-s)-(c-s)*(h-l),x=(c-s)*(f-o)-(u-o)*(p-s),g=Math.hypot(v,m,x);return g>0&&(v/=g,m/=g,x/=g),[(s+c+p)/3,(o+u+f)/3,(l+d+h)/3,v,m,x]}(e,n),6),l=o[0],c=o[1],u=o[2],d=o[3],p=o[4],f=o[5];if(0!==d||0!==p||0!==f){var h=m(e,t,a,n,l,c,u,-d,-p,-f,i,r);return void 0!==h?h:m(e,t,a,n,l,c,u,d,p,f,i,r)}}(e,t,r,(c=1664525*c+0x3c6ef35f>>>0)%u,a,n);void 0!==p&&l.push(p)}var f=0===i?0:l.length/i;if(l.length<Math.min(20,i))return{status:"skipped",sampleCount:i,hitRatio:f};l.sort(function(e,t){return e-t});var h=l[Math.max(0,Math.ceil(.05*l.length)-1)],v=l[Math.max(0,Math.ceil(.25*l.length)-1)];return{status:v<.6?"fail":h<1?"warn":"pass",minMM:g(l[0]),p5MM:g(h),p25MM:g(v),sampleCount:i,hitRatio:f}}(k,A,a,n,null!=($=t.wallSampleCount)?$:200),ec=y(a,n)?{status:"skipped"}:function(e,t,a,n){for(var i=t.minY+(t.maxY-t.minY)*.02,r=0,s=0;s<e.indices.length/3;s++){if((2047&s)==0&&y(a,n))return{status:"skipped"};var o=3*s,l=3*e.indices[o],c=3*e.indices[o+1],u=3*e.indices[o+2];if(!((e.positions[l+1]+e.positions[c+1]+e.positions[u+1])/3>i)){var d=e.positions[l],p=e.positions[l+2],f=e.positions[c],h=e.positions[c+2],v=e.positions[u];r+=Math.abs((f-d)*(e.positions[u+2]-p)-(h-p)*(v-d))/2}}var m=g(r);return{status:r>=5?"pass":"warn",areaMM2:m}}(k,A,a,n);return Y({watertight:{pass:0===D&&0===F,openEdges:D},manifold:{pass:0===D&&0===F,nonManifoldEdges:F},degenerateTriangles:{pass:0===X,count:X},shells:{count:en.size},wallThickness:el,baseContact:ec,orientation:eo},void 0===er?void 0:{openEdges:D,boundaryLoops:er})},"weldVertices",0,u])},498417,e=>{e.q("/_next/static/media/stl-checker.worker.0y1i0ixo2_9pw.ts")},444918,e=>{e.q("/_next/static/media/stl-repair.worker.3tunyukdb03lj.ts")}]);
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.