(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,973811,e=>{"use strict";var t="u"=l&&(p=o,o=n(),u=0)}function f(){let a=o,{length:r}=arguments;for(let e=0;e{o=n(),p=null,u=0,f.resetResultsCount()},f.resultsCount=()=>c,f.resetResultsCount=()=>{c=0},f}var r=Symbol("NOT_FOUND"),i=e=>Array.isArray(e)?e:[e];function o(e,...t){let n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r,o=0,s=0,l={},d=e.pop();"object"==typeof d&&(l=d,d=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);let{memoize:p,memoizeOptions:u=[],argsMemoize:c=a,argsMemoizeOptions:m=[]}={...n,...l},f=i(u),g=i(m),h=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${n}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),A=p(function(){return o++,d.apply(null,arguments)},...f);return Object.assign(c(function(){s++;let{length:e}=h,t=Array(e);for(let n=0;ns,resetDependencyRecomputations:()=>{s=0},lastResult:()=>r,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var s=o(a),l=Object.assign((e,t=s)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,a)=>(e[n[a]]=t,e),{}))},{withTypes:()=>l}),d=(e,t)=>e===t;e.s(["l",0,s,"O",0,o,"P",0,function(e,t){let n,a,{equalityCheck:i=d,maxSize:o=1,resultEqualityCheck:s}="object"==typeof t?t:{equalityCheck:t},l=function(e,t){if(null===e||null===t||e.length!==t.length)return!1;let{length:n}=e;for(let a=0;an&&l(n.key,e)?n.value:r,put(e,t){n={key:e,value:t}},findMatchingEntry(e,t){let a=n;return void 0!==a&&t(a.value,e)?a:void 0},clear(){n=void 0}}:(a=[],{get:function(e){let t=a.findIndex(t=>l(t.key,e));if(t>-1){let e=a[t];return t>0&&(a.splice(t,1),a.unshift(e)),e.value}return r},put:function(e,t){a.unshift({key:e,value:t}),a.length>o&&a.pop()},findMatchingEntry:function(e,t){let n=a,{length:r}=n;for(let a=0;a{u.clear(),c.resetResultsCount()},c.resultsCount=()=>p,c.resetResultsCount=()=>{p=0},c},"u",0,a])},372953,425493,210138,29570,704691,e=>{"use strict";var t=e.i(342837),n=e.i(988590),a=e.i(882844),r=e.i(635157),i=e.i(549692);let o={EmptyResponseBody:"empty_response_body",AudioDecodeFailed:"audio_decode_failed",AudioStreamFailed:"audio_stream_failed",ImagePromptMissing:"image_prompt_missing",ImageRequestFailed:"image_request_failed",ImageApiError:"image_api_error",ImageResponseBodyEmpty:"image_response_body_empty",ImageStreamFailed:"image_stream_failed",ImageStreamEventInvalid:"image_stream_event_invalid",ImageStreamError:"image_stream_error",ImageMissing:"image_missing",ImageStreamEndedEarly:"image_stream_ended_early",ImageResponseInvalid:"image_response_invalid",SttRequestFailed:"stt_request_failed",SttTranscriptEmpty:"stt_transcript_empty",SttFormatUnsupported:"stt_format_unsupported",SttFileReadFailed:"stt_file_read_failed",SttUploadFailed:"stt_upload_failed",SttResponseInvalid:"stt_response_invalid",SttAudioFileMissing:"stt_audio_file_missing",TtsReferenceAudioReadFailed:"tts_reference_audio_read_failed",TtsUploadFailed:"tts_upload_failed",TtsRequestFailed:"tts_request_failed",TtsResponseBodyEmpty:"tts_response_body_empty",TtsPcmParamsMissing:"tts_pcm_params_missing",VideoRequestFailed:"video_request_failed",VideoApiError:"video_api_error",VideoResponseInvalid:"video_response_invalid",VideoPollFailed:"video_poll_failed",VideoJobFailed:"video_job_failed",VideoJobCancelled:"video_job_cancelled",VideoJobExpired:"video_job_expired",VideoJobTimedOut:"video_job_timed_out",VideoUrlMissing:"video_url_missing",VideoFileUnavailable:"video_file_unavailable"},s={SendFailed:"send_failed",StreamSevered:"stream_severed",StreamEndedEarly:"stream_ended_early",LineTooLong:"line_too_long",TurnFailed:"turn_failed",RunFailed:"run_failed",RunStopped:"run_stopped",ToolFailed:"tool_failed",ToolStopped:"tool_stopped",...o},l=r.z.enum(s),d=i.N.extend({code:l.optional(),rawStatus:r.z.number().int().optional()});function p(e,t){return{code:e,status:null,...void 0===t?{}:{message:t}}}e.s(["K",0,d,"a",0,s,"H",0,o,"S",0,p,"y",0,function(e){return e.rawStatus??e.status??void 0}],425493);let u={InputStreaming:"input-streaming",Running:"running",Done:"done",Failed:"failed"},c={Streaming:"streaming",Done:"done"};e.s(["o",0,c,"K",0,{User:"user",Assistant:"assistant",System:"system"},"_",0,u],210138);let m={Function:"function",Server:"server",Mcp:"mcp",Subagent:"subagent"},f={Summary:"summary",Content:"content"},g={Image:"image",Video:"video",Audio:"audio"},h={Stop:"stop",Length:"length",Tool:"tool",ContentFilter:"content_filter",Cancelled:"cancelled"},A=r.z.object({attempt:r.z.number(),maxAttempts:r.z.number(),delayMs:r.z.number()}),y=r.z.object({turnId:r.z.string()}),b=r.z.object({waitToken:r.z.string(),questions:r.z.array(r.z.object({id:r.z.string(),header:r.z.string().optional(),question:r.z.string(),options:r.z.array(r.z.object({label:r.z.string(),description:r.z.string().optional()})),isMultiple:r.z.boolean()}))}),I=r.z.object({waitToken:r.z.string(),source:r.z.string().nullable(),message:r.z.string().nullable()}),v=r.z.union([r.z.object({kind:r.z.enum(g),url:r.z.string(),expiresAt:r.z.number().optional()}),r.z.object({kind:r.z.enum(g),jobId:r.z.string()})]),S=r.z.object({inputTokens:r.z.number().optional(),outputTokens:r.z.number().optional(),costUsd:r.z.string().optional(),durationMs:r.z.number().optional()}),w=r.z.object({kind:r.z.enum(["url_citation","file_citation"]),title:r.z.string().optional(),url:r.z.string().optional(),startIndex:r.z.number().optional(),endIndex:r.z.number().optional()}),_=r.z.object({id:r.z.string()}),x=r.z.discriminatedUnion("kind",[_.extend({kind:r.z.literal("text"),text:r.z.string(),status:r.z.enum(c)}),_.extend({kind:r.z.literal("reasoning"),summary:r.z.string(),content:r.z.string(),status:r.z.enum(c)}),_.extend({kind:r.z.literal("tool"),name:r.z.string(),toolKind:r.z.enum(m),inputText:r.z.string(),input:r.z.unknown().optional(),output:r.z.unknown().optional(),error:d.optional(),status:r.z.enum(u),durationMs:r.z.number().optional()}),_.extend({kind:r.z.literal("media"),media:v}),_.extend({kind:r.z.literal("file"),name:r.z.string(),mime:r.z.string(),previewUrl:r.z.string().optional()}),_.extend({kind:r.z.literal("annotations"),items:r.z.array(w).readonly()})]),k=r.z.discriminatedUnion("type",[y.extend({type:r.z.literal("turn.started")}),y.extend({type:r.z.literal("text.delta"),partId:r.z.string(),delta:r.z.string()}),y.extend({type:r.z.literal("reasoning.delta"),partId:r.z.string(),channel:r.z.enum(f),delta:r.z.string()}),y.extend({type:r.z.literal("tool.started"),callId:r.z.string(),name:r.z.string(),kind:r.z.enum(m)}),y.extend({type:r.z.literal("tool.input.delta"),callId:r.z.string(),delta:r.z.string()}),y.extend({type:r.z.literal("tool.input.finished"),callId:r.z.string(),input:r.z.unknown().optional()}),y.extend({type:r.z.literal("tool.finished"),callId:r.z.string(),output:r.z.unknown().optional(),error:d.optional(),durationMs:r.z.number().optional()}),y.extend({type:r.z.literal("media.added"),partId:r.z.string(),media:v}),y.extend({type:r.z.literal("annotation.added"),partId:r.z.string(),annotation:w}),y.extend({type:r.z.literal("status"),label:r.z.string(),retry:A.optional()}),y.extend({type:r.z.literal("question.opened"),prompt:b}),y.extend({type:r.z.literal("question.closed"),waitToken:r.z.string()}),y.extend({type:r.z.literal("question.skipped"),skipped:I}),y.extend({type:r.z.literal("usage"),usage:S}),y.extend({type:r.z.literal("turn.finished"),reason:r.z.enum(h)}),y.extend({type:r.z.literal("turn.failed"),error:d}),y.extend({type:r.z.literal("snapshot"),parts:r.z.array(x).readonly()})]);e.s(["B",0,k,"u",0,h,"L",0,f,"O",0,m],29570);let T=r.z.object({seconds:(0,a.$)().optional().openapi({description:"Duration of the input audio in seconds",example:9.2}),total_tokens:(0,a.D)().optional().openapi({description:"Total number of tokens used (input + output)",example:113}),input_tokens:(0,a.D)().optional().openapi({description:"Number of input tokens billed for this request",example:83}),output_tokens:(0,a.D)().optional().openapi({description:"Number of output tokens generated",example:30}),cost:(0,a.$)().optional().openapi({description:"Total cost of the request in USD",example:508e-6})}).openapi("STTUsage",{description:"Aggregated usage statistics for the STT request",example:{seconds:9.2,total_tokens:113,input_tokens:83,output_tokens:30,cost:508e-6}}),z=r.z.object({id:(0,a.D)().openapi({description:"Segment index within the transcript",example:0}),seek:(0,a.D)().optional().openapi({description:"Seek offset of the segment",example:0}),start:(0,a.$)().openapi({description:"Segment start time in seconds",example:0}),end:(0,a.$)().openapi({description:"Segment end time in seconds",example:3.2}),text:r.z.string().openapi({description:"Transcribed text of the segment",example:"Hello there."}),tokens:r.z.array((0,a.D)()).optional().openapi({description:"Token IDs of the segment"}),temperature:(0,a.$)().optional().openapi({description:"Temperature used for the segment"}),avg_logprob:(0,a.$)().optional().openapi({description:"Average log probability of the segment"}),compression_ratio:(0,a.$)().optional().openapi({description:"Compression ratio of the segment"}),no_speech_prob:(0,a.$)().optional().openapi({description:"Probability the segment contains no speech"}),speaker:(0,a.D)().optional().openapi({description:"Speaker index for the segment, present when the provider returns diarization data",example:0}),speaker_label:r.z.string().optional().openapi({description:"Provider speaker label for the segment, present when the provider labels speakers with a string",example:"speaker_0"}),channel:(0,a.D)().optional().openapi({description:"Zero-based audio channel index for the segment, present when the provider transcribes channels separately",example:0})}).openapi("STTSegment",{description:"A timestamped transcript segment, returned when response_format is verbose_json",example:{id:0,seek:0,start:0,end:3.2,text:"Hello there.",tokens:[50364,2425,456],temperature:0,avg_logprob:-.28,compression_ratio:1.13,no_speech_prob:.01,speaker:0}}),V=r.z.object({word:r.z.string().openapi({description:'The transcribed word, or the event tag such as "(laughter)" when type is audio_event',example:"Hello"}),type:r.z.enum(["word","audio_event"]).optional().openapi({description:'Kind of entry; omitted or "word" for spoken words, "audio_event" for non-speech sounds the provider tags with timestamps',example:"word"}),start:(0,a.$)().openapi({description:"Word start time in seconds",example:0}),end:(0,a.$)().openapi({description:"Word end time in seconds",example:.4}),speaker:(0,a.D)().optional().openapi({description:"Speaker index for the word, present when the provider returns diarization data",example:0}),confidence:(0,a.$)().min(0).max(1).optional().openapi({description:"Provider confidence for the word from 0 to 1, present when the provider returns per-word confidence",example:.98}),speaker_label:r.z.string().optional().openapi({description:"Provider speaker label for the word, present when the provider labels speakers with a string",example:"speaker_0"}),channel:(0,a.D)().optional().openapi({description:"Zero-based audio channel index for the word, present when the provider transcribes channels separately",example:0})}).openapi("STTWord",{description:"A timestamped word, returned when the provider includes word-level timestamps",example:{word:"Hello",start:0,end:.4,speaker:0,confidence:.98}}),C=r.z.object({text:r.z.string().openapi({description:"Entity text as it appears in the transcript"}),type:r.z.string().openapi({description:"Provider entity type label",example:"name"}),start_char:(0,a.D)().openapi({description:"Zero-based character offset of the entity start within the response-level text (not seconds)",example:15}),end_char:(0,a.D)().openapi({description:"Zero-based exclusive character offset of the entity end within the response-level text (not seconds)",example:25})}).openapi("STTEntity",{description:"A detected entity, returned when the provider runs entity detection",example:{text:"John Smith",type:"name",start_char:15,end_char:25}});r.z.object({text:r.z.string().openapi({description:"The transcribed text",example:"Hello, this is a test of OpenAI speech-to-text transcription. The weather is sunny today and the temperature is around 72 degrees."}),usage:T.optional().openapi({description:"Aggregated usage statistics for the request"}),task:r.z.string().optional().openapi({description:"The task performed, present when response_format is verbose_json",example:"transcribe"}),language:r.z.string().optional().openapi({description:"Detected or forced language, present when response_format is verbose_json",example:"english"}),language_confidence:(0,a.$)().min(0).max(1).optional().openapi({description:"Provider confidence in the detected language from 0 to 1, present when response_format is verbose_json and the provider scores language detection",example:.98}),duration:(0,a.$)().optional().openapi({description:"Duration of the input audio in seconds, present when response_format is verbose_json",example:9.2}),confidence:(0,a.$)().min(0).max(1).optional().openapi({description:"Provider confidence for the whole transcript from 0 to 1, present when response_format is verbose_json and the provider scores the full transcript",example:.94}),segments:r.z.array(z).optional().openapi({description:"Timestamped transcript segments, present when response_format is verbose_json"}),words:r.z.array(V).optional().openapi({description:"Timestamped words, present when the provider returns word-level timestamps"}),entities:r.z.array(C).optional().openapi({description:"Detected entities with character offsets into text, present when the provider runs entity detection"})}).openapi("STTResponse",{description:"STT response containing transcribed text and optional usage statistics",example:{text:"Hello, this is a test of OpenAI speech-to-text transcription.",usage:{seconds:9.2,total_tokens:113,input_tokens:83,output_tokens:30,cost:508e-6}}});let $=z.pick({start:!0,end:!0,text:!0,speaker:!0}),M=V.pick({word:!0,start:!0,end:!0,speaker:!0}),O={response_format:"verbose_json",timestamp_granularities:["segment","word"]},R={diarize:!0,...O};function E(e,t){return D(e)===D(t)}function D(e){return e.toLowerCase().replaceAll(/[^\p{L}\p{N}]/gu,"")}function N({word:e,start:t,end:n,speaker:a}){return{text:e,start:t,end:n,speaker:a}}e.s(["L",0,R,"j",0,O,"Y",0,$,"u",0,M,"R",0,E,"k",0,function(e,t){var n,a,r,i;let o;if(e?.some(e=>void 0!==e.speaker))return e;if(t?.some(e=>void 0!==e.speaker))return t.map(N);if(void 0===e||0===e.length)return void 0!==t&&t.length>0?t.map(N):e;let[s,...l]=e;return void 0!==s&&0===l.length&&void 0!==t&&(n=s,(a=t).length>1&&E(a.map(({word:e})=>e).join(" "),n.text))?(r=s,i=t,o=r.text.split(/\s+/).filter(e=>e.length>0),i.map((e,t)=>({...N(e),text:(o.length===i.length?o[t]:void 0)??e.word}))):e}],704691);var F=e.i(241782);let j={Text:"text",Transcript:"transcript",Image:"image",Video:"video",VideoJob:"video-job",Audio:"audio"},P=r.z.object({voice:r.z.string().optional(),format:r.z.string().optional(),sampleRateHz:r.z.number().optional(),channels:r.z.number().optional(),characters:r.z.number().optional()}),L=r.z.object({segments:r.z.array($).readonly()}),U=r.z.object({stage:r.z.enum(F.y)});function B(e,t){return`${e.turnId}:${t}`}let q={image:j.Image,video:j.Video,audio:j.Audio};e.s(["w",0,P,"x",0,j,"t",0,{VideoGeneration:"video_generation",SpeechGeneration:"speech_generation",Transcription:"transcription"},"H",0,L,"k",0,U,"I",0,function(e,t){return`${e.turnId}:${t}`},"Q",0,function(e,t){return{type:"tool.finished",turnId:e.turnId,callId:t.callId,output:t.output}},"V",0,function(e,t){return[{type:"tool.started",turnId:e.turnId,callId:t.callId,name:t.name,kind:m.Server},{type:"tool.input.finished",turnId:e.turnId,callId:t.callId}]},"_",0,function(e,t){let n=q[t.kind];return{type:"media.added",turnId:e.turnId,partId:B(e,n),media:{kind:t.kind,url:t.url,...void 0===t.expiresAt?{}:{expiresAt:t.expiresAt}}}},"s",0,B,"g",0,function(e,t){return{type:"status",turnId:e.turnId,label:t}},"y",0,function(e,t){return{type:"text.delta",turnId:e.turnId,partId:B(e,j.Text),delta:t}},"l",0,function(e,t){return{type:"text.delta",turnId:e.turnId,partId:B(e,j.Transcript),delta:t}},"m",0,function(e,a){return{type:"turn.failed",turnId:e.turnId,error:function(e){let{status:a}=e;return{...p(e.code,e.message),status:void 0!==a&&(0,n.q)(a,t.g)?a:null,...void 0===a?{}:{rawStatus:a},location:e.location}}(a)}},"L",0,function(e){return{type:"turn.finished",turnId:e.turnId,reason:"stop"}},"A",0,function(e){return{type:"turn.started",turnId:e.turnId}},"j",0,function(e,t){return{type:"usage",turnId:e.turnId,usage:t}},"n",0,function(e,t){return{type:"media.added",turnId:e.turnId,partId:B(e,j.VideoJob),media:{kind:"video",jobId:t}}}],372953)},241782,e=>{"use strict";let t=["queued","processing"],n=[...t,"loading"];e.s(["G",0,2e3,"e",0,5,"T",0,5,"L",0,360,"H",0,5e3,"r",0,[500,1e3,2e3,2e3,3e3,3e3,5e3,5e3,5e3,5e3],"I",0,10,"K",0,t,"y",0,n])},390177,e=>{"use strict";e.i(342837),e.i(647204),e.i(988590),e.i(549692),e.s(["f",0,function(e){let t=e.trim().match(/^(\d+)\s*[x×]\s*(\d+)$/i);if(!t?.[1]||!t[2])return null;let n=Number.parseInt(t[1],10),a=Number.parseInt(t[2],10);return n<=0||a<=0?null:{width:n,height:a}}])},855155,886988,e=>{"use strict";var t=e.i(368966),n=e.i(756247),a=e.i(497214),r=e.i(647204),i=e.i(882844),o=e.i(635157);let s=o.z.object({min:o.z.number().optional(),max:o.z.number().optional(),exclusiveMin:o.z.boolean().optional(),exclusiveMax:o.z.boolean().optional()});(0,i.j)(o.z.object({value:o.z.number().optional(),range:s}));var l=e.i(989487);class d{metadata;constructor(e){this.metadata=e}get description(){return"string"==typeof this.metadata?this.metadata:this.metadata.description}get video(){return"string"==typeof this.metadata?void 0:this.metadata.video}get name(){return this.metadata.name}get displayName(){return(0,l.j)(this.name)}toMarkdown(e){let t=[e?.includeName&&[`## ${this.displayName}`],e?.includeKey&&[`- Key: \`${this.name}\``],e?.includeExtra&&[...this.getExtraMarkdown(),!!this.video&&`- Explainer Video: [Watch](${this.video})`],[this.description]];return e?.isReverse&&(t=t.toReversed()),(0,a.e)(t.flat()).join("\n\n")}}class p extends d{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"number"==typeof e?e:this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,a.e)([`- Optional, **${this.metadata.type}**`,null!==this.metadata.defaultValue&&`- Default: **${this.metadata.defaultValue}**`])}}class u extends d{metadata;constructor(e){super(e),this.metadata=e}parseValue(e,t={withoutDefault:!1}){let n=function(e,t,{ignoredValues:n}={ignoredValues:new Set}){let a=Object.keys(e)[0],i=e[a];if(null==i||n.has(i))return(0,r.N)(void 0);if("number"!=typeof i||Number.isNaN(i)){var o;let e;return(0,r.Y)({kind:"not_a_number",message:`Expected ${a} to be a number, received ${(o=i,e=(0,r.$)(()=>JSON.stringify(o)),(0,r.C)(e)?e.data:"an unserializable value")}`})}let{min:s,max:l,exclusiveMin:d=!1,exclusiveMax:p=!1}=t;return void 0===s||(d?i>s:i>=s)?void 0===l||(p?ia)throw Error(`Min cannot be greater than max. Received ${n} > ${a}`);let o=void 0!==n?Math.max(n,e):e;return{value:void 0!==a?Math.min(a,o):o,range:t}}(e,{...this.metadata.range,...t})}get min(){return this.metadata.range.min}get max(){return this.metadata.range.max}getExtraMarkdown(){let e="integer"===this.metadata.type;return[(0,a.e)([`- Optional, **${this.metadata.type}**, ${function(e,t=!1){let{min:n,max:a}=e,r=t?n?.toFixed(0):n?.toFixed(1),i=t?a?.toFixed(0):a?.toFixed(1);return void 0!==n&&void 0!==a?`${r} to ${i}`:void 0!==n?`${r} or above`:void 0!==a?`${i} or below`:"any"}(this.metadata.range,e)}`,null!==this.metadata.defaultValue&&`- Default: ${e?this.metadata.defaultValue.toFixed(0):this.metadata.defaultValue.toFixed(1)}`]).join("\n\n")]}}class c extends d{metadata;get default(){return this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,a.e)([`- Optional, **${this.type}**`])}}class m extends c{type="map";parseValue(e){if(this.metadata.schema){let t=(0,i.C)(this.metadata.schema,e);if((0,r.C)(t))return t.data}return e??this.metadata.defaultValue}}class f extends c{type="array";parseValue(e){return"object"!=typeof e&&void 0!==e?[e]:Array.isArray(e)?e:this.metadata.defaultValue}}class g extends d{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"string"!=typeof e&&("object"!=typeof e||null===e||Array.isArray(e))?this.metadata.defaultValue:e}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return["- Optional, **string or object**"]}}class h extends d{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"boolean"==typeof e?e:this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,a.e)(["- Optional, **boolean**",null!==this.metadata.defaultValue&&`- Default: **${this.metadata.defaultValue}**`])}}class A extends d{metadata;get default(){return this.metadata.defaultValue}parseValue(e){return"string"==typeof e&&this.metadata.enumValues.includes(e)?e:this.metadata.defaultValue}constructor(e){super(e),this.metadata=e}getExtraMarkdown(){return(0,a.e)([`- Optional, **enum** (${this.metadata.enumValues.join(", ")})`,null!==this.metadata.defaultValue&&`- Default: **${this.metadata.defaultValue}**`])}}e.s(["Q",0,f,"_",0,h,"F",0,A,"$",0,m,"N",0,p,"c",0,u,"A",0,g],886988);let y=new u({name:n.f.MaxTokens,type:"integer",range:{min:1},defaultValue:null,ignoredValues:new Set([-1,0]),description:"This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length."}),b=new u({name:n.f.MaxCompletionTokens,type:"integer",range:{min:1},defaultValue:null,ignoredValues:new Set([-1,0]),description:"This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length."}),I=new u({name:n.f.Temperature,type:"float",range:{min:0,max:2},defaultValue:1,description:"This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input.",video:"https://youtu.be/ezgqHnWvua8"}),v=new u({name:n.f.TopP,type:"float",range:{min:0,max:1,exclusiveMin:!0},ignoredValues:new Set([0]),defaultValue:1,description:"This setting limits the model's choices to a percentage of likely tokens: only the top tokens whose probabilities add up to P. A lower value makes the model's responses more predictable, while the default setting allows for a full range of token choices. Think of it like a dynamic Top-K.",video:"https://youtu.be/wQP-im_HInk"}),S=new u({name:n.f.TopK,type:"integer",range:{min:0},ignoredValues:new Set([-1]),defaultValue:0,description:"This limits the model's choice of tokens at each step, making it choose from a smaller set. A value of 1 means the model will always pick the most likely next token, leading to predictable results. By default this setting is disabled, making the model to consider all choices.",video:"https://youtu.be/EbZv6-N8Xlk"}),w=new u({name:n.f.MinP,type:"float",range:{min:0,max:1},defaultValue:0,ignoredValues:new Set([0]),description:`Represents the minimum probability for a token to be
considered, relative to the probability of the most likely token. (The value changes depending on the confidence level of the most probable token.) If your Min-P is set to 0.1, that means it will only allow for tokens that are at least 1/10th as probable as the best possible option.`}),_=new u({name:n.f.TopA,type:"float",range:{min:0,max:1},defaultValue:0,ignoredValues:new Set([0]),description:'Consider only the top tokens with "sufficiently high" probabilities based on the probability of the most likely token. Think of it like a dynamic Top-P. A lower Top-A value focuses the choices based on the highest probability token but with a narrower scope. A higher Top-A value does not necessarily affect the creativity of the output, but rather refines the filtering process based on the maximum probability.'}),x=new u({name:n.f.PresencePenalty,type:"float",range:{min:-2,max:2},defaultValue:0,description:"Adjusts how often the model repeats specific tokens already used in the input. Higher values make such repetition less likely, while negative values do the opposite. Token penalty does not scale with the number of occurrences. Negative values will encourage token reuse.",video:"https://youtu.be/MwHG5HL-P74"}),k=new u({name:n.f.FrequencyPenalty,type:"float",range:{min:-2,max:2},defaultValue:0,description:"This setting aims to control the repetition of tokens based on how often they appear in the input. It tries to use less frequently those tokens that appear more in the input, proportional to how frequently they occur. Token penalty scales with the number of occurrences. Negative values will encourage token reuse.",video:"https://youtu.be/p4gl6fqI0_w"}),T=new u({name:n.f.RepetitionPenalty,type:"float",range:{min:0,max:2,exclusiveMin:!0},defaultValue:1,ignoredValues:new Set([0]),description:"Helps to reduce the repetition of tokens from the input. A higher value makes the model less likely to repeat tokens, but too high a value can make the output less coherent (often with run-on sentences that lack small words). Token penalty scales based on original token's probability.",video:"https://youtu.be/LHjGAnLm3DM"}),z=new p({name:n.f.Seed,type:"integer",defaultValue:null,description:"If specified, the inferencing will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for some models."}),V=new m({name:n.f.LogitBias,defaultValue:null,description:"Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token."}),C=new h({name:n.f.Logprobs,defaultValue:null,description:"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned."}),$=new p({name:n.f.TopLogprobs,type:"integer",defaultValue:null,description:"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used."}),M=new m({name:n.f.Prediction,defaultValue:null,description:"Provides expected output content that capable models can use to reduce response latency when much of the completion is known in advance."}),O=new m({name:n.f.ResponseFormat,defaultValue:null,description:'Forces the model to produce specific output format. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n **Note**: when using JSON mode, you should also instruct the model to produce JSON yourself via a system or user message.'}),R=new f({name:n.f.Stop,defaultValue:null,description:"Stop generation immediately if the model encounter any token specified in the stop array."}),E=new f({name:n.f.Tools,defaultValue:null,description:"Tool calling parameter, following OpenAI's tool calling request shape. For non-OpenAI providers, it will be transformed accordingly. [Click here to learn more about tool calling](/docs/guides/features/tool-calling)"}),D=new g({name:n.f.ToolChoice,defaultValue:null,description:'Controls which (if any) tool is called by the model. \'none\' means the model will not call any tool and instead generates a message. \'auto\' means the model can pick between generating a message or calling one or more tools. \'required\' means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.'}),N=new h({name:n.f.StructuredOutputs,defaultValue:null,description:"If the model can return structured outputs using response_format json_schema."}),F=new h({name:n.f.IncludeReasoning,defaultValue:null,description:"Deprecated alias for reasoning.exclude. When true, reasoning tokens are returned in the response when supported by the model."}),j=new m({name:n.f.Reasoning,defaultValue:null,description:"Controls reasoning behavior for models that support thinking tokens, including whether reasoning is enabled, the reasoning effort, maximum reasoning tokens, and whether reasoning is excluded from the response."}),P=new A({name:n.f.ReasoningEffort,enumValues:Object.values(t.E),defaultValue:null,description:"OpenAI-style reasoning effort setting. Higher values allow the model to spend more tokens on internal reasoning when supported."}),L=new m({name:n.f.WebSearchOptions,defaultValue:null,description:"Configures native web search options for models and providers that support web-connected answers."}),U=new h({name:n.f.ParallelToolCalls,defaultValue:!0,description:"Whether to enable parallel function calling during tool use. If true, the model can call multiple functions simultaneously. If false, functions will be called sequentially. Only applies when tools are provided."}),B=new A({name:n.f.Verbosity,enumValues:["low","medium","high","xhigh","max"],defaultValue:null,description:"Constrains the verbosity of the model's response. Lower values produce more concise responses, while higher values produce more detailed and comprehensive responses. Introduced by OpenAI for the Responses API.\n\nFor Anthropic models, this parameter maps to `output_config.effort`. The 'xhigh' level is supported by Anthropic Claude 4.7 Opus and later models. The 'max' level is supported by Anthropic Claude 4.6 Opus and later models."}),q=[I,v,S,k,x,T,w,_],G=Object.fromEntries([...q,z,y,b,V,C,$,M,O,N,R,E,D,U,F,j,P,L,B].map(e=>[e.name,e]));e.s(["e",0,q,"y",0,k,"Y",0,y,"r",0,G,"h",0,x,"A",0,I,"R",0,v,"O",0,B],855155)},212416,e=>{"use strict";e.s(["f",0,function(e){return null!==e.runningImage?e.runningImage:null===e.desiredSetAt?e.bootedImage:null}])},219643,e=>{"use strict";e.i(427150);var t=e.i(368966);let n={[t.E.Max]:[t.E.XHigh,t.E.High,t.E.Medium,t.E.Low],[t.E.XHigh]:[t.E.High,t.E.Medium,t.E.Low],[t.E.Minimal]:[t.E.Low,t.E.Medium,t.E.High],[t.E.None]:[],[t.E.Low]:[t.E.Medium,t.E.High],[t.E.Medium]:[t.E.Low,t.E.High],[t.E.High]:[t.E.Medium,t.E.Low]};Object.values(t.V).reverse(),e.s(["w",0,function(e){let n=e?.supported_reasoning_efforts;return n&&0!==n.length?e.is_mandatory_reasoning?[...n]:[...n,t.E.None]:null},"$",0,function(e,t){if(!e)return;if(!t||0===t.length)return e;let a=new Set(t);if(a.has(e))return e;for(let t of n[e])if(a.has(t))return t}])},367765,e=>{"use strict";var t=e.i(427150);function n(){return"u">typeof globalThis&&"Summarizer"in globalThis}function a(){return r()?.model??null}function r(){if("u"n.call(e,t),create:t=>a.call(e,t)}}function o(e,t){var n,a;let r,i,o="function"!=typeof(r=l(n=e,"text"===t?"canCreateTextSession":"canCreateGenericSession"))?null:e=>r.call(n,e),d="function"!=typeof(i=l(a=e,"text"===t?"createTextSession":"createGenericSession"))?null:e=>i.call(a,e);return o&&d?{availability:async e=>(function(e){switch(e){case"readily":return"available";case"after-download":return"downloadable";case"no":return"unavailable";default:return e}})(await o(e)),create:async e=>(function(e){if("function"==typeof e.promptStreaming){var t;return{prompt:e.prompt??(t=e.promptStreaming.bind(e),async(e,n)=>{let a=[];for await(let r of b(t(e,n)))a.push(r);return a.join("")}),promptStreaming:e.promptStreaming.bind(e),destroy:e.destroy?.bind(e)??(()=>{})}}if("function"==typeof e.prompt){let t=e.prompt.bind(e);return{prompt:t,promptStreaming:(e,n)=>s(t,e,n),destroy:e.destroy?.bind(e)??(()=>{})}}throw Error("LanguageModel session is missing prompt APIs")})(await d(e))}:null}async function*s(e,t,n){yield await e(t,n)}function l(e,t){let n=u(e);return n?Reflect.get(n,t)??null:null}function d(e,t){return"function"==typeof l(e,t)}function p(e){let t=u(e);if(!t)return[];try{return Object.getOwnPropertyNames(t).sort()}catch{return[]}}function u(e){return"object"!=typeof e&&"function"!=typeof e||null===e?null:e}async function c(){return n()?Summarizer.availability({type:"headline",format:"plain-text",length:"short"}):null}async function m(e){let t=a();return t?t.availability(e):null}function f(e){return e.lengthComputable&&e.total>0?Math.round(e.loaded/e.total*100):e.loaded>=0&&e.loaded<=1?Math.round(100*e.loaded):Math.max(0,Math.min(100,Math.round(e.loaded)))}async function g(e){return A(e,{sharedContext:"This is a chat message sent to an AI assistant. Generate a concise title."})}async function h(e,t){let n=e.trim();if(!n)return null;let a=await y({input:n,options:t}),r=[];for await(let e of a)r.push(e);let i=r.join("").trim();return i.length>0?i:null}async function A(e,t){if(!n())return null;let a=e.trim();if(!a||"available"!==await Summarizer.availability({type:"headline",format:"plain-text",length:t?.length??"short"}))return null;let r=await Summarizer.create({type:"headline",format:"plain-text",length:t?.length??"short",sharedContext:t?.sharedContext});try{let e=(await r.summarize(a)).trim();if(!e)return null;let n=t?.maxLength??80;return e.slice(0,n)}finally{r.destroy()}}async function*y({input:e,signal:t,options:n,promptOptions:r}){let i=a();if(!i)throw Error("LanguageModel API is not available");let o=await i.availability(n);if("available"!==o)throw Error(`LanguageModel is ${o}`);let s=await i.create({...n,signal:t});try{let n=s.promptStreaming(e,{...r,signal:t});yield*b(n)}finally{s.destroy()}}async function*b(e){let t="",n=null;for await(let a of I(e)){if(!a)continue;null===n&&t.length>0&&(n=a.startsWith(t));let e=!0===n&&t.length>0?a.slice(t.length):a;t=!0===n?a:`${t}${a}`,e.length>0&&(yield e)}}async function*I(e){if("getReader"in e){let t=e.getReader();try{let e=await t.read();for(;!e.done;)yield e.value,e=await t.read()}finally{t.releaseLock()}return}yield*e}e.s(["P",0,m,"a",0,function(){let e="u"{t.addEventListener("downloadprogress",t=>{t instanceof ProgressEvent&&e(f(t))})}}).then(t=>{e(100),t.destroy()},e=>{t(e)}):t(Error("LanguageModel API is not available"))},"s",0,function(e,t,a){n()?Summarizer.create({type:"headline",format:"plain-text",length:"short",signal:a,monitor:t=>{t.addEventListener("downloadprogress",t=>{e(f(t))})}}).then(t=>{e(100),t.destroy()},e=>{t(e)}):t(Error("Summarizer API is not available"))}])},575889,e=>{"use strict";function t(e){try{let t=new URL(e);if(t.origin!==location.origin)return`${location.origin}${t.pathname}${t.search}`}catch{}return e}e.s(["f",0,function(){return{fetchApi:(e,t)=>fetch(e,t),rewriteUrl:t}}])},944946,e=>{"use strict";var t=e.i(942960),n=e.i(393182),a=e.i(331194);let r={[n.f.FusionFlash]:a.m.GeneralFast},i=[n.f.Fusion,...Object.keys(r)];e.s(["f",0,function(e){return i.includes((0,t.f)(e.toLowerCase()))}])},519004,e=>{"use strict";e.s(["f",0,function(e){return"number"==typeof e?.min&&"number"==typeof e.max}])},355140,e=>{"use strict";e.s(["q",0,300,"o",0,86400,"O",0,1,"C",0,2,"f",0,-2,"L",0,0,"y",0,1,"j",0,2,"t",0,-2,"b",0,"@","l",0,"preset/","p",0,2,"c",0,0,"D",0,4,"m",0,2,"a",0,0,"x",0,0,"_",0,20,"N",0,0,"Z",0,1,"R",0,0])},430022,e=>{"use strict";e.s(["v",0,function(e){if(!/^\d{4}-\d{2}-\d{2}$/u.test(e))return!1;let t=new Date(`${e}T00:00:00.000Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e},"o",0,function(e){return!Number.isNaN(e.getTime())},"N",0,864e5,"V",0,3600,"X",0,6e4,"O",0,2592e6,"R",0,1e3,"b",0,6048e5,"y",0,function(e){if(!e)return new Date(0/0);let t=e.replace(" ","T");return new Date(/[zZ]$|[+-]\d{2}:\d{2}$/.test(t)?t:`${t}Z`)},"P",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},"S",0,function(e,t=0){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1))},"Q",0,e=>e.toISOString().split("T")[0]])},390623,e=>{"use strict";e.s(["q",0,"contains characters that cannot be sent in an HTTP header — check for stray unicode dashes or invisible characters from copy-paste","r",0,function(e){return null===function(e){let t=[],n=[],a=0;for(;a126)&&(t.push(`U+${r.toString(16).toUpperCase().padStart(4,"0")}`),n.push(a)),a+=r>65535?2:1}return 0===t.length?null:{codePoints:t,positions:n}}(e)}])},236911,e=>{"use strict";e.s(["f",0,function(e){throw Error(`Unexpected value: ${e}`)}])},814492,e=>{"use strict";var t,n,a=e.i(169798),r=e.i(335609),i=e.i(647204);e.i(30012);var o=e.i(882844),s=e.i(635157);let l=(n=[(t=s.z.object({PROVIDER_ENCRYPTION_KEY:s.z.string().nullish(),SIGNUP_CF_SEAL_KEY:s.z.string().nullish(),CALLBACK_URL_ENCRYPTION_KEY:s.z.string().nullish(),AUTH_USER_SALT:s.z.string().default("default-salt"),CI:s.z.string().default(""),SITE_URL:s.z.string().nullish()}),e=>{let n=(0,o.C)(t,e??a.default.env);return(0,i.V)(n)?(0,i.Y)(n.error.message):(0,i.N)(n.data)})],function(e){let t=[];for(let a of n){let n=a(e);if((0,i.V)(n))return n;t.push(n.data)}return(0,i.N)(Object.assign({},...t))});var d=e.i(640216);e.s(["G",0,()=>{var e;return e={production:"https://internal.openrouter.ai",local:"http://localhost:3001"},(0,d.y)(window.location.hostname)?e.local:e.production},"P",0,()=>{let e=[(0,i.u)(l()).SITE_URL,a.default?.env?.NEXT_PUBLIC_SITE_URL,a.default?.env?.NEXT_PUBLIC_VERCEL_URL].map(e=>e?.trim()).find(e=>!!e)??"https://openrouter.ai";return(0,r.d)(e.includes("http")?e:`https://${e}`)},"c",0,function(e){let t=e.replaceAll(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"_");return t.match(/^(?:\d|--|-\d)/)?`_${t}`:t}],814492)},586906,e=>{"use strict";e.i(371492);let t=e=>crypto.getRandomValues(new Uint8Array(e));var n,a=((n={}).Generate="gen",n.Embeddings="gen-emb",n.Character="char",n.Message="msg",n.Artifact="art",n.Generation="art-gen",n.ArtifactFile="art-file",n.ArtifactVersion="art-ver",n.ArtifactFileContent="art-file-cont",n.AssistantMessageItem="a-msg-item",n.Item="item",n.Chat="orc",n.StripeAddCredits="sac",n.VideoGeneration="gen-vid",n.Rerank="gen-rerank",n.Decisions="gen-dec",n.TTS="gen-tts",n.Transcription="gen-stt",n.ImageGeneration="gen-img",n.Batch="batch",n.BatchGeneration="gen-batch",n.ServerToolCall="gen-tool",n.ServerToolCheckpoint="gen-tool-cp",n.Realtime="gen-rt",n.RealtimeCheckpoint="gen-rt-cp",n.Request="req",n);let r=((e,n=21)=>((e,t,n)=>{let a=256-256%e.length;if(256===a){let a=e.length-1;return (r=t)=>{if(!r)return"";let i="";for(;;){let t=n(r),o=r|=0;for(;o--;)if((i+=e[t[o]&a]).length>=r)return i}}}return (r=t)=>{if(!r)return"";let i="",o=Math.ceil(409.6*r/a);for(;;){let t=n(o),s=o;for(;s--;)if(t[s]=r)return i}}})(e,0|n,t))("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",20),i=/^[0-9a-zA-Z]{20}$/;e.s(["I",()=>a,"t",0,function(e,t){let n=`${t}-`;if(!e.startsWith(n))return!1;let a=e.slice(n.length),r=a.indexOf("-");if(-1===r)return!1;let o=a.slice(0,r),s=a.slice(r+1),l=Number.parseInt(o,10);return!Number.isNaN(l)&&!(l<=0)&&i.test(s)},"L",0,function(e){let t=Math.floor(Date.now()/1e3);return`${e}-${t}-${r()}`}],586906)},733476,e=>{"use strict";e.i(988590);var t,n,a,r,i=((t={}).AzureOpenAIEmbeddingsAdapter="AzureOpenAIEmbeddingsAdapter",t.OpenAIEmbeddingsAdapter="OpenAIEmbeddingsAdapter",t.DeepInfraEmbeddingsAdapter="DeepInfraEmbeddingsAdapter",t.NvidiaEmbeddingsAdapter="NvidiaEmbeddingsAdapter",t.VoyageEmbeddingsAdapter="VoyageEmbeddingsAdapter",t.VoyageMultimodalEmbeddingsAdapter="VoyageMultimodalEmbeddingsAdapter",t.CohereEmbeddingsAdapter="CohereEmbeddingsAdapter",t.PerplexityEmbeddingsAdapter="PerplexityEmbeddingsAdapter",t.GoogleAIStudioEmbeddingsAdapter="GoogleAIStudioEmbeddingsAdapter",t.GoogleVertexEmbeddingsAdapter="GoogleVertexEmbeddingsAdapter",t.AmazonBedrockEmbeddingsAdapter="AmazonBedrockEmbeddingsAdapter",t),o=((n={}).AlibabaImageAdapter="AlibabaImageAdapter",n.SeedreamImageAdapter="SeedreamImageAdapter",n.XaiImageAdapter="XaiImageAdapter",n.RecraftImageAdapter="RecraftImageAdapter",n.BlackForestLabsImageAdapter="BlackForestLabsImageAdapter",n.BlackForestLabsFlux3ImageAdapter="BlackForestLabsFlux3ImageAdapter",n.SourcefulImageAdapter="SourcefulImageAdapter",n.SourcefulV2ImageAdapter="SourcefulV2ImageAdapter",n.SourcefulV25ImageAdapter="SourcefulV25ImageAdapter",n.SourcefulV26ImageAdapter="SourcefulV26ImageAdapter",n.OpenAIImageAdapter="OpenAIImageAdapter",n.MetaImageAdapter="MetaImageAdapter",n.GoogleAIStudioGeminiImageAdapter="GoogleAIStudioGeminiImageAdapter",n.GoogleVertexGeminiImageAdapter="GoogleVertexGeminiImageAdapter",n.AzureMAIImageAdapter="AzureMAIImageAdapter",n.AzureOpenAIImageAdapter="AzureOpenAIImageAdapter",n.QuiverImageAdapter="QuiverImageAdapter",n.KreaImageAdapter="KreaImageAdapter",n.NovitaImageAdapter="NovitaImageAdapter",n.TencentImageAdapter="TencentImageAdapter",n.TencentPanoramaImageAdapter="TencentPanoramaImageAdapter",n.MinimaxImageAdapter="MinimaxImageAdapter",n),s=((a={}).AzureDecisionsAdapter="AzureDecisionsAdapter",a.AzureOpenAIDecisionsAdapter="AzureOpenAIDecisionsAdapter",a.BasetenDecisionsAdapter="BasetenDecisionsAdapter",a.CloudflareDecisionsAdapter="CloudflareDecisionsAdapter",a.DeepInfraSystemOneDecisionsAdapter="DeepInfraSystemOneDecisionsAdapter",a.GoogleAIStudioDecisionsAdapter="GoogleAIStudioDecisionsAdapter",a.GoogleVertexDecisionsAdapter="GoogleVertexDecisionsAdapter",a.HeyGenDecisionsAdapter="HeyGenDecisionsAdapter",a.InceptionDecisionsAdapter="InceptionDecisionsAdapter",a.LiquidDecisionsAdapter="LiquidDecisionsAdapter",a.MakoraDecisionsAdapter="MakoraDecisionsAdapter",a.MorphDecisionsAdapter="MorphDecisionsAdapter",a.OpenAIDecisionsAdapter="OpenAIDecisionsAdapter",a.ParallelDecisionsAdapter="ParallelDecisionsAdapter",a.PerplexityDecisionsAdapter="PerplexityDecisionsAdapter",a.PrimeIntellectDecisionsAdapter="PrimeIntellectDecisionsAdapter",a.RespanDecisionsAdapter="RespanDecisionsAdapter",a.RespanSystemOneDecisionsAdapter="RespanSystemOneDecisionsAdapter",a.ScaleDownDecisionsAdapter="ScaleDownDecisionsAdapter",a.TogetherTevDecisionsAdapter="TogetherTevDecisionsAdapter",a.TypeSafeDecisionsAdapter="TypeSafeDecisionsAdapter",a.TypeSafeFirstPartyDecisionsAdapter="TypeSafeFirstPartyDecisionsAdapter",a),l=((r={}).AI21Adapter="AI21Adapter",r.AionLabsAdapter="AionLabsAdapter",r.AkashAdapter="AkashAdapter",r.ArceeAdapter="ArceeAdapter",r.AmazonBedrockConverseAdapter="AmazonBedrockConverseAdapter",r.AmazonBedrockConverseNovaReasoningAdapter="AmazonBedrockConverseNovaReasoningAdapter",r.AmazonBedrockInvokeAnthropicAdapter="AmazonBedrockInvokeAnthropicAdapter",r.AmazonBedrockOSSAdapter="AmazonBedrockOSSAdapter",r.AmazonBedrockRuntimeChatCompletionsAdapter="AmazonBedrockRuntimeChatCompletionsAdapter",r.AmazonNovaAdapter="AmazonNovaAdapter",r.AnthropicMessageAdapter="AnthropicMessageAdapter",r.ClaudeOnAwsAdapter="ClaudeOnAwsAdapter",r.AlibabaAdapter="AlibabaAdapter",r.AmbientAdapter="AmbientAdapter",r.BlackForestLabsAdapter="BlackForestLabsAdapter",r.BaiduAdapter="BaiduAdapter",r.AvianAdapter="AvianAdapter",r.AzureAnthropicAdapter="AzureAnthropicAdapter",r.AzureMistralAdapter="AzureMistralAdapter",r.AzureOpenAIAdapter="AzureOpenAIAdapter",r.AzureOpenAIResponsesAdapter="AzureOpenAIResponsesAdapter",r.AzureMAIImageAdapter="AzureMAIImageAdapter",r.AzureOSSAdapter="AzureOSSAdapter",r.BasetenAdapter="BasetenAdapter",r.BytePlusAdapter="BytePlusAdapter",r.ChutesAdapter="ChutesAdapter",r.CloudflareAdapter="CloudflareAdapter",r.CohereCompatAdapter="CohereCompatAdapter",r.CohereV2Adapter="CohereV2Adapter",r.InternalStreamCohereV2Adapter="InternalStreamCohereV2Adapter",r.CerebrasAdapter="CerebrasAdapter",r.ClarifaiAdapter="ClarifaiAdapter",r.CosineAdapter="CosineAdapter",r.CrucibleAdapter="CrucibleAdapter",r.CrucibleResponsesAdapter="CrucibleResponsesAdapter",r.CrusoeAdapter="CrusoeAdapter",r.DarkbloomAdapter="DarkbloomAdapter",r.DatabricksAnthropicAdapter="DatabricksAnthropicAdapter",r.DatabricksOpenResponsesAdapter="DatabricksOpenResponsesAdapter",r.DeepInfraAdapter="DeepInfraAdapter",r.DeepSeekAdapter="DeepSeekAdapter",r.DigitalOceanAdapter="DigitalOceanAdapter",r.EncodedImageOpenAIAdapter="EncodedImageOpenAIAdapter",r.FakeAdapter="FakeAdapter",r.FireworksAdapter="FireworksAdapter",r.FireworksAnthropicAdapter="FireworksAnthropicAdapter",r.FriendliAdapter="FriendliAdapter",r.GoogleAIStudioGeminiAdapter="GoogleAIStudioGeminiAdapter",r.GoogleVertexAnthropicAdapter="GoogleVertexAnthropicAdapter",r.GoogleVertexGeminiAdapter="GoogleVertexGeminiAdapter",r.GroqAdapter="GroqAdapter",r.InceptionAdapter="InceptionAdapter",r.InceptronAdapter="InceptronAdapter",r.InferactVLLMAdapter="InferactVLLMAdapter",r.InferenceNetAdapter="InferenceNetAdapter",r.InfermaticAdapter="InfermaticAdapter",r.InflectionAdapter="InflectionAdapter",r.InflectionLegacyAdapter="InflectionLegacyAdapter",r.InternalStreamAmazonBedrockInvokeAnthropicAdapter="InternalStreamAmazonBedrockInvokeAnthropicAdapter",r.InternalStreamAmazonBedrockOpenAIResponsesAdapter="InternalStreamAmazonBedrockOpenAIResponsesAdapter",r.InternalStreamAmazonBedrockRuntimeOpenAIResponsesAdapter="InternalStreamAmazonBedrockRuntimeOpenAIResponsesAdapter",r.InternalStreamAnthropicMessageAdapter="InternalStreamAnthropicMessageAdapter",r.InternalStreamAzureAnthropicAdapter="InternalStreamAzureAnthropicAdapter",r.InternalStreamAzureMAIImageAdapter="InternalStreamAzureMAIImageAdapter",r.InternalStreamAzureOpenAIResponsesAdapter="InternalStreamAzureOpenAIResponsesAdapter",r.InternalStreamClaudeOnAwsAdapter="InternalStreamClaudeOnAwsAdapter",r.InternalStreamGoogleAIStudioInteractionsAdapter="InternalStreamGoogleAIStudioInteractionsAdapter",r.InternalStreamGoogleVertexAnthropicAdapter="InternalStreamGoogleVertexAnthropicAdapter",r.InternalStreamGoogleVertexInteractionsAdapter="InternalStreamGoogleVertexInteractionsAdapter",r.InternalStreamGoogleVertexResponsesAdapter="InternalStreamGoogleVertexResponsesAdapter",r.InternalStreamOpenAIResponsesAdapter="InternalStreamOpenAIResponsesAdapter",r.InternalStreamRecraftAdapter="InternalStreamRecraftAdapter",r.InternalStreamXAIImageAdapter="InternalStreamXAIImageAdapter",r.InternalStreamXAIResponsesAdapter="InternalStreamXAIResponsesAdapter",r.IonetAdapter="IonetAdapter",r.IonstreamAdapter="IonstreamAdapter",r.MakoraAdapter="MakoraAdapter",r.MancerAdapter="MancerAdapter",r.InternalStreamMetaResponsesAdapter="InternalStreamMetaResponsesAdapter",r.MistralAdapter="MistralAdapter",r.MinimaxAdapter="MinimaxAdapter",r.ModelRunAdapter="ModelRunAdapter",r.MinimaxChatCompletionV2Adapter="MinimaxChatCompletionV2Adapter",r.MoonshotAdapter="MoonshotAdapter",r.MorphAdapter="MorphAdapter",r.MorphFastApplyAdapter="MorphFastApplyAdapter",r.NearAIAdapter="NearAIAdapter",r.NebiusAdapter="NebiusAdapter",r.NexAGIAdapter="NexAGIAdapter",r.NextBitAdapter="NextBitAdapter",r.NovitaAdapter="NovitaAdapter",r.NvidiaAdapter="NvidiaAdapter",r.OllamaAdapter="OllamaAdapter",r.OpenAIAdapter="OpenAIAdapter",r.AtlasCloudAdapter="AtlasCloudAdapter",r.GMICloudAdapter="GMICloudAdapter",r.OpenInferenceAdapter="OpenInferenceAdapter",r.ParasailAdapter="ParasailAdapter",r.PhalaAdapter="PhalaAdapter",r.PearlResearchAdapter="PearlResearchAdapter",r.PrimeIntellectAdapter="PrimeIntellectAdapter",r.OpenAIResponsesAdapter="OpenAIResponsesAdapter",r.PerceptronAdapter="PerceptronAdapter",r.PerplexityAdapter="PerplexityAdapter",r.RecraftAdapter="RecraftAdapter",r.RelaceAdapter="RelaceAdapter",r.StealthAdapter="StealthAdapter",r.StealthAdapter2="StealthAdapter2",r.InternalStreamStealthAdapter2="InternalStreamStealthAdapter2",r.StepFunAdapter="StepFunAdapter",r.StreamLakeAdapter="StreamLakeAdapter",r.TogetherAdapter="TogetherAdapter",r.UnbiasedAdapter="UnbiasedAdapter",r.UpstageAdapter="UpstageAdapter",r.XAIImageAdapter="XAIImageAdapter",r.XAIResponsesAdapter="XAIResponsesAdapter",r.XiaomiAdapter="XiaomiAdapter",r.ZAIAdapter="ZAIAdapter",r.SiliconFlowAdapter="SiliconFlowAdapter",r.SailResearchAdapter="SailResearchAdapter",r.SakanaAIAdapter="SakanaAIAdapter",r.SambaNovaAdapter="SambaNovaAdapter",r.ScaleDownAdapter="ScaleDownAdapter",r.TenstorrentAdapter="TenstorrentAdapter",r.ThinkingMachinesAdapter="ThinkingMachinesAdapter",r.SeedreamAdapter="SeedreamAdapter",r.InternalStreamSeedreamAdapter="InternalStreamSeedreamAdapter",r.SourcefulAdapter="SourcefulAdapter",r.SourcefulV2Adapter="SourcefulV2Adapter",r.SourcefulV25Adapter="SourcefulV25Adapter",r.SourcefulV26Adapter="SourcefulV26Adapter",r.InternalStreamBlackForestLabsAdapter="InternalStreamBlackForestLabsAdapter",r.InternalStreamSourcefulAdapter="InternalStreamSourcefulAdapter",r.InternalStreamSourcefulV2Adapter="InternalStreamSourcefulV2Adapter",r.InternalStreamSourcefulV25Adapter="InternalStreamSourcefulV25Adapter",r.InternalStreamSourcefulV26Adapter="InternalStreamSourcefulV26Adapter",r.VeniceAdapter="VeniceAdapter",r.VertexOpenAIAdapter="VertexOpenAIAdapter",r.VLLMChatCompletionsAdapter="VLLMChatCompletionsAdapter",r.VLLMOpenAIAdapter="VLLMOpenAIAdapter",r.WaferAdapter="WaferAdapter",r.WandbAdapter="WandbAdapter",r);e.s(["n",()=>l,"o",0,{Stub:"stub",OpenAIBatchAdapter:"OpenAIBatchAdapter",AnthropicBatchAdapter:"AnthropicBatchAdapter",GoogleAIStudioGeminiBatchAdapter:"GoogleAIStudioGeminiBatchAdapter",VertexGeminiBatchAdapter:"VertexGeminiBatchAdapter",VertexDeferredInteractionsBatchAdapter:"VertexDeferredInteractionsBatchAdapter",TogetherBatchAdapter:"TogetherBatchAdapter",ParasailBatchAdapter:"ParasailBatchAdapter",DeepInfraBatchAdapter:"DeepInfraBatchAdapter",AlibabaBatchAdapter:"AlibabaBatchAdapter",FireworksBatchAdapter:"FireworksBatchAdapter",MistralBatchAdapter:"MistralBatchAdapter",XAIBatchAdapter:"XAIBatchAdapter",SailResearchBatchAdapter:"SailResearchBatchAdapter",MorphBatchAdapter:"MorphBatchAdapter"},"G",()=>s,"R",()=>i,"W",0,{CloudflareClairicExtractionsAdapter:"CloudflareClairicExtractionsAdapter",InceptionExtractionsAdapter:"InceptionExtractionsAdapter",InferenceNetSchematronExtractionsAdapter:"InferenceNetSchematronExtractionsAdapter",PerplexityExtractionsAdapter:"PerplexityExtractionsAdapter",SageExtractionsAdapter:"SageExtractionsAdapter",ScaleDownExtractionsAdapter:"ScaleDownExtractionsAdapter"},"O",()=>o,"u",0,{AlibabaTTSAdapter:"AlibabaTTSAdapter",AssemblyAITTSAdapter:"AssemblyAITTSAdapter",AzureTTSAdapter:"AzureTTSAdapter",OpenAITTSAdapter:"OpenAITTSAdapter",OpenAISSETTSAdapter:"OpenAISSETTSAdapter",DeepInfraTTSAdapter:"DeepInfraTTSAdapter",GoogleVertexTTSAdapter:"GoogleVertexTTSAdapter",GoogleAIStudioTTSAdapter:"GoogleAIStudioTTSAdapter",MistralTTSAdapter:"MistralTTSAdapter",XAITTSAdapter:"XAITTSAdapter",DeepgramTTSAdapter:"DeepgramTTSAdapter",MinimaxTTSAdapter:"MinimaxTTSAdapter",FishAudioTTSAdapter:"FishAudioTTSAdapter",TogetherTTSAdapter:"TogetherTTSAdapter",SeedAudioTTSAdapter:"SeedAudioTTSAdapter",ElevenLabsTTSAdapter:"ElevenLabsTTSAdapter",HeyGenTTSAdapter:"HeyGenTTSAdapter",SpeechifyTTSAdapter:"SpeechifyTTSAdapter"}])},898820,e=>{"use strict";let t={ChatCompletions:"chat-completions",Responses:"responses",AnthropicMessages:"anthropic-messages",Completions:"completions",Other:"other"},n=[{suffix:"/chat/completions",skin:t.ChatCompletions},{suffix:"/responses",skin:t.Responses},{suffix:"/messages",skin:t.AnthropicMessages},{suffix:"/completions",skin:t.Completions}];e.s(["$",0,n,"Q",0,t])},683838,e=>{"use strict";e.s(["E",0,{"1:1":"1:1","1:2":"1:2","1:3":"1:3","1:4":"1:4","1:8":"1:8","2:1":"2:1","2:3":"2:3","3:1":"3:1","2.35:1":"2.35:1","3:2":"3:2","3:4":"3:4","4:1":"4:1","4:3":"4:3","4:5":"4:5","5:2":"5:2","5:4":"5:4","5:7":"5:7","7:5":"7:5","8:1":"8:1","9:16":"9:16","16:9":"16:9","9:19.5":"9:19.5","19.5:9":"19.5:9","9:20":"9:20","20:9":"20:9","9:21":"9:21","21:9":"21:9",auto:"auto"},"g",0,{png:"png",jpeg:"jpeg",webp:"webp",svg:"svg",gif:"gif"},"r",0,{512:"512",768:"768","1K":"1K","1.5K":"1.5K","2K":"2K","4K":"4K"},"M",0,{edit:"edit",reference:"reference"},"u",0,{auto:"auto",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}])},331194,485913,e=>{"use strict";var t=e.i(882844),n=e.i(635157),a=e.i(72916);e.s(["P",0,4,"b",0,16e3,"Z",0,8,"h",0,16,"a",0,8],485913);let r={GeneralHigh:"general-high",GeneralBudget:"general-budget",GeneralFast:"general-fast"},i=n.z.union([n.z.string(),(0,t.$)(),n.z.boolean(),n.z.null()]),o=n.z.union([i,n.z.array(i),n.z.record(n.z.string(),i)]),s=n.z.object({type:n.z.string().openapi({description:'Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").'}),parameters:n.z.record(n.z.string(),o).optional().openapi({description:"Optional configuration forwarded as the tool's `parameters` object."})}),l=n.z.object({id:n.z.literal(a.f.Fusion),enabled:n.z.boolean().optional().openapi({description:"Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true."}),preset:n.z.nativeEnum(r).optional().openapi({description:"Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.",example:"general-high"}),analysis_models:n.z.array(n.z.string()).min(1).max(8).optional().openapi({description:'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-sol-latest, ~google/gemini-pro-latest).',example:["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"]}),model:n.z.string().optional().openapi({description:"For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.",example:"~anthropic/claude-opus-latest"}),max_tool_calls:n.z.number().int().min(1).max(16).optional().openapi({description:"For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.",example:12}),tools:n.z.array(s).max(8).optional().openapi({description:'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).',example:[{type:"openrouter:web_search",parameters:{excluded_domains:["example.com"]}},{type:"openrouter:web_fetch"}]})}).openapi("FusionPlugin",{example:{id:"fusion",enabled:!0,analysis_models:["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"],model:"~anthropic/claude-opus-latest"}});e.s(["h",0,l,"m",0,r],331194)},756247,e=>{"use strict";e.s(["f",0,{Temperature:"temperature",TopP:"top_p",TopK:"top_k",MinP:"min_p",TopA:"top_a",FrequencyPenalty:"frequency_penalty",PresencePenalty:"presence_penalty",RepetitionPenalty:"repetition_penalty",MaxTokens:"max_tokens",MaxCompletionTokens:"max_completion_tokens",LogitBias:"logit_bias",Logprobs:"logprobs",TopLogprobs:"top_logprobs",Prediction:"prediction",Seed:"seed",ResponseFormat:"response_format",StructuredOutputs:"structured_outputs",Stop:"stop",Tools:"tools",ToolChoice:"tool_choice",ParallelToolCalls:"parallel_tool_calls",IncludeReasoning:"include_reasoning",Reasoning:"reasoning",ReasoningEffort:"reasoning_effort",WebSearchOptions:"web_search_options",Verbosity:"verbosity"}])},470672,e=>{"use strict";e.s(["f",0,500])},173589,e=>{"use strict";e.i(882844);var t=e.i(635157);let n={Applied:"applied",Unchanged:"unchanged",Failed:"failed"},a=t.z.enum([n.Applied,n.Unchanged,n.Failed]),r={UpToDate:"up_to_date",NotRunning:"not_running",NoVm:"no_vm",NoReconcileTimer:"no_reconcile_timer",VaultSidecarConfigStale:"vault_sidecar_config_stale",Unrecognized:"unrecognized"};t.z.string().min(1).max(512).optional();t.z.enum(["stable","alpha"]).optional();let i=t.z.discriminatedUnion("kind",[t.z.object({kind:t.z.literal("available")}),t.z.object({kind:t.z.literal("unavailable"),reason:t.z.enum([r.UpToDate,r.NotRunning,r.NoVm,r.NoReconcileTimer,r.VaultSidecarConfigStale,r.Unrecognized]).catch(r.Unrecognized)})]),o={Applied:"applied",Pending:"pending",Unknown:"unknown"},s=t.z.enum([o.Applied,o.Pending,o.Unknown]),l=t.z.object({instructions:s,model:s,observedAt:t.z.string().nullable()});o.Unknown,o.Unknown;let d=t.z.object({bootedImage:t.z.string().nullable(),canReconcile:t.z.boolean().nullable().default(null),alphaImage:t.z.string().nullish(),alphaVersion:t.z.string().nullish(),currentImage:t.z.string().nullable(),currentVersion:t.z.string().nullish(),hasStaleVaultSidecar:t.z.boolean().nullable().default(null),desiredImage:t.z.string().nullable(),desiredSetAt:t.z.string().nullable(),hasVm:t.z.boolean(),observedAt:t.z.string().nullable(),runningImage:t.z.string().nullable(),personaSync:l.optional(),runningModel:t.z.string().nullable().default(null),runningModelObservedAt:t.z.string().nullable().default(null),runningVersion:t.z.string().nullable().default(null),resolvedVersion:t.z.object({image:t.z.string(),version:t.z.string()}).nullable().default(null),state:a.nullable()});t.z.object({availability:i,runtimeImage:d}),e.s(["B",0,o,"e",0,n,"C",0,a,"f",0,r])},744475,476434,3977,e=>{"use strict";var t=e.i(663456),n=e.i(819750),a=e.i(524287),r=e.i(119816),i=e.i(905361),o=e.i(342837),s=e.i(647204),l=e.i(882844),d=e.i(635157),p=e.i(552221),u=e.i(549692),c=e.i(470672),m=e.i(613497),f=e.i(173465),g=e.i(618115),h=e.i(56222);e.i(16043);var A=e.i(612523),y=e.i(702596),b=e.i(55569);let I=new WeakMap,v=(0,l.j)(d.z.object({error:d.z.object({code:d.z.literal("intern_asleep")})})),S=(0,l.j)(d.z.object({error:d.z.object({code:d.z.enum(["intern_restarting","intern_timeout"])})}));function w(e){let t=(0,y.i)(e)?.message;return void 0!==t&&S((0,b.N)(t))}function _(e,t){return!(w(e.state.error)||x(e.state.error))&&t}function x(e){let t=(0,y.i)(e)?.message;return void 0!==t&&v((0,b.N)(t))}function k(e){if(I.get(e.client)?.delete((0,m.q)(e.queryKey))===!0)return{};let t=e.client.getQueryState(e.queryKey);return void 0===t||void 0===t.data&&0===t.errorUpdateCount?{}:T}let T={"X-Ori-Background-Refresh":"1"};e.s(["Q",0,T,"V",0,k,"n",0,x,"i",0,w,"g",0,_,"o",0,function(e){let t=I.get(e.client)??new Set;t.add((0,m.q)(e.queryKey)),I.set(e.client,t)}],476434);let z=(0,a.f)("intern-provenance",{list:(e,t)=>[{internId:t,workspaceId:e}]});e.s(["V",0,z,"Z",0,function(e){return(0,f.f)({queryKey:z.list(e.workspaceId,e.internId),staleTime:r.y.ALWAYS,queryFn:({signal:t})=>{var a;return(0,n.f)((a=e.internId,`/api/frontend/v1/private/interns/${encodeURIComponent(a)}/provenance`),{signal:t})}})}],3977);let V="/api/frontend/v1/private/interns",C=(0,a.f)("interns",{list:e=>[{workspaceId:e}],byName:(e,t)=>[{name:t,workspaceId:e}],detail:(e,t)=>[{internId:t,workspaceId:e}],runtimeImage:(e,t)=>[{internId:t,workspaceId:e}],autoUpdate:(e,t)=>[{internId:t,workspaceId:e}],resolvedModel:(e,t)=>[{internId:t,workspaceId:e}],features:(e,t)=>[{internId:t,workspaceId:e}],featureSources:(e,t)=>[{internId:t,workspaceId:e}],operations:(e,t)=>[{internId:t,workspaceId:e}],usage:(e,t)=>[{internId:t,workspaceId:e}],featureFiles:e=>[e],featureFile:e=>[e],featureSkill:e=>[e],spend:e=>[{workspaceId:e}]}),$=c.f;function M(e){return{spendByInternId:new Map(e.interns.map(e=>[e.internId,e.spendUsd])),windowStart:e.windowStart}}async function O(e,t){let n=await (0,p.f)(`${V}/${e}/runtime-image`,{body:JSON.stringify({...void 0===t.image?{}:{image:t.image},...void 0===t.expectedImage?{}:{expectedImage:t.expectedImage}}),headers:{"Content-Type":"application/json"},method:"POST"});return(0,s.V)(n)?n:(0,s.N)(n.data.data)}let R=d.z.object({data:d.z.object({enqueued:d.z.literal(!0)})}),E=(0,l.j)(R),D=d.z.object({error:d.z.object({code:d.z.string(),message:d.z.string()})}),N={InvalidResponse:"invalid_response",Network:"network",Server:"server"},F=d.z.object({provisioning_failure_reason:d.z.enum(N),provisioning_server_code:d.z.string().nullable(),provisioning_server_message:d.z.string().nullable()});function j(e,t){return(0,u.O)({location:e,rawError:`provisioning action failed: ${t.reason}`,internal:{provisioning_failure_reason:t.reason,provisioning_server_code:t.serverCode,provisioning_server_message:t.serverMessage}})}async function P(e,t){let n="interns.requestProvisioningAction",a=await (0,s.$)(()=>fetch(e,t));if((0,s.V)(a))return j(n,{reason:N.Network,serverCode:null,serverMessage:null});let r=await a.data.json().catch(()=>null);if(a.data.ok)return E(r)?(0,s.N)(!0):j(n,{reason:N.InvalidResponse,serverCode:null,serverMessage:null});let i=(0,l.C)(D,r);return j(n,{reason:N.Server,serverCode:(0,s.V)(i)?null:i.data.error.code,serverMessage:(0,s.V)(i)?null:i.data.error.message})}e.s(["R",0,N,"H",0,function(e,t){return(0,f.f)({queryKey:C.autoUpdate(e,t),queryFn:({signal:e})=>(0,n.f)(`${V}/${t}/auto-update`,{signal:e})})},"S",0,function(e,t){return(0,f.f)({queryKey:C.byName(e,t),queryFn:({signal:a})=>(0,n.f)(V,{searchParams:{limit:1,name:t,workspaceId:e},signal:a}),staleTime:r.y.ALWAYS})},"X",0,function(e,t){return(0,f.f)({queryKey:C.detail(e,t),queryFn:null===e||null===t?m.V:({signal:e})=>(0,n.f)(`${V}/${t}`,{signal:e})})},"t",0,function(e){let{enabled:t,...a}=e;return(0,f.f)({queryKey:C.featureFile(a),queryFn:({signal:e})=>(0,n.f)(`${V}/${a.internId}/features/${encodeURIComponent(a.featureId)}/files/${a.path.split("/").map(encodeURIComponent).join("/")}`,{signal:e}),enabled:t,staleTime:r.y.ALWAYS})},"_",0,function(e){let{enabled:t,...a}=e;return(0,f.f)({queryKey:C.featureFiles(a),queryFn:({signal:e})=>(0,n.f)(`${V}/${a.internId}/features/${encodeURIComponent(a.featureId)}/files`,{signal:e}),enabled:t,staleTime:r.y.ALWAYS})},"V",0,function(e){let{enabled:t,...a}=e;return(0,f.f)({queryKey:C.featureSkill(a),queryFn:({signal:e})=>(0,n.f)(`${V}/${a.internId}/features/${encodeURIComponent(a.featureId)}/skills/${encodeURIComponent(a.skillName)}`,{signal:e}),enabled:t,staleTime:r.y.ALWAYS})},"c",0,function(e){let{enabled:t,internId:a,workspaceId:i}=e;return(0,f.f)({queryKey:C.featureSources(i,a),queryFn:({client:e,queryKey:t,signal:r})=>(0,n.f)(`${V}/${a}/feature-sources`,{headers:k({client:e,queryKey:t}),signal:r}),enabled:t,staleTime:r.y.ALWAYS})},"T",0,function(e){let{enabled:t,internId:a,workspaceId:i}=e;return(0,f.f)({queryKey:C.features(i,a),queryFn:({client:e,queryKey:t,signal:r})=>(0,n.f)(`${V}/${a}/features`,{headers:k({client:e,queryKey:t}),signal:r}),enabled:t,staleTime:r.y.ALWAYS})},"d",0,function(e,t){return`${V}/${e}/icon?v=${t}`},"f",0,C,"M",0,function(e){let{enabled:t,internId:a,liveRefreshMs:i=!1,workspaceId:o}=e;return(0,f.f)({queryKey:C.operations(o,a),queryFn:({client:e,queryKey:t,signal:r})=>(0,n.f)(`${V}/${a}/operations`,{headers:k({client:e,queryKey:t}),signal:r}),enabled:t,staleTime:r.y.ALWAYS,refetchInterval:e=>_(e,i)})},"D",0,function(e,t){return(0,f.f)({queryKey:C.resolvedModel(e,t),queryFn:null===t?m.V:({signal:e})=>(0,n.f)(`${V}/${t}/model/resolved`,{signal:e}),staleTime:r.y.DEFAULT})},"e",0,function(e,t){return(0,f.f)({queryKey:C.runtimeImage(e,t),queryFn:null===t?m.V:({signal:e})=>(0,n.f)(`${V}/${t}/runtime-image`,{signal:e}),refetchInterval:e=>{var t;return void 0!==(t=e.state.data)&&(0,A.x)({availability:t.availability,facts:t.runtimeImage,nowMs:Date.now()}).state===A.I.Pending&&1e4},refetchIntervalInBackground:!0})},"B",0,function(e){let{enabled:t,internId:a,liveRefreshMs:i=!1,workspaceId:o}=e;return(0,f.f)({queryKey:C.usage(o,a),queryFn:({client:e,queryKey:t,signal:r})=>(0,n.f)(`${V}/${a}/operations/usage`,{headers:k({client:e,queryKey:t}),signal:r}),enabled:t,staleTime:r.y.ALWAYS,refetchInterval:e=>_(e,i)})},"b",0,function(e){return(0,f.f)({queryKey:C.list(e),queryFn:null===e?m.V:({signal:t})=>(0,n.f)(V,{searchParams:{limit:$,workspaceId:e},signal:t}),placeholderData:null===e?void 0:m.y})},"G",0,function(e){let t=(0,l.C)(F,e.internal);return(0,s.V)(t)?{reason:N.Network,serverCode:null,serverMessage:null}:{reason:t.data.provisioning_failure_reason,serverCode:t.data.provisioning_server_code,serverMessage:t.data.provisioning_server_message}},"Q",0,function(e){let n,a,r,o,l,d=(0,t.c)(14);return d[0]!==e.internId?(n=async t=>{let{origin:n,skill:a}=t,r=await (0,p.f)(`${V}/${e.internId}/skills?origin=${n}`,{body:JSON.stringify(a),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,s.V)(r)?r:(0,s.N)(r.data.data)},d[0]=e.internId,d[1]=n):n=d[1],d[2]!==e.internId||d[3]!==e.workspaceId?(a=C.features(e.workspaceId,e.internId),d[2]=e.internId,d[3]=e.workspaceId,d[4]=a):a=d[4],d[5]!==e.internId||d[6]!==e.workspaceId?(r=z.list(e.workspaceId,e.internId),d[5]=e.internId,d[6]=e.workspaceId,d[7]=r):r=d[7],d[8]!==a||d[9]!==r?(o=[a,r],d[8]=a,d[9]=r,d[10]=o):o=d[10],d[11]!==n||d[12]!==o?(l={mutationFn:n,invalidates:o},d[11]=n,d[12]=o,d[13]=l):l=d[13],(0,i.h)(l)},"C",0,function(e){let n,a,r,o,l,d,u=(0,t.c)(19);return u[0]!==e.action||u[1]!==e.internId?(n=async t=>{let n=await (0,p.f)(`${V}/${e.internId}/feature-sources${"add"===e.action?"":"/remove"}`,{body:JSON.stringify({source:t}),headers:{"Content-Type":"application/json"},method:"add"===e.action?"PUT":"POST"});return(0,s.V)(n)?n:(0,s.N)(n.data.data)},u[0]=e.action,u[1]=e.internId,u[2]=n):n=u[2],u[3]!==e.internId||u[4]!==e.workspaceId?(a=C.featureSources(e.workspaceId,e.internId),u[3]=e.internId,u[4]=e.workspaceId,u[5]=a):a=u[5],u[6]!==e.internId||u[7]!==e.workspaceId?(r=C.features(e.workspaceId,e.internId),u[6]=e.internId,u[7]=e.workspaceId,u[8]=r):r=u[8],u[9]!==e.internId||u[10]!==e.workspaceId?(o=z.list(e.workspaceId,e.internId),u[9]=e.internId,u[10]=e.workspaceId,u[11]=o):o=u[11],u[12]!==a||u[13]!==r||u[14]!==o?(l=[a,r,o],u[12]=a,u[13]=r,u[14]=o,u[15]=l):l=u[15],u[16]!==n||u[17]!==l?(d={mutationFn:n,invalidates:l},u[16]=n,u[17]=l,u[18]=d):d=u[18],(0,i.h)(d)},"g",0,function(e){let n,a,r,l,d=(0,t.c)(10),u=(0,h.d)();d[0]!==e?(n=t=>[C.list(e),C.detail(e,t),C.runtimeImage(e,t),z.list(e,t)],d[0]=e,d[1]=n):n=d[1];let c=n;return d[2]!==c||d[3]!==u?(a=async e=>{var t;let n,a,{acknowledgeOrphans:r,acknowledgeWorkspaceLoss:i,internId:l}=e,d=(t={acknowledgeOrphans:r,acknowledgeWorkspaceLoss:i},n=new URLSearchParams,!0===t.acknowledgeOrphans&&n.set("acknowledge_orphans","true"),!0===t.acknowledgeWorkspaceLoss&&n.set("acknowledge_workspace_loss","true"),""===(a=n.toString())?"":`?${a}`),m=await (0,p.f)(`${V}/${l}${d}`,{method:"DELETE"});if((0,s.V)(m)){if(m.error.status===o.g.S409_Conflict)for(let e of c(l))u.invalidateQueries({queryKey:e});return m}return(0,s.N)(void 0)},d[2]=c,d[3]=u,d[4]=a):a=d[4],d[5]!==c?(r=(e,t)=>{let{internId:n}=t;return c(n)},d[5]=c,d[6]=r):r=d[6],d[7]!==a||d[8]!==r?(l={mutationFn:a,invalidates:i.C.BACKGROUND_ONLY,backgroundInvalidates:r},d[7]=a,d[8]=r,d[9]=l):l=d[9],(0,i.h)(l)},"A",0,function(e){let a,i,o=(0,t.c)(4);if(o[0]!==e)a=(0,f.f)({queryKey:C.spend(e),queryFn:null===e?m.V:({signal:t})=>(0,n.f)(`${V}/spend`,{searchParams:{workspaceId:e},signal:t}),staleTime:r.y.CATALOG}),o[0]=e,o[1]=a;else a=o[1];return o[2]!==a?(i={...a,select:M},o[2]=a,o[3]=i):i=o[3],(0,g.f)(i)},"l",0,function(e,n){let a,r=(0,t.c)(4),i=(0,h.d)();return r[0]!==n||r[1]!==i||r[2]!==e?(a=async()=>{await Promise.all([i.invalidateQueries({queryKey:C.detail(e,n)}),i.invalidateQueries({queryKey:C.list(e)})])},r[0]=n,r[1]=i,r[2]=e,r[3]=a):a=r[3],a},"h",0,function(e){let n,a=(0,t.c)(3),r=(0,h.d)();return a[0]!==r||a[1]!==e?(n=async()=>{await r.invalidateQueries({queryKey:C.list(e)})},a[0]=r,a[1]=e,a[2]=n):n=a[2],n},"r",0,function(e){let n,a=(0,t.c)(2);return a[0]!==e?(n={invalidates:i.C.NONE,mutationFn:()=>P(e,{method:"POST"})},a[0]=e,a[1]=n):n=a[1],(0,i.h)(n)},"E",0,function(e){let n,a,r,o,l,d=(0,t.c)(14);return d[0]!==e.internId?(n=async t=>{let n=await (0,p.f)(`${V}/${e.internId}/skills/${encodeURIComponent(t)}`,{method:"DELETE"});return(0,s.V)(n)?n:(0,s.N)(n.data.data)},d[0]=e.internId,d[1]=n):n=d[1],d[2]!==e.internId||d[3]!==e.workspaceId?(a=C.features(e.workspaceId,e.internId),d[2]=e.internId,d[3]=e.workspaceId,d[4]=a):a=d[4],d[5]!==e.internId||d[6]!==e.workspaceId?(r=z.list(e.workspaceId,e.internId),d[5]=e.internId,d[6]=e.workspaceId,d[7]=r):r=d[7],d[8]!==a||d[9]!==r?(o=[a,r],d[8]=a,d[9]=r,d[10]=o):o=d[10],d[11]!==n||d[12]!==o?(l={mutationFn:n,invalidates:o},d[11]=n,d[12]=o,d[13]=l):l=d[13],(0,i.h)(l)},"Y",0,function(e,n){let a,r,o,l,d,u,c=(0,t.c)(17);return c[0]!==n?(a=async e=>{let t=await (0,p.f)(`${V}/${n}`,{body:JSON.stringify({name:e}),headers:{"Content-Type":"application/json"},method:"PATCH"});return(0,s.V)(t)?t:(0,s.N)(t.data.data)},c[0]=n,c[1]=a):a=c[1],c[2]!==e?(r=C.list(e),c[2]=e,c[3]=r):r=c[3],c[4]!==n||c[5]!==e?(o=C.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(l=z.list(e,n),c[7]=n,c[8]=e,c[9]=l):l=c[9],c[10]!==r||c[11]!==o||c[12]!==l?(d=[r,o,l],c[10]=r,c[11]=o,c[12]=l,c[13]=d):d=c[13],c[14]!==a||c[15]!==d?(u={mutationFn:a,invalidates:d},c[14]=a,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)},"I",0,function(e){let n,a=(0,t.c)(2);return a[0]!==e?(n={invalidates:i.C.NONE,mutationFn:t=>{let{confirmLiveVmReset:n}=t;return P(`${V}/${e}/reprovision`,{body:JSON.stringify({confirmLiveVmReset:n}),headers:{"Content-Type":"application/json"},method:"POST"})}},a[0]=e,a[1]=n):n=a[1],(0,i.h)(n)},"Z",0,function(e,n){let a,r,o,s,l,d,p,u=(0,t.c)(21);return u[0]!==n?(a=e=>O(n,e),u[0]=n,u[1]=a):a=u[1],u[2]!==e?(r=C.list(e),u[2]=e,u[3]=r):r=u[3],u[4]!==n||u[5]!==e?(o=C.detail(e,n),u[4]=n,u[5]=e,u[6]=o):o=u[6],u[7]!==n||u[8]!==e?(s=C.runtimeImage(e,n),u[7]=n,u[8]=e,u[9]=s):s=u[9],u[10]!==n||u[11]!==e?(l=z.list(e,n),u[10]=n,u[11]=e,u[12]=l):l=u[12],u[13]!==r||u[14]!==o||u[15]!==s||u[16]!==l?(d=[r,o,s,l],u[13]=r,u[14]=o,u[15]=s,u[16]=l,u[17]=d):d=u[17],u[18]!==a||u[19]!==d?(p={mutationFn:a,invalidates:d},u[18]=a,u[19]=d,u[20]=p):p=u[20],(0,i.h)(p)},"x",0,function(e,n){let a,r,o,l,d=(0,t.c)(10);return d[0]!==n?(a=async e=>{let t=await (0,p.f)(`${V}/${n}/auto-update`,{body:JSON.stringify({isEnabled:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,s.V)(t)?t:(0,s.N)(t.data.data)},d[0]=n,d[1]=a):a=d[1],d[2]!==n||d[3]!==e?(r=C.autoUpdate(e,n),d[2]=n,d[3]=e,d[4]=r):r=d[4],d[5]!==r?(o=[r],d[5]=r,d[6]=o):o=d[6],d[7]!==a||d[8]!==o?(l={mutationFn:a,invalidates:o},d[7]=a,d[8]=o,d[9]=l):l=d[9],(0,i.h)(l)},"k",0,function(e){let n,a,r,o,l,d=(0,t.c)(15);return d[0]!==e.featureId||d[1]!==e.internId?(n=async t=>{let n=await (0,p.f)(`${V}/${e.internId}/features/${encodeURIComponent(e.featureId)}/model`,{body:JSON.stringify({model:t}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,s.V)(n)?n:(0,s.N)(n.data.data)},d[0]=e.featureId,d[1]=e.internId,d[2]=n):n=d[2],d[3]!==e.internId||d[4]!==e.workspaceId?(a=C.features(e.workspaceId,e.internId),d[3]=e.internId,d[4]=e.workspaceId,d[5]=a):a=d[5],d[6]!==e.internId||d[7]!==e.workspaceId?(r=z.list(e.workspaceId,e.internId),d[6]=e.internId,d[7]=e.workspaceId,d[8]=r):r=d[8],d[9]!==a||d[10]!==r?(o=[a,r],d[9]=a,d[10]=r,d[11]=o):o=d[11],d[12]!==n||d[13]!==o?(l={mutationFn:n,invalidates:o},d[12]=n,d[13]=o,d[14]=l):l=d[14],(0,i.h)(l)},"s",0,function(e,n){let a,r,o,l,d,u,c=(0,t.c)(17);return c[0]!==n?(a=async e=>{let t=await (0,p.f)(`${V}/${n}/sharing`,{body:JSON.stringify({isShared:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,s.V)(t)?t:(0,s.N)(t.data.data)},c[0]=n,c[1]=a):a=c[1],c[2]!==e?(r=C.list(e),c[2]=e,c[3]=r):r=c[3],c[4]!==n||c[5]!==e?(o=C.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(l=z.list(e,n),c[7]=n,c[8]=e,c[9]=l):l=c[9],c[10]!==r||c[11]!==o||c[12]!==l?(d=[r,o,l],c[10]=r,c[11]=o,c[12]=l,c[13]=d):d=c[13],c[14]!==a||c[15]!==d?(u={mutationFn:a,invalidates:d},c[14]=a,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)},"m",0,function(e){let n,a=(0,t.c)(2);return a[0]!==e?(n={invalidates:i.C.NONE,mutationFn:t=>P(`${V}/${e}/start-provisioning`,{body:!0===t.withoutSlack?JSON.stringify({withoutSlack:!0}):void 0,headers:!0===t.withoutSlack?{"Content-Type":"application/json"}:void 0,method:"POST"})},a[0]=e,a[1]=n):n=a[1],(0,i.h)(n)},"u",0,function(e,n){let a,r,o,l,d,u,c,m=(0,t.c)(21);return m[0]!==n?(a=async e=>{let t=await (0,p.f)(`${V}/${n}/instructions`,{body:JSON.stringify({instructions:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,s.V)(t)?t:(0,s.N)(t.data.data)},m[0]=n,m[1]=a):a=m[1],m[2]!==e?(r=C.list(e),m[2]=e,m[3]=r):r=m[3],m[4]!==n||m[5]!==e?(o=C.detail(e,n),m[4]=n,m[5]=e,m[6]=o):o=m[6],m[7]!==n||m[8]!==e?(l=z.list(e,n),m[7]=n,m[8]=e,m[9]=l):l=m[9],m[10]!==n||m[11]!==e?(d=C.resolvedModel(e,n),m[10]=n,m[11]=e,m[12]=d):d=m[12],m[13]!==r||m[14]!==o||m[15]!==l||m[16]!==d?(u=[r,o,l,d],m[13]=r,m[14]=o,m[15]=l,m[16]=d,m[17]=u):u=m[17],m[18]!==a||m[19]!==u?(c={mutationFn:a,invalidates:u},m[18]=a,m[19]=u,m[20]=c):c=m[20],(0,i.h)(c)},"F",0,function(e,n){let a,r,o,l,d,u,c=(0,t.c)(17);return c[0]!==n?(a=async e=>{let t=await (0,p.f)(`${V}/${n}/model`,{body:JSON.stringify({model:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,s.V)(t)?t:(0,s.N)(t.data.data)},c[0]=n,c[1]=a):a=c[1],c[2]!==e?(r=C.list(e),c[2]=e,c[3]=r):r=c[3],c[4]!==n||c[5]!==e?(o=C.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(l=z.list(e,n),c[7]=n,c[8]=e,c[9]=l):l=c[9],c[10]!==r||c[11]!==o||c[12]!==l?(d=[r,o,l],c[10]=r,c[11]=o,c[12]=l,c[13]=d):d=c[13],c[14]!==a||c[15]!==d?(u={mutationFn:a,invalidates:d},c[14]=a,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)},"i",0,function(e,n){let a,r,o,l,d,u,c=(0,t.c)(17);return c[0]!==n?(a=async e=>{let t=new FormData;t.set("file",e,"icon.png");let a=await (0,p.f)(`${V}/${n}/icon`,{body:t,method:"PUT"});return(0,s.V)(a)?a:(0,s.N)(a.data.data)},c[0]=n,c[1]=a):a=c[1],c[2]!==e?(r=C.list(e),c[2]=e,c[3]=r):r=c[3],c[4]!==n||c[5]!==e?(o=C.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(l=z.list(e,n),c[7]=n,c[8]=e,c[9]=l):l=c[9],c[10]!==r||c[11]!==o||c[12]!==l?(d=[r,o,l],c[10]=r,c[11]=o,c[12]=l,c[13]=d):d=c[13],c[14]!==a||c[15]!==d?(u={mutationFn:a,invalidates:d},c[14]=a,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)}],744475)},22022,e=>{"use strict";var t=e.i(667417),n=e.i(209615);let a="chrome/gemini-nano",r=`/chat?models=${a}`,i="Gemini Nano";e.s(["L",0,r,"Z",0,{expectedInputs:[{type:"text",languages:["en"]},{type:"image"},{type:"audio"}],expectedOutputs:[{type:"text",languages:["en"]}]},"s",0,a,"C",0,function(){return{name:i,description:"You are Gemini Nano running locally in Chrome. Answer directly and helpfully in the current browser session. Keep responses concise unless the user asks for detail, and mention when a request needs server-side tools, uploaded files, or external network access that this local browser model cannot use.",includeDefaultSystemPrompt:!1}},"A",0,function(){return{slug:a,permaslug:a,hf_slug:null,created_at:"2026-06-09T00:00:00.000Z",updated_at:null,hf_updated_at:null,name:i,short_name:i,author:"google",author_display_name:"Chrome",description:"Runs Gemini Nano locally in Chrome through the browser Prompt API. Responses are generated in-browser for the current session.",model_version_group_id:null,context_length:4096,input_modalities:[t.D.Text,t.D.Image,t.D.Audio],output_modalities:[t.j.Text],has_text_output:!0,instruct_type:null,group:n.f.Gemini,default_system:null,default_stops:[],hidden:!1,router:null,warning_message:null,promotion_message:null,routing_error_message:null,required_attestation_types:[],is_private:!1,owner_clerk_user_id:null,supports_reasoning:!1,reasoning_config:null,features:null,default_parameters:null,default_order:[],quick_start_example_type:null,is_trainable_text:null,is_trainable_image:null,knowledge_cutoff:null,limit_rpm:null,limit_rpd:null,supported_tts_voices:null,endpoint:null}},"w",0,function(e){return e},"U",0,function(e){return e===a}])},391927,e=>{"use strict";var t=e.i(625025);function n(e){let n="string"==typeof e.name?e.name.trim():"";return(0,t.S)({name:n||void 0,model:e.model||void 0,instructions:e.instructions||void 0,forward_transcript:e.forward_transcript,stream:e.stream,max_completion_tokens:e.max_completion_tokens,reasoning:e.reasoning,temperature:e.temperature})}function a(e){let n="string"==typeof e.name?e.name.trim():"";return(0,t.S)({name:n||void 0,model:e.model||void 0,instructions:e.instructions||void 0,tools:Array.isArray(e.tools)&&e.tools.length>0?e.tools:void 0,max_tool_calls:e.max_tool_calls,max_completion_tokens:e.max_completion_tokens,reasoning:e.reasoning,temperature:e.temperature})}e.s(["C",0,function(e){return Object.keys(n(e)).length>0},"P",0,function(e){return Object.keys(a(e)).length>0},"D",0,function(e){return e?e.flatMap(e=>{let t=n(e);return 0===Object.keys(t).length?[]:[{type:"openrouter:advisor",parameters:t}]}):[]},"r",0,function(e){return e?e.flatMap(e=>{let t=a(e);return 0===Object.keys(t).length?[]:[{type:"openrouter:subagent",parameters:t}]}):[]}])},952384,721057,e=>{"use strict";function t(e){let t=e.trim().replaceAll("\\","/").replaceAll(/\/{2,}/g,"/");return t.startsWith("./")&&(t=t.slice(2)),t.startsWith("/")&&(t=t.slice(1)),t}function n(e){let t=e.split("/"),n=[];for(let e of t)if(""!==e&&"."!==e){if(".."===e){n.length>0&&n.pop();continue}n.push(e)}return n.join("/")}let a=[".ts",".tsx"];e.s(["p",0,n,"H",0,function(e){let n={};return e.map(e=>t(e).split("/")).forEach(e=>{let t=n;for(let n of e){let e=t[n];void 0===e&&(e={},t[n]=e),t=e}}),function e(t,n=""){return Object.keys(t).reduce((...a)=>{let[r,i,o,s]=a,l=o===s.length-1,d=t[i]??{};return r+`${n}${l?"└── ":"├── "}${i}
`+(Object.keys(d).length>0?e(d,n+(l?" ":"│ ")):"")},"")}(n)},"A",0,function(e){let a=n(t(e));return!(!a||a.startsWith("/")||a.includes("\0")||a.endsWith("/")||a.split("/").some(e=>""===e||"."===e||".."===e))},"B",0,function(...e){return n(t(e.filter(Boolean).join("/")))},"y",0,t,"c",0,function(e,r){let i=n(t(e));for(let e of a){let t=`${i}/index${e}`;if(r.has(t))return t}return null},"n",0,function(e,r){let i=n(t(e));if((i.endsWith(".ts")||i.endsWith(".tsx"))&&r.has(i))return i;for(let e of a){let t=`${i}${e}`;if(r.has(t))return t}return null}],952384),e.s(["A",0,"