PageSourceSearch

https://www.slate360.ai/_next/static/chunks/6975-13b6e5887a0f34f2.js

js slate360.ai collected 2026-10-05 15:06:53 UTC 10,863 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dcb5c16e-7254-4cf3-877a-84894ab9423a",e._sentryDebugIdIdentifier="sentry-dbid-dcb5c16e-7254-4cf3-877a-84894ab9423a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6975],{6975:(e,t,n)=>{n.d(t,{M:()=>i});var a=n(95155),r=n(12115),l=n(80666),o=n(47330);function i(e){var t,n,i,c,s,d;let{capture:u,token:f}=e,[m,h]=(0,r.useState)(null),p=(0,r.useRef)(null),b=function(e,t){let[n,a]=(0,r.useState)(null),[l,o]=(0,r.useState)(null),i=(0,r.useRef)(new Map);return(0,r.useEffect)(()=>{if(a(null),o(null),!e||!t)return;let n=i.current.get(t);if(n)return void a(n);let r=!1;return fetch("/api/share/thermal/".concat(e,"/grid/").concat(t)).then(e=>e.ok?e.json():null).then(e=>{!r&&e&&(i.current.set(t,e),a(e))}).catch(()=>{}),()=>{r=!0}},[e,t]),{hasGrid:!!n,tempC:l,onHover:function(e){var t;if(!n)return;let a=e.currentTarget.getBoundingClientRect(),r=Math.floor((e.clientX-a.left)/a.width*n.width),l=Math.floor((e.clientY-a.top)/a.height*n.height);if(r<0||l<0||r>=n.width||l>=n.height)return void o(null);o(null!=(t=n.temps[l*n.width+r])?t:null)},onLeave:function(){o(null)}}}(f,u.id);(0,r.useEffect)(()=>{h(null);let e=p.current;(null==e?void 0:e.complete)&&e.naturalWidth&&h({w:e.naturalWidth,h:e.naturalHeight})},[u.previewUrl]);let g=null!=(t=u.anomalies)?t:[],x=null!=(n=u.qualityMetrics)?n:{},v=function(e,t,n){var a,r,l,o,i,c;let s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof e&&Number.isFinite(e)?"".concat(e.toFixed(1)).concat(t):null},d=null!=(a=n.emissivity)?a:e.emissivity_used;return[["Camera",null!=(r=e.sensor_make)?r:null],["Sensor",null!=(o=null!=(l=e.sensor_model)?l:e.parser_id)?o:null],["Max temp",s(e.max_temp_c,"\xb0C")],["Min temp",s(e.min_temp_c,"\xb0C")],["Avg temp",s(e.avg_temp_c,"\xb0C")],["Emissivity",s(d)],["Reflected",s(n.reflected_c,"\xb0C")],["Distance",null!=n.distance_m?"".concat(n.distance_m," m"):null],["Humidity",null!=n.humidity_pct?"".concat(n.humidity_pct,"%"):null],["GPS",null!=t.lat&&(null!=(i=t.lon)?i:t.lng)!=null?"".concat(Number(t.lat).toFixed(4),", ").concat(Number(null!=(c=t.lon)?c:t.lng).toFixed(4)):null]].filter(e=>null!==e[1])}(x,null!=(i=u.gpsPosition)?i:{},null!=(c=u.tuning)?c:{}),y="string"==typeof u.findings?u.findings.trim():"",w=(e,t)=>"".concat(e/(t||1)*100,"%");return(0,a.jsxs)("div",{className:"grid gap-4 lg:grid-cols-[minmax(0,1.7fr)_minmax(0,1fr)]",children:[(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-xl border border-[var(--mobile-app-card-border)] bg-[#111827]",children:[u.previewUrl?(0,a.jsx)("img",{ref:p,src:u.previewUrl,alt:null!=(s=u.filename)?s:"Thermal capture",className:"block w-full ".concat(b.hasGrid?"cursor-crosshair":""),onLoad:e=>h({w:e.currentTarget.naturalWidth,h:e.currentTarget.naturalHeight}),onMouseMove:b.onHover,onMouseLeave:b.onLeave}):(0,a.jsx)("div",{className:"flex aspect-[4/3] items-center justify-center text-xs text-[var(--graphite-muted)]",children:"Preview unavailable"}),m?g.map((e,t)=>{var n;if(!e.bbox)return null;let r=(0,l.RB)(e.severity);return(0,a.jsx)("span",{className:"absolute flex items-start border-2",style:{left:w(e.bbox.x,m.w),top:w(e.bbox.y,m.h),width:w(e.bbox.w,m.w),height:w(e.bbox.h,m.h),borderColor:r.color},children:(0,a.jsx)("span",{className:"-translate-y-[55%] rounded px-1 text-[9px] font-bold text-black",style:{background:r.color},children:t+1})},null!=(n=e.id)?n:t)}):null,b.hasGrid?(0,a.jsx)("span",{className:"pointer-events-none absolute bottom-2 left-2 rounded-md bg-black/70 px-2 py-1 text-xs font-semibold tabular-nums text-white",children:null!=b.tempC?(0,o.IC)(b.tempC,"F"):"Hover to read temperature"}):null]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-[var(--mobile-app-card-border)] p-3",children:[(0,a.jsx)("p",{className:"truncate text-sm font-semibold text-[var(--graphite-text-header)]",children:null!=(d=u.filename)?d:"Capture"}),(0,a.jsx)("dl",{className:"mt-2 space-y-1 text-xs",children:v.map(e=>{let[t,n]=e;return(0,a.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,a.jsx)("dt",{className:"text-[var(--graphite-muted)]",children:t}),(0,a.jsx)("dd",{className:"text-right font-medium text-[var(--graphite-text-body)]",children:n})]},t)})})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-[var(--mobile-app-card-border)] p-3",children:[(0,a.jsxs)("p",{className:"text-xs font-semibold uppercase tracking-wide text-[var(--graphite-muted)]",children:["Findings (",g.length,")"]}),y?(0,a.jsx)("p",{className:"mt-2 whitespace-pre-line border-l-2 border-[color-mix(in_srgb,var(--graphite-primary)_50%,transparent)] pl-2 text-[11px] leading-relaxed text-[var(--graphite-text-body)]",children:y}):null,0===g.length?y?null:(0,a.jsx)("p",{className:"mt-1 text-xs text-[var(--graphite-muted)]",children:"No anomalies flagged on this image."}):(0,a.jsx)("ul",{className:"mt-2 space-y-2",children:g.map((e,t)=>{var n;let r=(0,l.RB)(e.severity);return(0,a.jsxs)("li",{className:"text-[11px] leading-relaxed text-[var(--graphite-text-body)]",children:[(0,a.jsx)("span",{className:"mr-1 inline-flex h-4 w-4 items-center justify-center rounded text-[9px] font-bold text-black",style:{background:r.color},children:t+1}),(0,l.Ng)(e)]},null!=(n=e.id)?n:t)})})]})]})]})}},47330:(e,t,n)=>{n.d(t,{Cg:()=>d,GV:()=>l,IC:()=>o,OJ:()=>i,pj:()=>r,sB:()=>c,vQ:()=>s,vw:()=>u});let a={Inferno:[[0,0,4],[40,11,84],[101,21,110],[159,42,99],[212,72,66],[245,125,21],[250,193,39],[252,255,164]],Iron:[[0,0,0],[40,0,80],[120,0,90],[200,30,30],[245,120,0],[255,200,40],[255,255,200],[255,255,255]],Rainbow:[[0,0,143],[0,0,255],[0,255,255],[120,255,0],[255,255,0],[255,0,0],[128,0,0]],Grayscale:[[0,0,0],[255,255,255]],Arctic:[[0,0,40],[0,40,120],[0,120,200],[120,200,255],[255,255,255]],"Hot Metal":[[0,0,0],[120,0,0],[220,80,0],[255,200,0],[255,255,255]],"White Hot":[[0,0,0],[255,255,255]],"Black Hot":[[255,255,255],[0,0,0]],Lava:[[0,0,0],[60,0,0],[140,10,0],[220,70,0],[255,170,20],[255,240,120],[255,255,255]],Glowbow:[[0,0,0],[70,0,120],[180,0,140],[255,60,40],[255,170,0],[255,255,120],[255,255,255]],Medical:[[0,0,80],[0,120,200],[0,200,160],[120,220,0],[255,230,0],[255,120,0],[200,0,0]]},r=Object.keys(a);function l(e,t){var n;let r=null!=(n=a[e])?n:a.Inferno,l=Math.max(0,Math.min(1,t))*(r.length-1),o=Math.floor(l),i=l-o,c=r[o],s=r[Math.min(r.length-1,o+1)];return[Math.round(c[0]+(s[0]-c[0])*i),Math.round(c[1]+(s[1]-c[1])*i),Math.round(c[2]+(s[2]-c[2])*i)]}function o(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return"".concat(("F"===t?9*e/5+32:e).toFixed(1)).concat(n?"\xb0".concat(t):"\xb0")}function i(e,t){let n=Math.abs(e)*("F"===t?1.8:1);return"".concat(n.toFixed(1),"\xb0").concat(t)}function c(){return"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"s".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2))}function s(e,t,n,a,r,o,i,c){let s=e.createImageData(n,a),d=i-o||1;for(let e=0;e<t.length;e++){let n=t[e],a=(n-o)/d,i=4*e;if(c&&(n<c.lo||n>c.hi)){let e=Math.round(150*Math.max(0,Math.min(1,a)));s.data[i]=e,s.data[i+1]=e,s.data[i+2]=e}else{let[e,t,n]=l(r,a);s.data[i]=e,s.data[i+1]=t,s.data[i+2]=n}s.data[i+3]=255}e.putImageData(s,0,0)}function d(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:40,r=Array(a).fill(0),l=n-t||1;for(let n=0;n<e.length;n++){let o=Math.floor((e[n]-t)/l*a);o<0?o=0:o>=a&&(o=a-1),r[o]+=1}return r}function u(e,t,n){let a=e.length,r=new Uint32Array(a);for(let e=0;e<a;e++)r[e]=e;let l=Array.from(r);l.sort((t,n)=>e[t]-e[n]);let o=new Float32Array(a),i=n-t||1,c=Math.max(1,a-1);for(let e=0;e<a;e++)o[l[e]]=t+e/c*i;return o}},80666:(e,t,n)=>{n.d(t,{Ng:()=>c,RB:()=>o,gM:()=>r});let a={air_leakage:"air leakage",weatherseal:"weatherseal / gasket",insulation_variation:"insulation variation",thermal_bridge:"thermal bridging",moisture_pattern:"moisture-like pattern",membrane_variation:"membrane variation",solar_loading:"solar loading",electrical_resistance:"elevated electrical resistance",loose_connection:"loose / overloaded connection",load_imbalance:"load imbalance",mechanical_friction:"mechanical friction",bearing_condition:"bearing condition",airflow:"airflow",flow_blockage:"flow blockage"};function r(e){var t;return null!=(t=a[e])?t:e.replace(/_/g," ")}let l={action:{label:"Action",color:"#ef4444",chipClass:"border-[#ef4444]/40 bg-[#ef4444]/15 text-[#fca5a5]"},watch:{label:"Watch",color:"#fb923c",chipClass:"border-[#fb923c]/40 bg-[#fb923c]/15 text-[#fdba74]"},info:{label:"Info",color:"#38bdf8",chipClass:"border-[#38bdf8]/40 bg-[#38bdf8]/15 text-[#7dd3fc]"}};function o(e){var t;return null!=(t=l[e])?t:l.info}function i(e,t){if("number"!=typeof e||!Number.isFinite(e))return"—";let n="F"===t?9*e/5+32:e;return"".concat(n.toFixed(1),"\xb0").concat(t)}function c(e){var t,n,a;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=null!=(t=r.unit)?t:"F",o=(a=r.standards)&&0!==a.length?" Evaluate per ".concat(a.join(", "),"."):"",c=i(e.temp_c,l),s=function(e,t){if("number"!=typeof e||!Number.isFinite(e))return"—";let n=Math.abs(e)*("F"===t?1.8:1);return"".concat(n.toFixed(1),"\xb0").concat(t)}(e.delta_c,l),d=null!=(n=e.severity)?n:"info",u=e.pattern,f="number"==typeof e.background_c?"".concat(s," above adjacent surroundings (~").concat(i(e.background_c,l),")"):"ΔT ".concat(s," above surroundings"),m="number"==typeof e.background_c?"".concat(s," below adjacent surroundings (~").concat(i(e.background_c,l),")"):"ΔT ".concat(s," below surroundings"),h="action"===d?" Recommend on-site verification.":"watch"===d?" Recommend review and follow-up.":"";if("hot_spot"===e.type)return"Elevated-temperature area observed — peak ".concat(c,", ").concat(f," at the time of capture. Thermal pattern: ").concat("diffuse"===u?"diffuse (soft, spread)":"focal (sharp, localized)"," warm region. Confirm the source and context on site.").concat(h).concat(o);if("cold_bridge"===e.type)return"Reduced-temperature area observed — ".concat(m," at the time of capture. Thermal pattern: ").concat("focal"===u?"focal (sharp, localized)":"diffuse (soft, spread)"," cool region. Confirm the source and context on site.").concat(h).concat(o);if("linear_streak"===e.type)return"Linear thermal trace observed — an elongated temperature pattern following a line or seam at the time of capture. Confirm the source and context on site.".concat(h).concat(o);let p="number"==typeof e.delta_c&&e.delta_c<0?m:f;return"Thermal anomaly observed — ".concat(p," at the time of capture. Confirm the source and context on site.").concat(h).concat(o)}}}]);

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.