!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a08e82-2fd9-7e00-a612-534b442d2cbc")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,993789,e=>{"use strict";var t=e.i(270401);let a=t.forwardRef(function({title:e,titleId:a,...s},n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))});e.s(["ChevronRightIcon",0,a],993789)},143349,e=>{"use strict";e.s(["getAppPath",0,function(e){return e.slug?`/apps/${e.slug}`:`/apps/url/${encodeURIComponent(e.origin_url)}`}])},524186,e=>{"use strict";e.s(["CHART_AXIS_PROPS",0,{tickLine:!1,axisLine:!1,fontSize:12,tick:{fill:"hsl(var(--muted-foreground))"}},"CHART_HEIGHT_PX",0,260,"CHART_MARGIN",0,{top:8,right:16,bottom:8,left:-16},"EXPLORER_COMPACT_BAR_MAX_VISIBLE_PX",0,240,"EXPLORER_COMPACT_LINE_CHART_HEIGHT_PX",0,150,"EXPLORER_LINE_CHART_HEIGHT_PX",0,400,"OVERVIEW_CHART_COLORS",0,{cost:"var(--chart-cost)",requests:"var(--chart-requests)",tokensPrompt:"var(--chart-tokens-prompt)",tokensCompletion:"var(--chart-tokens-completion)",tokensReasoning:"var(--chart-tokens-reasoning)",tokensCached:"var(--chart-tokens-cached)",tokensUncached:"var(--chart-tokens-uncached)",credits:"var(--chart-credits)",byok:"var(--chart-byok)"},"explorerBarChartHeight",0,function(e,t){return Math.max(e*(t?24:40),t?140:200)}])},973251,e=>{"use strict";var t=e.i(222666),a=e.i(505962),s=e.i(839539),n=e.i(452473),r=e.i(524186),i=e.i(394333),o=e.i(536582),l=e.i(956302),c=e.i(128066),p=e.i(79247);e.i(270401);var m=e.i(369677),d=e.i(585351),u=e.i(684983);let h=[l.Colors.Blue,r.OVERVIEW_CHART_COLORS.tokensUncached];function _(e){let r,l,p,m,d,u,_,g=(0,a.c)(23),{appStats:v,isAppStatsLoading:R,cachedAt:A}=e;if(v?.top_apps_chart,v?.model_chart,g[0]!==v?.model_chart||g[1]!==v?.top_apps_chart){let e,t,a=new Map;for(let t of(g[3]!==v?.top_apps_chart?(e=v?.top_apps_chart??[],g[3]=v?.top_apps_chart,g[4]=e):e=g[4],e))a.set(t.date,t.total_prompt_tokens+t.total_completion_tokens);g[5]!==v?.model_chart?(t=v?.model_chart??[],g[5]=v?.model_chart,g[6]=t):t=g[6],r=t.toReversed().map(e=>{let t=e.total_prompt_tokens+e.total_completion_tokens,s=a.get(e.date)??0,n=Math.max(0,t-s);return{x:e.date,ys:{"Top 5 Apps":s,"Rest of OpenRouter":n}}}),g[0]=v?.model_chart,g[1]=v?.top_apps_chart,g[2]=r}else r=g[2];let j=r;g[7]!==j?(l=j.some(x),g[7]=j,g[8]=l):l=g[8];let k=l;if(R||!v){let e;return g[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(i.VerticalSkeletonGroup,{count:5,skeletonClassName:"h-12 w-full"}),g[9]=e):e=g[9],e}if(0===v.top_apps.length){let e;return g[10]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(o.EmptyAnalyticsData,{message:"Not enough data for apps using this model yet.",icon:"app",height:"20rem"}),g[10]=e):e=g[10],e}return g[11]===Symbol.for("react.memo_cache_sentinel")?(p=(0,n.cn)("mx-auto w-full","flex flex-col gap-8 lg:flex-row lg:gap-16"),g[11]=p):p=g[11],g[12]!==v.top_apps?(m=v.top_apps.map(f),g[12]=v.top_apps,g[13]=m):m=g[13],g[14]!==m?(d=(0,t.jsx)("div",{className:"flex flex-col gap-5 lg:w-1/2 pt-10",children:m}),g[14]=m,g[15]=d):d=g[15],g[16]!==A||g[17]!==j||g[18]!==k?(u=(0,t.jsx)("div",{className:"lg:w-1/2",children:k?(0,t.jsx)(c.StackedBarChart,{colors:h,data:j,yAxisHidden:!0,forecast:s.ForecastWindow.OneDay,forecastFromTimestamp:A}):(0,t.jsx)(o.EmptyAnalyticsData,{message:"No chart data available",icon:"bar",height:"15rem"})}),g[16]=A,g[17]=j,g[18]=k,g[19]=u):u=g[19],g[20]!==d||g[21]!==u?(_=(0,t.jsxs)("div",{className:p,children:[d,u]}),g[20]=d,g[21]=u,g[22]=_):_=g[22],_}function f(e,a){return(0,t.jsx)(u.AppRow,{rank:a+1,appAnalytics:e},e.app_id)}function x(e){return e.ys["Top 5 Apps"]>0||e.ys["Rest of OpenRouter"]>0}e.s(["ModelApps",0,function(){let e,s,n,r=(0,a.c)(9),{model:i,staticVariant:o}=(0,m.useModelPage)();r[0]!==i.permaslug||r[1]!==o?(e=(0,d.appStatsOptions)({permaslug:i.permaslug,variant:o}),r[0]=i.permaslug,r[1]=o,r[2]=e):e=r[2];let{data:l,isLoading:c}=(0,p.useQuery)(e);return r[3]!==l?.cachedAt?(s=l?.cachedAt??Date.now(),r[3]=l?.cachedAt,r[4]=s):s=r[4],r[5]!==l||r[6]!==c||r[7]!==s?(n=(0,t.jsx)("div",{className:"flex w-full flex-col",children:(0,t.jsx)(_,{appStats:l,isAppStatsLoading:c,cachedAt:s})}),r[5]=l,r[6]=c,r[7]=s,r[8]=n):n=r[8],n}])},662512,function(e){e.n(e.i(973251))},764043,e=>{"use strict";var t=e.i(222666),a=e.i(505962),s=e.i(373855),n=e.i(452473),r=e.i(528164),i=e.i(712621),o=e.i(117738);e.i(172794);var l=e.i(781656);e.s(["AdminAppEditButton",0,function(e){let c,p,m,d,u,h=(0,a.c)(9),{app:_,className:f}=e,{entity:x}=(0,o.useEntity)();if(!x.data?.is_internal_admin)return null;h[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,l.getMissionControlUrl)(),h[0]=c):c=h[0];let g=`${c}/admin-utils/app-editor?url=${encodeURIComponent(_.origin_url)}`;return h[1]!==f?(p=(0,n.cn)("text-warning hover:text-warning/80",f),h[1]=f,h[2]=p):p=h[2],h[3]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(s.PencilIcon,{className:"size-3"}),h[3]=m):m=h[3],h[4]!==g?(d=(0,t.jsx)(i.ExternalLink,{href:g,target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:m}),h[4]=g,h[5]=d):d=h[5],h[6]!==p||h[7]!==d?(u=(0,t.jsx)(r.Button,{className:p,variant:"outline",size:"icon-sm",render:d}),h[6]=p,h[7]=d,h[8]=u):u=h[8],u}])},684983,e=>{"use strict";var t=e.i(222666),a=e.i(505962),s=e.i(993789),n=e.i(143349),r=e.i(452473),i=e.i(837556),o=e.i(188363),l=e.i(379684),c=e.i(21614),p=e.i(779100),m=e.i(781656),d=e.i(370066),u=e.i(270401),h=e.i(764043);function _(e){let s,n,r,i,o=(0,a.c)(8),{appAnalytics:l}=e,c=(0,p.useLocale)(),m=l.total_tokens;return o[0]!==c||o[1]!==m?(s=(0,d.formatNumber)(m,{locale:c,preset:"compact-rounded-thousands"})??"—",o[0]=c,o[1]=m,o[2]=s):s=o[2],o[3]!==s?(n=(0,t.jsx)("span",{children:s}),o[3]=s,o[4]=n):n=o[4],o[5]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)("span",{className:"ml-1",children:"tokens"}),o[5]=r):r=o[5],o[6]!==n?(i=(0,t.jsxs)("div",{className:"text-muted-foreground col-span-4 text-right text-xs",children:[n,r]}),o[6]=n,o[7]=i):i=o[7],i}e.s(["AppRow",0,function(e){var p;let d,f,x,g,v,R,A,j,k,C,N,y,E,w,b,T=(0,a.c)(35),{appAnalytics:S,rank:O}=e,{app:P}=S,[I,L]=(0,u.useState)(P);if(!I)return null;T[0]!==I?(d=new URL((p=I).origin_url),f={name:p.title||(0,m.removeTrailingSlash)(d.host+d.pathname),description:p.description},T[0]=I,T[1]=f):f=T[1];let H=f,B=I.favicon_url||I.main_url||I.origin_url||"";T[2]!==O?(x=(0,t.jsxs)("div",{className:"text-muted-foreground col-span-1 text-left",children:[O,"."]}),T[2]=O,T[3]=x):x=T[3],T[4]!==I.icon_class_name?(g=(0,r.cn)("size-full",I.icon_class_name),T[4]=I.icon_class_name,T[5]=g):g=T[5];let M=!!I.favicon_url;return T[6]!==g||T[7]!==M||T[8]!==B?(v=(0,t.jsx)(i.IconFrame,{variant:"app",className:"size-6 shrink-0",children:(0,t.jsx)(o.RemoteFavicon,{className:g,faviconFor:B,hasCuratedFaviconUrl:M})}),T[6]=g,T[7]=M,T[8]=B,T[9]=v):v=T[9],T[10]!==I?(R=(0,n.getAppPath)(I),T[10]=I,T[11]=R):R=T[11],T[12]===Symbol.for("react.memo_cache_sentinel")?(A=(0,t.jsx)(s.ChevronRightIcon,{className:"inline w-4 transition-transform group-hover:translate-x-0.5"}),T[12]=A):A=T[12],T[13]!==H.name||T[14]!==R?(j=(0,t.jsxs)(l.TextLink,{className:"group text-xs block truncate font-medium",href:R,children:[H.name," ",A]}),T[13]=H.name,T[14]=R,T[15]=j):j=T[15],T[16]!==H.description?(k=H.description?(0,t.jsx)(c.TooltipPopover,{content:H.description,side:"bottom",align:"start",inline:!0,children:(0,t.jsx)("span",{className:"truncate cursor-help",children:H.description})}):(0,t.jsx)("span",{className:"text-faint",children:"new"}),T[16]=H.description,T[17]=k):k=T[17],T[18]!==I?(C=(0,t.jsx)(h.AdminAppEditButton,{app:I,onUpdate:L}),T[18]=I,T[19]=C):C=T[19],T[20]!==C||T[21]!==k?(N=(0,t.jsxs)("div",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[k,C]}),T[20]=C,T[21]=k,T[22]=N):N=T[22],T[23]!==N||T[24]!==j?(y=(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[j,N]}),T[23]=N,T[24]=j,T[25]=y):y=T[25],T[26]!==y||T[27]!==v?(E=(0,t.jsx)("div",{className:"col-span-7 text-left",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[v,y]})}),T[26]=y,T[27]=v,T[28]=E):E=T[28],T[29]!==S?(w=(0,t.jsx)(_,{appAnalytics:S}),T[29]=S,T[30]=w):w=T[30],T[31]!==E||T[32]!==w||T[33]!==x?(b=(0,t.jsxs)("div",{className:"grid grid-cols-12 items-center",children:[x,E,w]}),T[31]=E,T[32]=w,T[33]=x,T[34]=b):b=T[34],b}])}]); //# sourceMappingURL=44g433u03d_od.js.map //# chunkId=01a08e82-2fd9-7e00-a612-534b442d2cbc