1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6386],{7361:(e,t,l)=>{l.d(t,{E:()=>n.E,K:()=>r.K});var r=l(81058),n=l(93640)},16386:(e,t,l)=>{l.r(t),l.d(t,{RegionsMap:()=>p});var r=l(95155),n=l(12115),a=l(55878),i=l(68965),s=l(71830),o=l(10047),u=l(6191),c=l(7125),d=l(7361),f=l(66964),h=l(80774);let v=(e,t,l)=>Math.min(l,Math.max(t,e));function p(e){let{rows:t}=e,{t:p}=(0,a.Bd)("workspace"),[x,m]=(0,n.useState)(null),b=(0,n.useRef)(null),[y,g]=(0,n.useState)({k:1,x:0,y:0}),k=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=!0;return l.e(1767).then(l.t.bind(l,11767,19)).then(t=>{var l;let r=null!=(l=t.default)?l:t,n=(0,o.A)(r,r.objects.countries);e&&m(n.features)}),()=>{e=!1}},[]);let{byNumeric:w,max:j}=(0,n.useMemo)(()=>{let e=new Map,l=0;for(let r of t){let t=f.di[r.value];t&&(e.set(t,r.visitors),l=Math.max(l,r.visitors))}return{byNumeric:e,max:l||1}},[t]),C=(0,n.useMemo)(()=>{if(!x)return null;let e=(0,i.A)().fitSize([800,400],{type:"FeatureCollection",features:x});return(0,s.A)(e)},[x]),A=(0,n.useCallback)(e=>{let t=v(e.k,1,8);return{k:t,x:v(e.x,800*(1-t),0),y:v(e.y,400*(1-t),0)}},[]),E=(0,n.useCallback)((e,t)=>{var l;let r=null==(l=b.current)?void 0:l.getBoundingClientRect();return r?{x:(e-r.left)/r.width*800,y:(t-r.top)/r.height*400}:{x:400,y:200}},[]),M=(0,n.useCallback)((e,t,l)=>{g(r=>{let n=v(r.k*e,1,8),a=n/r.k;return A({k:n,x:t-(t-r.x)*a,y:l-(l-r.y)*a})})},[A]);(0,n.useEffect)(()=>{let e=b.current;if(!e)return;let t=e=>{e.preventDefault();let{x:t,y:l}=E(e.clientX,e.clientY);M(e.deltaY<0?1.15:1/1.15,t,l)};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[E,M]);let N=e=>{var t,l;null==(t=(l=e.currentTarget).releasePointerCapture)||t.call(l,e.pointerId),k.current=null};return x&&C?(0,r.jsxs)("div",{className:"relative h-full w-full",children:[(0,r.jsx)("svg",{ref:b,viewBox:"0 0 ".concat(800," ").concat(400),preserveAspectRatio:"xMidYMid meet",className:"h-full w-full cursor-grab touch-none select-none active:cursor-grabbing",role:"img","aria-label":p("websiteAnalytics.map.ariaLabel"),onPointerDown:e=>{var t,l;null==(t=(l=e.currentTarget).setPointerCapture)||t.call(l,e.pointerId),k.current={px:e.clientX,py:e.clientY,x:y.x,y:y.y}},onPointerMove:e=>{var t;let l=k.current,r=null==(t=b.current)?void 0:t.getBoundingClientRect();if(!l||!r)return;let n=(e.clientX-l.px)/r.width*800,a=(e.clientY-l.py)/r.height*400;g(e=>A({k:e.k,x:l.x+n,y:l.y+a}))},onPointerUp:N,onPointerLeave:N,children:(0,r.jsx)("g",{transform:"translate(".concat(y.x," ").concat(y.y,") scale(").concat(y.k,")"),children:x.map((e,t)=>{var l,n,a;let i=C(e);if(!i)return null;let s=String(null!=(n=e.id)?n:""),o=null!=(a=w.get(s))?a:0,u=(null==(l=e.properties)?void 0:l.name)||"";return(0,r.jsx)("path",{d:i,fill:o>0?"var(--info)":"var(--surface-tertiary)",fillOpacity:o>0?.35+o/j*.6:1,stroke:"var(--surface)",strokeWidth:.5,vectorEffect:"non-scaling-stroke",children:(0,r.jsx)("title",{children:p("websiteAnalytics.map.countryTooltip",{country:u,count:(0,h.B4)(o)})})},s||t)})})}),(0,r.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col overflow-hidden rounded-md border border-line bg-surface shadow-sm",children:[(0,r.jsx)(d.K,{variant:"ghost",size:"sm",label:p("websiteAnalytics.map.zoomIn"),onClick:()=>M(1.4,400,200),className:"rounded-none",children:(0,r.jsx)(u.A,{size:16})}),(0,r.jsx)(d.K,{variant:"ghost",size:"sm",label:p("websiteAnalytics.map.zoomOut"),onClick:()=>M(1/1.4,400,200),className:"rounded-none border-t border-line",children:(0,r.jsx)(c.A,{size:16})})]})]}):(0,r.jsx)(d.E,{className:"h-full min-h-64 w-full"})}}}]);
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.