PageSourceSearch

https://app1.dev.whitecore.ai/_next/static/chunks/8958-94b9e1812ee79b00.js

js whitecore.ai collected 2026-10-05 14:39:39 UTC 14,299 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8958],{3287:function(e,t,a){a.d(t,{Z:function(){return s}});var n=a(5893),r=a(1664),l=a.n(r),o=a(1163),i=a(9548);function s(e){let{tabs:t}=e,a=(0,o.useRouter)(),{entitlements:r}=(0,i.a)(),s=null==r?void 0:r.nav,c=s?t.filter(e=>{var t;return!e.entKey||(null===(t=s[e.entKey])||void 0===t?void 0:t.visible)!==!1}):t,d=e=>{var n;let[r,l]=e.href.split("#"),o=(null===(n=a.asPath.split("#")[1])||void 0===n?void 0:n.split("?")[0])||"";if(l)return a.pathname===r&&o===l;let i=t.some(e=>{let[t,a]=e.href.split("#");return a&&t===r&&o===a});return(a.pathname!==r||!i)&&(a.pathname===r||a.pathname.startsWith("".concat(r,"/")))};return(0,n.jsx)("div",{className:"mb-5 -mx-4 flex items-center gap-0.5 overflow-x-auto overflow-y-hidden border-b border-wc-border px-4 lg:-mx-6 lg:mb-6 lg:px-6",children:c.map(e=>{let t=d(e);return(0,n.jsx)(l(),{href:e.href,"aria-current":t?"page":void 0,className:"shrink-0 px-4 py-2.5 text-body-sm font-medium transition-colors border-b-2 -mb-px ".concat("purple"===e.tone?"".concat(t?"border-wc-purple":"border-transparent"," text-wc-purple hover:brightness-125"):"blue"===e.tone?"".concat(t?"border-wc-blue":"border-transparent"," text-wc-blue hover:brightness-125"):t?"border-wc-blue text-white":"border-transparent text-wc-text-mute hover:text-white"),children:e.label},e.href)})})}},8787:function(e,t,a){a.d(t,{Z:function(){return l}});var n=a(5893);let r={"2:1":{grid:"xl:grid-cols-3",main:"xl:col-span-2",rail:"xl:col-span-1"},"3:1":{grid:"xl:grid-cols-4",main:"xl:col-span-3",rail:"xl:col-span-1"},"1:1":{grid:"xl:grid-cols-2",main:"xl:col-span-1",rail:"xl:col-span-1"}};function l(e){let{main:t,rail:a,ratio:l="2:1",className:o=""}=e;if(!a)return(0,n.jsx)("div",{className:"min-w-0 ".concat(o),children:t});let i=r[l]||r["2:1"];return(0,n.jsxs)("div",{className:["grid gap-4 grid-cols-1",i.grid,o].join(" "),children:[(0,n.jsx)("div",{className:"min-w-0 ".concat(i.main),children:t}),(0,n.jsx)("aside",{className:"min-w-0 space-y-4 ".concat(i.rail),children:a})]})}},6737:function(e,t,a){a.d(t,{Z:function(){return r}});var n=a(5893);function r(e){let{title:t,subtitle:a,actions:r,className:l=""}=e;return(0,n.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4 ".concat(l),children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("div",{className:"text-h2 font-semibold text-white truncate",children:t}),a&&(0,n.jsx)("div",{className:"mt-0.5 text-caption text-wc-text-mute truncate",children:a})]}),r&&(0,n.jsx)("div",{className:"shrink-0 flex items-center gap-2",children:r})]})}},638:function(e,t,a){a.d(t,{Z:function(){return d}});var n=a(5893),r=a(1163),l=a(8057),o=a(915),i=a(7006);let s={pairing:{title:"Pair your first screen",body:"A 90-second walkthrough of the pairing flow, connect a kraken-player and assign it a location.",videoUrl:null,cta:{label:"Pair a device",href:"/devices/pair"},tone:"magnolia"},presentations:{title:"Build a presentation",body:"Learn how to lay out media, add widgets, and save your first slide.",videoUrl:null,cta:{label:"Create presentation",href:"/studio/presentations?create=1"},tone:"electrolytic"},zones:{title:"Draw your first zone",body:"Tag areas of the camera frame so Vision AI can count footfall and dwell. Click vertices, name the zone, save.",videoUrl:null,cta:{label:"Open Zones",href:"/vision-ai/zones"},tone:"lime"},triggers:{title:"Automate content with triggers",body:"Choose a ready-made outcome, then connect the camera, content and screens.",videoUrl:null,cta:{label:"Cho
1ose a template",href:"/triggers/templates"},tone:"rose"},cameras:{title:"Add a camera",body:"Connect a Vision AI camera so you can draw zones and feed real-time analytics into the dashboard.",videoUrl:null,cta:{label:"Add camera",href:"/vision-ai/cameras?add=1"},tone:"info"},reports:{title:"Build your first report",body:"Combine foot traffic, dwell, trigger fires and recorded presentation starts into a saved report you can export to CSV or PDF.",videoUrl:null,cta:{label:"Build report",href:"/analytics/reports"},tone:"amber"}};function c(){return(0,n.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor",children:(0,n.jsx)("polygon",{points:"8,5 19,12 8,19"})})}function d(e){let{slug:t,title:a,body:d,videoUrl:u,cta:m,leadingCta:p,tone:h,className:f=""}=e,x=(0,r.useRouter)(),b=t&&s[t]||{},v=a||b.title||"Quick tour",g=d||b.body||"",w=u||b.videoUrl,y=m||b.cta,j=h||b.tone||"magnolia";return(0,n.jsx)(l.Z,{className:f,children:(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-5 items-center",children:[(0,n.jsxs)("div",{className:w?"md:col-span-3":"md:col-span-5",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3 mb-3",children:[(0,n.jsx)(o.Z,{tone:j,size:"md",children:(0,n.jsx)(c,{})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-eyebrow text-wc-text-mute uppercase tracking-eyebrow font-semibold",children:"Quick guide"}),(0,n.jsx)("h3",{className:"text-h1 font-semibold text-white",children:v})]})]}),g&&(0,n.jsx)("p",{className:"text-body-sm text-wc-text-sub mb-4",children:g}),(p||y)&&(0,n.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[p&&(0,n.jsxs)(i.Z,{variant:"primary",size:"md",onClick:()=>x.push(p.href),children:[p.label," →"]}),y&&(0,n.jsxs)(i.Z,{variant:"primary",size:"md",onClick:()=>x.push(y.href),children:[y.label," →"]})]})]}),w&&(0,n.jsx)("div",{className:"md:col-span-2",children:(0,n.jsx)("video",{src:w,controls:!0,className:"w-full aspect-video rounded-wc-md bg-black border border-wc-border"})})]})})}},5194:function(e,t,a){a.d(t,{Z:function(){return l}});var n=a(5893),r=a(8705);function l(e){let{cameras:t=[],realtimeById:a={},focusedCameraId:l,onFocus:o,countFor:i,mode:s="still"}=e;return t.length?(0,n.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3",children:t.map(e=>(0,n.jsx)(r.Z,{camera:e,realtime:a[e.id],focused:e.id===l,onFocus:o,mode:s},e.id))}):null}},8705:function(e,t,a){a.d(t,{Z:function(){return c}});var n=a(5893),r=a(7294),l=a(8791);function o(e){let{zone:t}=e;if(!Array.isArray(t.polygon)||0===t.polygon.length)return null;let a=t.polygon.map(e=>"".concat(100*(e.x||0),",").concat(100*(e.y||0))).join(" ");return(0,n.jsx)("svg",{className:"absolute inset-0 w-full h-full pointer-events-none",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:(0,n.jsx)("polygon",{points:a,fill:t.color||"#a855f7",fillOpacity:"0.18",stroke:t.color||"#a855f7",strokeWidth:"2",strokeOpacity:"0.7"})})}var i=a(4760);function s(e){let{className:t}=e;return(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:t,children:[(0,n.jsx)("circle",{cx:"9",cy:"7",r:"3"}),(0,n.jsx)("path",{d:"M3 21v-2a6 6 0 0 1 12 0v2"}),(0,n.jsx)("circle",{cx:"17",cy:"8",r:"2.5"}),(0,n.jsx)("path",{d:"M15.5 21v-1.5a4.5 4.5 0 0 1 6 -4.2"})]})}function c(e){var t,a,c;let{camera:d,realtime:u,focused:m,onFocus:p,mode:h="still",onFrameStatus:f}=e,x="live"===h,[b,v]=(0,r.useState)(null),[g,w]=(0,r.useState)(null),[y,j]=(0,r.useState)(null),[N,k]=(0,r.useState)(!1),[A,C]=(0,r.useState)(!1),[Z,z]=(0,r.useState)(Date.now()),[T,U]=(0,r.useState)(null),R="ONLINE"===d.status,I=d.id;(0,r.useEffect)(()=>{let e=!1,t=null;async function a(){try{var n;let t=await l.ZP.get("/cameras/".concat(I,"/snapshot"));!e&&(null===(n=t.data)||void 0===n?void 0:n.url)&&(v(t.data.url),w(t.data.capturedAt),(0,i.y2)(I,{url:t.data.url,capturedAt:t.data.capturedAt}))}catch(e){}e||x||(t=setTimeout(a,6e4))}return v(null),w(null),a(),()=>{e=!0,t&&clearTimeout(t)}},[I,x]),(0,r.useEffect)(()=>{let e=setInterval(()=>z(Date.now()),3e4);return()=>clearInterval(e)},[]),(0,r.useEffect)(()=>{let e;if(j(null),k(!1),!x||!R)return;let t="https://api1.dev.whitecore.ai".replace(/^http/,"ws");if(!t)return;let a=!1,n=null,r=null;async function o(){try{let{data:i}=await l.ZP.post("/cameras/".concat(encodeURIComponent(I),"/viewer-token"));if(a)return;(e=new WebSocket("".concat(t,"/ws/view?cameraId=").concat(encodeURIComponent(I)),["whitecore-camera","camera.".concat(i.viewerToken)])).binaryType="blob",e.onmessage=e=>{if("string"==typeof e.data)return;let t=URL.createObjectURL(e.data);j(e=>(e&&URL.revokeObjectURL(e),t)),k(!0),n&&clearTimeout(n),n=setTimeout(()=>k(!1),3e3)},e.onclose=()=>{a||(k(!1),r=setTimeout(o,3e3))},e.onerror=()=>{}}catch(e){a||(r=setTimeout(o,1e4))}}return o(),()=>{a=!0,n&&clearTimeout(n),r&&clearTimeout(r);try{e&&e.close()}catch(e){}j(e=>(e&&URL.revokeObjectURL(e),null)),k(!1)}},[I,R,x]);let L=x&&m&&R&&!N;(0,r.useEffect)(()=>
1{if(!L)return;let e=!1,t=null,a=g;async function n(){C(!0);try{await l.ZP.post("/cameras/".concat(I,"/snapshot"));for(let n=0;n<8;n++){var t;if(await new Promise(e=>setTimeout(e,2500)),e)return;let n=await l.ZP.get("/cameras/".concat(I,"/snapshot"));if((null===(t=n.data)||void 0===t?void 0:t.url)&&n.data.capturedAt!==a){v(n.data.url),w(n.data.capturedAt),(0,i.y2)(I,{url:n.data.url,capturedAt:n.data.capturedAt}),a=n.data.capturedAt;break}}}catch(e){}finally{e||C(!1)}}async function r(){e||(await n(),e||(t=setTimeout(r,1500)))}return r(),()=>{e=!0,t&&clearTimeout(t)}},[I,L]);let P=y||b,S=(null!==(a=null==u?void 0:u.zones)&&void 0!==a?a:[]).reduce((e,t)=>e+(t.peopleInZone||0),0),E=(null==u?void 0:u.hasFrameCount)?null!==(c=u.peopleInFrame)&&void 0!==c?c:0:S,M=g?new Date(g).toLocaleTimeString():null,D=g?Z-new Date(g).getTime():1/0,F=N||Number.isFinite(D)&&D<=15e4,O=!!b&&!N&&D>15e4,V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(!e)return"not received";let a=Math.max(0,Math.floor((t-new Date(e).getTime())/1e3));return a<10?"just now":a<60?"".concat(a,"s ago"):a<3600?"".concat(Math.floor(a/60),"m ago"):"".concat(Math.floor(a/3600),"h ago")}(g,Z);return(0,r.useEffect)(()=>{null==f||f({live:N,fresh:F,stale:O,capturedAt:g,ageLabel:V})},[N,F,O,g,V,f]),(0,n.jsxs)("button",{type:"button",onClick:()=>p(I),"aria-pressed":m,className:"group relative block w-full overflow-hidden rounded-wc-lg border bg-wc-bg text-left transition-colors ".concat(m?"border-wc-purple/70":"border-wc-border hover:border-white/20"),style:{aspectRatio:T||16/9},children:[P?(0,n.jsx)("img",{src:P,alt:"".concat(d.name," frame"),onLoad:e=>{let{naturalWidth:t,naturalHeight:a}=e.currentTarget;t&&a&&U(t/a)},className:"absolute inset-0 h-full w-full object-cover"}):(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center px-4 text-center",children:(0,n.jsx)("p",{className:"text-body-sm text-wc-text-mute",children:R?"Waiting for a frame…":"Camera offline"})}),null==u?void 0:null===(t=u.zones)||void 0===t?void 0:t.map(e=>(0,n.jsx)(o,{zone:e},e.zoneId)),(0,n.jsxs)("div",{className:"absolute left-0 top-0 z-10 max-w-full truncate bg-black/55 px-2 py-1 text-eyebrow text-white/90",children:[M?"".concat(M," | "):"",d.name]}),N&&(0,n.jsxs)("div",{className:"absolute left-2 bottom-2 z-10 flex items-center gap-1.5 rounded-full bg-black/60 px-2 py-0.5",children:[(0,n.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-wc-danger"}),(0,n.jsx)("span",{className:"text-eyebrow font-medium text-white",children:"LIVE"})]}),!R&&(0,n.jsx)("div",{className:"absolute left-2 bottom-2 z-10 rounded-full bg-black/60 px-2 py-0.5 text-eyebrow text-white/70",children:"Offline"}),R&&O&&(0,n.jsxs)("div",{className:"absolute inset-x-2 bottom-2 z-10 rounded-wc-md border border-wc-warning/35 bg-black/80 px-2.5 py-1.5 text-eyebrow font-semibold text-wc-warning",children:["Stale frame \xb7 last updated ",V]}),A&&(0,n.jsx)("span",{className:"absolute bottom-2 right-2 z-10 rounded-wc-sm bg-black/50 px-2 py-0.5 text-eyebrow text-white/90",children:"Refreshing…"}),P&&(0,n.jsxs)("div",{className:"absolute right-2 top-2 z-10 flex items-center gap-1.5 rounded-wc-md bg-black/70 px-2.5 py-1",children:[(0,n.jsx)(s,{className:E>0?"text-wc-success":"text-wc-warning"}),(0,n.jsx)("span",{className:"text-body font-semibold leading-none ".concat(E>0?"text-wc-success":"text-wc-warning"),children:E}),(0,n.jsx)("span",{className:"text-eyebrow uppercase ".concat(E>0?"text-wc-success/80":"text-wc-warning/80"),children:"in view"})]})]})}},5506:function(e,t,a){a.d(t,{Z:function(){return s}});var n=a(5893),r=a(2693),l=a(3287),o=a(8602),i=[{label:"Live View",href:"/vision-ai/live",entKey:"visionAiLive"},{label:"Zones",href:"/vision-ai/zones",entKey:"visionAiZones"},{label:"Heatmaps",href:"/vision-ai/heatmaps",entKey:"visionAiHeatmaps"},{label:"Venue Maps",href:"/vision-ai/venue-maps",entKey:"visionAiVenueMaps"},{label:"Floor-plan Match",href:"/vision-ai/calibration",entKey:"visionAiCalibration"}];function s(e){let{subtitle:t="Start with Zones to choose what the camera measures. Floor-plan matching is optional.",kpis:a,children:s}=e;return(0,n.jsxs)(r.Z,{title:"Vision AI",children:[(0,n.jsx)("p",{className:"text-body-sm text-wc-text-mute mb-5",children:t}),(0,n.jsx)(l.Z,{tabs:i}),a?(0,n.jsx)(o.Z,{className:"mb-5",children:a}
1):null,s]})}},3169:function(e,t,a){a.d(t,{F:function(){return o}});var n=a(7294),r=a(1163),l=a(9548);function o(e){let{user:t,entitlements:a,loading:o}=(0,l.a)(),i=(0,r.useRouter)(),{noAuth:s,needsPasswordChange:c,needs2fa:d,needsPlan:u,hidden:m,allowed:p}=function(e){var t,a,n;let{entKey:r,user:l,entitlements:o,loading:i}=e,s="settingsBilling"===r,c="settingsSecurity"===r,d=!i&&!!l&&!!(null==o?void 0:o.nav),u=d&&!s&&!c&&(null===(t=o.nav[r])||void 0===t?void 0:t.visible)===!1,m=d&&!s&&!c&&"SUPER_ADMIN"!==l.role&&(null===(n=l.account)||void 0===n?void 0:null===(a=n.billing)||void 0===a?void 0:a.required)===!0,p=d&&!c&&!l.twoFactorEnabled,h=d&&!c&&!!l.mustChangePassword;return{noAuth:!i&&!l,hidden:u,needsPlan:m,needs2fa:p,needsPasswordChange:h,allowed:d&&(c||!h&&!p&&(s||!u&&!m))}}({entKey:e,user:t,entitlements:a,loading:o});return(0,n.useEffect)(()=>{s?i.replace("/login"):c?i.replace("/settings/security?changePassword=1&next=".concat(encodeURIComponent(i.asPath||"/dashboard"))):d?i.replace("/settings/security?enable2fa=1&next=".concat(encodeURIComponent(i.asPath||"/dashboard"))):u?i.replace((null==t?void 0:t.onboardingComplete)===!1?"/onboarding?step=billing":"/settings/billing?subscribe=1"):m&&i.replace("/dashboard")},[s,c,d,u,m,i,null==t?void 0:t.onboardingComplete]),p}}}]);

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.