!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]="01a09f3e-7d9d-7033-a6eb-cefbf377bcb4")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,880407,e=>{"use strict";var t=e.i(79635),i=e.i(618568);function r(){return i.NOOP}function n(){return!1}function a(){return!0}e.s(["useIsHydrating",0,function(){return(0,t.useSyncExternalStore)(r,n,a)}])},368862,e=>{"use strict";var t=e.i(270401);let i=t.forwardRef(function({title:e,titleId:i,...r},n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},r),e?t.createElement("title",{id:i},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))});e.s(["ArrowLeftIcon",0,i],368862)},699511,e=>{"use strict";var t=e.i(270401);let i=t.forwardRef(function({title:e,titleId:i,...r},n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},r),e?t.createElement("title",{id:i},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))});e.s(["ChevronLeftIcon",0,i],699511)},43596,e=>{"use strict";var t=e.i(270401);let i=t.forwardRef(function({title:e,titleId:i,...r},n){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":i},r),e?t.createElement("title",{id:i},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))});e.s(["ChevronRightIcon",0,i],43596)},30023,e=>{"use strict";let t=(0,e.i(202913).default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);e.s(["ArrowUpDown",0,t],30023)},505987,e=>{"use strict";let t=(0,e.i(202913).default)("boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);e.s(["Boxes",0,t],505987)},218812,e=>{"use strict";let t=(0,e.i(202913).default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);e.s(["Mic",0,t],218812)},983136,e=>{"use strict";let t=(0,e.i(202913).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["default",0,t])},84117,e=>{"use strict";var t=e.i(983136);e.s(["Plus",()=>t.default])},996431,e=>{"use strict";let t=(0,e.i(202913).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},682716,e=>{"use strict";var t=e.i(996431);e.s(["TriangleAlert",()=>t.default])},963,e=>{"use strict";var t,i,r=((t={}).Text="text",t.Image="image",t.Embeddings="embeddings",t.Audio="audio",t.Video="video",t.Rerank="rerank",t.TTS="speech",t.Transcription="transcription",t);let n=new Set(["embeddings","rerank","speech","transcription"]),a=new Set(["embeddings","rerank"]),o=new Set(["text","image"]);function s(e){return 0===e.length||e.some(e=>o.has(e))&&!e.some(e=>n.has(e))}function l(e){return e.includes("video")&&!s(e)}var u=((i={}).Text="text",i.Image="image",i.File="file",i.Audio="audio",i.Video="video",i);e.s(["InputModality",()=>u,"NON_GENERATIVE_OUTPUT_MODALITIES",0,a,"OUTPUT_MODALITY_LABELS",0,{text:"Text",image:"Image",embeddings:"Embeddings",audio:"Audio",video:"Video",rerank:"Rerank",speech:"Speech",transcription:"Transcription"},"OutputModality",()=>r,"USER_FACING_OUTPUT_MODALITIES",0,["text","image","video","speech","transcription","embeddings","rerank","audio"],"isChatroomSelectableModel",0,function(e){return s(e)||l(e)},"isChattableModel",0,s,"isNonChattableVideoModel",0,l,"isTextOnly",0,function(e){return 1===e.length&&e.includes("text")}])},469407,e=>{"use strict";var t=e.i(222666),i=e.i(505962),r=e.i(527315),n=e.i(168852),a=e.i(120938),o=e.i(687421),s=e.i(452473),l=e.i(528164),u=e.i(759024),c=e.i(21614),m=e.i(838011),d=e.i(586404),f=e.i(217631),h=e.i(79247),p=e.i(270401),v=e.i(992148),y=e.i(331511),g=e.i(773195),b=e.i(784510),x=e.i(864160),M=e.i(475382),N=e.i(956043);e.i(56380);var w=e.i(815962),T=e.i(557225),D=e.i(845961),k=e.i(871068);let S="Auto";function j(e){let a,k,j,C,F,U,I,P,R,O,E,A,L=(0,i.c)(61),{permaslug:B,variant:_,selected:z,selectedNames:Z,defaultLabel:G,isAutoDefault:V,closeOnSelect:H,showGuardrailsWarning:W,hideUnavailableByDefault:K,disableSelectForUnavailable:X,workspaceId:Y,includeGuardrails:q,onToggle:J,onFilter:Q,onSort:ee,onDone:et}=e,ei=void 0===G?S:G,er=void 0!==H&&H,en=void 0!==W&&W,ea=void 0!==X&&X,{getProviderInfo:eo}=(0,b.useGlobal)(),es=(0,x.useUserStore)($);L[0]!==q?(a={includeGuardrails:q},L[0]=q,L[1]=a):a=L[1];let el=(0,y.useProviderPreferences)(es,Y,a),eu=el.getProviderEligibilityStatus,ec=el.getProviderIneligibilityReasons,[em,ed]=(0,p.useState)(void 0!==K&&K);L[2]!==B||L[3]!==_?(k=(0,g.providerCatalogOptions)({permaslug:B,variant:_}),L[2]=B,L[3]=_,L[4]=k):k=L[4];let{data:ef,isPending:eh,error:ep}=(0,h.useQuery)(k);L[5]!==ep?(j=(0,v.extractErrorT)(ep),L[5]=ep,L[6]=j):j=L[6],(0,M.useGlobalErrorMonitor)(j);e:{if(!ef){let e;L[7]===Symbol.for("react.memo_cache_sentinel")?(e=[],L[7]=e):e=L[7],C=e;break e}let e=ef;if(Q){let t;L[8]!==e||L[9]!==Q?(t=e.filter(Q),L[8]=e,L[9]=Q,L[10]=t):t=L[10],e=t}if(em&&en){let t;if(L[11]!==e||L[12]!==eu){let i;L[14]!==eu?(i=e=>!(0,f.isMember)(e,o.ProviderName)||eu(o.providerSlugMap[e])!==y.ProviderEligibilityStatus.Ineligible,L[14]=eu,L[15]=i):i=L[15],t=e.filter(i),L[11]=e,L[12]=eu,L[13]=t}else t=L[13];e=t}if(ee){let t;L[16]!==e||L[17]!==ee?(t=[...e].sort(ee),L[16]=e,L[17]=ee,L[18]=t):t=L[18],e=t}C=e}let ev=C,ey=V??ei===S;L[19]!==et?(F=()=>et?.(),L[19]=et,L[20]=F):F=L[20];let eg=F;L[21]===Symbol.for("react.memo_cache_sentinel")?(U=(0,t.jsx)(w.CommandItem,{children:(0,t.jsx)("span",{children:"Loading..."})}),L[21]=U):U=L[21];let eb=U;if(L[22]!==eg||L[23]!==er||L[24]!==ea||L[25]!==eu||L[26]!==ec||L[27]!==eo||L[28]!==J||L[29]!==ev||L[30]!==z||L[31]!==Z||L[32]!==en){let e;L[34]!==eg||L[35]!==er||L[36]!==ea||L[37]!==eu||L[38]!==ec||L[39]!==J||L[40]!==z||L[41]!==Z||L[42]!==en?(e=e=>{let i=z===e.name||(Z?.has(e.name)??!1),a=(0,f.isMember)(e.name,o.ProviderName)?o.providerSlugMap[e.name]:null,l=en&&a&&eu(a)===y.ProviderEligibilityStatus.Ineligible,c=l&&a?ec(a):[],m=!!(ea&&l);return(0,t.jsxs)(w.CommandItem,{disabled:m,className:(0,s.cn)(l&&"opacity-50"),onSelect:()=>{!m&&(J(e.name),er&&eg())},children:[(0,t.jsx)(D.ProviderIcon,{frame:!0,providerName:e.name,providerIcon:e.icon,className:"mr-2 size-5"}),e.displayName,(0,t.jsx)(n.CheckIcon,{className:(0,s.cn)("ml-auto size-4",i?"opacity-100":"opacity-0")}),l&&(0,t.jsx)(u.InfoTooltip,{icon:(0,t.jsx)(r.ExclamationTriangleIcon,{className:"size-4 text-warning-11"}),side:"right",align:"center",sideOffset:24,children:c.length>0?(0,t.jsx)(N.IneligibilityReasonList,{reasons:c}):"This provider is unavailable due to your privacy or guardrail settings"})]},e.name)},L[34]=eg,L[35]=er,L[36]=ea,L[37]=eu,L[38]=ec,L[39]=J,L[40]=z,L[41]=Z,L[42]=en,L[43]=e):e=L[43],I=ev.map(eo).filter(d.isDefinedAndNotNull).map(e),L[22]=eg,L[23]=er,L[24]=ea,L[25]=eu,L[26]=ec,L[27]=eo,L[28]=J,L[29]=ev,L[30]=z,L[31]=Z,L[32]=en,L[33]=I}else I=L[33];let ex=I;L[44]===Symbol.for("react.memo_cache_sentinel")?(P=(0,t.jsx)(w.CommandInput,{autoFocus:!(0,m.isCoarsePointer)(),placeholder:"Search providers",className:"h-9"}),L[44]=P):P=L[44],L[45]!==em||L[46]!==en?(R=en&&(0,t.jsx)("div",{className:"flex items-center gap-2 px-2 py-1.5 border-b",children:(0,t.jsx)(c.TooltipPopover,{content:(0,t.jsxs)("span",{children:["Hide providers unavailable due to your"," ",(0,t.jsx)("a",{href:"/settings/privacy",className:"underline",children:"privacy settings"})]}),children:(0,t.jsx)(l.Button,{variant:em?"default":"outline",size:"sm",className:"h-6 text-xs px-2",onClick:()=>ed(!em),children:"Hide Unavailable"})})}),L[45]=em,L[46]=en,L[47]=R):R=L[47],L[48]!==eg||L[49]!==er||L[50]!==ei||L[51]!==ey||L[52]!==J||L[53]!==z?(O=ey&&(0,t.jsxs)(w.CommandItem,{onSelect:()=>{J(void 0),er&&eg()},children:[(0,t.jsx)(T.AuthorIcon,{author:"openrouter",className:"mr-2 size-5"}),ei,!z&&(0,t.jsx)("div",{className:"ml-auto size-2 rounded-full bg-current opacity-100"})]}),L[48]=eg,L[49]=er,L[50]=ei,L[51]=ey,L[52]=J,L[53]=z,L[54]=O):O=L[54];let eM=eh?eb:ex;return L[55]!==O||L[56]!==eM?(E=(0,t.jsx)(w.CommandList,{children:(0,t.jsxs)(w.CommandGroup,{heading:"Providers",children:[O,eM]})}),L[55]=O,L[56]=eM,L[57]=E):E=L[57],L[58]!==R||L[59]!==E?(A=(0,t.jsxs)(w.Command,{children:[P,R,E]}),L[58]=R,L[59]=E,L[60]=A):A=L[60],A}function $(e){return e.entity?.clerk_user_id??null}e.s(["ProviderSelect",0,e=>{let r,n,o,u,c,m,d,f,v,y,x,M,N,w,$,C,F,U,I,P,R,O,E,A,L,B,_,z,Z,G,V=(0,i.c)(69);V[0]!==e?({className:r,contentClassName:n,permaslug:d,variant:F,selected:y,onDone:u,onFilter:c,onSort:m,defaultLabel:x,hideChevron:M,closeOnSelect:N,showGuardrailsWarning:w,hideUnavailableByDefault:$,disableSelectForUnavailable:C,workspaceId:U,includeGuardrails:o,ref:v,...f}=e,V[0]=e,V[1]=r,V[2]=n,V[3]=o,V[4]=u,V[5]=c,V[6]=m,V[7]=d,V[8]=f,V[9]=v,V[10]=y,V[11]=x,V[12]=M,V[13]=N,V[14]=w,V[15]=$,V[16]=C,V[17]=F,V[18]=U):(r=V[1],n=V[2],o=V[3],u=V[4],c=V[5],m=V[6],d=V[7],f=V[8],v=V[9],y=V[10],x=V[11],M=V[12],N=V[13],w=V[14],$=V[15],C=V[16],F=V[17],U=V[18]);let H=void 0===x?S:x,W=void 0!==M&&M,K=void 0===N||N,X=void 0!==w&&w,Y=void 0!==$&&$,q=void 0!==C&&C,{getProviderInfo:J}=(0,b.useGlobal)(),[Q,ee]=(0,p.useState)(!1);V[19]!==d||V[20]!==F?(I=(0,g.providerCatalogOptions)({permaslug:d,variant:F}),V[19]=d,V[20]=F,V[21]=I):I=V[21];let{refetch:et}=(0,h.useQuery)(I);e:{let e;if(!y){P=null;break e}V[22]!==J||V[23]!==y?(e=J(y),V[22]=J,V[23]=y,V[24]=e):e=V[24],P=e}let ei=P,er=H===S,en=!W&&"pr-7";return V[25]!==r||V[26]!==en?(R=(0,s.cn)("relative flex w-full justify-start px-2 text-sm",en,r),V[25]=r,V[26]=en,V[27]=R):R=V[27],V[28]!==et?(O=()=>void et(),V[28]=et,V[29]=O):O=V[29],V[30]!==H||V[31]!==er||V[32]!==ei?(E=(0,t.jsx)("span",{className:"line-clamp-1 w-full truncate text-start",children:ei?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(D.ProviderIcon,{providerName:ei.name,providerIcon:ei.icon,className:"size-6 rounded-full"}),ei.displayName]}):(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[er&&(0,t.jsx)(T.AuthorIcon,{author:"openrouter",className:"size-6"}),H]})}),V[30]=H,V[31]=er,V[32]=ei,V[33]=E):E=V[33],V[34]!==W?(A=!W&&(0,t.jsx)(a.ChevronUpDownIcon,{className:"absolute right-1 size-4 opacity-50"}),V[34]=W,V[35]=A):A=V[35],V[36]!==Q||V[37]!==f||V[38]!==v||V[39]!==R||V[40]!==O||V[41]!==E||V[42]!==A?(L=(0,t.jsx)(k.PopoverTrigger,{render:(0,t.jsxs)(l.Button,{ref:v,type:"button",variant:"outline",role:"combobox","aria-expanded":Q,className:R,onClick:O,...f,children:[E,A]})}),V[36]=Q,V[37]=f,V[38]=v,V[39]=R,V[40]=O,V[41]=E,V[42]=A,V[43]=L):L=V[43],V[44]!==n?(B=(0,s.cn)("p-0",n),V[44]=n,V[45]=B):B=V[45],V[46]===Symbol.for("react.memo_cache_sentinel")?(_=()=>ee(!1),V[46]=_):_=V[46],V[47]!==K||V[48]!==H||V[49]!==q||V[50]!==Y||V[51]!==o||V[52]!==er||V[53]!==u||V[54]!==c||V[55]!==m||V[56]!==d||V[57]!==y||V[58]!==X||V[59]!==F||V[60]!==U?(z=(0,t.jsx)(j,{permaslug:d,variant:F,selected:y,defaultLabel:H,isAutoDefault:er,closeOnSelect:K,showGuardrailsWarning:X,hideUnavailableByDefault:Y,disableSelectForUnavailable:q,workspaceId:U,includeGuardrails:o,onToggle:u,onFilter:c,onSort:m,onDone:_}),V[47]=K,V[48]=H,V[49]=q,V[50]=Y,V[51]=o,V[52]=er,V[53]=u,V[54]=c,V[55]=m,V[56]=d,V[57]=y,V[58]=X,V[59]=F,V[60]=U,V[61]=z):z=V[61],V[62]!==B||V[63]!==z?(Z=(0,t.jsx)(k.PopoverContent,{className:B,deferChildren:!0,children:z}),V[62]=B,V[63]=z,V[64]=Z):Z=V[64],V[65]!==Q||V[66]!==L||V[67]!==Z?(G=(0,t.jsxs)(k.Popover,{open:Q,onOpenChange:ee,children:[L,Z]}),V[65]=Q,V[66]=L,V[67]=Z,V[68]=G):G=V[68],G},"ProviderSelectPanel",0,j])},546647,982932,e=>{"use strict";var t=e.i(505962),i=e.i(270401);e.s(["useScrollHint",0,function(){let e,r,n=(0,t.c)(4),[a,o]=(0,i.useState)(!0),[s,l]=(0,i.useState)(!0),u=(0,i.useRef)(null);n[0]===Symbol.for("react.memo_cache_sentinel")?(e=e=>{if(u.current&&(u.current(),u.current=null),!e){o(!0),l(!0);return}let t=()=>{o(e.scrollHeight-e.scrollTop-e.clientHeight<8),l(e.scrollTop<8)};t(),e.addEventListener("scroll",t,{passive:!0});let i=new MutationObserver(t);i.observe(e,{childList:!0,subtree:!0,attributes:!0}),u.current=()=>{e.removeEventListener("scroll",t),i.disconnect()}},n[0]=e):e=n[0];let c=e;return n[1]!==a||n[2]!==s?(r={isScrolledToBottom:a,isScrolledToTop:s,listCallbackRef:c},n[1]=a,n[2]=s,n[3]=r):r=n[3],r}],546647);var r=e.i(222666),n=e.i(452473),a=e.i(99074),o=e.i(477986);e.s(["ScrollHintChevron",0,function(e){let i,s,l,u=(0,t.c)(8),{isAtEdge:c,side:m}=e,d="top"===(void 0===m?"bottom":m),f=d?"top-0 bg-gradient-to-b pb-3 pt-1":"bottom-0 bg-gradient-to-t pb-1 pt-3",h=c?"opacity-0":"opacity-100";return u[0]!==f||u[1]!==h?(i=(0,n.cn)("pointer-events-none absolute inset-x-0 flex justify-center transition-opacity duration-150",f,"from-popover via-popover/80 to-transparent",h),u[0]=f,u[1]=h,u[2]=i):i=u[2],u[3]!==d?(s=d?(0,r.jsx)(o.ChevronUp,{className:"size-4 text-muted-foreground"}):(0,r.jsx)(a.ChevronDown,{className:"size-4 text-muted-foreground"}),u[3]=d,u[4]=s):s=u[4],u[5]!==i||u[6]!==s?(l=(0,r.jsx)("div",{className:i,"aria-hidden":"true",children:s}),u[5]=i,u[6]=s,u[7]=l):l=u[7],l}],982932)},795672,e=>{"use strict";var t=e.i(505962),i=e.i(509867);e.i(270401);var r=e.i(779100);e.s(["useFormatters",0,function(){let e,n=(0,t.c)(2),a=(0,r.useLocale)();return n[0]!==a?(e=(0,i.createFormatters)(a),n[0]=a,n[1]=e):e=n[1],e}])},463522,e=>{"use strict";e.s(["isValidDate",0,function(e){return!Number.isNaN(e.getTime())},"oneDayMS",0,864e5,"oneHourSeconds",0,3600,"oneMinuteMS",0,6e4,"oneMonthMS",0,2592e6,"oneWeekMS",0,6048e5,"parseClickhouseTimestampUTC",0,function(e){if(!e)return new Date(NaN);let t=e.replace(" ","T");return new Date(/[zZ]$|[+-]\d{2}:\d{2}$/.test(t)?t:`${t}Z`)},"safeParseDate",0,function(e,t){if(!e)return t;if(e instanceof Date)return Number.isNaN(e.getTime())?t:e;if("string"==typeof e||"number"==typeof e){let t=new Date(e);if(!Number.isNaN(t.getTime()))return t}return t},"startOfUTCMonth",0,function(e,t=0){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1))},"toDateString",0,e=>e.toISOString().split("T")[0]])},788162,e=>{"use strict";var t=e.i(193975),i=e.i(370066),r=e.i(676885);let n=["B","KB","MB","GB","TB","PB"];e.s(["formatBytes",0,function(e,a,o=(0,r.getFormatRuntime)(a.locale)){if(null==e||!Number.isFinite(e)||e<0)return;if("file-size-megabytes"===a.preset){if(e<1024)return`${(0,t.formatNativeNumber)(e,a)} B`;let i=e<1048576?"KB":"MB";return`${(0,t.formatNativeFixed)(e/("KB"===i?1024:1048576),{...a,fractionDigits:1})} ${i}`}let s=e<1024?0:Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1),l=(0,i.formatNumber)(e/1024**s,{locale:a.locale,preset:0===s?"integer":"fixed-1"},o);return`${l} ${n[s]}`}])},509867,46134,697721,e=>{"use strict";var t=e.i(788162),i=e.i(894002),r=e.i(230953),n=e.i(44221),a=e.i(551673),o=e.i(196948),s=e.i(80717),l=e.i(676885),u=e.i(820648);function c(e,t){let i=(0,s.parseDecimal)(e);if(!i)return;let r=(0,u.getUsdPrecision)(i,"generation-cost");if(!r)return;let n=(0,l.getFormatRuntime)(t.locale),a=(0,s.formatDecimal)(i,r,n);if("number"===t.presentation)return a;let o=n.number({style:"currency",currency:"USD",maximumFractionDigits:0}).formatToParts(1);return o.map((e,i)=>"integer"===e.type?a:"currency"===e.type&&"currency-spaced"===t.presentation&&o[i+1]?.type==="integer"?`${e.value} `:e.value).join("")}e.s(["formatGenerationAmount",0,c],46134);var m=e.i(193975),d=e.i(370066),f=e.i(61291);function h(e,t){if(e.low>e.high)return;let i=t.runtime??(0,l.getFormatRuntime)(t.locale),r={...t,runtime:i},n=(0,m.formatNativeFixed)(100*e.low,r),a=(0,m.formatNativeFixed)(100*e.high,r);if(void 0!==n&&void 0!==a)return i.number({style:"percent"}).formatToParts(1).map(e=>"integer"===e.type?`${n}–${a}`:e.value).join("")}e.s(["formatRatioRange",0,h],697721);var p=e.i(844836),v=e.i(988855),y=e.i(190557);e.s(["createFormatters",0,function(e){let s=(0,l.getFormatRuntime)(e);return{currency:(t,r)=>(0,i.formatCurrency)(t,{...r,locale:e},s),timezoneName:(t,i)=>(0,r.formatTimeZoneName)(t,{...i,locale:e},s),number:(t,i)=>(0,d.formatNumber)(t,{...i,locale:e},s),fixed:(t,i)=>(0,o.formatFixed)(t,{...i,locale:e},s),nativeFixed:(t,i)=>(0,m.formatNativeFixed)(t,{...i,locale:e,runtime:s}),nativeNumber:t=>(0,m.formatNativeNumber)(t,{locale:e}),usd:(t,i)=>(0,y.formatUsd)(t,{...i,locale:e},s),generationAmount:(t,i)=>c(t,{...i,locale:e}),ratio:(t,i)=>(0,f.formatRatio)(t,{...i,locale:e},s),ratioRange:(t,i)=>h(t,{...i,locale:e,runtime:s}),percentPoints:(t,i)=>(0,f.formatPercentPoints)(t,{...i,locale:e},s),date:(t,i)=>(0,r.formatDate)(t,{...i,locale:e},s),time:(t,i)=>(0,r.formatTime)(t,{...i,locale:e},s),calendarDate:(t,i)=>(0,r.formatCalendarDate)(t,{...i,locale:e},s),dateTime:(t,i)=>(0,r.formatDateTime)(t,{...i,locale:e},s),filenameTimestamp:(t,i)=>(0,a.formatFilenameTimestamp)(t,{...i,locale:e}),relativeTime:(t,i)=>(0,p.formatRelativeTime)(t,{...i,locale:e},s),dateRange:(t,i)=>(0,r.formatDateRange)(t,{...i,locale:e},s),duration:(t,i)=>(0,n.formatDuration)(t,{...i,locale:e},s),bytes:(i,r)=>(0,t.formatBytes)(i,{...r,locale:e},s),list:(t,i)=>(0,v.formatList)(t,{...i,locale:e},s),region:t=>(0,v.formatRegion)(t,{locale:e},s),compareText:(e,t)=>s.collator().compare(e,t),compareLabels:(t,i)=>(0,v.compareDisplayLabels)(t,i,{locale:e,runtime:s}),lowercase:t=>(0,v.lowercaseDisplayText)(t,{locale:e}),uppercase:t=>(0,v.uppercaseDisplayText)(t,{locale:e}),foldText:t=>(0,v.foldDisplayText)(t,{locale:e}),findTextMatches:(t,i)=>(0,v.findDisplayTextMatches)(t,i,{locale:e})}}],509867)},894002,e=>{"use strict";var t=e.i(693697),i=e.i(204067),r=e.i(796805);let n=[{locale:"ja-JP",currency:"JPY",symbol:"¥"},{locale:"zh-CN",currency:"KRW",symbol:"₩"}];var a=e.i(80717),o=e.i(676885);let s=r.z.string().regex(/^[A-Za-z]{3}$/).transform(e=>e.toUpperCase()).refine(e=>"XXX"!==e&&"XTS"!==e&&void 0!==new Intl.DisplayNames("en-US",{type:"currency",fallback:"none"}).of(e));e.s(["formatCurrency",0,function(e,r,l=(0,o.getFormatRuntime)(r.locale)){var u,c;let m=(0,a.parseDecimal)(e),d=(0,i.parseSchema)(s,r.currency);if(!m||(0,t.isErr)(d))return;let f=l.number({style:"currency",currency:d.data}).resolvedOptions().maximumFractionDigits;if(void 0===f)return;let h=(u=d.data,c={locale:r.locale},n.find(e=>e.locale===c.locale&&e.currency===u)?.symbol);return(0,a.formatDecimal)(m,{style:"currency",currency:d.data,...void 0===h?{}:{currencyDisplaySymbol:h},minimumFractionDigits:f,maximumFractionDigits:f},l)}],894002)},44221,e=>{"use strict";var t=e.i(193975),i=e.i(370066),r=e.i(676885);e.s(["formatDuration",0,function(e,n,a=(0,r.getFormatRuntime)(n.locale)){if(null==e||!Number.isFinite(e)||e<0)return;if("latency-fixed-seconds"===n.preset||"latency-trimmed-seconds"===n.preset||"benchmark"===n.preset||"performance"===n.preset)return function(e,i){if("performance"===i.preset){if(e<999.5)return`${(0,t.formatNativeNumber)(Math.round(e),i)}ms`;if(e<59950)return`${(0,t.formatNativeFixed)(e/1e3,{...i,fractionDigits:1})}s`;let r=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);if(60===n)return`${(0,t.formatNativeNumber)(r+1,i)}m`;let a=(0,t.formatNativeNumber)(r,i);return n>0?`${a}m ${(0,t.formatNativeNumber)(n,i)}s`:`${a}m`}if("benchmark"===i.preset){let r=e/1e3;return r<90?`${(0,t.formatNativeFixed)(r,{...i,fractionDigits:0})}s`:`${(0,t.formatNativeFixed)(r/60,{...i,fractionDigits:1})}m`}if(e<1e3)return`${(0,t.formatNativeNumber)(Math.round(e),i)}ms`;let r=e/1e3;if("latency-fixed-seconds"===i.preset)return`${(0,t.formatNativeFixed)(r,{...i,fractionDigits:1})}s`;let n=r.toFixed(1);return n.endsWith(".0")?`${(0,t.formatNativeNumber)(Number(n),i)}s`:`${(0,t.formatNativeFixed)(r,{...i,fractionDigits:1})}s`}(e,{...n,preset:n.preset});let o=e=>"elapsed-ungrouped"===n.preset?(0,t.formatNativeNumber)(e,n)??"":(0,i.formatNumber)(e,{locale:n.locale,preset:"integer"},a)??"";if("latency"===n.preset||"latency-seconds"===n.preset){if(e<999.5)return`${o(Math.round(e))}ms`;if(e<59950||"latency-seconds"===n.preset)return`${(0,i.formatNumber)(e/1e3,{locale:n.locale,preset:"fixed-1"},a)}s`;let t=Math.round(e/1e3),r=Math.floor(t/60);return t%60?`${o(r)}m ${o(t%60)}s`:`${o(r)}m`}let s=Math.floor(e/1e3);return[{value:Math.floor(s/3600),unit:"h"},{value:Math.floor(s%3600/60),unit:"m"},{value:s%60,unit:"s"}].filter(({value:e})=>e>0).map(({value:e,unit:t})=>`${o(e)}${t}`).join(" ")||`${o(0)}s`}],44221)},551673,e=>{"use strict";var t=e.i(230953),i=e.i(988855);e.s(["formatFilenameTimestamp",0,function(e,r){let n=(0,t.formatDate)(e,{...r,preset:"day-month"}),a=(0,t.formatTime)(e,{...r,preset:"numeric"});if(void 0===n||void 0===a)return;let o=(0,i.lowercaseDisplayText)(a,r).replaceAll(":",".").replace(/\s+(am|pm)$/u,"$1");return`${n} ${o}`.replaceAll(/[/\\:*?"<>|\r\n\t]/g,"-")}])},196948,e=>{"use strict";var t=e.i(376904),i=e.i(80717),r=e.i(676885);e.s(["formatFixed",0,function(e,n,a=(0,r.getFormatRuntime)(n.locale)){let o=(0,i.parseDecimal)(e);if(!o||!Number.isInteger(n.fractionDigits)||n.fractionDigits<0||n.fractionDigits>100||void 0!==n.maxDigits&&(!Number.isInteger(n.maxDigits)||n.maxDigits<0))return;let s=o.abs().integerValue(t.default.ROUND_HALF_UP).toFixed(0).length,l=void 0===n.maxDigits?n.fractionDigits:Math.max(0,Math.min(n.fractionDigits,n.maxDigits-s)),u=o.isInteger()?0:l;return(0,i.formatDecimal)(o,{minimumFractionDigits:u,maximumFractionDigits:u},a)}])},844836,e=>{"use strict";var t=e.i(693697),i=e.i(230953),r=e.i(796560),n=e.i(676885);let a=["years","months","days","hours","minutes","seconds"],o={hours:36e5,minutes:6e4,seconds:1e3},s={years:"year",months:"month",days:"day",hours:"hour",minutes:"minute",seconds:"second"},l={hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",era:"short"},u=new Map;function c(e,t){return e-t*Math.floor(e/t)}function m(e){let t=new Date(Date.UTC(e.year,e.month-1,e.day,e.hour??0,e.minute??0,e.second??0,e.millisecond??0));return e.year>=0&&e.year<100&&t.setUTCFullYear(e.year,e.month-1,e.day),t.getTime()}function d(e){return{year:e.year,month:e.month,day:e.day}}function f(e,t){let i=Object.fromEntries((0,n.getFormatRuntime)("en-US").date({...l,timeZone:t}).formatToParts(e).map(e=>[e.type,e.value])),r=Number(i.year);return{ts:e,timeZone:t,clock:{year:"BC"===i.era?-Math.abs(r)+1:r,month:Number(i.month),day:Number(i.day),hour:Number(i.hour)%24,minute:Number(i.minute),second:Number(i.second),millisecond:c(e,1e3)}}}function h(e,t){return(m({...f(e,t).clock,millisecond:0})-(e-c(e,1e3)))/6e4}function p(e,t){let i=e.clock.year+("years"===t.unit?t.count:0),r=e.clock.month+("months"===t.unit?t.count:0),n=Math.min(e.clock.day,new Date(m({year:i,month:r+1,day:0})).getUTCDate())+("days"===t.unit?t.count:0);return function(e,t){let i=h(e.ts,e.timeZone),r=m(t),n=r-6e4*i,a=h(n,e.timeZone);if(a===i)return n;let o=n-(a-i)*6e4,s=h(o,e.timeZone);return a===s?o:r-6e4*Math.min(a,s)}(e,{...e.clock,year:i,month:r,day:n})}function v(e,t){let i=e.instant=Math.round(t/1e3))return"en-US"===e.locale?"just now":M(e,0,"second");let i=g.find(({limit:e})=>t=1)return y(e.locale,{count:i,unit:t})}return y(e.locale,{count:v(e,"seconds"),unit:"seconds"})}let T={elapsed:N,skills:function(e){let t=(e.instant-e.nowMs)/1e3;for(let i of b){if(Math.abs(t)tMath.abs(t)Math.abs(e.instant-e.nowMs)?"en-US"===e.locale?"just now":M(e,0,"second"):w(e)},schedule:function(e){let t=e.instant-e.nowMs;if(t<=0)return N(e);if(t<6e4)return"en-US"===e.locale?"in < 1 min":M(e,0,"minute",{numeric:"always",style:"short"});let i=[g[1],g[2],g[3]].find(({limit:e})=>tMath.abs(u)Math.abs(u))return m.format(0,"second");let d=k.find(({limit:e})=>Math.abs(u)