1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6680],{84785:function(e,t,n){n.d(t,{Z:function(){return o}});var o=(0,n(30853).Z)("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]])},61075:function(e,t,n){var o=n(85893);n(67294);var i=n(41664),s=n.n(i),a=n(11163),d=n(84785),u=n(60802),c=n(44176),h=n(62967);let x=["Bet Sizing Advice","Best Line Advice","Contest Alerts","Arbitrage Opportunity Alerts","Manual Data Refresh"];t.Z=e=>{let{opened:t,onClose:n,title:i,body:j,ctaLabel:N="Upgrade Now",trackingSource:R,featureList:k,showLockIcon:A=!1,navigateWithRouter:_=!1,cancelDestructive:U=!1}=e,D=(0,a.useRouter)(),{trackUpgradeClick:F}=(0,h.j)(),I=!0===k?x:null!=k?k:null;return(0,o.jsx)(c.Vq,{open:t,onOpenChange:e=>!e&&n(),children:(0,o.jsxs)(c.cZ,{className:"backdrop-blur-sm",children:[(0,o.jsx)(c.fK,{children:(0,o.jsxs)(c.$N,{className:A?"flex items-center gap-2":void 0,children:[A?(0,o.jsx)(d.Z,{size:20}):null,i]})}),(0,o.jsx)("div",{className:"text-base text-muted-foreground",children:j}),I?(0,o.jsx)("ul",{className:"list-disc space-y-1 py-3 pl-5 text-muted-foreground",children:I.map(e=>(0,o.jsx)("li",{children:e},e))}):null,(0,o.jsxs)(c.cN,{className:U?"flex flex-col gap-2 sm:flex-row sm:justify-center":void 0,children:[(0,o.jsx)(u.z,{variant:"outline",className:U?"border-destructive text-destructive":void 0,onClick:n,children:"Cancel"}),_?(0,o.jsx)(u.z,{onClick:()=>{F(R),_&&(n(),D.push("/billing"))},children:N}):(0,o.jsx)(u.z,{asChild:!0,children:(0,o.jsx)(s(),{href:"/billing",onClick:()=>F(R),children:N})})]})]})})}},26680:function(e,t,n){n.r(t),n.d(t,{default:function(){return diaryTable}});var o=n(85893),i=n(67294),s=n(27060),a=n(74094),d=n(91271),u=n(69814);function collapseRow(e){if(1===e.subRows.length){let n=e.subRows[0];if(n){let o=collapseRow(n),i=e.getAllCells().filter(e=>void 0!==e);for(let n=e.depth;n<o.depth;n++){var t;(!i||!i[n]||(null===(t=i[n])||void 0===t?void 0:t.getIsGrouped))&&(i[n].getIsGrouped=()=>!0)}e.groupingColumnId=o.groupingColumnId,e.subRows=o.subRows,e.depth=o.depth}}return e}var c=n(75487),h=n(98741),x=n(8755),j=n(14442),N=n(61075),R=n(15935),k=n(100),A=n(90121),_=n(27899),U=n(60802),D=n(97537);let F=(0,s.Cl)();function GroupedTableBody(e){let{rows:t}=e;return(0,o.jsx)(o.Fragment,{children:t.map(e=>{var t;return(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(_.SC,{children:e.getVisibleCells().map(e=>(0,o.jsx)(_.pj,{children:(0,a.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(null===(t=e.subRows)||void 0===t?void 0:t.length)?(0,o.jsx)(GroupedTableBody,{rows:e.subRows}):null]},e.id)})})}var diaryTable=e=>{let{user:t,customData:n,customDataLoading:I,exportDataText:H,isDemo:Z}=e,[V,q]=(0,i.useState)(n),[W,$]=(0,i.useState)(I),[Y,J]=(0,i.useState)([]);(0,i.useEffect)(()=>{q(n),$(I)},[n,I]);let ee=(0,i.useMemo)(()=>{let e=null==V?void 0:V.reduce((e,t)=>{var n;let o=null==t?void 0:null===(n=t.bets)||void 0===n?void 0:n.map(e=>({...t,bets:[e]}));return[...e,...o]},[]);return e},[V]),el=(0,i.useMemo)(()=>[F.accessor("id",{header:"Type",sortingFn:(e,t)=>{var n,o;let i=(null!==(n=e.original.type)&&void 0!==n?n:"").toUpperCase(),s=(null!==(o=t.original.type)&&void 0!==o?o:"").toUpperCase();return i.localeCompare(s)},cell:e=>{var t,n;let{row:i}=e;if(!i.getIsGrouped())return null;let s=null==i?void 0:null===(n=i.original)||void 0===n?void 0:null===(t=n.type)||void 0===t?void 0:t.toUpperCase();return(0,o.jsx)(u.Z,{variant:"dot",text:s})}}),F.accessor(e=>{var t,n;return null!==(n=null==e?void 0:null===(t=e.book)||void 0===t?void 0:t.name)&&void 0!==n?n:""},{id:"book",header:"Book",cell:e=>{var t,n;let{row:i}=e,s=null==i?void 0:null===(n=i.original)||void 0===n?void 0:null===(t=n.book)||void 0===t?void 0:t.name;return(0,o.jsx)("span",{className:"text-xs",children:s})}}),F.display({id:"description",header:"Description",enableSorting:!1,cell:e=>{var t;let{row:n}=e;return null===(t=n.original.bets)||void 0===t?void 0:t.map(e=>(0,o.jsx)("span",{className:"block text-xs",children:null==e?void 0:e.bookDescription},e.id))}}),F.accessor(e=>{var t,n,o,i;return null!==(i=null==e?void 0:null===(o=e.bets)||void 0===o?void 0:null===(n=o[0])||void 0===n?void 0:null===(t=n.event)||void 0===t?void 0:t.sport)&&void 0!==i?i:""},{id:"sport",header:"Sport",cell:e=>{var t,n;let{row:i}=e;return(null==i?void 0:null===(n=i.original)||void 0===n?void 0:null===(t=n.bets)||void 0===t?void 0:t.length)>0?(0,o.jsx)("div",{className:"flex flex-col items-end justify-center",children:i.original.bets.map(e=>{var t,n;return(0,o.jsx)(u.Z,{text:(null==e?void 0:null===(n=e.event)||void 0===n?void 0:null===(t=n.sport)||void 0===t?void 0:t.toUpperCase())||""},null==e?void 0:e.id)})}):null}}),F.accessor(e=>{var t,n,o,i;return null!==(i=null==e?void 0:null===(o=e.bets)||void 0===o?void 0:null===(n=o[0])||void 0===n?void 0:null===(t=n.event)||void 0===t?void 0:t.league)&&void 0!==i?i:"unknown"},{id:"league",header:"League",cell:e=>{var t,n;let{row:i}=e;return(null==i?void 0:null===(n=i.original)||void 0===n?void 0:null===(t=n.bets)||void 0===t?void 0:t.length)>0?(0,o.jsx)("div",{className:"flex flex-col items-end justify-center",children:i.original.bets.map(e=>{var t,n;return(0,o.jsx)(u.Z,{text:(null==e?void 0:null===(n=e.event)||void 0===n?void 0:null===(t=n.league)||void 0===t?void 0:t.toUpperCase())||"",enableTooltip:!0},e.id)})}):null}}),F.accessor(e=>{var t,n;let o=String(null==e?void 0:null===(n=e.bets)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.oddsAmerican);return Number(o)},{id:"oddsAmerican",header:"Odds",cell:e=>{var t,n,i,s;let{row:a}=e;if((null==a?void 0:null===(n=a.original)||void 0===n?void 0:null===(t=n.bets)||void 0===t?void 0:t.length)>=0){let e="";return null==a||null===(s=a.original)||void 0===s||null===(i=s.bets)||void 0===i||i.forEac
1h(t=>{if(null==t?void 0:t.oddsAmerican){if((null==t?void 0:t.oddsAmerican)>0){e="+".concat(null==t?void 0:t.oddsAmerican);return}e=String(null==t?void 0:t.oddsAmerican)}}),(0,o.jsx)("span",{className:"text-xs",children:e})}return null}}),F.accessor(e=>{let t=String(null==e?void 0:e.atRisk);return Number(t=null==t?void 0:t.replace(/[^0-9]/g,""))},{id:"atRisk",header:"At Risk",cell:e=>{let{getValue:t}=e,n=t();return(0,o.jsx)("span",{className:"text-xs",children:(0,d.x)(n,!0)})}}),F.accessor(e=>Number(null==e?void 0:e.toWin)||0,{id:"toWin",header:"To Win",cell:e=>{let{getValue:t}=e,n=t();return(0,o.jsx)("span",{className:"text-xs",children:(0,d.x)(n,!0)})}}),F.accessor(e=>{var t,n,o;return null!==(o=null==e?void 0:null===(n=e.bets)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.closingPrice)&&void 0!==o?o:null},{id:"closingPrice",header:"Closing Price",cell:e=>{var t,n;let{row:i}=e;if((null==i?void 0:null===(n=i.original)||void 0===n?void 0:null===(t=n.bets)||void 0===t?void 0:t.length)>0){let e=i.original.bets.map(e=>{let t=null==e?void 0:e.closingPrice;return null==t?null:(0,o.jsx)("span",{className:"block text-xs",children:t>0?"+".concat(t.toFixed(0)):t.toFixed(0)},e.id)}),t=e.filter(Boolean);return(0,o.jsx)("div",{className:"flex flex-col items-end justify-center",children:t.length>0?e:(0,o.jsx)("span",{className:"text-xs text-muted-foreground",children:"-"})})}return(0,o.jsx)("span",{className:"text-xs text-muted-foreground",children:"-"})}}),F.accessor(e=>{var t,n,o;return null!==(o=null==e?void 0:null===(n=e.bets)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.closingPoints)&&void 0!==o?o:null},{id:"closingPoints",header:"Closing Points",cell:e=>{var t,n;let{row:i}=e;if((null==i?void 0:null===(n=i.original)||void 0===n?void 0:null===(t=n.bets)||void 0===t?void 0:t.length)>0){let e=i.original.bets.map(e=>{let t=null==e?void 0:e.closingPoints;return null==t?null:(0,o.jsx)("span",{className:"block text-xs",children:t>0?"+".concat(t.toFixed(1)):t.toFixed(1)},e.id)}),t=e.filter(Boolean);return(0,o.jsx)("div",{className:"flex flex-col items-end justify-center",children:t.length>0?e:(0,o.jsx)("span",{className:"text-xs text-muted-foreground",children:"-"})})}return(0,o.jsx)("span",{className:"text-xs text-muted-foreground",children:"-"})}}),F.accessor(e=>{var t,n;let o=null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.toUpperCase(),i=null==e?void 0:null===(n=e.outcome)||void 0===n?void 0:n.toUpperCase();return"PENDING"===o?o:i},{id:"outcome",header:"Outcome",cell:e=>{var t;let{row:n}=e;return null===(t=n.original.bets)||void 0===t?void 0:t.map(e=>{var t,n;let i=null==e?void 0:null===(t=e.status)||void 0===t?void 0:t.toUpperCase();if("PENDING"===i)return(0,o.jsx)(u.Z,{text:i},e.id);let s=null==e?void 0:null===(n=e.outcome)||void 0===n?void 0:n.toUpperCase();return(0,o.jsx)("div",{className:"flex flex-col items-end justify-center",children:(0,o.jsx)(u.Z,{text:s||""})},e.id)})}})],[]),[et,{open:er,close:en}]=(0,x.q)(!1),handleExport=()=>{if((0,R.L)("Export Data",{userId:"DEMO",numberOfRecords:(null==ee?void 0:ee.length)||0}),!(0,k.BZ)({stripeSubscriptionStatus:null==t?void 0:t.stripeSubscriptionStatus,isOrgCreator:null==t?void 0:t.isOrgCreator,hasActiveMembershipGrant:null==t?void 0:t.hasActiveMembershipGrant})&&!Z)return(0,R.L)("Paywall Click",{userId:(null==t?void 0:t.id)||"",event:"Export Data"}),er();let e=(0,c.iL)({useKeysAsHeaders:!0,filename:"".concat(A.O.NEXT_PUBLIC_ORGANIZATION_NAME,"_export")}),n=null==ee?void 0:ee.map(e=>(0,h.F)(e)),o=(0,c.gB)(e)(null!=n?n:[]);(0,c.LR)(e)(o)},eo=null!=ee?ee:[],ei=(0,a.b7)({data:eo,columns:el,state:{sorting:Y},onSortingChange:J,initialState:{grouping:["id"],expanded:!0},getCoreRowModel:(0,s.sC)(),getSortedRowModel:(0,s.tj)(),getGroupedRowModel:e=>(0,s.X$)(()=>[e.getState().grouping,e.getPreGroupedRowModel()],(t,n)=>{if(!n.rows.length||!t.length)return n;let o=t.filter(t=>e.getColumn(t)),i=[],a={},groupUpRecursively=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,d=arguments.length>2?arguments[2]:void 0;if(n>=o.length)return t.map(e=>(e.depth=n,i.push(e),a[e.id]=e,e.subRows&&(e.subRows=groupUpRecursively(e.subRows,n+1)),collapseRow(e)));let u=o[n],c=function(e,t){let n=new Map;return e.reduce((e,n)=>{let o="".concat(n.getValue(t)),i=e.get(o);return i?i.push(n):e.set(o,[n]),e},n)}(t,u),h=Array.from(c.entries()).map((t,c)=>{var h;let[x,j]=t,N="".concat(u,":").concat(x);N=d?"".concat(d,">").concat(N):N;let R=groupUpRecursively(j,n+1,N),k=n?(0,s.p9)(j,e=>e.subRows):j,A=(0,s.v)(e,N,null===(h=k[0])||void 0===h?void 0:h.original,c,n);return Object.assign(A,{groupingColumnId:u,groupingValue:x,subRows:R,leafRows:k,getValue:t=>{var n,i;if(o.includes(t))return A._valuesCache.hasOwnProperty(t)||j[0]&&(A._valuesCache[t]=null!==(n=j[0].getValue(t))&&void 0!==n?n:void 0),A._valuesCache[t];if(A._groupingValuesCache.hasOwnProperty(t))return A._groupingValuesCache[t];let s=e.getColumn(t),a=null==s?void 0:s.getAggregationFn();return a?(A._groupingValuesCache[t]=a(t,k,j),A._groupingValuesCache[t]):j.length<=1?(A._valuesCache.hasOwnProperty(t)||j[0]&&(A._valuesCache[t]=null!==(i=j[0].getValue(t))&&void 0!==i?i:void 0),A._valuesCache[t]):void 0}}
1),R.forEach(e=>{i.push(e),a[e.id]=e}),collapseRow(A)});return h},d=groupUpRecursively(n.rows,0,"");return d.forEach(e=>{i.push(e),a[e.id]=e}),{rows:d,flatRows:i,rowsById:a}},{key:"getGroupedRowModel",debug:()=>{var t;return null!==(t=e.options.debugAll)&&void 0!==t?t:e.options.debugTable},onChange:()=>{e._queue(()=>{e._autoResetExpanded(),e._autoResetPageIndex()})}}),getExpandedRowModel:(0,s.rV)()}),es=ei.getRowModel().rows;return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(j.Z,{children:[(0,o.jsx)(N.Z,{opened:et,onClose:en,title:"Feature Locked",body:"You must be a paid user to export your data. In addition to exporting your data, Paid users get access to:",trackingSource:"PAYWALL_MODAL",featureList:!0,cancelDestructive:!0}),(0,o.jsxs)("div",{className:"flex flex-col rounded-md border border-border",children:[(0,o.jsx)("div",{className:"max-h-[74vh] overflow-auto",children:W&&0===eo.length?(0,o.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:"Loadingâ¦"}):0===eo.length?(0,o.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:"No slips"}):(0,o.jsxs)(_.iA,{children:[(0,o.jsx)(_.xD,{children:ei.getHeaderGroups().map(e=>(0,o.jsx)(_.SC,{children:e.headers.map(e=>{let t=e.column.getIsSorted();return(0,o.jsx)(_.ss,{onClick:e.column.getToggleSortingHandler(),className:(0,D.cn)(e.column.getCanSort()&&"cursor-pointer select-none"),"aria-sort":"asc"===t?"ascending":"desc"===t?"descending":void 0,children:e.isPlaceholder?null:(0,o.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.ie)(e.column.columnDef.header,e.getContext()),"asc"===t?(0,o.jsx)("span",{"aria-hidden":!0,children:"â²"}):"desc"===t?(0,o.jsx)("span",{"aria-hidden":!0,children:"â¼"}):null]})},e.id)})},e.id))}),(0,o.jsx)(_.RM,{children:(0,o.jsx)(GroupedTableBody,{rows:es})})]})}),W||H||Z?(0,o.jsx)("div",{className:"flex flex-wrap justify-end gap-4 border-t border-border p-2",children:(0,o.jsx)(U.z,{variant:"default",className:"max-w-[250px]",disabled:W||!V||(null==V?void 0:V.length)===0,onClick:()=>handleExport(),children:null!=H?H:"Export Data"})}):null]})]})})}},27899:function(e,t,n){n.d(t,{RM:function(){return u},SC:function(){return c},iA:function(){return a},pj:function(){return x},ss:function(){return h},xD:function(){return d}});var o=n(85893),i=n(67294),s=n(97537);let a=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,o.jsx)("div",{className:"relative w-full overflow-auto",children:(0,o.jsx)("table",{ref:t,className:(0,s.cn)("w-full caption-bottom text-sm",n),...i})})});a.displayName="Table";let d=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,o.jsx)("thead",{ref:t,className:(0,s.cn)("[&_tr]:border-b",n),...i})});d.displayName="TableHeader";let u=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,o.jsx)("tbody",{ref:t,className:(0,s.cn)("[&_tr:last-child]:border-0",n),...i})});u.displayName="TableBody";let c=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,o.jsx)("tr",{ref:t,className:(0,s.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n),...i})});c.displayName="TableRow";let h=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,o.jsx)("th",{ref:t,className:(0,s.cn)("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),...i})});h.displayName="TableHead";let x=i.forwardRef((e,t)=>{let{className:n,...i}=e;return(0,o.jsx)("td",{ref:t,className:(0,s.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n),...i})});x.displayName="TableCell"},98741:function(e,t,n){n.d(t,{F:function(){return flattenObject}});let flattenObject=(e,t)=>{let n={};return!function flattenHelper(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(let i in e)if(e.hasOwnProperty(i)){let s=e[i],a=o.concat(i);if("object"==typeof s&&null!==s)flattenHelper(s,a);else{let e=a.join(".");e=e.replace(/\.\d+(\.)?/g,"."),t&&t.includes(e)&&(n[e]=s),t||(n[e]=s)}}}(e),n}},75487:function(e,t,n){n.d(t,{LR:function(){return LW},gB:function(){return BW},iL:function(){return G}}),(o=i||(i={})).csv="text/csv",o.tsv="text/tab-separated-values",o.plain="text/plain";var o,i,X=e=>e,z=e=>e,s={fieldSeparator:",",decimalSeparator:".",quoteStrings:!0,quoteCharacter:'"',showTitle:!1,title:"My Generated Report",filename:"generated",showColumnHeaders:!0,useTextFile:!1,fileExtension:"csv",mediaType:i.csv,useBom:!0,columnHeaders:[],useKeysAsHeaders:!1,boolDisplay:{true:"TRUE",false:"FALSE"},replaceUndefinedWith:""},G=e=>Object.assign({},s,e);
1let K=class K extends Error{constructor(e){super(e),this.name="CsvGenerationError"}};let B=class B extends Error{constructor(e){super(e),this.name="EmptyHeadersError"}};let L=class L extends Error{constructor(e){super(e),this.name="CsvDownloadEnvironmentError"}};let P=class P extends Error{constructor(e){super(e),this.name="UnsupportedDataFormatError"}};var w=e=>"object"==typeof e?X(e.key):X(e),y=e=>"object"==typeof e?X(e.displayLabel):X(e),T=(e,...t)=>t.reduce((e,t)=>t(e),e),E=e=>t=>e.useBom?X(z(t)+"\uFEFF"):t,M=e=>t=>e.showTitle?S(X(z(t)+e.title))(X("")):t,S=e=>t=>X(z(e)+z(t)+"\r\n"),O=e=>(t,n)=>l(e)(X(z(t)+z(n))),l=e=>t=>X(z(t)+e.fieldSeparator),b=(e,t)=>n=>{if(!e.showColumnHeaders)return n;if(t.length<1)throw new B("Option to show headers but none supplied. Make sure there are keys in your collection or that you've supplied headers through the config options.");let o=X("");for(let n=0;n<t.length;n++){let i=y(t[n]);o=O(e)(o,v(e,z(i)))}return o=X(z(o).slice(0,-1)),S(n)(o)},C=(e,t,n)=>o=>{let i=o;for(var s=0;s<n.length;s++){let o=X("");for(let i=0;i<t.length;i++){let a=w(t[i]),d=n[s][z(a)];o=O(e)(o,v(e,d))}o=X(z(o).slice(0,-1)),i=S(i)(o)}return i},m=e=>+e===e&&(!isFinite(e)||!!(e%1)),p=(e,t)=>{if(m(t)){if("locale"===e.decimalSeparator)return X(t.toLocaleString());if(e.decimalSeparator)return X(t.toString().replace(".",e.decimalSeparator))}return X(t.toString())},Q=(e,t)=>{let n=t;return(e.quoteStrings||e.fieldSeparator&&t.indexOf(e.fieldSeparator)>-1||e.quoteCharacter&&t.indexOf(e.quoteCharacter)>-1||t.indexOf("\n")>-1||t.indexOf("\r")>-1)&&(n=e.quoteCharacter+('"'==e.quoteCharacter&&t.indexOf('"')>-1?t.replace(/"/g,'""'):t)+e.quoteCharacter),X(n)},g=(e,t)=>X(e.boolDisplay[t?"true":"false"]),r=(e,t)=>void 0===t&&void 0!==e.replaceUndefinedWith?Q(e,e.replaceUndefinedWith+""):null===t?Q(e,"null"):Q(e,""),v=(e,t)=>{if("number"==typeof t)return p(e,t);if("string"==typeof t)return Q(e,t);if("boolean"==typeof t&&e.boolDisplay)return g(e,t);if(null==t)return r(e,t);throw new P(` 2 typeof ${typeof t} isn't supported. Only number, string, boolean, null and undefined are supported. 3 Please convert the data in your object to one of those before generating the CSV. 4 `)},BW=e=>t=>{let n=G(e),o=n.useKeysAsHeaders?Object.keys(t[0]):n.columnHeaders,i=T(X(""),E(n),M(n),b(n,o),C(n,o,t));if(z(i).length<1)throw new K("Output is empty. Is your data formatted correctly?");return i},f=e=>t=>{let n=G(e),o=z(t),i=n.useTextFile?"text/plain":n.mediaType;return new Blob([o],{type:`${i};charset=utf8;`})},LW=e=>t=>{if(!window)throw new L("Downloading only supported in a browser environment.");let n=f(e)(t),o=G(e),i=o.useTextFile?"txt":o.fileExtension,s=`${o.filename}.${i}`,a=document.createElement("a");a.download=s,a.href=URL.createObjectURL(n),a.setAttribute("visibility","hidden"),document.body.appendChild(a),a.click(),document.body.removeChild(a)}}}]);
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.