PageSourceSearch

https://pdftrackr.com/_next/static/chunks/2709.a65073b9d97e36a8.js

js pdftrackr.com collected 2026-10-04 20:19:00 UTC 6,258 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2709],{62709:function(e,t,a){a.r(t),a.d(t,{default:function(){return K}});var s=a(46793),i=a(64187),r=a(19584),n=a(1190),l=a(40813),c=a(20499),o=a(8124),d=a(27124),m=a(77543),u=a(17538),h=a(66803),x=a(49612),p=a(56663),g=a(86210);let b=g.H.line,j=g.H.bar,N=g.H.barActive,f=g.H.axis,v=g.H.grid,k=g.H.ghost,y=g.H.attention,w=e=>String(e).replace(/^Page\s+/i,""),M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,a=Math.max(1,Math.floor(e)||0);if(a<=t)return Array.from({length:a},(e,t)=>t+1);let s=[];for(let e=0;e<t;e++){let i=Math.round(1+e*(a-1)/(t-1));s[s.length-1]!==i&&s.push(i)}return s},A=e=>{let t=Math.round((Number(e)||0)/1e3);return"".concat(Math.floor(t/60),":").concat(String(t%60).padStart(2,"0"))},D=e=>Array.from({length:null==e?8:Math.min(Math.max(e,1),20)},(e,t)=>{let a=t+1;return{page:"Page ".concat(a),pageNumber:a,median:7e4+Math.round(25e3*Math.sin(1.3*a))+a%3*8e3}});function S(e){let{cx:t,cy:a}=e;return null==t||null==a?(0,s.jsx)("g",{}):(0,s.jsx)("path",{d:"M ".concat(t," ").concat(a-6," L ").concat(t+5," ").concat(a+3," L ").concat(t-5," ").concat(a+3," Z"),fill:y})}function B(e){let{active:t,payload:a,label:r}=e;if(!t||!a||0===a.length)return null;let n=a[0].payload;return(0,s.jsxs)("div",{className:"rounded-md border border-slate-200 bg-surface px-3 py-2 shadow-e3 text-ui text-slate-700",children:[(0,s.jsx)("p",{className:"font-medium text-slate-900",children:r}),(0,s.jsxs)("p",{children:["Typical time: ",(0,i.PK)(n.median)]}),n.band[0]!==n.band[1]&&(0,s.jsxs)("p",{className:"text-slate-500",children:["Most readers: ",(0,i.PK)(n.band[0]),"–",(0,i.PK)(n.band[1])]}),(0,s.jsxs)("p",{className:"text-slate-500",children:[n.views," views \xb7 ",Math.round(n.skimRate),"% skimmed this page"]})]})}function H(e){let{dwellData:t,ghostData:a,hasSkimMarkers:i}=e,r=t.length>0,p=r?t.length:a.length,g=p<=24,D=r?t:a,H=r?f:k,P=r?b:k,K=r?j:k;return(0,s.jsxs)("section",{"aria-label":"Reading time per page",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-3",children:[(0,s.jsxs)("p",{className:"text-ui text-slate-600",children:["How long readers spend on each page — ",g?"taller means":"higher means"," more attention. Hover a ",g?"bar":"point"," for the typical range."]}),i&&(0,s.jsxs)("p",{className:"text-micro normal-case tracking-normal text-warning-text",children:["▲ ",30,"%+ of views skimmed this page"]})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(n.h,{width:"100%",height:320,children:(0,s.jsxs)(l.c,{data:D,margin:{top:8,right:16,left:8,bottom:0},children:[(0,s.jsx)(c.q,{strokeDasharray:"3 3",stroke:v,vertical:!1}),(0,s.jsx)(o.K,{dataKey:"page",tickFormatter:w,tick:{fontSize:12,fill:H},tickLine:!1,axisLine:{stroke:v},ticks:M(p).map(e=>"Page ".concat(e))}),(0,s.jsx)(d.B,{tick:{fontSize:12,fill:H},tickLine:!1,axisLine:!1,allowDecimals:!1,tickFormatter:A,tickCount:5,domain:[0,e=>Math.max(1,Math.ceil(1.2*e))]}),r&&(0,s.jsx)(m.u,{cursor:!g&&{stroke:v,strokeDasharray:"3 3"},content:(0,s.jsx)(B,{})}),g?(0,s.jsx)(u.$,{dataKey:"median",fill:K,activeBar:!!r&&{fill:N},radius:[4,4,0,0],isAnimationActive:!1,maxBarSize:48}):(0,s.jsx)(h.x,{type:"linear",dataKey:"median",stroke:P,strokeWidth:2,dot:{fill:P,strokeWidth:0,r:3},activeDot:!!r&&{r:5},isAnimationActive:!1}),r&&i&&(0,s.jsx)(x.b,{dataKey:"skimMarker",fill:y,isAnimationActive:!1,shape:S})]})}),!r&&(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,s.jsxs)("div",{className:"text-center px-6 py-4 bg-surface/90 rounded-lg border border-slate-200 shadow-e2",children:[(0,s.jsx)("p",{className:"text-ui font-medium text-slate-700 mb-1",children:"No page data available yet"}),(0,s.jsx)("p",{className:"text-micro normal-case tracking-normal text-slate-500",children:"This preview shows what your analytics will look like"})]})})]})]})}function P(e){let{totalPages:t,data:a,loading:i,error:n,onRetry:l}=e,c=(0,r.useMemo)(()=>(null==a?void 0:a.pageStats)&&Array.isArray(a.pageStats)?a.pageStats.map(e=>({page:"Page ".concat(e.pageNumber),pageNumber:e.pageNumber,median:Number(e.medianDuration)||0,band:[Number(e.p25Duration)||0,Number(e.p75Duration)||0],avg:Number(e.avgDuration)||0,views:Number(e.totalViews)||0,skimRate:Number(e.skimRate)||0,skimMarker:(Number(e.skimRate)||0)>=30?Number(e.medianDuration)||0:null})).sort((e,t)=>
1e.pageNumber-t.pageNumber):[],[a]),o=c.some(e=>null!=e.skimMarker),d=c.length>0,m=(0,r.useMemo)(()=>d?[]:D(t),[d,t]);return i?(0,s.jsx)(p.Z,{type:"card",count:2}):n?(0,s.jsxs)("div",{className:"empty-state",children:[(0,s.jsx)("p",{className:"text-ui text-destructive mb-4",role:"alert",children:n}),(0,s.jsx)("button",{type:"button",onClick:l,className:"btn-primary btn-md",children:"Retry"})]}):a?(0,s.jsx)("div",{className:"space-y-8",children:(0,s.jsx)(H,{dwellData:c,ghostData:m,hasSkimMarkers:o})}):(0,s.jsx)("div",{className:"empty-state",children:(0,s.jsx)("p",{className:"text-ui text-slate-500",children:"No analytics data available yet"})})}function K(e){var t,a;let{totalPages:i,aggregate:r,loading:n,error:l,onRetry:c,days:o}=e,d=(null!==(a=null==r?void 0:null===(t=r.pageStats)||void 0===t?void 0:t.length)&&void 0!==a?a:0)>0;return(0,s.jsx)("div",{className:"card",children:(0,s.jsxs)("div",{className:"card-body",children:[(0,s.jsxs)("div",{className:"mb-4 flex items-baseline justify-between gap-2",children:[(0,s.jsx)("h2",{className:"font-display text-card-title text-slate-900",children:"Page Analytics"}),(0,s.jsxs)("span",{className:"whitespace-nowrap text-micro uppercase tracking-wide text-slate-500",children:["Last ",o," days"]})]}),d||n||l?(0,s.jsx)(P,{totalPages:i,data:r,loading:n,error:l,onRetry:c}):(0,s.jsx)("div",{className:"empty-state",children:(0,s.jsx)("p",{className:"empty-state-body",children:"No pages read yet. Once someone opens the document, this shows how long readers spend on each page."})})]})})}},86210:function(e,t,a){a.d(t,{H:function(){return s}});let s={bar:"#6A90B5",barActive:"#2B4869",line:"#2B4869",lineFill:"rgba(43, 72, 105, 0.15)",compare:"#64748B",attention:"#D97706",attentionText:"#B45309",grid:"#E2E8F0",ghost:"#CBD5E1",axis:"#64748B"}}}]);

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.