PageSourceSearch

https://app.posetracker.com/_next/static/chunks/pages/public/demo/v3_demo-7906df080df7f3fb.js

js posetracker.com collected 2026-09-30 23:55:35 UTC 6,109 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2080],{47341:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/public/demo/v3_demo",function(){return s(50522)}])},50522:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return m}});var n=s(85893),a=s(67294),r=s(44204),l=s(41279),o=s(42070);let i=window.location.origin;function c(e){let{name:t,imageUrl:s}=e;return(0,n.jsxs)("div",{className:"w-full aspect-square flex items-center justify-center rounded-t-xl bg-[#1a1a1a] border-b border-gray-700 overflow-hidden",style:{minHeight:80},children:[s?(0,n.jsx)("img",{src:s,alt:"",className:"w-full h-full object-cover"}):(0,n.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"#6b7280",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,n.jsx)("circle",{cx:"12",cy:"6",r:"2.5"}),(0,n.jsx)("path",{d:"M8 22v-6h2l2-4 2 4h2v6"}),(0,n.jsx)("path",{d:"M6 12l-2 4h2l1-2"}),(0,n.jsx)("path",{d:"M18 12l2 4h-2l-1-2"})]}),(0,n.jsx)("span",{className:"sr-only",children:t})]})}let d=["https://app.posetracker.com","http://localhost:3000","http://127.0.0.1:3000"];function m(){let[e,t]=(0,a.useState)(null),[s,m]=(0,a.useState)(null),[u,x]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!e)return;let t=e=>{if(d.includes(e.origin))try{let t="string"==typeof e.data?JSON.parse(e.data):e.data;if(!t||"string"!=typeof t.type)return;"counter"===t.type&&(m(t.current_count),t.form_score&&x({score:t.form_score.score,avg_score:t.form_score.avg_score,grade:t.form_score.grade||"—"}))}catch(e){}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[e]);let f=(0,a.useCallback)(()=>{m(null),x(null),t(null)},[]),p=(0,a.useMemo)(()=>{let e=(0,l.R3)().filter(e=>{if("side_lunge"===e)return!1;let t=(0,l.VF)(e);return t&&"custom"!==t.type}),t=e.map(e=>({key:e,engine:"v3",...(0,l.VF)(e)})),s=new Set(e);return[...t,...(0,o.$3)().filter(e=>e&&e.id&&!s.has(e.id)&&"side_lunge"!==e.id).map(e=>
1({key:e.id,engine:"v4",name:e.display_name||e.id,type:e.type,movement_type:"duration"===e.type?"static":"dynamic"})).sort((e,t)=>String(e.name).localeCompare(String(t.name)))]},[]),h=p.find(t=>t.key===e)||null,g=(0,a.useMemo)(()=>{if(!e)return null;let t=new URLSearchParams;t.set("token","494e020b-7cc8-4aed-815b-4674d10d4f30"),t.set("exercise",e),(null==h?void 0:h.engine)==="v4"&&t.set("engine","v4"),t.set("postureBox","true"),t.set("placementBoxStrokeColor","#4DD21D"),t.set("placement","1"),t.set("placementCountdownSeconds","3"),t.set("skeleton","48604550-e9a2-444f-9a04-622444e196fc");let s=(null==h?void 0:h.engine)==="v4"?"/pose_tracker/tracking":"/pose_tracker/v3/tracking";return"".concat(i).concat(s,"?").concat(t.toString())},[e,h]),b=h||(e?(0,l.VF)(e):null),v=(null==b?void 0:b.movement_type)==="static"||(null==b?void 0:b.type)==="duration";return(0,n.jsx)("div",{className:"min-h-screen bg-[#1a1a1a] text-[#f8fafc]",children:e?(0,n.jsxs)("div",{className:"fixed inset-0 flex flex-col bg-black",children:[(0,n.jsx)("iframe",{src:g,allow:"camera *;",className:"absolute inset-0 w-full h-full border-0",title:"PoseTracker V3"}),(0,n.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[(0,n.jsx)("div",{className:"absolute top-3 left-3 sm:top-4 sm:left-4 pointer-events-auto",children:(0,n.jsx)("button",{type:"button",onClick:f,className:"flex items-center justify-center w-10 h-10 sm:w-11 sm:h-11 rounded-full bg-[#2a2a2a]/95 text-[#f8fafc] hover:bg-[#3a3a3a] border border-gray-600/80 shadow-lg transition-colors","aria-label":"Back to exercise selection",children:(0,n.jsx)(r.Z,{className:"w-5 h-5 sm:w-6 sm:h-6"})})}),(0,n.jsxs)("div",{className:"absolute bottom-4 right-4 sm:bottom-6 sm:right-6 pointer-events-auto w-24 h-24 sm:w-28 sm:h-28 rounded-xl bg-[#2a2a2a]/95 backdrop-blur-sm border border-gray-600/80 shadow-lg flex flex-col items-center justify-center p-3",children:[(0,n.jsx)("span",{className:"text-3xl sm:text-4xl font-bold text-[#f8fafc] tabular-nums leading-none",children:null!=s?s:"0"}),(0,n.jsx)("span",{className:"text-xs text-gray-400 mt-1 text-center",children:v?"sec":"rep(s)"})]}),(0,n.jsxs)("div",{className:"absolute bottom-4 left-4 sm:bottom-6 sm:left-6 pointer-events-auto min-w-[72px] sm:min-w-[80px] rounded-xl bg-[#2a2a2a]/95 backdrop-blur-sm border border-gray-600/80 shadow-lg flex flex-col items-center justify-center p-3",children:[(0,n.jsx)("span",{className:"text-[10px] sm:text-xs uppercase tracking-wider text-gray-400 mb-1",children:"Last rep"}),(0,n.jsx)("span",{className:"text-2xl sm:text-3xl font-bold tabular-nums",style:{color:(null==u?void 0:u.grade)==="A"?"#22c55e":(null==u?void 0:u.grade)==="B"?"#3b82f6":(null==u?void 0:u.grade)==="C"?"#eab308":(null==u?void 0:u.grade)==="D"?"#f97316":(null==u?void 0:u.grade)==="E"?"#ef4444":"#94a3b8"},children:(null==u?void 0:u.grade)&&"—"!==u.grade?u.grade:"—"})]})]})]}):(0,n.jsxs)("div",{className:"mx-auto px-4 py-6 max-w-2xl",children:[(0,n.jsx)("h1",{className:"text-xl font-bold text-center text-[#f8fafc] mb-2",children:"PoseTracker V3 – Demo"}),(0,n.jsx)("p",{className:"text-sm text-gray-400 text-center mb-6",children:"Choose an exercise (real-time only)"}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3",children:p.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>t(e.key),className:"flex flex-col rounded-xl overflow-hidden bg-[#2a2a2a] border border-gray-700 shadow-lg hover:border-[#3b82f6] hover:shadow-md transition-all text-left",children:[(0,n.jsx)(c,{name:e.name,imageUrl:e.imageUrl}),(0,n.jsxs)("div",{className:"p-3 flex-1 flex flex-col justify-center min-h-[52px]",children:[(0,n.jsx)("span",{className:"font-medium text-[#f8fafc] block truncate",children:e.name}),e.movement_type&&(0,n.jsx)("span",{className:"text-xs text-gray-400 capitalize",children:e.movement_type})]})]},e.key))})]})})}},44204:function(e,t,s){"use strict";s.d(t,{Z:function(){return n}});let n=(0,s(51692).Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])}},function(e){e.O(0,[7430,2070,1279,2888,9774,179],function(){return e(e.s=47341)}),_N_E=e.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.