PageSourceSearch

https://www.strengthjourneys.xyz/_next/static/immutable/chunks/1zyhmvv5vt-uk.js

js strengthjourneys.xyz collected 2026-10-04 12:25:46 UTC 87,484 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,978489,287874,288995,35547,267194,863272,973913,106008,e=>{"use strict";let t;var r=e.i(391398),n=e.i(191788),i=e.i(486533),a=e.i(890979),s=Object.prototype.hasOwnProperty;let l=new WeakMap,o=()=>{},u=o(),d=Object,f=e=>e===u,c=(e,t)=>({...e,...t}),h={},p={},m="undefined",g=typeof window!=m,w=typeof document!=m,y=g&&"Deno"in window,b=(e,t)=>{let r=l.get(e);return[()=>!f(t)&&e.get(t)||h,n=>{if(!f(t)){let i=e.get(t);t in p||(p[t]=i),r[5](t,c(i,n),i||h)}},r[6],()=>!f(t)&&t in p?p[t]:!f(t)&&e.get(t)||h]},S=!0,[T,k]=g&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],v={initFocus:e=>(w&&document.addEventListener("visibilitychange",e),T("focus",e),()=>{w&&document.removeEventListener("visibilitychange",e),k("focus",e)}),initReconnect:e=>{let t=()=>{S=!0,e()},r=()=>{S=!1};return T("online",t),T("offline",r),()=>{k("online",t),k("offline",r)}}},D=!n.default.useId,E=!g||y,I=E?n.useEffect:n.useLayoutEffect,$="u">typeof navigator&&navigator.connection,L=!E&&$&&(["slow-2g","2g"].includes($.effectiveType)||$.saveData),x=new WeakMap,N=(e,t)=>e===`[object ${t}]`,C=0,_=e=>{let t,r,n=typeof e,i=d.prototype.toString.call(e),a=N(i,"Date"),s=N(i,"RegExp"),l=N(i,"Object");if(d(e)!==e||a||s)t=a?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=x.get(e))return t;if(t=++C+"~",x.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=_(e[r])+",";x.set(e,t)}if(l){t="#";let n=d.keys(e).sort();for(;!f(r=n.pop());)f(e[r])||(t+=r+":"+_(e[r])+",");x.set(e,t)}}return t},F=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?_(e):"",t]},R=0,P=()=>++R;async function A(...e){let[t,r,n,i]=e,a=c({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=a.populateCache,o=a.rollbackOnError,d=a.optimisticData,h=a.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(p))}return p(r);async function p(r){let i,[c]=F(r);if(!c)return;let[p,m]=b(t,c),[g,w,y,S]=l.get(t),T=()=>{let e=g[c];return("function"==typeof a.revalidate?a.revalidate(p().data,r):!1!==a.revalidate)&&(delete y[c],delete S[c],e&&e[0])?e[0](2).then(()=>p().data):p().data};if(e.length<3)return T();let k=n,v=!1,D=P();w[c]=[D,0];let E=!f(d),I=p(),$=I.data,L=I._c,x=f(L)?$:L;if(E&&m({data:d="function"==typeof d?d(x,$):d,_c:x}),"function"==typeof k)try{k=k(x)}catch(e){i=e,v=!0}if(k&&"function"==typeof k.then){let e;if(k=await k.catch(e=>{i=e,v=!0}),D!==w[c][0]){if(v)throw i;return k}v&&E&&(e=i,"function"==typeof o?o(e):!1!==o)&&(s=!0,m({data:x,_c:u}))}if(s&&!v&&("function"==typeof s?m({data:s(k,x),error:u,_c:u}):m({data:k,error:u,_c:u})),w[c][1]=P(),Promise.resolve(T()).then(()=>{m({_c:u})}),v){if(h)throw i;return}return k}}let O=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},W=(e,t)=>{if(!l.has(e)){let r=c(v,t),n=Object.create(null),i=A.bind(u,e),a=o,s=Object.create(null),d=(e,t)=>{let r=s[e]||[];return s[e]=r,r.push(t),()=>{let e=r.indexOf(t);e>=0&&(r[e]=r[r.length-1],r.pop())}},f=(t,r,n)=>{e.set(t,r);let i=s[t];if(i)for(let e of i)e(r,n)},h=t=>{let r=l.get(e),[,i,a,o]=r,u=P();for(let e in r[8]++,a)delete a[e];for(let e in o)delete o[e];for(let e in i)i[e]=[u,u];let d={};for(let t of[...e.keys()]){let r=e.get(t);e.delete(t);let n=s[t];if(n)for(let e of n)e(d,r)}let f=!t||!1!==t.revalidate;for(let e in n){let t=n[e];for(let e=0;e<t.length;e++)t[e](4,{revalidate:f&&!e})}},p=()=>{if(!l.has(e)&&(l.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,f,d,h,0]),!E)){let t=r.initFocus(setTimeout.bind(u,O.bind(u,n,0))),i=r.initReconnect(setTimeout.bind(u,O.bind(u,n,1)));a=()=>{t&&t(),i&&i(),l.delete(e)}}};return p(),[e,i,p,a,h]}let r=l.get(e);return[e,r[4],u,u,r[7]]},[B,M,,,j]=W(new Map),q=c({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,r,n,i)=>{let a=r.errorRetryCount,s=i.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*r.errorRetryInterval;(f(a)||!(s>a))&&setTimeout(n,l,i)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:L?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:L?5e3:3e3,compare:function e(t,r){var n,i;if(t===r)return!0;
1if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&e(t[i],r[i]););return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(s.call(t,n)&&++i&&!s.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r},isPaused:()=>!1,cache:B,mutate:M,unload:j,fallback:{}},{isOnline:()=>S,isVisible:()=>{let e=w&&document.visibilityState;return f(e)||"hidden"!==e}}),U=(e,t)=>{let r=c(e,t);if(t){let{use:n,fallback:i,cacheData:a}=e,{use:s,fallback:l,cacheData:o}=t;n&&s&&(r.use=n.concat(s)),i&&l&&(r.fallback=c(i,l)),a&&o&&(r.cacheData=c(a,o))}return r},V=(0,n.createContext)({}),z=g&&window.__SWR_DEVTOOLS_USE__,G=(z?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=F(t),[,,,i]=l.get(B);if(n.startsWith("$inf$"))return r(...e);let a=i[n];return f(a)?r(...e):(delete i[n],a)});return e(t,i,n)});z&&(window.__SWR_DEVTOOLS_REACT__=n.default);let H=n.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),K={dedupe:!0},Y=(e,t,r)=>{var n;return!!t&&(null==(n=e.get(t))?void 0:n.has(r))===!0},J=(e,t,r)=>{if(!t)return;let n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)},Z=Promise.resolve(u);Z.status="fulfilled",Z.value=u;let X=()=>o;d.defineProperty(e=>{let{value:t}=e,r=(0,n.useContext)(V),i="function"==typeof t,a=(0,n.useMemo)(()=>i?t(r):t,[i,r,t]),s=(0,n.useMemo)(()=>i?a:U(r,a),[i,r,a]),l=a&&a.provider,o=(0,n.useRef)(u);l&&!o.current&&(o.current=W(l(s.cache||B),a));let d=o.current;return d&&(s.cache=d[0],s.mutate=d[1],s.unload=d[4]),I(()=>{if(d)return d[2]&&d[2](),d[3]},[]),(0,n.createElement)(V.Provider,c(e,{value:s}))},"defaultValue",{value:q});let Q=(t=(e,t,r)=>{let{cache:i,compare:s,suspense:o,fallbackData:d,revalidateOnMount:h,revalidateIfStale:p,refreshInterval:w,refreshWhenHidden:y,refreshWhenOffline:S,keepPreviousData:T,strictServerPrefetchWarning:k}=r,[v,$,L,x]=l.get(i),[N,C]=F(e),_=(0,n.useRef)(!1),R=(0,n.useRef)(!1),O=(0,n.useRef)(N),W=(0,n.useRef)(t),B=(0,n.useRef)(r),M=()=>B.current.isVisible()&&B.current.isOnline(),[j,q,U,V]=b(i,N),z=(0,n.useRef)({}).current,G=f(d)?f(r.fallback)?u:r.fallback[N]:d,Q=r.cacheData,ee=N?null==Q?void 0:Q[N]:u,et=N?x[N]:u,er=f(et)&&!f(ee),en=er?ee:et,ei=(e,t)=>{for(let r in z)if("data"===r){if(!s(e[r],t[r])&&(!f(e[r])||!s(eg,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},ea=!_.current,es=(0,n.useMemo)(()=>{let e=j(),r=V(),n=e=>{let r=c(e);return(delete r._k,(()=>{if(!N||!t||B.current.isPaused())return!1;if(ea&&!f(h))return h;let e=f(G)?r.data:G;return!(o&&er&&f(e))&&(f(e)||p)})())?{isValidating:!0,isLoading:!0,...r}:r},i=n(e),a=e===r?i:n(r),s=i;return[()=>{let e=n(j());return ei(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[i,N]),el=(0,a.useSyncExternalStore)((0,n.useCallback)(e=>U(N,(t,r)=>{ei(r,t)||e()}),[i,N]),es[0],es[1]),eo=v[N]&&v[N].length>0,eu=el.data,ed=f(eu)?G&&"function"==typeof G.then?H(G):G:eu,ef=el.error,ec=(0,n.useRef)(ed),eh=(0,n.useRef)(u),ep=eh.current;ep||(eh.current=ep=new WeakMap);let em=(0,n.useRef)(null),eg=T?f(eu)?f(ec.current)?ed:ec.current:eu:ed,ew=N&&f(ed),ey=(0,n.useRef)(null);E||(0,a.useSyncExternalStore)(X,()=>(ey.current=!1,ey),()=>(ey.current=!0,ey));let eb=ey.current;k&&eb&&!o&&ew&&console.warn(`Missing pre-initiated data for serialized key "${N}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let eS=!(!N||!t||B.current.isPaused())&&(!eo||!!f(ef))&&(ea&&!f(h)?h:(!o||!er||!ew)&&(o?!f(ed)&&p:f(ed)||p)),eT=ea&&eS,ek=f(el.isValidating)?eT:el.isValidating,ev=f(el.isLoading)?eT:el.isLoading,eD=(0,n.useCallback)(async e=>{let t,n,i=W.current;if(!N||!i||R.current||B.current.isPaused())return!1;let a=!0,l=e||{}
1,o=!L[N]||!l.dedupe,d=er&&!Y(ep,Q,N)&&!f(en)&&f(j().data),c=()=>D?!R.current&&N===O.current&&_.current:N===O.current,h={isValidating:!1,isLoading:!1},p=()=>{q(h)},m=()=>{let e=L[N];e&&e[1]===n&&delete L[N]},g={isValidating:!0};f(j().data)&&(g.isLoading=!0);try{if(o&&(q(g),r.loadingTimeout&&f(j().data)&&setTimeout(()=>{a&&c()&&B.current.onLoadingSlow(N,r)},r.loadingTimeout),d&&J(ep,Q,N),L[N]=[d?en:i(C),P()],d&&x[N]&&delete x[N]),[t,n]=L[N],t=await t,o&&setTimeout(m,r.dedupingInterval),!L[N]||L[N][1]!==n)return o&&c()&&B.current.onDiscarded(N),!1;h.error=u;let e=$[N];if(!f(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return p(),o&&c()&&B.current.onDiscarded(N),!1;let l=j().data;h.data=s(l,t)?l:t,o&&c()&&B.current.onSuccess(t,N,r)}catch(r){m();let e=B.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(h.error=r,o&&c())&&(e.onError(r,N,e),(!0===t||"function"==typeof t&&t(r))&&(!B.current.revalidateOnFocus||!B.current.revalidateOnReconnect||M())&&e.onErrorRetry(r,N,e,e=>{let t=v[N];t&&t[0]&&t[0](3,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0}))}return a=!1,p(),!0},[N,i]),eE=(0,n.useCallback)((...e)=>A(i,O.current,...e),[]);if(I(()=>{let e=em.current;e&&(em.current=null,J(ep,e.cacheData,e.key),f(j().data)&&q({data:e.data,error:u,_k:e._k}),x[e.key]&&delete x[e.key])}),I(()=>{W.current=t,B.current=r,f(eu)||(ec.current=eu)}),I(()=>{if(t||!er||f(en)||Y(ep,Q,N)||!f(j().data))return;J(ep,Q,N);let e=$[N];
1(({value:e,getCacheData:t,canCommit:r,setCache:n})=>{let i=e=>{r()&&f(t())&&n(e)};Promise.resolve(e).then(e=>{i({data:e,error:u})},e=>{i({error:e})})})({value:en,getCacheData:()=>j().data,canCommit:()=>!R.current&&N===O.current&&$[N]===e,setCache:e=>q({...e,_k:C})})}),I(()=>{var e;let t;if(!N)return;let r=eD.bind(u,K),n=0;B.current.revalidateOnFocus&&(n=Date.now()+B.current.focusThrottleInterval);let i=(e=(e,t={})=>{if(0==e){let e=Date.now();B.current.revalidateOnFocus&&e>n&&M()&&(n=e+B.current.focusThrottleInterval,r())}else if(1==e)B.current.revalidateOnReconnect&&M()&&r();else if(2==e)return eD();else if(3==e)return eD(t);else if(4==e&&(ec.current=u,t.revalidate))return eD()},(t=v[N]||(v[N]=[])).push(e),()=>{let r=t.indexOf(e);r>=0&&(t[r]=t[t.length-1],t.pop())});if(R.current=!1,O.current=N,_.current=!0,q({_k:C}),eS&&!L[N])if(f(ed)||E)r();else g&&typeof window.requestAnimationFrame!=m?window.requestAnimationFrame(r):setTimeout(r,1);return()=>{R.current=!0,i()}},[N]),I(()=>{let e;function t(){let t="function"==typeof w?w(j().data):w;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!j().error&&(y||B.current.isVisible())&&(S||B.current.isOnline())?eD(K).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[w,y,S,N]),(0,n.useDebugValue)(eg),o){if(!D&&E&&ew&&f(en))throw Error("Fallback data is required when using Suspense in SSR.");ew&&(W.current=t,B.current=r,R.current=!1);let e=!f(en)&&ew,n=u;if(e&&er?(ed=n=en&&"function"==typeof en.then?H(en):en,eg=n,E||(em.current={data:n,_k:C,key:N,cacheData:Q})):H(e?eE(en):Z),!f(ef)&&ew)throw ef;let i=ew&&f(n)?eD(K):Z;!f(eg)&&ew&&(i.status="fulfilled",i.value=!0),H(i)}return{mutate:eE,get data(){return z.data=!0,eg},get error(){return z.error=!0,ef},get isValidating(){return z.isValidating=!0,ek},get isLoading(){return z.isLoading=!0,ev}}},function(...e){let r,i=(r=(0,n.useContext)(V),(0,n.useMemo)(()=>c(q,r),[r])),[a,s,l]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],o=U(i,l),u=t,{use:d}=o,f=(d||[]).concat(G);for(let e=f.length;e--;)u=f[e](u);return u(a,s||o.fetcher||null,o)});e.s(["default",0,Q],287874);var ee=e.i(591540),et=e.i(206761);function er(e){return new Date(e+"T00:00:00Z")}function en(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`}function ei(e){let t=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0");return`${t}-${r}-${n}`}let ea=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],es=["January","February","March","April","May","June","July","August","September","October","November","December"],el=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function eo(e,t=!1,{todayYmd:r}={}){if(r){let t=eu(e,r);if(0===t)return"Today";if(1===t)return"Yesterday"}let n=er(e),i=ea[n.getUTCDay()],a=n.getUTCDate(),s=el[n.getUTCMonth()],l=n.getUTCFullYear(),o=t?`${i}, ${s} ${a}`:`${s} ${a}`;return l!==new Date().getFullYear()&&(o+=`, ${l}`),o}function eu(e,t){return Math.round((er(t).getTime()-er(e).getTime())/864e5)}function ed(e,t){let r,n,i,a=function(e){if(!e)return null;let t=e.trim().split("-");if(3!==t.length)return null;let r=t[0];if(4!==r.length)return null;let n=t[1].padStart(2,"0"),i=t[2].padStart(2,"0");return n<"01"||n>"12"||i<"01"||i>"31"?null:`${r}-${n}-${i}`}(e);if(a)return a;if(!e)return null;let s=String(e).trim().match(/^(\d{1,4})[/. -](\d{1,2})[/. -](\d{1,4})$/);if(!s)return null;let[,l,o,u]=s;if(4===l.length)r=Number.parseInt(l,10),n=Number.parseInt(o,10),i=Number.parseInt(u,10);else{if(4!==u.length)return null;r=Number.parseInt(u,10);let e=Number.parseInt(l,10),a=Number.parseInt(o,10);e>12?(i=e,n=a):a>12||["US"].includes(function(e){if(!e||"string"!=typeof e)return null;let t=e.trim().replace(/_/g,"-").split("-");return t.length<2?null:t[1]?.toUpperCase?.()||null}(t))?(n=e,i=a):(i=e,n=a)}return!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(i)||n<1||n>12||i<1||i>ew(r,n)?null:`${r}-${String(n).padStart(2,"0")}-${String(i).padStart(2,"0")}`}function ef(e){let t=er(e),r=t.getUTCDay();t.setUTCDate(t.getUTCDate()-(r+6)%7);let n=t.getUTCFullYear(),i=String(t.getUTCMonth()+1).padStart(2,"0"),a=String(t.getUTCDate()).padStart(2,"0");return`${n}-${i}-${a}`}let ec=new Map,eh=new Map,ep=new Map;function em(e){let t=ec.get(e);if(void 0!==t)return t;let r=Math.floor(er(e).getTime()/864e5);return ec.set(e,r),r}function eg(e){let t=eh.get(e);if(t)return t;let r=ef(`${e}-01-01`);return eh.set(e,r),r}function ew(e,t){return 2===t?e%4==0&&e%100!=0||e%400==0?29:28:[4,6,9,11].includes(t)?30:31}function ey(e,t){let r=parseInt(e.slice(0,4),10),n=parseInt(e.slice(5,7),10),i=parseInt(e.slice(8,10),10);for(let e=0;e<t;e++)--i<1&&(--n<1&&(n=12,r--),i=ew(r,n));return`${r}-${String(n).padStart(2,"0")}-${String(i).padStart(2,"0")}`}function eb(e,t){let r=parseInt(e.slice(0,4),10),n=parseInt(e.slice(5,7),10),i=parseInt(e.slice(8,10),10);for(let e=0;e<t;e++){let e=ew(r,n);++i>e&&(i=1,++n>12&&(n=1,r++))}return`${r}-${String(n).padStart(2,"0")}-${String(i).padStart(2,"0")}`}e.s(["addDaysFromStr",0,eb,"daysInMonth",0,ew,"formatDateToYmdLocal",0,en,"formatDateToYmdUtc",0,ei,"getCalendarYearWeekIndexFromWeekKey",0,function(e,t){return Math.floor((em(t)-function(e){let t=ep.get(e);if(void 0!==t)return t;let r=em(eg(e));return ep.set(e,r),r}(e))/7)+1},"getCalendarYearWeekStartFromIndex",0,function(e,t){return eb(eg(e),
1(t-1)*7)},"getCompactAgeFromYmd",0,function(e,t){if(!e||!t)return null;let r=Math.round((er(t).getTime()-er(e).getTime())/864e5);return Number.isFinite(r)?r<=0?"today":r<7?`${r}d`:r<60?`${Math.round(r/7)}w`:r<365?`${Math.round(r/30)}mo`:`${Math.floor(r/365)}y`:null},"getDaysBetweenYmd",0,eu,"getLocalYmdDaysAgo",0,function(e=0){return ey(en(new Date),e)},"getLongReadableDateString",0,function(e,t=!0){if(!/^\d{4}-\d{2}-\d{2}$/.test(String(e||"")))return null;let r=er(e);if(Number.isNaN(r.getTime()))return null;let n=r.getUTCDate(),i=es[r.getUTCMonth()],a=r.getUTCFullYear(),s=a===new Date().getFullYear()?`${n} ${i}`:`${n} ${i} ${a}`;return t?`${ea[r.getUTCDay()]}, ${s}`:s},"getReadableDateString",0,eo,"getWeekKeyFromDateStr",0,ef,"normalizeDateInput",0,ed,"parseYmdLocal",0,function(e){let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)},"parseYmdUtc",0,er,"subtractDaysFromStr",0,ey],288995);var eS=e.i(506617);function eT(e){let t=performance.now(),r=e[0],n=null,i=null,a=null,s="u">typeof navigator&&"string"==typeof navigator.language?navigator.language:void 0,l=r.map(eS.normalizeColumnName),o=(0,eS.createParseRepairLog)("Strength Journeys"),u=l.indexOf("Date"),d=l.indexOf("Lift Type"),f=l.indexOf("Reps"),c=l.indexOf("Weight"),h=l.indexOf("Notes"),p=l.indexOf("Label"),m=l.indexOf("URL");if(-1===u||-1===d||-1===f||-1===c){let e=[];throw -1===u&&e.push("Date"),-1===d&&e.push("Lift Type"),-1===f&&e.push("Reps"),-1===c&&e.push("Weight"),Error(`Missing required columns: ${e.join(", ")}. Please ensure your Google Sheet first row includes missing column headers. Click the feedback button below if you need help!`)}let g=[];for(let t=1;t<e.length;t++){let r=e[t];if(""===r[f]||""===r[c])continue;let l={};if(r[u]){let e=ed(r[u],s);if(e)l.date=e,n=e;else{console.warn(`Strength Journeys (parser): Invalid date encountered at row ${t+1}: '${r[u]}'. Row skipped.`),n=null;continue}}else{if(!n)continue;l.date=n}if(r[d]?(l.rawLiftType=r[d],l.liftType=(0,eS.normalizeLiftTypeNames)(r[d]),i=l.liftType,a=l.rawLiftType):(l.liftType=i,l.rawLiftType=a),(0,eS.isDistanceOrTimeText)(r[f])){o.add("reps are a distance or time, row skipped",t+1,r[f]);continue}l.reps=(0,eS.convertStringToInt)(r[f]),r[c]&&(l.rawWeight=r[c]);let{value:w,unitType:y,_explicitUnit:b,repairs:S,skip:T}=(0,eS.convertWeightAndUnitType)(r[c]);if(T){o.add(`${T}, row skipped`,t+1,r[c]);continue}if(S)for(let e of S)o.add(e,t+1,r[c],`${w}${b?y:""}`);l.weight=w,l.unitType=y,null!==b&&(l._explicitUnit=b),void 0!==l.reps&&void 0!==l.weight&&(r[h]&&(l.notes=r[h]),r[p]&&(l.label=r[p]),r[m]&&(l.URL=r[m]),l.rowIndex=t+1,g.push(l))}let w=0,y=0,b=[];if(g.forEach(e=>{e._explicitUnit?"kg"===e.unitType?w++:y++:b.push(e),delete e._explicitUnit}),w>y)for(let e of b)e.unitType="kg",o.add("no unit, read as kg like most of the sheet",e.rowIndex,e.rawWeight);return o.flush(),g.sort((e,t)=>e.date||t.date?e.date?t.date?e.date.localeCompare(t.date):-1:1:0),(0,et.recordTiming)("Parse",performance.now()-t,`${g.length} lifts`),g}let ek=["Workout","workout","Name","name","Title","title"],ev=new Set(["Every","FT","RFT","RFQ","AMRAP","Chipper","Complex","Lifting","RemRep","EMOM","Tabata"]),eD={"overhead presses":"Strict Press","strict presses":"Strict Press"};function eE(e){if(!e)return e;let t=e.split(" "),r=t[t.length-1];return r.length<=2?e:(/resses$/i.test(r)?r=r.replace(/es$/i,""):/lies$/i.test(r)||/ries$/i.test(r)?r=r.replace(/ies$/i,"y"):/[csxz]hes$/i.test(r)?r=r.replace(/es$/i,""):/[csxz]es$/i.test(r)?r=r.replace(/s$/i,""):/s$/i.test(r)&&!/ss$/i.test(r)&&(r=r.replace(/s$/i,"")),t[t.length-1]=r,t.join(" "))}function eI(e){if(!e)return null;let t=String(e).replace(/^\d+\s+/,"").replace(/\s+/g," ").trim();if(!t)return null;let r=eD[t.toLowerCase()];if(r)return(0,eS.normalizeLiftTypeNames)(r);let n=eE(t);return(0,eS.normalizeLiftTypeNames)(n)}let e$=/\(Hevy:\s*(.*)\s*·\s*set\s+(\d+)\)/i,eL=/^([01]\d|2[0-3]):[0-5]\d(?:\s|$)/;function ex(e,t){let r=String(e||"External").trim()||"External",n=function(e=new Date){if("string"==typeof e&&/^\d{4}-\d{2}-\d{2}$/.test(e))return e;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:[t.getFullYear(),String(t.getMonth()+1).padStart(2,"0"),Str
1ing(t.getDate()).padStart(2,"0")].join("-")}(t);return n?`(${r} import ${n})`:`(${r} import)`}function eN(e,t){let r=String(e||"Workout").replace(/\s+/g," ").trim(),n=Number(t);return!Number.isInteger(n)||n<0?`(Hevy: ${r})`:`(Hevy: ${r} \xb7 set ${n+1})`}function eC(e){return String(e||"").replace(/^/,"").trim().toLowerCase()}function e_(e,...t){return e.map(eC).findIndex(e=>t.includes(e))}function eF(e){let t=(0,eS.normalizeDecimalComma)(e);if(!t)return null;let r=Number(t);return Number.isFinite(r)?r:null}function eR(e,t,r){if(!e||!t||!r)return!1;let n=new Date(Date.UTC(e,t-1,r));return n.getUTCFullYear()===e&&n.getUTCMonth()===t-1&&n.getUTCDate()===r}function eP(e,t){e[t]=(e[t]||0)+1}function eA(e){return String(e||"").replace(/^/,"").trim().toLowerCase()}function eO(e,...t){return e.map(eA).findIndex(e=>t.includes(e))}function eW(e,t){e[t]=(e[t]||0)+1}e.s(["buildHevySetProvenance",0,eN,"buildVisibleImportProvenance",0,ex,"getImportedSourceIdentity",0,function(e){if(!e||"string"!=typeof e.notes)return null;let t=e.notes.match(eL),r=e.notes.match(e$);if(!t||!r)return null;let n=String(e.date||"").trim(),i=String(e.liftType||"").trim(),a=r[1].replace(/\s+/g," ").trim(),s=r[2];return n&&i&&a&&s?["hevy",n,t[0].trim(),a,i,s].join("|"):null}],35547);let eB={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};function eM(e){return String(e||"").replace(/^\uFEFF/,"").trim().toLowerCase()}function ej(e,...t){return e.map(eM).findIndex(e=>t.includes(e))}function eq(e){let t=(0,eS.normalizeDecimalComma)(e);if(!t)return null;let r=Number(t);return Number.isFinite(r)?r:null}function eU(e){let t=String(e??"").trim();if(!/^\d+$/.test(t))return null;let r=Number(t);return Number.isSafeInteger(r)?r:null}function eV(e,t,r){if(!e||!t||!r)return!1;let n=new Date(Date.UTC(e,t-1,r));return n.getUTCFullYear()===e&&n.getUTCMonth()===t-1&&n.getUTCDate()===r}function ez(e,t){e[t]=(e[t]||0)+1}function eG(e,t){for(let r of t){let t=e.indexOf(r);if(t>=0)return t}return -1}function eH(e){let t=Number.parseFloat((0,eS.normalizeDecimalComma)(e));return Number.isFinite(t)?t:null}function eK(e){let t=Number.parseFloat((0,eS.normalizeDecimalComma)(e));return Number.isFinite(t)?t:null}function eY(e){let t=Number.parseInt(String(e||"").trim(),10);return Number.isFinite(t)?t:null}function eJ(e,t=!1){let r,n,i=String(e||"").trim();if(!i)return null;let a=i.match(/^(\d{1,4})[/-](\d{1,2})[/-](\d{1,4})$/);if(!a)return null;let s=4===a[1].length,l=Number.parseInt(s?a[1]:a[3],10);return(s?(r=Number.parseInt(a[2],10),n=Number.parseInt(a[3],10)):t?(n=Number.parseInt(a[1],10),r=Number.parseInt(a[2],10)):(r=Number.parseInt(a[1],10),n=Number.parseInt(a[2],10)),!r||!n||!l||r<1||r>12||n<1||n>31)?null:(l<100&&(l+=l<71?2e3:1900),`${l}-${String(r).padStart(2,"0")}-${String(n).padStart(2,"0")}`)}function eZ(e,t){if(t<0)return!1;let r=!1,n=!1;for(let i=1;i<e.length;i++){let a=String(e[i]?.[t]||"").trim().match(/^(\d{1,4})[/-](\d{1,2})[/-](\d{1,4})$/);a&&4!==a[1].length&&(Number.parseInt(a[1],10)>12&&(r=!0),Number.parseInt(a[2],10)>12&&(n=!0))}return r&&!n}function eX(e){return String(e||"").replace(/^\uFEFF/,"").trim().toLowerCase()}function eQ(e,t){let r=new Set(t.map(eX));return e.findIndex(e=>r.has(eX(e)))}function e5(e){let t=String(e||"").replace(/\s+/g," ").trim();return t?(0,eS.normalizeLiftTypeNames)(t):null}function e0(e){let t=new Map;return e.forEach((e,r)=>{let n=eX(e).match(/^set\s+(\d+)\s*(?:\(([^)]+)\)|(.*))$/);if(!n)return;let i=Number.parseInt(n[1],10),a=`${n[2]||""} ${n[3]||""}`.trim(),s=t.get(i)||{repsIndex:-1,weightKgIndex:-1,weightLbIndex:-1};/\breps?\b/.test(a)?s.repsIndex=r:/\bkg\b|kilograms?/.test(a)?s.weightKgIndex=r:/\blbs?\b|pounds?/.test(a)&&(s.weightLbIndex=r),t.set(i,s)}),[...t.entries()].sort(([e],[t])=>e-t).map(([,e])=>e).filter(e=>e.repsIndex>=0&&(e.weightKgIndex>=0||e.weightLbIndex>=0))}function e1(e,t){for(let r of t){let t=e.indexOf(r);if(t>=0)return t}return -1}function e2(e){let t=Number.parseInt(String(e||"").trim(),10);return Number.isFinite(t)?t:null}function e3(e){let t=Number.parseFloat((0,eS.normalizeDecimalComma)(e));return Number.isFinite(t)?t:null}function e4(e){let t=String(e||"").trim().toLowerCase();return t?t.startsWith("kg")?"kg":t.startsWith("lb")?"lb":null:null}function e9(...e){let t=[];
1return e.forEach(e=>{let r=String(e||"").trim();r&&(t.includes(r)||t.push(r))}),t.length>0?t.join(" | "):void 0}function e7(e){return null==e?"":"string"==typeof e?e:"boolean"==typeof e?e?"TRUE":"FALSE":String(e)}async function e8(t){let[{read:r,utils:n},i]=await Promise.all([e.A(793073),t.arrayBuffer()]),a=(function(e,t){for(let r of e.SheetNames){let n=e.Sheets[r];if(!n)continue;let i=t.utils.sheet_to_json(n,{header:1,raw:!1,defval:"",blankrows:!1});if(i.some(e=>Array.isArray(e)&&e.some(e=>""!==e)))return i}return[]})(r(i,{type:"array",cellDates:!1,cellText:!0}),{utils:n}).map(e=>e.map(e7));for(;a.length>0&&a[a.length-1].every(e=>""===e);)a.pop();return a}function e6(e){return eT(e)}let te=[{id:"hevy",name:"Hevy",detect:e=>{let t=e.map(e=>String(e||"").replace(/^\uFEFF/,"").trim().toLowerCase());return t.includes("start_time")&&t.includes("exercise_title")&&(t.includes("weight_kg")||t.includes("weight_lbs")||t.includes("weight_lb"))&&t.includes("reps")},parse:function(e,{importedAt:t=new Date}={}){let r=performance.now(),n=e[0]||[],i=ej(n,"start_time"),a=ej(n,"exercise_title"),s=ej(n,"weight_kg"),l=ej(n,"weight_lbs","weight_lb"),o=s>=0?s:l,u=s>=0?"kg":"lb",d=ej(n,"reps"),f=ej(n,"title"),c=ej(n,"description"),h=ej(n,"exercise_notes"),p=ej(n,"set_index"),m=ej(n,"set_type"),g=ej(n,"rpe"),w=ej(n,"distance_km","distance_miles","distance_meters"),y=ej(n,"duration_seconds"),b=[],S={},T=new Set,k=new Set,v=0;for(let r=1;r<e.length;r++){let n=e[r];if(!n||0===n.length||n.every(e=>""===e))continue;v++;let s=n[i],l=function(e){let t=String(e||"").trim();if(!t)return null;let r=t.match(/^(\d{1,2})\s+([A-Za-z]{3})\s+(\d{2,4}),(?:\s+\d{1,2}:\d{2}(?::\d{2})?)?$/);if(r){let e=Number.parseInt(r[1],10),t=eB[r[2].toLowerCase()],n=Number.parseInt(r[3],10);return(n<100&&(n+=n<71?2e3:1900),eV(n,t,e))?`${n}-${String(t).padStart(2,"0")}-${String(e).padStart(2,"0")}`:null}let n=t.match(/^(\d{4})-(\d{2})-(\d{2})/);return n?eV(Number(n[1]),Number(n[2]),Number(n[3]))?`${n[1]}-${n[2]}-${n[3]}`:null:null}(s),D=function(e){let t=String(e||"").trim(),r=t.match(/,\s*(\d{1,2}):(\d{2})(?::\d{2})?$/),n=t.match(/[T\s](\d{2}):(\d{2})(?::\d{2})?/),i=r||n;if(!i)return null;let a=Number(i[1]),s=Number(i[2]);return a>23||s>59?null:`${String(a).padStart(2,"0")}:${String(s).padStart(2,"0")}`}(s),E=function(e){let t=String(e||"").replace(/\s+/g," ").trim();return t?(0,eS.normalizeLiftTypeNames)(t):null}(n[a]),I=eU(n[d]),$=eq(n[o]),L=null==$&&(0,eS.isBodyweightLoadLiftName)(E)?0:$;if(!l){ez(S,"invalidDate");continue}if(!E){ez(S,"missingExercise");continue}if(!I||I<=0){ez(S,null!=eq(n[y])||null!=eq(n[w])?"unsupportedDurationOrDistance":"missingReps");continue}if(!(0,eS.isValidLiftWeight)(E,L)){ez(S,null==$?"missingWeight":"invalidWeight");continue}let x=String(n[f]||"Workout").trim(),N=`${String(s||"").trim()}|${x}`,C=k.has(N)?null:ex("Hevy",t);k.add(N),T.add(N),b.push({date:l,liftType:E,rawLiftType:String(n[a]||"").trim()||void 0,reps:I,weight:L,unitType:u,notes:function({time:e,exerciseNotes:t,workoutDescription:r,setType:n,rpe:i,workoutTitle:a,setIndex:s,importProvenance:l}){let o=function(...e){let t=[];return e.forEach(e=>{let r=String(e||"").trim();r&&(t.includes(r)||t.push(r))}),t.length>0?t.join(" | "):void 0}(t,r,n&&"normal"!==n.toLowerCase()?`Set type: ${n}`:null,""!==i&&null!=i?`RPE ${i}`:null,eN(a,s),l);return e?o?`${e} ${o}`:e:o}({time:D,exerciseNotes:n[h],workoutDescription:n[c],setType:String(n[m]||"").trim(),rpe:n[g],workoutTitle:x,setIndex:eU(n[p]),importProvenance:C})})}return b.sort((e,t)=>e.date.localeCompare(t.date)),(0,et.recordTiming)("Parse Hevy",performance.now()-r,`${b.length} lifts`),Object.defineProperty(b,"importDiagnostics",{value:{sourceRows:v,parsedRows:b.length,skippedRows:v-b.length,skippedByReason:S,workoutCount:T.size,unitType:u},enumerable:!1}),b}},{id:"fitbod",name:"Fitbod",detect:function(e){let t=e.map(eC);return t.includes("date")&&t.includes("exercise")&&t.includes("reps")&&t.some(e=>e.startsWith("weight(kg"))&&t.includes("iswarmup")},parse:function(e,{importedAt:t=new Date}={}){let r=performance.now(),n=e[0]||[],i=e_(n,"date"),a=e_(n,"exercise"),s=e_(n,"reps"),l=n.findIndex(e=>eC(e).startsWith("weight(kg")),o=e_(n,"duration(s)"),u=e_(n,"distance(m)"),d=e_(n,"iswarmup"),f=e_(n,"note"),c=[],h={},p=new Set,m=new Set,g=0;for(let r=1;r<e.length;r++){let n=e[r];
1if(!n||0===n.length||n.every(e=>""===e))continue;g++;let w=n[i],y=function(e){let t=String(e||"").trim();if(!t)return null;let r=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(r)return eR(Number(r[1]),Number(r[2]),Number(r[3]))?`${r[1]}-${r[2]}-${r[3]}`:null;let n=t.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})/);if(n){let e=Number(n[1]),t=Number(n[2]),r=Number(n[3]);return eR(r,e,t)?`${r}-${String(e).padStart(2,"0")}-${String(t).padStart(2,"0")}`:null}return null}(w),b=function(e){let t=String(e||"").trim().match(/[T\s](\d{1,2}):(\d{2})(?::\d{2})?/);if(!t)return null;let r=Number(t[1]),n=Number(t[2]);return r>23||n>59?null:`${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`}(w),S=function(e){let t=String(e||"").replace(/\s+/g," ").trim();return t?(0,eS.normalizeLiftTypeNames)(t):null}(n[a]),T=function(e){let t=String(e??"").trim();if(!/^\d+$/.test(t))return null;let r=Number(t);return Number.isSafeInteger(r)?r:null}(n[s]),k=eF(n[l]),v=null==k&&(0,eS.isBodyweightLoadLiftName)(S)?0:k;if(!y){eP(h,"invalidDate");continue}if(!S){eP(h,"missingExercise");continue}if(!T||T<=0){eP(h,null!=eF(n[o])||null!=eF(n[u])?"unsupportedDurationOrDistance":"missingReps");continue}if(!(0,eS.isValidLiftWeight)(S,v)){eP(h,null==k?"missingWeight":"invalidWeight");continue}let D=m.has(y)?null:ex("Fitbod",t);m.add(y),p.add(y);let E=function(e){let t=String(e??"").trim().toLowerCase();return"true"===t||"1"===t||"yes"===t}(n[d]);c.push({date:y,liftType:S,rawLiftType:String(n[a]||"").trim()||void 0,reps:T,weight:"number"==typeof v?Math.round(100*v)/100:v,unitType:"kg",notes:function(...e){let t=[];return e.forEach(e=>{let r=String(e||"").trim();r&&(t.includes(r)||t.push(r))}),t.length>0?t.join(" | "):void 0}(b,E?"Warmup":null,n[f],D)})}return c.sort((e,t)=>e.date.localeCompare(t.date)),(0,et.recordTiming)("Parse Fitbod",performance.now()-r,`${c.length} lifts`),Object.defineProperty(c,"importDiagnostics",{value:{sourceRows:g,parsedRows:c.length,skippedRows:g-c.length,skippedByReason:h,workoutCount:p.size,unitType:"kg"},enumerable:!1}),c}},{id:"stronglifts",name:"StrongLifts",detect:function(e){let t=e.map(eX),r=t.includes("date")&&t.some(e=>"body weight"===e||"body weight (kg)"===e||"body weight (lb)"===e)&&t.some(e=>/^exercise\s+\d+$/.test(e))&&t.some(e=>/^set\s+\d+$/.test(e)),n=t.some(e=>"date"===e||e.startsWith("date ("))&&t.includes("exercise")&&e0(e).length>0;return r||n},parse:function(e){let t=performance.now(),r=e[0]||[],n=eQ(r,["Exercise"])>=0&&e0(r).length>0?function(e,t){let r=t.findIndex(e=>{let t=eX(e);return"date"===t||t.startsWith("date (")}),n=eQ(t,["Exercise"]),i=eQ(t,["Note","Notes"]),a=e0(t),s=eZ(e,r),l=[];for(let t=1;t<e.length;t++){let o=e[t];if(!o||0===o.length)continue;let u=eJ(o[r],s),d=String(o[n]||"").trim(),f=e5(d);if(!u||!f)continue;let c=i>=0&&String(o[i]||"").trim()||void 0;for(let e of a){let t=eY(o[e.repsIndex]),r=e.weightKgIndex>=0?eK(o[e.weightKgIndex]):null,n=e.weightLbIndex>=0?eK(o[e.weightLbIndex]):null,i=null,a=null;(0,eS.isValidLiftWeight)(f,r)?(i=r,a="kg"):(0,eS.isValidLiftWeight)(f,n)&&(i=n,a="lb"),t&&!(t<=0)&&(0,eS.isValidLiftWeight)(f,i)&&l.push({date:u,liftType:f,rawLiftType:d,reps:t,weight:i,unitType:a,notes:c})}}return l}(e,r):function(e,t){let r,n=eQ(t,["Date"]),i=eQ(t,["Note","Notes"]),a=(r=[],t.forEach((e,n)=>{if(!/^Exercise\s+\d+$/i.test(String(e||"").trim()))return;let i={exerciseIndex:n,weightKgIndex:-1,weightLbIndex:-1,setIndices:[]};for(let e=n+1;e<t.length;e++){let r=String(t[e]||"").trim();if(/^Exercise\s+\d+$/i.test(r))break;let n=r.toLowerCase();n.startsWith("weight")&&n.includes("kg")?i.weightKgIndex=e:n.startsWith("weight")&&n.includes("lb")?i.weightLbIndex=e:/^set\s+\d+$/i.test(r)&&i.setIndices.push(e)}i.setIndices.length>0&&r.push(i)}),r),s=eZ(e,n),l=[];for(let t=1;t<e.length;t++){let r=e[t];if(!r||0===r.length)continue;let o=eJ(r[n],s);if(!o)continue;let u=i>=0&&String(r[i]||"").trim()||void 0;for(let e of a){let t=String(r[e.exerciseIndex]||"").trim();if(!t)continue;let n=e5(t);if(!n)continue;let i=e.weightKgIndex>=0?eK(r[e.weightKgIndex]):null,a=e.weightLbIndex>=0?eK(r[e.weightLbIndex]):null,s=null,d=null;if((0,eS.isValidLiftWeight)(n,i)?(s=i,d="kg"):(0,eS.isValidLiftWeight)(n,a)&&(s=a,d="lb"),(0,eS.isValidLiftWeight)(n,s))for(let i of e.setIndices){let e=eY(r[i]);e&&!(e<=0)&&l.push({date:o,liftType:n,rawLiftType:t,reps:e,weight:s,unitType:d,notes:u})}}}return l}(e,r);return n.sort((e,t)=>
1e.date.localeCompare(t.date)),(0,et.recordTiming)("Parse StrongLifts",performance.now()-t,`${n.length} lifts`),n}},{id:"strong",name:"Strong",detect:e=>{let t=e.map(e=>String(e||"").toLowerCase().trim());return t.includes("date")&&t.includes("workout name")&&t.includes("exercise name")&&t.some(e=>e.startsWith("weight"))&&t.includes("reps")},parse:function(e){var t;let r,n=performance.now(),i=e[0]||[],a=eG(i,["Date"]),s=eG(i,["Exercise Name"]),l=(t=["Weight"],i.find(e=>{let r=String(e||"").trim().toLowerCase();return t.some(e=>r.startsWith(e.toLowerCase()))})),o=l?i.indexOf(l):-1,u=eG(i,["Reps"]),d=eG(i,["Notes"]),f=eG(i,["Workout Notes"]),c=eG(i,["RPE"]),h=((r=String(l||"").toLowerCase())?r.includes("(kg")||/\bkg\b/.test(r)?"kg":r.includes("(lb")||r.includes("(lbs")||/\blbs?\b/.test(r)?"lb":null:null)||function(e,t,r){let n=0,i=0;for(let a=1;a<e.length;a++){let s=e[a];if(!s||0===s.length)continue;let l=eH(s[t]);if(!l||l<=0)continue;let o=String(s[r]||"").toLowerCase();[20,60,100,140,180].includes(l)&&(n+=2),[45,95,135,185,225,315].includes(l)&&(i+=2),o.includes("barbell")&&20===l&&(n+=3),o.includes("barbell")&&45===l&&(i+=3)}return n>i?"kg":"lb"}(e,o,s),p=[];for(let t=1;t<e.length;t++){let r=e[t];if(!r||0===r.length)continue;let n=function(e){let t=String(e||"").trim().match(/^(\d{4})-(\d{2})-(\d{2})/);return t?`${t[1]}-${t[2]}-${t[3]}`:null}(r[a]),i=function(e){let t=String(e||"").replace(/\s+/g," ").trim();return t?(0,eS.normalizeLiftTypeNames)(t):null}(r[s]),l=function(e){let t=Number.parseInt(String(e||"").trim(),10);return Number.isFinite(t)?t:null}(r[u]),m=eH(r[o]);n&&i&&l&&!(l<=0)&&(0,eS.isValidLiftWeight)(i,m)&&p.push({date:n,liftType:i,rawLiftType:String(r[s]||"").trim()||void 0,reps:l,weight:m,unitType:h,notes:function(...e){let t=[];return e.forEach(e=>{let r=String(e||"").trim();r&&(t.includes(r)||t.push(r))}),t.length>0?t.join(" | "):void 0}(r[d],r[f],r[c]?`RPE ${r[c]}`:null)})}return p.sort((e,t)=>e.date.localeCompare(t.date)),(0,et.recordTiming)("Parse Strong",performance.now()-n,`${p.length} lifts`),p}},{id:"wodify",name:"Wodify",detect:e=>{let t=e.includes("Date"),r=e.includes("Sets")&&e.includes("Reps")&&e.includes("Weight")&&e.includes("UOMLabel"),n=e.includes("Component")&&e.includes("Result")&&(e.includes("Performance Result Type")||e.includes("Result Type Label")),i=e.some(e=>/^Name\(\d+\)$/.test(e));return t&&(r&&i||n)},parse:function(e){let t=performance.now(),r=e[0]||[],n=e1(r,["Date"]),i=e1(r,["Sets"]),a=e1(r,["Reps"]),s=e1(r,["Weight"]),l=e1(r,["UOMLabel","Label"]),o=function(e){let t=e1(e,["Name(21)","Component","Movement","Exercise"]);if(t>=0)return t;let r=e.map((e,t)=>({header:e,index:t})).filter(({header:e})=>/^Name\(\d+\)$/.test(e)).sort((e,t)=>{let r=Number.parseInt(e.header.match(/\d+/)?.[0]||"0",10);return Number.parseInt(t.header.match(/\d+/)?.[0]||"0",10)-r});return r[0]?.index??-1}(r),u=e1(r,["Fully Formatted Result","Formatted Result","Result"]),d=e1(r,["Notes","Comment","Full Comment"]),f=e1(r,["Text","Personal Record Description"]),c=e1(r,["Description","Component Description"]),h=e1(r,["Performance Result Type Label","Performance Result Type","Result Type Label"]),p=[];for(let t=1;t<e.length;t++){let r=e[t];if(!r||0===r.length)continue;let m=ed(r[n],"en-US");if(!m)continue;let g=String(r[o]||"").trim();if(!g)continue;let w=String(r[h]||"").trim().toLowerCase();if(w&&w.includes("total"))continue;let y=(0,eS.normalizeLiftTypeNames)(g),b=e9(r[d],r[f],r[c]),S=e4(r[l]),T=e2(r[i]),k=e2(r[a]),v=e3(r[s]),D=String(r[d]||"").trim(),E=null,I=S;if(T&&k&&(0,eS.isValidLiftWeight)(y,v)&&S)E={sets:T,reps:k,weight:v,unitType:S};else{let e=function(e,t,r){let n=String(e||"").trim();if(!n)return null;let i=n.match(/(\d+)\s*x\s*(\d+)\s*@\s*([\d.]+)(?:\s*(kg|lb|lbs))?/i);if(i){let e=e2(i[1]),n=e2(i[2]),a=e3(i[3]),s=e4(i[4])||t;if(e&&n&&(0,eS.isValidLiftWeight)(r,a)&&s)return{sets:e,reps:n,weight:a,unitType:s}}return null}(r[u],S,y);e&&(E=e,I=e.unitType)}if(E){for(let e of function(e,t,r,n){if(!e)return[];let i=String(e).trim();if(!i)return[];let a=i.split(/,|\bthen\b/i).map(e=>e.trim()).filter(Boolean),s=[];for(let e of a){let i=e.replace(/[!.;:]+$/,"").trim();if(!i)continue;let a=i.match(/^(\d+)\s*x\s*(\d+)\s*@\s*([\d.]+)\s*(kg|lb|lbs)?$/i);
1if(a){let e=e2(a[1])||1,r=e2(a[2]),i=e3(a[3]),l=e4(a[4])||t;if(r&&(0,eS.isValidLiftWeight)(n,i)){for(let t=0;t<e;t++)s.push({reps:r,weight:i,unitType:l});continue}}let l=i.match(/^(\d+)\s*@\s*([\d.]+)\s*(kg|lb|lbs)?$/i);if(l){let e=e2(l[1]),r=e3(l[2]),i=e4(l[3])||t;if(e&&(0,eS.isValidLiftWeight)(n,r)){s.push({reps:e,weight:r,unitType:i});continue}}let o=i.match(/^([\d.]+)$/);if(o){let e=e3(o[1]);if((0,eS.isValidLiftWeight)(n,e)){s.push({reps:r||1,weight:e,unitType:t});continue}}}return s}(D,I,E.reps,y))p.push({date:m,liftType:y,rawLiftType:g,reps:e.reps,weight:e.weight,unitType:e.unitType||I,notes:e9("Warmup (from Wodify notes)",D)});p.push(...function({date:e,liftType:t,rawLiftType:r,sets:n,reps:i,weight:a,unitType:s,notes:l}){let o=[],u=n&&n>0?n:1;for(let n=1;n<=u;n++){let d=u>1?`Set ${n} of ${u}`:void 0;o.push({date:e,liftType:t,rawLiftType:r,reps:i,weight:a,unitType:s,notes:e9(d,l)})}return o}({date:m,liftType:y,rawLiftType:g,sets:E.sets,reps:E.reps,weight:E.weight,unitType:E.unitType,notes:b}))}}return p.sort((e,t)=>e.date.localeCompare(t.date)),(0,et.recordTiming)("Parse Wodify",performance.now()-t,`${p.length} lifts`),p}},{id:"btwb",name:"BTWB",detect:e=>e.includes("Date")&&e.includes("Description")&&e.includes("Workout")&&e.includes("Formatted Result"),parse:function(e){let t=performance.now(),r=e[0]||[],n=r.indexOf("Date"),i=r.indexOf("Description"),a=r.indexOf("Notes"),s=r.indexOf("Formatted Result"),l=ek.map(e=>r.indexOf(e)).find(e=>e>=0),o="u">typeof navigator&&"string"==typeof navigator.language?navigator.language:void 0,u=[];for(let t=1;t<e.length;t++){let r=e[t];if(!r||null==r[0])continue;let d=ed(r[n],o);if(!d)continue;let f=function(e){if(!e)return null;let t=String(e).replace(/^\d+x\s*/i,"").replace(/^\d+\s*(?:mins?|minutes?|:\d{2})\s*/i,"").replace(/^[^A-Za-z]+/,"").trim();if(!t)return null;let r=t.match(/^[A-Za-z][A-Za-z '&/()-]*/),n=r?.[0]?.replace(/\s+/g," ").trim();return!n||ev.has(n)||ev.has(eE(n))?null:eI(n)}(l>=0?r[l]:r[1]),c=r[i];if(!c)continue;let h=r[a]||"",p=[String(c).trim(),String(h).replace(/^""+|""+$/g,"").trim()].filter(Boolean).join("\n")||void 0,m=/^Sets\s*$/m.test(String(c)),g=s>=0&&r[s]||"",w=function(e){let t=String(e).match(/^(\d+)\s+rounds?\b/im);return t?Number.parseInt(t[1],10):0}(c),y=function(e){let t=String(e).match(/^(\d+)\s+rounds?\b/i);return t?Number.parseInt(t[1],10):0}(g),b=m?1:w||y||1;String(c).split(/\r?\n/).forEach(e=>{let t=function(e){if(!e)return null;let t=String(e).trim().match(/^(\d+)x?\s*\[\s*(.+?)\s*\]\s*\|\s*([\d.]+)\s*(kg|lb|lbs)$/i);if(!t)return null;let r=Number.parseFloat(t[3]),n=t[4].toLowerCase().startsWith("kg")?"kg":"lb";if(!Number.isFinite(r)||r<=0)return null;let i=t[2].split(/\s*\+\s*/),a=[];for(let e of i){let t=e.match(/^(\d+)\s+(.+)$/);if(!t)continue;let i=Number.parseInt(t[1],10),s=eI(t[2]);Number.isFinite(i)&&!(i<=0)&&s&&a.push({reps:i,weight:r,unitType:n,liftType:s})}return a.length>0?a:null}(e);if(t){let e=p?`Complex: ${p}`:"Complex";for(let r of t)for(let t=0;t<b;t++)u.push({date:d,liftType:r.liftType,reps:r.reps,weight:r.weight,unitType:r.unitType,notes:e});return}let r=function(e,t=null){if(!e)return null;let r=String(e).trim();if(!r)return null;let n=r.match(/^(\d+)\s+(.+?)\s*\|\s*([\d.]+)\s*(kg|lb|lbs)$/i);if(n){let e=Number.parseInt(n[1],10),t=eI(n[2]),r=Number.parseFloat(n[3]),i=n[4].toLowerCase().startsWith("kg")?"kg":"lb";return Number.isFinite(e)&&!(e<=0)&&t&&(0,eS.isValidLiftWeight)(t,r)?{reps:e,weight:r,unitType:i,liftType:t}:null}let i=r.match(/^(\d+)\s+(.+?),\s*([\d.]+)\s*(kg|lb|lbs)\s*\|\s*(\d+)\s*reps?$/i);if(i){let e=Number.parseInt(i[5],10),t=eI(i[2]),r=Number.parseFloat(i[3]),n=i[4].toLowerCase().startsWith("kg")?"kg":"lb";return Number.isFinite(e)&&!(e<=0)&&t&&(0,eS.isValidLiftWeight)(t,r)?{reps:e,weight:r,unitType:n,liftType:t}:null}let a=r.match(/^((\d+)\s+)?(.+?),\s*([\d.]+)\s*(kg|lb|lbs)$/i);if(a){let e=Number.parseInt(a[2],10),t=eI(a[3]),r=Number.parseFloat(a[4]),n=a[5].toLowerCase().startsWith("kg")?"kg":"lb";return Number.isFinite(e)&&!(e<=0)&&t&&(0,eS.isValidLiftWeight)(t,r)?{reps:e,weight:r,unitType:n,liftType:t}:null}let s=r.match(/^(\d+)/);if(!s)return null;let l=r.match(/([\d.]+)\s*(kg|lb|lbs)$/i);if(!l)return null;let o=Number.parseInt(s[1],10),u=Number.parseFloat(l[1]),d=l[2].toLowerCase().startsWith("kg")?"kg":"lb";return Number.isFinite(o)&&!(o<=0)&&(0,eS.isValidLiftWeight)(t,u)?{reps:o,weight:u,unitType:d,liftType:null}:null}(e,f);if(!r)return;let n=f||r.liftType;if(n)for(let e=0;e<b;e++)u.push({date:d,liftType:n,reps:r.reps,weight:r.weight,unitType:r.unitType,notes:p})})}return u.sort((e,t)=>
1e.date.localeCompare(t.date)),(0,et.recordTiming)("Parse BTWB",performance.now()-t,`${u.length} lifts`),u}},{id:"turnkey",name:"TurnKey",detect:e=>e.includes("user_name")&&e.includes("workout_id"),parse:function(e){let t=performance.now(),r=e[0],n=r.indexOf("workout_date"),i=r.indexOf("workout_id"),a=r.indexOf("workout_completed"),s=r.indexOf("exercise_name"),l=r.indexOf("assigned_reps"),o=r.indexOf("assigned_weight"),u=r.indexOf("assigned_sets"),d=r.indexOf("actual_reps"),f=r.indexOf("actual_weight"),c=r.indexOf("actual_sets"),h=r.indexOf("assigned_exercise_missed"),p=r.indexOf("weight_units"),m=[];return e.slice(1).forEach(e=>{if(!e||null===e[0])return void(0,et.devLog)(`parseTurnKeyData() skipping bad row: ${JSON.stringify(e)}`);if("actual_reps"===e[d]||"FALSE"===e[a]||"TRUE"===e[h]||isNaN(parseInt(e[l]),10))return;let t=parseInt(e[l],10),r=parseFloat((0,eS.normalizeDecimalComma)(e[o]));isFinite(parseInt(e[d]),10)&&isFinite(parseFloat((0,eS.normalizeDecimalComma)(e[f])))&&(t=parseInt(e[d],10),r=parseFloat((0,eS.normalizeDecimalComma)(e[f])));let g=e[p],w=`https://app.turnkey.coach/workout/${e[i]}`,y=e[s],b=(0,eS.normalizeLiftTypeNames)(y);if(isNaN(t)||0===t||!(0,eS.isValidLiftWeight)(b,r))return;let S=1;parseInt(e[u],10)>1&&(S=parseInt(e[u],10)),parseInt(e[c],10)>1&&(S=parseInt(e[c],10));for(let i=1;i<=S;i++){let a=`Set ${i} of ${S}`;1===S&&(a=void 0),m.push({date:e[n],liftType:b,rawLiftType:y,reps:t,weight:r,URL:w,unitType:g,notes:a})}}),m.sort((e,t)=>e.date>t.date?1:e.date<t.date?-1:0),(0,et.recordTiming)("Parse TurnKey",performance.now()-t,`${m.length} lifts`),m}},{id:"fitnotes",name:"FitNotes",detect:function(e){let t=e.map(eA);return t.includes("date")&&t.includes("exercise")&&t.includes("category")&&t.includes("reps")&&t.some(e=>e.startsWith("weight"))},parse:function(e,{importedAt:t=new Date}={}){let r=performance.now(),n=e[0]||[],i=eO(n,"date"),a=eO(n,"exercise"),s=eO(n,"reps"),l=eO(n,"distance"),o=eO(n,"time"),u=eO(n,"comment","comments"),{index:d,unitType:f}=function(e){let t=e.findIndex(e=>eA(e).startsWith("weight"));if(t<0)return{index:-1,unitType:null};let r=eA(e[t]);return{index:t,unitType:/\blbs?\b|pounds?/.test(r)?"lb":"kg"}}(n),c=[],h={},p=new Set,m=new Set,g=0;for(let r=1;r<e.length;r++){let n=e[r];if(!n||0===n.length||n.every(e=>""===e))continue;g++;let w=function(e){let t=String(e||"").trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);return t?!function(e,t,r){if(!e||!t||!r)return!1;let n=new Date(Date.UTC(e,t-1,r));return n.getUTCFullYear()===e&&n.getUTCMonth()===t-1&&n.getUTCDate()===r}(Number(t[1]),Number(t[2]),Number(t[3]))?null:`${t[1]}-${t[2]}-${t[3]}`:null}(n[i]),y=function(e){let t=String(e||"").replace(/\s+/g," ").trim();return t?(0,eS.normalizeLiftTypeNames)(t):null}(n[a]),b=function(e){let t=String(e??"").trim();if(!/^\d+$/.test(t))return null;let r=Number(t);return Number.isSafeInteger(r)?r:null}(n[s]),S=function(e){let t=(0,eS.normalizeDecimalComma)(e);if(!t)return null;let r=Number(t);return Number.isFinite(r)?r:null}(n[d]),T=null==S&&(0,eS.isBodyweightLoadLiftName)(y)?0:S;if(!w){eW(h,"invalidDate");continue}if(!y){eW(h,"missingExercise");continue}if(!b||b<=0){eW(h,""!==String(n[l]??"").trim()||""!==String(n[o]??"").trim()?"unsupportedDurationOrDistance":"missingReps");continue}if(!(0,eS.isValidLiftWeight)(y,T)){eW(h,null==S?"missingWeight":"invalidWeight");continue}let k=m.has(w)?null:ex("FitNotes",t);m.add(w),p.add(w),c.push({date:w,liftType:y,rawLiftType:String(n[a]||"").trim()||void 0,reps:b,weight:T,unitType:f,notes:function(...e){let t=[];return e.forEach(e=>{let r=String(e||"").trim();r&&(t.includes(r)||t.push(r))}),t.length>0?t.join(" | "):void 0}(n[u],k)})}return c.sort((e,t)=>e.date.localeCompare(t.date)),(0,et.recordTiming)("Parse FitNotes",performance.now()-r,`${c.length} lifts`),Object.defineProperty(c,"importDiagnostics",{value:{sourceRows:g,parsedRows:c.length,skippedRows:g-c.length,skippedByReason:h,workoutCount:p.size,unitType:f},enumerable:!1}),c}},{id:"strength-journeys",name:"Strength Journeys",detect:e=>{let t=e.map(e=>e.toLowerCase().replace(/[_-]/g," ").trim());return t.some(e=>"date"===e||"workout date"===e)&&t.some(e=>["lift type","lifttype","exercise","movement"].includes(e))&&t.some(e=>["reps","rep","repetitions"].includes(e))&&t.some(e=>["weight","load","weight used"].includes(e))},parse:eT}];async function tt(e){let t;if((t=["xls","xlsx"].includes(e.name.split(".").pop()?.toLowerCase())?await e8(e):function(e,t=function(e){let t=String(e||"").split(/\r?\n/,1)[0]||"",r=",",n=-1;return[",",";
1","	"].forEach(e=>{let i=t.split(e).length-1;i>n&&(n=i,r=e)}),r}(e)){let r=[],n=[],i="",a=!1,s=0;for(;s<e.length;){let l=e[s];a?'"'===l?s+1<e.length&&'"'===e[s+1]?(i+='"',s+=2):(a=!1,s++):(i+=l,s++):'"'===l?(a=!0,s++):l===t?(n.push(i),i="",s++):"\r"===l?(n.push(i),i="",r.push(n),n=[],++s<e.length&&"\n"===e[s]&&s++):("\n"===l?(n.push(i),i="",r.push(n),n=[]):i+=l,s++)}for((i||n.length>0)&&(n.push(i),r.push(n));r.length>0&&r[r.length-1].every(e=>""===e);)r.pop();return r}(await e.text())).length<2)throw Error("File appears to be empty or has no data rows.");let r=function(e){for(let t of te)if(t.detect(e))return t;return null}(t[0]);if(!r)throw Error("Unrecognized file format. Supported formats: Hevy export, Strong export, StrongLifts 5x5 export, Wodify export, BTWB export, Strength Journeys CSV export, TurnKey export, FitNotes export. Make sure your file has column headers in the first row.");let n=r.parse(t),i=n?.importDiagnostics||null;if(!n||0===n.length)throw Error(`File was recognized as ${r.name} format but no valid entries were found. Check that the file contains workout data with dates, exercises, reps, and weights.`);return{data:n,formatId:r.id,formatName:r.name,diagnostics:i}}function tr(e=new Date){return ei(new Date(e.getTime()-432e5))}e.s(["parseData",0,e6,"parseImportedFile",0,tt],267194);let tn=[{daysAgo:81,lifts:{"Back Squat":[[5,45,"Day one of Starting Strength. Read the book twice. The empty bar is heavier than it looks."],[5,45],[2,95,"First plates on the bar. Hips back, bar over midfoot."],[5,135],[5,135],[5,135,"135 for three sets of five. Nervous, but it felt natural."]],"Bench Press":[[5,45,"Watched a bench setup video last night. Shoulder blades back, feet planted."],[5,45],[2,95,"Bar touches just below the chest. Feels weird, works."],[5,115],[5,115],[5,115,"115 for 3x5. Starting light like the book says."]],Deadlift:[[5,135,"Deadlift warm-up. Bar over midfoot, shins touching it."],[5,185,"One set of five. The book says that is all it takes."]]}},{daysAgo:79,lifts:{"Back Squat":[[5,45,"Sore everywhere from the first session. The empty bar sets helped."],[5,45],[2,95,"Warm-ups loosened the soreness right up."],[5,145],[5,145],[5,145,"145. Knees caved on the way up. Knees out next time."]],"Strict Press":[[5,45,"Why is the empty bar so heavy overhead?"],[5,45],[2,65,"Elbows in front of the bar. Chest up."],[5,75],[5,75],[5,75,"75 for three sets. The press is humbling."]],Deadlift:[[5,135,"Grip already tired from the press. Chalk might be a thing."],[5,200,"200 for five. Dragged the bar up my legs like the book says."]]}},{daysAgo:77,lifts:{"Back Squat":[[5,45,"6am session. The gym was empty. Just me and the cleaner."],[5,45],[3,95],[2,135],[5,155,"155. Knees out and it went up straight."],[5,155],[5,155,"Rest days are doing their job. Legs felt good."]],"Bench Press":[[5,45,"Empty bar bench. Shoulders click a little. Warm-ups help."],[5,45],[2,95,"95 feels solid now. Leg drive on."],[5,120],[5,120],[5,120,"120 for 3x5. Smooth."]],Deadlift:[[5,135,"Deadlift warm-up. Big breath in and hold it."],[2,185,"185 for two. Fast off the floor."],[5,215,"215. Grip was the limit, not my legs."]]}},{daysAgo:74,lifts:{"Back Squat":[[5,45,"Week two. Same 6am crew. Nobody talks, everyone nods."],[5,45],[3,95,"Pushing my knees out on every warm-up rep now."],[2,135],[5,165],[5,165,"Knees out fixed it. Every rep came up straight."],[5,165]],"Strict Press":[[5,45,"Empty bar press. Chin back, bar back over my head."],[5,45],[2,65],[5,80],[5,80,"Lost the bar forward on a rep. Squeezed my glutes and it fixed it."],[5,80,"Press at 80. Every pound is earned on this lift."]],Deadlift:[[5,135,"Deadlift warm-up. Hips higher than a squat, that is the trick."],[2,185,"185 double. Fast."],[5,225,"225. Two plates on the deadlift in week two."]]}},{daysAgo:72,lifts:{"Back Squat":[[5,45,"Same five people here every morning. Starting to recognize faces."],[5,45],[3,95,"The bar sits on my back better now."],[2,135],[5,175],[5,175],[5,175,"175. Hips back, chest up, drive the hips. It is starting to click."]],"Bench Press":[[5,45,"Empty bar bench. Arch and pin the shoulders before unracking."],[5,45],[2,95,"Warm-ups feel smooth today."],[5,125],[5,125],[5,125,"125. Leg drive makes the bench feel way more stable."]],Deadlift:[[5,135,"135 warm-up. Pull the slack out, then pull the bar."],[2,185,"185 for two. The bar clicks when the slack comes out."],[5,235,"235 for five. Back stayed flat the whole way."]]}},{daysAgo:70,lifts:{"Back Squat":[[5,45,"Pre-workout hitting different today. Tingling everywhere."],[5,45,"Slept nine hours. Warm-ups felt like butter."],[3,95],[2,135],[5,185],[5,185],[5,185,"185 for three set
1s. Last ten pound jump, fives from here."]],"Strict Press":[[5,45,"Empty bar press. Starting to groove the bar path."],[5,45],[2,65,"65 double. Tight from head to toe."],[5,85],[5,85],[5,85,"85 overhead. Squeezing my glutes stops me leaning back."]],Deadlift:[[5,135,"135 used to be heavy. Now it is the first warm-up."],[2,185,"185 feels like nothing today."],[5,245,"245. Grip hung on for the last rep."]]}},{daysAgo:67,lifts:{"Back Squat":[[5,45,"Bought a belt. Bracing feels way more solid."],[5,45],[3,95,"Figuring out the belt. One notch looser than I thought."],[2,135],[5,190],[5,190],[5,190,"190. The belt made the last set feel easy."]],"Bench Press":[[5,45,"Empty bar bench. Big guy in a singlet benched 405 next to me. Life goals."],[5,45],[2,95,"95 warm-up. Wrists stacked over elbows."],[5,130],[5,130],[5,130,"130. Older guy gave me a nod after my last set. Felt like a graduation."]],Deadlift:[[5,135,"Deadlift day is the best day."],[3,185],[2,225,"225 double. Bar close, lats tight."],[5,255,"255 for five. Easy speed."]]}},{daysAgo:65,lifts:{"Back Squat":[[5,45,"Legs still sore from last session. Warm-ups helped."],[5,45],[3,95,"95 for five. Staying patient with the warm-ups."],[2,135],[5,195],[5,195],[5,195,"195. Slow grind on the last rep, but it came up."]],"Strict Press":[[5,45,"Empty bar press is basically meditation now."],[5,45],[2,65,"Slow and controlled on the warm-ups."],[5,90],[5,90],[5,90,"Press at 90. Every rep is a fight at the top."]],Deadlift:[[5,135,"Dude doing curls in the squat rack. Classic."],[3,185],[2,225],[5,265,"265. My grip is starting to get tested."]]}},{daysAgo:63,lifts:{"Back Squat":[[5,45,"Three weeks in. Starting to look forward to 6am."],[5,45],[3,95,"The warm-ups feel like a ritual now."],[2,135],[5,200],[5,200],[5,200,"Squatted 200 for the first time. Week three."]],"Bench Press":[[5,45,"Empty bar bench. Shoulders clicking less these days."],[5,45],[2,95,"95 for two. Setup feels automatic now."],[5,135],[5,135],[5,135,"135 for three sets. A plate on each side!"]],Deadlift:[[5,135,"Deadlift warm-up. Hinging feels completely different than week one."],[3,185],[2,225],[5,275,"275 moved fast. Someone in the corner pulled 600 and the floor shook."]]}},{daysAgo:60,lifts:{"Back Squat":[[5,45,"Coffee, creatine and a banana. The holy trinity."],[5,45],[3,95,"95. Depth feels automatic now."],[2,135],[5,205],[5,205],[5,205,"205. Getting comfortable in the hole."]],"Strict Press":[[5,45,"Empty bar press. It is a relationship. We tolerate each other."],[5,45],[3,65,"65 warm-up. Breathing and bracing finally feel natural."],[2,85],[5,95],[5,95],[5,95,"95 on the press. Five pounds from a plate."]],Deadlift:[[5,135,"Deadlift warm-up. Beltless on purpose, working on the brace."],[3,185],[2,225],[5,280,"280. Grip slipped on the last rep. Buying chalk."]]}},{daysAgo:58,lifts:{"Back Squat":[[5,45,"Foam rolled before squats. Why didn't I do this sooner?"],[5,45],[5,95],[3,135,"135 for three. That was my working weight on day one."],[2,185],[5,210],[5,210],[5,210,"210. Asked a regular to watch my depth. All below parallel."]],"Bench Press":[[5,45,"Empty bar bench. Pinkies on the rings, grip feels right."],[5,45],[2,95,"95. Bar path is a straight line now."],[5,140],[5,140],[5,140,"140. Someone asked ME for a spot. I have officially made it."]],Deadlift:[[5,135,"Bought chalk on the way here."],[3,185],[2,225],[5,285,"Chalk works. 285 stayed in my hands."]]}},{daysAgo:56,lifts:{"Back Squat":[[5,45,"Forgot my headphones. The gym music is questionable."],[5,45],[5,95],[3,135,"135 triple. Feels light now."],[2,185],[5,215],[5,215],[5,215,"215. Belt, brace, down, up."]],"Strict Press":[[5,45,"Empty bar press. Microplates in my gym bag."],[5,45],[3,65],[2,85],[5,97.5,"Microplates arrived. The press goes up 2.5 at a time now."],[5,97.5],[5,97.5,"97.5 for three sets. Small jumps work."]],Deadlift:[[5,135,"Deadlift warm-up. Chalk on first."],[3,185],[2,225],[5,290,"290. The deadlift is flying past the squat."]]}},{daysAgo:53,lifts:{"Back Squat":[[5,45,"Eating a lot more. Up six pounds of bodyweight."],[5,45],[5,95,"Warm-ups feel strong. The food is working."],[3,135],[2,185],[5,220],[5,220],[5,220,"220 and the squat keeps moving."]],"Bench Press":[[5,45,"Empty bar bench. Two seconds down on every rep."],[5,45],[2,95,"95 warm-up. Straight bar path from the rack."],[5,145],[5,145],[5,145,"145. Pausing the bar on my chest keeps it honest."]],Deadlift:[[5,135,"Deadlift warm-up. Pull the slack out, then push the floor away."],[3,185],[2,225,"225 double. Chalk everywhere."],[5,295,"295. Five short of 300."]]}},{daysAgo:51,lifts:{"Back Squat":[[5,45,"Knee sleeves on. War paint, basically."],[5,45],[5,95],[3,135,"Paused the 135 at the bottom. Depth check passed."],[2,185],[5,225],[5,225],[5,225,"225 for all three set
1s. Two plates on the squat!"]],"Strict Press":[[5,45,"Empty bar press. Triple digits today, I can feel it."],[5,45],[3,65],[2,85],[5,100],[5,100,"Second set at 100. Lockout is getting stronger."],[5,100,"100 overhead. Triple digits on the press."]],Deadlift:[[5,135,"Deadlift warm-up. Lats tight, bar close."],[3,185],[2,225],[5,300,"Deadlift 300. Did not expect that this soon."]]}},{daysAgo:49,lifts:{"Back Squat":[[5,45,"Had to wait for a rack today. Busy morning."],[5,45],[5,95,"Got the old rack by the window. Sunrise squats."],[3,135],[2,185],[5,230],[5,230],[5,230,"230. Strong from start to finish."]],"Bench Press":[[5,45,"Empty bar bench. A new guy asked me how to set up. I showed him."],[5,45],[3,95],[2,135],[5,150],[5,150,"Second set at 150 had the best bar speed yet."],[5,150,"150 for three sets. The bench is really moving now."]],Deadlift:[[5,135,"Deadlift warm-up. The lat cue finally clicked."],[3,185],[2,225],[5,305,"305. Slack out before it leaves the floor. That cue works."]]}},{daysAgo:46,lifts:{"Back Squat":[[5,45,"Foam rolled for ten minutes first. Hips feel open."],[5,45],[5,95],[3,135,"135 feels like a feather now."],[2,185],[5,235],[5,235],[5,235,"235. Older lifter in knee wraps said my depth looks good. Made my week."]],"Strict Press":[[5,45,"Empty bar press. Elbows tucked, glutes squeezed, whole body lift."],[5,45],[3,65,"65. Crisp."],[2,85],[5,102.5],[5,102.5],[5,102.5,"102.5. Small jumps, still jumps."]],Deadlift:[[5,135,"Deadlift warm-up. 135 barely feels like weight."],[5,185],[3,225],[2,275,"275 for two. Snappy."],[5,310,"310. Three plates is next."]]}},{daysAgo:44,lifts:{"Back Squat":[[5,45,"Brought a buddy today. He lasted 45 minutes."],[5,45],[5,95,"Showed my buddy how to warm up. He is sore already."],[3,135],[2,185],[5,240],[5,240],[5,240,"240. Buddy says he is coming back. We'll see."]],"Bench Press":[[5,45,"Empty bar bench. Buddy is watching from the next bench."],[5,45],[3,95,"95. Setup is automatic now."],[2,135],[5,155],[5,155],[5,155,"155. A regular showed me how to pin my shoulder blades. Game changer."]],Deadlift:[[5,135,"Three plates day. Chalk, belt, deep breath."],[5,185],[3,225],[2,275,"275 double. Ready."],[5,315,"315 for five. Three plates on the deadlift!"]]}},{daysAgo:42,lifts:{"Back Squat":[[5,45,"Rest day yesterday. Legs feel springy."],[5,45],[5,95],[3,135,"135 for three. Feels light, which is funny."],[2,185],[5,245],[5,245],[5,245,"Six weeks in and the squat is up 110 pounds."]],"Strict Press":[[5,45,"Empty bar press. Starting to enjoy this lift."],[5,45],[3,65,"65 warm-up. The bar path finally makes sense."],[2,85],[5,105],[5,105],[5,105,"105 for three sets. Grinding, but every rep went up."]],Deadlift:[[5,135,"Last deadlift day before power cleans come in."],[5,185],[3,225],[2,275],[5,320,"320. Straps stayed in the bag."]]}},{daysAgo:39,lifts:{"Back Squat":[[5,45,"Long day at work. Came in anyway."],[5,45],[5,95,"The warm-ups shook the day off."],[5,135],[3,185],[2,225],[5,250],[5,250],[5,250,"250. Every rep, no excuses."]],"Bench Press":[[5,45,"Empty bar bench. Microplates for the bench now too."],[5,45],[3,95,"95. Speed off the chest."],[2,135],[5,157.5],[5,157.5],[5,157.5,"157.5. Small jumps on the bench from here."]],"Power Clean":[[3,45,"Power cleans start today. Jump, shrug, catch it on the shoulders."],[3,45],[1,75,"75. More reverse curl than clean, honestly."],[3,95],[3,95],[3,95],[3,95],[3,95,"Five sets of three at 95. Mostly high pulls, but I racked a few."]]}},{daysAgo:37,lifts:{"Back Squat":[[5,45,"Slept badly. Took the warm-ups slow."],[5,45],[5,95],[5,135,"135 felt heavy today. Kept going."],[3,185],[2,225],[5,255],[5,255],[5,255,"255. Slept badly, finished every rep anyway."]],"Strict Press":[[5,45,"Empty bar press. The regulars know my name now."],[5,45],[3,65,"65. Straight up past my face."],[2,85],[5,107.5],[5,107.5],[5,107.5,"107.5. Ground out the last rep."]],Deadlift:[[5,135,"Deadlift warm-up. Missed pulling last session."],[5,185],[3,225],[2,275],[5,325,"325. Chalk everywhere. Worth it."]]}},{daysAgo:35,lifts:{"Back Squat":[[5,45,"Someone curling in the squat rack again. Classic."],[5,45],[5,95,"Waited for the rack, then warmed up. Patience."],[5,135],[3,185],[2,225],[5,260],[5,260],[5,260,"260. Worth the wait."]],"Bench Press":[[5,45,"Empty bar bench. My shoulders have never felt better."],[5,45],[3,95],[2,135],[5,160],[5,160,"The second set at 160 felt easier than the first."],[5,160,"160 for three set
1s."]],"Power Clean":[[3,45,"Power clean warm-up. Jump, don't pull with the arms."],[3,45],[1,75,"75. Getting the elbows round faster."],[3,100],[3,100],[3,100],[3,100],[3,100,"100. Catching the clean on my shoulders now, not my wrists."]]}},{daysAgo:32,lifts:{"Back Squat":[[5,45,"Gym smells like old rubber and chalk. Wouldn't have it any other way."],[5,45],[5,95],[5,135,"135 for five. Sat right back into it."],[3,185],[2,225],[5,265],[5,265],[5,265,"265. Heaviest squat yet, walked it out clean."]],"Strict Press":[[5,45,"Empty bar press. Still humbling, and I keep showing up."],[5,45],[3,65,"65 warm-up. Fast off the shoulders."],[2,85],[5,110],[5,110],[5,110,"110 overhead. Every rep a fight."]],Deadlift:[[5,135,"Trying the hook grip today. Thumbs under the fingers."],[5,185],[3,225],[2,275,"275 double with the hook grip. It hurts. It holds."],[5,330,"Hook grip at 330. Thumbs hurt, the bar did not move in my hands."]]}},{daysAgo:30,lifts:{"Back Squat":[[5,45,"Resting five minutes between work sets now."],[5,45],[5,95,"Warm-ups: bar, 95, 135, 185, 225. The ritual."],[5,135],[3,185],[2,225],[5,270],[5,270],[5,270,"270. Five minutes rest and every set went up."]],"Bench Press":[[5,45,"Empty bar bench. The 600 pound deadlifter is back in the corner."],[5,45],[3,95,"95. Two seconds down, then drive."],[2,135],[5,162.5],[5,162.5],[5,162.5,"162.5. Solid."]],"Power Clean":[[3,45,"Power clean warm-up. Bar close, jump, elbows fast."],[3,45],[1,75,"75. Starting to feel the hip snap."],[3,105],[3,105],[3,105],[3,105],[3,105,"105. The snap under the bar is addictive."]]}},{daysAgo:28,lifts:{"Back Squat":[[5,45,"5am alarm, no snooze. This is who I am now."],[5,45],[5,95],[5,135,"135. Warm-ups on autopilot."],[3,185],[2,225],[5,275],[5,275],[5,275,"275. 5am squats hit different."]],"Strict Press":[[5,45,"Empty bar press. Deep breath, brace, drive."],[5,45],[3,65,"65. Every rep crisp."],[2,85],[5,112.5],[5,112.5],[5,112.5,"112.5 for three sets. The microplates are doing their job."]],Deadlift:[[5,135,"Deadlift warm-up. Set my phone on the floor to film today."],[5,185],[3,225],[2,275],[5,335,"Filmed my deadlift for a form check. Lockout looks solid.","https://www.youtube.com/watch?v=2kEC7X1FUIg"]]}},{daysAgo:25,lifts:{"Back Squat":[[5,45,"The regulars cheer when someone PRs. This gym rules."],[5,45],[5,95,"Warm-ups with the morning crew watching."],[5,135],[3,185],[2,225],[5,280],[5,280],[5,280,"280. Got a cheer on the last rep."]],"Bench Press":[[5,45,"Empty bar bench. Propped my phone on a plate to film."],[5,45],[3,95,"95. Checked the camera angle."],[2,135],[5,165],[5,165],[5,165,"Filmed my last set of bench. Arch and leg drive feel dialed in.","https://www.youtube.com/watch?v=jTQTiW_g2pU"]],"Power Clean":[[3,45,"Power clean warm-up. Elbows fast."],[3,45],[3,75,"75 for three. Smooth."],[1,95],[3,110],[3,110],[3,110],[3,110],[3,110,"110 cleans. Racking them clean now."]]}},{daysAgo:23,lifts:{"Back Squat":[[5,45,"Every set is a real effort now. Big breakfast."],[5,45],[5,95],[5,135,"135. Moving well."],[3,185],[2,225],[5,285],[5,285],[5,285,"285. Heavy, but all fifteen reps."]],"Strict Press":[[5,45,"Empty bar press. 115 on the bar today."],[5,45],[3,65],[2,85],[5,115],[5,115,"The second set at 115 was a real grind."],[4,115,"First missed rep on the press. Four on the last set. Same weight next time."]],Deadlift:[[5,135,"Deadlift warm-up. Shook off the press."],[5,185],[3,225],[2,275],[5,340,"340. The deadlift does not care how the press went."]]}},{daysAgo:21,lifts:{"Back Squat":[[5,45,"Wore my lucky socks. Yes, it matters."],[5,45],[5,95,"Warm-ups in the lucky socks. Feeling good."],[5,135],[3,185],[2,225],[5,290],[5,290],[5,290,"290. These are getting heavy."]],"Bench Press":[[5,45,"Empty bar bench. Still the first thing I do, every time."],[5,45],[3,95],[2,135],[5,167.5],[5,167.5,"167.5 for five. The groove is locked in."],[5,167.5,"167.5. Two months ago 115 felt heavy."]],"Power Clean":[[3,45,"Power clean warm-up. Hips through, then drop."],[3,45],[3,75,"75. Getting faster under the bar."],[1,95],[3,115],[3,115],[3,115],[3,115],[3,115,"115. Racked every rep."]]}},{daysAgo:18,lifts:{"Back Squat":[[5,45,"One more jump to three plates."],[5,45],[5,95],[5,135,"135 warm-up. Picturing 300."],[3,185],[2,225],[5,295],[5,295],[5,295,"295. Three plates next session."]],"Strict Press":[[5,45,"Empty bar press. Rematch with 115 today."],[5,45],[3,65],[2,85],[5,115],[5,115,"The second set at 115 went up easier than last time."],[5,115,"115 for all fifteen reps. Beat it."]],Deadlift:[[5,135,"Deadlift warm-up. The hook grip is automatic now."],[5,185],[3,225],[2,275],[5,345,"345. Hips and shoulders rise together now."]]}},{daysAgo:16,lifts:{"Back Squat":[[5,45,"Three plates on the squat today. Nervous."],[5,45],[5,95],[5,135],[3,185],[2,225],[5,300,"300 on the bar. Three plates a side for the first time."],[5,300],[3,300,"Missed the last two reps at 300. First failed squat."]],"Bench Press":[[5,45,"Empty bar bench. Legs cooked from the squats."],[5,45],[3,95],[2,135],[5,170],[5,170,"170 for five. Heavy."],[4,170,"One rep short at 170. Shoulders still tired from the last press day."]],"Power Clean":[[3,45,"Power clean warm-up. Shaking off the missed squat."],[3,45],[3,75,"75. Clean and fast."],[1,95],[3,120],[3,120],[3,120],[3,120],[3,120,"120. The cleans still move when the squat does not."]]}},{daysAgo:14,lifts:{"Back Squat":[[5,45,"300 again. Deep breath."],[5,45],[5,95],[5,135],[3,185],[2,225],[5,300,"First set at 300 went up."],[4,300],[4,300,"Missed at 300 again. The book says reset 10% and build back."]],"Strict Press":[[5,45,"Empty bar press. Focus on what I can control."],[5,45],[5,65,"65 warm-up. Clean."],[3,85],[2,105],[5,117.5],[5,117.5],[5,117.5,"117.5 for all fifteen. The press is still going."]],Deadlift:[[5,135,"Deadlift warm-up. Grumpy about the squat."],[5,185],[5,225],[3,275],[2,315],[5,350,"350. At least the deadlift is happy."]]}},{daysAgo:11,lifts:{"Back Squat":[[5,45,"Back to 275 today. Feeling fresh."],[5,45],[5,95,"Warm-ups feel light after the reset."],[5,135],[3,185],[2,225],[5,275],[5,275],[5,275,"Reset to 275 and it flew. Good call."]],"Bench Press":[[5,45,"Empty bar bench. Rematch with 170."],[5,45],[3,95],[2,135],[5,170],[5,170,"Second set at 170. Feeling it."],[5,170,"All fifteen reps at 170 this time."]],"Power Clean":[[3,45,"Power clean warm-up. Hips are snapping."],[3,45],[3,75,"75 for three, easy."],[1,95],[3,125],[3,125],[3,125],[3,125],[3,125,"125. Fast elbows."]]}},{daysAgo:9,lifts:{"Back Squat":[[5,45,"Squats feel fun again after the reset."],[5,45],[5,95],[5,135,"135 for five. Fast."],[3,185],[2,225],[5,285],[5,285],[5,285,"285 moves fast after the reset."]],"Strict Press":[[5,45,"Empty bar press. 120 on the bar today."],[5,45],[5,65],[3,85],[2,105],[5,120],[4,120,"Second set at 120: four reps."],[3,120,"120 won today. Five, four, three."]],Deadlift:[[5,135,"Deadlift warm-up. Chalk, hook, breathe."],[5,185],[5,225],[3,275],[2,315],[5,355,"355. The deadlift keeps climbing."]]}},{daysAgo:7,lifts:{"Back Squat":[[5,45,"295 again, second time around."],[5,45],[5,95,"Warm-ups are all business now."],[5,135],[3,185],[2,225],[5,295],[5,295],[5,295,"295 felt better than the first time around."]],"Bench Press":[[5,45,"Empty bar bench. The morning crew is here early."],[5,45],[3,95],[2,135],[5,172.5],[5,172.5,"172.5. Second set smooth."],[5,172.5,"172.5. The morning crew yelled me through the last rep."]],"Power Clean":[[3,45,"Power clean warm-up. Seven weeks of cleans. They feel athletic now."],[3,45],[5,75,"75. Crisp."],[3,95],[1,115],[3,130],[3,130],[3,130],[3,130],[3,130,"130 cleans, fast under the bar."]]}},{daysAgo:4,lifts:{"Back Squat":[[5,45,"Three plates today. Chalk, belt, sleeves, lucky socks."],[5,45],[5,95],[5,135],[3,185],[2,225],[5,300,"300 for five. First set in the bag."],[5,300],[5,300,"300 for three set
1s of five. Three plates on the squat."]],"Strict Press":[[5,45,"Empty bar press. Round two with 120."],[5,45],[5,65],[3,85],[2,105],[5,120],[5,120,"The second set at 120 went up clean."],[4,120,"One rep short at 120 again. So close."]],Deadlift:[[5,135,"Deadlift warm-up. Celebrating the squat with a big pull."],[5,185],[5,225],[3,275],[2,315],[5,360,"360. My grip is the strongest it has ever been."]]}},{daysAgo:2,lifts:{"Back Squat":[[5,45,"Legs feel fresh since the reset."],[5,45],[5,95,"Warm-ups flying today."],[5,135],[3,185],[2,225],[5,305],[5,305],[5,305,"305. New squat PR."]],"Bench Press":[[5,45,"Empty bar bench. Last bench day of the twelve weeks."],[5,45],[3,95],[2,135],[5,175],[5,175,"175 for five. Strong."],[5,175,"175 for three sets. 60 pounds on the bench in twelve weeks."]],"Power Clean":[[3,45,"Power clean warm-up. Phone propped up to film the top sets."],[3,45],[5,75,"75. Fast."],[3,95],[1,115],[3,135],[3,135],[3,135],[3,135],[3,135,"Got my cleans on video. Fast under the bar.","https://www.youtube.com/watch?v=WnJd42b3EfI"]]}},{daysAgo:0,lifts:{"Back Squat":[[5,45,"Twelve weeks since my first session. Same gym, same morning crew."],[5,45],[5,95],[5,135,"135 for five. That was my working weight on day one."],[5,185],[3,225],[2,275],[5,310],[5,310],[5,310,"310 for three sets of five, filmed the last one. Twelve weeks ago I squatted 135.","https://www.youtube.com/watch?v=qgbnLdH4qjc"]],"Strict Press":[[5,45,"Empty bar press. Still humbling, always humbling."],[5,45],[5,65,"65. Third try at 120 today. Staying calm."],[3,85],[2,105],[5,120],[5,120],[5,120,"Every rep at 120 after two tries. Worth the wait."]],Deadlift:[[5,135,"Last deadlift of the twelve weeks. Chalk, hook, breathe."],[5,185],[5,225],[3,275],[2,315,"315 double. Used to be my top set. Now it is a warm-up."],[5,365,"365 for five. 180 pounds on the deadlift in twelve weeks."]]}}];var ti=e.i(157036),ta=e.i(350461);let ts=Object.freeze({PAGE_VISIT:"PageVisit",SIGN_UP:"SignUp",LEAD:"Lead"});function tl(){return"development"!==ta.default.env.NEXT_PUBLIC_STRENGTH_JOURNEYS_ENV}function to(e,t={}){"function"!=typeof window.rdt||tl()&&(Object.keys(t).length?window.rdt("track",e,t):window.rdt("track",e))}function tu(){to(ts.LEAD)}e.s(["REDDIT_PIXEL_ID",0,"t2_sgy9pwjx","isRedditPixelEnabled",0,tl,"rdtTrackPageVisit",0,function(){to(ts.PAGE_VISIT)},"rdtTrackSheetLinked",0,tu,"rdtTrackSignUp",0,function(){to(ts.SIGN_UP)}],863272);var td=e.i(215777),tf=e.i(69719);let tc=new Set(et.BIG_FOUR_LIFT_TYPES);function th({parsedData:e,allSessionDates:t,topLiftsByTypeAndReps:r,e1rmFormula:n="Brzycki"}){let i=performance.now();if(!t?.length||!e?.length)return(0,et.recordTiming)("Streak Leaderboard",performance.now()-i,"no data"),[];let a=function(e,{referenceDate:t=null}={}){let r,n,i,a;if(!e||0===e.length)return[];let s=new Map;for(let t=0;t<e.length;t++){let r=ef(e[t]);s.set(r,(s.get(r)||0)+1)}let l=ef(t||(n=(r=new Date).getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),a=String(r.getDate()).padStart(2,"0"),`${n}-${i}-${a}`)),o=ey(l,7),u=Array.from(s.keys()).sort()[0],d=[],f=null,c=null,h=0,p=[],m=u;for(;m<=l;){let e=s.get(m)||0;e>=3?(0===h&&(f=m),c=m,h++,p.push(e)):(h>=3&&d.push({startWeek:f,endWeek:c,weeks:h,weekCounts:p,isActive:!1}),h=0,f=null,c=null,p=[]),m=eb(m,7)}if(h>=3&&d.push({startWeek:f,endWeek:c,weeks:h,weekCounts:p,isActive:!1}),d.length>0){let e=d[d.length-1];e.endWeek>=o&&(e.isActive=!0)}return d}(t);return!function(e,t,r,n="Brzycki"){if(!e?.length||!t?.length)return;let i=new Set;r&&Object.keys(r).forEach(e=>{let t=r[e];for(let r=0;r<10;r++){let n=t?.[r]?.[0];n&&i.add(`${e}|${r+1}|${n.date}|${n.weight}`)}});let a=e.map(e=>({streak:e,startDate:e.startWeek,endDate:eb(e.endWeek,6),tonnage:0,candidates:[]}));e.forEach(e=>{e.tonnage=0,e.prs=[]});let s=new Map,l=new Map,o=0;for(let e=0;e<t.length;e++){let r=t[e];if(!r.date)continue;let u=r.reps;if(!u||u<1||u>10)continue;let d=r.weight??0;if(d<=0)continue;let f=`${r.liftType}|${u}`,c=(0,tf.toKg)(d,r.unitType),h=c>(s.get(f)??0);h&&s.set(f,c);let p=function(e){let t=parseInt(e.slice(0,4),10)-1,r=e.slice(5,7),n=e.slice(8,10);return"02"===r&&"29"===n&&(n="28"),`${t}-${r}-${n}`}(r.date),m=l.get(f);for(m||(m=[],l.set(f,m));m.length>0&&m[0].date<p;)m.shift();let g=0;for(let e=0;e<m.length;e++)m[e].weightKg>g&&(g=m[e].weightKg);let w=c>g;for(m.push({date:r.date,weightKg:c});o<a.length&&a[o].endDate<r.date;)o++;if(o>=a.length)break;let y=a[o];if(!(r.date<y.startDate)&&(y.tonnage+=d*u,h||w)){let e,t=`${r.liftType}|${u}|${r.date}|${d}`;
1e=h&&i.has(t)?1:h?2:3;let a=(0,td.estimateE1RM)(u,d,n);y.candidates.push({date:r.date,liftType:r.liftType,reps:u,weight:d,unitType:r.unitType,tier:e,e1rm:a,isBigFour:tc.has(r.liftType)})}}a.forEach(e=>{e.candidates.sort((e,t)=>e.isBigFour!==t.isBigFour?e.isBigFour?-1:1:e.tier!==t.tier?e.tier-t.tier:t.e1rm-e.e1rm),e.streak.tonnage=e.tonnage,e.streak.avgWeeklyTonnage=e.streak.weeks>0?e.tonnage/e.streak.weeks:0,e.streak.prs=e.candidates.slice(0,5),e.streak.prCount=e.candidates.length})}(a,e,r,n),(0,et.recordTiming)("Streak Leaderboard",performance.now()-i,`${a.length} streaks`),a}e.s(["MIN_SESSIONS_PER_WEEK",0,3,"MIN_STREAK_WEEKS",0,3,"PR_TIER_LIFETIME_AT_TIME",0,2,"PR_TIER_STILL_STANDING",0,1,"PR_TIER_TWELVE_MONTH_AT_TIME",0,3,"processStreakLeaderboard",0,th],973913);let tp=/\b(comp|competition|meet|championships?|nationals)\b/i,tm=/\b(Competition|Championships?|Nationals|Contest)\b/,tg=/\b(powerlifting|weightlifting|strongman|bench|deadlift) (competition|comp|meet|event|contest)\b|\bmeet day\b|\bcomp day\b/i,tw=/\b(1st|2nd|3rd|first|second|third) attempt\b/i,ty=/comp|meet|attempt|event|contest|champion|national/i,tb=/\b(imagine|imagining|find|possible|prep|preparing|dreaming|thinking|practice|treat|pretend|like a|for a comp|for the comp|next comp|upcoming|mock|will be|would be|window)\b/i,tS=/([A-Z0-9][\w'&.-]*(?:\s+(?:(?:and|of|the|at|in|for|de|du|la)\s+)?[A-Z0-9][\w'&.-]*)*\s+(?:Powerlifting\s+)?(?:Competition|Comp|Meet|Championships?|Contest|Open))/,tT=[{liftType:"Back Squat",name:"Squat"},{liftType:"Bench Press",name:"Bench"},{liftType:"Deadlift",name:"Deadlift"}];function tk(e){let t=performance.now(),r=new Map;if(!Array.isArray(e)||0===e.length)return r;let n=new Set,i=new Map;for(let t of e){if(!t.date||n.has(t.date)||!t.notes&&!t.label)continue;let e=function(e){if(e.label&&tp.test(e.label))return"meet";let t=e.notes;return!t||"string"!=typeof t||!ty.test(t)||tb.test(t)?null:tm.test(t)||tg.test(t)?"meet":tw.test(t)?"attempt":null}(t);if("meet"===e)n.add(t.date);else if("attempt"===e){let e=(i.get(t.date)??0)+1;i.set(t.date,e),e>=2&&n.add(t.date)}}if(n.size>0){let t=new Map;for(let r of e)n.has(r.date)&&(t.has(r.date)||t.set(r.date,[]),t.get(r.date).push(r));for(let e of Array.from(n).sort()){let n=t.get(e);r.set(e,{name:function(e){let t=e.find(e=>e.label&&tp.test(e.label));if(t)return t.label.trim();for(let t of e){let e=t.notes?.match(tS);if(e)return e[1].trim()}return null}(n),topSets:function(e){let t={};for(let r of e){if(!(r.reps>=1)||!(r.weight>0))continue;let e=t[r.liftType];(!e||(0,tf.toKg)(r.weight,r.unitType)>(0,tf.toKg)(e.weight,e.unitType))&&(t[r.liftType]=r)}return t}(n)})}}return(0,et.recordTiming)("Meet Days",performance.now()-t,`${r.size} meet day${1===r.size?"":"s"}`),r}function tv(e){let t=eo(e),r=e.slice(0,4);return t.includes(r)?t:`${t}, ${r}`}function tD(e,t,r){return e>=(t<r?t:r)&&e<=(t<r?r:t)}function tE(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(String(e)))return!1;let t=new Date(`${e}T00:00:00Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e}e.s(["MEET_LIFTS",0,tT,"formatMeetTotal",0,function(e,t){let r=tT.map(({liftType:t})=>e?.[t]);if(r.some(e=>!e||1!==e.reps))return null;let n=r.reduce((e,t)=>e+(0,tf.toKg)(t.weight,t.unitType),0);return t?`${Math.round(2*n)/2}kg`:`${Math.round(2.20462*n)}lb`},"processMeetDays",0,tk],106008);var tI=e.i(866353);{let e=ee.LOCAL_STORAGE_KEYS.SHEET_INFO;if(!localStorage.getItem(e)){try{let t=localStorage.getItem(ee.LOCAL_STORAGE_KEYS.SSID),r=t?JSON.parse(t):null;if(r){let t=localStorage.getItem(ee.LOCAL_STORAGE_KEYS.SHEET_URL),n=localStorage.getItem(ee.LOCAL_STORAGE_KEYS.SHEET_FILENAME),i=t?JSON.parse(t):null,a=i?decodeURIComponent(i):null,s=n?JSON.parse(n):null;localStorage.setItem(e,JSON.stringify({ssid:r,url:a,filename:s,modifiedTime:null,modifiedByMeTime:null}))}}catch{}localStorage.removeItem(ee.LOCAL_STORAGE_KEYS.SSID),localStorage.removeItem(ee.LOCAL_STORAGE_KEYS.SHEET_URL),localStorage.removeItem(ee.LOCAL_STORAGE_KEYS.SHEET_FILENAME)}}let t$=(()=>{try{let e=localStorage.getItem(ee.LOCAL_STORAGE_KEYS.SHEET_INFO);return!!JSON.parse(e)?.ssid}catch{return!1}})(),tL=async(...e)=>{let t=await fetch(...e),r=await t.json().catch(()=>null);if(!t.ok){let e=Error(r&&"string"==typeof r.error&&r.error||`${t.status} ${t.statusText||"Request failed"}`);throw e.status=t.status,e.statusText=t.statusText||null,e.responseBody=r,e}return r},tx=(0,n.createContext)(),tN=n.useLayoutEffect;e.s(["UserLiftingDataProvider",0,({children:e,demoAnchorDate:t})=>
1{let[a,s]=(0,n.useState)(null),[l,o]=(0,n.useState)(null),[u,d]=(0,n.useState)(null),[f,c]=(0,n.useState)(!1),[h,p]=(0,n.useState)(null),[m,g]=(0,n.useState)(null),[w,y]=(0,n.useState)(null),[b,S]=(0,n.useState)(null),[T,k]=(0,n.useState)(null);tN(()=>{try{let e=sessionStorage.getItem("sj_importedData");if(e){p(JSON.parse(e)),g(sessionStorage.getItem("sj_importedFormat")||null),y(sessionStorage.getItem("sj_importedFormatId")||null),S(sessionStorage.getItem("sj_importedFileName")||null);let t=sessionStorage.getItem("sj_importedDiagnostics");k(t?JSON.parse(t):null)}}catch{}},[]);let v=(0,n.useCallback)(async e=>{let{data:t,formatId:r,formatName:n,diagnostics:i}=await tt(e),a=(0,et.markHigherWeightAsHistoricalPRs)(t);p(a),g(n),y(r),S(e?.name||null),k(i);try{sessionStorage.setItem("sj_importedData",JSON.stringify(a)),sessionStorage.setItem("sj_importedFormat",n),sessionStorage.setItem("sj_importedFormatId",r),sessionStorage.setItem("sj_importedFileName",e?.name||""),i?sessionStorage.setItem("sj_importedDiagnostics",JSON.stringify(i)):sessionStorage.removeItem("sj_importedDiagnostics")}catch{}return{count:a.length,formatName:n,formatId:r,fileName:e?.name||null,entries:a,diagnostics:i}},[]),D=(0,n.useCallback)(()=>{p(null),g(null),y(null),S(null),k(null);try{sessionStorage.removeItem("sj_importedData"),sessionStorage.removeItem("sj_importedFormat"),sessionStorage.removeItem("sj_importedFormatId"),sessionStorage.removeItem("sj_importedFileName"),sessionStorage.removeItem("sj_importedDiagnostics")}catch{}},[]),E=!!h,{data:I,status:$}=(0,i.useSession)(),[L,x]=(0,tI.useLocalStorage)(ee.LOCAL_STORAGE_KEYS.IMPORT_PROFILE,null,{initializeWithValue:!1}),N=(0,n.useCallback)(e=>{e&&"object"==typeof e&&x(e)},[x]);(0,n.useEffect)(()=>{if("authenticated"!==$)return;let e=!1;fetch("/api/import/profile").then(async e=>e.ok?e.json():null).then(t=>{!e&&t&&Object.prototype.hasOwnProperty.call(t,"importProfile")&&x(t.importProfile)}).catch(()=>{});let t=t=>{!e&&t?.detail&&x(t.detail)};return window.addEventListener("sj-import-profile-updated",t),()=>{e=!0,window.removeEventListener("sj-import-profile-updated",t)}},[$,x]);let[C,_]=(0,tI.useLocalStorage)(ee.LOCAL_STORAGE_KEYS.SHEET_INFO,null,{initializeWithValue:!1}),[F,R]=(0,n.useState)(!1);tN(()=>{R(!0),document.documentElement.removeAttribute("data-restoring")},[]);let[P,A]=(0,n.useState)(!1),O=F&&t$&&!P&&!("authenticated"===$&&C?.ssid)&&"unauthenticated"!==$,W=function({authStatus:e,hasSheet:t,isImportedData:r,isReturningUserLoading:n,presumeDemo:i=!1}){return r?"import":n?"restoring":"loading"===e?i?"demo":"loading":"unauthenticated"===e?"demo":t?"sheet":"none"}({authStatus:$,hasSheet:!!C?.ssid,isImportedData:E,isReturningUserLoading:O,presumeDemo:!!t}),[B]=(0,n.useState)(()=>t??tr()),M=(0,n.useMemo)(()=>(0,et.markHigherWeightAsHistoricalPRs)(function(e=tr()){return tn.flatMap(({daysAgo:t,lifts:r})=>{let n=ey(e,t);return Object.entries(r).flatMap(([e,t])=>t.map(([t,r,i,a])=>({date:n,liftType:e,reps:t,weight:r,unitType:"lb",...i&&{notes:i},...a&&{URL:a}})))})}(B)),[B]),j="authenticated"===$&&!!C?.ssid,q=(0,n.useCallback)((e,t={})=>{(0,ti.gaTrackSheetLinked)(),tu(),_({ssid:e,url:t.url??null,filename:t.filename??null,modifiedTime:t.modifiedTime??null,modifiedByMeTime:t.modifiedByMeTime??null})},[_]),U=(0,n.useCallback)(()=>{A(!0),_(null)},[_]),{data:V,error:z,isLoading:G,isValidating:H,mutate:K}=Q("authenticated"===$&&I?.accessToken&&C?.ssid?`/api/sheet/read?ssid=${C.ssid}`:null,tL,{revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,revalidateOnMount:!0,onErrorRetry:(e,t,r,n,{retryCount:i})=>{if(e.status>=400&&e.status<500||i>=3){c(!0),(0,ti.gaEvent)(ti.GA_EVENT_TAGS.GSHEET_API_ERROR);return}setTimeout(()=>n({retryCount:i+1}),Math.min(1e3*2**i,3e4))},onSuccess:e=>{c(!1),"authenticated"===$&&e?.values&&o(Date.now())}}),Y=V?.values?.length??null,J=!!z,Z=Array.isArray(V?.values),X=(0,n.useMemo)(()=>z?{status:"number"==typeof z.status?z.status:null,statusText:"string"==typeof z.statusText?z.statusText:null,message:z.message||"Unknown API error"}:null,[z]);(0,n.useEffect)(()=>{let e=[{label:"Auth",done:"authenticated"===$,status:$},{label:"Fetch",done:!G&&!J,loading:G,error:J},{label:"Data",done:!!V?.values,status:V?.values?`${V.values.length} rows`:"waiting"}].map(e=>{let t=e.error?"✗":e.loading?"⏳":e.done?"✓":"○",r=e.status?` (${e.status})`:"";return`${t} ${e.label}${r}`}).join("  →  ");
1if(console.log(`%c🏋️ Data Pipeline%c  ${e}`,"color:#f59e0b;font-weight:bold","color:inherit"),"loading"===$||G)return;if(J){let e=z?.status?` (${z.status})`:"";console.error(`%c✗ GSheet API Error${e}%c ${z.message} — will retry on next revalidation`,"color:#ef4444;font-weight:bold","color:inherit"),d(null);return}let t=function({authStatus:e,data:t,dataSource:r,demoParsedData:n}){let i=null,a=null;if("authenticated"===e&&t?.values)try{i=e6(t.values),(0,ti.gaEvent)(ti.GA_EVENT_TAGS.GSHEET_DATA_UPDATED)}catch(e){console.error("Data parsing error:",e.message),a=e.message,console.error("%c✗ Parse failed%c — clearing saved sheet from localStorage","color:#ef4444;font-weight:bold","color:inherit"),(0,ti.gaEvent)(ti.GA_EVENT_TAGS.GSHEET_READ_REJECTED)}return"demo"===r?{parsedData:n,parseError:a}:(i||(i=[]),{parsedData:i=(0,et.markHigherWeightAsHistoricalPRs)(i),parseError:a})}({authStatus:$,data:V,dataSource:W,demoParsedData:M});t.parseError&&U(),s(t.parsedData),d(t.parseError)},[V,G,J,z,$,U,W,M]),(0,n.useEffect)(()=>{"authenticated"===$&&V?.values&&_(e=>{if(!e)return e;let t=V.webViewLink??e.url,r=V.name??e.filename,n=V.modifiedTime??e.modifiedTime,i=V.modifiedByMeTime??e.modifiedByMeTime;return t===e.url&&r===e.filename&&n===e.modifiedTime&&i===e.modifiedByMeTime?e:{...e,url:t,filename:r,modifiedTime:n,modifiedByMeTime:i}})},[$,V?.values,V?.name,V?.webViewLink,V?.modifiedTime,V?.modifiedByMeTime,_]);let er=h||a||("demo"===W?M:null),en=(0,n.useMemo)(()=>(function(e,t={}){if(!Array.isArray(e)||e.length<3||"demo"===t.dataSource)return[];let r=function(e){let t=e.filter(e=>e.date&&Number.isFinite(e.rowIndex)).slice().sort((e,t)=>e.rowIndex-t.rowIndex),r=[];for(let e of t){let t=r[r.length-1];if(!t||t.date!==e.date){r.push({date:e.date,startRowIndex:e.rowIndex,endRowIndex:e.rowIndex,entries:[e],liftTypes:new Set([e.liftType].filter(Boolean))});continue}t.endRowIndex=Math.max(t.endRowIndex,e.rowIndex),t.entries.push(e),e.liftType&&t.liftTypes.add(e.liftType)}return r}(e);if(r.length<3)return[];let n=[];for(let e=1;e<r.length-1;e+=1){let t=r[e-1],i=r[e],a=r[e+1],s=function({currentDate:e,previousDate:t,nextDate:r}){if(!tE(e)||!tE(t)||!tE(r))return null;let n=e.slice(0,4),i=e.slice(4);for(let l of new Set([t.slice(0,4),r.slice(0,4)])){if(l===n)continue;let o=`${l}${i}`;if(!(!tE(o)||!tD(o,t,r)||tD(e,t,r))){var a,s;if(!(180>(a=e,s=o,Math.abs(Date.parse(`${a}T00:00:00Z`)-Date.parse(`${s}T00:00:00Z`))/864e5)))return o}}return null}({currentDate:i.date,previousDate:t.date,nextDate:a.date});s&&n.push({type:"date-outlier",severity:"warning",signature:["date-outlier",`rows-${i.startRowIndex}-${i.endRowIndex}`,i.date,s].join(":"),rowIndex:i.startRowIndex,startRowIndex:i.startRowIndex,endRowIndex:i.endRowIndex,currentDate:i.date,suggestedDate:s,previousDate:t.date,nextDate:a.date,affectedSetCount:i.entries.length,affectedLiftTypes:[...i.liftTypes],title:"Possible date typo",actionLabel:`Fix year to ${s.slice(0,4)}`,message:function({currentDate:e,suggestedDate:t,previousDate:r,nextDate:n,affectedSetCount:i}){let a=1===i?"set":"sets",s=t.slice(0,4),l=e.slice(0,4),o=tv(t).replace(/\s+\d{1,2},?\s+/," ").trim();return`We found ${i.toLocaleString()} ${a} in your ${o} sequence with the year set to ${l}. ${tv(t)} would fit between ${tv(r)} and ${tv(n)}. Did you mean to use ${s} instead?`}({currentDate:i.date,suggestedDate:s,previousDate:t.date,nextDate:a.date,affectedSetCount:i.entries.length})})}return n.slice(0,3)})(er,{dataSource:W}),[er,W]),ei=C?.ssid,ea=(0,n.useCallback)(async e=>{if(e?.type!=="date-outlier")throw Error("Unsupported data quality warning.");if(h){let t=(0,et.markHigherWeightAsHistoricalPRs)(function(e,t){if(!Array.isArray(e)||t?.type!=="date-outlier")return e;let r=t.startRowIndex,n=t.endRowIndex,i=Number.isFinite(r)&&Number.isFinite(n),a=e.map(e=>{let a=i&&Number.isFinite(e.rowIndex)&&e.rowIndex>=r&&e.rowIndex<=n,s=e.date===t.currentDate;return(a||!i&&s)&&s?{...e,date:t.suggestedDate}:e});return a.sort((e,t)=>e.date!==t.date?e.date.localeCompare(t.date):(e.rowIndex??0)-(t.rowIndex??0)),a}(h,e));p(t);try{sessionStorage.setItem("sj_importedData",JSON.stringify(t))}catch{}return{updated:!0,mode:"preview"}}if(!ei)throw Error("No linked data source is available to update.");let t=await fetch("/api/sheet/fix-date-outlier",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ssid:ei,startRowIndex:e.startRowIndex,endRowIndex:e.endRowIndex,currentDate:e.currentDate,suggestedDate:e.suggestedDate})}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r?.error||"Could not update the date.");return await K(),{...r,mode:"linked"}},[h,ei,K]),es=(0,n.useMemo)(()=>er?(0,et.calculateLiftTypes)(er):[],[er]),{topLiftsByTypeAndReps:el,topLiftsByTypeAndRepsLast12Months:eo}=(0,n.useMemo)(()=>er&&es.length?(0,et.processTopLiftsByTypeAndReps)(er,es):{topLiftsByTypeAndReps:null,topLiftsByTypeAndRepsLast12Months:null},[er,es]),{topTonnageByType:eu,topTonnageByTypeLast12Months:ed}=(0,n.useMemo)(()=>er&&es.length?(0,et.processTopTonnageByType)(er,es):{topTonnageByType:null,topTonnageByTypeLast12Months:null},[er,es]),ef=(0,n.useMemo)(()=>er?(0,et.processSessionTonnageLookup)(er):null,[er]),ec=(0,n.useMemo)(()=>er?tk(er):null,[er]),eh=(0,n.useMemo)(()=>er&&ef&&el?th({parsedData:er,allSessionDates:ef.allSessionDates,topLiftsByTypeAndReps:el}):null,[er,ef,el]);return(0,n.useEffect)(()=>{er&&ef&&null!==eh&&(0,et.flushTimings)()}
1,[er,ef,eh]),(0,r.jsx)(tx.Provider,{value:{isLoading:G,isError:J,fetchFailed:f,apiError:X,isValidating:H,importedFormatName:m,importedFormatId:w,importedFileName:b,importedDiagnostics:T,importProfile:L,rememberImportProfile:N,parseError:u,liftTypes:es,parsedData:er,topLiftsByTypeAndReps:el,topLiftsByTypeAndRepsLast12Months:eo,topTonnageByType:eu,topTonnageByTypeLast12Months:ed,sessionTonnageLookup:ef,meetDays:ec,streakLeaderboard:eh,rawRows:Y,hasCachedSheetData:Z,dataSyncedAt:l,dataQualityWarnings:en,fixDataQualityWarning:ea,mutate:K,sheetInfo:C,selectSheet:q,clearSheet:U,dataSource:W,hasLinkedSheet:j,importFile:v,clearImportedData:D,sheetParsedData:a},children:e})},"isOwnData",0,function(e){return"sheet"===e||"import"===e},"useUserLiftingData",0,()=>(0,n.useContext)(tx)],978489)}]);

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.