opik 1.9.70 → 1.9.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,29 +1,29 @@
1
- 'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Hu=require('fs'),$h=require('ini');require('dotenv/config');var Hb=require('qs'),uuid=require('uuid'),kR=require('fast-json-stable-stringify'),yR=require('xxhash-wasm'),util=require('util'),AR=require('mustache'),PR=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),IR=require('fast-deep-equal'),async_hooks=require('async_hooks'),xn=require('chalk'),HR=require('boxen'),JR=require('ora'),ai$1=require('ai'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),zod=require('zod');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Hu__default=/*#__PURE__*/_interopDefault(Hu);var $h__default=/*#__PURE__*/_interopDefault($h);var Hb__default=/*#__PURE__*/_interopDefault(Hb);var kR__default=/*#__PURE__*/_interopDefault(kR);var yR__default=/*#__PURE__*/_interopDefault(yR);var AR__default=/*#__PURE__*/_interopDefault(AR);var PR__default=/*#__PURE__*/_interopDefault(PR);var IR__default=/*#__PURE__*/_interopDefault(IR);var xn__default=/*#__PURE__*/_interopDefault(xn);var HR__default=/*#__PURE__*/_interopDefault(HR);var JR__default=/*#__PURE__*/_interopDefault(JR);var Mu=Object.create;var ur=Object.defineProperty;var Nu=Object.getOwnPropertyDescriptor;var Mh=Object.getOwnPropertyNames;var Nh=Object.getPrototypeOf,Fh=Object.prototype.hasOwnProperty;var Fu=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),Wr=a=>{throw TypeError(a)};var Oh=(a,t,e)=>t in a?ur(a,t,{enumerable:true,configurable:true,writable:true,value:e}):a[t]=e;var ue=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var Pn=(a,t)=>()=>(a&&(t=a(a=0)),t);var Y=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),E=(a,t)=>{for(var e in t)ur(a,e,{get:t[e],enumerable:true});},Wh=(a,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mh(t))!Fh.call(a,i)&&i!==e&&ur(a,i,{get:()=>t[i],enumerable:!(o=Nu(t,i))||o.enumerable});return a};var Bh=(a,t,e)=>(e=a!=null?Mu(Nh(a)):{},Wh(ur(e,"default",{value:a,enumerable:true}),a));var Ou=a=>{var t;return [,,,Mu((t=void 0)!=null?t:null)]},Wu=["class","method","getter","setter","accessor","field","value","get","set"],Or=a=>a!==void 0&&typeof a!="function"?Wr("Function expected"):a,Lh=(a,t,e,o,i)=>({kind:Wu[a],name:t,metadata:o,addInitializer:n=>e._?Wr("Already initialized"):i.push(Or(n||null))}),Cn=(a,t)=>Oh(t,Fu("metadata"),a[3]),Bu=(a,t,e,o)=>{for(var i=0,n=a[t>>1],c=n&&n.length;i<c;i++)n[i].call(e);return o},Lu=(a,t,e,o,i,n)=>{var d,u,g,f,y=t&7,z=false,v=false,S=2,O=Wu[y+5],G=a[S]||(a[S]=[]),te=((i=i.prototype),Nu(i,e));for(var dr=o.length-1;dr>=0;dr--)g=Lh(y,e,u={},a[3],G),(g.static=z,g.private=v,f=g.access={has:pe=>e in pe},(f.get=pe=>pe[e]),y>2),d=(0, o[dr])(te[O],g),u._=1,Or(d)&&(te[O]=d);return te&&ur(i,e,te),i};var kg={};E(kg,{Node18UniversalStreamWrapper:()=>Qn});var Qn,zg=Pn(()=>{Qn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.on("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.on("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.off("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.off("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var vg={};E(vg,{UndiciStreamWrapper:()=>Yn});var Yn,Sg=Pn(()=>{Yn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.on("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.off("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var _g={};E(_g,{NodePre18StreamWrapper:()=>Zn});var Zn,Ag=Pn(()=>{Zn=class{constructor(t){this.readableStream=t;}on(t,e){this.readableStream.on(t,e);}off(t,e){this.readableStream.off(t,e);}pipe(t){return this.readableStream.pipe(t),t}pipeTo(t){return this.pipe(t)}unpipe(t){t?this.readableStream.unpipe(t):this.readableStream.unpipe();}destroy(t){this.readableStream.destroy(t);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((t,e)=>{let o=this.readableStream.read();o?t(o):(this.readableStream.once("readable",()=>{let i=this.readableStream.read();t(i);}),this.readableStream.once("error",e));})}setEncoding(t){this.readableStream.setEncoding(t),this.encoding=t;}async text(){let t=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let i of this.readableStream)t.push(e.encode(i));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(t))}async json(){let t=await this.text();return JSON.parse(t)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:i}=await e.next();return {value:o,done:i}},[Symbol.asyncIterator](){return this}}}};});var Mg=Y((VD,Dg)=>{var Ug=ue("stream").Stream,$b=ue("util");Dg.exports=we;function we(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=true,this._maxDataSizeExceeded=false,this._released=false,this._bufferedEvents=[];}$b.inherits(we,Ug);we.create=function(a,t){var e=new this;t=t||{};for(var o in t)e[o]=t[o];e.source=a;var i=a.emit;return a.emit=function(){return e._handleEmit(arguments),i.apply(a,arguments)},a.on("error",function(){}),e.pauseStream&&a.pause(),e};Object.defineProperty(we.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});we.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};we.prototype.resume=function(){this._released||this.release(),this.source.resume();};we.prototype.pause=function(){this.source.pause();};we.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(a){this.emit.apply(this,a);}.bind(this)),this._bufferedEvents=[];};we.prototype.pipe=function(){var a=Ug.prototype.pipe.apply(this,arguments);return this.resume(),a};we.prototype._handleEmit=function(a){if(this._released){this.emit.apply(this,a);return}a[0]==="data"&&(this.dataSize+=a[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(a);};we.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=true;var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(a));}};});var Wg=Y((HD,Og)=>{var Qb=ue("util"),Fg=ue("stream").Stream,Ng=Mg();Og.exports=V;function V(){this.writable=false,this.readable=true,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=true,this._released=false,this._streams=[],this._currentStream=null,this._insideLoop=false,this._pendingNext=false;}Qb.inherits(V,Fg);V.create=function(a){var t=new this;a=a||{};for(var e in a)t[e]=a[e];return t};V.isStreamLike=function(a){return typeof a!="function"&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"&&!Buffer.isBuffer(a)};V.prototype.append=function(a){var t=V.isStreamLike(a);if(t){if(!(a instanceof Ng)){var e=Ng.create(a,{maxDataSize:1/0,pauseStream:this.pauseStreams});a.on("data",this._checkDataSize.bind(this)),a=e;}this._handleErrors(a),this.pauseStreams&&a.pause();}return this._streams.push(a),this};V.prototype.pipe=function(a,t){return Fg.prototype.pipe.call(this,a,t),this.resume(),a};V.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=false;}};V.prototype._realGetNext=function(){var a=this._streams.shift();if(typeof a=="undefined"){this.end();return}if(typeof a!="function"){this._pipeNext(a);return}var t=a;t(function(e){var o=V.isStreamLike(e);o&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e);}.bind(this));};V.prototype._pipeNext=function(a){this._currentStream=a;var t=V.isStreamLike(a);if(t){a.on("end",this._getNext.bind(this)),a.pipe(this,{end:false});return}var e=a;this.write(e),this._getNext();};V.prototype._handleErrors=function(a){var t=this;a.on("error",function(e){t._emitError(e);});};V.prototype.write=function(a){this.emit("data",a);};V.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"));};V.prototype.resume=function(){this._released||(this._released=true,this.writable=true,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume");};V.prototype.end=function(){this._reset(),this.emit("end");};V.prototype.destroy=function(){this._reset(),this.emit("close");};V.prototype._reset=function(){this.writable=false,this._streams=[],this._currentStream=null;};V.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(a));}};V.prototype._updateDataSize=function(){this.dataSize=0;var a=this;this._streams.forEach(function(t){t.dataSize&&(a.dataSize+=t.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(a){this._reset(),this.emit("error",a);};});var Bg=Y((JD,Yb)=>{Yb.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/3gpp-ims+xml":{source:"iana",compressible:true},"application/3gpphal+json":{source:"iana",compressible:true},"application/3gpphalforms+json":{source:"iana",compressible:true},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:true},"application/alto-costmap+json":{source:"iana",compressible:true},"application/alto-costmapfilter+json":{source:"iana",compressible:true},"application/alto-directory+json":{source:"iana",compressible:true},"application/alto-endpointcost+json":{source:"iana",compressible:true},"application/alto-endpointcostparams+json":{source:"iana",compressible:true},"application/alto-endpointprop+json":{source:"iana",compressible:true},"application/alto-endpointpropparams+json":{source:"iana",compressible:true},"application/alto-error+json":{source:"iana",compressible:true},"application/alto-networkmap+json":{source:"iana",compressible:true},"application/alto-networkmapfilter+json":{source:"iana",compressible:true},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:true},"application/alto-updatestreamparams+json":{source:"iana",compressible:true},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:true,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:true,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:true,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:true,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:true,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:true,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:true},"application/atsc-rsat+xml":{source:"iana",compressible:true,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:true},"application/bacnet-xdd+zip":{source:"iana",compressible:false},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:false,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/calendar+json":{source:"iana",compressible:true},"application/calendar+xml":{source:"iana",compressible:true,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:true},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:true},"application/ccxml+xml":{source:"iana",compressible:true,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:true,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:true},"application/cellml+xml":{source:"iana",compressible:true},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:true},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:true},"application/clue_info+xml":{source:"iana",compressible:true},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:true},"application/coap-group+json":{source:"iana",compressible:true},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:true},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:true,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:true},"application/cstadata+xml":{source:"iana",compressible:true},"application/csvm+json":{source:"iana",compressible:true},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:true},"application/dash+xml":{source:"iana",compressible:true,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:true,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:true,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:true},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:true},"application/dicom+xml":{source:"iana",compressible:true},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:true},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:true,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:true},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:true,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:true,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:false},"application/edifact":{source:"iana",compressible:false},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:true},"application/elm+xml":{source:"iana",compressible:true},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/emergencycalldata.comment+xml":{source:"iana",compressible:true},"application/emergencycalldata.control+xml":{source:"iana",compressible:true},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.veds+xml":{source:"iana",compressible:true},"application/emma+xml":{source:"iana",compressible:true,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:true,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:true},"application/epub+zip":{source:"iana",compressible:false,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:true},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:true,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:true},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/fido.trusted-apps+json":{compressible:true},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:false},"application/framework-attributes+xml":{source:"iana",compressible:true},"application/geo+json":{source:"iana",compressible:true,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:true},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:true,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:true,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:false,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:true},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:true},"application/ibe-pkg-reply+xml":{source:"iana",compressible:true},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:true,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:true,extensions:["its"]},"application/java-archive":{source:"apache",compressible:false,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:false,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:false,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:true,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:true},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:true},"application/jrd+json":{source:"iana",compressible:true},"application/jscalendar+json":{source:"iana",compressible:true},"application/json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:true},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:true,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:true},"application/jwk-set+json":{source:"iana",compressible:true},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:true},"application/kpml-response+xml":{source:"iana",compressible:true},"application/ld+json":{source:"iana",compressible:true,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:true,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:true},"application/lost+xml":{source:"iana",compressible:true,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:true},"application/lpf+zip":{source:"iana",compressible:false},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:true,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:true,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:true,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:true},"application/mathml-presentation+xml":{source:"iana",compressible:true},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:true},"application/mbms-deregister+xml":{source:"iana",compressible:true},"application/mbms-envelope+xml":{source:"iana",compressible:true},"application/mbms-msk+xml":{source:"iana",compressible:true},"application/mbms-msk-response+xml":{source:"iana",compressible:true},"application/mbms-protection-description+xml":{source:"iana",compressible:true},"application/mbms-reception-report+xml":{source:"iana",compressible:true},"application/mbms-register+xml":{source:"iana",compressible:true},"application/mbms-register-response+xml":{source:"iana",compressible:true},"application/mbms-schedule+xml":{source:"iana",compressible:true},"application/mbms-user-service-description+xml":{source:"iana",compressible:true},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:true,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:true},"application/mediaservercontrol+xml":{source:"iana",compressible:true,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:true},"application/metalink+xml":{source:"apache",compressible:true,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:true,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:true,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:true,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:true,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:true,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:true},"application/mrb-publish+xml":{source:"iana",compressible:true},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msword":{source:"iana",compressible:false,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:true},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:true},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:false,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:true},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:true,extensions:["opf"]},"application/ogg":{source:"iana",compressible:false,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:true,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:true},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:false},"application/p2p-overlay+xml":{source:"iana",compressible:true,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:true,extensions:["xer"]},"application/pdf":{source:"iana",compressible:false,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:false,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:true,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/postscript":{source:"iana",compressible:true,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:true},"application/problem+json":{source:"iana",compressible:true},"application/problem+xml":{source:"iana",compressible:true},"application/provenance+xml":{source:"iana",compressible:true,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:false},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:true},"application/pskc+xml":{source:"iana",compressible:true,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:true},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:true,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:true},"application/rdf+xml":{source:"iana",compressible:true,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:true,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:true},"application/resource-lists+xml":{source:"iana",compressible:true,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:true,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:true},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:true},"application/rls-services+xml":{source:"iana",compressible:true,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:true,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:true,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:true,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:true,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:true,extensions:["rss"]},"application/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:true},"application/samlmetadata+xml":{source:"iana",compressible:true},"application/sarif+json":{source:"iana",compressible:true},"application/sarif-external-properties+json":{source:"iana",compressible:true},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:true,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:true},"application/scim+json":{source:"iana",compressible:true},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:true},"application/senml+xml":{source:"iana",compressible:true,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:true},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:true},"application/sensml+xml":{source:"iana",compressible:true,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:true},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:true,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:true},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:true,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:true},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:true,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:true},"application/spirits-event+xml":{source:"iana",compressible:true},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:true,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:true,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:true,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:true,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:true},"application/swid+xml":{source:"iana",compressible:true,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:true},"application/taxii+json":{source:"iana",compressible:true},"application/td+json":{source:"iana",compressible:true},"application/tei+xml":{source:"iana",compressible:true,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:true,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:true},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:true,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:true,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:false,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:true},"application/urc-ressheet+xml":{source:"iana",compressible:true,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:true,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:true},"application/vcard+json":{source:"iana",compressible:true},"application/vcard+xml":{source:"iana",compressible:true},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:true,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:true},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:true},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:true},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:false,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:true,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:true},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:true},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:false,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:true},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:true},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:true},"application/vnd.apple.installer+xml":{source:"iana",compressible:true,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:false,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:true},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:true},"application/vnd.avistar+xml":{source:"iana",compressible:true},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:true,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:true},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:true},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:true},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:true},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:true},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:true,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:true,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:true},"application/vnd.collection.doc+json":{source:"iana",compressible:true},"application/vnd.collection.next+json":{source:"iana",compressible:true},"application/vnd.comicbook+zip":{source:"iana",compressible:false},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:true},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:true,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:true},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:true},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:true},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:true},"application/vnd.cyclonedx+xml":{source:"iana",compressible:true},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:false},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:true,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:true},"application/vnd.dataresource+json":{source:"iana",compressible:true},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:true,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:true},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:true},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:true},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:true},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:true},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:true},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:true},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:true},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:false},"application/vnd.eszigno3+xml":{source:"iana",compressible:true,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:true},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:false},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:false},"application/vnd.etsi.cug+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:true},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:true},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:true},"application/vnd.etsi.sci+xml":{source:"iana",compressible:true},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:true},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:true},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:true},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:false},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:false},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:false},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:true},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:true},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:true},"application/vnd.geo+json":{source:"iana",compressible:true},"application/vnd.geocube+xml":{source:"iana",compressible:true},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:false,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:false,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:false,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:true,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:false,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:true},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:false},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:true},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:true},"application/vnd.hal+xml":{source:"iana",compressible:true,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:true,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:true},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:true},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:true},"application/vnd.hyper-item+json":{source:"iana",compressible:true},"application/vnd.hyperdrive+json":{source:"iana",compressible:true},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:false},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:false},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:true},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:true},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:true},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:true},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:true,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:false},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:true},"application/vnd.las.las+xml":{source:"iana",compressible:true,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:true},"application/vnd.liberty-request+xml":{source:"iana",compressible:true},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:true,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:false},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:true},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:false},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:true},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:true},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:true,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:false,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:true,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:true},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:true},"application/vnd.ms-outlook":{compressible:false,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:true},"application/vnd.ms-powerpoint":{source:"iana",compressible:false,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:true},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:true},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:true},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:false,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:true},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:true},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:true},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:true},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:true},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:true},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:true,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:true},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:false,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:false,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:false,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:false,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:true},"application/vnd.oftn.l10n+json":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:true},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:true},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:true},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:true},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:true},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:true},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:true},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:true},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:true},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:true,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:true},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:true},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:true},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:true,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:true,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:false,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:false,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:false,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:true},"application/vnd.oracle.resource+json":{source:"iana",compressible:true},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:true},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:true},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:true},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:true},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:true},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:true,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:true},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:true,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:true},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:true},"application/vnd.shopkick+json":{source:"iana",compressible:true},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:true},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:true,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:true,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:true,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:true},"application/vnd.syft+json":{source:"iana",compressible:true},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:true},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:true},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:true},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:true,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:true},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:true},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:true},"application/vnd.wv.ssp+xml":{source:"iana",compressible:true},"application/vnd.xacml+json":{source:"iana",compressible:true},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:true},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:true,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:true,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:true,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:true},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:true,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:true,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:true},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:true,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:true,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:false,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:false,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:false,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:false,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:false,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:false},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:true,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:true,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:true,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:false,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:true,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:false,extensions:["jnlp"]},"application/x-javascript":{compressible:true},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:false,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:false},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:true,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:false,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:false,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:true,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:false,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:false,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:true,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:true,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:true,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:true,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:true,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:false,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:true,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:true,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:true,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:true,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:true},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:true,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:false,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:true},"application/xaml+xml":{source:"apache",compressible:true,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:true,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:true,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:true,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:true,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:true},"application/xcap-ns+xml":{source:"iana",compressible:true,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:true},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:true},"application/xenc+xml":{source:"iana",compressible:true,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:true,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:true},"application/xliff+xml":{source:"iana",compressible:true,extensions:["xlf"]},"application/xml":{source:"iana",compressible:true,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:true,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:true},"application/xmpp+xml":{source:"iana",compressible:true},"application/xop+xml":{source:"iana",compressible:true,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:true,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:true,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:true,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:true,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:true},"application/yang-data+xml":{source:"iana",compressible:true},"application/yang-patch+json":{source:"iana",compressible:true},"application/yang-patch+xml":{source:"iana",compressible:true},"application/yin+xml":{source:"iana",compressible:true,extensions:["yin"]},"application/zip":{source:"iana",compressible:false,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:false,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:false,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:false},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:false,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:false,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:false,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:false,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:false},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:false},"audio/vorbis":{source:"iana",compressible:false},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:false,extensions:["wav"]},"audio/wave":{compressible:false,extensions:["wav"]},"audio/webm":{source:"apache",compressible:false,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:false,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:false,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:true,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:true,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:false,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:false,extensions:["avif"]},"image/bmp":{source:"iana",compressible:true,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:false,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:false,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:false,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:false,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:false,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:false},"image/png":{source:"iana",compressible:false,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:true,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:false,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:true,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:true,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:true,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:true,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:true,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:false},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:false},"message/imdn+xml":{source:"iana",compressible:true},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:false},"message/rfc822":{source:"iana",compressible:true,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:true,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:true,extensions:["glb"]},"model/iges":{source:"iana",compressible:false,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:false,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:true,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:false,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:false,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:true,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:true},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:false,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:false,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:false,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:false,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:true,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:false},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:false},"multipart/form-data":{source:"iana",compressible:false},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:false},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:false},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:true,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:true},"text/cmd":{compressible:true},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:true,extensions:["css"]},"text/csv":{source:"iana",compressible:true,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:true,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:true},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:true,extensions:["jsx"]},"text/less":{compressible:true,extensions:["less"]},"text/markdown":{source:"iana",compressible:true,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:true,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:true,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:true,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:true,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:true,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:true,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:true,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:true,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:true},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:true},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:true,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:true,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:true,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:true,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:true,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:true,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:false,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:false,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:false,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:false,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:false,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:false,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:false,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:false,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:true},"x-shader/x-vertex":{compressible:true}};});var Vg=Y((XD,Lg)=>{Lg.exports=Bg();});var Xg=Y(ie=>{var ki=Vg(),Zb=ue("path").extname,Hg=/^\s*([^;\s]*)(?:;|\s|$)/,qb=/^text\//i;ie.charset=Jg;ie.charsets={lookup:Jg};ie.contentType=ex;ie.extension=rx;ie.extensions=Object.create(null);ie.lookup=ox;ie.types=Object.create(null);tx(ie.extensions,ie.types);function Jg(a){if(!a||typeof a!="string")return false;var t=Hg.exec(a),e=t&&ki[t[1].toLowerCase()];return e&&e.charset?e.charset:t&&qb.test(t[1])?"UTF-8":false}function ex(a){if(!a||typeof a!="string")return false;var t=a.indexOf("/")===-1?ie.lookup(a):a;if(!t)return false;if(t.indexOf("charset")===-1){var e=ie.charset(t);e&&(t+="; charset="+e.toLowerCase());}return t}function rx(a){if(!a||typeof a!="string")return false;var t=Hg.exec(a),e=t&&ie.extensions[t[1].toLowerCase()];return !e||!e.length?false:e[0]}function ox(a){if(!a||typeof a!="string")return false;var t=Zb("x."+a).toLowerCase().substr(1);return t&&ie.types[t]||false}function tx(a,t){var e=["nginx","apache",void 0,"iana"];Object.keys(ki).forEach(function(i){var n=ki[i],c=n.extensions;if(!(!c||!c.length)){a[i]=c;for(var d=0;d<c.length;d++){var u=c[d];if(t[u]){var g=e.indexOf(ki[t[u]].source),f=e.indexOf(n.source);if(t[u]!=="application/octet-stream"&&(g>f||g===f&&t[u].substr(0,12)==="application/"))continue}t[u]=i;}}});}});var Gg=Y((GD,Kg)=>{Kg.exports=ix;function ix(a){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(a):setTimeout(a,0);}});var qn=Y(($D,Qg)=>{var $g=Gg();Qg.exports=ax;function ax(a){var t=false;return $g(function(){t=true;}),function(o,i){t?a(o,i):$g(function(){a(o,i);});}}});var es=Y((QD,Yg)=>{Yg.exports=nx;function nx(a){Object.keys(a.jobs).forEach(sx.bind(a)),a.jobs={};}function sx(a){typeof this.jobs[a]=="function"&&this.jobs[a]();}});var rs=Y((YD,qg)=>{var Zg=qn(),px=es();qg.exports=cx;function cx(a,t,e,o){var i=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[i]=lx(t,i,a[i],function(n,c){i in e.jobs&&(delete e.jobs[i],n?px(e):e.results[i]=c,o(n,e.results));});}function lx(a,t,e,o){var i;return a.length==2?i=a(e,Zg(o)):i=a(e,t,Zg(o)),i}});var os=Y((ZD,ef)=>{ef.exports=mx;function mx(a,t){var e=!Array.isArray(a),o={index:0,keyedList:e||t?Object.keys(a):null,jobs:{},results:e?{}:[],size:e?Object.keys(a).length:a.length};return t&&o.keyedList.sort(e?t:function(i,n){return t(a[i],a[n])}),o}});var ts=Y((qD,rf)=>{var dx=es(),ux=qn();rf.exports=gx;function gx(a){Object.keys(this.jobs).length&&(this.index=this.size,dx(this),ux(a)(null,this.results));}});var tf=Y((eM,of)=>{var fx=rs(),hx=os(),wx=ts();of.exports=bx;function bx(a,t,e){for(var o=hx(a);o.index<(o.keyedList||a).length;)fx(a,t,o,function(i,n){if(i){e(i,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return wx.bind(o,e)}});var is=Y((rM,zi)=>{var af=rs(),xx=os(),Rx=ts();zi.exports=yx;zi.exports.ascending=nf;zi.exports.descending=kx;function yx(a,t,e,o){var i=xx(a,e);return af(a,t,i,function n(c,d){if(c){o(c,d);return}if(i.index++,i.index<(i.keyedList||a).length){af(a,t,i,n);return}o(null,i.results);}),Rx.bind(i,o)}function nf(a,t){return a<t?-1:a>t?1:0}function kx(a,t){return -1*nf(a,t)}});var pf=Y((oM,sf)=>{var zx=is();sf.exports=vx;function vx(a,t,e){return zx(a,t,null,e)}});var lf=Y((tM,cf)=>{cf.exports={parallel:tf(),serial:pf(),serialOrdered:is()};});var df=Y((iM,mf)=>{mf.exports=function(a,t){return Object.keys(t).forEach(function(e){a[e]=a[e]||t[e];}),a};});var gf=Y((aM,uf)=>{var ps=Wg(),Sx=ue("util"),as=ue("path"),_x=ue("http"),Ax=ue("https"),Tx=ue("url").parse,Ex=ue("fs"),Px=ue("stream").Stream,ns=Xg(),Cx=lf(),ss=df();uf.exports=C;Sx.inherits(C,ps);function C(a){if(!(this instanceof C))return new C(a);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ps.call(this),a=a||{};for(var t in a)this[t]=a[t];}C.LINE_BREAK=`\r
2
- `;C.DEFAULT_CONTENT_TYPE="application/octet-stream";C.prototype.append=function(a,t,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=ps.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(a,t,e),n=this._multiPartFooter();o(i),o(t),o(n),this._trackLength(i,t,e);};C.prototype._trackLength=function(a,t,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(a)+C.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof Px))&&(e.knownLength||this._valuesToMeasure.push(t));};C.prototype._lengthRetriever=function(a,t){a.hasOwnProperty("fd")?a.end!=null&&a.end!=1/0&&a.start!=null?t(null,a.end+1-(a.start?a.start:0)):Ex.stat(a.path,function(e,o){var i;if(e){t(e);return}i=o.size-(a.start?a.start:0),t(null,i);}):a.hasOwnProperty("httpVersion")?t(null,+a.headers["content-length"]):a.hasOwnProperty("httpModule")?(a.on("response",function(e){a.pause(),t(null,+e.headers["content-length"]);}),a.resume()):t("Unknown stream");};C.prototype._multiPartHeader=function(a,t,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(t,e),i=this._getContentType(t,e),n="",c={"Content-Disposition":["form-data",'name="'+a+'"'].concat(o||[]),"Content-Type":[].concat(i||[])};typeof e.header=="object"&&ss(c,e.header);var d;for(var u in c)c.hasOwnProperty(u)&&(d=c[u],d!=null&&(Array.isArray(d)||(d=[d]),d.length&&(n+=u+": "+d.join("; ")+C.LINE_BREAK)));return "--"+this.getBoundary()+C.LINE_BREAK+n+C.LINE_BREAK};C.prototype._getContentDisposition=function(a,t){var e,o;return typeof t.filepath=="string"?e=as.normalize(t.filepath).replace(/\\/g,"/"):t.filename||a.name||a.path?e=as.basename(t.filename||a.name||a.path):a.readable&&a.hasOwnProperty("httpVersion")&&(e=as.basename(a.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};C.prototype._getContentType=function(a,t){var e=t.contentType;return !e&&a.name&&(e=ns.lookup(a.name)),!e&&a.path&&(e=ns.lookup(a.path)),!e&&a.readable&&a.hasOwnProperty("httpVersion")&&(e=a.headers["content-type"]),!e&&(t.filepath||t.filename)&&(e=ns.lookup(t.filepath||t.filename)),!e&&typeof a=="object"&&(e=C.DEFAULT_CONTENT_TYPE),e};C.prototype._multiPartFooter=function(){return function(a){var t=C.LINE_BREAK,e=this._streams.length===0;e&&(t+=this._lastBoundary()),a(t);}.bind(this)};C.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+C.LINE_BREAK};C.prototype.getHeaders=function(a){var t,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in a)a.hasOwnProperty(t)&&(e[t.toLowerCase()]=a[t]);return e};C.prototype.setBoundary=function(a){this._boundary=a;};C.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};C.prototype.getBuffer=function(){for(var a=new Buffer.alloc(0),t=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?a=Buffer.concat([a,this._streams[e]]):a=Buffer.concat([a,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,t.length+2)!==t)&&(a=Buffer.concat([a,Buffer.from(C.LINE_BREAK)])));return Buffer.concat([a,Buffer.from(this._lastBoundary())])};C.prototype._generateBoundary=function(){for(var a="--------------------------",t=0;t<24;t++)a+=Math.floor(Math.random()*10).toString(16);this._boundary=a;};C.prototype.getLengthSync=function(){var a=this._overheadLength+this._valueLength;return this._streams.length&&(a+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),a};C.prototype.hasKnownLength=function(){var a=true;return this._valuesToMeasure.length&&(a=false),a};C.prototype.getLength=function(a){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(a.bind(this,null,t));return}Cx.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){a(e);return}o.forEach(function(i){t+=i;}),a(null,t);});};C.prototype.submit=function(a,t){var e,o,i={method:"post"};return typeof a=="string"?(a=Tx(a),o=ss({port:a.port,path:a.pathname,host:a.hostname,protocol:a.protocol},i)):(o=ss(a,i),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(a.headers),o.protocol=="https:"?e=Ax.request(o):e=_x.request(o),this.getLength(function(n,c){if(n&&n!=="Unknown stream"){this._error(n);return}if(c&&e.setHeader("Content-Length",c),this.pipe(e),t){var d,u=function(g,f){return e.removeListener("error",u),e.removeListener("response",d),t.call(this,g,f)};d=u.bind(this,null),e.on("error",u),e.on("response",d);}}.bind(this)),e};C.prototype._error=function(a){this.error||(this.error=a,this.pause(),this.emit("error",a));};C.prototype.toString=function(){return "[object FormData]"};});var Kh={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function pi(a,t=a){return ansiEscapes.link(t,a)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Vu=a=>{k.settings.minLevel=Kh[a];},Gh=()=>{k.settings.minLevel=100;};Vu(process.env.OPIK_LOG_LEVEL||"INFO");var Qh="~/.opik.config",In={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Ju(a){return Object.fromEntries(Object.entries(a).filter(([,t])=>t!==void 0))}function Yh(){return Ju({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:process.env.OPIK_HOLD_UNTIL_FLUSH===void 0?void 0:["1","true","yes"].includes(String(process.env.OPIK_HOLD_UNTIL_FLUSH).toLowerCase())})}function Zh(){let a=process.env.OPIK_CONFIG_PATH||Qh;if(!Hu__default.default.existsSync(a)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${a}`);return {}}try{let t=$h__default.default.parse(Hu__default.default.readFileSync(a,"utf8"));return t.opik?Ju({apiKey:t.opik.api_key,apiUrl:t.opik.url_override,projectName:t.opik.project_name,workspaceName:t.opik.workspace}):{}}catch(t){return k.error(`Error loading config file ${a}: ${t}`),{}}}function Xu(a){let t=Yh(),e=Zh(),{headers:o,...i}=a||{};return qh({...In,...e,...t,...i})}function qh(a){if(!a.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let t=ew(a.apiUrl);if(t&&!a.apiKey)throw new Error("OPIK_API_KEY is not set");if(t&&!a.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return a}function ew(a){return new URL(a).hostname.endsWith("comet.com")}var X={};E(X,{AlertAlertType:()=>rw,AlertPublicAlertType:()=>cw,AlertTriggerConfigPublicType:()=>sw,AlertTriggerConfigType:()=>tw,AlertTriggerConfigWriteType:()=>iw,AlertTriggerEventType:()=>ow,AlertTriggerPublicEventType:()=>pw,AlertTriggerWriteEventType:()=>aw,AlertWriteAlertType:()=>nw,AnnotationQueuePublicScope:()=>uw,AnnotationQueueScope:()=>mw,AnnotationQueueWriteScope:()=>dw,AssistantMessageRole:()=>jw,AttachmentListRequestEntityType:()=>Gu,BadRequestError:()=>_,CheckName:()=>qw,CheckPublicName:()=>Fb,CheckPublicResult:()=>Ob,CheckResult:()=>eb,ColumnCompareTypesItem:()=>Bw,ColumnPublicTypesItem:()=>Qw,ColumnTypesItem:()=>Yw,CompleteMultipartUploadRequestEntityType:()=>gw,ConflictError:()=>N,CreatePromptVersionDetailTemplateStructure:()=>ug,DatasetItemCompareSource:()=>Lw,DatasetItemFilterOperator:()=>Uw,DatasetItemPublicSource:()=>Gw,DatasetItemSource:()=>Nw,DatasetItemWriteSource:()=>Gn,DatasetPublicStatus:()=>Kw,DatasetPublicVisibility:()=>Xw,DatasetStatus:()=>Mw,DatasetUpdateVisibility:()=>qu,DatasetVisibility:()=>Dw,DatasetWriteVisibility:()=>Zu,DeleteAttachmentsRequestEntityType:()=>fw,DownloadAttachmentRequestEntityType:()=>$u,ExperimentItemCompareTraceVisibilityMode:()=>Vw,ExperimentItemPublicTraceVisibilityMode:()=>$w,ExperimentItemTraceVisibilityMode:()=>Fw,ExperimentPublicStatus:()=>nb,ExperimentPublicType:()=>ab,ExperimentStatus:()=>Zw,ExperimentType:()=>$n,ExperimentUpdateStatus:()=>tg,ExperimentUpdateType:()=>og,ExperimentWriteStatus:()=>rg,ExperimentWriteType:()=>eg,FeedbackScoreBatchItemSource:()=>Nb,FeedbackScoreBatchItemThreadSource:()=>Lb,FeedbackScoreCompareSource:()=>Hw,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ob,FeedbackScorePublicSource:()=>Ub,FeedbackScoreSource:()=>Ow,FindFeedbackDefinitionsRequestType:()=>ig,FindFeedbackScoreNames1RequestType:()=>fg,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>hg,GetSpansByProjectRequestType:()=>gg,GetWebhookExamplesRequestAlertType:()=>Ku,GuardrailName:()=>sb,GuardrailResult:()=>pb,GuardrailWriteName:()=>cb,GuardrailWriteResult:()=>lb,LlmAsJudgeMessagePublicRole:()=>_w,LlmAsJudgeMessageRole:()=>hw,LlmAsJudgeMessageWriteRole:()=>yw,LlmAsJudgeOutputSchemaPublicType:()=>Aw,LlmAsJudgeOutputSchemaType:()=>ww,LlmAsJudgeOutputSchemaWriteType:()=>kw,LogItemLevel:()=>Cw,ManualEvaluationRequestEntityType:()=>ub,NotFoundError:()=>A,NotImplementedError:()=>Je,OptimizationPublicStatus:()=>hb,OptimizationStatus:()=>gb,OptimizationUpdateStatus:()=>ng,OptimizationWriteStatus:()=>fb,ProjectDetailedVisibility:()=>yb,ProjectMetricRequestPublicInterval:()=>lg,ProjectMetricRequestPublicMetricType:()=>cg,ProjectMetricResponsePublicInterval:()=>Rb,ProjectMetricResponsePublicMetricType:()=>xb,ProjectPublicVisibility:()=>bb,ProjectUpdateVisibility:()=>pg,ProjectVisibility:()=>wb,ProjectWriteVisibility:()=>sg,PromptDetailTemplateStructure:()=>Tb,PromptPublicTemplateStructure:()=>Cb,PromptTemplateStructure:()=>zb,PromptType:()=>kb,PromptVersionDetailTemplateStructure:()=>Ab,PromptVersionDetailType:()=>_b,PromptVersionPublicTemplateStructure:()=>Pb,PromptVersionPublicType:()=>Eb,PromptVersionTemplateStructure:()=>Sb,PromptVersionType:()=>vb,PromptWriteTemplateStructure:()=>dg,PromptWriteType:()=>mg,ProviderApiKeyProvider:()=>db,ProviderApiKeyPublicProvider:()=>mb,ProviderApiKeyWriteProvider:()=>ag,ResponseFormatType:()=>Iw,SpanExperimentItemBulkWriteViewType:()=>tb,SpanFilterOperator:()=>bw,SpanFilterPublicOperator:()=>Tw,SpanFilterWriteOperator:()=>zw,SpanPublicType:()=>Db,SpanSearchStreamRequestPublicType:()=>wg,SpanType:()=>ve,SpanUpdateType:()=>jb,SpanWriteType:()=>Ib,StartMultipartUploadRequestEntityType:()=>Qu,TraceFilterOperator:()=>xw,TraceFilterPublicOperator:()=>Ew,TraceFilterWriteOperator:()=>vw,TracePublicVisibilityMode:()=>Wb,TraceThreadFilterOperator:()=>Rw,TraceThreadFilterPublicOperator:()=>Pw,TraceThreadFilterWriteOperator:()=>Sw,TraceThreadStatus:()=>Bb,TraceVisibilityMode:()=>rb,UnauthorizedError:()=>$,UnprocessableEntityError:()=>L,UploadAttachmentRequestEntityType:()=>Yu,ValueEntryCompareSource:()=>Jw,ValueEntryExperimentItemBulkWriteViewSource:()=>ib,ValueEntryPublicSource:()=>Mb,ValueEntrySource:()=>Ww,WebhookTestResultStatus:()=>lw,alerts:()=>ci,annotationQueues:()=>Dn,attachments:()=>li,automationRuleEvaluators:()=>Nn,chatCompletions:()=>Fn,check:()=>Mn,dashboards:()=>On,datasets:()=>mi,experiments:()=>di,feedbackDefinitions:()=>ui,guardrails:()=>Wn,llmProviderKey:()=>gi,manualEvaluation:()=>Bn,openTelemetryIngestion:()=>Ln,optimizations:()=>fi,projects:()=>hi,prompts:()=>wi,redirect:()=>Kn,serviceToggles:()=>Vn,spans:()=>bi,systemUsage:()=>Un,traces:()=>Hn,welcomeWizard:()=>Jn,workspaces:()=>Xn});var ci={};E(ci,{GetWebhookExamplesRequestAlertType:()=>Ku});var Ku={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var li={};E(li,{AttachmentListRequestEntityType:()=>Gu,DownloadAttachmentRequestEntityType:()=>$u,StartMultipartUploadRequestEntityType:()=>Qu,UploadAttachmentRequestEntityType:()=>Yu});var Gu={Trace:"trace",Span:"span"};var $u={Trace:"trace",Span:"span"};var Qu={Trace:"trace",Span:"span"};var Yu={Trace:"trace",Span:"span"};var mi={};E(mi,{DatasetUpdateVisibility:()=>qu,DatasetWriteVisibility:()=>Zu});var Zu={Private:"private",Public:"public"};var qu={Private:"private",Public:"public"};var di={};E(di,{ExperimentUpdateStatus:()=>tg,ExperimentUpdateType:()=>og,ExperimentWriteStatus:()=>rg,ExperimentWriteType:()=>eg});var eg={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var rg={Running:"running",Completed:"completed",Cancelled:"cancelled"};var og={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var tg={Running:"running",Completed:"completed",Cancelled:"cancelled"};var ui={};E(ui,{FindFeedbackDefinitionsRequestType:()=>ig});var ig={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var gi={};E(gi,{ProviderApiKeyWriteProvider:()=>ag});var ag={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikFree:"opik-free"};var fi={};E(fi,{OptimizationUpdateStatus:()=>ng});var ng={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var hi={};E(hi,{ProjectMetricRequestPublicInterval:()=>lg,ProjectMetricRequestPublicMetricType:()=>cg,ProjectUpdateVisibility:()=>pg,ProjectWriteVisibility:()=>sg});var sg={Private:"private",Public:"public"};var pg={Private:"private",Public:"public"};var cg={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var lg={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var wi={};E(wi,{CreatePromptVersionDetailTemplateStructure:()=>ug,PromptWriteTemplateStructure:()=>dg,PromptWriteType:()=>mg});var mg={Mustache:"mustache",Jinja2:"jinja2"};var dg={Text:"text",Chat:"chat"};var ug={Text:"text",Chat:"chat"};var bi={};E(bi,{FindFeedbackScoreNames1RequestType:()=>fg,GetSpanStatsRequestType:()=>hg,GetSpansByProjectRequestType:()=>gg,SpanSearchStreamRequestPublicType:()=>wg});var gg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var fg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var hg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var wg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Un={};var Dn={};var Mn={};var Nn={};var Fn={};var On={};var Wn={};var Bn={};var Ln={};var Vn={};var Hn={};var Jn={};var Xn={};var Kn={};var rw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var ow={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var tw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var iw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var aw={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var nw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var sw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var pw={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var cw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var lw={Success:"success",Failure:"failure"};var mw={Trace:"trace",Thread:"thread"};var dw={Trace:"trace",Thread:"thread"};var uw={Trace:"trace",Thread:"thread"};var gw={Trace:"trace",Span:"span"};var fw={Trace:"trace",Span:"span"};var hw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ww={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var bw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var xw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Rw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var yw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var kw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var zw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var vw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Sw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var _w={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var Aw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var Tw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Ew={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Pw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Cw={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var jw={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var Iw={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var Uw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Dw={Private:"private",Public:"public"};var Mw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Nw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Fw={Default:"default",Hidden:"hidden"};var Ow={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ww={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Gn={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Bw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Lw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Vw={Default:"default",Hidden:"hidden"};var Hw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Jw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Xw={Private:"private",Public:"public"};var Kw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Gw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var $w={Default:"default",Hidden:"hidden"};var Qw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Yw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var $n={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Zw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var qw={Topic:"TOPIC",Pii:"PII"};var eb={Passed:"passed",Failed:"failed"};var ve={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var rb={Default:"default",Hidden:"hidden"};var ob={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var tb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ib={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var ab={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var nb={Running:"running",Completed:"completed",Cancelled:"cancelled"};var sb={Topic:"TOPIC",Pii:"PII"};var pb={Passed:"passed",Failed:"failed"};var cb={Topic:"TOPIC",Pii:"PII"};var lb={Passed:"passed",Failed:"failed"};var mb={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikFree:"opik-free"};var db={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikFree:"opik-free"};var ub={Trace:"trace",Thread:"thread",Span:"span"};var gb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var fb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var hb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var wb={Private:"private",Public:"public"};var bb={Private:"private",Public:"public"};var xb={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var Rb={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var yb={Private:"private",Public:"public"};var kb={Mustache:"mustache",Jinja2:"jinja2"};var zb={Text:"text",Chat:"chat"};var vb={Mustache:"mustache",Jinja2:"jinja2"};var Sb={Text:"text",Chat:"chat"};var _b={Mustache:"mustache",Jinja2:"jinja2"};var Ab={Text:"text",Chat:"chat"};var Tb={Text:"text",Chat:"chat"};var Eb={Mustache:"mustache",Jinja2:"jinja2"};var Pb={Text:"text",Chat:"chat"};var Cb={Text:"text",Chat:"chat"};var jb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ib={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ub={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Db={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Mb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Nb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Fb={Topic:"TOPIC",Pii:"PII"};var Ob={Passed:"passed",Failed:"failed"};var Wb={Default:"default",Hidden:"hidden"};var Bb={Active:"active",Inactive:"inactive"};var Lb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ue=(a,t,e)=>JSON.stringify(a,t,e);var p=class a extends Error{constructor({message:t,statusCode:e,body:o,rawResponse:i}){super(Vb({message:t,statusCode:e,body:o})),Object.setPrototypeOf(this,a.prototype),this.statusCode=e,this.body=o,this.rawResponse=i;}};function Vb({message:a,statusCode:t,body:e}){let o=[];return a!=null&&o.push(a),t!=null&&o.push(`Status code: ${t.toString()}`),e!=null&&o.push(`Body: ${Ue(e,void 0,2)}`),o.join(`
3
- `)}var h=class a extends Error{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype);}};var _=class a extends p{constructor(t,e){super({message:"BadRequestError",statusCode:400,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var N=class a extends p{constructor(t,e){super({message:"ConflictError",statusCode:409,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var L=class a extends p{constructor(t,e){super({message:"UnprocessableEntityError",statusCode:422,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var A=class a extends p{constructor(t,e){super({message:"NotFoundError",statusCode:404,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var $=class a extends p{constructor(t,e){super({message:"UnauthorizedError",statusCode:401,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Z=class a extends p{constructor(t,e){super({message:"ForbiddenError",statusCode:403,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Je=class a extends p{constructor(t,e){super({message:"NotImplementedError",statusCode:501,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var b={Default:"http://localhost:5173/api"};var Br;typeof globalThis.Headers!="undefined"?Br=globalThis.Headers:Br=class bg{constructor(t){if(this.headers=new Map,t)if(t instanceof bg)t.forEach((e,o)=>this.append(o,e));else if(Array.isArray(t))for(let[e,o]of t)if(typeof e=="string"&&typeof o=="string")this.append(e,o);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,o]of Object.entries(t))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(t,e){let o=t.toLowerCase(),i=this.headers.get(o)||[];this.headers.set(o,[...i,e]);}delete(t){let e=t.toLowerCase();this.headers.delete(e);}get(t){let e=t.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(t){let e=t.toLowerCase();return this.headers.has(e)}set(t,e){let o=t.toLowerCase();this.headers.set(o,[e]);}forEach(t,e){let o=e?t.bind(e):t;this.headers.forEach((i,n)=>o(i.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[t,e]of this.headers.entries())yield [t,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let t of this.headers.values())yield t.join(", ");}[Symbol.iterator](){return this.entries()}};var xi={headers:new Br,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},Ri={headers:new Br,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function yi(a){return {headers:a.headers,redirected:a.redirected,status:a.status,statusText:a.statusText,type:a.type,url:a.url}}function xg(a,t){return Object.keys(t!=null?t:{}).length>0?`${a}?${Hb__default.default.stringify(t,{arrayFormat:"repeat"})}`:a}var m=Jb();function Jb(){var u,g,f,y,z;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((f=self.constructor)==null?void 0:f.name)==="ServiceWorkerGlobalScope"||((y=self.constructor)==null?void 0:y.name)==="SharedWorkerGlobalScope")?{type:"web-worker"}:typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined"?{type:"deno",version:Deno.version.deno}:typeof Bun!="undefined"&&typeof Bun.version!="undefined"?{type:"bun",version:Bun.version}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((z=process.versions)!=null&&z.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function Rg(){return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?fetch:m.type==="node"?(await import('node-fetch')).default:typeof fetch=="function"?fetch:(await import('node-fetch')).default}async function yg({body:a,type:t}){return t.includes("json")?Ue(a):a}async function Tg(a){return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?new(await Promise.resolve().then(()=>(zg(),kg))).Node18UniversalStreamWrapper(a):m.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(Sg(),vg))).UndiciStreamWrapper(a):new(await Promise.resolve().then(()=>(Ag(),_g))).NodePre18StreamWrapper(a)}async function Eg(a,t){if(a.body!=null&&t==="blob")return await a.blob();if(a.body!=null&&t==="arrayBuffer")return await a.arrayBuffer();if(a.body!=null&&t==="sse")return a.body;if(a.body!=null&&t==="streaming")return Tg(a.body);if(a.body!=null&&t==="text")return await a.text();{let e=await a.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:a.status,rawBody:e}}}else return}}var Xb="timeout";function Pg(a){let t=new AbortController,e=setTimeout(()=>t.abort(Xb),a);return {signal:t.signal,abortId:e}}function Cg(...a){let t=a.length===1&&Array.isArray(a[0])?a[0]:a,e=new AbortController;for(let o of t){if(o.aborted){e.abort(o==null?void 0:o.reason);break}o.addEventListener("abort",()=>e.abort(o==null?void 0:o.reason),{signal:e.signal});}return e.signal}var jg=async(a,t,e,o,i,n,c,d,u)=>{let g=[],f;if(n!=null){let{signal:v,abortId:S}=Pg(n);f=S,g.push(v);}c!=null&&g.push(c);let y=Cg(g),z=await a(t,{method:e,headers:o,body:i,signal:y,credentials:d?"include":void 0,duplex:u});return f!=null&&clearTimeout(f),z};function Kb(a){let t=1+(Math.random()*2-1)*.2;return a*t}async function Ig(a,t=2){let e=await a();for(let o=0;o<t&&([408,429].includes(e.status)||e.status>=500);++o){let i=Math.min(1e3*Math.pow(2,o),6e4),n=Kb(i);await new Promise(c=>setTimeout(c,n)),e=await a();}return e}async function Gb(a){let t={};if(a.body!==void 0&&a.contentType!=null&&(t["Content-Type"]=a.contentType),a.headers!=null)for(let[n,c]of Object.entries(a.headers))c!=null&&(t[n]=c);let e=xg(a.url,a.queryParameters),o=await yg({body:a.body,type:a.requestType==="json"?"json":"other"}),i=await Rg();try{let n=await Ig(async()=>jg(i,e,a.method,t,o,a.timeoutMs,a.abortSignal,a.withCredentials,a.duplex),a.maxRetries),c=await Eg(n,a.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:yi(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:yi(n)}}catch(n){return a.abortSignal!=null&&a.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:xi}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:xi}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:Ri}:{ok:false,error:{reason:"unknown",errorMessage:Ue(n)},rawResponse:Ri}}}var x=Gb;var s={get:async a=>typeof a=="function"?a():a};var w=class a extends Promise{constructor(t){super(e=>{e(void 0);}),this.innerPromise=t;}static fromFunction(t,...e){return new a(t(...e))}static interceptFunction(t){return (...e)=>a.fromPromise(t(...e))}static fromPromise(t){return new a(t)}static fromExecutor(t){let e=new Promise(t);return new a(e)}static fromResult(t){let e=Promise.resolve(t);return new a(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:t})=>t)),this.unwrappedPromise}then(t,e){return this.unwrap().then(t,e)}catch(t){return this.unwrap().catch(t)}finally(t){return this.unwrap().finally(t)}async withRawResponse(){return await this.innerPromise}};function ds(a){return typeof a=="object"&&a!=null&&"name"in a}function us(a){return typeof a=="object"&&a!=null&&"path"in a}function gs(a){let t=a.lastIndexOf("/"),e=a.lastIndexOf("\\"),o=Math.max(t,e);return o>=0?a.substring(o+1):a}async function ff(){let a;return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?a=new cs:m.type==="node"?a=new ls:a=new ms,await a.setup(),a}var cs=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ds(t))return t.name;if(us(t)&&t.path)return gs(t.path.toString())}async appendFile(t,e,o){var i,n;o=this.getFileName(e,o),e instanceof Blob?(i=this.fd)==null||i.append(t,e,o):(n=this.fd)==null||n.append(t,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let t=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(t),headers:t.headers,duplex:"half"}}},ls=class{async setup(){this.fd=new(await Promise.resolve().then(()=>Bh(gf()))).default;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ds(t))return t.name;if(us(t)&&t.path)return gs(t.path.toString())}async appendFile(t,e,o){var n,c;o=this.getFileName(e,o);let i;e instanceof Blob?i=Buffer.from(await e.arrayBuffer()):i=e,o==null?(n=this.fd)==null||n.append(t,i):(c=this.fd)==null||c.append(t,i,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},ms=class{async setup(){this.fd=new FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ds(t))return t.name;if(us(t)&&t.path)return gs(t.path.toString())}async appendFile(t,e,o){var i,n;if(o=this.getFileName(e,o),e instanceof Blob){(i=this.fd)==null||i.append(t,e,o);return}(n=this.fd)==null||n.append(t,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>gr,ParseError:()=>fr,any:()=>Pf,bigint:()=>wf,boolean:()=>Cf,booleanLiteral:()=>Ef,date:()=>bf,discriminant:()=>Wf,enum_:()=>Si,getObjectLikeUtils:()=>be,getObjectUtils:()=>Xe,getSchemaUtils:()=>D,isProperty:()=>Me,lazy:()=>xf,lazyObject:()=>_f,list:()=>Ai,number:()=>jf,object:()=>_i,objectWithoutOptionalProperties:()=>Sf,optional:()=>fs,property:()=>yf,record:()=>Mf,set:()=>Nf,string:()=>If,stringLiteral:()=>Tf,transform:()=>hs,undiscriminatedUnion:()=>Of,union:()=>Lf,unknown:()=>Uf,withParsedProperties:()=>bs});var T={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function U(a,t){return `Expected ${t}. Received ${jx(a)}.`}function jx(a){if(Array.isArray(a))return "list";if(a===null)return "null";if(a instanceof BigInt)return "BigInt";switch(typeof a){case "string":return `"${a}"`;case "bigint":case "number":case "boolean":case "undefined":return `${a}`}return typeof a}function Q(a){return {...a,json:hf(a.json),parse:hf(a.parse)}}function hf(a){return (t,e)=>{let o=a(t,e),{skipValidation:i=false}=e!=null?e:{};return !o.ok&&i?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
4
- `)),{ok:true,value:t}):o}}function vi(a){return a.path.length===0?a.message:`${a.path.join(" -> ")}: ${a.message}`}var gr=class a extends Error{constructor(e){super(e.map(vi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};var fr=class a extends Error{constructor(e){super(e.map(vi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};function D(a){return {nullable:()=>Ix(a),optional:()=>fs(a),optionalNullable:()=>Ux(a),transform:t=>hs(a,t),parseOrThrow:(t,e)=>{let o=a.parse(t,e);if(o.ok)return o.value;throw new fr(o.errors)},jsonOrThrow:(t,e)=>{let o=a.json(t,e);if(o.ok)return o.value;throw new gr(o.errors)}}}function Ix(a){let t={parse:(e,o)=>e==null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.NULLABLE};return {...t,...D(t)}}function fs(a){let t={parse:(e,o)=>e==null?{ok:true,value:void 0}:a.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL};return {...t,...D(t)}}function Ux(a){let t={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL_NULLABLE};return {...t,...D(t)}}function hs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);return n.ok?{ok:true,value:t.transform(n.value)}:n},json:(o,i)=>{let n=t.untransform(o);return a.json(n,i)},getType:()=>a.getType()};return {...e,...D(e)}}function wf(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t=="bigint"?{ok:true,value:t}:typeof t=="number"?{ok:true,value:BigInt(t)}:{ok:false,errors:[{path:e,message:U(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="bigint"?{ok:false,errors:[{path:e,message:U(t,"bigint")}]}:{ok:true,value:t},getType:()=>T.BIGINT};return {...Q(a),...D(a)}}var Dx=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function bf(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:e,message:U(t,"string")}]}:Dx.test(t)?{ok:true,value:new Date(t)}:{ok:false,errors:[{path:e,message:U(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>t instanceof Date?{ok:true,value:t.toISOString()}:{ok:false,errors:[{path:e,message:U(t,"Date object")}]},getType:()=>T.DATE};return {...Q(a),...D(a)}}function q(a,t){return ()=>{let e={parse:t,json:t,getType:()=>a};return {...Q(e),...D(e)}}}function Si(a){let t=new Set(a);return q(T.ENUM,(o,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:U(o,"string")}]}:!t.has(o)&&!i?{ok:false,errors:[{path:n,message:U(o,"enum")}]}:{ok:true,value:o})()}function xf(a){let t=ws(a);return {...t,...D(t)}}function ws(a){return {parse:(t,e)=>hr(a).parse(t,e),json:(t,e)=>hr(a).json(t,e),getType:()=>hr(a).getType()}}function hr(a){let t=a;return t.__zurg_memoized==null&&(t.__zurg_memoized=a()),t.__zurg_memoized}function Lr(a){return Object.entries(a)}function Vr(a,t){let e=new Set(t);return Object.entries(a).reduce((o,[i,n])=>(e.has(i)&&(o[i]=n),o),{})}function De(a){if(typeof a!="object"||a===null)return false;if(Object.getPrototypeOf(a)===null)return true;let t=a;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(a)===t}function Hr(a){return Object.keys(a)}function Rf(a,t){let e=[],o=[];for(let i of a)t(i)?e.push(i):o.push(i);return [e,o]}function be(a){return {withParsedProperties:t=>bs(a,t)}}function bs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);if(!n.ok)return n;let c=Object.entries(t).reduce((d,[u,g])=>({...d,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,i)=>{var d;if(!De(o))return {ok:false,errors:[{path:(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],message:U(o,"object")}]};let n=new Set(Object.keys(t)),c=Vr(o,Object.keys(o).filter(u=>!n.has(u)));return a.json(c,i)},getType:()=>a.getType()};return {...e,...D(e),...be(e)}}function yf(a,t){return {rawKey:a,valueSchema:t,isProperty:true}}function Me(a){return a.isProperty}function _i(a){let t={_getRawProperties:()=>Object.entries(a).map(([e,o])=>Me(o)?o.rawKey:e),_getParsedProperties:()=>Hr(a),parse:(e,o)=>{let i={},n=[];for(let[c,d]of Lr(a)){let u=Me(d)?d.rawKey:c,g=Me(d)?d.valueSchema:d,f={rawKey:u,parsedKey:c,valueSchema:g};i[u]=f,vf(g)&&n.push(u);}return kf({value:e,requiredKeys:n,getProperty:c=>{let d=i[c];if(d!=null)return {transformedKey:d.parsedKey,transform:u=>{var g;return d.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let i=[];for(let[n,c]of Lr(a)){let d=Me(c)?c.valueSchema:c;vf(d)&&i.push(n);}return kf({value:e,requiredKeys:i,getProperty:n=>{let c=a[n];if(c!=null)return Me(c)?{transformedKey:c.rawKey,transform:d=>{var u;return c.valueSchema.json(d,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}:{transformedKey:n,transform:d=>{var u;return c.json(d,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},getType:()=>T.OBJECT};return {...Q(t),...D(t),...be(t),...Xe(t)}}function kf({value:a,requiredKeys:t,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:i=false,breadcrumbsPrefix:n=[]}){if(!De(a))return {ok:false,errors:[{path:n,message:U(a,"object")}]};let c=new Set(t),d=[],u={};for(let[g,f]of Object.entries(a)){let y=e(g);if(y!=null){c.delete(g);let z=y.transform(f);z.ok?u[y.transformedKey]=z.value:(u[g]=f,d.push(...z.errors));}else switch(o){case "fail":d.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=f;break}}return d.push(...t.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),d.length===0||i?{ok:true,value:u}:{ok:false,errors:d}}function Xe(a){return {extend:t=>{let e={_getParsedProperties:()=>[...a._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...a._getRawProperties(),...t._getRawProperties()],parse:(o,i)=>zf({extensionKeys:t._getRawProperties(),value:o,transformBase:n=>a.parse(n,i),transformExtension:n=>t.parse(n,i)}),json:(o,i)=>zf({extensionKeys:t._getParsedProperties(),value:o,transformBase:n=>a.json(n,i),transformExtension:n=>t.json(n,i)}),getType:()=>T.OBJECT};return {...e,...D(e),...be(e),...Xe(e)}},passthrough:()=>{let t={_getParsedProperties:()=>a._getParsedProperties(),_getRawProperties:()=>a._getRawProperties(),parse:(e,o)=>{let i=a.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},json:(e,o)=>{let i=a.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},getType:()=>T.OBJECT};return {...t,...D(t),...be(t),...Xe(t)}}}}function zf({extensionKeys:a,value:t,transformBase:e,transformExtension:o}){let i=new Set(a),[n,c]=Rf(Hr(t),g=>i.has(g)),d=e(Vr(t,c)),u=o(Vr(t,n));return d.ok&&u.ok?{ok:true,value:{...d.value,...u.value}}:{ok:false,errors:[...d.ok?[]:d.errors,...u.ok?[]:u.errors]}}function vf(a){return !Mx(a)}function Mx(a){switch(a.getType()){case T.ANY:case T.UNKNOWN:case T.OPTIONAL:case T.OPTIONAL_NULLABLE:return true;default:return false}}function Sf(a){return _i(a)}function _f(a){let t={...ws(a),_getRawProperties:()=>hr(a)._getRawProperties(),_getParsedProperties:()=>hr(a)._getParsedProperties()};return {...t,...D(t),...be(t),...Xe(t)}}function Ai(a){let t={parse:(e,o)=>Af(e,(i,n)=>{var c;return a.parse(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>Af(e,(i,n)=>{var c;return a.json(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>T.LIST};return {...Q(t),...D(t)}}function Af(a,t){return Array.isArray(a)?a.map((o,i)=>t(o,i)).reduce((o,i)=>{if(o.ok&&i.ok)return {ok:true,value:[...o.value,i.value]};let n=[];return o.ok||n.push(...o.errors),i.ok||n.push(...i.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:U(a,"list"),path:[]}]}}function Tf(a){return q(T.STRING_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`"${a}"`)}]})()}function Ef(a){return q(T.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`${a.toString()}`)}]})()}var Pf=q(T.ANY,a=>({ok:true,value:a}));var Cf=q(T.BOOLEAN,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="boolean"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"boolean")}]});var jf=q(T.NUMBER,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="number"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"number")}]});var If=q(T.STRING,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="string"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"string")}]});var Uf=q(T.UNKNOWN,a=>({ok:true,value:a}));function Mf(a,t){let e={parse:(o,i)=>Df({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.parse(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var d;return t.parse(n,{...i,breadcrumbsPrefix:[...(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(o,i)=>Df({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.json(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var d;return t.json(n,{...i,breadcrumbsPrefix:[...(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>T.RECORD};return {...Q(e),...D(e)}}function Df({value:a,isKeyNumeric:t,transformKey:e,transformValue:o,breadcrumbsPrefix:i=[]}){return De(a)?Lr(a).reduce((n,[c,d])=>{if(d===void 0)return n;let u=n,g=c;if(t){let v=c.length>0?Number(c):NaN;isNaN(v)||(g=v);}let f=e(g),y=o(d,g);if(u.ok&&f.ok&&y.ok)return {ok:true,value:{...u.value,[f.value]:y.value}};let z=[];return u.ok||z.push(...u.errors),f.ok||z.push(...f.errors),y.ok||z.push(...y.errors),{ok:false,errors:z}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:U(a,"object")}]}}function Nf(a){let t=Ai(a),e={parse:(o,i)=>{let n=t.parse(o,i);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,i)=>{var c;return o instanceof Set?t.json([...o],i):{ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:U(o,"Set")}]}},getType:()=>T.SET};return {...Q(e),...D(e)}}function Of(a){let t={parse:(e,o)=>Ff((i,n)=>i.parse(e,n),a,o),json:(e,o)=>Ff((i,n)=>i.json(e,n),a,o),getType:()=>T.UNDISCRIMINATED_UNION};return {...Q(t),...D(t)}}function Ff(a,t,e){let o=[];for(let[i,n]of t.entries()){let c=a(n,{...e,skipValidation:false});if(c.ok)return c;for(let d of c.errors)o.push({path:d.path,message:`[Variant ${i}] ${d.message}`});}return {ok:false,errors:o}}function Wf(a,t){return {parsedDiscriminant:a,rawDiscriminant:t}}function Lf(a,t){let e=typeof a=="string"?a:a.rawDiscriminant,o=typeof a=="string"?a:a.parsedDiscriminant,i=Si(Hr(t)),n={parse:(c,d)=>Bf({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return i.parse(u,{allowUnrecognizedEnumValues:d==null?void 0:d.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=d==null?void 0:d.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:d==null?void 0:d.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.parse(u,d),breadcrumbsPrefix:d==null?void 0:d.breadcrumbsPrefix}),json:(c,d)=>Bf({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return i.json(u,{allowUnrecognizedEnumValues:d==null?void 0:d.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=d==null?void 0:d.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:d==null?void 0:d.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,d),breadcrumbsPrefix:d==null?void 0:d.breadcrumbsPrefix}),getType:()=>T.UNION};return {...Q(n),...D(n),...be(n)}}function Bf({value:a,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:d=[]}){if(!De(a))return {ok:false,errors:[{path:d,message:U(a,"object")}]};let{[t]:u,...g}=a;if(u==null)return {ok:false,errors:[{path:d,message:`Missing discriminant ("${t}")`}]};let f=o(u);if(!f.ok)return {ok:false,errors:f.errors};let y=i(f.value);if(y==null)return n?{ok:true,value:{[e]:f.value,...g}}:{ok:false,errors:[{path:[...d,t],message:"Unexpected discriminant value"}]};let z=c(g,y);return z.ok?{ok:true,value:{[e]:u,...z.value}}:z}function Nx(a){var t=[];if(a.length===0)return "";if(typeof a[0]!="string")throw new TypeError("Url must be a string. Received "+a[0]);if(a[0].match(/^[^/:]+:\/*$/)&&a.length>1){var e=a.shift();a[0]=e+a[0];}a[0].match(/^file:\/\/\//)?a[0]=a[0].replace(/^([^/:]+):\/*/,"$1:///"):a[0]=a[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<a.length;o++){var i=a[o];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(o>0&&(i=i.replace(/^[\/]+/,"")),o<a.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i));}var n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function R(){var a;return typeof arguments[0]=="object"?a=arguments[0]:a=[].slice.call(arguments),Nx(a)}var j={};E(j,{AggregationData:()=>lm,Alert:()=>Vx,AlertAlertType:()=>lp,AlertPagePublic:()=>Tp,AlertPublic:()=>nt,AlertPublicAlertType:()=>kp,AlertTrigger:()=>fp,AlertTriggerConfig:()=>gp,AlertTriggerConfigPublic:()=>_p,AlertTriggerConfigPublicType:()=>Sp,AlertTriggerConfigType:()=>up,AlertTriggerConfigWrite:()=>wp,AlertTriggerConfigWriteType:()=>hp,AlertTriggerEventType:()=>dp,AlertTriggerPublic:()=>Ap,AlertTriggerPublicEventType:()=>vp,AlertTriggerWrite:()=>xp,AlertTriggerWriteEventType:()=>bp,AlertWrite:()=>at,AlertWriteAlertType:()=>Rp,AnnotationQueue:()=>Up,AnnotationQueueBatch:()=>Jx,AnnotationQueueBatchWrite:()=>Yo,AnnotationQueueItemIds:()=>wa,AnnotationQueuePagePublic:()=>Np,AnnotationQueuePublic:()=>st,AnnotationQueuePublicScope:()=>Dp,AnnotationQueueReviewer:()=>Ip,AnnotationQueueReviewerPublic:()=>Mp,AnnotationQueueScope:()=>jp,AnnotationQueueUpdate:()=>Zo,AnnotationQueueWrite:()=>Qo,AnnotationQueueWriteScope:()=>$s,AssistantMessage:()=>rl,AssistantMessageRole:()=>el,Attachment:()=>Fp,AttachmentListRequestEntityType:()=>Pi,AttachmentPage:()=>Op,AudioUrl:()=>Xp,AudioUrlPublic:()=>Ec,AudioUrlWrite:()=>sc,AuthDetailsHolder:()=>Hp,AutomationRuleEvaluator:()=>Kx,AutomationRuleEvaluatorLlmAsJudge:()=>ec,AutomationRuleEvaluatorLlmAsJudgePublic:()=>wt,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>fc,AutomationRuleEvaluatorObjectObjectPublic:()=>Bc,AutomationRuleEvaluatorPagePublic:()=>Lc,AutomationRuleEvaluatorPublic:()=>Vc,AutomationRuleEvaluatorSpanLlmAsJudge:()=>ac,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>kt,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>bc,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>nc,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>zt,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>Rc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>oc,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>Rt,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>zc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>tc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>yt,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Sc,AutomationRuleEvaluatorUpdate:()=>qc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Kc,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Yc,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>Zc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>$c,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>Qc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>Gc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>rc,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>xt,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>Ac,AutomationRuleEvaluatorWrite:()=>Tc,AvgValueStatPublic:()=>Pl,BatchDelete:()=>B,BatchDeleteByProject:()=>uR,BiInformation:()=>ap,BiInformationResponse:()=>Rr,BooleanFeedbackDefinition:()=>fm,BooleanFeedbackDefinitionCreate:()=>km,BooleanFeedbackDefinitionPublic:()=>jt,BooleanFeedbackDefinitionUpdate:()=>Fm,BooleanFeedbackDetail:()=>gm,BooleanFeedbackDetailCreate:()=>ym,BooleanFeedbackDetailPublic:()=>Em,BooleanFeedbackDetailUpdate:()=>Nm,CategoricalFeedbackDefinition:()=>wm,CategoricalFeedbackDefinitionCreate:()=>vm,CategoricalFeedbackDefinitionPublic:()=>It,CategoricalFeedbackDefinitionUpdate:()=>Wm,CategoricalFeedbackDetail:()=>hm,CategoricalFeedbackDetailCreate:()=>zm,CategoricalFeedbackDetailPublic:()=>Pm,CategoricalFeedbackDetailUpdate:()=>Om,ChatCompletionChoice:()=>tl,ChatCompletionRequest:()=>et,ChatCompletionResponse:()=>sl,Check:()=>Yl,CheckName:()=>$l,CheckPublic:()=>lu,CheckPublicName:()=>pu,CheckPublicResult:()=>cu,CheckResult:()=>Ql,ChunkedOutputJsonNode:()=>Yx,ChunkedOutputJsonNodePublic:()=>rR,ChunkedOutputJsonNodePublicType:()=>um,ChunkedOutputJsonNodeType:()=>Vl,Column:()=>Bl,ColumnCompare:()=>fl,ColumnCompareTypesItem:()=>gl,ColumnPublic:()=>Fl,ColumnPublicTypesItem:()=>Nl,ColumnTypesItem:()=>Wl,Comment:()=>H,CommentCompare:()=>hl,CommentPublic:()=>sr,CompleteMultipartUploadRequest:()=>ba,CompleteMultipartUploadRequestEntityType:()=>Wp,CompletionTokensDetails:()=>al,CountValueStatPublic:()=>Cl,CreateDatasetItemsFromSpansRequest:()=>Yr,CreateDatasetItemsFromTracesRequest:()=>Zr,CreatePromptVersionDetail:()=>To,CreatePromptVersionDetailTemplateStructure:()=>ta,DashboardPagePublic:()=>pl,DashboardPublic:()=>nr,DashboardUpdatePublic:()=>ot,DashboardWrite:()=>rt,DataPointDouble:()=>gR,DataPointNumberPublic:()=>Td,Dataset:()=>Gx,DatasetExpansion:()=>Qx,DatasetExpansionResponse:()=>ul,DatasetExpansionWrite:()=>oo,DatasetIdentifier:()=>eo,DatasetIdentifierPublic:()=>to,DatasetItem:()=>St,DatasetItemBatch:()=>$x,DatasetItemBatchUpdate:()=>Kr,DatasetItemBatchWrite:()=>Qr,DatasetItemCompare:()=>vl,DatasetItemCompareSource:()=>wl,DatasetItemFilter:()=>Xr,DatasetItemFilterOperator:()=>xs,DatasetItemPageCompare:()=>Sl,DatasetItemPagePublic:()=>Ol,DatasetItemPublic:()=>Tt,DatasetItemPublicSource:()=>Dl,DatasetItemSource:()=>dl,DatasetItemStreamRequest:()=>io,DatasetItemUpdate:()=>Rs,DatasetItemWrite:()=>$r,DatasetItemWriteSource:()=>ys,DatasetItemsDelete:()=>ro,DatasetPagePublic:()=>El,DatasetPublic:()=>_r,DatasetPublicStatus:()=>Al,DatasetPublicVisibility:()=>_l,DatasetStatus:()=>ll,DatasetUpdate:()=>qr,DatasetUpdateVisibility:()=>Mi,DatasetVersionCreatePublic:()=>no,DatasetVersionDiff:()=>Jl,DatasetVersionDiffStats:()=>Hl,DatasetVersionPagePublic:()=>Xl,DatasetVersionPublic:()=>Ar,DatasetVersionRestorePublic:()=>so,DatasetVersionSummary:()=>ml,DatasetVersionSummaryPublic:()=>Tl,DatasetVersionTag:()=>ao,DatasetVersionUpdatePublic:()=>po,DatasetVisibility:()=>cl,DatasetWrite:()=>Gr,DatasetWriteVisibility:()=>Di,DeleteAttachmentsRequest:()=>Xx,DeleteAttachmentsRequestEntityType:()=>Lp,DeleteFeedbackScore:()=>Wt,DeleteIdsHolder:()=>Tr,DeleteThreadFeedbackScores:()=>Jo,DeleteTraceThreads:()=>Xo,Delta:()=>ol,DownloadAttachmentRequestEntityType:()=>Ci,ErrorCountWithDeviation:()=>Ft,ErrorCountWithDeviationDetailed:()=>Dd,ErrorInfo:()=>Te,ErrorInfoExperimentItemBulkWriteView:()=>go,ErrorInfoPublic:()=>Bt,ErrorInfoWrite:()=>jo,ErrorMessage:()=>ae,ErrorMessageDetail:()=>lR,ErrorMessageDetailed:()=>pR,ErrorMessagePublic:()=>Hx,Experiment:()=>Zx,ExperimentGroupAggregationsResponse:()=>dm,ExperimentGroupResponse:()=>cm,ExperimentItem:()=>lo,ExperimentItemBulkRecord:()=>rm,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Ms,ExperimentItemBulkUpload:()=>qx,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>fo,ExperimentItemCompare:()=>zl,ExperimentItemCompareTraceVisibilityMode:()=>kl,ExperimentItemPublic:()=>At,ExperimentItemPublicTraceVisibilityMode:()=>Ml,ExperimentItemStreamRequest:()=>bo,ExperimentItemTraceVisibilityMode:()=>Ts,ExperimentItemsBatch:()=>mo,ExperimentItemsDelete:()=>uo,ExperimentPagePublic:()=>am,ExperimentPublic:()=>Ct,ExperimentPublicStatus:()=>tm,ExperimentPublicType:()=>om,ExperimentScore:()=>ho,ExperimentScorePublic:()=>im,ExperimentScoreWrite:()=>vs,ExperimentStatus:()=>Gl,ExperimentStreamRequestPublic:()=>xo,ExperimentType:()=>Kl,ExperimentUpdate:()=>wo,ExperimentUpdateStatus:()=>Bi,ExperimentUpdateType:()=>Wi,ExperimentWrite:()=>co,ExperimentWriteStatus:()=>Oi,ExperimentWriteType:()=>Fi,ExportTraceServiceRequest:()=>aR,Feedback:()=>oR,FeedbackCreate:()=>Tm,FeedbackDefinitionPagePublic:()=>Um,FeedbackObjectPublic:()=>Im,FeedbackPublic:()=>Mm,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>ne,FeedbackScoreAverageDetailed:()=>Md,FeedbackScoreAveragePublic:()=>Qe,FeedbackScoreBatch:()=>Vt,FeedbackScoreBatchItem:()=>su,FeedbackScoreBatchItemSource:()=>nu,FeedbackScoreBatchItemThread:()=>Ks,FeedbackScoreBatchItemThreadSource:()=>Xs,FeedbackScoreBatchThread:()=>Ko,FeedbackScoreCompare:()=>yl,FeedbackScoreCompareSource:()=>bl,FeedbackScoreExperimentItemBulkWriteView:()=>Ds,FeedbackScoreExperimentItemBulkWriteViewSource:()=>js,FeedbackScoreNames:()=>Ad,FeedbackScorePublic:()=>Pr,FeedbackScorePublicSource:()=>ru,FeedbackScoreSource:()=>Ss,FeedbackUpdate:()=>Hm,FindFeedbackDefinitionsRequestType:()=>Hi,FindFeedbackScoreNames1RequestType:()=>na,Function:()=>qo,FunctionCall:()=>Ee,GetSpanStatsRequestType:()=>sa,GetSpansByProjectRequestType:()=>aa,GetWebhookExamplesRequestAlertType:()=>Ti,GroupContent:()=>nm,GroupContentWithAggregations:()=>mm,GroupDetail:()=>sm,GroupDetails:()=>pm,Guardrail:()=>Km,GuardrailBatch:()=>tR,GuardrailBatchWrite:()=>tt,GuardrailName:()=>Jm,GuardrailResult:()=>Xm,GuardrailWrite:()=>ip,GuardrailWriteName:()=>op,GuardrailWriteResult:()=>tp,GuardrailsValidation:()=>Zl,GuardrailsValidationPublic:()=>mu,IdsHolder:()=>eR,ImageUrl:()=>Qp,ImageUrlPublic:()=>Cc,ImageUrlWrite:()=>lc,JsonListString:()=>M,JsonListStringCompare:()=>xa,JsonListStringExperimentItemBulkWriteView:()=>xe,JsonListStringPublic:()=>me,JsonListStringWrite:()=>ce,JsonNode:()=>P,JsonNodeDetail:()=>Os,JsonNodePublic:()=>re,JsonNodeWrite:()=>le,JsonSchema:()=>qs,LlmAsJudgeCode:()=>pt,LlmAsJudgeCodePublic:()=>Dc,LlmAsJudgeCodeWrite:()=>gc,LlmAsJudgeMessage:()=>Ze,LlmAsJudgeMessageContent:()=>Zp,LlmAsJudgeMessageContentPublic:()=>Ic,LlmAsJudgeMessageContentWrite:()=>dc,LlmAsJudgeMessagePublic:()=>ir,LlmAsJudgeMessagePublicRole:()=>Pc,LlmAsJudgeMessageRole:()=>$p,LlmAsJudgeMessageWrite:()=>rr,LlmAsJudgeMessageWriteRole:()=>cc,LlmAsJudgeModelParameters:()=>Ye,LlmAsJudgeModelParametersPublic:()=>tr,LlmAsJudgeModelParametersWrite:()=>er,LlmAsJudgeOutputSchema:()=>qe,LlmAsJudgeOutputSchemaPublic:()=>ar,LlmAsJudgeOutputSchemaPublicType:()=>Uc,LlmAsJudgeOutputSchemaType:()=>qp,LlmAsJudgeOutputSchemaWrite:()=>or,LlmAsJudgeOutputSchemaWriteType:()=>uc,LogItem:()=>Jc,LogItemLevel:()=>Hc,LogPage:()=>Xc,ManualEvaluationRequest:()=>Nt,ManualEvaluationRequestEntityType:()=>Ym,ManualEvaluationResponse:()=>Mt,Message:()=>Qs,MultipartUploadPart:()=>Bp,NumericalFeedbackDefinition:()=>xm,NumericalFeedbackDefinitionCreate:()=>_m,NumericalFeedbackDefinitionPublic:()=>Ut,NumericalFeedbackDefinitionUpdate:()=>Lm,NumericalFeedbackDetail:()=>bm,NumericalFeedbackDetailCreate:()=>Sm,NumericalFeedbackDetailPublic:()=>Cm,NumericalFeedbackDetailUpdate:()=>Bm,Optimization:()=>nR,OptimizationPagePublic:()=>za,OptimizationPublic:()=>Er,OptimizationPublicStatus:()=>gd,OptimizationStatus:()=>Zm,OptimizationStudioConfig:()=>ad,OptimizationStudioConfigPublic:()=>yd,OptimizationStudioConfigWrite:()=>dd,OptimizationStudioLog:()=>kd,OptimizationUpdate:()=>ko,OptimizationUpdateStatus:()=>Gi,OptimizationWrite:()=>ka,OptimizationWriteStatus:()=>ud,PageColumns:()=>Ll,PercentageValueStatPublic:()=>jl,PercentageValues:()=>je,PercentageValuesDetailed:()=>Nd,PercentageValuesPublic:()=>_t,Project:()=>sR,ProjectDetailed:()=>Od,ProjectDetailedVisibility:()=>Fd,ProjectMetricRequestPublic:()=>So,ProjectMetricRequestPublicInterval:()=>qi,ProjectMetricRequestPublicMetricType:()=>Zi,ProjectMetricResponsePublic:()=>jd,ProjectMetricResponsePublicInterval:()=>Pd,ProjectMetricResponsePublicMetricType:()=>Ed,ProjectPagePublic:()=>Sd,ProjectPublic:()=>Ot,ProjectPublicVisibility:()=>vd,ProjectReference:()=>Kp,ProjectReferencePublic:()=>bt,ProjectRetrieveDetailed:()=>_o,ProjectStatItemObjectPublic:()=>Ul,ProjectStatsPublic:()=>Ne,ProjectStatsSummary:()=>Ud,ProjectStatsSummaryItem:()=>Id,ProjectUpdate:()=>vo,ProjectUpdateVisibility:()=>Yi,ProjectVisibility:()=>zd,ProjectWrite:()=>zo,ProjectWriteVisibility:()=>Qi,Prompt:()=>cR,PromptDetail:()=>Xd,PromptDetailTemplateStructure:()=>Jd,PromptPagePublic:()=>qd,PromptPublic:()=>Zd,PromptPublicTemplateStructure:()=>Yd,PromptTemplateStructure:()=>Bd,PromptTokensDetails:()=>il,PromptType:()=>Wd,PromptUpdatable:()=>Po,PromptVersion:()=>Hd,PromptVersionBatchUpdate:()=>Eo,PromptVersionDetail:()=>Se,PromptVersionDetailTemplateStructure:()=>Bs,PromptVersionDetailType:()=>Ws,PromptVersionLink:()=>Ra,PromptVersionLinkPublic:()=>ya,PromptVersionLinkWrite:()=>Vi,PromptVersionPagePublic:()=>Qd,PromptVersionPublic:()=>$d,PromptVersionPublicTemplateStructure:()=>Gd,PromptVersionPublicType:()=>Kd,PromptVersionRetrieveDetail:()=>Co,PromptVersionTemplateStructure:()=>Vd,PromptVersionType:()=>Ld,PromptVersionUpdate:()=>Ls,PromptWrite:()=>Ao,PromptWriteTemplateStructure:()=>oa,PromptWriteType:()=>ra,ProviderApiKey:()=>iR,ProviderApiKeyPagePublic:()=>$m,ProviderApiKeyProvider:()=>Qm,ProviderApiKeyPublic:()=>Dt,ProviderApiKeyPublicProvider:()=>Gm,ProviderApiKeyUpdate:()=>yo,ProviderApiKeyWrite:()=>Ro,ProviderApiKeyWriteProvider:()=>Xi,ResponseFormat:()=>ep,ResponseFormatType:()=>Zs,Result:()=>pr,ResultsNumberPublic:()=>Cd,ScoreName:()=>_d,ServiceTogglesConfig:()=>eu,Span:()=>Pt,SpanBatch:()=>mR,SpanBatchUpdate:()=>Mo,SpanBatchWrite:()=>Uo,SpanEnrichmentOptions:()=>ks,SpanExperimentItemBulkWriteView:()=>Cs,SpanExperimentItemBulkWriteViewType:()=>Ps,SpanFilter:()=>Ce,SpanFilterOperator:()=>ic,SpanFilterPublic:()=>Ge,SpanFilterPublicOperator:()=>Js,SpanFilterWrite:()=>ft,SpanFilterWriteOperator:()=>hc,SpanLlmAsJudgeCode:()=>dt,SpanLlmAsJudgeCodePublic:()=>Oc,SpanLlmAsJudgeCodeWrite:()=>wc,SpanPagePublic:()=>au,SpanPublic:()=>Lt,SpanPublicType:()=>iu,SpanSearchStreamRequestPublic:()=>No,SpanSearchStreamRequestPublicType:()=>pa,SpanType:()=>em,SpanUpdate:()=>Do,SpanUpdateType:()=>Hs,SpanUserDefinedMetricPythonCode:()=>ut,SpanUserDefinedMetricPythonCodePublic:()=>Wc,SpanUserDefinedMetricPythonCodeWrite:()=>xc,SpanWrite:()=>Io,SpanWriteType:()=>Vs,SpansCountResponse:()=>sp,StartMultipartUploadRequest:()=>Jr,StartMultipartUploadRequestEntityType:()=>ji,StartMultipartUploadResponse:()=>Vp,StreamOptions:()=>Ys,StudioEvaluation:()=>td,StudioEvaluationPublic:()=>xd,StudioEvaluationWrite:()=>ld,StudioLlmModel:()=>rd,StudioLlmModelPublic:()=>wd,StudioLlmModelWrite:()=>pd,StudioMessage:()=>qm,StudioMessagePublic:()=>fd,StudioMessageWrite:()=>nd,StudioMetric:()=>od,StudioMetricPublic:()=>bd,StudioMetricWrite:()=>cd,StudioOptimizer:()=>id,StudioOptimizerPublic:()=>Rd,StudioOptimizerWrite:()=>md,StudioPrompt:()=>ed,StudioPromptPublic:()=>hd,StudioPromptWrite:()=>sd,Tool:()=>rp,ToolCall:()=>vt,Trace:()=>Et,TraceBatch:()=>dR,TraceBatchUpdate:()=>Bo,TraceBatchWrite:()=>Oo,TraceCountResponse:()=>cp,TraceEnrichmentOptions:()=>zs,TraceExperimentItemBulkWriteView:()=>Es,TraceFilter:()=>Pe,TraceFilterOperator:()=>Gp,TraceFilterPublic:()=>Ae,TraceFilterPublicOperator:()=>Ns,TraceFilterWrite:()=>gt,TraceFilterWriteOperator:()=>pc,TracePagePublic:()=>fu,TracePublic:()=>Ht,TracePublicVisibilityMode:()=>du,TraceSearchStreamRequestPublic:()=>$o,TraceThread:()=>Jt,TraceThreadBatchIdentifier:()=>Ho,TraceThreadBatchUpdate:()=>Vo,TraceThreadFilter:()=>Re,TraceThreadFilterOperator:()=>Gs,TraceThreadFilterPublic:()=>Ke,TraceThreadFilterPublicOperator:()=>Fs,TraceThreadFilterWrite:()=>ht,TraceThreadFilterWriteOperator:()=>yc,TraceThreadIdentifier:()=>va,TraceThreadLlmAsJudgeCode:()=>lt,TraceThreadLlmAsJudgeCodePublic:()=>Nc,TraceThreadLlmAsJudgeCodeWrite:()=>kc,TraceThreadPage:()=>gu,TraceThreadSearchStreamRequest:()=>Go,TraceThreadStatus:()=>uu,TraceThreadUpdate:()=>Lo,TraceThreadUserDefinedMetricPythonCode:()=>mt,TraceThreadUserDefinedMetricPythonCodePublic:()=>Fc,TraceThreadUserDefinedMetricPythonCodeWrite:()=>vc,TraceUpdate:()=>Wo,TraceVisibilityMode:()=>ql,TraceWrite:()=>Fo,UploadAttachmentRequestEntityType:()=>Ii,Usage:()=>nl,UserDefinedMetricPythonCode:()=>ct,UserDefinedMetricPythonCodePublic:()=>Mc,UserDefinedMetricPythonCodeWrite:()=>_c,ValueEntry:()=>As,ValueEntryCompare:()=>Rl,ValueEntryCompareSource:()=>xl,ValueEntryExperimentItemBulkWriteView:()=>Us,ValueEntryExperimentItemBulkWriteViewSource:()=>Is,ValueEntryPublic:()=>tu,ValueEntryPublicSource:()=>ou,ValueEntrySource:()=>_s,VideoUrl:()=>Yp,VideoUrlPublic:()=>jc,VideoUrlWrite:()=>mc,Webhook:()=>mp,WebhookExamples:()=>Ep,WebhookPublic:()=>zp,WebhookTestResult:()=>Cp,WebhookTestResultStatus:()=>Pp,WebhookWrite:()=>yp,WelcomeWizardSubmission:()=>it,WelcomeWizardTracking:()=>hu,WorkspaceConfiguration:()=>Xt,WorkspaceMetricRequest:()=>fR,WorkspaceMetricResponse:()=>Sa,WorkspaceMetricsSummaryRequest:()=>Cr,WorkspaceMetricsSummaryResponse:()=>wu,WorkspaceNameHolder:()=>Jp,WorkspaceSpansCount:()=>np,WorkspaceTraceCount:()=>pp,alerts:()=>Ei,annotationQueues:()=>da,attachments:()=>wr,chatCompletions:()=>ua,dashboards:()=>ga,datasets:()=>Ni,experiments:()=>br,feedbackDefinitions:()=>Ji,guardrails:()=>fa,llmProviderKey:()=>Ki,optimizations:()=>$i,projects:()=>ea,prompts:()=>ia,spans:()=>xr,traces:()=>$e,welcomeWizard:()=>ha});var Ei={};E(Ei,{GetWebhookExamplesRequestAlertType:()=>Ti});var Ti=r.enum_(["general","slack","pagerduty"]);var wr={};E(wr,{AttachmentListRequestEntityType:()=>Pi,DownloadAttachmentRequestEntityType:()=>Ci,StartMultipartUploadRequest:()=>Jr,StartMultipartUploadRequestEntityType:()=>ji,UploadAttachmentRequestEntityType:()=>Ii,uploadAttachment:()=>Ui});var Pi=r.enum_(["trace","span"]);var Ci=r.enum_(["trace","span"]);var ji=r.enum_(["trace","span"]);var Ii=r.enum_(["trace","span"]);var Ui={};E(Ui,{Request:()=>Fx});var Fx=r.record(r.string(),r.unknown());var Jr=r.object({fileName:r.property("file_name",r.string()),numOfFileParts:r.property("num_of_file_parts",r.number()),mimeType:r.property("mime_type",r.string().optional()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",ji),entityId:r.property("entity_id",r.string()),path:r.string()});var Ni={};E(Ni,{CreateDatasetItemsFromSpansRequest:()=>Yr,CreateDatasetItemsFromTracesRequest:()=>Zr,DatasetExpansionWrite:()=>oo,DatasetIdentifier:()=>eo,DatasetIdentifierPublic:()=>to,DatasetItemBatchUpdate:()=>Kr,DatasetItemBatchWrite:()=>Qr,DatasetItemStreamRequest:()=>io,DatasetItemsDelete:()=>ro,DatasetUpdate:()=>qr,DatasetUpdateVisibility:()=>Mi,DatasetVersionCreatePublic:()=>no,DatasetVersionRestorePublic:()=>so,DatasetVersionTag:()=>ao,DatasetVersionUpdatePublic:()=>po,DatasetWrite:()=>Gr,DatasetWriteVisibility:()=>Di});var Di=r.enum_(["private","public"]);var Mi=r.enum_(["private","public"]);var xs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Xr=r.object({field:r.string().optional(),operator:xs.optional(),key:r.string().optional(),value:r.string().optional()});var P=r.record(r.string(),r.unknown());var Rs=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:P.optional(),data:P.optional(),tags:r.list(r.string()).optional()});var Kr=r.object({ids:r.list(r.string()).optional(),filters:r.list(Xr).optional(),update:Rs,mergeTags:r.property("merge_tags",r.boolean().optional())});var Gr=r.object({id:r.string().optional(),name:r.string(),visibility:Di.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var ys=r.enum_(["manual","trace","span","sdk"]);var $r=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:ys,data:P,tags:r.list(r.string()).optional()});var Qr=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list($r)});var ks=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Yr=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",ks)});var zs=r.object({includeSpans:r.boolean().optional(),includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Zr=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",zs)});var qr=r.object({name:r.string(),description:r.string().optional(),visibility:Mi.optional(),tags:r.list(r.string()).optional()});var eo=r.object({datasetName:r.property("dataset_name",r.string())});var ro=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Xr).optional()});var oo=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var to=r.object({datasetName:r.property("dataset_name",r.string())});var io=r.object({datasetName:r.property("dataset_name",r.string()),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),steamLimit:r.property("steam_limit",r.number().optional())});var ao=r.object({tag:r.string()});var no=r.object({tags:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var so=r.object({versionRef:r.property("version_ref",r.string())});var po=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});var br={};E(br,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>fo,ExperimentItemStreamRequest:()=>bo,ExperimentItemsBatch:()=>mo,ExperimentItemsDelete:()=>uo,ExperimentStreamRequestPublic:()=>xo,ExperimentUpdate:()=>wo,ExperimentUpdateStatus:()=>Bi,ExperimentUpdateType:()=>Wi,ExperimentWrite:()=>co,ExperimentWriteStatus:()=>Oi,ExperimentWriteType:()=>Fi,findFeedbackScoreNames:()=>Li});var Fi=r.enum_(["regular","trial","mini-batch"]);var Oi=r.enum_(["running","completed","cancelled"]);var Wi=r.enum_(["regular","trial","mini-batch"]);var Bi=r.enum_(["running","completed","cancelled"]);var Li={};E(Li,{Response:()=>Ox});var Ox=r.list(r.string());var ce=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var vs=r.object({name:r.string(),value:r.number()});var Vi=r.object({id:r.string()});var co=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:ce.optional(),type:Fi.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:Oi.optional(),experimentScores:r.property("experiment_scores",r.list(vs).optional()),promptVersion:r.property("prompt_version",Vi.optional()),promptVersions:r.property("prompt_versions",r.list(Vi).optional())});var M=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Ss=r.enum_(["ui","sdk","online_scoring"]);var _s=r.enum_(["ui","sdk","online_scoring"]);var As=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:_s.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var ee=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Ss,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),As).optional())});var H=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Ts=r.enum_(["default","hidden"]);var lo=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:M.optional(),output:M.optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Ts.optional())});var mo=r.object({experimentItems:r.property("experiment_items",r.list(lo))});var uo=r.object({ids:r.list(r.string())});var xe=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var go=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Es=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:xe.optional(),output:xe.optional(),metadata:xe.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",go.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Ps=r.enum_(["general","tool","llm","guardrail"]);var Cs=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Ps.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:xe.optional(),output:xe.optional(),metadata:xe.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",go.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var js=r.enum_(["ui","sdk","online_scoring"]);var Is=r.enum_(["ui","sdk","online_scoring"]);var Us=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Is.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var Ds=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:js,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Us).optional())});var Ms=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",xe.optional()),trace:Es.optional(),spans:r.list(Cs).optional(),feedbackScores:r.property("feedback_scores",r.list(Ds).optional())});var fo=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(Ms)});var ho=r.object({name:r.string(),value:r.number()});var wo=r.object({name:r.string().optional(),metadata:P.optional(),type:Wi.optional(),status:Bi.optional(),experimentScores:r.property("experiment_scores",r.list(ho).optional())});var bo=r.object({experimentName:r.property("experiment_name",r.string()),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional()});var xo=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var Ji={};E(Ji,{FindFeedbackDefinitionsRequestType:()=>Hi});var Hi=r.enum_(["numerical","categorical","boolean"]);var Ki={};E(Ki,{ProviderApiKeyUpdate:()=>yo,ProviderApiKeyWrite:()=>Ro,ProviderApiKeyWriteProvider:()=>Xi});var Xi=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-free"]);var Ro=r.object({provider:Xi,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var yo=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var $i={};E($i,{OptimizationUpdate:()=>ko,OptimizationUpdateStatus:()=>Gi});var Gi=r.enum_(["running","completed","cancelled","initialized","error"]);var ko=r.object({name:r.string().optional(),status:Gi.optional()});var ea={};E(ea,{ProjectMetricRequestPublic:()=>So,ProjectMetricRequestPublicInterval:()=>qi,ProjectMetricRequestPublicMetricType:()=>Zi,ProjectRetrieveDetailed:()=>_o,ProjectUpdate:()=>vo,ProjectUpdateVisibility:()=>Yi,ProjectWrite:()=>zo,ProjectWriteVisibility:()=>Qi});var Qi=r.enum_(["private","public"]);var Yi=r.enum_(["private","public"]);var Zi=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var qi=r.enum_(["HOURLY","DAILY","WEEKLY"]);var zo=r.object({name:r.string(),visibility:Qi.optional(),description:r.string().optional()});var vo=r.object({name:r.string().optional(),description:r.string().optional(),visibility:Yi.optional()});var Ns=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ae=r.object({field:r.string().optional(),operator:Ns.optional(),key:r.string().optional(),value:r.string().optional()});var Fs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ke=r.object({field:r.string().optional(),operator:Fs.optional(),key:r.string().optional(),value:r.string().optional()});var So=r.object({metricType:r.property("metric_type",Zi.optional()),interval:qi.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),traceFilters:r.property("trace_filters",r.list(Ae).optional()),threadFilters:r.property("thread_filters",r.list(Ke).optional())});var _o=r.object({name:r.string()});var ia={};E(ia,{CreatePromptVersionDetail:()=>To,CreatePromptVersionDetailTemplateStructure:()=>ta,PromptUpdatable:()=>Po,PromptVersionBatchUpdate:()=>Eo,PromptVersionRetrieveDetail:()=>Co,PromptWrite:()=>Ao,PromptWriteTemplateStructure:()=>oa,PromptWriteType:()=>ra});var ra=r.enum_(["mustache","jinja2"]);var oa=r.enum_(["text","chat"]);var ta=r.enum_(["text","chat"]);var le=r.record(r.string(),r.unknown());var Ao=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:le.optional(),changeDescription:r.property("change_description",r.string().optional()),type:ra.optional(),templateStructure:r.property("template_structure",oa.optional()),tags:r.list(r.string()).optional()});var Os=r.record(r.string(),r.unknown());var Ws=r.enum_(["mustache","jinja2"]);var Bs=r.enum_(["text","chat"]);var Se=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Os.optional(),type:Ws.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Bs.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var To=r.object({name:r.string(),version:Se,templateStructure:r.property("template_structure",ta.optional())});var Ls=r.object({tags:r.list(r.string()).optional()});var Eo=r.object({ids:r.list(r.string()),update:Ls,mergeTags:r.property("merge_tags",r.boolean().optional())});var Po=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var Co=r.object({name:r.string(),commit:r.string().optional()});var xr={};E(xr,{FindFeedbackScoreNames1RequestType:()=>na,GetSpanStatsRequestType:()=>sa,GetSpansByProjectRequestType:()=>aa,SpanBatchUpdate:()=>Mo,SpanBatchWrite:()=>Uo,SpanSearchStreamRequestPublic:()=>No,SpanSearchStreamRequestPublicType:()=>pa,findFeedbackScoreNames1:()=>ca});var aa=r.enum_(["general","tool","llm","guardrail"]);var na=r.enum_(["general","tool","llm","guardrail"]);var sa=r.enum_(["general","tool","llm","guardrail"]);var pa=r.enum_(["general","tool","llm","guardrail"]);var ca={};E(ca,{Response:()=>Wx});var Wx=r.list(r.string());var Vs=r.enum_(["general","tool","llm","guardrail"]);var jo=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Io=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Vs.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",jo.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var Uo=r.object({spans:r.list(Io)});var Hs=r.enum_(["general","tool","llm","guardrail"]);var Te=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Do=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Hs.optional(),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",Te.optional())});var Mo=r.object({ids:r.list(r.string()),update:Do,mergeTags:r.property("merge_tags",r.boolean().optional())});var Js=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ge=r.object({field:r.string().optional(),operator:Js.optional(),key:r.string().optional(),value:r.string().optional()});var No=r.object({traceId:r.property("trace_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),type:pa.optional(),filters:r.list(Ge).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var $e={};E($e,{DeleteThreadFeedbackScores:()=>Jo,DeleteTraceThreads:()=>Xo,FeedbackScoreBatchThread:()=>Ko,TraceBatchUpdate:()=>Bo,TraceBatchWrite:()=>Oo,TraceSearchStreamRequestPublic:()=>$o,TraceThreadBatchIdentifier:()=>Ho,TraceThreadBatchUpdate:()=>Vo,TraceThreadSearchStreamRequest:()=>Go,findFeedbackScoreNames2:()=>la,findTraceThreadsFeedbackScoreNames:()=>ma});var la={};E(la,{Response:()=>Bx});var Bx=r.list(r.string());var ma={};E(ma,{Response:()=>Lx});var Lx=r.list(r.string());var Fo=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",jo.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Oo=r.object({traces:r.list(Fo)});var Wo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Te.optional()),threadId:r.property("thread_id",r.string().optional())});var Bo=r.object({ids:r.list(r.string()),update:Wo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Lo=r.object({tags:r.list(r.string()).optional()});var Vo=r.object({ids:r.list(r.string()),update:Lo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Ho=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()).optional())});var Jo=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional()});var Xo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()))});var Xs=r.enum_(["ui","sdk","online_scoring"]);var Ks=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Xs,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var Ko=r.object({scores:r.list(Ks)});var Gs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Re=r.object({field:r.string().optional(),operator:Gs.optional(),key:r.string().optional(),value:r.string().optional()});var Go=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Re).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var $o=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Ae).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var da={};E(da,{AnnotationQueueBatchWrite:()=>Yo,AnnotationQueueUpdate:()=>Zo});var $s=r.enum_(["trace","thread"]);var Qo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:$s,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Yo=r.object({annotationQueues:r.property("annotation_queues",r.list(Qo))});var Zo=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var ua={};E(ua,{ChatCompletionRequest:()=>et});var Qs=r.record(r.string(),r.unknown());var Ys=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Zs=r.enum_(["text","json_object","json_schema"]);var qs=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var ep=r.object({type:Zs.optional(),jsonSchema:r.property("json_schema",qs.optional())});var qo=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var rp=r.object({type:r.stringLiteral("function").optional(),function:qo.optional()});var Ee=r.object({name:r.string().optional(),arguments:r.string().optional()});var et=r.object({model:r.string().optional(),messages:r.list(Qs).optional(),temperature:r.number().optional(),topP:r.property("top_p",r.number().optional()),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:r.property("stream_options",Ys.optional()),stop:r.list(r.string()).optional(),maxTokens:r.property("max_tokens",r.number().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional()),presencePenalty:r.property("presence_penalty",r.number().optional()),frequencyPenalty:r.property("frequency_penalty",r.number().optional()),logitBias:r.property("logit_bias",r.record(r.string(),r.number()).optional()),user:r.string().optional(),responseFormat:r.property("response_format",ep.optional()),seed:r.number().optional(),tools:r.list(rp).optional(),toolChoice:r.property("tool_choice",r.record(r.string(),r.unknown()).optional()),parallelToolCalls:r.property("parallel_tool_calls",r.boolean().optional()),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.property("reasoning_effort",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional()),functions:r.list(qo).optional(),functionCall:r.property("function_call",Ee.optional())});var ga={};E(ga,{DashboardUpdatePublic:()=>ot,DashboardWrite:()=>rt});var rt=r.object({name:r.string(),description:r.string().optional(),config:le});var re=r.record(r.string(),r.unknown());var ot=r.object({name:r.string().optional(),description:r.string().optional(),config:re.optional()});var fa={};E(fa,{GuardrailBatchWrite:()=>tt});var op=r.enum_(["TOPIC","PII"]);var tp=r.enum_(["passed","failed"]);var ip=r.object({entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:op,result:tp,config:P,details:P});var tt=r.object({guardrails:r.list(ip)});var ha={};E(ha,{WelcomeWizardSubmission:()=>it});var it=r.object({role:r.string().optional(),integrations:r.list(r.string()).optional(),email:r.string().optional(),joinBetaProgram:r.property("join_beta_program",r.boolean().optional())});var ap=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var Rr=r.object({biInformation:r.property("bi_information",r.list(ap).optional())});var np=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var sp=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(np).optional())});var pp=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var cp=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(pp).optional())});var ae=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var lp=r.enum_(["general","slack","pagerduty"]);var mp=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var dp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var up=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var gp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:up,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var fp=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",dp),triggerConfigs:r.property("trigger_configs",r.list(gp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Vx=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",lp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:mp,triggers:r.list(fp).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var hp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var wp=r.object({id:r.string().optional(),type:hp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var bp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var xp=r.object({id:r.string().optional(),eventType:r.property("event_type",bp),triggerConfigs:r.property("trigger_configs",r.list(wp).optional())});var Rp=r.enum_(["general","slack","pagerduty"]);var yp=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional()});var at=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Rp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:yp,triggers:r.list(xp).optional()});var B=r.object({ids:r.list(r.string())});var kp=r.enum_(["general","slack","pagerduty"]);var zp=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var vp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Sp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var _p=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:Sp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Ap=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",vp),triggerConfigs:r.property("trigger_configs",r.list(_p).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var nt=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",kp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:zp,triggers:r.list(Ap).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Tp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(nt).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Hx=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Ep=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var Pp=r.enum_(["success","failure"]);var Cp=r.object({status:Pp.optional(),statusCode:r.property("status_code",r.number().optional()),requestBody:r.property("request_body",r.string().optional()),errorMessage:r.property("error_message",r.string().optional())});var wa=r.object({ids:r.list(r.string())});var jp=r.enum_(["trace","thread"]);var Ip=r.object({username:r.string().optional(),status:r.number().optional()});var ne=r.object({name:r.string(),value:r.number()});var Up=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:jp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Ip).optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Jx=r.object({annotationQueues:r.property("annotation_queues",r.list(Up))});var Dp=r.enum_(["trace","thread"]);var Mp=r.object({username:r.string().optional(),status:r.number().optional()});var Qe=r.object({name:r.string(),value:r.number()});var st=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:Dp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Mp).optional(),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Np=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(st).optional(),sortableBy:r.list(r.string()).optional()});var Fp=r.object({link:r.string().optional(),fileName:r.property("file_name",r.string()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string())});var Op=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fp).optional(),sortableBy:r.list(r.string()).optional()});var Wp=r.enum_(["trace","span"]);var Bp=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var ba=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Wp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string().optional()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string().optional()),uploadId:r.property("upload_id",r.string()),uploadedFileParts:r.property("uploaded_file_parts",r.list(Bp))});var Lp=r.enum_(["trace","span"]);var Xx=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",Lp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var Vp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var Hp=r.record(r.string(),r.unknown());var Jp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Xp=r.object({url:r.string()});var Kp=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});var Gp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Pe=r.object({field:r.string().optional(),operator:Gp.optional(),key:r.string().optional(),value:r.string().optional()});var Ye=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",P.optional())});var $p=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Qp=r.object({url:r.string(),detail:r.string().optional()});var Yp=r.object({url:r.string()});var Zp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Qp.optional()),videoUrl:r.property("video_url",Yp.optional()),audioUrl:r.property("audio_url",Xp.optional())});var Ze=r.object({role:$p,content:r.string().optional(),contentArray:r.property("content_array",r.list(Zp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var qp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var qe=r.object({name:r.string(),type:qp,description:r.string()});var pt=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var ec=r.object({filters:r.list(Pe).optional(),code:pt.optional()});var ct=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var rc=r.object({filters:r.list(Pe).optional(),code:ct.optional()});var lt=r.object({model:Ye,messages:r.list(Ze),schema:r.list(qe)});var oc=r.object({filters:r.list(Re).optional(),code:lt.optional()});var mt=r.object({metric:r.string()});var tc=r.object({filters:r.list(Re).optional(),code:mt.optional()});var ic=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ce=r.object({field:r.string().optional(),operator:ic.optional(),key:r.string().optional(),value:r.string().optional()});var dt=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var ac=r.object({filters:r.list(Ce).optional(),code:dt.optional()});var ut=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var nc=r.object({filters:r.list(Ce).optional(),code:ut.optional()});var yr=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(Kp).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),Kx=r.union("type",{llm_as_judge:ec.extend(yr),user_defined_metric_python:rc.extend(yr),trace_thread_llm_as_judge:oc.extend(yr),trace_thread_user_defined_metric_python:tc.extend(yr),span_llm_as_judge:ac.extend(yr),span_user_defined_metric_python:nc.extend(yr)}).transform({transform:a=>a,untransform:a=>a});var sc=r.object({url:r.string()});var pc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var gt=r.object({field:r.string().optional(),operator:pc.optional(),key:r.string().optional(),value:r.string().optional()});var er=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",le.optional())});var cc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var lc=r.object({url:r.string(),detail:r.string().optional()});var mc=r.object({url:r.string()});var dc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",lc.optional()),videoUrl:r.property("video_url",mc.optional()),audioUrl:r.property("audio_url",sc.optional())});var rr=r.object({role:cc,content:r.string().optional(),contentArray:r.property("content_array",r.list(dc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var uc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var or=r.object({name:r.string(),type:uc,description:r.string()});var gc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var fc=r.object({filters:r.list(gt).optional(),code:gc.optional()});var hc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ft=r.object({field:r.string().optional(),operator:hc.optional(),key:r.string().optional(),value:r.string().optional()});var wc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var bc=r.object({filters:r.list(ft).optional(),code:wc.optional()});var xc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Rc=r.object({filters:r.list(ft).optional(),code:xc.optional()});var yc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ht=r.object({field:r.string().optional(),operator:yc.optional(),key:r.string().optional(),value:r.string().optional()});var kc=r.object({model:er,messages:r.list(rr),schema:r.list(or)});var zc=r.object({filters:r.list(ht).optional(),code:kc.optional()});var vc=r.object({metric:r.string()});var Sc=r.object({filters:r.list(ht).optional(),code:vc.optional()});var _c=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Ac=r.object({filters:r.list(gt).optional(),code:_c.optional()});var kr=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),action:r.stringLiteral("evaluator")}),Tc=r.union("type",{llm_as_judge:fc.extend(kr),user_defined_metric_python:Ac.extend(kr),trace_thread_llm_as_judge:zc.extend(kr),trace_thread_user_defined_metric_python:Sc.extend(kr),span_llm_as_judge:bc.extend(kr),span_user_defined_metric_python:Rc.extend(kr)}).transform({transform:a=>a,untransform:a=>a});var Ec=r.object({url:r.string()});var tr=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",re.optional())});var Pc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Cc=r.object({url:r.string(),detail:r.string().optional()});var jc=r.object({url:r.string()});var Ic=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Cc.optional()),videoUrl:r.property("video_url",jc.optional()),audioUrl:r.property("audio_url",Ec.optional())});var ir=r.object({role:Pc,content:r.string().optional(),contentArray:r.property("content_array",r.list(Ic).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Uc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var ar=r.object({name:r.string(),type:Uc,description:r.string()});var Dc=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var wt=r.object({filters:r.list(Ae).optional(),code:Dc.optional()});var bt=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});var Mc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var xt=r.object({filters:r.list(Ae).optional(),code:Mc.optional()});var Nc=r.object({model:tr,messages:r.list(ir),schema:r.list(ar)});var Rt=r.object({filters:r.list(Ke).optional(),code:Nc.optional()});var Fc=r.object({metric:r.string()});var yt=r.object({filters:r.list(Ke).optional(),code:Fc.optional()});var Oc=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var kt=r.object({filters:r.list(Ge).optional(),code:Oc.optional()});var Wc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var zt=r.object({filters:r.list(Ge).optional(),code:Wc.optional()});var zr=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(bt).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),Bc=r.union("type",{llm_as_judge:wt.extend(zr),user_defined_metric_python:xt.extend(zr),trace_thread_llm_as_judge:Rt.extend(zr),trace_thread_user_defined_metric_python:yt.extend(zr),span_llm_as_judge:kt.extend(zr),span_user_defined_metric_python:zt.extend(zr)}).transform({transform:a=>a,untransform:a=>a});var Lc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Bc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var vr=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(bt).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),Vc=r.union("type",{llm_as_judge:wt.extend(vr),user_defined_metric_python:xt.extend(vr),trace_thread_llm_as_judge:Rt.extend(vr),trace_thread_user_defined_metric_python:yt.extend(vr),span_llm_as_judge:kt.extend(vr),span_user_defined_metric_python:zt.extend(vr)}).transform({transform:a=>a,untransform:a=>a});var Hc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var Jc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:Hc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var Xc=r.object({content:r.list(Jc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Kc=r.object({filters:r.list(Pe).optional(),code:pt.optional()});var Gc=r.object({filters:r.list(Pe).optional(),code:ct.optional()});var $c=r.object({filters:r.list(Re).optional(),code:lt.optional()});var Qc=r.object({filters:r.list(Re).optional(),code:mt.optional()});var Yc=r.object({filters:r.list(Ce).optional(),code:dt.optional()});var Zc=r.object({filters:r.list(Ce).optional(),code:ut.optional()});var Sr=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:r.stringLiteral("evaluator")}),qc=r.union("type",{llm_as_judge:Kc.extend(Sr),user_defined_metric_python:Gc.extend(Sr),trace_thread_llm_as_judge:$c.extend(Sr),trace_thread_user_defined_metric_python:Qc.extend(Sr),span_llm_as_judge:Yc.extend(Sr),span_user_defined_metric_python:Zc.extend(Sr)}).transform({transform:a=>a,untransform:a=>a});var el=r.enum_(["system","user","assistant","tool","function"]);var vt=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:Ee.optional()});var rl=r.object({role:el.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(vt).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Ee.optional())});var ol=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),toolCalls:r.property("tool_calls",r.list(vt).optional()),functionCall:r.property("function_call",Ee.optional())});var tl=r.object({index:r.number().optional(),message:rl.optional(),delta:ol.optional(),finishReason:r.property("finish_reason",r.string().optional())});var il=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var al=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var nl=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",il.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",al.optional())});var sl=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(tl).optional(),usage:nl.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var nr=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),name:r.string(),slug:r.string().optional(),description:r.string().optional(),config:re,createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var pl=r.object({content:r.list(nr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var cl=r.enum_(["private","public"]);var ll=r.enum_(["unknown","processing","completed","failed"]);var ml=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var Gx=r.object({id:r.string().optional(),name:r.string(),visibility:cl.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:ll.optional(),latestVersion:r.property("latest_version",ml.optional())});var dl=r.enum_(["manual","trace","span","sdk"]);var St=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:dl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(lo).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var $x=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(St)});var ul=r.object({generatedSamples:r.property("generated_samples",r.list(St).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var Qx=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var gl=r.enum_(["string","number","object","boolean","array","null"]);var fl=r.object({name:r.string().optional(),types:r.list(gl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var hl=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var wl=r.enum_(["manual","trace","span","sdk"]);var xa=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var bl=r.enum_(["ui","sdk","online_scoring"]);var xl=r.enum_(["ui","sdk","online_scoring"]);var Rl=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:xl.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var yl=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:bl,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Rl).optional())});var kl=r.enum_(["default","hidden"]);var zl=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:xa.optional(),output:xa.optional(),feedbackScores:r.property("feedback_scores",r.list(yl).optional()),comments:r.list(hl).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",kl.optional())});var vl=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:wl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(zl).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Sl=r.object({content:r.list(vl).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(fl).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var _l=r.enum_(["private","public"]);var Al=r.enum_(["unknown","processing","completed","failed"]);var Tl=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var _r=r.object({id:r.string().optional(),name:r.string(),visibility:_l.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Al.optional(),latestVersion:r.property("latest_version",Tl.optional())});var El=r.object({content:r.list(_r).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var Pl=r.object({value:r.number().optional()});var Cl=r.object({value:r.number().optional()});var _t=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var jl=r.object({value:_t.optional()});var Il=r.object({name:r.string().optional()}),Ul=r.union("type",{PERCENTAGE:jl.extend(Il),COUNT:Cl.extend(Il),AVG:Pl.extend(Il)}).transform({transform:a=>a,untransform:a=>a});var Ne=r.object({stats:r.list(Ul).optional()});var Dl=r.enum_(["manual","trace","span","sdk"]);var Ml=r.enum_(["default","hidden"]);var At=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Ml.optional())});var Tt=r.object({id:r.string().optional(),draftItemId:r.property("draft_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Dl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(At).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Nl=r.enum_(["string","number","object","boolean","array","null"]);var Fl=r.object({name:r.string().optional(),types:r.list(Nl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Ol=r.object({content:r.list(Tt).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Fl).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var Wl=r.enum_(["string","number","object","boolean","array","null"]);var Bl=r.object({name:r.string().optional(),types:r.list(Wl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Ll=r.object({columns:r.list(Bl).optional()});var Vl=r.object({typeName:r.string().optional()});var Yx=r.object({type:Vl.optional(),closed:r.boolean().optional()});var Hl=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});var Jl=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:Hl.optional()});var Ar=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),isLatest:r.property("is_latest",r.boolean().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Xl=r.object({content:r.list(Ar).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Kl=r.enum_(["regular","trial","mini-batch"]);var Gl=r.enum_(["running","completed","cancelled"]);var je=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Ra=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var Zx=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:M.optional(),type:Kl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:je.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:Gl.optional(),experimentScores:r.property("experiment_scores",r.list(ho).optional()),promptVersion:r.property("prompt_version",Ra.optional()),promptVersions:r.property("prompt_versions",r.list(Ra).optional())});var Tr=r.object({ids:r.list(r.string())});var $l=r.enum_(["TOPIC","PII"]);var Ql=r.enum_(["passed","failed"]);var Yl=r.object({name:$l.optional(),result:Ql.optional()});var Zl=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Yl).optional()});var ql=r.enum_(["default","hidden"]);var Et=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Te.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(Zl).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",ql.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var em=r.enum_(["general","tool","llm","guardrail"]);var Pt=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:em.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Te.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var rm=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",M.optional()),trace:Et.optional(),spans:r.list(Pt).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var qx=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(rm)});var sr=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var me=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var om=r.enum_(["regular","trial","mini-batch"]);var tm=r.enum_(["running","completed","cancelled"]);var im=r.object({name:r.string(),value:r.number()});var ya=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var Ct=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),name:r.string().optional(),metadata:me.optional(),type:om.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),comments:r.list(sr).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:_t.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:tm.optional(),experimentScores:r.property("experiment_scores",r.list(im).optional()),promptVersion:r.property("prompt_version",ya.optional()),promptVersions:r.property("prompt_versions",r.list(ya).optional())});var am=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ct).optional(),sortableBy:r.list(r.string()).optional()});var nm=r.object({label:r.string().optional()});var sm=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var pm=r.object({groupsDetails:r.property("groups_details",r.list(sm).optional())});var cm=r.object({content:r.record(r.string(),nm).optional(),details:pm.optional()});var lm=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:je.optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),experimentScores:r.property("experiment_scores",r.list(ne).optional())});var mm=r.object({label:r.string().optional(),aggregations:lm.optional()});var dm=r.object({content:r.record(r.string(),mm).optional()});var eR=r.object({ids:r.list(r.string())});var um=r.object({typeName:r.string().optional()});var rR=r.object({type:um.optional(),closed:r.boolean().optional()});var gm=r.object({trueLabel:r.string(),falseLabel:r.string()});var fm=r.object({details:gm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var hm=r.object({categories:r.record(r.string(),r.number())});var wm=r.object({details:hm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var bm=r.object({max:r.number(),min:r.number()});var xm=r.object({details:bm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Rm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),oR=r.union("type",{numerical:xm.extend(Rm),categorical:wm.extend(Rm),boolean:fm.extend(Rm)}).transform({transform:a=>a,untransform:a=>a});var ym=r.object({trueLabel:r.string(),falseLabel:r.string()});var km=r.object({details:ym.optional()});var zm=r.object({categories:r.record(r.string(),r.number())});var vm=r.object({details:zm.optional()});var Sm=r.object({max:r.number(),min:r.number()});var _m=r.object({details:Sm.optional()});var Am=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Tm=r.union("type",{numerical:_m.extend(Am),categorical:vm.extend(Am),boolean:km.extend(Am)}).transform({transform:a=>a,untransform:a=>a});var Em=r.object({trueLabel:r.string(),falseLabel:r.string()});var jt=r.object({details:Em.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Pm=r.object({categories:r.record(r.string(),r.number())});var It=r.object({details:Pm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Cm=r.object({max:r.number(),min:r.number()});var Ut=r.object({details:Cm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var jm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Im=r.union("type",{numerical:Ut.extend(jm),categorical:It.extend(jm),boolean:jt.extend(jm)}).transform({transform:a=>a,untransform:a=>a});var Um=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Im).optional()});var Dm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Mm=r.union("type",{numerical:Ut.extend(Dm),categorical:It.extend(Dm),boolean:jt.extend(Dm)}).transform({transform:a=>a,untransform:a=>a});var Nm=r.object({trueLabel:r.string(),falseLabel:r.string()});var Fm=r.object({details:Nm.optional()});var Om=r.object({categories:r.record(r.string(),r.number())});var Wm=r.object({details:Om.optional()});var Bm=r.object({max:r.number(),min:r.number()});var Lm=r.object({details:Bm.optional()});var Vm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Hm=r.union("type",{numerical:Lm.extend(Vm),categorical:Wm.extend(Vm),boolean:Fm.extend(Vm)}).transform({transform:a=>a,untransform:a=>a});var Jm=r.enum_(["TOPIC","PII"]);var Xm=r.enum_(["passed","failed"]);var Km=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Jm,result:Xm,config:P,details:P});var tR=r.object({guardrails:r.list(Km)});var Gm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-free"]);var Dt=r.object({id:r.string().optional(),provider:Gm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});var $m=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Dt).optional(),sortableBy:r.list(r.string()).optional()});var Qm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-free"]);var iR=r.object({id:r.string().optional(),provider:Qm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});var Mt=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var Ym=r.enum_(["trace","thread","span"]);var Nt=r.object({projectId:r.property("project_id",r.string()),entityIds:r.property("entity_ids",r.list(r.string())),ruleIds:r.property("rule_ids",r.list(r.string())),entityType:r.property("entity_type",Ym)});var aR=P;var Zm=r.enum_(["running","completed","cancelled","initialized","error"]);var qm=r.object({role:r.string(),content:r.string()});var ed=r.object({messages:r.list(qm)});var rd=r.object({model:r.string(),parameters:P.optional()});var od=r.object({type:r.string(),parameters:P.optional()});var td=r.object({metrics:r.list(od)});var id=r.object({type:r.string(),parameters:P.optional()});var ad=r.object({datasetName:r.property("dataset_name",r.string()),prompt:ed,llmModel:r.property("llm_model",rd),evaluation:td,optimizer:id});var nR=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:Zm,metadata:M.optional(),studioConfig:r.property("studio_config",ad.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var nd=r.object({role:r.string(),content:r.string()});var sd=r.object({messages:r.list(nd)});var pd=r.object({model:r.string(),parameters:le.optional()});var cd=r.object({type:r.string(),parameters:le.optional()});var ld=r.object({metrics:r.list(cd)});var md=r.object({type:r.string(),parameters:le.optional()});var dd=r.object({datasetName:r.property("dataset_name",r.string()),prompt:sd,llmModel:r.property("llm_model",pd),evaluation:ld,optimizer:md});var ud=r.enum_(["running","completed","cancelled","initialized","error"]);var ka=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:ud,metadata:ce.optional(),studioConfig:r.property("studio_config",dd.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var gd=r.enum_(["running","completed","cancelled","initialized","error"]);var fd=r.object({role:r.string(),content:r.string()});var hd=r.object({messages:r.list(fd)});var wd=r.object({model:r.string(),parameters:re.optional()});var bd=r.object({type:r.string(),parameters:re.optional()});var xd=r.object({metrics:r.list(bd)});var Rd=r.object({type:r.string(),parameters:re.optional()});var yd=r.object({datasetName:r.property("dataset_name",r.string()),prompt:hd,llmModel:r.property("llm_model",wd),evaluation:xd,optimizer:Rd});var Er=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:gd,metadata:me.optional(),studioConfig:r.property("studio_config",yd.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var za=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Er).optional(),sortableBy:r.list(r.string()).optional()});var kd=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});var Ft=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var zd=r.enum_(["private","public"]);var sR=r.object({id:r.string().optional(),name:r.string(),visibility:zd.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:je.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Ft.optional())});var vd=r.enum_(["private","public"]);var Ot=r.object({id:r.string().optional(),name:r.string(),visibility:vd.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional())});var Sd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ot).optional(),sortableBy:r.list(r.string()).optional()});var _d=r.object({name:r.string().optional(),type:r.string().optional()});var Ad=r.object({scores:r.list(_d).optional()});var Td=r.object({time:r.date(),value:r.number().optional()});var Ed=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Pd=r.enum_(["HOURLY","DAILY","WEEKLY"]);var Cd=r.object({name:r.string().optional(),data:r.list(Td).optional()});var jd=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",Ed.optional()),interval:Pd.optional(),results:r.list(Cd).optional()});var Id=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:je.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Ft.optional())});var Ud=r.object({content:r.list(Id).optional()});var Dd=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var Md=r.object({name:r.string(),value:r.number()});var Nd=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Fd=r.enum_(["private","public"]);var Od=r.object({id:r.string().optional(),name:r.string(),visibility:Fd.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Md).optional()),duration:Nd.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Dd.optional())});var pR=r.object({errors:r.list(r.string()).optional()});var Wd=r.enum_(["mustache","jinja2"]);var Bd=r.enum_(["text","chat"]);var Ld=r.enum_(["mustache","jinja2"]);var Vd=r.enum_(["text","chat"]);var Hd=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:P.optional(),type:Ld.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Vd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var cR=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:P.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Wd.optional(),templateStructure:r.property("template_structure",Bd.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Hd.optional())});var lR=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Jd=r.enum_(["text","chat"]);var Xd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Jd.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Se.optional())});var Kd=r.enum_(["mustache","jinja2"]);var Gd=r.enum_(["text","chat"]);var $d=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:re.optional(),type:Kd.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Gd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Qd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list($d).optional(),sortableBy:r.list(r.string()).optional()});var Yd=r.enum_(["text","chat"]);var Zd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Yd.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});var qd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Zd).optional(),sortableBy:r.list(r.string()).optional()});var eu=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),dashboardsEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),collaboratorsTabEnabled:r.boolean()});var mR=r.object({spans:r.list(Pt)});var Wt=r.object({name:r.string(),author:r.string().optional()});var Bt=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var ru=r.enum_(["ui","sdk","online_scoring"]);var ou=r.enum_(["ui","sdk","online_scoring"]);var tu=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ou.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var Pr=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ru,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),tu).optional())});var iu=r.enum_(["general","tool","llm","guardrail"]);var Lt=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:iu.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Bt.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pr).optional()),comments:r.list(sr).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var au=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Lt).optional(),sortableBy:r.list(r.string()).optional()});var nu=r.enum_(["ui","sdk","online_scoring"]);var su=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:nu,author:r.string().optional(),id:r.string()});var Vt=r.object({scores:r.list(su)});var dR=r.object({traces:r.list(Et)});var uR=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var pu=r.enum_(["TOPIC","PII"]);var cu=r.enum_(["passed","failed"]);var lu=r.object({name:pu.optional(),result:cu.optional()});var mu=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(lu).optional()});var du=r.enum_(["default","hidden"]);var Ht=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Bt.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pr).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Pr).optional()),comments:r.list(sr).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(mu).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",du.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var uu=r.enum_(["active","inactive"]);var Jt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),threadModelId:r.property("thread_model_id",r.string().optional()),startTime:r.property("start_time",r.date().optional()),endTime:r.property("end_time",r.date().optional()),duration:r.number().optional(),firstMessage:r.property("first_message",M.optional()),lastMessage:r.property("last_message",M.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:uu.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(H).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});var va=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string()),truncate:r.boolean().optional()});var gu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Jt).optional(),sortableBy:r.list(r.string()).optional()});var fu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ht).optional(),sortableBy:r.list(r.string()).optional()});var hu=r.object({completed:r.boolean().optional()});var pr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});var Cr=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var gR=r.object({time:r.date(),value:r.number().optional()});var Sa=r.object({results:r.list(pr).optional()});var fR=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Xt=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var wu=r.object({results:r.list(pr).optional()});var _a=class{constructor(t={}){this._options=t;}getDatasetBiInfo(t){return w.fromPromise(this.__getDatasetBiInfo(t))}async __getDatasetBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(t){return w.fromPromise(this.__getExperimentBiInfo(t))}async __getExperimentBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(t){return w.fromPromise(this.__getSpansBiInfo(t))}async __getSpansBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(t){return w.fromPromise(this.__getSpansCountForWorkspaces(t))}async __getSpansCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:sp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(t){return w.fromPromise(this.__getTracesBiInfo(t))}async __getTracesBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(t){return w.fromPromise(this.__getTracesCountForWorkspaces(t))}async __getTracesCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:cp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/workspace-trace-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Aa=class{constructor(t={}){this._options=t;}findAlerts(t={},e){return w.fromPromise(this.__findAlerts(t,e))}async __findAlerts(t={},e){var g,f;let{page:o,size:i,sorting:n,filters:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.sorting=n),c!=null&&(d.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/alerts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Tp.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(t,e){return w.fromPromise(this.__createAlert(t,e))}async __createAlert(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:at.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(t,e){return w.fromPromise(this.__deleteAlertBatch(t,e))}async __deleteAlertBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(t,e){return w.fromPromise(this.__getAlertById(t,e))}async __getAlertById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(t,e,o){return w.fromPromise(this.__updateAlert(t,e,o))}async __updateAlert(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:at.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getWebhookExamples(t={},e){return w.fromPromise(this.__getWebhookExamples(t,e))}async __getWebhookExamples(t={},e){var c,d;let{alertType:o}=t,i={};o!=null&&(i.alert_type=Ti.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Ep.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(t,e){return w.fromPromise(this.__testWebhook(t,e))}async __testWebhook(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:at.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Cp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/webhooks/tests.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ta=class{constructor(t={}){this._options=t;}addItemsToAnnotationQueue(t,e,o){return w.fromPromise(this.__addItemsToAnnotationQueue(t,e,o))}async __addItemsToAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/add`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findAnnotationQueues(t={},e){return w.fromPromise(this.__findAnnotationQueues(t,e))}async __findAnnotationQueues(t={},e){var f,y;let{page:o,size:i,name:n,filters:c,sorting:d}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),d!=null&&(u.sorting=d);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/annotation-queues"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Np.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(t,e){return w.fromPromise(this.__createAnnotationQueue(t,e))}async __createAnnotationQueue(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(t,e){return w.fromPromise(this.__createAnnotationQueueBatch(t,e))}async __createAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Yo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(t,e){return w.fromPromise(this.__deleteAnnotationQueueBatch(t,e))}async __deleteAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(t,e){return w.fromPromise(this.__getAnnotationQueueById(t,e))}async __getAnnotationQueueById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:st.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(t,e={},o){return w.fromPromise(this.__updateAnnotationQueue(t,e,o))}async __updateAnnotationQueue(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Zo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}removeItemsFromAnnotationQueue(t,e,o){return w.fromPromise(this.__removeItemsFromAnnotationQueue(t,e,o))}async __removeItemsFromAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:wa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ea=class{constructor(t={}){this._options=t;}attachmentList(t,e){return w.fromPromise(this.__attachmentList(t,e))}async __attachmentList(t,e){var y,z;let{page:o,size:i,projectId:n,entityType:c,entityId:d,path:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),g.project_id=n,g.entity_type=Pi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=d,g.path=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/list"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:Op.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}completeMultiPartUpload(t,e){return w.fromPromise(this.__completeMultiPartUpload(t,e))}async __completeMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ba.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(t,e){return w.fromPromise(this.__deleteAttachments(t,e))}async __deleteAttachments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ba.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(t,e){return w.fromPromise(this.__downloadAttachment(t,e))}async __downloadAttachment(t,e){var y,z;let{workspaceName:o,containerId:i,entityType:n,entityId:c,fileName:d,mimeType:u}=t,g={};o!=null&&(g.workspace_name=o),g.container_id=i,g.entity_type=Ci.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=d,g.mime_type=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/download"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:f.body,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}startMultiPartUpload(t,e){return w.fromPromise(this.__startMultiPartUpload(t,e))}async __startMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-start"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Vp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(t,e){return w.fromPromise(this.__uploadAttachment(t,e))}async __uploadAttachment(t,e){var y,z;let{fileName:o,projectName:i,mimeType:n,entityType:c,entityId:d,body:u}=t,g={};g.file_name=o,i!=null&&(g.project_name=i),n!=null&&(g.mime_type=n),g.entity_type=Ii.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=d;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/upload"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",body:wr.uploadAttachment.Request.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/attachment/upload.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Pa=class{constructor(t={}){this._options=t;}access(t,e){return w.fromPromise(this.__access(t,e))}async __access(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/auth"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Hp.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(t){return w.fromPromise(this.__getWorkspaceName(t))}async __getWorkspaceName(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/auth/workspace"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Jp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 401:throw new $(e.error.body,e.rawResponse);case 403:throw new Z(ae.parseOrThrow(e.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/auth/workspace.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ca=class{constructor(t={}){this._options=t;}findEvaluators(t={},e){return w.fromPromise(this.__findEvaluators(t,e))}async __findEvaluators(t={},e){var z,v;let{projectId:o,id:i,name:n,filters:c,sorting:d,page:u,size:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.id=i),n!=null&&(f.name=n),c!=null&&(f.filters=c),d!=null&&(f.sorting=d),u!=null&&(f.page=u.toString()),g!=null&&(f.size=g.toString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/automations/evaluators"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:f,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:Lc.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(t,e){return w.fromPromise(this.__createAutomationRuleEvaluator(t,e))}async __createAutomationRuleEvaluator(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/automations/evaluators"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(t,e){return w.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(t,e))}async __deleteAutomationRuleEvaluatorBatch(t,e){var d,u;let{projectId:o,body:i}=t,n={};o!=null&&(n.project_id=o);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",body:B.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(t,e={},o){return w.fromPromise(this.__getEvaluatorById(t,e,o))}async __getEvaluatorById(t,e={},o){var d,u;let{projectId:i}=e,n={};i!=null&&(n.project_id=i);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Vc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(t,e,o){return w.fromPromise(this.__updateAutomationRuleEvaluator(t,e,o))}async __updateAutomationRuleEvaluator(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:qc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getEvaluatorLogsById(t,e={},o){return w.fromPromise(this.__getEvaluatorLogsById(t,e,o))}async __getEvaluatorLogsById(t,e={},o){var d,u;let{size:i}=e,n={};i!=null&&(n.size=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Xc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}/logs.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ja=class{constructor(t={}){this._options=t;}createChatCompletions(t={},e){return w.fromPromise(this.__createChatCompletions(t,e))}async __createChatCompletions(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/chat/completions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:et.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:sl.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/chat/completions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ia=class{constructor(t={}){this._options=t;}findDashboards(t={},e){return w.fromPromise(this.__findDashboards(t,e))}async __findDashboards(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:pl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createDashboard(t,e){return w.fromPromise(this.__createDashboard(t,e))}async __createDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:rt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(t,e){return w.fromPromise(this.__getDashboardById(t,e))}async __getDashboardById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(t,e){return w.fromPromise(this.__deleteDashboard(t,e))}async __deleteDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(t,e={},o){return w.fromPromise(this.__updateDashboard(t,e,o))}async __updateDashboard(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ot.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:nr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDashboardsBatch(t,e){return w.fromPromise(this.__deleteDashboardsBatch(t,e))}async __deleteDashboardsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/dashboards/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ua=class{constructor(t={}){this._options=t;}batchUpdateDatasetItems(t,e){return w.fromPromise(this.__batchUpdateDatasetItems(t,e))}async __batchUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Kr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(t={},e){return w.fromPromise(this.__findDatasets(t,e))}async __findDatasets(t={},e){var v,S;let{page:o,size:i,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:d,name:u,sorting:g,filters:f}=t,y={};o!=null&&(y.page=o.toString()),i!=null&&(y.size=i.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),d!=null&&(y.prompt_id=d),u!=null&&(y.name=u),g!=null&&(y.sorting=g),f!=null&&(y.filters=f);let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,"v1/private/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(z.ok)return {data:El.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}createDataset(t,e){return w.fromPromise(this.__createDataset(t,e))}async __createDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Gr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(t,e){return w.fromPromise(this.__createOrUpdateDatasetItems(t,e))}async __createOrUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(t,e){return w.fromPromise(this.__createDatasetItemsFromCsv(t,e))}async __createDatasetItemsFromCsv(t,e){var c,d;let o=await ff();o.append("file",Ue(t.file)),o.append("dataset_id",t.datasetId);let i=await o.getRequest(),n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i.headers,...e==null?void 0:e.headers},requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/from-csv.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}createDatasetItemsFromSpans(t,e,o){return w.fromPromise(this.__createDatasetItemsFromSpans(t,e,o))}async __createDatasetItemsFromSpans(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-spans`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createDatasetItemsFromTraces(t,e,o){return w.fromPromise(this.__createDatasetItemsFromTraces(t,e,o))}async __createDatasetItemsFromTraces(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-traces`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Zr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetById(t,e){return w.fromPromise(this.__getDatasetById(t,e))}async __getDatasetById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:_r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(t,e,o){return w.fromPromise(this.__updateDataset(t,e,o))}async __updateDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDataset(t,e){return w.fromPromise(this.__deleteDataset(t,e))}async __deleteDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(t,e){return w.fromPromise(this.__deleteDatasetByName(t,e))}async __deleteDatasetByName(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:eo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(t={},e){return w.fromPromise(this.__deleteDatasetItems(t,e))}async __deleteDatasetItems(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ro.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(t,e){return w.fromPromise(this.__deleteDatasetsBatch(t,e))}async __deleteDatasetsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(t,e,o){return w.fromPromise(this.__expandDataset(t,e,o))}async __expandDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/expansions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:oo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:ul.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findDatasetItemsWithExperimentItems(t,e,o){return w.fromPromise(this.__findDatasetItemsWithExperimentItems(t,e,o))}async __findDatasetItemsWithExperimentItems(t,e,o){var v,S;let{page:i,size:n,experimentIds:c,filters:d,sorting:u,search:g,truncate:f}=e,y={};i!=null&&(y.page=i.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,d!=null&&(y.filters=d),u!=null&&(y.sorting=u),g!=null&&(y.search=g),f!=null&&(y.truncate=f.toString());let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(z.ok)return {data:Sl.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}getDatasetByIdentifier(t,e){return w.fromPromise(this.__getDatasetByIdentifier(t,e))}async __getDatasetByIdentifier(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:to.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:_r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(t,e,o){return w.fromPromise(this.__getDatasetExperimentItemsStats(t,e,o))}async __getDatasetExperimentItemsStats(t,e,o){var u,g;let{experimentIds:i,filters:n}=e,c={};c.experiment_ids=i,n!=null&&(c.filters=n);let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/stats`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(d.ok)return {data:Ne.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/stats.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}getDatasetItemById(t,e){return w.fromPromise(this.__getDatasetItemById(t,e))}async __getDatasetItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Tt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(t,e,o){return w.fromPromise(this.__patchDatasetItem(t,e,o))}async __patchDatasetItem(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetItems(t,e={},o){return w.fromPromise(this.__getDatasetItems(t,e,o))}async __getDatasetItems(t,e={},o){var y,z;let{page:i,size:n,version:c,filters:d,truncate:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.version=c),d!=null&&(g.filters=d),u!=null&&(g.truncate=u.toString());let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(f.ok)return {data:Ol.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getDatasetItemsOutputColumns(t,e={},o){return w.fromPromise(this.__getDatasetItemsOutputColumns(t,e,o))}async __getDatasetItemsOutputColumns(t,e={},o){var d,u;let{experimentIds:i}=e,n={};i!=null&&(n.experiment_ids=i);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/output/columns`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Ll.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}streamDatasetItems(t,e){return w.fromPromise(this.__streamDatasetItems(t,e))}async __streamDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:io.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}compareDatasetVersions(t,e){return w.fromPromise(this.__compareDatasetVersions(t,e))}async __compareDatasetVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/diff`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Jl.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions/diff.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(t,e,o,i){return w.fromPromise(this.__createVersionTag(t,e,o,i))}async __createVersionTag(t,e,o,i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:ao.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/hash/{versionHash}/tags.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}listDatasetVersions(t,e={},o){return w.fromPromise(this.__listDatasetVersions(t,e,o))}async __listDatasetVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(d.ok)return {data:Xl.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}createDatasetVersion(t,e={},o){return w.fromPromise(this.__createDatasetVersion(t,e,o))}async __createDatasetVersion(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:no.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteVersionTag(t,e,o,i){return w.fromPromise(this.__deleteVersionTag(t,e,o,i))}async __deleteVersionTag(t,e,o,i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(t)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}restoreDatasetVersion(t,e,o){return w.fromPromise(this.__restoreDatasetVersion(t,e,o))}async __restoreDatasetVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:so.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Ar.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateDatasetVersion(t,e,o={},i){return w.fromPromise(this.__updateDatasetVersion(t,e,o,i))}async __updateDatasetVersion(t,e,o={},i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:po.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:Ar.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/{id}/versions/hash/{versionHash}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Da=class{constructor(t={}){this._options=t;}findExperiments(t={},e){return w.fromPromise(this.__findExperiments(t,e))}async __findExperiments(t={},e){var O,F;let{page:o,size:i,datasetId:n,optimizationId:c,types:d,name:u,datasetDeleted:g,promptId:f,sorting:y,filters:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.datasetId=n),c!=null&&(v.optimization_id=c),d!=null&&(v.types=d),u!=null&&(v.name=u),g!=null&&(v.dataset_deleted=g.toString()),f!=null&&(v.prompt_id=f),y!=null&&(v.sorting=y),z!=null&&(v.filters=z);let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:am.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")switch(S.error.statusCode){case 400:throw new _(S.error.body,S.rawResponse);default:throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse})}switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(t,e){return w.fromPromise(this.__createExperiment(t,e))}async __createExperiment(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:co.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(t,e){return w.fromPromise(this.__createExperimentItems(t,e))}async __createExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:mo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(t,e){return w.fromPromise(this.__deleteExperimentItems(t,e))}async __deleteExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:uo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(t,e){return w.fromPromise(this.__deleteExperimentsById(t,e))}async __deleteExperimentsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(t,e){return w.fromPromise(this.__experimentItemsBulk(t,e))}async __experimentItemsBulk(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:fo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(t={},e){return w.fromPromise(this.__findFeedbackScoreNames(t,e))}async __findFeedbackScoreNames(t={},e){var c,d;let{experimentIds:o}=t,i={};o!=null&&(i.experiment_ids=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:br.findFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(t={},e){return w.fromPromise(this.__findExperimentGroups(t,e))}async __findExperimentGroups(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,d={};o!=null&&(d.groups=o),i!=null&&(d.types=i),n!=null&&(d.name=n),c!=null&&(d.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/experiments/groups"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:cm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(t={},e){return w.fromPromise(this.__findExperimentGroupsAggregations(t,e))}async __findExperimentGroupsAggregations(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,d={};o!=null&&(d.groups=o),i!=null&&(d.types=i),n!=null&&(d.name=n),c!=null&&(d.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:dm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(t,e){return w.fromPromise(this.__finishExperiments(t,e))}async __finishExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/finish"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(t,e){return w.fromPromise(this.__getExperimentById(t,e))}async __getExperimentById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ct.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(t,e={},o){return w.fromPromise(this.__updateExperiment(t,e,o))}async __updateExperiment(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:wo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getExperimentItemById(t,e){return w.fromPromise(this.__getExperimentItemById(t,e))}async __getExperimentItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:At.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(t,e){return w.fromPromise(this.__streamExperimentItems(t,e))}async __streamExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:bo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(t,e){return w.fromPromise(this.__streamExperiments(t,e))}async __streamExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ma=class{constructor(t={}){this._options=t;}findFeedbackDefinitions(t={},e){return w.fromPromise(this.__findFeedbackDefinitions(t,e))}async __findFeedbackDefinitions(t={},e){var g,f;let{page:o,size:i,name:n,type:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.type=Hi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}));let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/feedback-definitions"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Um.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(t,e){return w.fromPromise(this.__createFeedbackDefinition(t,e))}async __createFeedbackDefinition(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tm.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(t,e){return w.fromPromise(this.__getFeedbackDefinitionById(t,e))}async __getFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Mm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(t,e,o){return w.fromPromise(this.__updateFeedbackDefinition(t,e,o))}async __updateFeedbackDefinition(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Hm.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteFeedbackDefinitionById(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionById(t,e))}async __deleteFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionsBatch(t,e))}async __deleteFeedbackDefinitionsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/feedback-definitions/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Na=class{constructor(t={}){this._options=t;}createGuardrails(t,e){return w.fromPromise(this.__createGuardrails(t,e))}async __createGuardrails(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/guardrails"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/guardrails.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Fa=class{constructor(t={}){this._options=t;}deleteLlmProviderApiKeysBatch(t,e){return w.fromPromise(this.__deleteLlmProviderApiKeysBatch(t,e))}async __deleteLlmProviderApiKeysBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(t){return w.fromPromise(this.__findLlmProviderKeys(t))}async __findLlmProviderKeys(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/llm-provider-key"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:$m.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(t,e){return w.fromPromise(this.__storeLlmProviderApiKey(t,e))}async __storeLlmProviderApiKey(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ro.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(t,e){return w.fromPromise(this.__getLlmProviderApiKeyById(t,e))}async __getLlmProviderApiKeyById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Dt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(t,e={},o){return w.fromPromise(this.__updateLlmProviderApiKey(t,e,o))}async __updateLlmProviderApiKey(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:yo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new $(i.error.body,i.rawResponse);case 403:throw new Z(ae.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Oa=class{constructor(t={}){this._options=t;}evaluateSpans(t,e){return w.fromPromise(this.__evaluateSpans(t,e))}async __evaluateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Mt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/manual-evaluation/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateThreads(t,e){return w.fromPromise(this.__evaluateThreads(t,e))}async __evaluateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Mt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(t,e){return w.fromPromise(this.__evaluateTraces(t,e))}async __evaluateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Mt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/manual-evaluation/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Wa=class{constructor(t={}){this._options=t;}receiveProtobufTraces(t){return w.fromPromise(this.__receiveProtobufTraces(t))}async __receiveProtobufTraces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/otel/v1/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/otel/v1/traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ba=class{constructor(t={}){this._options=t;}cancelStudioOptimizations(t,e){return w.fromPromise(this.__cancelStudioOptimizations(t,e))}async __cancelStudioOptimizations(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/cancel`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/cancel.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findOptimizations(t={},e){return w.fromPromise(this.__findOptimizations(t,e))}async __findOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:d,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),d!=null&&(g.dataset_deleted=d.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:za.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 400:throw new _(f.error.body,f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}createOptimization(t,e){return w.fromPromise(this.__createOptimization(t,e))}async __createOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ka.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(t,e){return w.fromPromise(this.__upsertOptimization(t,e))}async __upsertOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ka.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(t,e){return w.fromPromise(this.__deleteOptimizationsById(t,e))}async __deleteOptimizationsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findStudioOptimizations(t={},e){return w.fromPromise(this.__findStudioOptimizations(t,e))}async __findStudioOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:d,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),d!=null&&(g.dataset_deleted=d.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations/studio"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:za.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 400:throw new _(f.error.body,f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getOptimizationById(t,e){return w.fromPromise(this.__getOptimizationById(t,e))}async __getOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Er.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(t,e={},o){return w.fromPromise(this.__updateOptimizationsById(t,e,o))}async __updateOptimizationsById(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ko.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getStudioOptimizationById(t,e){return w.fromPromise(this.__getStudioOptimizationById(t,e))}async __getStudioOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Er.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getStudioOptimizationLogs(t,e){return w.fromPromise(this.__getStudioOptimizationLogs(t,e))}async __getStudioOptimizationLogs(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:kd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/logs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var La=class{constructor(t={}){this._options=t;}findProjects(t={},e){return w.fromPromise(this.__findProjects(t,e))}async __findProjects(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Sd.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(t,e){return w.fromPromise(this.__createProject(t,e))}async __createProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:zo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(t,e){return w.fromPromise(this.__getProjectById(t,e))}async __getProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ot.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(t,e){return w.fromPromise(this.__deleteProjectById(t,e))}async __deleteProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(t,e={},o){return w.fromPromise(this.__updateProject(t,e,o))}async __updateProject(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:vo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteProjectsBatch(t,e){return w.fromPromise(this.__deleteProjectsBatch(t,e))}async __deleteProjectsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(t={},e){return w.fromPromise(this.__findFeedbackScoreNamesByProjectIds(t,e))}async __findFeedbackScoreNamesByProjectIds(t={},e){var c,d;let{projectIds:o}=t,i={};o!=null&&(i.project_ids=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Ad.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(t,e={},o){return w.fromPromise(this.__getProjectMetrics(t,e,o))}async __getProjectMetrics(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}/metrics`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:So.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:jd.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getProjectStats(t={},e){return w.fromPromise(this.__getProjectStats(t,e))}async __getProjectStats(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/projects/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Ud.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(t,e){return w.fromPromise(this.__retrieveProject(t,e))}async __retrieveProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Od.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Va=class{constructor(t={}){this._options=t;}getPrompts(t={},e){return w.fromPromise(this.__getPrompts(t,e))}async __getPrompts(t={},e){var f,y;let{page:o,size:i,name:n,sorting:c,filters:d}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),d!=null&&(u.filters=d);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/prompts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:qd.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(t,e){return w.fromPromise(this.__createPrompt(t,e))}async __createPrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ao.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(t,e){return w.fromPromise(this.__createPromptVersion(t,e))}async __createPromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:To.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Se.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePromptVersions(t,e){return w.fromPromise(this.__updatePromptVersions(t,e))}async __updatePromptVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Eo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(t,e){return w.fromPromise(this.__getPromptById(t,e))}async __getPromptById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Xd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(t,e,o){return w.fromPromise(this.__updatePrompt(t,e,o))}async __updatePrompt(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Po.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deletePrompt(t,e){return w.fromPromise(this.__deletePrompt(t,e))}async __deletePrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(t,e){return w.fromPromise(this.__deletePromptsBatch(t,e))}async __deletePromptsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(t,e){return w.fromPromise(this.__getPromptVersionById(t,e))}async __getPromptVersionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/versions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Se.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(t,e={},o){return w.fromPromise(this.__getPromptVersions(t,e,o))}async __getPromptVersions(t,e={},o){var y,z;let{page:i,size:n,search:c,sorting:d,filters:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.search=c),d!=null&&(g.sorting=d),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(f.ok)return {data:Qd.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts/{id}/versions.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}restorePromptVersion(t,e,o){return w.fromPromise(this.__restorePromptVersion(t,e,o))}async __restorePromptVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Se.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}retrievePromptVersion(t,e){return w.fromPromise(this.__retrievePromptVersion(t,e))}async __retrievePromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Se.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ha=class{constructor(t={}){this._options=t;}getServiceToggles(t){return w.fromPromise(this.__getServiceToggles(t))}async __getServiceToggles(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/toggles"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:eu.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/toggles.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ja=class{constructor(t={}){this._options=t;}addSpanComment(t,e,o){return w.fromPromise(this.__addSpanComment(t,e,o))}async __addSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addSpanFeedbackScore(t,e,o){return w.fromPromise(this.__addSpanFeedbackScore(t,e,o))}async __addSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createSpans(t,e){return w.fromPromise(this.__createSpans(t,e))}async __createSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Uo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(t,e){return w.fromPromise(this.__batchUpdateSpans(t,e))}async __batchUpdateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Mo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(t={},e){return w.fromPromise(this.__getSpansByProject(t,e))}async __getSpansByProject(t={},e){var te,dr;let{page:o,size:i,projectName:n,projectId:c,traceId:d,type:u,filters:g,truncate:f,stripAttachments:y,sorting:z,exclude:v,fromTime:S,toTime:O}=t,F={};o!=null&&(F.page=o.toString()),i!=null&&(F.size=i.toString()),n!=null&&(F.project_name=n),c!=null&&(F.project_id=c),d!=null&&(F.trace_id=d),u!=null&&(F.type=aa.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(F.filters=g),f!=null&&(F.truncate=f.toString()),y!=null&&(F.strip_attachments=y.toString()),z!=null&&(F.sorting=z),v!=null&&(F.exclude=v),S!=null&&(F.from_time=S.toISOString()),O!=null&&(F.to_time=O.toISOString());let G=await x({url:R((dr=(te=await s.get(this._options.baseUrl))!=null?te:await s.get(this._options.environment))!=null?dr:b.Default,"v1/private/spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:F,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(G.ok)return {data:au.parseOrThrow(G.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:G.rawResponse};if(G.error.reason==="status-code")throw new p({statusCode:G.error.statusCode,body:G.error.body,rawResponse:G.rawResponse});switch(G.error.reason){case "non-json":throw new p({statusCode:G.error.statusCode,body:G.error.rawBody,rawResponse:G.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(t,e){return w.fromPromise(this.__createSpan(t,e))}async __createSpan(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(t,e={},o){return w.fromPromise(this.__getSpanById(t,e,o))}async __getSpanById(t,e={},o){var d,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Lt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 404:throw new A(c.error.body,c.rawResponse);default:throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteSpanById(t,e){return w.fromPromise(this.__deleteSpanById(t,e))}async __deleteSpanById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(t,e,o){return w.fromPromise(this.__updateSpan(t,e,o))}async __updateSpan(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Do.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteSpanComments(t,e){return w.fromPromise(this.__deleteSpanComments(t,e))}async __deleteSpanComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(t,e,o){return w.fromPromise(this.__deleteSpanFeedbackScore(t,e,o))}async __deleteSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Wt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findFeedbackScoreNames1(t={},e){return w.fromPromise(this.__findFeedbackScoreNames1(t,e))}async __findFeedbackScoreNames1(t={},e){var d,u;let{projectId:o,type:i}=t,n={};o!=null&&(n.project_id=o),i!=null&&(n.type=na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}));let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:xr.findFeedbackScoreNames1.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(t,e,o){return w.fromPromise(this.__getSpanComment(t,e,o))}async __getSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getSpanStats(t={},e){return w.fromPromise(this.__getSpanStats(t,e))}async __getSpanStats(t={},e){var z,v;let{projectId:o,projectName:i,traceId:n,type:c,filters:d,fromTime:u,toTime:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.project_name=i),n!=null&&(f.trace_id=n),c!=null&&(f.type=sa.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),d!=null&&(f.filters=d),u!=null&&(f.from_time=u.toISOString()),g!=null&&(f.to_time=g.toISOString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/spans/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:f,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:Ne.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(t,e){return w.fromPromise(this.__scoreBatchOfSpans(t,e))}async __scoreBatchOfSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(t={},e){return w.fromPromise(this.__searchSpans(t,e))}async __searchSpans(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:No.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(t,e,o){return w.fromPromise(this.__updateSpanComment(t,e,o))}async __updateSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Xa=class{constructor(t={}){this._options=t;}addThreadComment(t,e,o){return w.fromPromise(this.__addThreadComment(t,e,o))}async __addThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceComment(t,e,o){return w.fromPromise(this.__addTraceComment(t,e,o))}async __addTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceFeedbackScore(t,e,o){return w.fromPromise(this.__addTraceFeedbackScore(t,e,o))}async __addTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createTraces(t,e){return w.fromPromise(this.__createTraces(t,e))}async __createTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Oo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(t,e){return w.fromPromise(this.__batchUpdateTraces(t,e))}async __batchUpdateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(t,e){return w.fromPromise(this.__batchUpdateThreads(t,e))}async __batchUpdateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(t={},e){return w.fromPromise(this.__closeTraceThread(t,e))}async __closeTraceThread(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/close"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ho.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(t={},e){return w.fromPromise(this.__getTracesByProject(t,e))}async __getTracesByProject(t={},e){var F,G;let{page:o,size:i,projectName:n,projectId:c,filters:d,truncate:u,stripAttachments:g,sorting:f,exclude:y,fromTime:z,toTime:v}=t,S={};o!=null&&(S.page=o.toString()),i!=null&&(S.size=i.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),d!=null&&(S.filters=d),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),f!=null&&(S.sorting=f),y!=null&&(S.exclude=y),z!=null&&(S.from_time=z.toISOString()),v!=null&&(S.to_time=v.toISOString());let O=await x({url:R((G=(F=await s.get(this._options.baseUrl))!=null?F:await s.get(this._options.environment))!=null?G:b.Default,"v1/private/traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:S,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(O.ok)return {data:fu.parseOrThrow(O.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:O.rawResponse};if(O.error.reason==="status-code")throw new p({statusCode:O.error.statusCode,body:O.error.body,rawResponse:O.rawResponse});switch(O.error.reason){case "non-json":throw new p({statusCode:O.error.statusCode,body:O.error.rawBody,rawResponse:O.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(t,e){return w.fromPromise(this.__createTrace(t,e))}async __createTrace(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Fo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(t,e={},o){return w.fromPromise(this.__getTraceById(t,e,o))}async __getTraceById(t,e={},o){var d,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Ht.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(t,e){return w.fromPromise(this.__deleteTraceById(t,e))}async __deleteTraceById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(t,e,o){return w.fromPromise(this.__updateTrace(t,e,o))}async __updateTrace(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Wo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteThreadComments(t,e){return w.fromPromise(this.__deleteThreadComments(t,e))}async __deleteThreadComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(t,e){return w.fromPromise(this.__deleteThreadFeedbackScores(t,e))}async __deleteThreadFeedbackScores(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/feedback-scores/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceComments(t,e){return w.fromPromise(this.__deleteTraceComments(t,e))}async __deleteTraceComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(t,e,o){return w.fromPromise(this.__deleteTraceFeedbackScore(t,e,o))}async __deleteTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Wt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteTraceThreads(t,e){return w.fromPromise(this.__deleteTraceThreads(t,e))}async __deleteTraceThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(t,e){return w.fromPromise(this.__deleteTraces(t,e))}async __deleteTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(t={},e){return w.fromPromise(this.__findFeedbackScoreNames2(t,e))}async __findFeedbackScoreNames2(t={},e){var c,d;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findFeedbackScoreNames2.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(t={},e){return w.fromPromise(this.__findTraceThreadsFeedbackScoreNames(t,e))}async __findTraceThreadsFeedbackScoreNames(t={},e){var c,d;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findTraceThreadsFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getTraceStats(t={},e){return w.fromPromise(this.__getTraceStats(t,e))}async __getTraceStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:d}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),d!=null&&(u.to_time=d.toISOString());let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/traces/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Ne.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(t,e,o){return w.fromPromise(this.__getThreadComment(t,e,o))}async __getThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThreadStats(t={},e){return w.fromPromise(this.__getTraceThreadStats(t,e))}async __getTraceThreadStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:d}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),d!=null&&(u.to_time=d.toISOString());let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/traces/threads/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Ne.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getTraceComment(t,e,o){return w.fromPromise(this.__getTraceComment(t,e,o))}async __getTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThread(t,e){return w.fromPromise(this.__getTraceThread(t,e))}async __getTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:va.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Jt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(t={},e){return w.fromPromise(this.__getTraceThreads(t,e))}async __getTraceThreads(t={},e){var O,F;let{page:o,size:i,projectName:n,projectId:c,truncate:d,stripAttachments:u,filters:g,sorting:f,fromTime:y,toTime:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.project_name=n),c!=null&&(v.project_id=c),d!=null&&(v.truncate=d.toString()),u!=null&&(v.strip_attachments=u.toString()),g!=null&&(v.filters=g),f!=null&&(v.sorting=f),y!=null&&(v.from_time=y.toISOString()),z!=null&&(v.to_time=z.toISOString());let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/traces/threads"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:gu.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse});switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(t,e){return w.fromPromise(this.__openTraceThread(t,e))}async __openTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/open"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:va.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(t,e){return w.fromPromise(this.__scoreBatchOfThreads(t,e))}async __scoreBatchOfThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ko.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(t,e){return w.fromPromise(this.__scoreBatchOfTraces(t,e))}async __scoreBatchOfTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(t={},e){return w.fromPromise(this.__searchTraceThreads(t,e))}async __searchTraceThreads(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Go.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(t={},e){return w.fromPromise(this.__searchTraces(t,e))}async __searchTraces(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:$o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(t,e,o){return w.fromPromise(this.__updateThread(t,e,o))}async __updateThread(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Lo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateThreadComment(t,e,o){return w.fromPromise(this.__updateThreadComment(t,e,o))}async __updateThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateTraceComment(t,e,o){return w.fromPromise(this.__updateTraceComment(t,e,o))}async __updateTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ka=class{constructor(t={}){this._options=t;}getWelcomeWizardStatus(t){return w.fromPromise(this.__getWelcomeWizardStatus(t))}async __getWelcomeWizardStatus(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/welcome-wizard"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:hu.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(t={},e){return w.fromPromise(this.__submitWelcomeWizard(t,e))}async __submitWelcomeWizard(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/welcome-wizard"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:it.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/welcome-wizard.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ga=class{constructor(t={}){this._options=t;}costsSummary(t,e){return w.fromPromise(this.__costsSummary(t,e))}async __costsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:pr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/costs/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceConfiguration(t){return w.fromPromise(this.__getWorkspaceConfiguration(t))}async __getWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Xt.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new A(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}upsertWorkspaceConfiguration(t,e){return w.fromPromise(this.__upsertWorkspaceConfiguration(t,e))}async __upsertWorkspaceConfiguration(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Xt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(t){return w.fromPromise(this.__deleteWorkspaceConfiguration(t))}async __deleteWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new A(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getCost(t,e){return w.fromPromise(this.__getCost(t,e))}async __getCost(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Sa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/costs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getMetric(t,e){return w.fromPromise(this.__getMetric(t,e))}async __getMetric(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Sa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/metrics.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}metricsSummary(t,e){return w.fromPromise(this.__metricsSummary(t,e))}async __metricsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:wu.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/metrics/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var $a=class{constructor(t={}){this._options=t;}datasetsRedirect(t,e){return w.fromPromise(this.__datasetsRedirect(t,e))}async __datasetsRedirect(t,e){var u,g;let{datasetId:o,workspaceName:i,path:n}=t,c={};c.dataset_id=o,i!=null&&(c.workspace_name=i),c.path=n;let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,"v1/session/redirect/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);case 404:throw new A(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}experimentsRedirect(t,e){return w.fromPromise(this.__experimentsRedirect(t,e))}async __experimentsRedirect(t,e){var g,f;let{datasetId:o,experimentId:i,workspaceName:n,path:c}=t,d={};d.dataset_id=o,d.experiment_id=i,n!=null&&(d.workspace_name=n),d.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/session/redirect/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new A(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(t,e){return w.fromPromise(this.__optimizationsRedirect(t,e))}async __optimizationsRedirect(t,e){var g,f;let{datasetId:o,optimizationId:i,workspaceName:n,path:c}=t,d={};d.dataset_id=o,d.optimization_id=i,n!=null&&(d.workspace_name=n),d.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/session/redirect/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:d,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new A(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(t,e){return w.fromPromise(this.__projectsRedirect(t,e))}async __projectsRedirect(t,e){var u,g;let{traceId:o,workspaceName:i,path:n}=t,c={};c.trace_id=o,i!=null&&(c.workspace_name=i),c.path=n;let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,"v1/session/redirect/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);case 404:throw new A(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/projects.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Kt=class{constructor(t={}){this._options=t;}get systemUsage(){var t;return (t=this._systemUsage)!=null?t:this._systemUsage=new _a(this._options)}get alerts(){var t;return (t=this._alerts)!=null?t:this._alerts=new Aa(this._options)}get annotationQueues(){var t;return (t=this._annotationQueues)!=null?t:this._annotationQueues=new Ta(this._options)}get attachments(){var t;return (t=this._attachments)!=null?t:this._attachments=new Ea(this._options)}get check(){var t;return (t=this._check)!=null?t:this._check=new Pa(this._options)}get automationRuleEvaluators(){var t;return (t=this._automationRuleEvaluators)!=null?t:this._automationRuleEvaluators=new Ca(this._options)}get chatCompletions(){var t;return (t=this._chatCompletions)!=null?t:this._chatCompletions=new ja(this._options)}get dashboards(){var t;return (t=this._dashboards)!=null?t:this._dashboards=new Ia(this._options)}get datasets(){var t;return (t=this._datasets)!=null?t:this._datasets=new Ua(this._options)}get experiments(){var t;return (t=this._experiments)!=null?t:this._experiments=new Da(this._options)}get feedbackDefinitions(){var t;return (t=this._feedbackDefinitions)!=null?t:this._feedbackDefinitions=new Ma(this._options)}get guardrails(){var t;return (t=this._guardrails)!=null?t:this._guardrails=new Na(this._options)}get llmProviderKey(){var t;return (t=this._llmProviderKey)!=null?t:this._llmProviderKey=new Fa(this._options)}get manualEvaluation(){var t;return (t=this._manualEvaluation)!=null?t:this._manualEvaluation=new Oa(this._options)}get openTelemetryIngestion(){var t;return (t=this._openTelemetryIngestion)!=null?t:this._openTelemetryIngestion=new Wa(this._options)}get optimizations(){var t;return (t=this._optimizations)!=null?t:this._optimizations=new Ba(this._options)}get projects(){var t;return (t=this._projects)!=null?t:this._projects=new La(this._options)}get prompts(){var t;return (t=this._prompts)!=null?t:this._prompts=new Va(this._options)}get serviceToggles(){var t;return (t=this._serviceToggles)!=null?t:this._serviceToggles=new Ha(this._options)}get spans(){var t;return (t=this._spans)!=null?t:this._spans=new Ja(this._options)}get traces(){var t;return (t=this._traces)!=null?t:this._traces=new Xa(this._options)}get welcomeWizard(){var t;return (t=this._welcomeWizard)!=null?t:this._welcomeWizard=new Ka(this._options)}get workspaces(){var t;return (t=this._workspaces)!=null?t:this._workspaces=new Ga(this._options)}get redirect(){var t;return (t=this._redirect)!=null?t:this._redirect=new $a(this._options)}isAlive(t){return w.fromPromise(this.__isAlive(t))}async __isAlive(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ping"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(t){return w.fromPromise(this.__version(t))}async __version(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ver"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ver.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var oe=()=>uuid.v7();var jr=class{static serializePromptToInfoDict(t){return {name:t.name,...t.id&&{id:t.id},version:{...t.versionId&&{id:t.versionId},...t.commit&&{commit:t.commit},template:t.prompt}}}static normalizeMetadata(t){if(!t)return {};if(typeof t=="object"&&!Array.isArray(t))return t;if(typeof t=="string")try{let e=JSON.parse(t);if(typeof e=="object"&&!Array.isArray(e))return e}catch{}return {}}static mergePromptsIntoMetadata(t,e,o){let i=o.map(d=>this.serializePromptToInfoDict(d)),n=this.normalizeMetadata(t),c=this.normalizeMetadata(e);return {...n,...c,opik_prompts:i}}static processTraceUpdate(t,e){let{prompts:o,...i}=t;if(!o||o.length===0)return i;let n=this.mergePromptsIntoMetadata(e,i.metadata,o);return {...i,metadata:n}}static processSpanUpdate(t,e){let{prompts:o,...i}=t;if(!o||o.length===0)return i;let n=this.mergePromptsIntoMetadata(e,i.metadata,o);return {...i,metadata:n}}};var Qa=class a{constructor(t,e){this.data=t;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=t=>{var i;let e=jr.processSpanUpdate(t,this.data.metadata),o={parentSpanId:this.data.parentSpanId,projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,traceId:this.data.traceId,...e};return this.opik.spanBatchQueue.update(this.data.id,o),this.data={...this.data,...t},this};this.span=t=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new a(o,this.opik);return this.childSpans.push(i),i};}};var Ya=class{constructor(t,e){this.data=t;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=t=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:t.projectName)!=null?c:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new Qa(o,this.opik);return this.spans.push(i),i};this.update=t=>{var i;let e=jr.processTraceUpdate(t,this.data.metadata),o={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...e};return this.opik.traceBatchQueue.update(this.data.id,o),this.data={...this.data,...o},this};}};var Vf={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Za={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},wR=a=>Object.entries(a).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),bR=a=>a.replace(/\/api$/,""),xR=a=>Buffer.from(a).toString("base64"),Hf=(a,t,e)=>{let o=wR(e),i=`${t}?${o}`;return new URL(i,a).toString()},Jf=({datasetId:a,experimentId:t,baseUrl:e})=>Hf(e,Vf.EXPERIMENTS,{[Za.EXPERIMENT_ID]:t,[Za.DATASET_ID]:a,[Za.PATH]:xR(e)});var Xf=({projectName:a,workspaceName:t,apiUrl:e})=>{let o=bR(e),i=`${t}/${Vf.PROJECT_BY_NAME}`;return Hf(o,i,{[Za.PROJECT_NAME]:a})};var RR=300,qa=100,Gt=class{constructor({action:t,batchSize:e=qa,delay:o,enableBatch:i,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(t,e)=>{if(this.queue.set(t,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(t,e)=>{let o=this.queue.get(t);o&&(this.queue.set(t,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let t=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${t.size} items to ${this.name} promise:`,t),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,t),this.action(t))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,t);}),await this.promise;};this.action=t,this.batchSize=e,this.delay=o,this.enableBatch=i,this.name=n;}},ge=class{constructor({delay:t=RR,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:i=true,createBatchSize:n=qa,updateBatchSize:c=qa,deleteBatchSize:d=qa,name:u="BatchQueue"}={}){this.create=t=>{let e=this.getId(t);this.createQueue.add(e,t);};this.get=async t=>{let e=this.createQueue.queue.get(t);return e||this.getEntity(t)};this.update=(t,e)=>{if(this.createQueue.queue.get(t)){this.createQueue.update(t,e);return}this.updateQueue.add(t,e);};this.delete=t=>{if(this.createQueue.queue.has(t)){this.createQueue.queue.delete(t);return}this.deleteQueue.add(t);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new Gt({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:t,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new Gt({action:async g=>{await this.createQueue.flush();let f=Array.from(g.entries());for(let[y,z]of f)await this.updateEntity(y,z);},delay:t,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new Gt({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:t,enableBatch:i,batchSize:d,name:`${u}:deleteQueue`});}};var en=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.spans.createSpans({spans:e},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.spans.updateSpan(e,o,this.api.requestOptions);}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanById(o,this.api.requestOptions);}};var rn=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var on=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.traces.createTraces({traces:e},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.traces.updateTrace(e,o,this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};var tn=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.traces.deleteTraceFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var an=class extends Kt{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var nn=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let o of e)await this.api.datasets.createDataset(o,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,o){await this.api.datasets.updateDataset(e,{name:o.name||"",visibility:o.visibility,description:o.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};var bu=null;async function Kf(){return bu||(bu=await yR__default.default()),bu}var $t=class a{constructor(t){let{id:e,traceId:o,spanId:i,source:n,...c}=t;this.id=e||oe(),this.traceId=o,this.spanId=i,this.source=n||Gn.Sdk,this.data={...c};}getContent(t=false){return t?{...this.data,id:this.id}:{...this.data}}async contentHash(){let t=this.getContent(),e=kR__default.default(t);return (await Kf()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(t){return new a({id:t.id,traceId:t.traceId,spanId:t.spanId,source:t.source,...t.data})}};async function Fe(a,t,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),i=[],n="";try{for await(let d of a){n+=o.decode(d,{stream:!0});let u=n.split(`
5
- `);n=(c=u.pop())!=null?c:"";for(let g of u)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let f=JSON.parse(g),y=t.parse(f);if(y.ok){if(i.push(y.value),e!==void 0&&i.length>=e)return i}else k.error("Error parsing experiment item:",y.errors);}catch(f){k.error("Error parsing JSON line:",f instanceof Error?f.message:String(f));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let d=JSON.parse(n),u=t.parse(d);u.ok?i.push(u.value):k.error("Error parsing experiment item:",u.errors);}catch(d){k.error("Error parsing remaining buffer:",d instanceof Error?d.message:String(d));}}catch(d){k.error("Error processing stream:",d instanceof Error?d.message:String(d));}return i}function Qt(a,t){let e=[];for(let o=0;o<a.length;o+=t.maxBatchSize)e.push(a.slice(o,o+t.maxBatchSize));return e}var de=class extends Error{constructor(t){var e;super(t.message),this.name=this.constructor.name,this.code=t.code,this.statusCode=t.statusCode,this.details=t.details,this.originalError=t.originalError,k.error(this.message),(e=Error.captureStackTrace)==null||e.call(Error,this,this.constructor);}toJSON(){return {name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,details:this.details,originalError:this.originalError,stack:this.stack}}};var Gf={DATASET_NOT_FOUND:a=>`Dataset with name '${a}' not found`,DATASET_ITEM_NOT_FOUND:a=>`Dataset item with id '${a}' not found`,DATASET_ITEM_MISSING_ID:a=>`Item at index ${a} is missing an ID required for update`,INVALID_JSON_FORMAT:a=>`Invalid JSON format${a?": "+a:""}`,JSON_NOT_ARRAY:"JSON input must be an array of objects",ITEM_NOT_OBJECT:(a,t)=>`Item at position ${a} is not an object (${t})`,INSERTION_FAILED:a=>`Failed to insert items from JSON: ${a}`,DATASET_JSON_PARSE_ERROR:a=>`Failed to parse JSON input: ${a}`};var vR={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID"},sn=class extends de{constructor(t){super({message:Gf.DATASET_ITEM_MISSING_ID(t),code:vR.DATASET_ITEM_MISSING_ID});}};var SR={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},pn=class extends de{constructor(t){super({message:t,code:SR.SEARCH_TIMEOUT});}};var cn={JSON_NOT_ARRAY:a=>`JSON input must be an array of objects${a?` (${a})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(a,t)=>`Item at position ${a} is not an object (${t})`};var xu={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},ln=class extends de{constructor(t){let e=t instanceof Error?t:new Error(String(t));super({message:cn.JSON_PARSE_ERROR,code:xu.JSON_PARSE_ERROR,originalError:e});}},mn=class extends de{constructor(t){super({message:cn.JSON_NOT_ARRAY(t),code:xu.JSON_NOT_ARRAY});}},dn=class extends de{constructor(t,e){super({message:cn.JSON_ITEM_NOT_OBJECT(t,e),code:xu.JSON_ITEM_NOT_OBJECT});}};var Ir=class{constructor({name:t,description:e,id:o},i){this.opik=i;this.idToHash=new Map;this.hashes=new Set;this.id=o||oe(),this.name=t,this.description=e;}async insert(t){if(!t||t.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(t),o=Qt(e,{maxBatchSize:1e3});try{let i=0;for(let n of o)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:n}),i+=n.length,k.info(`Inserted ${Math.min(i,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(i){throw k.error(`Error inserting items into dataset: ${i instanceof Error?i.message:String(i)}`),i}}async update(t){if(!(!t||t.length===0)){for(let e=0;e<t.length;e++)if(!t[e].id)throw new sn(e);await this.insert(t);}}async delete(t){if(!t||t.length===0){k.info("No item IDs provided for deletion");return}let e=Qt(t,{maxBatchSize:100});for await(let o of e){k.debug("Deleting dataset items batch",{batchSize:o.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:o});for(let i of o)if(this.idToHash.has(i)){let n=this.idToHash.get(i);this.hashes.delete(n),this.idToHash.delete(i);}}}async clear(){let e=(await this.getItems()).map(o=>o.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getItems(t,e){return (await this.getItemsAsDataclasses(t,e)).map(i=>i.getContent(true))}async getItemsAsDataclasses(t,e){let o=t?Math.min(t,2e3):2e3,i=await this.opik.api.datasets.streamDatasetItems({datasetName:this.name,lastRetrievedId:e,steamLimit:o});return (await Fe(i,j.DatasetItemPublic,t)).map(c=>$t.fromApiModel(c))}async insertFromJson(t,e={},o=[]){let i;try{i=JSON.parse(t);}catch(c){throw new ln(c)}if(!Array.isArray(i))throw new mn(typeof i);if(i.length===0)return;for(let c=0;c<i.length;c++){let d=i[c];if(typeof d!="object"||d===null)throw new dn(c,typeof d)}let n=i.map(c=>{let d=c,u={};for(let[g,f]of Object.entries(d)){if(o.includes(g))continue;let y=e[g]||g;u[y]=f;}return u});await this.insert(n);}async toJson(t={}){let o=(await this.getItems()).map(i=>{let n={...i};if(Object.keys(t).length>0){for(let[c,d]of Object.entries(t))if(c in n){let u=n[c];delete n[c],n[d]=u;}}return n});return kR__default.default(o)}async getDeduplicatedItems(t){let e=[];for(let o of t){let i=new $t(o),n=await i.contentHash();if(this.hashes.has(n)){k.debug("Duplicate item found - skipping",{contentHash:n,datasetId:this.id});continue}e.push(i.toApiModel()),this.hashes.add(n),this.idToHash.set(i.id,n);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){k.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let t=await this.getItemsAsDataclasses();this.clearHashState();for(let e of t){let o=await e.contentHash();this.idToHash.set(e.id,o),this.hashes.add(o);}k.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:t.length});}catch(t){if(t instanceof p&&t.statusCode===404){k.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw t}}};var Ru=class extends Error{constructor(t){super(t),this.name="DatasetError";}},Yt=class extends Ru{constructor(t){super(`Dataset with name '${t}' not found`),this.name="DatasetNotFoundError";}};var un=class{constructor(t){if(!t.datasetItemId)throw new Error("datasetItemId is required");if(!t.traceId)throw new Error("traceId is required");this.datasetItemId=t.datasetItemId,this.traceId=t.traceId;}},gn=class a{constructor(t){this.id=t.id,this.datasetItemId=t.datasetItemId,this.traceId=t.traceId,this.datasetItemData=t.datasetItemData,this.evaluationTaskOutput=t.evaluationTaskOutput,this.feedbackScores=[...t.feedbackScores];}static fromRestExperimentItemCompare(t){var o,i;let e=(i=(o=t.feedbackScores)==null?void 0:o.map(n=>({categoryName:n.categoryName,name:n.name,reason:n.reason,value:n.value,source:n.source})))!=null?i:[];return new a({id:t.id,traceId:t.traceId,datasetItemId:t.datasetItemId,datasetItemData:t.input,evaluationTaskOutput:t.output,feedbackScores:e})}};var cr=class{constructor({id:t,name:e,datasetName:o,prompts:i},n){this.opik=n;this.id=t||oe(),this._name=e,this.datasetName=o,this.prompts=i;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let t=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=t.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(t){if(t.length===0)return;let e=t.map(i=>({id:oe(),experimentId:this.id,datasetItemId:i.datasetItemId,traceId:i.traceId})),o=Qt(e,{maxBatchSize:50});try{for(let i of o)await this.opik.api.experiments.createExperimentItems({experimentItems:i});k.debug(`Inserted ${t.length} items into experiment ${this.id}`);}catch(i){throw k.error(`Error inserting items into experiment: ${i instanceof Error?i.message:String(i)}`),i}}async getItems(t){let e=[],{maxResults:i,truncate:n=false}=t||{},c,d=true;try{for(;d&&!(i!==void 0&&e.length>=i);){let u=i?Math.min(i-e.length,2e3):2e3,g=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:u,lastRetrievedId:c,truncate:n});try{let f=await Fe(g,j.ExperimentItemCompare,u);if(f.length===0){d=!1;break}for(let y of f){let z=gn.fromRestExperimentItemCompare(y);if(e.push(z),i!==void 0&&e.length>=i){d=!1;break}}c=f[f.length-1].id;}catch(f){k.error("Error parsing experiment item: "+(f instanceof Error?f.message:String(f))),d=!1;break}}}catch(u){throw k.error("Error retrieving experiment items: "+(u instanceof Error?u.message:String(u))),u}return k.info(`Retrieved ${e.length} items${i?` (limited by maxResults=${i})`:""}`),e}async getUrl(){let t=await this.opik.getDataset(this.datasetName),e=this.opik.config.apiUrl||In.apiUrl;return Jf({datasetId:t.id,experimentId:this.id,baseUrl:e})}};var fn={EXPERIMENT_NOT_FOUND:a=>`Experiment with name '${a}' not found`,INVALID_CONFIG_TYPE:a=>`experimentConfig must be a plain object, but ${a} was provided. Please provide a valid configuration object like { model: 'gpt-4', temperature: 0.7 }`,CONFIG_PROMPTS_CONFLICT:()=>`Cannot specify both 'prompts' parameter and 'experimentConfig.prompts'. Choose one approach:
1
+ 'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Hu=require('fs'),$h=require('ini');require('dotenv/config');var Hb=require('qs'),uuid=require('uuid'),kR=require('fast-json-stable-stringify'),yR=require('xxhash-wasm'),util=require('util'),AR=require('mustache'),PR=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),IR=require('fast-deep-equal'),async_hooks=require('async_hooks'),xn=require('chalk'),HR=require('boxen'),JR=require('ora'),ai$1=require('ai'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),zod=require('zod');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Hu__default=/*#__PURE__*/_interopDefault(Hu);var $h__default=/*#__PURE__*/_interopDefault($h);var Hb__default=/*#__PURE__*/_interopDefault(Hb);var kR__default=/*#__PURE__*/_interopDefault(kR);var yR__default=/*#__PURE__*/_interopDefault(yR);var AR__default=/*#__PURE__*/_interopDefault(AR);var PR__default=/*#__PURE__*/_interopDefault(PR);var IR__default=/*#__PURE__*/_interopDefault(IR);var xn__default=/*#__PURE__*/_interopDefault(xn);var HR__default=/*#__PURE__*/_interopDefault(HR);var JR__default=/*#__PURE__*/_interopDefault(JR);var Mu=Object.create;var gr=Object.defineProperty;var Nu=Object.getOwnPropertyDescriptor;var Mh=Object.getOwnPropertyNames;var Nh=Object.getPrototypeOf,Fh=Object.prototype.hasOwnProperty;var Fu=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),Or=a=>{throw TypeError(a)};var Oh=(a,t,e)=>t in a?gr(a,t,{enumerable:true,configurable:true,writable:true,value:e}):a[t]=e;var ue=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var Pn=(a,t)=>()=>(a&&(t=a(a=0)),t);var Y=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),E=(a,t)=>{for(var e in t)gr(a,e,{get:t[e],enumerable:true});},Wh=(a,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mh(t))!Fh.call(a,i)&&i!==e&&gr(a,i,{get:()=>t[i],enumerable:!(o=Nu(t,i))||o.enumerable});return a};var Bh=(a,t,e)=>(e=a!=null?Mu(Nh(a)):{},Wh(gr(e,"default",{value:a,enumerable:true}),a));var Ou=a=>{var t;return [,,,Mu((t=void 0)!=null?t:null)]},Wu=["class","method","getter","setter","accessor","field","value","get","set"],Fr=a=>a!==void 0&&typeof a!="function"?Or("Function expected"):a,Lh=(a,t,e,o,i)=>({kind:Wu[a],name:t,metadata:o,addInitializer:n=>e._?Or("Already initialized"):i.push(Fr(n||null))}),Cn=(a,t)=>Oh(t,Fu("metadata"),a[3]),Bu=(a,t,e,o)=>{for(var i=0,n=a[t>>1],c=n&&n.length;i<c;i++)n[i].call(e);return o},Lu=(a,t,e,o,i,n)=>{var m,u,g,f,y=t&7,z=false,v=false,S=2,O=Wu[y+5],G=a[S]||(a[S]=[]),te=((i=i.prototype),Nu(i,e));for(var ur=o.length-1;ur>=0;ur--)g=Lh(y,e,u={},a[3],G),(g.static=z,g.private=v,f=g.access={has:pe=>e in pe},(f.get=pe=>pe[e]),y>2),m=(0, o[ur])(te[O],g),u._=1,Fr(m)&&(te[O]=m);return te&&gr(i,e,te),i};var kg={};E(kg,{Node18UniversalStreamWrapper:()=>Qn});var Qn,zg=Pn(()=>{Qn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.on("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.on("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.off("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.off("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var vg={};E(vg,{UndiciStreamWrapper:()=>Yn});var Yn,Sg=Pn(()=>{Yn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.on("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.off("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var _g={};E(_g,{NodePre18StreamWrapper:()=>Zn});var Zn,Ag=Pn(()=>{Zn=class{constructor(t){this.readableStream=t;}on(t,e){this.readableStream.on(t,e);}off(t,e){this.readableStream.off(t,e);}pipe(t){return this.readableStream.pipe(t),t}pipeTo(t){return this.pipe(t)}unpipe(t){t?this.readableStream.unpipe(t):this.readableStream.unpipe();}destroy(t){this.readableStream.destroy(t);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((t,e)=>{let o=this.readableStream.read();o?t(o):(this.readableStream.once("readable",()=>{let i=this.readableStream.read();t(i);}),this.readableStream.once("error",e));})}setEncoding(t){this.readableStream.setEncoding(t),this.encoding=t;}async text(){let t=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let i of this.readableStream)t.push(e.encode(i));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(t))}async json(){let t=await this.text();return JSON.parse(t)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:i}=await e.next();return {value:o,done:i}},[Symbol.asyncIterator](){return this}}}};});var Mg=Y((HD,Dg)=>{var Ug=ue("stream").Stream,$b=ue("util");Dg.exports=we;function we(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=true,this._maxDataSizeExceeded=false,this._released=false,this._bufferedEvents=[];}$b.inherits(we,Ug);we.create=function(a,t){var e=new this;t=t||{};for(var o in t)e[o]=t[o];e.source=a;var i=a.emit;return a.emit=function(){return e._handleEmit(arguments),i.apply(a,arguments)},a.on("error",function(){}),e.pauseStream&&a.pause(),e};Object.defineProperty(we.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});we.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};we.prototype.resume=function(){this._released||this.release(),this.source.resume();};we.prototype.pause=function(){this.source.pause();};we.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(a){this.emit.apply(this,a);}.bind(this)),this._bufferedEvents=[];};we.prototype.pipe=function(){var a=Ug.prototype.pipe.apply(this,arguments);return this.resume(),a};we.prototype._handleEmit=function(a){if(this._released){this.emit.apply(this,a);return}a[0]==="data"&&(this.dataSize+=a[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(a);};we.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=true;var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(a));}};});var Wg=Y((JD,Og)=>{var Qb=ue("util"),Fg=ue("stream").Stream,Ng=Mg();Og.exports=V;function V(){this.writable=false,this.readable=true,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=true,this._released=false,this._streams=[],this._currentStream=null,this._insideLoop=false,this._pendingNext=false;}Qb.inherits(V,Fg);V.create=function(a){var t=new this;a=a||{};for(var e in a)t[e]=a[e];return t};V.isStreamLike=function(a){return typeof a!="function"&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"&&!Buffer.isBuffer(a)};V.prototype.append=function(a){var t=V.isStreamLike(a);if(t){if(!(a instanceof Ng)){var e=Ng.create(a,{maxDataSize:1/0,pauseStream:this.pauseStreams});a.on("data",this._checkDataSize.bind(this)),a=e;}this._handleErrors(a),this.pauseStreams&&a.pause();}return this._streams.push(a),this};V.prototype.pipe=function(a,t){return Fg.prototype.pipe.call(this,a,t),this.resume(),a};V.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=false;}};V.prototype._realGetNext=function(){var a=this._streams.shift();if(typeof a=="undefined"){this.end();return}if(typeof a!="function"){this._pipeNext(a);return}var t=a;t(function(e){var o=V.isStreamLike(e);o&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e);}.bind(this));};V.prototype._pipeNext=function(a){this._currentStream=a;var t=V.isStreamLike(a);if(t){a.on("end",this._getNext.bind(this)),a.pipe(this,{end:false});return}var e=a;this.write(e),this._getNext();};V.prototype._handleErrors=function(a){var t=this;a.on("error",function(e){t._emitError(e);});};V.prototype.write=function(a){this.emit("data",a);};V.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"));};V.prototype.resume=function(){this._released||(this._released=true,this.writable=true,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume");};V.prototype.end=function(){this._reset(),this.emit("end");};V.prototype.destroy=function(){this._reset(),this.emit("close");};V.prototype._reset=function(){this.writable=false,this._streams=[],this._currentStream=null;};V.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(a));}};V.prototype._updateDataSize=function(){this.dataSize=0;var a=this;this._streams.forEach(function(t){t.dataSize&&(a.dataSize+=t.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(a){this._reset(),this.emit("error",a);};});var Bg=Y((XD,Yb)=>{Yb.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/3gpp-ims+xml":{source:"iana",compressible:true},"application/3gpphal+json":{source:"iana",compressible:true},"application/3gpphalforms+json":{source:"iana",compressible:true},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:true},"application/alto-costmap+json":{source:"iana",compressible:true},"application/alto-costmapfilter+json":{source:"iana",compressible:true},"application/alto-directory+json":{source:"iana",compressible:true},"application/alto-endpointcost+json":{source:"iana",compressible:true},"application/alto-endpointcostparams+json":{source:"iana",compressible:true},"application/alto-endpointprop+json":{source:"iana",compressible:true},"application/alto-endpointpropparams+json":{source:"iana",compressible:true},"application/alto-error+json":{source:"iana",compressible:true},"application/alto-networkmap+json":{source:"iana",compressible:true},"application/alto-networkmapfilter+json":{source:"iana",compressible:true},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:true},"application/alto-updatestreamparams+json":{source:"iana",compressible:true},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:true,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:true,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:true,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:true,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:true,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:true,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:true},"application/atsc-rsat+xml":{source:"iana",compressible:true,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:true},"application/bacnet-xdd+zip":{source:"iana",compressible:false},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:false,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/calendar+json":{source:"iana",compressible:true},"application/calendar+xml":{source:"iana",compressible:true,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:true},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:true},"application/ccxml+xml":{source:"iana",compressible:true,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:true,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:true},"application/cellml+xml":{source:"iana",compressible:true},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:true},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:true},"application/clue_info+xml":{source:"iana",compressible:true},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:true},"application/coap-group+json":{source:"iana",compressible:true},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:true},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:true,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:true},"application/cstadata+xml":{source:"iana",compressible:true},"application/csvm+json":{source:"iana",compressible:true},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:true},"application/dash+xml":{source:"iana",compressible:true,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:true,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:true,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:true},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:true},"application/dicom+xml":{source:"iana",compressible:true},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:true},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:true,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:true},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:true,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:true,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:false},"application/edifact":{source:"iana",compressible:false},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:true},"application/elm+xml":{source:"iana",compressible:true},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/emergencycalldata.comment+xml":{source:"iana",compressible:true},"application/emergencycalldata.control+xml":{source:"iana",compressible:true},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:true},"application/emergencycalldata.veds+xml":{source:"iana",compressible:true},"application/emma+xml":{source:"iana",compressible:true,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:true,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:true},"application/epub+zip":{source:"iana",compressible:false,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:true},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:true,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:true},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/fido.trusted-apps+json":{compressible:true},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:false},"application/framework-attributes+xml":{source:"iana",compressible:true},"application/geo+json":{source:"iana",compressible:true,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:true},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:true,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:true,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:false,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:true},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:true},"application/ibe-pkg-reply+xml":{source:"iana",compressible:true},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:true,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:true,extensions:["its"]},"application/java-archive":{source:"apache",compressible:false,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:false,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:false,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:true,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:true},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:true},"application/jrd+json":{source:"iana",compressible:true},"application/jscalendar+json":{source:"iana",compressible:true},"application/json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:true},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:true,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:true},"application/jwk-set+json":{source:"iana",compressible:true},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:true},"application/kpml-response+xml":{source:"iana",compressible:true},"application/ld+json":{source:"iana",compressible:true,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:true,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:true},"application/lost+xml":{source:"iana",compressible:true,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:true},"application/lpf+zip":{source:"iana",compressible:false},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:true,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:true,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:true,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:true,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:true},"application/mathml-presentation+xml":{source:"iana",compressible:true},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:true},"application/mbms-deregister+xml":{source:"iana",compressible:true},"application/mbms-envelope+xml":{source:"iana",compressible:true},"application/mbms-msk+xml":{source:"iana",compressible:true},"application/mbms-msk-response+xml":{source:"iana",compressible:true},"application/mbms-protection-description+xml":{source:"iana",compressible:true},"application/mbms-reception-report+xml":{source:"iana",compressible:true},"application/mbms-register+xml":{source:"iana",compressible:true},"application/mbms-register-response+xml":{source:"iana",compressible:true},"application/mbms-schedule+xml":{source:"iana",compressible:true},"application/mbms-user-service-description+xml":{source:"iana",compressible:true},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:true,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:true},"application/mediaservercontrol+xml":{source:"iana",compressible:true,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:true},"application/metalink+xml":{source:"apache",compressible:true,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:true,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:true,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:true,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:true,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:true,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:true},"application/mrb-publish+xml":{source:"iana",compressible:true},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/msword":{source:"iana",compressible:false,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:true},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:true},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:false,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:true},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:true,extensions:["opf"]},"application/ogg":{source:"iana",compressible:false,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:true,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:true},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:false},"application/p2p-overlay+xml":{source:"iana",compressible:true,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:true,extensions:["xer"]},"application/pdf":{source:"iana",compressible:false,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:false,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:true,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/postscript":{source:"iana",compressible:true,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:true},"application/problem+json":{source:"iana",compressible:true},"application/problem+xml":{source:"iana",compressible:true},"application/provenance+xml":{source:"iana",compressible:true,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:false},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:true},"application/pskc+xml":{source:"iana",compressible:true,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:true},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:true,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:true},"application/rdf+xml":{source:"iana",compressible:true,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:true,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:true},"application/resource-lists+xml":{source:"iana",compressible:true,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:true,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:true},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:true},"application/rls-services+xml":{source:"iana",compressible:true,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:true,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:true,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:true,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:true,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:true,extensions:["rss"]},"application/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:true},"application/samlmetadata+xml":{source:"iana",compressible:true},"application/sarif+json":{source:"iana",compressible:true},"application/sarif-external-properties+json":{source:"iana",compressible:true},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:true,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:true},"application/scim+json":{source:"iana",compressible:true},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:true},"application/senml+xml":{source:"iana",compressible:true,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:true},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:true},"application/sensml+xml":{source:"iana",compressible:true,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:true},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:true,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:true},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:true,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:true},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:true,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:true},"application/spirits-event+xml":{source:"iana",compressible:true},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:true,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:true,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:true,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:true,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:true},"application/swid+xml":{source:"iana",compressible:true,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:true},"application/taxii+json":{source:"iana",compressible:true},"application/td+json":{source:"iana",compressible:true},"application/tei+xml":{source:"iana",compressible:true,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:true,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:true},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:true,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:true,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:false,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:true},"application/urc-ressheet+xml":{source:"iana",compressible:true,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:true,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:true},"application/vcard+json":{source:"iana",compressible:true},"application/vcard+xml":{source:"iana",compressible:true},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:true,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:true},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:true},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:true},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:true},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:true},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:true},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:true},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:true},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:false,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:true,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:true},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:true},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:false,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:true},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:true},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:true},"application/vnd.apple.installer+xml":{source:"iana",compressible:true,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:false,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:true},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:true},"application/vnd.avistar+xml":{source:"iana",compressible:true},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:true,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:true},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:true},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:true},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:true},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:true},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:true,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:true,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:true},"application/vnd.collection.doc+json":{source:"iana",compressible:true},"application/vnd.collection.next+json":{source:"iana",compressible:true},"application/vnd.comicbook+zip":{source:"iana",compressible:false},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:true},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:true,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:true},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:true},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:true},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:true},"application/vnd.cyclonedx+xml":{source:"iana",compressible:true},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:false},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:true,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:true},"application/vnd.dataresource+json":{source:"iana",compressible:true},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:true,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:true},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:true},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:true},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:true},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:true},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:true},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:true},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:true},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:true},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:false},"application/vnd.eszigno3+xml":{source:"iana",compressible:true,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:true},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:false},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:false},"application/vnd.etsi.cug+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:true},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:true},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:true},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:true},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:true},"application/vnd.etsi.sci+xml":{source:"iana",compressible:true},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:true},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:true},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:true},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:false},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:false},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:false},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:true},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:true},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:true},"application/vnd.geo+json":{source:"iana",compressible:true},"application/vnd.geocube+xml":{source:"iana",compressible:true},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:false,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:false,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:false,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:true,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:false,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:true},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:false},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:true},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:true},"application/vnd.hal+xml":{source:"iana",compressible:true,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:true,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:true},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:true},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:true},"application/vnd.hyper-item+json":{source:"iana",compressible:true},"application/vnd.hyperdrive+json":{source:"iana",compressible:true},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:false},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:false},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:true},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:true},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:true},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:true},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:true},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:true,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:false},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:true},"application/vnd.las.las+xml":{source:"iana",compressible:true,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:true},"application/vnd.liberty-request+xml":{source:"iana",compressible:true},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:true,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:false},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:true},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:true},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:false},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:true},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:true},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:true,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:false,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:true,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:true},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:true},"application/vnd.ms-outlook":{compressible:false,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:true},"application/vnd.ms-powerpoint":{source:"iana",compressible:false,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:true},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:true},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:true},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:false,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:true},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:true},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:true},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:true},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:true},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:true},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:true,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:true},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:false,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:false,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:false,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:false,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:true},"application/vnd.oftn.l10n+json":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:true},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:true},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:true},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:true},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:true},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:true},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:true},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:true},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:true},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:true},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:true},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:true},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:true,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:true},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:true},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:true},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:true},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:true},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:true},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:true,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:true,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:false,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:false,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:false,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:true},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:true},"application/vnd.oracle.resource+json":{source:"iana",compressible:true},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:true},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:true},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:true},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:true},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:true},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:true},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:true,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:true},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:true,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:true},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:true},"application/vnd.shopkick+json":{source:"iana",compressible:true},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:true},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:true,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:true,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:true,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:true},"application/vnd.syft+json":{source:"iana",compressible:true},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:true,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:true},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:true},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:true},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:true},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:true,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:true},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:true},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:true},"application/vnd.wv.ssp+xml":{source:"iana",compressible:true},"application/vnd.xacml+json":{source:"iana",compressible:true},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:true},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:true,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:true,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:true,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:true},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:true,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:true,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:true},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:true,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:true,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:false,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:false,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:false,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:false,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:false,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:false},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:true,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:true,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:true,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:false,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:true,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:false,extensions:["jnlp"]},"application/x-javascript":{compressible:true},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:false,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:false},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:true,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:false,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:false,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:true,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:false,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:false,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:true,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:true,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:true,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:true,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:true,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:false,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:true,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:true,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:true,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:true,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:true},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:true,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:false,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:true},"application/xaml+xml":{source:"apache",compressible:true,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:true,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:true,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:true,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:true,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:true},"application/xcap-ns+xml":{source:"iana",compressible:true,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:true},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:true},"application/xenc+xml":{source:"iana",compressible:true,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:true,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:true},"application/xliff+xml":{source:"iana",compressible:true,extensions:["xlf"]},"application/xml":{source:"iana",compressible:true,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:true,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:true},"application/xmpp+xml":{source:"iana",compressible:true},"application/xop+xml":{source:"iana",compressible:true,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:true,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:true,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:true,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:true,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:true},"application/yang-data+xml":{source:"iana",compressible:true},"application/yang-patch+json":{source:"iana",compressible:true},"application/yang-patch+xml":{source:"iana",compressible:true},"application/yin+xml":{source:"iana",compressible:true,extensions:["yin"]},"application/zip":{source:"iana",compressible:false,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:false,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:false,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:false},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:false,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:false,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:false,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:false,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:false},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:false},"audio/vorbis":{source:"iana",compressible:false},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:false,extensions:["wav"]},"audio/wave":{compressible:false,extensions:["wav"]},"audio/webm":{source:"apache",compressible:false,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:false,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:false,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:true,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:true,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:false,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:false,extensions:["avif"]},"image/bmp":{source:"iana",compressible:true,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:false,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:false,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:false,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:false,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:false,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:false},"image/png":{source:"iana",compressible:false,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:true,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:false,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:true,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:true,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:true,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:true,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:true,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:false},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:false},"message/imdn+xml":{source:"iana",compressible:true},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:false},"message/rfc822":{source:"iana",compressible:true,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:true,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:true,extensions:["glb"]},"model/iges":{source:"iana",compressible:false,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:false,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:true,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:false,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:false,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:true,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:true},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:false,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:false,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:false,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:false,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:true,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:false},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:false},"multipart/form-data":{source:"iana",compressible:false},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:false},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:false},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:true,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:true},"text/cmd":{compressible:true},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:true,extensions:["css"]},"text/csv":{source:"iana",compressible:true,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:true,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:true},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:true,extensions:["jsx"]},"text/less":{compressible:true,extensions:["less"]},"text/markdown":{source:"iana",compressible:true,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:true,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:true,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:true,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:true,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:true,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:true,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:true,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:true,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:true,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:true},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:true},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:true,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:true,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:true,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:true,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:true,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:true,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:false,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:false,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:false,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:false,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:false,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:false,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:false,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:false,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:true},"x-shader/x-vertex":{compressible:true}};});var Vg=Y((KD,Lg)=>{Lg.exports=Bg();});var Xg=Y(ie=>{var zi=Vg(),Zb=ue("path").extname,Hg=/^\s*([^;\s]*)(?:;|\s|$)/,qb=/^text\//i;ie.charset=Jg;ie.charsets={lookup:Jg};ie.contentType=ex;ie.extension=rx;ie.extensions=Object.create(null);ie.lookup=ox;ie.types=Object.create(null);tx(ie.extensions,ie.types);function Jg(a){if(!a||typeof a!="string")return false;var t=Hg.exec(a),e=t&&zi[t[1].toLowerCase()];return e&&e.charset?e.charset:t&&qb.test(t[1])?"UTF-8":false}function ex(a){if(!a||typeof a!="string")return false;var t=a.indexOf("/")===-1?ie.lookup(a):a;if(!t)return false;if(t.indexOf("charset")===-1){var e=ie.charset(t);e&&(t+="; charset="+e.toLowerCase());}return t}function rx(a){if(!a||typeof a!="string")return false;var t=Hg.exec(a),e=t&&ie.extensions[t[1].toLowerCase()];return !e||!e.length?false:e[0]}function ox(a){if(!a||typeof a!="string")return false;var t=Zb("x."+a).toLowerCase().substr(1);return t&&ie.types[t]||false}function tx(a,t){var e=["nginx","apache",void 0,"iana"];Object.keys(zi).forEach(function(i){var n=zi[i],c=n.extensions;if(!(!c||!c.length)){a[i]=c;for(var m=0;m<c.length;m++){var u=c[m];if(t[u]){var g=e.indexOf(zi[t[u]].source),f=e.indexOf(n.source);if(t[u]!=="application/octet-stream"&&(g>f||g===f&&t[u].substr(0,12)==="application/"))continue}t[u]=i;}}});}});var Gg=Y(($D,Kg)=>{Kg.exports=ix;function ix(a){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(a):setTimeout(a,0);}});var qn=Y((QD,Qg)=>{var $g=Gg();Qg.exports=ax;function ax(a){var t=false;return $g(function(){t=true;}),function(o,i){t?a(o,i):$g(function(){a(o,i);});}}});var es=Y((YD,Yg)=>{Yg.exports=nx;function nx(a){Object.keys(a.jobs).forEach(sx.bind(a)),a.jobs={};}function sx(a){typeof this.jobs[a]=="function"&&this.jobs[a]();}});var rs=Y((ZD,qg)=>{var Zg=qn(),px=es();qg.exports=cx;function cx(a,t,e,o){var i=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[i]=lx(t,i,a[i],function(n,c){i in e.jobs&&(delete e.jobs[i],n?px(e):e.results[i]=c,o(n,e.results));});}function lx(a,t,e,o){var i;return a.length==2?i=a(e,Zg(o)):i=a(e,t,Zg(o)),i}});var os=Y((qD,ef)=>{ef.exports=mx;function mx(a,t){var e=!Array.isArray(a),o={index:0,keyedList:e||t?Object.keys(a):null,jobs:{},results:e?{}:[],size:e?Object.keys(a).length:a.length};return t&&o.keyedList.sort(e?t:function(i,n){return t(a[i],a[n])}),o}});var ts=Y((eM,rf)=>{var dx=es(),ux=qn();rf.exports=gx;function gx(a){Object.keys(this.jobs).length&&(this.index=this.size,dx(this),ux(a)(null,this.results));}});var tf=Y((rM,of)=>{var fx=rs(),hx=os(),wx=ts();of.exports=bx;function bx(a,t,e){for(var o=hx(a);o.index<(o.keyedList||a).length;)fx(a,t,o,function(i,n){if(i){e(i,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return wx.bind(o,e)}});var is=Y((oM,vi)=>{var af=rs(),xx=os(),Rx=ts();vi.exports=yx;vi.exports.ascending=nf;vi.exports.descending=kx;function yx(a,t,e,o){var i=xx(a,e);return af(a,t,i,function n(c,m){if(c){o(c,m);return}if(i.index++,i.index<(i.keyedList||a).length){af(a,t,i,n);return}o(null,i.results);}),Rx.bind(i,o)}function nf(a,t){return a<t?-1:a>t?1:0}function kx(a,t){return -1*nf(a,t)}});var pf=Y((tM,sf)=>{var zx=is();sf.exports=vx;function vx(a,t,e){return zx(a,t,null,e)}});var lf=Y((iM,cf)=>{cf.exports={parallel:tf(),serial:pf(),serialOrdered:is()};});var df=Y((aM,mf)=>{mf.exports=function(a,t){return Object.keys(t).forEach(function(e){a[e]=a[e]||t[e];}),a};});var gf=Y((nM,uf)=>{var ps=Wg(),Sx=ue("util"),as=ue("path"),_x=ue("http"),Ax=ue("https"),Tx=ue("url").parse,Ex=ue("fs"),Px=ue("stream").Stream,ns=Xg(),Cx=lf(),ss=df();uf.exports=C;Sx.inherits(C,ps);function C(a){if(!(this instanceof C))return new C(a);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ps.call(this),a=a||{};for(var t in a)this[t]=a[t];}C.LINE_BREAK=`\r
2
+ `;C.DEFAULT_CONTENT_TYPE="application/octet-stream";C.prototype.append=function(a,t,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=ps.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(a,t,e),n=this._multiPartFooter();o(i),o(t),o(n),this._trackLength(i,t,e);};C.prototype._trackLength=function(a,t,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(a)+C.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof Px))&&(e.knownLength||this._valuesToMeasure.push(t));};C.prototype._lengthRetriever=function(a,t){a.hasOwnProperty("fd")?a.end!=null&&a.end!=1/0&&a.start!=null?t(null,a.end+1-(a.start?a.start:0)):Ex.stat(a.path,function(e,o){var i;if(e){t(e);return}i=o.size-(a.start?a.start:0),t(null,i);}):a.hasOwnProperty("httpVersion")?t(null,+a.headers["content-length"]):a.hasOwnProperty("httpModule")?(a.on("response",function(e){a.pause(),t(null,+e.headers["content-length"]);}),a.resume()):t("Unknown stream");};C.prototype._multiPartHeader=function(a,t,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(t,e),i=this._getContentType(t,e),n="",c={"Content-Disposition":["form-data",'name="'+a+'"'].concat(o||[]),"Content-Type":[].concat(i||[])};typeof e.header=="object"&&ss(c,e.header);var m;for(var u in c)c.hasOwnProperty(u)&&(m=c[u],m!=null&&(Array.isArray(m)||(m=[m]),m.length&&(n+=u+": "+m.join("; ")+C.LINE_BREAK)));return "--"+this.getBoundary()+C.LINE_BREAK+n+C.LINE_BREAK};C.prototype._getContentDisposition=function(a,t){var e,o;return typeof t.filepath=="string"?e=as.normalize(t.filepath).replace(/\\/g,"/"):t.filename||a.name||a.path?e=as.basename(t.filename||a.name||a.path):a.readable&&a.hasOwnProperty("httpVersion")&&(e=as.basename(a.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};C.prototype._getContentType=function(a,t){var e=t.contentType;return !e&&a.name&&(e=ns.lookup(a.name)),!e&&a.path&&(e=ns.lookup(a.path)),!e&&a.readable&&a.hasOwnProperty("httpVersion")&&(e=a.headers["content-type"]),!e&&(t.filepath||t.filename)&&(e=ns.lookup(t.filepath||t.filename)),!e&&typeof a=="object"&&(e=C.DEFAULT_CONTENT_TYPE),e};C.prototype._multiPartFooter=function(){return function(a){var t=C.LINE_BREAK,e=this._streams.length===0;e&&(t+=this._lastBoundary()),a(t);}.bind(this)};C.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+C.LINE_BREAK};C.prototype.getHeaders=function(a){var t,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in a)a.hasOwnProperty(t)&&(e[t.toLowerCase()]=a[t]);return e};C.prototype.setBoundary=function(a){this._boundary=a;};C.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};C.prototype.getBuffer=function(){for(var a=new Buffer.alloc(0),t=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?a=Buffer.concat([a,this._streams[e]]):a=Buffer.concat([a,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,t.length+2)!==t)&&(a=Buffer.concat([a,Buffer.from(C.LINE_BREAK)])));return Buffer.concat([a,Buffer.from(this._lastBoundary())])};C.prototype._generateBoundary=function(){for(var a="--------------------------",t=0;t<24;t++)a+=Math.floor(Math.random()*10).toString(16);this._boundary=a;};C.prototype.getLengthSync=function(){var a=this._overheadLength+this._valueLength;return this._streams.length&&(a+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),a};C.prototype.hasKnownLength=function(){var a=true;return this._valuesToMeasure.length&&(a=false),a};C.prototype.getLength=function(a){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(a.bind(this,null,t));return}Cx.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){a(e);return}o.forEach(function(i){t+=i;}),a(null,t);});};C.prototype.submit=function(a,t){var e,o,i={method:"post"};return typeof a=="string"?(a=Tx(a),o=ss({port:a.port,path:a.pathname,host:a.hostname,protocol:a.protocol},i)):(o=ss(a,i),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(a.headers),o.protocol=="https:"?e=Ax.request(o):e=_x.request(o),this.getLength(function(n,c){if(n&&n!=="Unknown stream"){this._error(n);return}if(c&&e.setHeader("Content-Length",c),this.pipe(e),t){var m,u=function(g,f){return e.removeListener("error",u),e.removeListener("response",m),t.call(this,g,f)};m=u.bind(this,null),e.on("error",u),e.on("response",m);}}.bind(this)),e};C.prototype._error=function(a){this.error||(this.error=a,this.pause(),this.emit("error",a));};C.prototype.toString=function(){return "[object FormData]"};});var Kh={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function ci(a,t=a){return ansiEscapes.link(t,a)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Vu=a=>{k.settings.minLevel=Kh[a];},Gh=()=>{k.settings.minLevel=100;};Vu(process.env.OPIK_LOG_LEVEL||"INFO");var Qh="~/.opik.config",In={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Ju(a){return Object.fromEntries(Object.entries(a).filter(([,t])=>t!==void 0))}function Yh(){return Ju({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:process.env.OPIK_HOLD_UNTIL_FLUSH===void 0?void 0:["1","true","yes"].includes(String(process.env.OPIK_HOLD_UNTIL_FLUSH).toLowerCase())})}function Zh(){let a=process.env.OPIK_CONFIG_PATH||Qh;if(!Hu__default.default.existsSync(a)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${a}`);return {}}try{let t=$h__default.default.parse(Hu__default.default.readFileSync(a,"utf8"));return t.opik?Ju({apiKey:t.opik.api_key,apiUrl:t.opik.url_override,projectName:t.opik.project_name,workspaceName:t.opik.workspace}):{}}catch(t){return k.error(`Error loading config file ${a}: ${t}`),{}}}function Xu(a){let t=Yh(),e=Zh(),{headers:o,...i}=a||{};return qh({...In,...e,...t,...i})}function qh(a){if(!a.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let t=ew(a.apiUrl);if(t&&!a.apiKey)throw new Error("OPIK_API_KEY is not set");if(t&&!a.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return a}function ew(a){return new URL(a).hostname.endsWith("comet.com")}var X={};E(X,{AlertAlertType:()=>rw,AlertPublicAlertType:()=>cw,AlertTriggerConfigPublicType:()=>sw,AlertTriggerConfigType:()=>tw,AlertTriggerConfigWriteType:()=>iw,AlertTriggerEventType:()=>ow,AlertTriggerPublicEventType:()=>pw,AlertTriggerWriteEventType:()=>aw,AlertWriteAlertType:()=>nw,AnnotationQueuePublicScope:()=>uw,AnnotationQueueScope:()=>mw,AnnotationQueueWriteScope:()=>dw,AssistantMessageRole:()=>jw,AttachmentListRequestEntityType:()=>Gu,BadRequestError:()=>_,CheckName:()=>qw,CheckPublicName:()=>Fb,CheckPublicResult:()=>Ob,CheckResult:()=>eb,ColumnCompareTypesItem:()=>Bw,ColumnPublicTypesItem:()=>Qw,ColumnTypesItem:()=>Yw,CompleteMultipartUploadRequestEntityType:()=>gw,ConflictError:()=>N,CreatePromptVersionDetailTemplateStructure:()=>ug,DatasetItemCompareSource:()=>Lw,DatasetItemFilterOperator:()=>Uw,DatasetItemPublicSource:()=>Gw,DatasetItemSource:()=>Nw,DatasetItemWriteSource:()=>Gn,DatasetPublicStatus:()=>Kw,DatasetPublicVisibility:()=>Xw,DatasetStatus:()=>Mw,DatasetUpdateVisibility:()=>qu,DatasetVisibility:()=>Dw,DatasetWriteVisibility:()=>Zu,DeleteAttachmentsRequestEntityType:()=>fw,DownloadAttachmentRequestEntityType:()=>$u,ExperimentItemCompareTraceVisibilityMode:()=>Vw,ExperimentItemPublicTraceVisibilityMode:()=>$w,ExperimentItemTraceVisibilityMode:()=>Fw,ExperimentPublicStatus:()=>nb,ExperimentPublicType:()=>ab,ExperimentStatus:()=>Zw,ExperimentType:()=>$n,ExperimentUpdateStatus:()=>tg,ExperimentUpdateType:()=>og,ExperimentWriteStatus:()=>rg,ExperimentWriteType:()=>eg,FeedbackScoreBatchItemSource:()=>Nb,FeedbackScoreBatchItemThreadSource:()=>Lb,FeedbackScoreCompareSource:()=>Hw,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ob,FeedbackScorePublicSource:()=>Ub,FeedbackScoreSource:()=>Ow,FindFeedbackDefinitionsRequestType:()=>ig,FindFeedbackScoreNames1RequestType:()=>fg,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>hg,GetSpansByProjectRequestType:()=>gg,GetWebhookExamplesRequestAlertType:()=>Ku,GuardrailName:()=>sb,GuardrailResult:()=>pb,GuardrailWriteName:()=>cb,GuardrailWriteResult:()=>lb,LlmAsJudgeMessagePublicRole:()=>_w,LlmAsJudgeMessageRole:()=>hw,LlmAsJudgeMessageWriteRole:()=>yw,LlmAsJudgeOutputSchemaPublicType:()=>Aw,LlmAsJudgeOutputSchemaType:()=>ww,LlmAsJudgeOutputSchemaWriteType:()=>kw,LogItemLevel:()=>Cw,ManualEvaluationRequestEntityType:()=>ub,NotFoundError:()=>A,NotImplementedError:()=>Je,OptimizationPublicStatus:()=>hb,OptimizationStatus:()=>gb,OptimizationUpdateStatus:()=>ng,OptimizationWriteStatus:()=>fb,ProjectDetailedVisibility:()=>yb,ProjectMetricRequestPublicInterval:()=>lg,ProjectMetricRequestPublicMetricType:()=>cg,ProjectMetricResponsePublicInterval:()=>Rb,ProjectMetricResponsePublicMetricType:()=>xb,ProjectPublicVisibility:()=>bb,ProjectUpdateVisibility:()=>pg,ProjectVisibility:()=>wb,ProjectWriteVisibility:()=>sg,PromptDetailTemplateStructure:()=>Tb,PromptPublicTemplateStructure:()=>Cb,PromptTemplateStructure:()=>zb,PromptType:()=>kb,PromptVersionDetailTemplateStructure:()=>Ab,PromptVersionDetailType:()=>_b,PromptVersionPublicTemplateStructure:()=>Pb,PromptVersionPublicType:()=>Eb,PromptVersionTemplateStructure:()=>Sb,PromptVersionType:()=>vb,PromptWriteTemplateStructure:()=>dg,PromptWriteType:()=>mg,ProviderApiKeyProvider:()=>db,ProviderApiKeyPublicProvider:()=>mb,ProviderApiKeyWriteProvider:()=>ag,ResponseFormatType:()=>Iw,SpanExperimentItemBulkWriteViewType:()=>tb,SpanFilterOperator:()=>bw,SpanFilterPublicOperator:()=>Tw,SpanFilterWriteOperator:()=>zw,SpanPublicType:()=>Db,SpanSearchStreamRequestPublicType:()=>wg,SpanType:()=>ve,SpanUpdateType:()=>jb,SpanWriteType:()=>Ib,StartMultipartUploadRequestEntityType:()=>Qu,TraceFilterOperator:()=>xw,TraceFilterPublicOperator:()=>Ew,TraceFilterWriteOperator:()=>vw,TracePublicVisibilityMode:()=>Wb,TraceThreadFilterOperator:()=>Rw,TraceThreadFilterPublicOperator:()=>Pw,TraceThreadFilterWriteOperator:()=>Sw,TraceThreadStatus:()=>Bb,TraceVisibilityMode:()=>rb,UnauthorizedError:()=>$,UnprocessableEntityError:()=>L,UploadAttachmentRequestEntityType:()=>Yu,ValueEntryCompareSource:()=>Jw,ValueEntryExperimentItemBulkWriteViewSource:()=>ib,ValueEntryPublicSource:()=>Mb,ValueEntrySource:()=>Ww,WebhookTestResultStatus:()=>lw,alerts:()=>li,annotationQueues:()=>Dn,attachments:()=>mi,automationRuleEvaluators:()=>Nn,chatCompletions:()=>Fn,check:()=>Mn,dashboards:()=>On,datasets:()=>di,experiments:()=>ui,feedbackDefinitions:()=>gi,guardrails:()=>Wn,llmProviderKey:()=>fi,manualEvaluation:()=>Bn,openTelemetryIngestion:()=>Ln,optimizations:()=>hi,projects:()=>wi,prompts:()=>bi,redirect:()=>Kn,serviceToggles:()=>Vn,spans:()=>xi,systemUsage:()=>Un,traces:()=>Hn,welcomeWizard:()=>Jn,workspaces:()=>Xn});var li={};E(li,{GetWebhookExamplesRequestAlertType:()=>Ku});var Ku={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var mi={};E(mi,{AttachmentListRequestEntityType:()=>Gu,DownloadAttachmentRequestEntityType:()=>$u,StartMultipartUploadRequestEntityType:()=>Qu,UploadAttachmentRequestEntityType:()=>Yu});var Gu={Trace:"trace",Span:"span"};var $u={Trace:"trace",Span:"span"};var Qu={Trace:"trace",Span:"span"};var Yu={Trace:"trace",Span:"span"};var di={};E(di,{DatasetUpdateVisibility:()=>qu,DatasetWriteVisibility:()=>Zu});var Zu={Private:"private",Public:"public"};var qu={Private:"private",Public:"public"};var ui={};E(ui,{ExperimentUpdateStatus:()=>tg,ExperimentUpdateType:()=>og,ExperimentWriteStatus:()=>rg,ExperimentWriteType:()=>eg});var eg={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var rg={Running:"running",Completed:"completed",Cancelled:"cancelled"};var og={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var tg={Running:"running",Completed:"completed",Cancelled:"cancelled"};var gi={};E(gi,{FindFeedbackDefinitionsRequestType:()=>ig});var ig={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var fi={};E(fi,{ProviderApiKeyWriteProvider:()=>ag});var ag={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikFree:"opik-free"};var hi={};E(hi,{OptimizationUpdateStatus:()=>ng});var ng={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var wi={};E(wi,{ProjectMetricRequestPublicInterval:()=>lg,ProjectMetricRequestPublicMetricType:()=>cg,ProjectUpdateVisibility:()=>pg,ProjectWriteVisibility:()=>sg});var sg={Private:"private",Public:"public"};var pg={Private:"private",Public:"public"};var cg={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var lg={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var bi={};E(bi,{CreatePromptVersionDetailTemplateStructure:()=>ug,PromptWriteTemplateStructure:()=>dg,PromptWriteType:()=>mg});var mg={Mustache:"mustache",Jinja2:"jinja2"};var dg={Text:"text",Chat:"chat"};var ug={Text:"text",Chat:"chat"};var xi={};E(xi,{FindFeedbackScoreNames1RequestType:()=>fg,GetSpanStatsRequestType:()=>hg,GetSpansByProjectRequestType:()=>gg,SpanSearchStreamRequestPublicType:()=>wg});var gg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var fg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var hg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var wg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Un={};var Dn={};var Mn={};var Nn={};var Fn={};var On={};var Wn={};var Bn={};var Ln={};var Vn={};var Hn={};var Jn={};var Xn={};var Kn={};var rw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var ow={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var tw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var iw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var aw={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var nw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var sw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var pw={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};var cw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var lw={Success:"success",Failure:"failure"};var mw={Trace:"trace",Thread:"thread"};var dw={Trace:"trace",Thread:"thread"};var uw={Trace:"trace",Thread:"thread"};var gw={Trace:"trace",Span:"span"};var fw={Trace:"trace",Span:"span"};var hw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var ww={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var bw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var xw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Rw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var yw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var kw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var zw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var vw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Sw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var _w={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var Aw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var Tw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Ew={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Pw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Cw={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var jw={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var Iw={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var Uw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Dw={Private:"private",Public:"public"};var Mw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Nw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Fw={Default:"default",Hidden:"hidden"};var Ow={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ww={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Gn={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Bw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Lw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Vw={Default:"default",Hidden:"hidden"};var Hw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Jw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Xw={Private:"private",Public:"public"};var Kw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Gw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var $w={Default:"default",Hidden:"hidden"};var Qw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Yw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var $n={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Zw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var qw={Topic:"TOPIC",Pii:"PII"};var eb={Passed:"passed",Failed:"failed"};var ve={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var rb={Default:"default",Hidden:"hidden"};var ob={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var tb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ib={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var ab={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var nb={Running:"running",Completed:"completed",Cancelled:"cancelled"};var sb={Topic:"TOPIC",Pii:"PII"};var pb={Passed:"passed",Failed:"failed"};var cb={Topic:"TOPIC",Pii:"PII"};var lb={Passed:"passed",Failed:"failed"};var mb={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikFree:"opik-free"};var db={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikFree:"opik-free"};var ub={Trace:"trace",Thread:"thread",Span:"span"};var gb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var fb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var hb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var wb={Private:"private",Public:"public"};var bb={Private:"private",Public:"public"};var xb={FeedbackScores:"FEEDBACK_SCORES",TraceCount:"TRACE_COUNT",TokenUsage:"TOKEN_USAGE",Duration:"DURATION",Cost:"COST",GuardrailsFailedCount:"GUARDRAILS_FAILED_COUNT",ThreadCount:"THREAD_COUNT",ThreadDuration:"THREAD_DURATION",ThreadFeedbackScores:"THREAD_FEEDBACK_SCORES"};var Rb={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var yb={Private:"private",Public:"public"};var kb={Mustache:"mustache",Jinja2:"jinja2"};var zb={Text:"text",Chat:"chat"};var vb={Mustache:"mustache",Jinja2:"jinja2"};var Sb={Text:"text",Chat:"chat"};var _b={Mustache:"mustache",Jinja2:"jinja2"};var Ab={Text:"text",Chat:"chat"};var Tb={Text:"text",Chat:"chat"};var Eb={Mustache:"mustache",Jinja2:"jinja2"};var Pb={Text:"text",Chat:"chat"};var Cb={Text:"text",Chat:"chat"};var jb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ib={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ub={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Db={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Mb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Nb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Fb={Topic:"TOPIC",Pii:"PII"};var Ob={Passed:"passed",Failed:"failed"};var Wb={Default:"default",Hidden:"hidden"};var Bb={Active:"active",Inactive:"inactive"};var Lb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ue=(a,t,e)=>JSON.stringify(a,t,e);var p=class a extends Error{constructor({message:t,statusCode:e,body:o,rawResponse:i}){super(Vb({message:t,statusCode:e,body:o})),Object.setPrototypeOf(this,a.prototype),this.statusCode=e,this.body=o,this.rawResponse=i;}};function Vb({message:a,statusCode:t,body:e}){let o=[];return a!=null&&o.push(a),t!=null&&o.push(`Status code: ${t.toString()}`),e!=null&&o.push(`Body: ${Ue(e,void 0,2)}`),o.join(`
3
+ `)}var h=class a extends Error{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype);}};var _=class a extends p{constructor(t,e){super({message:"BadRequestError",statusCode:400,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var N=class a extends p{constructor(t,e){super({message:"ConflictError",statusCode:409,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var L=class a extends p{constructor(t,e){super({message:"UnprocessableEntityError",statusCode:422,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var A=class a extends p{constructor(t,e){super({message:"NotFoundError",statusCode:404,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var $=class a extends p{constructor(t,e){super({message:"UnauthorizedError",statusCode:401,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Z=class a extends p{constructor(t,e){super({message:"ForbiddenError",statusCode:403,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Je=class a extends p{constructor(t,e){super({message:"NotImplementedError",statusCode:501,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var b={Default:"http://localhost:5173/api"};var Wr;typeof globalThis.Headers!="undefined"?Wr=globalThis.Headers:Wr=class bg{constructor(t){if(this.headers=new Map,t)if(t instanceof bg)t.forEach((e,o)=>this.append(o,e));else if(Array.isArray(t))for(let[e,o]of t)if(typeof e=="string"&&typeof o=="string")this.append(e,o);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,o]of Object.entries(t))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(t,e){let o=t.toLowerCase(),i=this.headers.get(o)||[];this.headers.set(o,[...i,e]);}delete(t){let e=t.toLowerCase();this.headers.delete(e);}get(t){let e=t.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(t){let e=t.toLowerCase();return this.headers.has(e)}set(t,e){let o=t.toLowerCase();this.headers.set(o,[e]);}forEach(t,e){let o=e?t.bind(e):t;this.headers.forEach((i,n)=>o(i.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[t,e]of this.headers.entries())yield [t,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let t of this.headers.values())yield t.join(", ");}[Symbol.iterator](){return this.entries()}};var Ri={headers:new Wr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},yi={headers:new Wr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function ki(a){return {headers:a.headers,redirected:a.redirected,status:a.status,statusText:a.statusText,type:a.type,url:a.url}}function xg(a,t){return Object.keys(t!=null?t:{}).length>0?`${a}?${Hb__default.default.stringify(t,{arrayFormat:"repeat"})}`:a}var d=Jb();function Jb(){var u,g,f,y,z;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((f=self.constructor)==null?void 0:f.name)==="ServiceWorkerGlobalScope"||((y=self.constructor)==null?void 0:y.name)==="SharedWorkerGlobalScope")?{type:"web-worker"}:typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined"?{type:"deno",version:Deno.version.deno}:typeof Bun!="undefined"&&typeof Bun.version!="undefined"?{type:"bun",version:Bun.version}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((z=process.versions)!=null&&z.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function Rg(){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?fetch:d.type==="node"?(await import('node-fetch')).default:typeof fetch=="function"?fetch:(await import('node-fetch')).default}async function yg({body:a,type:t}){return t.includes("json")?Ue(a):a}async function Tg(a){return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?new(await Promise.resolve().then(()=>(zg(),kg))).Node18UniversalStreamWrapper(a):d.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(Sg(),vg))).UndiciStreamWrapper(a):new(await Promise.resolve().then(()=>(Ag(),_g))).NodePre18StreamWrapper(a)}async function Eg(a,t){if(a.body!=null&&t==="blob")return await a.blob();if(a.body!=null&&t==="arrayBuffer")return await a.arrayBuffer();if(a.body!=null&&t==="sse")return a.body;if(a.body!=null&&t==="streaming")return Tg(a.body);if(a.body!=null&&t==="text")return await a.text();{let e=await a.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:a.status,rawBody:e}}}else return}}var Xb="timeout";function Pg(a){let t=new AbortController,e=setTimeout(()=>t.abort(Xb),a);return {signal:t.signal,abortId:e}}function Cg(...a){let t=a.length===1&&Array.isArray(a[0])?a[0]:a,e=new AbortController;for(let o of t){if(o.aborted){e.abort(o==null?void 0:o.reason);break}o.addEventListener("abort",()=>e.abort(o==null?void 0:o.reason),{signal:e.signal});}return e.signal}var jg=async(a,t,e,o,i,n,c,m,u)=>{let g=[],f;if(n!=null){let{signal:v,abortId:S}=Pg(n);f=S,g.push(v);}c!=null&&g.push(c);let y=Cg(g),z=await a(t,{method:e,headers:o,body:i,signal:y,credentials:m?"include":void 0,duplex:u});return f!=null&&clearTimeout(f),z};function Kb(a){let t=1+(Math.random()*2-1)*.2;return a*t}async function Ig(a,t=2){let e=await a();for(let o=0;o<t&&([408,429].includes(e.status)||e.status>=500);++o){let i=Math.min(1e3*Math.pow(2,o),6e4),n=Kb(i);await new Promise(c=>setTimeout(c,n)),e=await a();}return e}async function Gb(a){let t={};if(a.body!==void 0&&a.contentType!=null&&(t["Content-Type"]=a.contentType),a.headers!=null)for(let[n,c]of Object.entries(a.headers))c!=null&&(t[n]=c);let e=xg(a.url,a.queryParameters),o=await yg({body:a.body,type:a.requestType==="json"?"json":"other"}),i=await Rg();try{let n=await Ig(async()=>jg(i,e,a.method,t,o,a.timeoutMs,a.abortSignal,a.withCredentials,a.duplex),a.maxRetries),c=await Eg(n,a.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:ki(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:ki(n)}}catch(n){return a.abortSignal!=null&&a.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:Ri}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:Ri}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:yi}:{ok:false,error:{reason:"unknown",errorMessage:Ue(n)},rawResponse:yi}}}var x=Gb;var s={get:async a=>typeof a=="function"?a():a};var w=class a extends Promise{constructor(t){super(e=>{e(void 0);}),this.innerPromise=t;}static fromFunction(t,...e){return new a(t(...e))}static interceptFunction(t){return (...e)=>a.fromPromise(t(...e))}static fromPromise(t){return new a(t)}static fromExecutor(t){let e=new Promise(t);return new a(e)}static fromResult(t){let e=Promise.resolve(t);return new a(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:t})=>t)),this.unwrappedPromise}then(t,e){return this.unwrap().then(t,e)}catch(t){return this.unwrap().catch(t)}finally(t){return this.unwrap().finally(t)}async withRawResponse(){return await this.innerPromise}};function ds(a){return typeof a=="object"&&a!=null&&"name"in a}function us(a){return typeof a=="object"&&a!=null&&"path"in a}function gs(a){let t=a.lastIndexOf("/"),e=a.lastIndexOf("\\"),o=Math.max(t,e);return o>=0?a.substring(o+1):a}async function ff(){let a;return d.type==="node"&&d.parsedVersion!=null&&d.parsedVersion>=18?a=new cs:d.type==="node"?a=new ls:a=new ms,await a.setup(),a}var cs=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ds(t))return t.name;if(us(t)&&t.path)return gs(t.path.toString())}async appendFile(t,e,o){var i,n;o=this.getFileName(e,o),e instanceof Blob?(i=this.fd)==null||i.append(t,e,o):(n=this.fd)==null||n.append(t,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let t=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(t),headers:t.headers,duplex:"half"}}},ls=class{async setup(){this.fd=new(await Promise.resolve().then(()=>Bh(gf()))).default;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ds(t))return t.name;if(us(t)&&t.path)return gs(t.path.toString())}async appendFile(t,e,o){var n,c;o=this.getFileName(e,o);let i;e instanceof Blob?i=Buffer.from(await e.arrayBuffer()):i=e,o==null?(n=this.fd)==null||n.append(t,i):(c=this.fd)==null||c.append(t,i,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},ms=class{async setup(){this.fd=new FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ds(t))return t.name;if(us(t)&&t.path)return gs(t.path.toString())}async appendFile(t,e,o){var i,n;if(o=this.getFileName(e,o),e instanceof Blob){(i=this.fd)==null||i.append(t,e,o);return}(n=this.fd)==null||n.append(t,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>fr,ParseError:()=>hr,any:()=>Pf,bigint:()=>wf,boolean:()=>Cf,booleanLiteral:()=>Ef,date:()=>bf,discriminant:()=>Wf,enum_:()=>_i,getObjectLikeUtils:()=>be,getObjectUtils:()=>Xe,getSchemaUtils:()=>D,isProperty:()=>Me,lazy:()=>xf,lazyObject:()=>_f,list:()=>Ti,number:()=>jf,object:()=>Ai,objectWithoutOptionalProperties:()=>Sf,optional:()=>fs,property:()=>yf,record:()=>Mf,set:()=>Nf,string:()=>If,stringLiteral:()=>Tf,transform:()=>hs,undiscriminatedUnion:()=>Of,union:()=>Lf,unknown:()=>Uf,withParsedProperties:()=>bs});var T={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function U(a,t){return `Expected ${t}. Received ${jx(a)}.`}function jx(a){if(Array.isArray(a))return "list";if(a===null)return "null";if(a instanceof BigInt)return "BigInt";switch(typeof a){case "string":return `"${a}"`;case "bigint":case "number":case "boolean":case "undefined":return `${a}`}return typeof a}function Q(a){return {...a,json:hf(a.json),parse:hf(a.parse)}}function hf(a){return (t,e)=>{let o=a(t,e),{skipValidation:i=false}=e!=null?e:{};return !o.ok&&i?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
4
+ `)),{ok:true,value:t}):o}}function Si(a){return a.path.length===0?a.message:`${a.path.join(" -> ")}: ${a.message}`}var fr=class a extends Error{constructor(e){super(e.map(Si).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};var hr=class a extends Error{constructor(e){super(e.map(Si).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};function D(a){return {nullable:()=>Ix(a),optional:()=>fs(a),optionalNullable:()=>Ux(a),transform:t=>hs(a,t),parseOrThrow:(t,e)=>{let o=a.parse(t,e);if(o.ok)return o.value;throw new hr(o.errors)},jsonOrThrow:(t,e)=>{let o=a.json(t,e);if(o.ok)return o.value;throw new fr(o.errors)}}}function Ix(a){let t={parse:(e,o)=>e==null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.NULLABLE};return {...t,...D(t)}}function fs(a){let t={parse:(e,o)=>e==null?{ok:true,value:void 0}:a.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL};return {...t,...D(t)}}function Ux(a){let t={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL_NULLABLE};return {...t,...D(t)}}function hs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);return n.ok?{ok:true,value:t.transform(n.value)}:n},json:(o,i)=>{let n=t.untransform(o);return a.json(n,i)},getType:()=>a.getType()};return {...e,...D(e)}}function wf(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t=="bigint"?{ok:true,value:t}:typeof t=="number"?{ok:true,value:BigInt(t)}:{ok:false,errors:[{path:e,message:U(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="bigint"?{ok:false,errors:[{path:e,message:U(t,"bigint")}]}:{ok:true,value:t},getType:()=>T.BIGINT};return {...Q(a),...D(a)}}var Dx=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function bf(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:e,message:U(t,"string")}]}:Dx.test(t)?{ok:true,value:new Date(t)}:{ok:false,errors:[{path:e,message:U(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>t instanceof Date?{ok:true,value:t.toISOString()}:{ok:false,errors:[{path:e,message:U(t,"Date object")}]},getType:()=>T.DATE};return {...Q(a),...D(a)}}function q(a,t){return ()=>{let e={parse:t,json:t,getType:()=>a};return {...Q(e),...D(e)}}}function _i(a){let t=new Set(a);return q(T.ENUM,(o,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:U(o,"string")}]}:!t.has(o)&&!i?{ok:false,errors:[{path:n,message:U(o,"enum")}]}:{ok:true,value:o})()}function xf(a){let t=ws(a);return {...t,...D(t)}}function ws(a){return {parse:(t,e)=>wr(a).parse(t,e),json:(t,e)=>wr(a).json(t,e),getType:()=>wr(a).getType()}}function wr(a){let t=a;return t.__zurg_memoized==null&&(t.__zurg_memoized=a()),t.__zurg_memoized}function Br(a){return Object.entries(a)}function Lr(a,t){let e=new Set(t);return Object.entries(a).reduce((o,[i,n])=>(e.has(i)&&(o[i]=n),o),{})}function De(a){if(typeof a!="object"||a===null)return false;if(Object.getPrototypeOf(a)===null)return true;let t=a;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(a)===t}function Vr(a){return Object.keys(a)}function Rf(a,t){let e=[],o=[];for(let i of a)t(i)?e.push(i):o.push(i);return [e,o]}function be(a){return {withParsedProperties:t=>bs(a,t)}}function bs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);if(!n.ok)return n;let c=Object.entries(t).reduce((m,[u,g])=>({...m,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,i)=>{var m;if(!De(o))return {ok:false,errors:[{path:(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],message:U(o,"object")}]};let n=new Set(Object.keys(t)),c=Lr(o,Object.keys(o).filter(u=>!n.has(u)));return a.json(c,i)},getType:()=>a.getType()};return {...e,...D(e),...be(e)}}function yf(a,t){return {rawKey:a,valueSchema:t,isProperty:true}}function Me(a){return a.isProperty}function Ai(a){let t={_getRawProperties:()=>Object.entries(a).map(([e,o])=>Me(o)?o.rawKey:e),_getParsedProperties:()=>Vr(a),parse:(e,o)=>{let i={},n=[];for(let[c,m]of Br(a)){let u=Me(m)?m.rawKey:c,g=Me(m)?m.valueSchema:m,f={rawKey:u,parsedKey:c,valueSchema:g};i[u]=f,vf(g)&&n.push(u);}return kf({value:e,requiredKeys:n,getProperty:c=>{let m=i[c];if(m!=null)return {transformedKey:m.parsedKey,transform:u=>{var g;return m.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let i=[];for(let[n,c]of Br(a)){let m=Me(c)?c.valueSchema:c;vf(m)&&i.push(n);}return kf({value:e,requiredKeys:i,getProperty:n=>{let c=a[n];if(c!=null)return Me(c)?{transformedKey:c.rawKey,transform:m=>{var u;return c.valueSchema.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}:{transformedKey:n,transform:m=>{var u;return c.json(m,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},getType:()=>T.OBJECT};return {...Q(t),...D(t),...be(t),...Xe(t)}}function kf({value:a,requiredKeys:t,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:i=false,breadcrumbsPrefix:n=[]}){if(!De(a))return {ok:false,errors:[{path:n,message:U(a,"object")}]};let c=new Set(t),m=[],u={};for(let[g,f]of Object.entries(a)){let y=e(g);if(y!=null){c.delete(g);let z=y.transform(f);z.ok?u[y.transformedKey]=z.value:(u[g]=f,m.push(...z.errors));}else switch(o){case "fail":m.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=f;break}}return m.push(...t.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),m.length===0||i?{ok:true,value:u}:{ok:false,errors:m}}function Xe(a){return {extend:t=>{let e={_getParsedProperties:()=>[...a._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...a._getRawProperties(),...t._getRawProperties()],parse:(o,i)=>zf({extensionKeys:t._getRawProperties(),value:o,transformBase:n=>a.parse(n,i),transformExtension:n=>t.parse(n,i)}),json:(o,i)=>zf({extensionKeys:t._getParsedProperties(),value:o,transformBase:n=>a.json(n,i),transformExtension:n=>t.json(n,i)}),getType:()=>T.OBJECT};return {...e,...D(e),...be(e),...Xe(e)}},passthrough:()=>{let t={_getParsedProperties:()=>a._getParsedProperties(),_getRawProperties:()=>a._getRawProperties(),parse:(e,o)=>{let i=a.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},json:(e,o)=>{let i=a.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},getType:()=>T.OBJECT};return {...t,...D(t),...be(t),...Xe(t)}}}}function zf({extensionKeys:a,value:t,transformBase:e,transformExtension:o}){let i=new Set(a),[n,c]=Rf(Vr(t),g=>i.has(g)),m=e(Lr(t,c)),u=o(Lr(t,n));return m.ok&&u.ok?{ok:true,value:{...m.value,...u.value}}:{ok:false,errors:[...m.ok?[]:m.errors,...u.ok?[]:u.errors]}}function vf(a){return !Mx(a)}function Mx(a){switch(a.getType()){case T.ANY:case T.UNKNOWN:case T.OPTIONAL:case T.OPTIONAL_NULLABLE:return true;default:return false}}function Sf(a){return Ai(a)}function _f(a){let t={...ws(a),_getRawProperties:()=>wr(a)._getRawProperties(),_getParsedProperties:()=>wr(a)._getParsedProperties()};return {...t,...D(t),...be(t),...Xe(t)}}function Ti(a){let t={parse:(e,o)=>Af(e,(i,n)=>{var c;return a.parse(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>Af(e,(i,n)=>{var c;return a.json(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>T.LIST};return {...Q(t),...D(t)}}function Af(a,t){return Array.isArray(a)?a.map((o,i)=>t(o,i)).reduce((o,i)=>{if(o.ok&&i.ok)return {ok:true,value:[...o.value,i.value]};let n=[];return o.ok||n.push(...o.errors),i.ok||n.push(...i.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:U(a,"list"),path:[]}]}}function Tf(a){return q(T.STRING_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`"${a}"`)}]})()}function Ef(a){return q(T.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:o=[]}={})=>e===a?{ok:true,value:a}:{ok:false,errors:[{path:o,message:U(e,`${a.toString()}`)}]})()}var Pf=q(T.ANY,a=>({ok:true,value:a}));var Cf=q(T.BOOLEAN,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="boolean"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"boolean")}]});var jf=q(T.NUMBER,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="number"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"number")}]});var If=q(T.STRING,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="string"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"string")}]});var Uf=q(T.UNKNOWN,a=>({ok:true,value:a}));function Mf(a,t){let e={parse:(o,i)=>Df({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.parse(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return t.parse(n,{...i,breadcrumbsPrefix:[...(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(o,i)=>Df({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.json(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var m;return t.json(n,{...i,breadcrumbsPrefix:[...(m=i==null?void 0:i.breadcrumbsPrefix)!=null?m:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>T.RECORD};return {...Q(e),...D(e)}}function Df({value:a,isKeyNumeric:t,transformKey:e,transformValue:o,breadcrumbsPrefix:i=[]}){return De(a)?Br(a).reduce((n,[c,m])=>{if(m===void 0)return n;let u=n,g=c;if(t){let v=c.length>0?Number(c):NaN;isNaN(v)||(g=v);}let f=e(g),y=o(m,g);if(u.ok&&f.ok&&y.ok)return {ok:true,value:{...u.value,[f.value]:y.value}};let z=[];return u.ok||z.push(...u.errors),f.ok||z.push(...f.errors),y.ok||z.push(...y.errors),{ok:false,errors:z}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:U(a,"object")}]}}function Nf(a){let t=Ti(a),e={parse:(o,i)=>{let n=t.parse(o,i);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,i)=>{var c;return o instanceof Set?t.json([...o],i):{ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:U(o,"Set")}]}},getType:()=>T.SET};return {...Q(e),...D(e)}}function Of(a){let t={parse:(e,o)=>Ff((i,n)=>i.parse(e,n),a,o),json:(e,o)=>Ff((i,n)=>i.json(e,n),a,o),getType:()=>T.UNDISCRIMINATED_UNION};return {...Q(t),...D(t)}}function Ff(a,t,e){let o=[];for(let[i,n]of t.entries()){let c=a(n,{...e,skipValidation:false});if(c.ok)return c;for(let m of c.errors)o.push({path:m.path,message:`[Variant ${i}] ${m.message}`});}return {ok:false,errors:o}}function Wf(a,t){return {parsedDiscriminant:a,rawDiscriminant:t}}function Lf(a,t){let e=typeof a=="string"?a:a.rawDiscriminant,o=typeof a=="string"?a:a.parsedDiscriminant,i=_i(Vr(t)),n={parse:(c,m)=>Bf({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return i.parse(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.parse(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),json:(c,m)=>Bf({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return i.json(u,{allowUnrecognizedEnumValues:m==null?void 0:m.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=m==null?void 0:m.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:m==null?void 0:m.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,m),breadcrumbsPrefix:m==null?void 0:m.breadcrumbsPrefix}),getType:()=>T.UNION};return {...Q(n),...D(n),...be(n)}}function Bf({value:a,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:m=[]}){if(!De(a))return {ok:false,errors:[{path:m,message:U(a,"object")}]};let{[t]:u,...g}=a;if(u==null)return {ok:false,errors:[{path:m,message:`Missing discriminant ("${t}")`}]};let f=o(u);if(!f.ok)return {ok:false,errors:f.errors};let y=i(f.value);if(y==null)return n?{ok:true,value:{[e]:f.value,...g}}:{ok:false,errors:[{path:[...m,t],message:"Unexpected discriminant value"}]};let z=c(g,y);return z.ok?{ok:true,value:{[e]:u,...z.value}}:z}function Nx(a){var t=[];if(a.length===0)return "";if(typeof a[0]!="string")throw new TypeError("Url must be a string. Received "+a[0]);if(a[0].match(/^[^/:]+:\/*$/)&&a.length>1){var e=a.shift();a[0]=e+a[0];}a[0].match(/^file:\/\/\//)?a[0]=a[0].replace(/^([^/:]+):\/*/,"$1:///"):a[0]=a[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<a.length;o++){var i=a[o];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(o>0&&(i=i.replace(/^[\/]+/,"")),o<a.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i));}var n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function R(){var a;return typeof arguments[0]=="object"?a=arguments[0]:a=[].slice.call(arguments),Nx(a)}var j={};E(j,{AggregationData:()=>cm,Alert:()=>Vx,AlertAlertType:()=>lp,AlertPagePublic:()=>Tp,AlertPublic:()=>it,AlertPublicAlertType:()=>kp,AlertTrigger:()=>fp,AlertTriggerConfig:()=>gp,AlertTriggerConfigPublic:()=>_p,AlertTriggerConfigPublicType:()=>Sp,AlertTriggerConfigType:()=>up,AlertTriggerConfigWrite:()=>wp,AlertTriggerConfigWriteType:()=>hp,AlertTriggerEventType:()=>dp,AlertTriggerPublic:()=>Ap,AlertTriggerPublicEventType:()=>vp,AlertTriggerWrite:()=>xp,AlertTriggerWriteEventType:()=>bp,AlertWrite:()=>tt,AlertWriteAlertType:()=>Rp,AnnotationQueue:()=>Up,AnnotationQueueBatch:()=>Jx,AnnotationQueueBatchWrite:()=>$o,AnnotationQueueItemIds:()=>ba,AnnotationQueuePagePublic:()=>Np,AnnotationQueuePublic:()=>at,AnnotationQueuePublicScope:()=>Dp,AnnotationQueueReviewer:()=>Ip,AnnotationQueueReviewerPublic:()=>Mp,AnnotationQueueScope:()=>jp,AnnotationQueueUpdate:()=>Qo,AnnotationQueueWrite:()=>Go,AnnotationQueueWriteScope:()=>$s,AssistantMessage:()=>rl,AssistantMessageRole:()=>el,Attachment:()=>Fp,AttachmentListRequestEntityType:()=>Ci,AttachmentPage:()=>Op,AudioUrl:()=>Xp,AudioUrlPublic:()=>Ec,AudioUrlWrite:()=>sc,AuthDetailsHolder:()=>Hp,AutomationRuleEvaluator:()=>Kx,AutomationRuleEvaluatorLlmAsJudge:()=>ec,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ft,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>fc,AutomationRuleEvaluatorObjectObjectPublic:()=>Bc,AutomationRuleEvaluatorPagePublic:()=>Lc,AutomationRuleEvaluatorPublic:()=>Vc,AutomationRuleEvaluatorSpanLlmAsJudge:()=>ac,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>Rt,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>bc,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>nc,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>yt,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>Rc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>oc,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>bt,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>zc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>tc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>xt,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Sc,AutomationRuleEvaluatorUpdate:()=>qc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Kc,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Yc,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>Zc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>$c,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>Qc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>Gc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>rc,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>wt,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>Ac,AutomationRuleEvaluatorWrite:()=>Tc,AvgValueStatPublic:()=>El,BatchDelete:()=>B,BatchDeleteByProject:()=>uR,BiInformation:()=>ap,BiInformationResponse:()=>yr,BooleanFeedbackDefinition:()=>gm,BooleanFeedbackDefinitionCreate:()=>ym,BooleanFeedbackDefinitionPublic:()=>jt,BooleanFeedbackDefinitionUpdate:()=>Nm,BooleanFeedbackDetail:()=>um,BooleanFeedbackDetailCreate:()=>Rm,BooleanFeedbackDetailPublic:()=>Tm,BooleanFeedbackDetailUpdate:()=>Mm,CategoricalFeedbackDefinition:()=>hm,CategoricalFeedbackDefinitionCreate:()=>zm,CategoricalFeedbackDefinitionPublic:()=>It,CategoricalFeedbackDefinitionUpdate:()=>Om,CategoricalFeedbackDetail:()=>fm,CategoricalFeedbackDetailCreate:()=>km,CategoricalFeedbackDetailPublic:()=>Em,CategoricalFeedbackDetailUpdate:()=>Fm,ChatCompletionChoice:()=>tl,ChatCompletionRequest:()=>Zo,ChatCompletionResponse:()=>sl,Check:()=>Ql,CheckName:()=>Gl,CheckPublic:()=>lu,CheckPublicName:()=>pu,CheckPublicResult:()=>cu,CheckResult:()=>$l,ChunkedOutputJsonNode:()=>Yx,ChunkedOutputJsonNodePublic:()=>rR,ChunkedOutputJsonNodePublicType:()=>dm,ChunkedOutputJsonNodeType:()=>Ll,Column:()=>Wl,ColumnCompare:()=>fl,ColumnCompareTypesItem:()=>gl,ColumnPublic:()=>Nl,ColumnPublicTypesItem:()=>Ml,ColumnTypesItem:()=>Ol,Comment:()=>H,CommentCompare:()=>hl,CommentPublic:()=>pr,CompleteMultipartUploadRequest:()=>xa,CompleteMultipartUploadRequestEntityType:()=>Wp,CompletionTokensDetails:()=>al,CountValueStatPublic:()=>Pl,CreateDatasetItemsFromSpansRequest:()=>Qr,CreateDatasetItemsFromTracesRequest:()=>Yr,CreatePromptVersionDetail:()=>_o,CreatePromptVersionDetailTemplateStructure:()=>ia,DashboardPagePublic:()=>pl,DashboardPublic:()=>nr,DashboardUpdatePublic:()=>et,DashboardWrite:()=>qo,DataPointDouble:()=>gR,DataPointNumberPublic:()=>Td,Dataset:()=>Gx,DatasetExpansion:()=>Qx,DatasetExpansionResponse:()=>ul,DatasetExpansionWrite:()=>ro,DatasetIdentifier:()=>qr,DatasetIdentifierPublic:()=>oo,DatasetItem:()=>vt,DatasetItemBatch:()=>$x,DatasetItemBatchUpdate:()=>Xr,DatasetItemBatchWrite:()=>$r,DatasetItemChangesPublic:()=>cl,DatasetItemCompare:()=>vl,DatasetItemCompareSource:()=>wl,DatasetItemFilter:()=>Jr,DatasetItemFilterOperator:()=>xs,DatasetItemPageCompare:()=>Sl,DatasetItemPagePublic:()=>Fl,DatasetItemPublic:()=>Tt,DatasetItemPublicSource:()=>Ul,DatasetItemSource:()=>dl,DatasetItemStreamRequest:()=>to,DatasetItemUpdate:()=>Rs,DatasetItemWrite:()=>Gr,DatasetItemWriteSource:()=>ys,DatasetItemsDelete:()=>eo,DatasetPagePublic:()=>Tl,DatasetPublic:()=>Ar,DatasetPublicStatus:()=>Al,DatasetPublicVisibility:()=>_l,DatasetStatus:()=>ml,DatasetUpdate:()=>Zr,DatasetUpdateVisibility:()=>Ni,DatasetVersionDiff:()=>Hl,DatasetVersionDiffStats:()=>Vl,DatasetVersionPagePublic:()=>Jl,DatasetVersionPublic:()=>sr,DatasetVersionRestorePublic:()=>ao,DatasetVersionSummary:()=>zt,DatasetVersionSummaryPublic:()=>St,DatasetVersionTag:()=>io,DatasetVersionUpdatePublic:()=>no,DatasetVisibility:()=>ll,DatasetWrite:()=>Kr,DatasetWriteVisibility:()=>Mi,DeleteAttachmentsRequest:()=>Xx,DeleteAttachmentsRequestEntityType:()=>Lp,DeleteFeedbackScore:()=>Bt,DeleteIdsHolder:()=>Tr,DeleteThreadFeedbackScores:()=>Vo,DeleteTraceThreads:()=>Ho,Delta:()=>ol,DownloadAttachmentRequestEntityType:()=>ji,ErrorCountWithDeviation:()=>Ot,ErrorCountWithDeviationDetailed:()=>Dd,ErrorInfo:()=>Te,ErrorInfoExperimentItemBulkWriteView:()=>mo,ErrorInfoPublic:()=>Lt,ErrorInfoWrite:()=>Po,ErrorMessage:()=>ae,ErrorMessageDetail:()=>lR,ErrorMessageDetailed:()=>pR,ErrorMessagePublic:()=>Hx,Experiment:()=>Zx,ExperimentGroupAggregationsResponse:()=>mm,ExperimentGroupResponse:()=>pm,ExperimentItem:()=>po,ExperimentItemBulkRecord:()=>em,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Ms,ExperimentItemBulkUpload:()=>qx,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>uo,ExperimentItemCompare:()=>zl,ExperimentItemCompareTraceVisibilityMode:()=>kl,ExperimentItemPublic:()=>At,ExperimentItemPublicTraceVisibilityMode:()=>Dl,ExperimentItemStreamRequest:()=>ho,ExperimentItemTraceVisibilityMode:()=>Ts,ExperimentItemsBatch:()=>co,ExperimentItemsDelete:()=>lo,ExperimentPagePublic:()=>im,ExperimentPublic:()=>Ct,ExperimentPublicStatus:()=>om,ExperimentPublicType:()=>rm,ExperimentScore:()=>go,ExperimentScorePublic:()=>tm,ExperimentScoreWrite:()=>vs,ExperimentStatus:()=>Kl,ExperimentStreamRequestPublic:()=>wo,ExperimentType:()=>Xl,ExperimentUpdate:()=>fo,ExperimentUpdateStatus:()=>Li,ExperimentUpdateType:()=>Bi,ExperimentWrite:()=>so,ExperimentWriteStatus:()=>Wi,ExperimentWriteType:()=>Oi,ExportTraceServiceRequest:()=>aR,Feedback:()=>oR,FeedbackCreate:()=>Am,FeedbackDefinitionPagePublic:()=>Im,FeedbackObjectPublic:()=>jm,FeedbackPublic:()=>Dm,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>ne,FeedbackScoreAverageDetailed:()=>Md,FeedbackScoreAveragePublic:()=>Qe,FeedbackScoreBatch:()=>Ht,FeedbackScoreBatchItem:()=>su,FeedbackScoreBatchItemSource:()=>nu,FeedbackScoreBatchItemThread:()=>Ks,FeedbackScoreBatchItemThreadSource:()=>Xs,FeedbackScoreBatchThread:()=>Jo,FeedbackScoreCompare:()=>yl,FeedbackScoreCompareSource:()=>bl,FeedbackScoreExperimentItemBulkWriteView:()=>Ds,FeedbackScoreExperimentItemBulkWriteViewSource:()=>js,FeedbackScoreNames:()=>Ad,FeedbackScorePublic:()=>Er,FeedbackScorePublicSource:()=>ru,FeedbackScoreSource:()=>Ss,FeedbackUpdate:()=>Vm,FindFeedbackDefinitionsRequestType:()=>Ji,FindFeedbackScoreNames1RequestType:()=>sa,Function:()=>Yo,FunctionCall:()=>Ee,GetSpanStatsRequestType:()=>pa,GetSpansByProjectRequestType:()=>na,GetWebhookExamplesRequestAlertType:()=>Ei,GroupContent:()=>am,GroupContentWithAggregations:()=>lm,GroupDetail:()=>nm,GroupDetails:()=>sm,Guardrail:()=>Xm,GuardrailBatch:()=>tR,GuardrailBatchWrite:()=>rt,GuardrailName:()=>Hm,GuardrailResult:()=>Jm,GuardrailWrite:()=>ip,GuardrailWriteName:()=>op,GuardrailWriteResult:()=>tp,GuardrailsValidation:()=>Yl,GuardrailsValidationPublic:()=>mu,IdsHolder:()=>eR,ImageUrl:()=>Qp,ImageUrlPublic:()=>Cc,ImageUrlWrite:()=>lc,JsonListString:()=>M,JsonListStringCompare:()=>Ra,JsonListStringExperimentItemBulkWriteView:()=>xe,JsonListStringPublic:()=>me,JsonListStringWrite:()=>ce,JsonNode:()=>P,JsonNodeDetail:()=>Os,JsonNodePublic:()=>re,JsonNodeWrite:()=>le,JsonSchema:()=>qs,LlmAsJudgeCode:()=>nt,LlmAsJudgeCodePublic:()=>Dc,LlmAsJudgeCodeWrite:()=>gc,LlmAsJudgeMessage:()=>Ze,LlmAsJudgeMessageContent:()=>Zp,LlmAsJudgeMessageContentPublic:()=>Ic,LlmAsJudgeMessageContentWrite:()=>dc,LlmAsJudgeMessagePublic:()=>ir,LlmAsJudgeMessagePublicRole:()=>Pc,LlmAsJudgeMessageRole:()=>$p,LlmAsJudgeMessageWrite:()=>rr,LlmAsJudgeMessageWriteRole:()=>cc,LlmAsJudgeModelParameters:()=>Ye,LlmAsJudgeModelParametersPublic:()=>tr,LlmAsJudgeModelParametersWrite:()=>er,LlmAsJudgeOutputSchema:()=>qe,LlmAsJudgeOutputSchemaPublic:()=>ar,LlmAsJudgeOutputSchemaPublicType:()=>Uc,LlmAsJudgeOutputSchemaType:()=>qp,LlmAsJudgeOutputSchemaWrite:()=>or,LlmAsJudgeOutputSchemaWriteType:()=>uc,LogItem:()=>Jc,LogItemLevel:()=>Hc,LogPage:()=>Xc,ManualEvaluationRequest:()=>Nt,ManualEvaluationRequestEntityType:()=>Qm,ManualEvaluationResponse:()=>Mt,Message:()=>Qs,MultipartUploadPart:()=>Bp,NumericalFeedbackDefinition:()=>bm,NumericalFeedbackDefinitionCreate:()=>Sm,NumericalFeedbackDefinitionPublic:()=>Ut,NumericalFeedbackDefinitionUpdate:()=>Bm,NumericalFeedbackDetail:()=>wm,NumericalFeedbackDetailCreate:()=>vm,NumericalFeedbackDetailPublic:()=>Pm,NumericalFeedbackDetailUpdate:()=>Wm,Optimization:()=>nR,OptimizationPagePublic:()=>yd,OptimizationPublic:()=>Ft,OptimizationPublicStatus:()=>ud,OptimizationStatus:()=>Ym,OptimizationStudioConfig:()=>id,OptimizationStudioConfigPublic:()=>Rd,OptimizationStudioConfigWrite:()=>md,OptimizationStudioLog:()=>kd,OptimizationUpdate:()=>Ro,OptimizationUpdateStatus:()=>$i,OptimizationWrite:()=>za,OptimizationWriteStatus:()=>dd,PageColumns:()=>Bl,PercentageValueStatPublic:()=>Cl,PercentageValues:()=>je,PercentageValuesDetailed:()=>Nd,PercentageValuesPublic:()=>_t,Project:()=>sR,ProjectDetailed:()=>Od,ProjectDetailedVisibility:()=>Fd,ProjectMetricRequestPublic:()=>zo,ProjectMetricRequestPublicInterval:()=>ea,ProjectMetricRequestPublicMetricType:()=>qi,ProjectMetricResponsePublic:()=>jd,ProjectMetricResponsePublicInterval:()=>Pd,ProjectMetricResponsePublicMetricType:()=>Ed,ProjectPagePublic:()=>Sd,ProjectPublic:()=>Wt,ProjectPublicVisibility:()=>vd,ProjectReference:()=>Kp,ProjectReferencePublic:()=>ht,ProjectRetrieveDetailed:()=>vo,ProjectStatItemObjectPublic:()=>Il,ProjectStatsPublic:()=>Ne,ProjectStatsSummary:()=>Ud,ProjectStatsSummaryItem:()=>Id,ProjectUpdate:()=>ko,ProjectUpdateVisibility:()=>Zi,ProjectVisibility:()=>zd,ProjectWrite:()=>yo,ProjectWriteVisibility:()=>Yi,Prompt:()=>cR,PromptDetail:()=>Xd,PromptDetailTemplateStructure:()=>Jd,PromptPagePublic:()=>qd,PromptPublic:()=>Zd,PromptPublicTemplateStructure:()=>Yd,PromptTemplateStructure:()=>Bd,PromptTokensDetails:()=>il,PromptType:()=>Wd,PromptUpdatable:()=>To,PromptVersion:()=>Hd,PromptVersionBatchUpdate:()=>Ao,PromptVersionDetail:()=>Se,PromptVersionDetailTemplateStructure:()=>Bs,PromptVersionDetailType:()=>Ws,PromptVersionLink:()=>ya,PromptVersionLinkPublic:()=>ka,PromptVersionLinkWrite:()=>Hi,PromptVersionPagePublic:()=>Qd,PromptVersionPublic:()=>$d,PromptVersionPublicTemplateStructure:()=>Gd,PromptVersionPublicType:()=>Kd,PromptVersionRetrieveDetail:()=>Eo,PromptVersionTemplateStructure:()=>Vd,PromptVersionType:()=>Ld,PromptVersionUpdate:()=>Ls,PromptWrite:()=>So,PromptWriteTemplateStructure:()=>ta,PromptWriteType:()=>oa,ProviderApiKey:()=>iR,ProviderApiKeyPagePublic:()=>Gm,ProviderApiKeyProvider:()=>$m,ProviderApiKeyPublic:()=>Dt,ProviderApiKeyPublicProvider:()=>Km,ProviderApiKeyUpdate:()=>xo,ProviderApiKeyWrite:()=>bo,ProviderApiKeyWriteProvider:()=>Ki,ResponseFormat:()=>ep,ResponseFormatType:()=>Zs,Result:()=>cr,ResultsNumberPublic:()=>Cd,ScoreName:()=>_d,ServiceTogglesConfig:()=>eu,Span:()=>Pt,SpanBatch:()=>mR,SpanBatchUpdate:()=>Uo,SpanBatchWrite:()=>jo,SpanEnrichmentOptions:()=>ks,SpanExperimentItemBulkWriteView:()=>Cs,SpanExperimentItemBulkWriteViewType:()=>Ps,SpanFilter:()=>Ce,SpanFilterOperator:()=>ic,SpanFilterPublic:()=>Ge,SpanFilterPublicOperator:()=>Js,SpanFilterWrite:()=>ut,SpanFilterWriteOperator:()=>hc,SpanLlmAsJudgeCode:()=>lt,SpanLlmAsJudgeCodePublic:()=>Oc,SpanLlmAsJudgeCodeWrite:()=>wc,SpanPagePublic:()=>au,SpanPublic:()=>Vt,SpanPublicType:()=>iu,SpanSearchStreamRequestPublic:()=>Do,SpanSearchStreamRequestPublicType:()=>ca,SpanType:()=>ql,SpanUpdate:()=>Io,SpanUpdateType:()=>Hs,SpanUserDefinedMetricPythonCode:()=>mt,SpanUserDefinedMetricPythonCodePublic:()=>Wc,SpanUserDefinedMetricPythonCodeWrite:()=>xc,SpanWrite:()=>Co,SpanWriteType:()=>Vs,SpansCountResponse:()=>sp,StartMultipartUploadRequest:()=>Hr,StartMultipartUploadRequestEntityType:()=>Ii,StartMultipartUploadResponse:()=>Vp,StreamOptions:()=>Ys,StudioEvaluation:()=>od,StudioEvaluationPublic:()=>bd,StudioEvaluationWrite:()=>cd,StudioLlmModel:()=>ed,StudioLlmModelPublic:()=>hd,StudioLlmModelWrite:()=>sd,StudioMessage:()=>Zm,StudioMessagePublic:()=>gd,StudioMessageWrite:()=>ad,StudioMetric:()=>rd,StudioMetricPublic:()=>wd,StudioMetricWrite:()=>pd,StudioOptimizer:()=>td,StudioOptimizerPublic:()=>xd,StudioOptimizerWrite:()=>ld,StudioPrompt:()=>qm,StudioPromptPublic:()=>fd,StudioPromptWrite:()=>nd,Tool:()=>rp,ToolCall:()=>kt,Trace:()=>Et,TraceBatch:()=>dR,TraceBatchUpdate:()=>Oo,TraceBatchWrite:()=>No,TraceCountResponse:()=>cp,TraceEnrichmentOptions:()=>zs,TraceExperimentItemBulkWriteView:()=>Es,TraceFilter:()=>Pe,TraceFilterOperator:()=>Gp,TraceFilterPublic:()=>Ae,TraceFilterPublicOperator:()=>Ns,TraceFilterWrite:()=>dt,TraceFilterWriteOperator:()=>pc,TracePagePublic:()=>fu,TracePublic:()=>Jt,TracePublicVisibilityMode:()=>du,TraceSearchStreamRequestPublic:()=>Ko,TraceThread:()=>Xt,TraceThreadBatchIdentifier:()=>Lo,TraceThreadBatchUpdate:()=>Bo,TraceThreadFilter:()=>Re,TraceThreadFilterOperator:()=>Gs,TraceThreadFilterPublic:()=>Ke,TraceThreadFilterPublicOperator:()=>Fs,TraceThreadFilterWrite:()=>gt,TraceThreadFilterWriteOperator:()=>yc,TraceThreadIdentifier:()=>va,TraceThreadLlmAsJudgeCode:()=>pt,TraceThreadLlmAsJudgeCodePublic:()=>Nc,TraceThreadLlmAsJudgeCodeWrite:()=>kc,TraceThreadPage:()=>gu,TraceThreadSearchStreamRequest:()=>Xo,TraceThreadStatus:()=>uu,TraceThreadUpdate:()=>Wo,TraceThreadUserDefinedMetricPythonCode:()=>ct,TraceThreadUserDefinedMetricPythonCodePublic:()=>Fc,TraceThreadUserDefinedMetricPythonCodeWrite:()=>vc,TraceUpdate:()=>Fo,TraceVisibilityMode:()=>Zl,TraceWrite:()=>Mo,UploadAttachmentRequestEntityType:()=>Ui,Usage:()=>nl,UserDefinedMetricPythonCode:()=>st,UserDefinedMetricPythonCodePublic:()=>Mc,UserDefinedMetricPythonCodeWrite:()=>_c,ValueEntry:()=>As,ValueEntryCompare:()=>Rl,ValueEntryCompareSource:()=>xl,ValueEntryExperimentItemBulkWriteView:()=>Us,ValueEntryExperimentItemBulkWriteViewSource:()=>Is,ValueEntryPublic:()=>tu,ValueEntryPublicSource:()=>ou,ValueEntrySource:()=>_s,VideoUrl:()=>Yp,VideoUrlPublic:()=>jc,VideoUrlWrite:()=>mc,Webhook:()=>mp,WebhookExamples:()=>Ep,WebhookPublic:()=>zp,WebhookTestResult:()=>Cp,WebhookTestResultStatus:()=>Pp,WebhookWrite:()=>yp,WelcomeWizardSubmission:()=>ot,WelcomeWizardTracking:()=>hu,WorkspaceConfiguration:()=>Kt,WorkspaceMetricRequest:()=>fR,WorkspaceMetricResponse:()=>Sa,WorkspaceMetricsSummaryRequest:()=>Pr,WorkspaceMetricsSummaryResponse:()=>wu,WorkspaceNameHolder:()=>Jp,WorkspaceSpansCount:()=>np,WorkspaceTraceCount:()=>pp,alerts:()=>Pi,annotationQueues:()=>ua,attachments:()=>br,chatCompletions:()=>ga,dashboards:()=>fa,datasets:()=>Fi,experiments:()=>xr,feedbackDefinitions:()=>Xi,guardrails:()=>ha,llmProviderKey:()=>Gi,optimizations:()=>Qi,projects:()=>ra,prompts:()=>aa,spans:()=>Rr,traces:()=>$e,welcomeWizard:()=>wa});var Pi={};E(Pi,{GetWebhookExamplesRequestAlertType:()=>Ei});var Ei=r.enum_(["general","slack","pagerduty"]);var br={};E(br,{AttachmentListRequestEntityType:()=>Ci,DownloadAttachmentRequestEntityType:()=>ji,StartMultipartUploadRequest:()=>Hr,StartMultipartUploadRequestEntityType:()=>Ii,UploadAttachmentRequestEntityType:()=>Ui,uploadAttachment:()=>Di});var Ci=r.enum_(["trace","span"]);var ji=r.enum_(["trace","span"]);var Ii=r.enum_(["trace","span"]);var Ui=r.enum_(["trace","span"]);var Di={};E(Di,{Request:()=>Fx});var Fx=r.record(r.string(),r.unknown());var Hr=r.object({fileName:r.property("file_name",r.string()),numOfFileParts:r.property("num_of_file_parts",r.number()),mimeType:r.property("mime_type",r.string().optional()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Ii),entityId:r.property("entity_id",r.string()),path:r.string()});var Fi={};E(Fi,{CreateDatasetItemsFromSpansRequest:()=>Qr,CreateDatasetItemsFromTracesRequest:()=>Yr,DatasetExpansionWrite:()=>ro,DatasetIdentifier:()=>qr,DatasetIdentifierPublic:()=>oo,DatasetItemBatchUpdate:()=>Xr,DatasetItemBatchWrite:()=>$r,DatasetItemStreamRequest:()=>to,DatasetItemsDelete:()=>eo,DatasetUpdate:()=>Zr,DatasetUpdateVisibility:()=>Ni,DatasetVersionRestorePublic:()=>ao,DatasetVersionTag:()=>io,DatasetVersionUpdatePublic:()=>no,DatasetWrite:()=>Kr,DatasetWriteVisibility:()=>Mi});var Mi=r.enum_(["private","public"]);var Ni=r.enum_(["private","public"]);var xs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Jr=r.object({field:r.string().optional(),operator:xs.optional(),key:r.string().optional(),value:r.string().optional()});var P=r.record(r.string(),r.unknown());var Rs=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:P.optional(),data:P.optional(),tags:r.list(r.string()).optional()});var Xr=r.object({ids:r.list(r.string()).optional(),filters:r.list(Jr).optional(),datasetId:r.property("dataset_id",r.string().optional()),update:Rs,mergeTags:r.property("merge_tags",r.boolean().optional())});var Kr=r.object({id:r.string().optional(),name:r.string(),visibility:Mi.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var ys=r.enum_(["manual","trace","span","sdk"]);var Gr=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:ys,data:P,tags:r.list(r.string()).optional()});var $r=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(Gr)});var ks=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Qr=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",ks)});var zs=r.object({includeSpans:r.boolean().optional(),includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Yr=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",zs)});var Zr=r.object({name:r.string(),description:r.string().optional(),visibility:Ni.optional(),tags:r.list(r.string()).optional()});var qr=r.object({datasetName:r.property("dataset_name",r.string())});var eo=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Jr).optional()});var ro=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var oo=r.object({datasetName:r.property("dataset_name",r.string())});var to=r.object({datasetName:r.property("dataset_name",r.string()),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),steamLimit:r.property("steam_limit",r.number().optional()),datasetVersion:r.property("dataset_version",r.string().optional())});var io=r.object({tag:r.string()});var ao=r.object({versionRef:r.property("version_ref",r.string())});var no=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});var xr={};E(xr,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>uo,ExperimentItemStreamRequest:()=>ho,ExperimentItemsBatch:()=>co,ExperimentItemsDelete:()=>lo,ExperimentStreamRequestPublic:()=>wo,ExperimentUpdate:()=>fo,ExperimentUpdateStatus:()=>Li,ExperimentUpdateType:()=>Bi,ExperimentWrite:()=>so,ExperimentWriteStatus:()=>Wi,ExperimentWriteType:()=>Oi,findFeedbackScoreNames:()=>Vi});var Oi=r.enum_(["regular","trial","mini-batch"]);var Wi=r.enum_(["running","completed","cancelled"]);var Bi=r.enum_(["regular","trial","mini-batch"]);var Li=r.enum_(["running","completed","cancelled"]);var Vi={};E(Vi,{Response:()=>Ox});var Ox=r.list(r.string());var ce=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var vs=r.object({name:r.string(),value:r.number()});var Hi=r.object({id:r.string()});var so=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:ce.optional(),type:Oi.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:Wi.optional(),experimentScores:r.property("experiment_scores",r.list(vs).optional()),promptVersion:r.property("prompt_version",Hi.optional()),promptVersions:r.property("prompt_versions",r.list(Hi).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional())});var M=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var Ss=r.enum_(["ui","sdk","online_scoring"]);var _s=r.enum_(["ui","sdk","online_scoring"]);var As=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:_s.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var ee=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Ss,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),As).optional())});var H=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Ts=r.enum_(["default","hidden"]);var po=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:M.optional(),output:M.optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Ts.optional())});var co=r.object({experimentItems:r.property("experiment_items",r.list(po))});var lo=r.object({ids:r.list(r.string())});var xe=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var mo=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Es=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:xe.optional(),output:xe.optional(),metadata:xe.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",mo.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Ps=r.enum_(["general","tool","llm","guardrail"]);var Cs=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Ps.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:xe.optional(),output:xe.optional(),metadata:xe.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",mo.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var js=r.enum_(["ui","sdk","online_scoring"]);var Is=r.enum_(["ui","sdk","online_scoring"]);var Us=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Is.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var Ds=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:js,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Us).optional())});var Ms=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",xe.optional()),trace:Es.optional(),spans:r.list(Cs).optional(),feedbackScores:r.property("feedback_scores",r.list(Ds).optional())});var uo=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(Ms)});var go=r.object({name:r.string(),value:r.number()});var fo=r.object({name:r.string().optional(),metadata:P.optional(),type:Bi.optional(),status:Li.optional(),experimentScores:r.property("experiment_scores",r.list(go).optional())});var ho=r.object({experimentName:r.property("experiment_name",r.string()),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional()});var wo=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var Xi={};E(Xi,{FindFeedbackDefinitionsRequestType:()=>Ji});var Ji=r.enum_(["numerical","categorical","boolean"]);var Gi={};E(Gi,{ProviderApiKeyUpdate:()=>xo,ProviderApiKeyWrite:()=>bo,ProviderApiKeyWriteProvider:()=>Ki});var Ki=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-free"]);var bo=r.object({provider:Ki,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var xo=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});var Qi={};E(Qi,{OptimizationUpdate:()=>Ro,OptimizationUpdateStatus:()=>$i});var $i=r.enum_(["running","completed","cancelled","initialized","error"]);var Ro=r.object({name:r.string().optional(),status:$i.optional()});var ra={};E(ra,{ProjectMetricRequestPublic:()=>zo,ProjectMetricRequestPublicInterval:()=>ea,ProjectMetricRequestPublicMetricType:()=>qi,ProjectRetrieveDetailed:()=>vo,ProjectUpdate:()=>ko,ProjectUpdateVisibility:()=>Zi,ProjectWrite:()=>yo,ProjectWriteVisibility:()=>Yi});var Yi=r.enum_(["private","public"]);var Zi=r.enum_(["private","public"]);var qi=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var ea=r.enum_(["HOURLY","DAILY","WEEKLY"]);var yo=r.object({name:r.string(),visibility:Yi.optional(),description:r.string().optional()});var ko=r.object({name:r.string().optional(),description:r.string().optional(),visibility:Zi.optional()});var Ns=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ae=r.object({field:r.string().optional(),operator:Ns.optional(),key:r.string().optional(),value:r.string().optional()});var Fs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ke=r.object({field:r.string().optional(),operator:Fs.optional(),key:r.string().optional(),value:r.string().optional()});var zo=r.object({metricType:r.property("metric_type",qi.optional()),interval:ea.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),traceFilters:r.property("trace_filters",r.list(Ae).optional()),threadFilters:r.property("thread_filters",r.list(Ke).optional())});var vo=r.object({name:r.string()});var aa={};E(aa,{CreatePromptVersionDetail:()=>_o,CreatePromptVersionDetailTemplateStructure:()=>ia,PromptUpdatable:()=>To,PromptVersionBatchUpdate:()=>Ao,PromptVersionRetrieveDetail:()=>Eo,PromptWrite:()=>So,PromptWriteTemplateStructure:()=>ta,PromptWriteType:()=>oa});var oa=r.enum_(["mustache","jinja2"]);var ta=r.enum_(["text","chat"]);var ia=r.enum_(["text","chat"]);var le=r.record(r.string(),r.unknown());var So=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:le.optional(),changeDescription:r.property("change_description",r.string().optional()),type:oa.optional(),templateStructure:r.property("template_structure",ta.optional()),tags:r.list(r.string()).optional()});var Os=r.record(r.string(),r.unknown());var Ws=r.enum_(["mustache","jinja2"]);var Bs=r.enum_(["text","chat"]);var Se=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Os.optional(),type:Ws.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Bs.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var _o=r.object({name:r.string(),version:Se,templateStructure:r.property("template_structure",ia.optional())});var Ls=r.object({tags:r.list(r.string()).optional()});var Ao=r.object({ids:r.list(r.string()),update:Ls,mergeTags:r.property("merge_tags",r.boolean().optional())});var To=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var Eo=r.object({name:r.string(),commit:r.string().optional()});var Rr={};E(Rr,{FindFeedbackScoreNames1RequestType:()=>sa,GetSpanStatsRequestType:()=>pa,GetSpansByProjectRequestType:()=>na,SpanBatchUpdate:()=>Uo,SpanBatchWrite:()=>jo,SpanSearchStreamRequestPublic:()=>Do,SpanSearchStreamRequestPublicType:()=>ca,findFeedbackScoreNames1:()=>la});var na=r.enum_(["general","tool","llm","guardrail"]);var sa=r.enum_(["general","tool","llm","guardrail"]);var pa=r.enum_(["general","tool","llm","guardrail"]);var ca=r.enum_(["general","tool","llm","guardrail"]);var la={};E(la,{Response:()=>Wx});var Wx=r.list(r.string());var Vs=r.enum_(["general","tool","llm","guardrail"]);var Po=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Co=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Vs.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Po.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var jo=r.object({spans:r.list(Co)});var Hs=r.enum_(["general","tool","llm","guardrail"]);var Te=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Io=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Hs.optional(),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",Te.optional())});var Uo=r.object({ids:r.list(r.string()),update:Io,mergeTags:r.property("merge_tags",r.boolean().optional())});var Js=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ge=r.object({field:r.string().optional(),operator:Js.optional(),key:r.string().optional(),value:r.string().optional()});var Do=r.object({traceId:r.property("trace_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),type:ca.optional(),filters:r.list(Ge).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var $e={};E($e,{DeleteThreadFeedbackScores:()=>Vo,DeleteTraceThreads:()=>Ho,FeedbackScoreBatchThread:()=>Jo,TraceBatchUpdate:()=>Oo,TraceBatchWrite:()=>No,TraceSearchStreamRequestPublic:()=>Ko,TraceThreadBatchIdentifier:()=>Lo,TraceThreadBatchUpdate:()=>Bo,TraceThreadSearchStreamRequest:()=>Xo,findFeedbackScoreNames2:()=>ma,findTraceThreadsFeedbackScoreNames:()=>da});var ma={};E(ma,{Response:()=>Bx});var Bx=r.list(r.string());var da={};E(da,{Response:()=>Lx});var Lx=r.list(r.string());var Mo=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:ce.optional(),output:ce.optional(),metadata:ce.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Po.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var No=r.object({traces:r.list(Mo)});var Fo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Te.optional()),threadId:r.property("thread_id",r.string().optional())});var Oo=r.object({ids:r.list(r.string()),update:Fo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Wo=r.object({tags:r.list(r.string()).optional()});var Bo=r.object({ids:r.list(r.string()),update:Wo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Lo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()).optional())});var Vo=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional()});var Ho=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()))});var Xs=r.enum_(["ui","sdk","online_scoring"]);var Ks=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Xs,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var Jo=r.object({scores:r.list(Ks)});var Gs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Re=r.object({field:r.string().optional(),operator:Gs.optional(),key:r.string().optional(),value:r.string().optional()});var Xo=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Re).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var Ko=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Ae).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});var ua={};E(ua,{AnnotationQueueBatchWrite:()=>$o,AnnotationQueueUpdate:()=>Qo});var $s=r.enum_(["trace","thread"]);var Go=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:$s,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var $o=r.object({annotationQueues:r.property("annotation_queues",r.list(Go))});var Qo=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var ga={};E(ga,{ChatCompletionRequest:()=>Zo});var Qs=r.record(r.string(),r.unknown());var Ys=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Zs=r.enum_(["text","json_object","json_schema"]);var qs=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var ep=r.object({type:Zs.optional(),jsonSchema:r.property("json_schema",qs.optional())});var Yo=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var rp=r.object({type:r.stringLiteral("function").optional(),function:Yo.optional()});var Ee=r.object({name:r.string().optional(),arguments:r.string().optional()});var Zo=r.object({model:r.string().optional(),messages:r.list(Qs).optional(),temperature:r.number().optional(),topP:r.property("top_p",r.number().optional()),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:r.property("stream_options",Ys.optional()),stop:r.list(r.string()).optional(),maxTokens:r.property("max_tokens",r.number().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional()),presencePenalty:r.property("presence_penalty",r.number().optional()),frequencyPenalty:r.property("frequency_penalty",r.number().optional()),logitBias:r.property("logit_bias",r.record(r.string(),r.number()).optional()),user:r.string().optional(),responseFormat:r.property("response_format",ep.optional()),seed:r.number().optional(),tools:r.list(rp).optional(),toolChoice:r.property("tool_choice",r.record(r.string(),r.unknown()).optional()),parallelToolCalls:r.property("parallel_tool_calls",r.boolean().optional()),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.property("reasoning_effort",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional()),functions:r.list(Yo).optional(),functionCall:r.property("function_call",Ee.optional())});var fa={};E(fa,{DashboardUpdatePublic:()=>et,DashboardWrite:()=>qo});var qo=r.object({name:r.string(),description:r.string().optional(),config:le});var re=r.record(r.string(),r.unknown());var et=r.object({name:r.string().optional(),description:r.string().optional(),config:re.optional()});var ha={};E(ha,{GuardrailBatchWrite:()=>rt});var op=r.enum_(["TOPIC","PII"]);var tp=r.enum_(["passed","failed"]);var ip=r.object({entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:op,result:tp,config:P,details:P});var rt=r.object({guardrails:r.list(ip)});var wa={};E(wa,{WelcomeWizardSubmission:()=>ot});var ot=r.object({role:r.string().optional(),integrations:r.list(r.string()).optional(),email:r.string().optional(),joinBetaProgram:r.property("join_beta_program",r.boolean().optional())});var ap=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var yr=r.object({biInformation:r.property("bi_information",r.list(ap).optional())});var np=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var sp=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(np).optional())});var pp=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var cp=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(pp).optional())});var ae=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var lp=r.enum_(["general","slack","pagerduty"]);var mp=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var dp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var up=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var gp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:up,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var fp=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",dp),triggerConfigs:r.property("trigger_configs",r.list(gp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Vx=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",lp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:mp,triggers:r.list(fp).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var hp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var wp=r.object({id:r.string().optional(),type:hp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var bp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var xp=r.object({id:r.string().optional(),eventType:r.property("event_type",bp),triggerConfigs:r.property("trigger_configs",r.list(wp).optional())});var Rp=r.enum_(["general","slack","pagerduty"]);var yp=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional()});var tt=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Rp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:yp,triggers:r.list(xp).optional()});var B=r.object({ids:r.list(r.string())});var kp=r.enum_(["general","slack","pagerduty"]);var zp=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var vp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var Sp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var _p=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:Sp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Ap=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",vp),triggerConfigs:r.property("trigger_configs",r.list(_p).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var it=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",kp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:zp,triggers:r.list(Ap).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Tp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(it).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Hx=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Ep=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var Pp=r.enum_(["success","failure"]);var Cp=r.object({status:Pp.optional(),statusCode:r.property("status_code",r.number().optional()),requestBody:r.property("request_body",r.string().optional()),errorMessage:r.property("error_message",r.string().optional())});var ba=r.object({ids:r.list(r.string())});var jp=r.enum_(["trace","thread"]);var Ip=r.object({username:r.string().optional(),status:r.number().optional()});var ne=r.object({name:r.string(),value:r.number()});var Up=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:jp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Ip).optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Jx=r.object({annotationQueues:r.property("annotation_queues",r.list(Up))});var Dp=r.enum_(["trace","thread"]);var Mp=r.object({username:r.string().optional(),status:r.number().optional()});var Qe=r.object({name:r.string(),value:r.number()});var at=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:Dp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Mp).optional(),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Np=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(at).optional(),sortableBy:r.list(r.string()).optional()});var Fp=r.object({link:r.string().optional(),fileName:r.property("file_name",r.string()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string())});var Op=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fp).optional(),sortableBy:r.list(r.string()).optional()});var Wp=r.enum_(["trace","span"]);var Bp=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var xa=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Wp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string().optional()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string().optional()),uploadId:r.property("upload_id",r.string()),uploadedFileParts:r.property("uploaded_file_parts",r.list(Bp))});var Lp=r.enum_(["trace","span"]);var Xx=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",Lp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var Vp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var Hp=r.record(r.string(),r.unknown());var Jp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Xp=r.object({url:r.string()});var Kp=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});var Gp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Pe=r.object({field:r.string().optional(),operator:Gp.optional(),key:r.string().optional(),value:r.string().optional()});var Ye=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",P.optional())});var $p=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Qp=r.object({url:r.string(),detail:r.string().optional()});var Yp=r.object({url:r.string()});var Zp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Qp.optional()),videoUrl:r.property("video_url",Yp.optional()),audioUrl:r.property("audio_url",Xp.optional())});var Ze=r.object({role:$p,content:r.string().optional(),contentArray:r.property("content_array",r.list(Zp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var qp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var qe=r.object({name:r.string(),type:qp,description:r.string()});var nt=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var ec=r.object({filters:r.list(Pe).optional(),code:nt.optional()});var st=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var rc=r.object({filters:r.list(Pe).optional(),code:st.optional()});var pt=r.object({model:Ye,messages:r.list(Ze),schema:r.list(qe)});var oc=r.object({filters:r.list(Re).optional(),code:pt.optional()});var ct=r.object({metric:r.string()});var tc=r.object({filters:r.list(Re).optional(),code:ct.optional()});var ic=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ce=r.object({field:r.string().optional(),operator:ic.optional(),key:r.string().optional(),value:r.string().optional()});var lt=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var ac=r.object({filters:r.list(Ce).optional(),code:lt.optional()});var mt=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var nc=r.object({filters:r.list(Ce).optional(),code:mt.optional()});var kr=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(Kp).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),Kx=r.union("type",{llm_as_judge:ec.extend(kr),user_defined_metric_python:rc.extend(kr),trace_thread_llm_as_judge:oc.extend(kr),trace_thread_user_defined_metric_python:tc.extend(kr),span_llm_as_judge:ac.extend(kr),span_user_defined_metric_python:nc.extend(kr)}).transform({transform:a=>a,untransform:a=>a});var sc=r.object({url:r.string()});var pc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var dt=r.object({field:r.string().optional(),operator:pc.optional(),key:r.string().optional(),value:r.string().optional()});var er=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",le.optional())});var cc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var lc=r.object({url:r.string(),detail:r.string().optional()});var mc=r.object({url:r.string()});var dc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",lc.optional()),videoUrl:r.property("video_url",mc.optional()),audioUrl:r.property("audio_url",sc.optional())});var rr=r.object({role:cc,content:r.string().optional(),contentArray:r.property("content_array",r.list(dc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var uc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var or=r.object({name:r.string(),type:uc,description:r.string()});var gc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var fc=r.object({filters:r.list(dt).optional(),code:gc.optional()});var hc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ut=r.object({field:r.string().optional(),operator:hc.optional(),key:r.string().optional(),value:r.string().optional()});var wc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var bc=r.object({filters:r.list(ut).optional(),code:wc.optional()});var xc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Rc=r.object({filters:r.list(ut).optional(),code:xc.optional()});var yc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var gt=r.object({field:r.string().optional(),operator:yc.optional(),key:r.string().optional(),value:r.string().optional()});var kc=r.object({model:er,messages:r.list(rr),schema:r.list(or)});var zc=r.object({filters:r.list(gt).optional(),code:kc.optional()});var vc=r.object({metric:r.string()});var Sc=r.object({filters:r.list(gt).optional(),code:vc.optional()});var _c=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Ac=r.object({filters:r.list(dt).optional(),code:_c.optional()});var zr=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),action:r.stringLiteral("evaluator")}),Tc=r.union("type",{llm_as_judge:fc.extend(zr),user_defined_metric_python:Ac.extend(zr),trace_thread_llm_as_judge:zc.extend(zr),trace_thread_user_defined_metric_python:Sc.extend(zr),span_llm_as_judge:bc.extend(zr),span_user_defined_metric_python:Rc.extend(zr)}).transform({transform:a=>a,untransform:a=>a});var Ec=r.object({url:r.string()});var tr=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",re.optional())});var Pc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Cc=r.object({url:r.string(),detail:r.string().optional()});var jc=r.object({url:r.string()});var Ic=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Cc.optional()),videoUrl:r.property("video_url",jc.optional()),audioUrl:r.property("audio_url",Ec.optional())});var ir=r.object({role:Pc,content:r.string().optional(),contentArray:r.property("content_array",r.list(Ic).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Uc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var ar=r.object({name:r.string(),type:Uc,description:r.string()});var Dc=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var ft=r.object({filters:r.list(Ae).optional(),code:Dc.optional()});var ht=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});var Mc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var wt=r.object({filters:r.list(Ae).optional(),code:Mc.optional()});var Nc=r.object({model:tr,messages:r.list(ir),schema:r.list(ar)});var bt=r.object({filters:r.list(Ke).optional(),code:Nc.optional()});var Fc=r.object({metric:r.string()});var xt=r.object({filters:r.list(Ke).optional(),code:Fc.optional()});var Oc=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var Rt=r.object({filters:r.list(Ge).optional(),code:Oc.optional()});var Wc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var yt=r.object({filters:r.list(Ge).optional(),code:Wc.optional()});var vr=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(ht).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),Bc=r.union("type",{llm_as_judge:ft.extend(vr),user_defined_metric_python:wt.extend(vr),trace_thread_llm_as_judge:bt.extend(vr),trace_thread_user_defined_metric_python:xt.extend(vr),span_llm_as_judge:Rt.extend(vr),span_user_defined_metric_python:yt.extend(vr)}).transform({transform:a=>a,untransform:a=>a});var Lc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Bc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Sr=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(ht).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),Vc=r.union("type",{llm_as_judge:ft.extend(Sr),user_defined_metric_python:wt.extend(Sr),trace_thread_llm_as_judge:bt.extend(Sr),trace_thread_user_defined_metric_python:xt.extend(Sr),span_llm_as_judge:Rt.extend(Sr),span_user_defined_metric_python:yt.extend(Sr)}).transform({transform:a=>a,untransform:a=>a});var Hc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var Jc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:Hc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var Xc=r.object({content:r.list(Jc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Kc=r.object({filters:r.list(Pe).optional(),code:nt.optional()});var Gc=r.object({filters:r.list(Pe).optional(),code:st.optional()});var $c=r.object({filters:r.list(Re).optional(),code:pt.optional()});var Qc=r.object({filters:r.list(Re).optional(),code:ct.optional()});var Yc=r.object({filters:r.list(Ce).optional(),code:lt.optional()});var Zc=r.object({filters:r.list(Ce).optional(),code:mt.optional()});var _r=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:r.stringLiteral("evaluator")}),qc=r.union("type",{llm_as_judge:Kc.extend(_r),user_defined_metric_python:Gc.extend(_r),trace_thread_llm_as_judge:$c.extend(_r),trace_thread_user_defined_metric_python:Qc.extend(_r),span_llm_as_judge:Yc.extend(_r),span_user_defined_metric_python:Zc.extend(_r)}).transform({transform:a=>a,untransform:a=>a});var el=r.enum_(["system","user","assistant","tool","function"]);var kt=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:Ee.optional()});var rl=r.object({role:el.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(kt).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Ee.optional())});var ol=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),toolCalls:r.property("tool_calls",r.list(kt).optional()),functionCall:r.property("function_call",Ee.optional())});var tl=r.object({index:r.number().optional(),message:rl.optional(),delta:ol.optional(),finishReason:r.property("finish_reason",r.string().optional())});var il=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var al=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var nl=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",il.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",al.optional())});var sl=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(tl).optional(),usage:nl.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var nr=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),name:r.string(),slug:r.string().optional(),description:r.string().optional(),config:re,createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var pl=r.object({content:r.list(nr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var sr=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),isLatest:r.property("is_latest",r.boolean().optional()),versionName:r.property("version_name",r.string().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var cl=r.record(r.string(),r.unknown());var ll=r.enum_(["private","public"]);var ml=r.enum_(["unknown","processing","completed","failed"]);var zt=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var Gx=r.object({id:r.string().optional(),name:r.string(),visibility:ll.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:ml.optional(),latestVersion:r.property("latest_version",zt.optional())});var dl=r.enum_(["manual","trace","span","sdk"]);var vt=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:dl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(po).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var $x=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(vt)});var ul=r.object({generatedSamples:r.property("generated_samples",r.list(vt).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var Qx=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional())});var gl=r.enum_(["string","number","object","boolean","array","null"]);var fl=r.object({name:r.string().optional(),types:r.list(gl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var hl=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var wl=r.enum_(["manual","trace","span","sdk"]);var Ra=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var bl=r.enum_(["ui","sdk","online_scoring"]);var xl=r.enum_(["ui","sdk","online_scoring"]);var Rl=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:xl.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var yl=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:bl,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Rl).optional())});var kl=r.enum_(["default","hidden"]);var zl=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),input:Ra.optional(),output:Ra.optional(),feedbackScores:r.property("feedback_scores",r.list(yl).optional()),comments:r.list(hl).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",kl.optional())});var vl=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:wl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(zl).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Sl=r.object({content:r.list(vl).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(fl).optional(),sortableBy:r.list(r.string()).optional()});var _l=r.enum_(["private","public"]);var Al=r.enum_(["unknown","processing","completed","failed"]);var St=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var Ar=r.object({id:r.string().optional(),name:r.string(),visibility:_l.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:Al.optional(),latestVersion:r.property("latest_version",St.optional())});var Tl=r.object({content:r.list(Ar).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var El=r.object({value:r.number().optional()});var Pl=r.object({value:r.number().optional()});var _t=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Cl=r.object({value:_t.optional()});var jl=r.object({name:r.string().optional()}),Il=r.union("type",{PERCENTAGE:Cl.extend(jl),COUNT:Pl.extend(jl),AVG:El.extend(jl)}).transform({transform:a=>a,untransform:a=>a});var Ne=r.object({stats:r.list(Il).optional()});var Ul=r.enum_(["manual","trace","span","sdk"]);var Dl=r.enum_(["default","hidden"]);var At=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Dl.optional())});var Tt=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Ul,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(At).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Ml=r.enum_(["string","number","object","boolean","array","null"]);var Nl=r.object({name:r.string().optional(),types:r.list(Ml).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Fl=r.object({content:r.list(Tt).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Nl).optional(),sortableBy:r.list(r.string()).optional()});var Ol=r.enum_(["string","number","object","boolean","array","null"]);var Wl=r.object({name:r.string().optional(),types:r.list(Ol).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Bl=r.object({columns:r.list(Wl).optional()});var Ll=r.object({typeName:r.string().optional()});var Yx=r.object({type:Ll.optional(),closed:r.boolean().optional()});var Vl=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});var Hl=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:Vl.optional()});var Jl=r.object({content:r.list(sr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Xl=r.enum_(["regular","trial","mini-batch"]);var Kl=r.enum_(["running","completed","cancelled"]);var je=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var ya=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var Zx=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),metadata:M.optional(),type:Xl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:je.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:Kl.optional(),experimentScores:r.property("experiment_scores",r.list(go).optional()),promptVersion:r.property("prompt_version",ya.optional()),promptVersions:r.property("prompt_versions",r.list(ya).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",zt.optional())});var Tr=r.object({ids:r.list(r.string())});var Gl=r.enum_(["TOPIC","PII"]);var $l=r.enum_(["passed","failed"]);var Ql=r.object({name:Gl.optional(),result:$l.optional()});var Yl=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Ql).optional()});var Zl=r.enum_(["default","hidden"]);var Et=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Te.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(Yl).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",Zl.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var ql=r.enum_(["general","tool","llm","guardrail"]);var Pt=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:ql.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:M.optional(),output:M.optional(),metadata:M.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Te.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),comments:r.list(H).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var em=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",M.optional()),trace:Et.optional(),spans:r.list(Pt).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var qx=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(em)});var pr=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var me=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var rm=r.enum_(["regular","trial","mini-batch"]);var om=r.enum_(["running","completed","cancelled"]);var tm=r.object({name:r.string(),value:r.number()});var ka=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});var Ct=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),metadata:me.optional(),type:rm.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),comments:r.list(pr).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:_t.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:om.optional(),experimentScores:r.property("experiment_scores",r.list(tm).optional()),promptVersion:r.property("prompt_version",ka.optional()),promptVersions:r.property("prompt_versions",r.list(ka).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",St.optional())});var im=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ct).optional(),sortableBy:r.list(r.string()).optional()});var am=r.object({label:r.string().optional()});var nm=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var sm=r.object({groupsDetails:r.property("groups_details",r.list(nm).optional())});var pm=r.object({content:r.record(r.string(),am).optional(),details:sm.optional()});var cm=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:je.optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),experimentScores:r.property("experiment_scores",r.list(ne).optional())});var lm=r.object({label:r.string().optional(),aggregations:cm.optional()});var mm=r.object({content:r.record(r.string(),lm).optional()});var eR=r.object({ids:r.list(r.string())});var dm=r.object({typeName:r.string().optional()});var rR=r.object({type:dm.optional(),closed:r.boolean().optional()});var um=r.object({trueLabel:r.string(),falseLabel:r.string()});var gm=r.object({details:um.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var fm=r.object({categories:r.record(r.string(),r.number())});var hm=r.object({details:fm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var wm=r.object({max:r.number(),min:r.number()});var bm=r.object({details:wm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var xm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),oR=r.union("type",{numerical:bm.extend(xm),categorical:hm.extend(xm),boolean:gm.extend(xm)}).transform({transform:a=>a,untransform:a=>a});var Rm=r.object({trueLabel:r.string(),falseLabel:r.string()});var ym=r.object({details:Rm.optional()});var km=r.object({categories:r.record(r.string(),r.number())});var zm=r.object({details:km.optional()});var vm=r.object({max:r.number(),min:r.number()});var Sm=r.object({details:vm.optional()});var _m=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Am=r.union("type",{numerical:Sm.extend(_m),categorical:zm.extend(_m),boolean:ym.extend(_m)}).transform({transform:a=>a,untransform:a=>a});var Tm=r.object({trueLabel:r.string(),falseLabel:r.string()});var jt=r.object({details:Tm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Em=r.object({categories:r.record(r.string(),r.number())});var It=r.object({details:Em.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Pm=r.object({max:r.number(),min:r.number()});var Ut=r.object({details:Pm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Cm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),jm=r.union("type",{numerical:Ut.extend(Cm),categorical:It.extend(Cm),boolean:jt.extend(Cm)}).transform({transform:a=>a,untransform:a=>a});var Im=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(jm).optional()});var Um=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Dm=r.union("type",{numerical:Ut.extend(Um),categorical:It.extend(Um),boolean:jt.extend(Um)}).transform({transform:a=>a,untransform:a=>a});var Mm=r.object({trueLabel:r.string(),falseLabel:r.string()});var Nm=r.object({details:Mm.optional()});var Fm=r.object({categories:r.record(r.string(),r.number())});var Om=r.object({details:Fm.optional()});var Wm=r.object({max:r.number(),min:r.number()});var Bm=r.object({details:Wm.optional()});var Lm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Vm=r.union("type",{numerical:Bm.extend(Lm),categorical:Om.extend(Lm),boolean:Nm.extend(Lm)}).transform({transform:a=>a,untransform:a=>a});var Hm=r.enum_(["TOPIC","PII"]);var Jm=r.enum_(["passed","failed"]);var Xm=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Hm,result:Jm,config:P,details:P});var tR=r.object({guardrails:r.list(Xm)});var Km=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-free"]);var Dt=r.object({id:r.string().optional(),provider:Km,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});var Gm=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Dt).optional(),sortableBy:r.list(r.string()).optional()});var $m=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-free"]);var iR=r.object({id:r.string().optional(),provider:$m,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});var Mt=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var Qm=r.enum_(["trace","thread","span"]);var Nt=r.object({projectId:r.property("project_id",r.string()),entityIds:r.property("entity_ids",r.list(r.string())),ruleIds:r.property("rule_ids",r.list(r.string())),entityType:r.property("entity_type",Qm)});var aR=P;var Ym=r.enum_(["running","completed","cancelled","initialized","error"]);var Zm=r.object({role:r.string(),content:r.string()});var qm=r.object({messages:r.list(Zm)});var ed=r.object({model:r.string(),parameters:P.optional()});var rd=r.object({type:r.string(),parameters:P.optional()});var od=r.object({metrics:r.list(rd)});var td=r.object({type:r.string(),parameters:P.optional()});var id=r.object({datasetName:r.property("dataset_name",r.string()),prompt:qm,llmModel:r.property("llm_model",ed),evaluation:od,optimizer:td});var nR=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:Ym,metadata:M.optional(),studioConfig:r.property("studio_config",id.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var ad=r.object({role:r.string(),content:r.string()});var nd=r.object({messages:r.list(ad)});var sd=r.object({model:r.string(),parameters:le.optional()});var pd=r.object({type:r.string(),parameters:le.optional()});var cd=r.object({metrics:r.list(pd)});var ld=r.object({type:r.string(),parameters:le.optional()});var md=r.object({datasetName:r.property("dataset_name",r.string()),prompt:nd,llmModel:r.property("llm_model",sd),evaluation:cd,optimizer:ld});var dd=r.enum_(["running","completed","cancelled","initialized","error"]);var za=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:dd,metadata:ce.optional(),studioConfig:r.property("studio_config",md.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var ud=r.enum_(["running","completed","cancelled","initialized","error"]);var gd=r.object({role:r.string(),content:r.string()});var fd=r.object({messages:r.list(gd)});var hd=r.object({model:r.string(),parameters:re.optional()});var wd=r.object({type:r.string(),parameters:re.optional()});var bd=r.object({metrics:r.list(wd)});var xd=r.object({type:r.string(),parameters:re.optional()});var Rd=r.object({datasetName:r.property("dataset_name",r.string()),prompt:fd,llmModel:r.property("llm_model",hd),evaluation:bd,optimizer:xd});var Ft=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:ud,metadata:me.optional(),studioConfig:r.property("studio_config",Rd.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var yd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ft).optional(),sortableBy:r.list(r.string()).optional()});var kd=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});var Ot=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var zd=r.enum_(["private","public"]);var sR=r.object({id:r.string().optional(),name:r.string(),visibility:zd.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:je.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Ot.optional())});var vd=r.enum_(["private","public"]);var Wt=r.object({id:r.string().optional(),name:r.string(),visibility:vd.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional())});var Sd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Wt).optional(),sortableBy:r.list(r.string()).optional()});var _d=r.object({name:r.string().optional(),type:r.string().optional()});var Ad=r.object({scores:r.list(_d).optional()});var Td=r.object({time:r.date(),value:r.number().optional()});var Ed=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Pd=r.enum_(["HOURLY","DAILY","WEEKLY"]);var Cd=r.object({name:r.string().optional(),data:r.list(Td).optional()});var jd=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",Ed.optional()),interval:Pd.optional(),results:r.list(Cd).optional()});var Id=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:je.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Ot.optional())});var Ud=r.object({content:r.list(Id).optional()});var Dd=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var Md=r.object({name:r.string(),value:r.number()});var Nd=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Fd=r.enum_(["private","public"]);var Od=r.object({id:r.string().optional(),name:r.string(),visibility:Fd.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Md).optional()),duration:Nd.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Dd.optional())});var pR=r.object({errors:r.list(r.string()).optional()});var Wd=r.enum_(["mustache","jinja2"]);var Bd=r.enum_(["text","chat"]);var Ld=r.enum_(["mustache","jinja2"]);var Vd=r.enum_(["text","chat"]);var Hd=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:P.optional(),type:Ld.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Vd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var cR=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),template:r.string().optional(),metadata:P.optional(),changeDescription:r.property("change_description",r.string().optional()),type:Wd.optional(),templateStructure:r.property("template_structure",Bd.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Hd.optional())});var lR=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Jd=r.enum_(["text","chat"]);var Xd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Jd.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Se.optional())});var Kd=r.enum_(["mustache","jinja2"]);var Gd=r.enum_(["text","chat"]);var $d=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:re.optional(),type:Kd.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Gd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Qd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list($d).optional(),sortableBy:r.list(r.string()).optional()});var Yd=r.enum_(["text","chat"]);var Zd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Yd.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});var qd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Zd).optional(),sortableBy:r.list(r.string()).optional()});var eu=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),dashboardsEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),collaboratorsTabEnabled:r.boolean()});var mR=r.object({spans:r.list(Pt)});var Bt=r.object({name:r.string(),author:r.string().optional()});var Lt=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var ru=r.enum_(["ui","sdk","online_scoring"]);var ou=r.enum_(["ui","sdk","online_scoring"]);var tu=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:ou.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});var Er=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ru,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),tu).optional())});var iu=r.enum_(["general","tool","llm","guardrail"]);var Vt=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:iu.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Lt.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Er).optional()),comments:r.list(pr).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional()});var au=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Vt).optional(),sortableBy:r.list(r.string()).optional()});var nu=r.enum_(["ui","sdk","online_scoring"]);var su=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:nu,author:r.string().optional(),id:r.string()});var Ht=r.object({scores:r.list(su)});var dR=r.object({traces:r.list(Et)});var uR=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var pu=r.enum_(["TOPIC","PII"]);var cu=r.enum_(["passed","failed"]);var lu=r.object({name:pu.optional(),result:cu.optional()});var mu=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(lu).optional()});var du=r.enum_(["default","hidden"]);var Jt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Lt.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Er).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Er).optional()),comments:r.list(pr).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(mu).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",du.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional()});var uu=r.enum_(["active","inactive"]);var Xt=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),threadModelId:r.property("thread_model_id",r.string().optional()),startTime:r.property("start_time",r.date().optional()),endTime:r.property("end_time",r.date().optional()),duration:r.number().optional(),firstMessage:r.property("first_message",M.optional()),lastMessage:r.property("last_message",M.optional()),feedbackScores:r.property("feedback_scores",r.list(ee).optional()),status:uu.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(H).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});var va=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string()),truncate:r.boolean().optional()});var gu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Xt).optional(),sortableBy:r.list(r.string()).optional()});var fu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Jt).optional(),sortableBy:r.list(r.string()).optional()});var hu=r.object({completed:r.boolean().optional()});var cr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});var Pr=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var gR=r.object({time:r.date(),value:r.number().optional()});var Sa=r.object({results:r.list(cr).optional()});var fR=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});var Kt=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var wu=r.object({results:r.list(cr).optional()});var _a=class{constructor(t={}){this._options=t;}getDatasetBiInfo(t){return w.fromPromise(this.__getDatasetBiInfo(t))}async __getDatasetBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:yr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(t){return w.fromPromise(this.__getExperimentBiInfo(t))}async __getExperimentBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:yr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(t){return w.fromPromise(this.__getSpansBiInfo(t))}async __getSpansBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:yr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(t){return w.fromPromise(this.__getSpansCountForWorkspaces(t))}async __getSpansCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:sp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(t){return w.fromPromise(this.__getTracesBiInfo(t))}async __getTracesBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:yr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(t){return w.fromPromise(this.__getTracesCountForWorkspaces(t))}async __getTracesCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:cp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/workspace-trace-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Aa=class{constructor(t={}){this._options=t;}findAlerts(t={},e){return w.fromPromise(this.__findAlerts(t,e))}async __findAlerts(t={},e){var g,f;let{page:o,size:i,sorting:n,filters:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.sorting=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/alerts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Tp.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(t,e){return w.fromPromise(this.__createAlert(t,e))}async __createAlert(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(t,e){return w.fromPromise(this.__deleteAlertBatch(t,e))}async __deleteAlertBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(t,e){return w.fromPromise(this.__getAlertById(t,e))}async __getAlertById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:it.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAlert(t,e,o){return w.fromPromise(this.__updateAlert(t,e,o))}async __updateAlert(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getWebhookExamples(t={},e){return w.fromPromise(this.__getWebhookExamples(t,e))}async __getWebhookExamples(t={},e){var c,m;let{alertType:o}=t,i={};o!=null&&(i.alert_type=Ei.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Ep.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(t,e){return w.fromPromise(this.__testWebhook(t,e))}async __testWebhook(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Cp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/webhooks/tests.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ta=class{constructor(t={}){this._options=t;}addItemsToAnnotationQueue(t,e,o){return w.fromPromise(this.__addItemsToAnnotationQueue(t,e,o))}async __addItemsToAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/add`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ba.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findAnnotationQueues(t={},e){return w.fromPromise(this.__findAnnotationQueues(t,e))}async __findAnnotationQueues(t={},e){var f,y;let{page:o,size:i,name:n,filters:c,sorting:m}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),m!=null&&(u.sorting=m);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/annotation-queues"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Np.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(t,e){return w.fromPromise(this.__createAnnotationQueue(t,e))}async __createAnnotationQueue(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Go.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(t,e){return w.fromPromise(this.__createAnnotationQueueBatch(t,e))}async __createAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:$o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(t,e){return w.fromPromise(this.__deleteAnnotationQueueBatch(t,e))}async __deleteAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(t,e){return w.fromPromise(this.__getAnnotationQueueById(t,e))}async __getAnnotationQueueById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:at.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateAnnotationQueue(t,e={},o){return w.fromPromise(this.__updateAnnotationQueue(t,e,o))}async __updateAnnotationQueue(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Qo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}removeItemsFromAnnotationQueue(t,e,o){return w.fromPromise(this.__removeItemsFromAnnotationQueue(t,e,o))}async __removeItemsFromAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ba.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ea=class{constructor(t={}){this._options=t;}attachmentList(t,e){return w.fromPromise(this.__attachmentList(t,e))}async __attachmentList(t,e){var y,z;let{page:o,size:i,projectId:n,entityType:c,entityId:m,path:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),g.project_id=n,g.entity_type=Ci.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m,g.path=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/list"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:Op.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}completeMultiPartUpload(t,e){return w.fromPromise(this.__completeMultiPartUpload(t,e))}async __completeMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(t,e){return w.fromPromise(this.__deleteAttachments(t,e))}async __deleteAttachments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(t,e){return w.fromPromise(this.__downloadAttachment(t,e))}async __downloadAttachment(t,e){var y,z;let{workspaceName:o,containerId:i,entityType:n,entityId:c,fileName:m,mimeType:u}=t,g={};o!=null&&(g.workspace_name=o),g.container_id=i,g.entity_type=ji.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=m,g.mime_type=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/download"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:f.body,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}startMultiPartUpload(t,e){return w.fromPromise(this.__startMultiPartUpload(t,e))}async __startMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-start"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Hr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Vp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(t,e){return w.fromPromise(this.__uploadAttachment(t,e))}async __uploadAttachment(t,e){var y,z;let{fileName:o,projectName:i,mimeType:n,entityType:c,entityId:m,body:u}=t,g={};g.file_name=o,i!=null&&(g.project_name=i),n!=null&&(g.mime_type=n),g.entity_type=Ui.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=m;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/upload"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",body:br.uploadAttachment.Request.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/attachment/upload.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Pa=class{constructor(t={}){this._options=t;}access(t,e){return w.fromPromise(this.__access(t,e))}async __access(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/auth"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Hp.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(t){return w.fromPromise(this.__getWorkspaceName(t))}async __getWorkspaceName(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/auth/workspace"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Jp.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 401:throw new $(e.error.body,e.rawResponse);case 403:throw new Z(ae.parseOrThrow(e.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/auth/workspace.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ca=class{constructor(t={}){this._options=t;}findEvaluators(t={},e){return w.fromPromise(this.__findEvaluators(t,e))}async __findEvaluators(t={},e){var z,v;let{projectId:o,id:i,name:n,filters:c,sorting:m,page:u,size:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.id=i),n!=null&&(f.name=n),c!=null&&(f.filters=c),m!=null&&(f.sorting=m),u!=null&&(f.page=u.toString()),g!=null&&(f.size=g.toString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/automations/evaluators"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:f,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:Lc.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(t,e){return w.fromPromise(this.__createAutomationRuleEvaluator(t,e))}async __createAutomationRuleEvaluator(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/automations/evaluators"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(t,e){return w.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(t,e))}async __deleteAutomationRuleEvaluatorBatch(t,e){var m,u;let{projectId:o,body:i}=t,n={};o!=null&&(n.project_id=o);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",body:B.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(t,e={},o){return w.fromPromise(this.__getEvaluatorById(t,e,o))}async __getEvaluatorById(t,e={},o){var m,u;let{projectId:i}=e,n={};i!=null&&(n.project_id=i);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Vc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(t,e,o){return w.fromPromise(this.__updateAutomationRuleEvaluator(t,e,o))}async __updateAutomationRuleEvaluator(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:qc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getEvaluatorLogsById(t,e={},o){return w.fromPromise(this.__getEvaluatorLogsById(t,e,o))}async __getEvaluatorLogsById(t,e={},o){var m,u;let{size:i}=e,n={};i!=null&&(n.size=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Xc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}/logs.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ja=class{constructor(t={}){this._options=t;}createChatCompletions(t={},e){return w.fromPromise(this.__createChatCompletions(t,e))}async __createChatCompletions(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/chat/completions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Zo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:sl.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/chat/completions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ia=class{constructor(t={}){this._options=t;}findDashboards(t={},e){return w.fromPromise(this.__findDashboards(t,e))}async __findDashboards(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:pl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createDashboard(t,e){return w.fromPromise(this.__createDashboard(t,e))}async __createDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(t,e){return w.fromPromise(this.__getDashboardById(t,e))}async __getDashboardById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDashboard(t,e){return w.fromPromise(this.__deleteDashboard(t,e))}async __deleteDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(t,e={},o){return w.fromPromise(this.__updateDashboard(t,e,o))}async __updateDashboard(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:et.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:nr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDashboardsBatch(t,e){return w.fromPromise(this.__deleteDashboardsBatch(t,e))}async __deleteDashboardsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/dashboards/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ua=class{constructor(t={}){this._options=t;}applyDatasetItemChanges(t,e,o){return w.fromPromise(this.__applyDatasetItemChanges(t,e,o))}async __applyDatasetItemChanges(t,e,o){var u,g;let{override:i,body:n}=e,c={};i!=null&&(c.override=i.toString());let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/changes`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",body:cl.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:sr.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new A(m.error.body,m.rawResponse);case 409:throw new N(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/items/changes.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}batchUpdateDatasetItems(t,e){return w.fromPromise(this.__batchUpdateDatasetItems(t,e))}async __batchUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findDatasets(t={},e){return w.fromPromise(this.__findDatasets(t,e))}async __findDatasets(t={},e){var v,S;let{page:o,size:i,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:m,name:u,sorting:g,filters:f}=t,y={};o!=null&&(y.page=o.toString()),i!=null&&(y.size=i.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),m!=null&&(y.prompt_id=m),u!=null&&(y.name=u),g!=null&&(y.sorting=g),f!=null&&(y.filters=f);let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,"v1/private/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(z.ok)return {data:Tl.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}createDataset(t,e){return w.fromPromise(this.__createDataset(t,e))}async __createDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Kr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(t,e){return w.fromPromise(this.__createOrUpdateDatasetItems(t,e))}async __createOrUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(t,e){return w.fromPromise(this.__createDatasetItemsFromCsv(t,e))}async __createDatasetItemsFromCsv(t,e){var c,m;let o=await ff();o.append("file",Ue(t.file)),o.append("dataset_id",t.datasetId);let i=await o.getRequest(),n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...i.headers,...e==null?void 0:e.headers},requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/from-csv.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}createDatasetItemsFromSpans(t,e,o){return w.fromPromise(this.__createDatasetItemsFromSpans(t,e,o))}async __createDatasetItemsFromSpans(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-spans`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createDatasetItemsFromTraces(t,e,o){return w.fromPromise(this.__createDatasetItemsFromTraces(t,e,o))}async __createDatasetItemsFromTraces(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-traces`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetById(t,e){return w.fromPromise(this.__getDatasetById(t,e))}async __getDatasetById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ar.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(t,e,o){return w.fromPromise(this.__updateDataset(t,e,o))}async __updateDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Zr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDataset(t,e){return w.fromPromise(this.__deleteDataset(t,e))}async __deleteDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(t,e){return w.fromPromise(this.__deleteDatasetByName(t,e))}async __deleteDatasetByName(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(t={},e){return w.fromPromise(this.__deleteDatasetItems(t,e))}async __deleteDatasetItems(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:eo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(t,e){return w.fromPromise(this.__deleteDatasetsBatch(t,e))}async __deleteDatasetsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(t,e,o){return w.fromPromise(this.__expandDataset(t,e,o))}async __expandDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/expansions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ro.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:ul.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findDatasetItemsWithExperimentItems(t,e,o){return w.fromPromise(this.__findDatasetItemsWithExperimentItems(t,e,o))}async __findDatasetItemsWithExperimentItems(t,e,o){var v,S;let{page:i,size:n,experimentIds:c,filters:m,sorting:u,search:g,truncate:f}=e,y={};i!=null&&(y.page=i.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,m!=null&&(y.filters=m),u!=null&&(y.sorting=u),g!=null&&(y.search=g),f!=null&&(y.truncate=f.toString());let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(z.ok)return {data:Sl.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}getDatasetByIdentifier(t,e){return w.fromPromise(this.__getDatasetByIdentifier(t,e))}async __getDatasetByIdentifier(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ar.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(t,e,o){return w.fromPromise(this.__getDatasetExperimentItemsStats(t,e,o))}async __getDatasetExperimentItemsStats(t,e,o){var u,g;let{experimentIds:i,filters:n}=e,c={};c.experiment_ids=i,n!=null&&(c.filters=n);let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/stats`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Ne.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/stats.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}getDatasetItemById(t,e){return w.fromPromise(this.__getDatasetItemById(t,e))}async __getDatasetItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Tt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(t,e,o){return w.fromPromise(this.__patchDatasetItem(t,e,o))}async __patchDatasetItem(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Gr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetItems(t,e={},o){return w.fromPromise(this.__getDatasetItems(t,e,o))}async __getDatasetItems(t,e={},o){var y,z;let{page:i,size:n,version:c,filters:m,truncate:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.version=c),m!=null&&(g.filters=m),u!=null&&(g.truncate=u.toString());let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(f.ok)return {data:Fl.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getDatasetItemsOutputColumns(t,e={},o){return w.fromPromise(this.__getDatasetItemsOutputColumns(t,e,o))}async __getDatasetItemsOutputColumns(t,e={},o){var m,u;let{experimentIds:i}=e,n={};i!=null&&(n.experiment_ids=i);let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/output/columns`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Bl.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}streamDatasetItems(t,e){return w.fromPromise(this.__streamDatasetItems(t,e))}async __streamDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:to.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}compareDatasetVersions(t,e){return w.fromPromise(this.__compareDatasetVersions(t,e))}async __compareDatasetVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/diff`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Hl.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions/diff.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createVersionTag(t,e,o,i){return w.fromPromise(this.__createVersionTag(t,e,o,i))}async __createVersionTag(t,e,o,i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:io.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/hash/{versionHash}/tags.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}deleteVersionTag(t,e,o,i){return w.fromPromise(this.__deleteVersionTag(t,e,o,i))}async __deleteVersionTag(t,e,o,i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(t)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}listDatasetVersions(t,e={},o){return w.fromPromise(this.__listDatasetVersions(t,e,o))}async __listDatasetVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(m.ok)return {data:Jl.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}restoreDatasetVersion(t,e,o){return w.fromPromise(this.__restoreDatasetVersion(t,e,o))}async __restoreDatasetVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ao.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:sr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateDatasetVersion(t,e,o={},i){return w.fromPromise(this.__updateDatasetVersion(t,e,o,i))}async __updateDatasetVersion(t,e,o={},i){var c,m;let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:no.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:sr.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/{id}/versions/hash/{versionHash}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Da=class{constructor(t={}){this._options=t;}findExperiments(t={},e){return w.fromPromise(this.__findExperiments(t,e))}async __findExperiments(t={},e){var O,F;let{page:o,size:i,datasetId:n,optimizationId:c,types:m,name:u,datasetDeleted:g,promptId:f,sorting:y,filters:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.datasetId=n),c!=null&&(v.optimization_id=c),m!=null&&(v.types=m),u!=null&&(v.name=u),g!=null&&(v.dataset_deleted=g.toString()),f!=null&&(v.prompt_id=f),y!=null&&(v.sorting=y),z!=null&&(v.filters=z);let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:im.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")switch(S.error.statusCode){case 400:throw new _(S.error.body,S.rawResponse);default:throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse})}switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}createExperiment(t,e){return w.fromPromise(this.__createExperiment(t,e))}async __createExperiment(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:so.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(t,e){return w.fromPromise(this.__createExperimentItems(t,e))}async __createExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:co.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(t,e){return w.fromPromise(this.__deleteExperimentItems(t,e))}async __deleteExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:lo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(t,e){return w.fromPromise(this.__deleteExperimentsById(t,e))}async __deleteExperimentsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(t,e){return w.fromPromise(this.__experimentItemsBulk(t,e))}async __experimentItemsBulk(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:uo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(t={},e){return w.fromPromise(this.__findFeedbackScoreNames(t,e))}async __findFeedbackScoreNames(t={},e){var c,m;let{experimentIds:o}=t,i={};o!=null&&(i.experiment_ids=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:xr.findFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(t={},e){return w.fromPromise(this.__findExperimentGroups(t,e))}async __findExperimentGroups(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,m={};o!=null&&(m.groups=o),i!=null&&(m.types=i),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/experiments/groups"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:pm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/groups.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}findExperimentGroupsAggregations(t={},e){return w.fromPromise(this.__findExperimentGroupsAggregations(t,e))}async __findExperimentGroupsAggregations(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,m={};o!=null&&(m.groups=o),i!=null&&(m.types=i),n!=null&&(m.name=n),c!=null&&(m.filters=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:mm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/groups/aggregations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}finishExperiments(t,e){return w.fromPromise(this.__finishExperiments(t,e))}async __finishExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/finish"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(t,e){return w.fromPromise(this.__getExperimentById(t,e))}async __getExperimentById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ct.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateExperiment(t,e={},o){return w.fromPromise(this.__updateExperiment(t,e,o))}async __updateExperiment(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:fo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getExperimentItemById(t,e){return w.fromPromise(this.__getExperimentItemById(t,e))}async __getExperimentItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:At.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/items/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperimentItems(t,e){return w.fromPromise(this.__streamExperimentItems(t,e))}async __streamExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ho.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(t,e){return w.fromPromise(this.__streamExperiments(t,e))}async __streamExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ma=class{constructor(t={}){this._options=t;}findFeedbackDefinitions(t={},e){return w.fromPromise(this.__findFeedbackDefinitions(t,e))}async __findFeedbackDefinitions(t={},e){var g,f;let{page:o,size:i,name:n,type:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.type=Ji.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}));let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/feedback-definitions"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Im.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(t,e){return w.fromPromise(this.__createFeedbackDefinition(t,e))}async __createFeedbackDefinition(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Am.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(t,e){return w.fromPromise(this.__getFeedbackDefinitionById(t,e))}async __getFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Dm.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(t,e,o){return w.fromPromise(this.__updateFeedbackDefinition(t,e,o))}async __updateFeedbackDefinition(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Vm.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteFeedbackDefinitionById(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionById(t,e))}async __deleteFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionsBatch(t,e))}async __deleteFeedbackDefinitionsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/feedback-definitions/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Na=class{constructor(t={}){this._options=t;}createGuardrails(t,e){return w.fromPromise(this.__createGuardrails(t,e))}async __createGuardrails(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/guardrails"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:rt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/guardrails.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Fa=class{constructor(t={}){this._options=t;}deleteLlmProviderApiKeysBatch(t,e){return w.fromPromise(this.__deleteLlmProviderApiKeysBatch(t,e))}async __deleteLlmProviderApiKeysBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(t){return w.fromPromise(this.__findLlmProviderKeys(t))}async __findLlmProviderKeys(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/llm-provider-key"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Gm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(t,e){return w.fromPromise(this.__storeLlmProviderApiKey(t,e))}async __storeLlmProviderApiKey(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:bo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(t,e){return w.fromPromise(this.__getLlmProviderApiKeyById(t,e))}async __getLlmProviderApiKeyById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Dt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateLlmProviderApiKey(t,e={},o){return w.fromPromise(this.__updateLlmProviderApiKey(t,e,o))}async __updateLlmProviderApiKey(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:xo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new $(i.error.body,i.rawResponse);case 403:throw new Z(ae.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Oa=class{constructor(t={}){this._options=t;}evaluateSpans(t,e){return w.fromPromise(this.__evaluateSpans(t,e))}async __evaluateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Mt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/manual-evaluation/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateThreads(t,e){return w.fromPromise(this.__evaluateThreads(t,e))}async __evaluateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Mt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/manual-evaluation/threads.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateTraces(t,e){return w.fromPromise(this.__evaluateTraces(t,e))}async __evaluateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Mt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/manual-evaluation/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Wa=class{constructor(t={}){this._options=t;}receiveProtobufTraces(t){return w.fromPromise(this.__receiveProtobufTraces(t))}async __receiveProtobufTraces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/otel/v1/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/otel/v1/traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ba=class{constructor(t={}){this._options=t;}cancelStudioOptimizations(t,e){return w.fromPromise(this.__cancelStudioOptimizations(t,e))}async __cancelStudioOptimizations(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/cancel`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/cancel.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findOptimizations(t={},e){return w.fromPromise(this.__findOptimizations(t,e))}async __findOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:m,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),m!=null&&(g.dataset_deleted=m.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:yd.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 400:throw new _(f.error.body,f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}createOptimization(t,e){return w.fromPromise(this.__createOptimization(t,e))}async __createOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:za.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(t,e){return w.fromPromise(this.__upsertOptimization(t,e))}async __upsertOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:za.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(t,e){return w.fromPromise(this.__deleteOptimizationsById(t,e))}async __deleteOptimizationsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getOptimizationById(t,e){return w.fromPromise(this.__getOptimizationById(t,e))}async __getOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ft.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateOptimizationsById(t,e={},o){return w.fromPromise(this.__updateOptimizationsById(t,e,o))}async __updateOptimizationsById(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ro.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getStudioOptimizationLogs(t,e){return w.fromPromise(this.__getStudioOptimizationLogs(t,e))}async __getStudioOptimizationLogs(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:kd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/logs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var La=class{constructor(t={}){this._options=t;}findProjects(t={},e){return w.fromPromise(this.__findProjects(t,e))}async __findProjects(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Sd.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(t,e){return w.fromPromise(this.__createProject(t,e))}async __createProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:yo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(t,e){return w.fromPromise(this.__getProjectById(t,e))}async __getProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Wt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(t,e){return w.fromPromise(this.__deleteProjectById(t,e))}async __deleteProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(t,e={},o){return w.fromPromise(this.__updateProject(t,e,o))}async __updateProject(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ko.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteProjectsBatch(t,e){return w.fromPromise(this.__deleteProjectsBatch(t,e))}async __deleteProjectsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(t={},e){return w.fromPromise(this.__findFeedbackScoreNamesByProjectIds(t,e))}async __findFeedbackScoreNamesByProjectIds(t={},e){var c,m;let{projectIds:o}=t,i={};o!=null&&(i.project_ids=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Ad.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(t,e={},o){return w.fromPromise(this.__getProjectMetrics(t,e,o))}async __getProjectMetrics(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}/metrics`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:zo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:jd.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getProjectStats(t={},e){return w.fromPromise(this.__getProjectStats(t,e))}async __getProjectStats(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,m={};o!=null&&(m.page=o.toString()),i!=null&&(m.size=i.toString()),n!=null&&(m.name=n),c!=null&&(m.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/projects/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:Ud.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(t,e){return w.fromPromise(this.__retrieveProject(t,e))}async __retrieveProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Od.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Va=class{constructor(t={}){this._options=t;}getPrompts(t={},e){return w.fromPromise(this.__getPrompts(t,e))}async __getPrompts(t={},e){var f,y;let{page:o,size:i,name:n,sorting:c,filters:m}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),m!=null&&(u.filters=m);let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/prompts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:qd.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(t,e){return w.fromPromise(this.__createPrompt(t,e))}async __createPrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:So.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(t,e){return w.fromPromise(this.__createPromptVersion(t,e))}async __createPromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Se.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePromptVersions(t,e){return w.fromPromise(this.__updatePromptVersions(t,e))}async __updatePromptVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ao.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(t,e){return w.fromPromise(this.__getPromptById(t,e))}async __getPromptById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Xd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePrompt(t,e,o){return w.fromPromise(this.__updatePrompt(t,e,o))}async __updatePrompt(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:To.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deletePrompt(t,e){return w.fromPromise(this.__deletePrompt(t,e))}async __deletePrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(t,e){return w.fromPromise(this.__deletePromptsBatch(t,e))}async __deletePromptsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(t,e){return w.fromPromise(this.__getPromptVersionById(t,e))}async __getPromptVersionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/versions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Se.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts/versions/{versionId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersions(t,e={},o){return w.fromPromise(this.__getPromptVersions(t,e,o))}async __getPromptVersions(t,e={},o){var y,z;let{page:i,size:n,search:c,sorting:m,filters:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.search=c),m!=null&&(g.sorting=m),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:g,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(f.ok)return {data:Qd.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts/{id}/versions.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}restorePromptVersion(t,e,o){return w.fromPromise(this.__restorePromptVersion(t,e,o))}async __restorePromptVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Se.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}retrievePromptVersion(t,e){return w.fromPromise(this.__retrievePromptVersion(t,e))}async __retrievePromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Eo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Se.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 404:throw new A(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ha=class{constructor(t={}){this._options=t;}getServiceToggles(t){return w.fromPromise(this.__getServiceToggles(t))}async __getServiceToggles(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/toggles"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:eu.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/toggles.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ja=class{constructor(t={}){this._options=t;}addSpanComment(t,e,o){return w.fromPromise(this.__addSpanComment(t,e,o))}async __addSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addSpanFeedbackScore(t,e,o){return w.fromPromise(this.__addSpanFeedbackScore(t,e,o))}async __addSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createSpans(t,e){return w.fromPromise(this.__createSpans(t,e))}async __createSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(t,e){return w.fromPromise(this.__batchUpdateSpans(t,e))}async __batchUpdateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Uo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(t={},e){return w.fromPromise(this.__getSpansByProject(t,e))}async __getSpansByProject(t={},e){var te,ur;let{page:o,size:i,projectName:n,projectId:c,traceId:m,type:u,filters:g,truncate:f,stripAttachments:y,sorting:z,exclude:v,fromTime:S,toTime:O}=t,F={};o!=null&&(F.page=o.toString()),i!=null&&(F.size=i.toString()),n!=null&&(F.project_name=n),c!=null&&(F.project_id=c),m!=null&&(F.trace_id=m),u!=null&&(F.type=na.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(F.filters=g),f!=null&&(F.truncate=f.toString()),y!=null&&(F.strip_attachments=y.toString()),z!=null&&(F.sorting=z),v!=null&&(F.exclude=v),S!=null&&(F.from_time=S.toISOString()),O!=null&&(F.to_time=O.toISOString());let G=await x({url:R((ur=(te=await s.get(this._options.baseUrl))!=null?te:await s.get(this._options.environment))!=null?ur:b.Default,"v1/private/spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:F,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(G.ok)return {data:au.parseOrThrow(G.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:G.rawResponse};if(G.error.reason==="status-code")throw new p({statusCode:G.error.statusCode,body:G.error.body,rawResponse:G.rawResponse});switch(G.error.reason){case "non-json":throw new p({statusCode:G.error.statusCode,body:G.error.rawBody,rawResponse:G.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(t,e){return w.fromPromise(this.__createSpan(t,e))}async __createSpan(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(t,e={},o){return w.fromPromise(this.__getSpanById(t,e,o))}async __getSpanById(t,e={},o){var m,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Vt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 404:throw new A(c.error.body,c.rawResponse);default:throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteSpanById(t,e){return w.fromPromise(this.__deleteSpanById(t,e))}async __deleteSpanById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 501:throw new Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(t,e,o){return w.fromPromise(this.__updateSpan(t,e,o))}async __updateSpan(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteSpanComments(t,e){return w.fromPromise(this.__deleteSpanComments(t,e))}async __deleteSpanComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(t,e,o){return w.fromPromise(this.__deleteSpanFeedbackScore(t,e,o))}async __deleteSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Bt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findFeedbackScoreNames1(t={},e){return w.fromPromise(this.__findFeedbackScoreNames1(t,e))}async __findFeedbackScoreNames1(t={},e){var m,u;let{projectId:o,type:i}=t,n={};o!=null&&(n.project_id=o),i!=null&&(n.type=sa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}));let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:Rr.findFeedbackScoreNames1.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(t,e,o){return w.fromPromise(this.__getSpanComment(t,e,o))}async __getSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getSpanStats(t={},e){return w.fromPromise(this.__getSpanStats(t,e))}async __getSpanStats(t={},e){var z,v;let{projectId:o,projectName:i,traceId:n,type:c,filters:m,fromTime:u,toTime:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.project_name=i),n!=null&&(f.trace_id=n),c!=null&&(f.type=pa.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),m!=null&&(f.filters=m),u!=null&&(f.from_time=u.toISOString()),g!=null&&(f.to_time=g.toISOString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/spans/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:f,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(y.ok)return {data:Ne.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(t,e){return w.fromPromise(this.__scoreBatchOfSpans(t,e))}async __scoreBatchOfSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(t={},e){return w.fromPromise(this.__searchSpans(t,e))}async __searchSpans(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Do.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(t,e,o){return w.fromPromise(this.__updateSpanComment(t,e,o))}async __updateSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Xa=class{constructor(t={}){this._options=t;}addThreadComment(t,e,o){return w.fromPromise(this.__addThreadComment(t,e,o))}async __addThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceComment(t,e,o){return w.fromPromise(this.__addTraceComment(t,e,o))}async __addTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceFeedbackScore(t,e,o){return w.fromPromise(this.__addTraceFeedbackScore(t,e,o))}async __addTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createTraces(t,e){return w.fromPromise(this.__createTraces(t,e))}async __createTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:No.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(t,e){return w.fromPromise(this.__batchUpdateTraces(t,e))}async __batchUpdateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Oo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(t,e){return w.fromPromise(this.__batchUpdateThreads(t,e))}async __batchUpdateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(t={},e){return w.fromPromise(this.__closeTraceThread(t,e))}async __closeTraceThread(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/close"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Lo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/close.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTracesByProject(t={},e){return w.fromPromise(this.__getTracesByProject(t,e))}async __getTracesByProject(t={},e){var F,G;let{page:o,size:i,projectName:n,projectId:c,filters:m,truncate:u,stripAttachments:g,sorting:f,exclude:y,fromTime:z,toTime:v}=t,S={};o!=null&&(S.page=o.toString()),i!=null&&(S.size=i.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),m!=null&&(S.filters=m),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),f!=null&&(S.sorting=f),y!=null&&(S.exclude=y),z!=null&&(S.from_time=z.toISOString()),v!=null&&(S.to_time=v.toISOString());let O=await x({url:R((G=(F=await s.get(this._options.baseUrl))!=null?F:await s.get(this._options.environment))!=null?G:b.Default,"v1/private/traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:S,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(O.ok)return {data:fu.parseOrThrow(O.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:O.rawResponse};if(O.error.reason==="status-code")throw new p({statusCode:O.error.statusCode,body:O.error.body,rawResponse:O.rawResponse});switch(O.error.reason){case "non-json":throw new p({statusCode:O.error.statusCode,body:O.error.rawBody,rawResponse:O.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(t,e){return w.fromPromise(this.__createTrace(t,e))}async __createTrace(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Mo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(t,e={},o){return w.fromPromise(this.__getTraceById(t,e,o))}async __getTraceById(t,e={},o){var m,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(m=await s.get(this._options.baseUrl))!=null?m:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:n,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(c.ok)return {data:Jt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(t,e){return w.fromPromise(this.__deleteTraceById(t,e))}async __deleteTraceById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(t,e,o){return w.fromPromise(this.__updateTrace(t,e,o))}async __updateTrace(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Fo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteThreadComments(t,e){return w.fromPromise(this.__deleteThreadComments(t,e))}async __deleteThreadComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(t,e){return w.fromPromise(this.__deleteThreadFeedbackScores(t,e))}async __deleteThreadFeedbackScores(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/feedback-scores/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceComments(t,e){return w.fromPromise(this.__deleteTraceComments(t,e))}async __deleteTraceComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(t,e,o){return w.fromPromise(this.__deleteTraceFeedbackScore(t,e,o))}async __deleteTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Bt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteTraceThreads(t,e){return w.fromPromise(this.__deleteTraceThreads(t,e))}async __deleteTraceThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ho.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(t,e){return w.fromPromise(this.__deleteTraces(t,e))}async __deleteTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(t={},e){return w.fromPromise(this.__findFeedbackScoreNames2(t,e))}async __findFeedbackScoreNames2(t={},e){var c,m;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findFeedbackScoreNames2.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(t={},e){return w.fromPromise(this.__findTraceThreadsFeedbackScoreNames(t,e))}async __findTraceThreadsFeedbackScoreNames(t={},e){var c,m;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((m=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?m:b.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findTraceThreadsFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getTraceStats(t={},e){return w.fromPromise(this.__getTraceStats(t,e))}async __getTraceStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:m}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/traces/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Ne.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(t,e,o){return w.fromPromise(this.__getThreadComment(t,e,o))}async __getThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThreadStats(t={},e){return w.fromPromise(this.__getTraceThreadStats(t,e))}async __getTraceThreadStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:m}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),m!=null&&(u.to_time=m.toISOString());let g=await x({url:R((y=(f=await s.get(this._options.baseUrl))!=null?f:await s.get(this._options.environment))!=null?y:b.Default,"v1/private/traces/threads/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:u,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(g.ok)return {data:Ne.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getTraceComment(t,e,o){return w.fromPromise(this.__getTraceComment(t,e,o))}async __getTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThread(t,e){return w.fromPromise(this.__getTraceThread(t,e))}async __getTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:va.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Xt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new A(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceThreads(t={},e){return w.fromPromise(this.__getTraceThreads(t,e))}async __getTraceThreads(t={},e){var O,F;let{page:o,size:i,projectName:n,projectId:c,truncate:m,stripAttachments:u,filters:g,sorting:f,fromTime:y,toTime:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.project_name=n),c!=null&&(v.project_id=c),m!=null&&(v.truncate=m.toString()),u!=null&&(v.strip_attachments=u.toString()),g!=null&&(v.filters=g),f!=null&&(v.sorting=f),y!=null&&(v.from_time=y.toISOString()),z!=null&&(v.to_time=z.toISOString());let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/traces/threads"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:gu.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse});switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(t,e){return w.fromPromise(this.__openTraceThread(t,e))}async __openTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/open"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:va.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(t,e){return w.fromPromise(this.__scoreBatchOfThreads(t,e))}async __scoreBatchOfThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(t,e){return w.fromPromise(this.__scoreBatchOfTraces(t,e))}async __scoreBatchOfTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(t={},e){return w.fromPromise(this.__searchTraceThreads(t,e))}async __searchTraceThreads(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(t={},e){return w.fromPromise(this.__searchTraces(t,e))}async __searchTraces(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ko.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(t,e,o){return w.fromPromise(this.__updateThread(t,e,o))}async __updateThread(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Wo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateThreadComment(t,e,o){return w.fromPromise(this.__updateThreadComment(t,e,o))}async __updateThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateTraceComment(t,e,o){return w.fromPromise(this.__updateTraceComment(t,e,o))}async __updateTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ka=class{constructor(t={}){this._options=t;}getWelcomeWizardStatus(t){return w.fromPromise(this.__getWelcomeWizardStatus(t))}async __getWelcomeWizardStatus(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/welcome-wizard"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:hu.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(t={},e){return w.fromPromise(this.__submitWelcomeWizard(t,e))}async __submitWelcomeWizard(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/welcome-wizard"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ot.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/welcome-wizard.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ga=class{constructor(t={}){this._options=t;}costsSummary(t,e){return w.fromPromise(this.__costsSummary(t,e))}async __costsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Pr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:cr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/costs/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceConfiguration(t){return w.fromPromise(this.__getWorkspaceConfiguration(t))}async __getWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Kt.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new A(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}upsertWorkspaceConfiguration(t,e){return w.fromPromise(this.__upsertWorkspaceConfiguration(t,e))}async __upsertWorkspaceConfiguration(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Kt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Kt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(t){return w.fromPromise(this.__deleteWorkspaceConfiguration(t))}async __deleteWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new A(e.error.body,e.rawResponse);default:throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse})}switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/workspaces/configurations.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getCost(t,e){return w.fromPromise(this.__getCost(t,e))}async __getCost(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Pr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Sa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/costs.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getMetric(t,e){return w.fromPromise(this.__getMetric(t,e))}async __getMetric(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Pr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Sa.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/metrics.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}metricsSummary(t,e){return w.fromPromise(this.__metricsSummary(t,e))}async __metricsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Pr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:wu.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/workspaces/metrics/summaries.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var $a=class{constructor(t={}){this._options=t;}datasetsRedirect(t,e){return w.fromPromise(this.__datasetsRedirect(t,e))}async __datasetsRedirect(t,e){var u,g;let{datasetId:o,workspaceName:i,path:n}=t,c={};c.dataset_id=o,i!=null&&(c.workspace_name=i),c.path=n;let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,"v1/session/redirect/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new A(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}experimentsRedirect(t,e){return w.fromPromise(this.__experimentsRedirect(t,e))}async __experimentsRedirect(t,e){var g,f;let{datasetId:o,experimentId:i,workspaceName:n,path:c}=t,m={};m.dataset_id=o,m.experiment_id=i,n!=null&&(m.workspace_name=n),m.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/session/redirect/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new A(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/experiments.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}optimizationsRedirect(t,e){return w.fromPromise(this.__optimizationsRedirect(t,e))}async __optimizationsRedirect(t,e){var g,f;let{datasetId:o,optimizationId:i,workspaceName:n,path:c}=t,m={};m.dataset_id=o,m.optimization_id=i,n!=null&&(m.workspace_name=n),m.path=c;let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/session/redirect/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:m,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(u.ok)return {data:void 0,rawResponse:u.rawResponse};if(u.error.reason==="status-code")switch(u.error.statusCode){case 400:throw new _(u.error.body,u.rawResponse);case 404:throw new A(u.error.body,u.rawResponse);default:throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse})}switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/optimizations.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}projectsRedirect(t,e){return w.fromPromise(this.__projectsRedirect(t,e))}async __projectsRedirect(t,e){var u,g;let{traceId:o,workspaceName:i,path:n}=t,c={};c.trace_id=o,i!=null&&(c.workspace_name=i),c.path=n;let m=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,"v1/session/redirect/projects"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:c,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new _(m.error.body,m.rawResponse);case 404:throw new A(m.error.body,m.rawResponse);default:throw new p({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}switch(m.error.reason){case "non-json":throw new p({statusCode:m.error.statusCode,body:m.error.rawBody,rawResponse:m.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/projects.");case "unknown":throw new p({message:m.error.errorMessage,rawResponse:m.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Gt=class{constructor(t={}){this._options=t;}get systemUsage(){var t;return (t=this._systemUsage)!=null?t:this._systemUsage=new _a(this._options)}get alerts(){var t;return (t=this._alerts)!=null?t:this._alerts=new Aa(this._options)}get annotationQueues(){var t;return (t=this._annotationQueues)!=null?t:this._annotationQueues=new Ta(this._options)}get attachments(){var t;return (t=this._attachments)!=null?t:this._attachments=new Ea(this._options)}get check(){var t;return (t=this._check)!=null?t:this._check=new Pa(this._options)}get automationRuleEvaluators(){var t;return (t=this._automationRuleEvaluators)!=null?t:this._automationRuleEvaluators=new Ca(this._options)}get chatCompletions(){var t;return (t=this._chatCompletions)!=null?t:this._chatCompletions=new ja(this._options)}get dashboards(){var t;return (t=this._dashboards)!=null?t:this._dashboards=new Ia(this._options)}get datasets(){var t;return (t=this._datasets)!=null?t:this._datasets=new Ua(this._options)}get experiments(){var t;return (t=this._experiments)!=null?t:this._experiments=new Da(this._options)}get feedbackDefinitions(){var t;return (t=this._feedbackDefinitions)!=null?t:this._feedbackDefinitions=new Ma(this._options)}get guardrails(){var t;return (t=this._guardrails)!=null?t:this._guardrails=new Na(this._options)}get llmProviderKey(){var t;return (t=this._llmProviderKey)!=null?t:this._llmProviderKey=new Fa(this._options)}get manualEvaluation(){var t;return (t=this._manualEvaluation)!=null?t:this._manualEvaluation=new Oa(this._options)}get openTelemetryIngestion(){var t;return (t=this._openTelemetryIngestion)!=null?t:this._openTelemetryIngestion=new Wa(this._options)}get optimizations(){var t;return (t=this._optimizations)!=null?t:this._optimizations=new Ba(this._options)}get projects(){var t;return (t=this._projects)!=null?t:this._projects=new La(this._options)}get prompts(){var t;return (t=this._prompts)!=null?t:this._prompts=new Va(this._options)}get serviceToggles(){var t;return (t=this._serviceToggles)!=null?t:this._serviceToggles=new Ha(this._options)}get spans(){var t;return (t=this._spans)!=null?t:this._spans=new Ja(this._options)}get traces(){var t;return (t=this._traces)!=null?t:this._traces=new Xa(this._options)}get welcomeWizard(){var t;return (t=this._welcomeWizard)!=null?t:this._welcomeWizard=new Ka(this._options)}get workspaces(){var t;return (t=this._workspaces)!=null?t:this._workspaces=new Ga(this._options)}get redirect(){var t;return (t=this._redirect)!=null?t:this._redirect=new $a(this._options)}isAlive(t){return w.fromPromise(this.__isAlive(t))}async __isAlive(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ping"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(t){return w.fromPromise(this.__version(t))}async __version(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ver"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":d.type,"X-Fern-Runtime-Version":d.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ver.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var oe=()=>uuid.v7();var Cr=class{static serializePromptToInfoDict(t){return {name:t.name,...t.id&&{id:t.id},version:{...t.versionId&&{id:t.versionId},...t.commit&&{commit:t.commit},template:t.prompt}}}static normalizeMetadata(t){if(!t)return {};if(typeof t=="object"&&!Array.isArray(t))return t;if(typeof t=="string")try{let e=JSON.parse(t);if(typeof e=="object"&&!Array.isArray(e))return e}catch{}return {}}static mergePromptsIntoMetadata(t,e,o){let i=o.map(m=>this.serializePromptToInfoDict(m)),n=this.normalizeMetadata(t),c=this.normalizeMetadata(e);return {...n,...c,opik_prompts:i}}static processTraceUpdate(t,e){let{prompts:o,...i}=t;if(!o||o.length===0)return i;let n=this.mergePromptsIntoMetadata(e,i.metadata,o);return {...i,metadata:n}}static processSpanUpdate(t,e){let{prompts:o,...i}=t;if(!o||o.length===0)return i;let n=this.mergePromptsIntoMetadata(e,i.metadata,o);return {...i,metadata:n}}};var Qa=class a{constructor(t,e){this.data=t;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=t=>{var i;let e=Cr.processSpanUpdate(t,this.data.metadata),o={parentSpanId:this.data.parentSpanId,projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,traceId:this.data.traceId,...e};return this.opik.spanBatchQueue.update(this.data.id,o),this.data={...this.data,...t},this};this.span=t=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new a(o,this.opik);return this.childSpans.push(i),i};}};var Ya=class{constructor(t,e){this.data=t;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=t=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:t.projectName)!=null?c:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new Qa(o,this.opik);return this.spans.push(i),i};this.update=t=>{var i;let e=Cr.processTraceUpdate(t,this.data.metadata),o={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...e};return this.opik.traceBatchQueue.update(this.data.id,o),this.data={...this.data,...o},this};}};var Vf={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Za={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},wR=a=>Object.entries(a).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),bR=a=>a.replace(/\/api$/,""),xR=a=>Buffer.from(a).toString("base64"),Hf=(a,t,e)=>{let o=wR(e),i=`${t}?${o}`;return new URL(i,a).toString()},Jf=({datasetId:a,experimentId:t,baseUrl:e})=>Hf(e,Vf.EXPERIMENTS,{[Za.EXPERIMENT_ID]:t,[Za.DATASET_ID]:a,[Za.PATH]:xR(e)});var Xf=({projectName:a,workspaceName:t,apiUrl:e})=>{let o=bR(e),i=`${t}/${Vf.PROJECT_BY_NAME}`;return Hf(o,i,{[Za.PROJECT_NAME]:a})};var RR=300,qa=100,$t=class{constructor({action:t,batchSize:e=qa,delay:o,enableBatch:i,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(t,e)=>{if(this.queue.set(t,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(t,e)=>{let o=this.queue.get(t);o&&(this.queue.set(t,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let t=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${t.size} items to ${this.name} promise:`,t),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,t),this.action(t))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,t);}),await this.promise;};this.action=t,this.batchSize=e,this.delay=o,this.enableBatch=i,this.name=n;}},ge=class{constructor({delay:t=RR,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:i=true,createBatchSize:n=qa,updateBatchSize:c=qa,deleteBatchSize:m=qa,name:u="BatchQueue"}={}){this.create=t=>{let e=this.getId(t);this.createQueue.add(e,t);};this.get=async t=>{let e=this.createQueue.queue.get(t);return e||this.getEntity(t)};this.update=(t,e)=>{if(this.createQueue.queue.get(t)){this.createQueue.update(t,e);return}this.updateQueue.add(t,e);};this.delete=t=>{if(this.createQueue.queue.has(t)){this.createQueue.queue.delete(t);return}this.deleteQueue.add(t);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new $t({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:t,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new $t({action:async g=>{await this.createQueue.flush();let f=Array.from(g.entries());for(let[y,z]of f)await this.updateEntity(y,z);},delay:t,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new $t({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:t,enableBatch:i,batchSize:m,name:`${u}:deleteQueue`});}};var en=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.spans.createSpans({spans:e},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.spans.updateSpan(e,o,this.api.requestOptions);}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanById(o,this.api.requestOptions);}};var rn=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.spans.deleteSpanFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var on=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.traces.createTraces({traces:e},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,o){await this.api.traces.updateTrace(e,o,this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};var tn=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let o of e)await this.api.traces.deleteTraceFeedbackScore(o.id,{name:o.name},this.api.requestOptions);}};var an=class extends Gt{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var nn=class extends ge{constructor(e,o){super({delay:o,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let o of e)await this.api.datasets.createDataset(o,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,o){await this.api.datasets.updateDataset(e,{name:o.name||"",visibility:o.visibility,description:o.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};var bu=null;async function Kf(){return bu||(bu=await yR__default.default()),bu}var Qt=class a{constructor(t){let{id:e,traceId:o,spanId:i,source:n,...c}=t;this.id=e||oe(),this.traceId=o,this.spanId=i,this.source=n||Gn.Sdk,this.data={...c};}getContent(t=false){return t?{...this.data,id:this.id}:{...this.data}}async contentHash(){let t=this.getContent(),e=kR__default.default(t);return (await Kf()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(t){return new a({id:t.id,traceId:t.traceId,spanId:t.spanId,source:t.source,...t.data})}};async function Fe(a,t,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),i=[],n="";try{for await(let m of a){n+=o.decode(m,{stream:!0});let u=n.split(`
5
+ `);n=(c=u.pop())!=null?c:"";for(let g of u)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let f=JSON.parse(g),y=t.parse(f);if(y.ok){if(i.push(y.value),e!==void 0&&i.length>=e)return i}else k.error("Error parsing experiment item:",y.errors);}catch(f){k.error("Error parsing JSON line:",f instanceof Error?f.message:String(f));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let m=JSON.parse(n),u=t.parse(m);u.ok?i.push(u.value):k.error("Error parsing experiment item:",u.errors);}catch(m){k.error("Error parsing remaining buffer:",m instanceof Error?m.message:String(m));}}catch(m){k.error("Error processing stream:",m instanceof Error?m.message:String(m));}return i}function Yt(a,t){let e=[];for(let o=0;o<a.length;o+=t.maxBatchSize)e.push(a.slice(o,o+t.maxBatchSize));return e}var de=class extends Error{constructor(t){var e;super(t.message),this.name=this.constructor.name,this.code=t.code,this.statusCode=t.statusCode,this.details=t.details,this.originalError=t.originalError,k.error(this.message),(e=Error.captureStackTrace)==null||e.call(Error,this,this.constructor);}toJSON(){return {name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,details:this.details,originalError:this.originalError,stack:this.stack}}};var Gf={DATASET_NOT_FOUND:a=>`Dataset with name '${a}' not found`,DATASET_ITEM_NOT_FOUND:a=>`Dataset item with id '${a}' not found`,DATASET_ITEM_MISSING_ID:a=>`Item at index ${a} is missing an ID required for update`,INVALID_JSON_FORMAT:a=>`Invalid JSON format${a?": "+a:""}`,JSON_NOT_ARRAY:"JSON input must be an array of objects",ITEM_NOT_OBJECT:(a,t)=>`Item at position ${a} is not an object (${t})`,INSERTION_FAILED:a=>`Failed to insert items from JSON: ${a}`,DATASET_JSON_PARSE_ERROR:a=>`Failed to parse JSON input: ${a}`};var vR={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID"},sn=class extends de{constructor(t){super({message:Gf.DATASET_ITEM_MISSING_ID(t),code:vR.DATASET_ITEM_MISSING_ID});}};var SR={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},pn=class extends de{constructor(t){super({message:t,code:SR.SEARCH_TIMEOUT});}};var cn={JSON_NOT_ARRAY:a=>`JSON input must be an array of objects${a?` (${a})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(a,t)=>`Item at position ${a} is not an object (${t})`};var xu={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},ln=class extends de{constructor(t){let e=t instanceof Error?t:new Error(String(t));super({message:cn.JSON_PARSE_ERROR,code:xu.JSON_PARSE_ERROR,originalError:e});}},mn=class extends de{constructor(t){super({message:cn.JSON_NOT_ARRAY(t),code:xu.JSON_NOT_ARRAY});}},dn=class extends de{constructor(t,e){super({message:cn.JSON_ITEM_NOT_OBJECT(t,e),code:xu.JSON_ITEM_NOT_OBJECT});}};var jr=class{constructor({name:t,description:e,id:o},i){this.opik=i;this.idToHash=new Map;this.hashes=new Set;this.id=o||oe(),this.name=t,this.description=e;}async insert(t){if(!t||t.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(t),o=Yt(e,{maxBatchSize:1e3});try{let i=0;for(let n of o)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:n}),i+=n.length,k.info(`Inserted ${Math.min(i,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(i){throw k.error(`Error inserting items into dataset: ${i instanceof Error?i.message:String(i)}`),i}}async update(t){if(!(!t||t.length===0)){for(let e=0;e<t.length;e++)if(!t[e].id)throw new sn(e);await this.insert(t);}}async delete(t){if(!t||t.length===0){k.info("No item IDs provided for deletion");return}let e=Yt(t,{maxBatchSize:100});for await(let o of e){k.debug("Deleting dataset items batch",{batchSize:o.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:o});for(let i of o)if(this.idToHash.has(i)){let n=this.idToHash.get(i);this.hashes.delete(n),this.idToHash.delete(i);}}}async clear(){let e=(await this.getItems()).map(o=>o.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getItems(t,e){return (await this.getItemsAsDataclasses(t,e)).map(i=>i.getContent(true))}async getItemsAsDataclasses(t,e){let o=t?Math.min(t,2e3):2e3,i=await this.opik.api.datasets.streamDatasetItems({datasetName:this.name,lastRetrievedId:e,steamLimit:o});return (await Fe(i,j.DatasetItemPublic,t)).map(c=>Qt.fromApiModel(c))}async insertFromJson(t,e={},o=[]){let i;try{i=JSON.parse(t);}catch(c){throw new ln(c)}if(!Array.isArray(i))throw new mn(typeof i);if(i.length===0)return;for(let c=0;c<i.length;c++){let m=i[c];if(typeof m!="object"||m===null)throw new dn(c,typeof m)}let n=i.map(c=>{let m=c,u={};for(let[g,f]of Object.entries(m)){if(o.includes(g))continue;let y=e[g]||g;u[y]=f;}return u});await this.insert(n);}async toJson(t={}){let o=(await this.getItems()).map(i=>{let n={...i};if(Object.keys(t).length>0){for(let[c,m]of Object.entries(t))if(c in n){let u=n[c];delete n[c],n[m]=u;}}return n});return kR__default.default(o)}async getDeduplicatedItems(t){let e=[];for(let o of t){let i=new Qt(o),n=await i.contentHash();if(this.hashes.has(n)){k.debug("Duplicate item found - skipping",{contentHash:n,datasetId:this.id});continue}e.push(i.toApiModel()),this.hashes.add(n),this.idToHash.set(i.id,n);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){k.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let t=await this.getItemsAsDataclasses();this.clearHashState();for(let e of t){let o=await e.contentHash();this.idToHash.set(e.id,o),this.hashes.add(o);}k.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:t.length});}catch(t){if(t instanceof p&&t.statusCode===404){k.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw t}}};var Ru=class extends Error{constructor(t){super(t),this.name="DatasetError";}},Zt=class extends Ru{constructor(t){super(`Dataset with name '${t}' not found`),this.name="DatasetNotFoundError";}};var un=class{constructor(t){if(!t.datasetItemId)throw new Error("datasetItemId is required");if(!t.traceId)throw new Error("traceId is required");this.datasetItemId=t.datasetItemId,this.traceId=t.traceId;}},gn=class a{constructor(t){this.id=t.id,this.datasetItemId=t.datasetItemId,this.traceId=t.traceId,this.datasetItemData=t.datasetItemData,this.evaluationTaskOutput=t.evaluationTaskOutput,this.feedbackScores=[...t.feedbackScores];}static fromRestExperimentItemCompare(t){var o,i;let e=(i=(o=t.feedbackScores)==null?void 0:o.map(n=>({categoryName:n.categoryName,name:n.name,reason:n.reason,value:n.value,source:n.source})))!=null?i:[];return new a({id:t.id,traceId:t.traceId,datasetItemId:t.datasetItemId,datasetItemData:t.input,evaluationTaskOutput:t.output,feedbackScores:e})}};var lr=class{constructor({id:t,name:e,datasetName:o,prompts:i},n){this.opik=n;this.id=t||oe(),this._name=e,this.datasetName=o,this.prompts=i;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let t=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=t.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(t){if(t.length===0)return;let e=t.map(i=>({id:oe(),experimentId:this.id,datasetItemId:i.datasetItemId,traceId:i.traceId})),o=Yt(e,{maxBatchSize:50});try{for(let i of o)await this.opik.api.experiments.createExperimentItems({experimentItems:i});k.debug(`Inserted ${t.length} items into experiment ${this.id}`);}catch(i){throw k.error(`Error inserting items into experiment: ${i instanceof Error?i.message:String(i)}`),i}}async getItems(t){let e=[],{maxResults:i,truncate:n=false}=t||{},c,m=true;try{for(;m&&!(i!==void 0&&e.length>=i);){let u=i?Math.min(i-e.length,2e3):2e3,g=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:u,lastRetrievedId:c,truncate:n});try{let f=await Fe(g,j.ExperimentItemCompare,u);if(f.length===0){m=!1;break}for(let y of f){let z=gn.fromRestExperimentItemCompare(y);if(e.push(z),i!==void 0&&e.length>=i){m=!1;break}}c=f[f.length-1].id;}catch(f){k.error("Error parsing experiment item: "+(f instanceof Error?f.message:String(f))),m=!1;break}}}catch(u){throw k.error("Error retrieving experiment items: "+(u instanceof Error?u.message:String(u))),u}return k.info(`Retrieved ${e.length} items${i?` (limited by maxResults=${i})`:""}`),e}async getUrl(){let t=await this.opik.getDataset(this.datasetName),e=this.opik.config.apiUrl||In.apiUrl;return Jf({datasetId:t.id,experimentId:this.id,baseUrl:e})}};var fn={EXPERIMENT_NOT_FOUND:a=>`Experiment with name '${a}' not found`,INVALID_CONFIG_TYPE:a=>`experimentConfig must be a plain object, but ${a} was provided. Please provide a valid configuration object like { model: 'gpt-4', temperature: 0.7 }`,CONFIG_PROMPTS_CONFLICT:()=>`Cannot specify both 'prompts' parameter and 'experimentConfig.prompts'. Choose one approach:
6
6
  1. Use prompts parameter: buildMetadataAndPromptVersions(config, [prompt1, prompt2])
7
7
  2. Use config only: buildMetadataAndPromptVersions({ ...config, prompts: {...} })
8
8
 
9
- The prompts parameter is recommended for prompt version tracking.`};var yu={EXPERIMENT_NOT_FOUND:"EXPERIMENT_NOT_FOUND",INVALID_CONFIG_TYPE:"INVALID_CONFIG_TYPE",CONFIG_PROMPTS_CONFLICT:"CONFIG_PROMPTS_CONFLICT"},Zt=class extends de{constructor(t){super({message:fn.EXPERIMENT_NOT_FOUND(t),code:yu.EXPERIMENT_NOT_FOUND});}},qt=class a extends de{constructor(t,e){super({message:t,code:e});}static invalidConfigType(t){return new a(fn.INVALID_CONFIG_TYPE(t),yu.INVALID_CONFIG_TYPE)}static promptsConflict(){return new a(fn.CONFIG_PROMPTS_CONFLICT(),yu.CONFIG_PROMPTS_CONFLICT)}};function $f(a,t){if(a!==void 0&&(typeof a!="object"||a===null||Array.isArray(a)))throw qt.invalidConfigType(typeof a);if(t&&t.length>0&&(a!=null&&a.prompts))throw qt.promptsConflict();if(!a&&(!t||t.length===0))return [void 0,void 0];let e=a?structuredClone(a):{},o;if(t&&t.length>0){o=[];let i={};for(let n of t)o.push({id:n.versionId}),i[n.name]=n.prompt;e.prompts=i;}return Object.keys(e).length===0?[void 0,void 0]:[e,o]}var ye={MUSTACHE:"mustache",JINJA2:"jinja2"};var K=class a extends Error{constructor(t){super(t),this.name="PromptValidationError",Object.setPrototypeOf(this,a.prototype);}};function TR(a){try{let e=AR__default.default.parse(a).filter(o=>{let i=o[0];return i==="name"||i==="#"||i==="&"||i==="^"}).map(o=>o[1].split(".")[0]);return new Set(e)}catch(t){throw new K(`Invalid Mustache template syntax: ${t instanceof Error?t.message:String(t)}`)}}function Qf(a,t,e){if(e!=="mustache")return;let o=TR(a),i=new Set(Object.keys(t)),n=new Set([...o].filter(c=>!i.has(c)));if(n.size>0){let c=[];throw c.push(`Missing required variables: ${[...n].join(", ")}`),c.push(`Template placeholders: {${[...o].join(", ")}}`),c.push(`Provided variables: {${[...i].join(", ")}}`),new K(`Template variables validation failed:
9
+ The prompts parameter is recommended for prompt version tracking.`};var yu={EXPERIMENT_NOT_FOUND:"EXPERIMENT_NOT_FOUND",INVALID_CONFIG_TYPE:"INVALID_CONFIG_TYPE",CONFIG_PROMPTS_CONFLICT:"CONFIG_PROMPTS_CONFLICT"},qt=class extends de{constructor(t){super({message:fn.EXPERIMENT_NOT_FOUND(t),code:yu.EXPERIMENT_NOT_FOUND});}},ei=class a extends de{constructor(t,e){super({message:t,code:e});}static invalidConfigType(t){return new a(fn.INVALID_CONFIG_TYPE(t),yu.INVALID_CONFIG_TYPE)}static promptsConflict(){return new a(fn.CONFIG_PROMPTS_CONFLICT(),yu.CONFIG_PROMPTS_CONFLICT)}};function $f(a,t){if(a!==void 0&&(typeof a!="object"||a===null||Array.isArray(a)))throw ei.invalidConfigType(typeof a);if(t&&t.length>0&&(a!=null&&a.prompts))throw ei.promptsConflict();if(!a&&(!t||t.length===0))return [void 0,void 0];let e=a?structuredClone(a):{},o;if(t&&t.length>0){o=[];let i={};for(let n of t)o.push({id:n.versionId}),i[n.name]=n.prompt;e.prompts=i;}return Object.keys(e).length===0?[void 0,void 0]:[e,o]}var ye={MUSTACHE:"mustache",JINJA2:"jinja2"};var K=class a extends Error{constructor(t){super(t),this.name="PromptValidationError",Object.setPrototypeOf(this,a.prototype);}};function TR(a){try{let e=AR__default.default.parse(a).filter(o=>{let i=o[0];return i==="name"||i==="#"||i==="&"||i==="^"}).map(o=>o[1].split(".")[0]);return new Set(e)}catch(t){throw new K(`Invalid Mustache template syntax: ${t instanceof Error?t.message:String(t)}`)}}function Qf(a,t,e){if(e!=="mustache")return;let o=TR(a),i=new Set(Object.keys(t)),n=new Set([...o].filter(c=>!i.has(c)));if(n.size>0){let c=[];throw c.push(`Missing required variables: ${[...n].join(", ")}`),c.push(`Template placeholders: {${[...o].join(", ")}}`),c.push(`Provided variables: {${[...i].join(", ")}}`),new K(`Template variables validation failed:
10
10
  ${c.join(`
11
- `)}`)}}function _e(a,t,e){try{switch(Qf(a,t,e),e){case "mustache":return AR__default.default.render(a,t,{},{escape:o=>o});case "jinja2":return PR__default.default.renderString(a,t);default:return a}}catch(o){if(o instanceof K)throw o;let i=o instanceof Error?o.message:String(o);throw new K(`Failed to format prompt template: ${i}`)}}var ei=class a{constructor(t){this.id=t.versionId,this.name=t.name,this.prompt=t.prompt,this.commit=t.commit,this.type=t.type,this.metadata=t.metadata,this.changeDescription=t.changeDescription,this.createdAt=t.createdAt,this.createdBy=t.createdBy;}format(t){return _e(this.prompt,t,this.type)}getVersionAge(){return this.createdAt?dateFns.formatDistanceToNow(new Date(this.createdAt),{addSuffix:true}):"Unknown"}getVersionInfo(){let t=[`[${this.commit}]`];if(this.createdAt){let e=new Date(this.createdAt);t.push(e.toISOString().split("T")[0]);}return this.createdBy&&t.push(`by ${this.createdBy}`),this.changeDescription&&t.push(`- ${this.changeDescription}`),t.join(" ")}compareTo(t){let e=`Current version [${this.commit}]`,o=`Other version [${t.commit}]`,i=jestDiff.diffStringsUnified(t.prompt,this.prompt,{aAnnotation:o,bAnnotation:e,includeChangeCounts:true,contextLines:3,expand:false});return k.info(`
11
+ `)}`)}}function _e(a,t,e){try{switch(Qf(a,t,e),e){case "mustache":return AR__default.default.render(a,t,{},{escape:o=>o});case "jinja2":return PR__default.default.renderString(a,t);default:return a}}catch(o){if(o instanceof K)throw o;let i=o instanceof Error?o.message:String(o);throw new K(`Failed to format prompt template: ${i}`)}}var ri=class a{constructor(t){this.id=t.versionId,this.name=t.name,this.prompt=t.prompt,this.commit=t.commit,this.type=t.type,this.metadata=t.metadata,this.changeDescription=t.changeDescription,this.createdAt=t.createdAt,this.createdBy=t.createdBy;}format(t){return _e(this.prompt,t,this.type)}getVersionAge(){return this.createdAt?dateFns.formatDistanceToNow(new Date(this.createdAt),{addSuffix:true}):"Unknown"}getVersionInfo(){let t=[`[${this.commit}]`];if(this.createdAt){let e=new Date(this.createdAt);t.push(e.toISOString().split("T")[0]);}return this.createdBy&&t.push(`by ${this.createdBy}`),this.changeDescription&&t.push(`- ${this.changeDescription}`),t.join(" ")}compareTo(t){let e=`Current version [${this.commit}]`,o=`Other version [${t.commit}]`,i=jestDiff.diffStringsUnified(t.prompt,this.prompt,{aAnnotation:o,bAnnotation:e,includeChangeCounts:true,contextLines:3,expand:false});return k.info(`
12
12
  Prompt version comparison:
13
- ${i}`),i}static fromApiResponse(t,e){var o;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id'");return new a({name:t,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:ye.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Oe=class a{constructor({promptId:t,versionId:e,name:o,prompt:i,commit:n,metadata:c,type:d,changeDescription:u,description:g,tags:f=[]},y){this.opik=y;this.id=t,this.versionId=e,this.prompt=i,this.commit=n,this.type=d!=null?d:ye.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...f],this._metadata=c;}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}format(t){return _e(this.prompt,t,this.type)}static fromApiResponse(t,e,o){var n;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id' (version ID)");let i=(n=e.type)!=null?n:ye.MUSTACHE;if(i!=="mustache"&&i!=="jinja2")throw new K(`Invalid API response: unknown prompt type '${i}'`);return new a({promptId:e.promptId,versionId:e.id,name:t.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:i,changeDescription:e.changeDescription,description:t.description,tags:t.tags},o)}async updateProperties(t){var e,o,i,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=t.name)!=null?e:this._name,description:t.description,tags:t.tags},this.opik.api.requestOptions),this._name=(o=t.name)!=null?o:this._name,this._description=(i=t.description)!=null?i:this._description,this._tags=(n=t.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var t;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,i=100;for(;;){let c=(t=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:i},this.opik.api.requestOptions)).content)!=null?t:[];if(e.push(...c),c.length<i)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>ei.fromApiResponse(this.name,n))}catch(e){throw k.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:e}),e}}async useVersion(t){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,t.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){throw k.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit,error:e}),e}}async getVersion(t){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:t},this.opik.api.requestOptions);return a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){if(e&&typeof e=="object"&&"statusCode"in e&&e.statusCode===404)return null;throw k.error("Failed to retrieve prompt version",{promptName:this.name,commit:t,error:e}),e}}};async function Yf(a,t,e){try{return await a.retrievePromptVersion({name:t},e)}catch(o){if(DR(o))return null;throw o}}function Zf(a,t,e){return t?t.template!==a.prompt||!UR(t.metadata,a.metadata)||t.type!==e:true}function UR(a,t){let e=a!=null?a:{},o=t!=null?t:{};return IR__default.default(e,o)}function DR(a){return typeof a=="object"&&a!==null&&"statusCode"in a&&a.statusCode===404}var se=class{constructor(t){this.input=t;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(t){return this.input[this.cursor+t]}consumeChar(){return this.input[this.cursor++]}advance(t=1){this.cursor+=t;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(t){let e=this.cursor;for(;this.cursor<this.input.length&&t(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(t){return this.input.slice(t,this.cursor)}static isFieldChar(t){return /[a-zA-Z0-9_]/.test(t)}static isLetterChar(t){return /[a-zA-Z]/.test(t)}static isDigitChar(t){return /\d/.test(t)}static isWhitespaceChar(t){return /\s/.test(t)}static isQuoteChar(t){return t==='"'||t==="'"}};var J={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["contains"],DICT_OPS:["=","contains",">","<"],LIMITED_STRING_OPS:["=","contains","not_contains"]},We={id:"string",name:"string",status:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",metadata:"dictionary",feedback_scores:"feedback_scores_number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",duration:"number",number_of_messages:"number",created_by:"string",thread_id:"string",total_estimated_cost:"number",type:"string",model:"string",provider:"string"},qf={id:J.STRING_OPS,name:J.STRING_OPS,status:J.LIMITED_STRING_OPS,start_time:J.DATETIME_OPS,end_time:J.DATETIME_OPS,input:J.LIMITED_STRING_OPS,output:J.LIMITED_STRING_OPS,metadata:J.DICT_OPS,feedback_scores:J.NUMERIC_OPS,tags:J.LIST_OPS,"usage.total_tokens":J.NUMERIC_OPS,"usage.prompt_tokens":J.NUMERIC_OPS,"usage.completion_tokens":J.NUMERIC_OPS,duration:J.NUMERIC_OPS,number_of_messages:J.NUMERIC_OPS,created_by:J.STRING_OPS,thread_id:J.STRING_OPS,total_estimated_cost:J.NUMERIC_OPS,type:J.STRING_OPS,model:J.STRING_OPS,provider:J.STRING_OPS},hn={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function eh(a){let t=hn.SPECIAL_FIELDS.includes(a),e=Object.keys(We).includes(a);if(!t&&!e){let o=Object.keys(We).join(", ");throw new Error(`Field ${a} is not supported, only the fields ${o} are supported.`)}}function rh(a,t){if(!hn.SPECIAL_FIELDS.includes(a)){let e=Object.keys(We).join(", ");throw new Error(`Field ${a}.${t} is not supported, only the fields ${e} are supported.`)}if(a==="usage"&&!hn.USAGE_KEYS.includes(t))throw new Error(`When querying usage, ${t} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function ku(a,t){let e=qf[a];if(!(e!=null&&e.includes(t))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${t} is not supported for field ${a}, only the operators ${o} are supported.`)}}function oh(a){let t=a.toLowerCase();if(t==="and")return true;throw t==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${a}`)}function wn(a,t,e){if(!a)throw new Error(`Missing closing quote for: ${e}`)}var ri=class{static parse(t){t.skipWhitespace();let e=this.parseFieldName(t);return eh(e),t.peekChar()==="."?this.parseFieldWithKey(t,e):{type:"simple",field:e,columnType:We[e]}}static parseFieldName(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseFieldWithKey(t,e){t.advance();let o=this.parseKey(t);if(rh(e,o),e==="usage"){let i=`usage.${o}`;return {type:"simple",field:i,columnType:We[i]}}return {type:"nested",field:e,key:o,columnType:We[e]}}static parseKey(t){let e=t.peekChar();return se.isQuoteChar(e)?this.parseQuotedKey(t,e):this.parseUnquotedKey(t)}static parseUnquotedKey(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseQuotedKey(t,e){let o=t.getPosition();t.advance();let i="",n=false;for(;!t.isAtEnd();){let d=t.peekChar();if(d===e){if(t.peekCharAt(1)===e){i+=e,t.advance(2);continue}n=true,t.advance();break}i+=d,t.advance();}let c=t.getFullInput().slice(o);return wn(n,o,c),i}};var oi=class{static parse(t,e){t.skipWhitespace();let o=t.peekChar(),i=this.tryParseSymbolicOperator(t,o);if(i)return ku(e,i),{operator:i};let n=this.parseWordOperator(t);return ku(e,n),{operator:n}}static tryParseSymbolicOperator(t,e){if(e==="=")return t.advance(),"=";if(e==="<"||e===">"){let o=e;return t.advance(),t.peekChar()==="="?(t.advance(),o+"="):o}return e==="!"&&t.peekCharAt(1)==="="?(t.advance(2),"!="):null}static parseWordOperator(t){return t.consumeWhile(e=>!se.isWhitespaceChar(e))}};var ti=class{static parse(t){t.skipWhitespace();let e=t.getPosition(),o=t.peekChar();if(o==='"')return this.parseQuotedString(t,e);if(se.isDigitChar(o)||o==="-")return this.parseNumber(t);let i=t.getRemainingInput();throw new Error(`Invalid value ${i.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(t,e){t.advance();let o=t.getPosition(),i=false;for(;!t.isAtEnd();){if(t.peekChar()==='"'){i=true;break}t.advance();}wn(i,e,`value starting at position ${e}`);let n=t.sliceFrom(o);return t.advance(),{value:n}}static parseNumber(t){let e="";return t.peekChar()==="-"&&(e+=t.consumeChar()),e+=this.parseDigits(t),t.peekChar()==="."&&(e+=t.consumeChar(),e+=this.parseDigits(t)),{value:e}}static parseDigits(t){return t.consumeWhile(e=>se.isDigitChar(e))}};var Be=class{constructor(t){let e=t||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(t){let e=new se(t),o=[];for(;!e.isAtEnd();){let i=this.parseExpression(e);if(o.push(i),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(t){let e=ri.parse(t),o=oi.parse(t,this.getFieldName(e)),i=ti.parse(t);return this.buildExpression(e,o,i)}getFieldName(t){return t.field}buildExpression(t,e,o){let i={field:t.field,operator:e.operator,value:o.value,type:t.columnType};return t.type==="nested"&&(i.key=t.key),i}parseConnector(t){let e=t.getPosition(),o=t.consumeWhile(i=>se.isLetterChar(i));try{return oh(o)}catch(i){if(i instanceof Error&&i.message.includes("trailing characters")){let n=t.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw i}}};async function th(a,t,e,o,i){let n=await a.traces.searchTraces({projectName:t,filters:e!=null?e:void 0,limit:o,truncate:i});return await Fe(n,j.TracePublic,o)}async function ih(a,t,e,o){let i=Date.now(),n=[];for(;;){if(n=await a(),n.length>=t||Date.now()-i>=e)return n;await new Promise(d=>setTimeout(d,o));}}function ah(a){if(!a)return null;let e=new Be(a).getFilterExpressions();return e?e.map(o=>{let i={field:o.field,operator:o.operator,value:o.value};return o.key&&(i.key=o.key),i}):null}var zu=[],lr=class{constructor(t){this.displayTraceLog=t=>{if(t===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Xf({apiUrl:this.config.apiUrl,projectName:t,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${t}" project at ${pi(e)}`),this.lastProjectNameLogged=t;};this.trace=t=>{var i;k.debug("Creating new trace with data:",t);let e=(i=t.projectName)!=null?i:this.config.projectName,o=new Ya({id:oe(),startTime:new Date,...t,projectName:e},this);return this.traceBatchQueue.create(o.data),k.debug("Trace added to the queue with ID:",o.data.id),this.displayTraceLog(e),o};this.getDataset=async t=>{k.debug(`Getting dataset with name "${t}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:t});return new Ir(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Yt(t):e}};this.createDataset=async(t,e)=>{k.debug(`Creating dataset with name "${t}"`);let o=new Ir({name:t,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(i){throw k.error(`Failed to create dataset "${t}"`,{error:i}),new Error(`Error creating dataset "${t}": ${i}`)}};this.getOrCreateDataset=async(t,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${t}"`);try{return await this.getDataset(t)}catch(o){if(o instanceof Yt)return k.info(`Dataset "${t}" not found. Proceeding to create a new one.`),this.createDataset(t,e);throw k.error(`Error retrieving dataset "${t}":`,o),o}};this.getDatasets=async(t=100)=>{k.debug(`Getting all datasets (limit: ${t})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:t}),o=[];for(let i of e.content||[])o.push(new Ir(i,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async t=>{k.debug(`Deleting dataset with name "${t}"`);try{let e=await this.getDataset(t);if(!e.id)throw new Error(`Cannot delete dataset "${t}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${t}"`,{error:e}),new Error(`Failed to delete dataset "${t}": ${e}`)}};this.createExperiment=async({datasetName:t,name:e,experimentConfig:o,prompts:i,type:n=$n.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${t}"`),!t)throw new Error("Dataset name is required to create an experiment");let[d,u]=$f(o,i),g=oe(),f=new cr({id:g,name:e,datasetName:t,prompts:i},this);try{return this.api.experiments.createExperiment({id:g,datasetName:t,name:e,metadata:d,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),f}catch(y){throw k.error(`Failed to create experiment for dataset "${t}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(t,e)=>{if(!t)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:i}=e;if(!o&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${t}"`);let n={};o!==void 0&&(n.name=o),i!==void 0&&(n.metadata=i);try{await this.api.experiments.updateExperiment(t,n);}catch(c){throw k.error(`Failed to update experiment with ID "${t}"`,{error:c}),c}};this.getExperimentById=async t=>{k.debug(`Getting experiment with ID "${t}"`);try{let e=await this.api.experiments.getExperimentById(t);return new cr({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new Zt(`No experiment found with ID '${t}'`):(k.error(`Failed to get experiment with ID "${t}"`,{error:e}),e)}};this.getExperimentsByName=async t=>{k.debug(`Getting experiments with name "${t}"`);try{let e=await this.api.experiments.streamExperiments({name:t});return (await Fe(e,j.ExperimentPublic)).map(i=>new cr({id:i.id,name:i.name,datasetName:i.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${t}"`,{error:e}),e}};this.getExperiment=async t=>{k.debug(`Getting experiment with name "${t}"`);let e=await this.getExperimentsByName(t);if(e.length===0)throw new Zt(t);return e[0]};this.getDatasetExperiments=async(t,e=100)=>{var c;k.debug(`Getting experiments for dataset "${t}"`);let o=await this.getDataset(t),i=Math.min(100,e),n=[];try{let d=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:d,size:i,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let f=e-n.length,y=Math.min(g.length,f);for(let z=0;z<y;z++){let v=g[z];n.push(new cr({id:v.id,name:v.name,datasetName:v.datasetName},this));}if(y<g.length)break;d+=1;}return n}catch(d){throw k.error(`Failed to get experiments for dataset "${t}"`,{error:d}),d}};this.deleteExperiment=async t=>{k.debug(`Deleting experiment with ID "${t}"`);try{await this.api.experiments.deleteExperimentsById({ids:[t]});}catch(e){throw k.error(`Failed to delete experiment with ID "${t}"`,{error:e}),e}};this.createPrompt=async t=>{var e;k.debug("Creating prompt",{name:t.name});try{let o=await Yf(this.api.prompts,t.name,this.api.requestOptions),i=(e=t.type)!=null?e:ye.MUSTACHE,n=Zf(t,o,i),c;if(n?(k.debug("Creating new prompt version",{name:t.name}),c=await this.api.prompts.createPromptVersion({name:t.name,version:{template:t.prompt,metadata:t.metadata,type:i}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:t.name}),c=o),!c.promptId)throw new Error("Invalid API response: missing promptId");let d=await this.api.prompts.getPromptById(c.promptId,this.api.requestOptions),u=Oe.fromApiResponse(d,c,this);return k.debug("Prompt created",{name:t.name}),t.description||t.tags?await u.updateProperties({description:t.description,tags:t.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:t.name,error:o}),o}};this.getPrompt=async t=>{var e;k.debug("Getting prompt",t);try{let i=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:t.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!i)return k.debug("Prompt not found",{name:t.name}),null;let n=await this.api.prompts.retrievePromptVersion(t,this.api.requestOptions);return Oe.fromApiResponse(i,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:t.name,error:o}),o}};this.searchPrompts=async t=>{var e;k.debug("Searching prompts",{filterString:t});try{let o;if(t){let u=new Be(t).getFilterExpressions();o=u?JSON.stringify(u):void 0;}let n=(e=(await this.api.prompts.getPrompts({filters:o,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(n.map(async d=>{if(!d.name)return null;try{let u=await this.api.prompts.retrievePromptVersion({name:d.name},this.api.requestOptions);return Oe.fromApiResponse(d,u,this)}catch(u){return k.debug("Failed to get version for prompt",{name:d.name,error:u}),null}}))).filter(d=>d!==null)}catch(o){throw k.error("Failed to search prompts",{error:o}),o}};this.deletePrompts=async t=>{k.debug("Deleting prompts in batch",{count:t.length});try{await this.api.prompts.deletePromptsBatch({ids:t},this.api.requestOptions),k.info("Successfully deleted prompts",{count:t.length});}catch(e){throw k.error("Failed to delete prompts",{count:t.length,error:e}),e}};this.searchTraces=async t=>{let{projectName:e,filterString:o,maxResults:i=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:d=60}=t!=null?t:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:i,truncate:n,waitForAtLeast:c,waitForTimeout:d});let u=ah(o),g=e!=null?e:this.config.projectName,f=()=>th(this.api,g,u,i,n);if(c===void 0)return await f();let y=await ih(f,c,d*1e3,5e3);if(y.length<c)throw new pn(`Timeout after ${d} seconds: expected ${c} traces, but only ${y.length} were found.`);return y};this.flush=async()=>{k.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.datasetBatchQueue.flush(),k.info("Successfully flushed all data to Opik");}catch(t){k.error("Error during flush operation:",{error:t instanceof Error?t.message:t});}};k.debug("Initializing OpikClient with config:",t),this.config=Xu(t);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};t!=null&&t.headers&&(k.debug("Initializing OpikClient with additional headers:",t==null?void 0:t.headers),e.requestOptions={headers:t==null?void 0:t.headers}),this.api=new an(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new en(this.api,o),this.traceBatchQueue=new on(this.api,o),this.spanFeedbackScoresBatchQueue=new rn(this.api,o),this.traceFeedbackScoresBatchQueue=new tn(this.api,o),this.datasetBatchQueue=new nn(this.api,o),zu.push(this);}};var NR="track.decorator",ii=new async_hooks.AsyncLocalStorage,FR=()=>{let{span:a,trace:t}=ii.getStore()||{};if(!(!a||!t))return {span:a,trace:t}};function OR(a){return !!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function WR({name:a,parentSpan:t,projectName:e,trace:o,type:i="llm"}){k.debug("Creating new span:",{name:a,parentSpan:t==null?void 0:t.data.id,projectName:e,type:i});let n=o;n||(n=Su().trace({name:a,projectName:e}));let c=n.span({name:a,parentSpanId:t==null?void 0:t.data.id,projectName:e,type:i});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function BR({args:a,span:t,trace:e}){if(k.debug("Starting span execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id}),a.length===0)return;let o={arguments:a};k.debug("Recording span input"),t.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function nh({result:a,span:t,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id});let i=typeof a=="object"?a:{result:a},n=new Date,c={endTime:n,output:i};if(o){let d=o(a);Object.assign(c,d);}t.update(c),e&&e.update({endTime:n,output:i});}function sh({span:a,error:t,trace:e}){var o,i;k.error("Recording execution error:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id,error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t}),t instanceof Error&&a.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(o=t.stack)!=null?o:""}}),a.end(),e&&(e.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(i=t.stack)!=null?i:""}}),e.end());}function bn({name:a,projectName:t,type:e,enrichSpan:o}={},i){return function(...c){let d=ii.getStore(),{span:u,trace:g}=WR({name:a!=null?a:i.name||NR,parentSpan:d==null?void 0:d.span,projectName:t,trace:d==null?void 0:d.trace,type:e}),f=!d,y=this;return ii.run({span:u,trace:g},()=>{let z=f?g:void 0;try{BR({args:c,span:u,trace:z});let v=i.apply(y,c);return OR(v)?v.then(S=>(nh({span:u,result:S,trace:z,enrichSpan:o}),S),S=>{throw sh({span:u,error:S,trace:z}),S}):(nh({span:u,result:v,trace:z,enrichSpan:o}),v)}catch(v){throw sh({span:u,error:v,trace:z}),v}})}}function Ie(a,t){if(typeof a=="function")return bn({},a);let e=a;return t?bn(e,t):function(...o){if(o.length===2&&typeof o[1]=="object"&&o[1]!==null&&"kind"in o[1]){let[c,d]=o;if(d.kind!=="method")throw new Error("track decorator is only applicable to methods");return bn(e,c)}let[,,i]=o;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let n=i.value;return i.value=bn(e,n),i}}var vu=null;function Su(){return vu===null&&(vu=new lr),vu}var LR=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([Su().flush(),...zu.map(a=>a.flush())]),k.debug("flushAll operation completed successfully");}catch(a){throw k.error("Error during flushAll operation:",{error:a instanceof Error?a.message:a,stack:a instanceof Error?a.stack:void 0}),a}};function ph(a,t){if(!t||typeof t!="object")throw new Error("Arguments must be an object");let e=a.validationSchema,i=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(d=>d!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(t);if(!i.success){let n=i.error.issues.map(d=>d.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(VR(a,t,c))}}function VR(a,t,e){let o=Object.keys(t),i=e.filter(n=>!(n in t));return `Metric '${a.name}' is skipped, missing required arguments: ${i.join(", ")}. Available arguments: ${o.join(", ")}.`}var Rn=class{static calculateAverageScores(t){if(!t||t.length===0)return new Map;let e=new Map;for(let i of t)if(!(!i||!i.scoreResults||i.scoreResults.length===0))for(let n of i.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((i,n)=>{o.set(n,i.count>0?i.sum/i.count:0);}),o}static formatScore(t){return t.toFixed(4)}static formatTime(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),i=Math.floor(t%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static async generateResultTable(t,e,o,i){if(t.length===0){k.info(`
13
+ ${i}`),i}static fromApiResponse(t,e){var o;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id'");return new a({name:t,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:ye.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Oe=class a{constructor({promptId:t,versionId:e,name:o,prompt:i,commit:n,metadata:c,type:m,changeDescription:u,description:g,tags:f=[]},y){this.opik=y;this.id=t,this.versionId=e,this.prompt=i,this.commit=n,this.type=m!=null?m:ye.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...f],this._metadata=c;}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}format(t){return _e(this.prompt,t,this.type)}static fromApiResponse(t,e,o){var n;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id' (version ID)");let i=(n=e.type)!=null?n:ye.MUSTACHE;if(i!=="mustache"&&i!=="jinja2")throw new K(`Invalid API response: unknown prompt type '${i}'`);return new a({promptId:e.promptId,versionId:e.id,name:t.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:i,changeDescription:e.changeDescription,description:t.description,tags:t.tags},o)}async updateProperties(t){var e,o,i,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=t.name)!=null?e:this._name,description:t.description,tags:t.tags},this.opik.api.requestOptions),this._name=(o=t.name)!=null?o:this._name,this._description=(i=t.description)!=null?i:this._description,this._tags=(n=t.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var t;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,i=100;for(;;){let c=(t=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:i},this.opik.api.requestOptions)).content)!=null?t:[];if(e.push(...c),c.length<i)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>ri.fromApiResponse(this.name,n))}catch(e){throw k.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:e}),e}}async useVersion(t){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,t.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){throw k.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit,error:e}),e}}async getVersion(t){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:t},this.opik.api.requestOptions);return a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){if(e&&typeof e=="object"&&"statusCode"in e&&e.statusCode===404)return null;throw k.error("Failed to retrieve prompt version",{promptName:this.name,commit:t,error:e}),e}}};async function Yf(a,t,e){try{return await a.retrievePromptVersion({name:t},e)}catch(o){if(DR(o))return null;throw o}}function Zf(a,t,e){return t?t.template!==a.prompt||!UR(t.metadata,a.metadata)||t.type!==e:true}function UR(a,t){let e=a!=null?a:{},o=t!=null?t:{};return IR__default.default(e,o)}function DR(a){return typeof a=="object"&&a!==null&&"statusCode"in a&&a.statusCode===404}var se=class{constructor(t){this.input=t;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(t){return this.input[this.cursor+t]}consumeChar(){return this.input[this.cursor++]}advance(t=1){this.cursor+=t;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(t){let e=this.cursor;for(;this.cursor<this.input.length&&t(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(t){return this.input.slice(t,this.cursor)}static isFieldChar(t){return /[a-zA-Z0-9_]/.test(t)}static isLetterChar(t){return /[a-zA-Z]/.test(t)}static isDigitChar(t){return /\d/.test(t)}static isWhitespaceChar(t){return /\s/.test(t)}static isQuoteChar(t){return t==='"'||t==="'"}};var J={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["contains"],DICT_OPS:["=","contains",">","<"],LIMITED_STRING_OPS:["=","contains","not_contains"]},We={id:"string",name:"string",status:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",metadata:"dictionary",feedback_scores:"feedback_scores_number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",duration:"number",number_of_messages:"number",created_by:"string",thread_id:"string",total_estimated_cost:"number",type:"string",model:"string",provider:"string"},qf={id:J.STRING_OPS,name:J.STRING_OPS,status:J.LIMITED_STRING_OPS,start_time:J.DATETIME_OPS,end_time:J.DATETIME_OPS,input:J.LIMITED_STRING_OPS,output:J.LIMITED_STRING_OPS,metadata:J.DICT_OPS,feedback_scores:J.NUMERIC_OPS,tags:J.LIST_OPS,"usage.total_tokens":J.NUMERIC_OPS,"usage.prompt_tokens":J.NUMERIC_OPS,"usage.completion_tokens":J.NUMERIC_OPS,duration:J.NUMERIC_OPS,number_of_messages:J.NUMERIC_OPS,created_by:J.STRING_OPS,thread_id:J.STRING_OPS,total_estimated_cost:J.NUMERIC_OPS,type:J.STRING_OPS,model:J.STRING_OPS,provider:J.STRING_OPS},hn={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function eh(a){let t=hn.SPECIAL_FIELDS.includes(a),e=Object.keys(We).includes(a);if(!t&&!e){let o=Object.keys(We).join(", ");throw new Error(`Field ${a} is not supported, only the fields ${o} are supported.`)}}function rh(a,t){if(!hn.SPECIAL_FIELDS.includes(a)){let e=Object.keys(We).join(", ");throw new Error(`Field ${a}.${t} is not supported, only the fields ${e} are supported.`)}if(a==="usage"&&!hn.USAGE_KEYS.includes(t))throw new Error(`When querying usage, ${t} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function ku(a,t){let e=qf[a];if(!(e!=null&&e.includes(t))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${t} is not supported for field ${a}, only the operators ${o} are supported.`)}}function oh(a){let t=a.toLowerCase();if(t==="and")return true;throw t==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${a}`)}function wn(a,t,e){if(!a)throw new Error(`Missing closing quote for: ${e}`)}var oi=class{static parse(t){t.skipWhitespace();let e=this.parseFieldName(t);return eh(e),t.peekChar()==="."?this.parseFieldWithKey(t,e):{type:"simple",field:e,columnType:We[e]}}static parseFieldName(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseFieldWithKey(t,e){t.advance();let o=this.parseKey(t);if(rh(e,o),e==="usage"){let i=`usage.${o}`;return {type:"simple",field:i,columnType:We[i]}}return {type:"nested",field:e,key:o,columnType:We[e]}}static parseKey(t){let e=t.peekChar();return se.isQuoteChar(e)?this.parseQuotedKey(t,e):this.parseUnquotedKey(t)}static parseUnquotedKey(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseQuotedKey(t,e){let o=t.getPosition();t.advance();let i="",n=false;for(;!t.isAtEnd();){let m=t.peekChar();if(m===e){if(t.peekCharAt(1)===e){i+=e,t.advance(2);continue}n=true,t.advance();break}i+=m,t.advance();}let c=t.getFullInput().slice(o);return wn(n,o,c),i}};var ti=class{static parse(t,e){t.skipWhitespace();let o=t.peekChar(),i=this.tryParseSymbolicOperator(t,o);if(i)return ku(e,i),{operator:i};let n=this.parseWordOperator(t);return ku(e,n),{operator:n}}static tryParseSymbolicOperator(t,e){if(e==="=")return t.advance(),"=";if(e==="<"||e===">"){let o=e;return t.advance(),t.peekChar()==="="?(t.advance(),o+"="):o}return e==="!"&&t.peekCharAt(1)==="="?(t.advance(2),"!="):null}static parseWordOperator(t){return t.consumeWhile(e=>!se.isWhitespaceChar(e))}};var ii=class{static parse(t){t.skipWhitespace();let e=t.getPosition(),o=t.peekChar();if(o==='"')return this.parseQuotedString(t,e);if(se.isDigitChar(o)||o==="-")return this.parseNumber(t);let i=t.getRemainingInput();throw new Error(`Invalid value ${i.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(t,e){t.advance();let o=t.getPosition(),i=false;for(;!t.isAtEnd();){if(t.peekChar()==='"'){i=true;break}t.advance();}wn(i,e,`value starting at position ${e}`);let n=t.sliceFrom(o);return t.advance(),{value:n}}static parseNumber(t){let e="";return t.peekChar()==="-"&&(e+=t.consumeChar()),e+=this.parseDigits(t),t.peekChar()==="."&&(e+=t.consumeChar(),e+=this.parseDigits(t)),{value:e}}static parseDigits(t){return t.consumeWhile(e=>se.isDigitChar(e))}};var Be=class{constructor(t){let e=t||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(t){let e=new se(t),o=[];for(;!e.isAtEnd();){let i=this.parseExpression(e);if(o.push(i),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(t){let e=oi.parse(t),o=ti.parse(t,this.getFieldName(e)),i=ii.parse(t);return this.buildExpression(e,o,i)}getFieldName(t){return t.field}buildExpression(t,e,o){let i={field:t.field,operator:e.operator,value:o.value,type:t.columnType};return t.type==="nested"&&(i.key=t.key),i}parseConnector(t){let e=t.getPosition(),o=t.consumeWhile(i=>se.isLetterChar(i));try{return oh(o)}catch(i){if(i instanceof Error&&i.message.includes("trailing characters")){let n=t.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw i}}};async function th(a,t,e,o,i){let n=await a.traces.searchTraces({projectName:t,filters:e!=null?e:void 0,limit:o,truncate:i});return await Fe(n,j.TracePublic,o)}async function ih(a,t,e,o){let i=Date.now(),n=[];for(;;){if(n=await a(),n.length>=t||Date.now()-i>=e)return n;await new Promise(m=>setTimeout(m,o));}}function ah(a){if(!a)return null;let e=new Be(a).getFilterExpressions();return e?e.map(o=>{let i={field:o.field,operator:o.operator,value:o.value};return o.key&&(i.key=o.key),i}):null}var zu=[],mr=class{constructor(t){this.displayTraceLog=t=>{if(t===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Xf({apiUrl:this.config.apiUrl,projectName:t,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${t}" project at ${ci(e)}`),this.lastProjectNameLogged=t;};this.trace=t=>{var i;k.debug("Creating new trace with data:",t);let e=(i=t.projectName)!=null?i:this.config.projectName,o=new Ya({id:oe(),startTime:new Date,...t,projectName:e},this);return this.traceBatchQueue.create(o.data),k.debug("Trace added to the queue with ID:",o.data.id),this.displayTraceLog(e),o};this.getDataset=async t=>{k.debug(`Getting dataset with name "${t}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:t});return new jr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Zt(t):e}};this.createDataset=async(t,e)=>{k.debug(`Creating dataset with name "${t}"`);let o=new jr({name:t,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(i){throw k.error(`Failed to create dataset "${t}"`,{error:i}),new Error(`Error creating dataset "${t}": ${i}`)}};this.getOrCreateDataset=async(t,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${t}"`);try{return await this.getDataset(t)}catch(o){if(o instanceof Zt)return k.info(`Dataset "${t}" not found. Proceeding to create a new one.`),this.createDataset(t,e);throw k.error(`Error retrieving dataset "${t}":`,o),o}};this.getDatasets=async(t=100)=>{k.debug(`Getting all datasets (limit: ${t})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:t}),o=[];for(let i of e.content||[])o.push(new jr(i,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async t=>{k.debug(`Deleting dataset with name "${t}"`);try{let e=await this.getDataset(t);if(!e.id)throw new Error(`Cannot delete dataset "${t}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${t}"`,{error:e}),new Error(`Failed to delete dataset "${t}": ${e}`)}};this.createExperiment=async({datasetName:t,name:e,experimentConfig:o,prompts:i,type:n=$n.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${t}"`),!t)throw new Error("Dataset name is required to create an experiment");let[m,u]=$f(o,i),g=oe(),f=new lr({id:g,name:e,datasetName:t,prompts:i},this);try{return this.api.experiments.createExperiment({id:g,datasetName:t,name:e,metadata:m,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),f}catch(y){throw k.error(`Failed to create experiment for dataset "${t}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(t,e)=>{if(!t)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:i}=e;if(!o&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${t}"`);let n={};o!==void 0&&(n.name=o),i!==void 0&&(n.metadata=i);try{await this.api.experiments.updateExperiment(t,n);}catch(c){throw k.error(`Failed to update experiment with ID "${t}"`,{error:c}),c}};this.getExperimentById=async t=>{k.debug(`Getting experiment with ID "${t}"`);try{let e=await this.api.experiments.getExperimentById(t);return new lr({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new qt(`No experiment found with ID '${t}'`):(k.error(`Failed to get experiment with ID "${t}"`,{error:e}),e)}};this.getExperimentsByName=async t=>{k.debug(`Getting experiments with name "${t}"`);try{let e=await this.api.experiments.streamExperiments({name:t});return (await Fe(e,j.ExperimentPublic)).map(i=>new lr({id:i.id,name:i.name,datasetName:i.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${t}"`,{error:e}),e}};this.getExperiment=async t=>{k.debug(`Getting experiment with name "${t}"`);let e=await this.getExperimentsByName(t);if(e.length===0)throw new qt(t);return e[0]};this.getDatasetExperiments=async(t,e=100)=>{var c;k.debug(`Getting experiments for dataset "${t}"`);let o=await this.getDataset(t),i=Math.min(100,e),n=[];try{let m=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:m,size:i,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let f=e-n.length,y=Math.min(g.length,f);for(let z=0;z<y;z++){let v=g[z];n.push(new lr({id:v.id,name:v.name,datasetName:v.datasetName},this));}if(y<g.length)break;m+=1;}return n}catch(m){throw k.error(`Failed to get experiments for dataset "${t}"`,{error:m}),m}};this.deleteExperiment=async t=>{k.debug(`Deleting experiment with ID "${t}"`);try{await this.api.experiments.deleteExperimentsById({ids:[t]});}catch(e){throw k.error(`Failed to delete experiment with ID "${t}"`,{error:e}),e}};this.createPrompt=async t=>{var e;k.debug("Creating prompt",{name:t.name});try{let o=await Yf(this.api.prompts,t.name,this.api.requestOptions),i=(e=t.type)!=null?e:ye.MUSTACHE,n=Zf(t,o,i),c;if(n?(k.debug("Creating new prompt version",{name:t.name}),c=await this.api.prompts.createPromptVersion({name:t.name,version:{template:t.prompt,metadata:t.metadata,type:i}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:t.name}),c=o),!c.promptId)throw new Error("Invalid API response: missing promptId");let m=await this.api.prompts.getPromptById(c.promptId,this.api.requestOptions),u=Oe.fromApiResponse(m,c,this);return k.debug("Prompt created",{name:t.name}),t.description||t.tags?await u.updateProperties({description:t.description,tags:t.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:t.name,error:o}),o}};this.getPrompt=async t=>{var e;k.debug("Getting prompt",t);try{let i=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:t.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!i)return k.debug("Prompt not found",{name:t.name}),null;let n=await this.api.prompts.retrievePromptVersion(t,this.api.requestOptions);return Oe.fromApiResponse(i,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:t.name,error:o}),o}};this.searchPrompts=async t=>{var e;k.debug("Searching prompts",{filterString:t});try{let o;if(t){let u=new Be(t).getFilterExpressions();o=u?JSON.stringify(u):void 0;}let n=(e=(await this.api.prompts.getPrompts({filters:o,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(n.map(async m=>{if(!m.name)return null;try{let u=await this.api.prompts.retrievePromptVersion({name:m.name},this.api.requestOptions);return Oe.fromApiResponse(m,u,this)}catch(u){return k.debug("Failed to get version for prompt",{name:m.name,error:u}),null}}))).filter(m=>m!==null)}catch(o){throw k.error("Failed to search prompts",{error:o}),o}};this.deletePrompts=async t=>{k.debug("Deleting prompts in batch",{count:t.length});try{await this.api.prompts.deletePromptsBatch({ids:t},this.api.requestOptions),k.info("Successfully deleted prompts",{count:t.length});}catch(e){throw k.error("Failed to delete prompts",{count:t.length,error:e}),e}};this.searchTraces=async t=>{let{projectName:e,filterString:o,maxResults:i=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:m=60}=t!=null?t:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:i,truncate:n,waitForAtLeast:c,waitForTimeout:m});let u=ah(o),g=e!=null?e:this.config.projectName,f=()=>th(this.api,g,u,i,n);if(c===void 0)return await f();let y=await ih(f,c,m*1e3,5e3);if(y.length<c)throw new pn(`Timeout after ${m} seconds: expected ${c} traces, but only ${y.length} were found.`);return y};this.flush=async()=>{k.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.datasetBatchQueue.flush(),k.info("Successfully flushed all data to Opik");}catch(t){k.error("Error during flush operation:",{error:t instanceof Error?t.message:t});}};k.debug("Initializing OpikClient with config:",t),this.config=Xu(t);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};t!=null&&t.headers&&(k.debug("Initializing OpikClient with additional headers:",t==null?void 0:t.headers),e.requestOptions={headers:t==null?void 0:t.headers}),this.api=new an(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new en(this.api,o),this.traceBatchQueue=new on(this.api,o),this.spanFeedbackScoresBatchQueue=new rn(this.api,o),this.traceFeedbackScoresBatchQueue=new tn(this.api,o),this.datasetBatchQueue=new nn(this.api,o),zu.push(this);}};var NR="track.decorator",ai=new async_hooks.AsyncLocalStorage,FR=()=>{let{span:a,trace:t}=ai.getStore()||{};if(!(!a||!t))return {span:a,trace:t}};function OR(a){return !!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function WR({name:a,parentSpan:t,projectName:e,trace:o,type:i="llm"}){k.debug("Creating new span:",{name:a,parentSpan:t==null?void 0:t.data.id,projectName:e,type:i});let n=o;n||(n=Su().trace({name:a,projectName:e}));let c=n.span({name:a,parentSpanId:t==null?void 0:t.data.id,projectName:e,type:i});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function BR({args:a,span:t,trace:e}){if(k.debug("Starting span execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id}),a.length===0)return;let o={arguments:a};k.debug("Recording span input"),t.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function nh({result:a,span:t,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id});let i=typeof a=="object"?a:{result:a},n=new Date,c={endTime:n,output:i};if(o){let m=o(a);Object.assign(c,m);}t.update(c),e&&e.update({endTime:n,output:i});}function sh({span:a,error:t,trace:e}){var o,i;k.error("Recording execution error:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id,error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t}),t instanceof Error&&a.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(o=t.stack)!=null?o:""}}),a.end(),e&&(e.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(i=t.stack)!=null?i:""}}),e.end());}function bn({name:a,projectName:t,type:e,enrichSpan:o}={},i){return function(...c){let m=ai.getStore(),{span:u,trace:g}=WR({name:a!=null?a:i.name||NR,parentSpan:m==null?void 0:m.span,projectName:t,trace:m==null?void 0:m.trace,type:e}),f=!m,y=this;return ai.run({span:u,trace:g},()=>{let z=f?g:void 0;try{BR({args:c,span:u,trace:z});let v=i.apply(y,c);return OR(v)?v.then(S=>(nh({span:u,result:S,trace:z,enrichSpan:o}),S),S=>{throw sh({span:u,error:S,trace:z}),S}):(nh({span:u,result:v,trace:z,enrichSpan:o}),v)}catch(v){throw sh({span:u,error:v,trace:z}),v}})}}function Ie(a,t){if(typeof a=="function")return bn({},a);let e=a;return t?bn(e,t):function(...o){if(o.length===2&&typeof o[1]=="object"&&o[1]!==null&&"kind"in o[1]){let[c,m]=o;if(m.kind!=="method")throw new Error("track decorator is only applicable to methods");return bn(e,c)}let[,,i]=o;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let n=i.value;return i.value=bn(e,n),i}}var vu=null;function Su(){return vu===null&&(vu=new mr),vu}var LR=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([Su().flush(),...zu.map(a=>a.flush())]),k.debug("flushAll operation completed successfully");}catch(a){throw k.error("Error during flushAll operation:",{error:a instanceof Error?a.message:a,stack:a instanceof Error?a.stack:void 0}),a}};function ph(a,t){if(!t||typeof t!="object")throw new Error("Arguments must be an object");let e=a.validationSchema,i=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(m=>m!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(t);if(!i.success){let n=i.error.issues.map(m=>m.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(VR(a,t,c))}}function VR(a,t,e){let o=Object.keys(t),i=e.filter(n=>!(n in t));return `Metric '${a.name}' is skipped, missing required arguments: ${i.join(", ")}. Available arguments: ${o.join(", ")}.`}var Rn=class{static calculateAverageScores(t){if(!t||t.length===0)return new Map;let e=new Map;for(let i of t)if(!(!i||!i.scoreResults||i.scoreResults.length===0))for(let n of i.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((i,n)=>{o.set(n,i.count>0?i.sum/i.count:0);}),o}static formatScore(t){return t.toFixed(4)}static formatTime(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),i=Math.floor(t%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static async generateResultTable(t,e,o,i){if(t.length===0){k.info(`
14
14
  No test results available to display.`);return}if(o.size===0){k.info(`
15
- No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(i),d=[xn__default.default.bold(`Total time: ${c}`),xn__default.default.bold(`Number of samples: ${t.length}`),"",...n.map(f=>{let y=this.formatScore(o.get(f)||0);return xn__default.default.green(`${f}: ${y} (avg)`)})].join(`
16
- `),u=await e.ensureNameLoaded(),g=HR__default.default(d,{title:`${u} (${t.length} samples)`,titleAlignment:"left",padding:1,margin:0,borderColor:"cyan",borderStyle:"round"});k.info(`
15
+ No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(i),m=[xn__default.default.bold(`Total time: ${c}`),xn__default.default.bold(`Number of samples: ${t.length}`),"",...n.map(f=>{let y=this.formatScore(o.get(f)||0);return xn__default.default.green(`${f}: ${y} (avg)`)})].join(`
16
+ `),u=await e.ensureNameLoaded(),g=HR__default.default(m,{title:`${u} (${t.length} samples)`,titleAlignment:"left",padding:1,margin:0,borderColor:"cyan",borderStyle:"round"});k.info(`
17
17
  `+g+`
18
- `),k.info(xn__default.default.blue("Uploading results to Opik ... "));}static async displayExperimentLink(t){let e=await t.getUrl();k.info(`View the results ${pi(e,"in your Opik dashboard")}`);}static async processResults(t,e,o=0){let i=this.calculateAverageScores(t);await this.generateResultTable(t,e,i,o),await this.displayExperimentLink(e);let n=await e.ensureNameLoaded();return {experimentId:e.id,experimentName:n,testResults:t}}};function ch(a,t,e){if(!a||typeof t!="string"||t.trim()==="")return e;let o=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i=a;for(let n of o)if(typeof i=="object"&&i!==null&&n in i)i=i[n];else return e;return i===void 0?e:i}var lh,_u;lh=[Ie({name:"metrics_calculation",type:ve.General})];var Ur=class{constructor(t,e,o){Bu(_u,5,this);this.client=void 0;this.dataset=void 0;this.task=void 0;this.scoringMetrics=void 0;this.projectName=void 0;this.nbSamples=void 0;this.scoringKeyMapping=void 0;this.experiment=void 0;this.rootTrace=void 0;this.client=e,this.dataset=t.dataset,this.experiment=o,this.task=t.task,this.scoringMetrics=t.scoringMetrics||[],this.projectName=t.projectName,this.nbSamples=t.nbSamples,this.scoringKeyMapping=t.scoringKeyMapping;}async execute(){var f;let t=performance.now(),e=[],o=await this.dataset.getItems(this.nbSamples),i=o.length,n=k.settings.minLevel;k.settings.minLevel=6;let c=JR__default.default({text:`Evaluating dataset (0/${i} items)`}).start(),d=[];for(let y=0;y<o.length;y++){let z=o[y];try{this.rootTrace=this.client.trace({projectName:this.projectName,name:"evaluation_task",createdBy:"evaluation",input:z}),ii.enterWith({trace:this.rootTrace});let v=await this.executeTask(z);d.push(v),this.rootTrace.update({output:v.testCase.taskOutput,endTime:new Date});}catch(v){let S=v instanceof Error?v.message:String(v);k.error(`Error processing dataset item: ${z.id} - ${S}`),v instanceof Error&&this.rootTrace.update({errorInfo:{message:v.message,exceptionType:v.name,traceback:(f=v.stack)!=null?f:""},endTime:new Date});}e.push(new un({datasetItemId:z.id,traceId:this.rootTrace.data.id})),c.text=`Evaluating dataset (${y+1}/${i} items, ${Math.round((y+1)/i*100)}%)`;}let g=(performance.now()-t)/1e3;return c.succeed(`Evaluation complete: ${i} items processed in ${g.toFixed(2)}s`),k.settings.minLevel=n,this.experiment.insert(e),await this.client.flush(),Rn.processResults(d,this.experiment,g)}async executeTask(t){let e={},o=[];k.debug(`Starting evaluation task on dataset item ${t.id}`),e=await Ie({name:"llm_task",type:ve.General},this.task)(t),k.debug(`Finished evaluation task on dataset item ${t.id}`);let i=this.prepareScoringInputs(t,e),n={traceId:this.rootTrace.data.id,datasetItemId:t.id,scoringInputs:i,taskOutput:e};return this.scoringMetrics.length>0?this.calculateScores(n):{testCase:n,scoreResults:o}}async calculateScores(t){let e=[],{scoringInputs:o}=t;for(let i of this.scoringMetrics){k.debug(`Calculating score for metric ${i.name}`);try{ph(i,o);let n=await i.score(o),c=Array.isArray(n)?n:[n];e.push(...c);}catch(n){let c=n instanceof Error?n.message:String(n);k.error(`Metric ${i.name} failed: ${c}`);}k.debug(`Finished calculating score for metric ${i.name}`);}return e.forEach(i=>{var n;return (n=this.rootTrace)==null?void 0:n.score({name:i.name,value:i.value,reason:i.reason})}),{testCase:t,scoreResults:e}}prepareScoringInputs(t,e){let o={...t,...e};if(!this.scoringKeyMapping)return o;let i={...o};for(let[n,c]of Object.entries(this.scoringKeyMapping)){let d=ch(o,c);d!==void 0&&(i[n]=d);}return i}};_u=Ou(),Lu(_u,1,"calculateScores",lh,Ur),Cn(_u,Ur);var Dr=class Dr{static getInstance(t){return Dr.instance||(Dr.instance=new lr(t)),Dr.instance}};Dr.instance=null;var yn=Dr;async function mh(a){var o;if(!a.dataset)throw new Error("Dataset is required for evaluation");if(!a.task)throw new Error("Task function is required for evaluation");let t=(o=a.client)!=null?o:yn.getInstance(),e=await t.createExperiment({name:a.experimentName,datasetName:a.dataset.name,experimentConfig:a.experimentConfig,prompts:a.prompts});try{let i=new Ur(a,t,e);return k.info("Starting evaluation"),i.execute()}catch(i){throw k.error(`Error during evaluation: ${i}`),i}}var mr=class{constructor(t){this.modelName=t;}};var ai=class a extends Error{constructor(t){super(t),this.name="ModelError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Mr=class a extends ai{constructor(e,o){super(e);this.cause=o;this.name="ModelGenerationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Le=class a extends ai{constructor(t){super(t),this.name="ModelConfigurationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}};function $R(a,t){return a.startsWith("gpt-")||a.startsWith("o1")||a.startsWith("o3")||a.startsWith("chatgpt-")}function QR(a,t){return a.startsWith("claude-")}function YR(a,t){return a.startsWith("gemini-")||a.startsWith("gemma-")}function Au(a,t,e){if(!t)throw new Le(`API key for ${a} is not configured. Please provide it via the 'apiKey' option or set the ${e} environment variable.`)}function Tu(a,t){if($R(a)){let e=(t==null?void 0:t.apiKey)||process.env.OPENAI_API_KEY;return Au("OpenAI",e,"OPENAI_API_KEY"),openai.createOpenAI({apiKey:e,...t})(a)}if(QR(a)){let e=(t==null?void 0:t.apiKey)||process.env.ANTHROPIC_API_KEY;return Au("Anthropic",e,"ANTHROPIC_API_KEY"),anthropic.createAnthropic({apiKey:e,...t})(a)}if(YR(a)){let e=(t==null?void 0:t.apiKey)||process.env.GOOGLE_API_KEY;return Au("Google Gemini",e,"GOOGLE_API_KEY"),google.createGoogleGenerativeAI({apiKey:e,...t})(a)}throw new Le(`Unable to detect provider for model ID: ${a}. Supported providers are OpenAI (gpt-*, o1*, o3*, chatgpt-*), Anthropic (claude-*), and Google Gemini (gemini-*, gemma-*).`)}var ZR={inputTokens:"prompt_tokens",outputTokens:"completion_tokens",totalTokens:"total_tokens",reasoningTokens:"reasoning_tokens",cachedInputTokens:"cached_input_tokens"};function qR(a){if(!a||typeof a!="object")return false;let t=a,e="usage"in t,o="response"in t,i="text"in t,n="object"in t;return e||o||i||n}function Eu(a,t){if(!qR(a))return {model:t};let e={model:ey(a,t)},o=ry(a.usage);o&&(e.usage=o);let i=oy(a);i&&(e.provider=i);let n=iy(a);n&&(e.metadata=n);let c=ay(a);return c&&(e.output=c),e}function ey(a,t){var e,o;return (o=(e=a.response)==null?void 0:e.modelId)!=null?o:t}function ry(a){if(!a)return;let t={};for(let[e,o]of Object.entries(ZR)){let i=a[e];i!==void 0&&(t[o]=i);}return Object.keys(t).length>0?t:void 0}function oy(a){if(!a.providerMetadata)return;let t=Object.keys(a.providerMetadata);return t.length>0?t[0]:void 0}function ty(a){if(!a)return;let t={};return a.id&&(t.id=a.id),a.timestamp&&(t.timestamp=a.timestamp.toISOString()),Object.keys(t).length>0?t:void 0}function iy(a){let t={};a.usage&&(t.usage=a.usage),a.warnings&&a.warnings.length>0&&(t.warnings=a.warnings);let e=ty(a.response);return e&&(t.response=e),a.providerMetadata&&(t.providerMetadata=a.providerMetadata),a.finishReason&&(t.finishReason=a.finishReason),Object.keys(t).length>0?t:void 0}function ay(a){let t={};return "text"in a&&a.text&&(t.text=a.text),"object"in a&&a.object!==void 0&&(t.object=a.object),"toolCalls"in a&&Array.isArray(a.toolCalls)&&(t.toolCalls=a.toolCalls),"toolResults"in a&&Array.isArray(a.toolResults)&&(t.toolResults=a.toolResults),"sources"in a&&Array.isArray(a.sources)&&(t.sources=a.sources),Object.keys(t).length>0?t:void 0}var Nr=class extends mr{constructor(t,e={trackGenerations:true}){let o=typeof t=="string"?t:t.modelId;super(o);let{trackGenerations:i,...n}=e;try{typeof t!="string"?(this.model=t,k.debug("Initialized VercelAIChatModel with custom LanguageModel")):(this.model=Tu(t,n),k.debug(`Initialized VercelAIChatModel with model ID: ${t}`)),i?(this._generateText=Ie({name:"model.generateText",type:ve.Llm,enrichSpan:c=>Eu(c,this.modelName)},ai$1.generateText),this._generateObject=Ie({name:"model.generateObject",type:ve.Llm,enrichSpan:c=>Eu(c,this.modelName)},ai$1.generateObject)):(this._generateText=ai$1.generateText,this._generateObject=ai$1.generateObject);}catch(c){throw new Le(`Failed to initialize model ${o}: ${c instanceof Error?c.message:String(c)}`)}}async generateString(t,e,o){try{let i;if(e){k.debug(`Generating structured output with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateObject({model:this.model,prompt:t,schema:e,...o});k.debug(`Generated structured output with model ${this.modelName}`),i=JSON.stringify(n.object);}else {k.debug(`Generating text with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateText({model:this.model,prompt:t,...o});k.debug(`Generated text with model ${this.modelName}, output length: ${n.text.length}`),i=n.text;}return i}catch(i){let n=e?`Failed to generate structured output with model ${this.modelName}`:`Failed to generate text with model ${this.modelName}`;throw k.error(n,{error:i}),new Mr(n,i instanceof Error?i:new Error(String(i)))}}async generateProviderResponse(t,e){try{k.debug(`Generating provider response with model ${this.modelName}, messages count: ${t.length}`);let o=await this._generateText({model:this.model,messages:t,...e});return k.debug(`Generated provider response with model ${this.modelName}`),o}catch(o){let i=`Failed to generate provider response with model ${this.modelName}`;throw k.error(i,{error:o}),new Mr(i,o instanceof Error?o:new Error(String(o)))}}};var gh="gpt-4o";function Pu(a,t){return new Nr(a,t)}function fh(a,t){return new Nr(a,t)}function ny(a){return a instanceof mr}function sy(a){return typeof a=="object"&&a!==null&&"modelId"in a&&typeof a.modelId=="string"}function py(a){return typeof a=="string"&&a.length>0}function cy(a){let t=typeof a,e=t==="object"?JSON.stringify(a):String(a);return new Error(`Invalid model type. Expected one of:
18
+ `),k.info(xn__default.default.blue("Uploading results to Opik ... "));}static async displayExperimentLink(t){let e=await t.getUrl();k.info(`View the results ${ci(e,"in your Opik dashboard")}`);}static async processResults(t,e,o=0){let i=this.calculateAverageScores(t);await this.generateResultTable(t,e,i,o),await this.displayExperimentLink(e);let n=await e.ensureNameLoaded();return {experimentId:e.id,experimentName:n,testResults:t}}};function ch(a,t,e){if(!a||typeof t!="string"||t.trim()==="")return e;let o=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i=a;for(let n of o)if(typeof i=="object"&&i!==null&&n in i)i=i[n];else return e;return i===void 0?e:i}var lh,_u;lh=[Ie({name:"metrics_calculation",type:ve.General})];var Ir=class{constructor(t,e,o){Bu(_u,5,this);this.client=void 0;this.dataset=void 0;this.task=void 0;this.scoringMetrics=void 0;this.projectName=void 0;this.nbSamples=void 0;this.scoringKeyMapping=void 0;this.experiment=void 0;this.rootTrace=void 0;this.client=e,this.dataset=t.dataset,this.experiment=o,this.task=t.task,this.scoringMetrics=t.scoringMetrics||[],this.projectName=t.projectName,this.nbSamples=t.nbSamples,this.scoringKeyMapping=t.scoringKeyMapping;}async execute(){var f;let t=performance.now(),e=[],o=await this.dataset.getItems(this.nbSamples),i=o.length,n=k.settings.minLevel;k.settings.minLevel=6;let c=JR__default.default({text:`Evaluating dataset (0/${i} items)`}).start(),m=[];for(let y=0;y<o.length;y++){let z=o[y];try{this.rootTrace=this.client.trace({projectName:this.projectName,name:"evaluation_task",createdBy:"evaluation",input:z}),ai.enterWith({trace:this.rootTrace});let v=await this.executeTask(z);m.push(v),this.rootTrace.update({output:v.testCase.taskOutput,endTime:new Date});}catch(v){let S=v instanceof Error?v.message:String(v);k.error(`Error processing dataset item: ${z.id} - ${S}`),v instanceof Error&&this.rootTrace.update({errorInfo:{message:v.message,exceptionType:v.name,traceback:(f=v.stack)!=null?f:""},endTime:new Date});}e.push(new un({datasetItemId:z.id,traceId:this.rootTrace.data.id})),c.text=`Evaluating dataset (${y+1}/${i} items, ${Math.round((y+1)/i*100)}%)`;}let g=(performance.now()-t)/1e3;return c.succeed(`Evaluation complete: ${i} items processed in ${g.toFixed(2)}s`),k.settings.minLevel=n,this.experiment.insert(e),await this.client.flush(),Rn.processResults(m,this.experiment,g)}async executeTask(t){let e={},o=[];k.debug(`Starting evaluation task on dataset item ${t.id}`),e=await Ie({name:"llm_task",type:ve.General},this.task)(t),k.debug(`Finished evaluation task on dataset item ${t.id}`);let i=this.prepareScoringInputs(t,e),n={traceId:this.rootTrace.data.id,datasetItemId:t.id,scoringInputs:i,taskOutput:e};return this.scoringMetrics.length>0?this.calculateScores(n):{testCase:n,scoreResults:o}}async calculateScores(t){let e=[],{scoringInputs:o}=t;for(let i of this.scoringMetrics){k.debug(`Calculating score for metric ${i.name}`);try{ph(i,o);let n=await i.score(o),c=Array.isArray(n)?n:[n];e.push(...c);}catch(n){let c=n instanceof Error?n.message:String(n);k.error(`Metric ${i.name} failed: ${c}`);}k.debug(`Finished calculating score for metric ${i.name}`);}return e.forEach(i=>{var n;return (n=this.rootTrace)==null?void 0:n.score({name:i.name,value:i.value,reason:i.reason})}),{testCase:t,scoreResults:e}}prepareScoringInputs(t,e){let o={...t,...e};if(!this.scoringKeyMapping)return o;let i={...o};for(let[n,c]of Object.entries(this.scoringKeyMapping)){let m=ch(o,c);m!==void 0&&(i[n]=m);}return i}};_u=Ou(),Lu(_u,1,"calculateScores",lh,Ir),Cn(_u,Ir);var Ur=class Ur{static getInstance(t){return Ur.instance||(Ur.instance=new mr(t)),Ur.instance}};Ur.instance=null;var yn=Ur;async function mh(a){var o;if(!a.dataset)throw new Error("Dataset is required for evaluation");if(!a.task)throw new Error("Task function is required for evaluation");let t=(o=a.client)!=null?o:yn.getInstance(),e=await t.createExperiment({name:a.experimentName,datasetName:a.dataset.name,experimentConfig:a.experimentConfig,prompts:a.prompts});try{let i=new Ir(a,t,e);return k.info("Starting evaluation"),i.execute()}catch(i){throw k.error(`Error during evaluation: ${i}`),i}}var dr=class{constructor(t){this.modelName=t;}};var ni=class a extends Error{constructor(t){super(t),this.name="ModelError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Dr=class a extends ni{constructor(e,o){super(e);this.cause=o;this.name="ModelGenerationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Le=class a extends ni{constructor(t){super(t),this.name="ModelConfigurationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}};function $R(a,t){return a.startsWith("gpt-")||a.startsWith("o1")||a.startsWith("o3")||a.startsWith("chatgpt-")}function QR(a,t){return a.startsWith("claude-")}function YR(a,t){return a.startsWith("gemini-")||a.startsWith("gemma-")}function Au(a,t,e){if(!t)throw new Le(`API key for ${a} is not configured. Please provide it via the 'apiKey' option or set the ${e} environment variable.`)}function Tu(a,t){if($R(a)){let e=(t==null?void 0:t.apiKey)||process.env.OPENAI_API_KEY;return Au("OpenAI",e,"OPENAI_API_KEY"),openai.createOpenAI({apiKey:e,...t})(a)}if(QR(a)){let e=(t==null?void 0:t.apiKey)||process.env.ANTHROPIC_API_KEY;return Au("Anthropic",e,"ANTHROPIC_API_KEY"),anthropic.createAnthropic({apiKey:e,...t})(a)}if(YR(a)){let e=(t==null?void 0:t.apiKey)||process.env.GOOGLE_API_KEY;return Au("Google Gemini",e,"GOOGLE_API_KEY"),google.createGoogleGenerativeAI({apiKey:e,...t})(a)}throw new Le(`Unable to detect provider for model ID: ${a}. Supported providers are OpenAI (gpt-*, o1*, o3*, chatgpt-*), Anthropic (claude-*), and Google Gemini (gemini-*, gemma-*).`)}var ZR={inputTokens:"prompt_tokens",outputTokens:"completion_tokens",totalTokens:"total_tokens",reasoningTokens:"reasoning_tokens",cachedInputTokens:"cached_input_tokens"};function qR(a){if(!a||typeof a!="object")return false;let t=a,e="usage"in t,o="response"in t,i="text"in t,n="object"in t;return e||o||i||n}function Eu(a,t){if(!qR(a))return {model:t};let e={model:ey(a,t)},o=ry(a.usage);o&&(e.usage=o);let i=oy(a);i&&(e.provider=i);let n=iy(a);n&&(e.metadata=n);let c=ay(a);return c&&(e.output=c),e}function ey(a,t){var e,o;return (o=(e=a.response)==null?void 0:e.modelId)!=null?o:t}function ry(a){if(!a)return;let t={};for(let[e,o]of Object.entries(ZR)){let i=a[e];i!==void 0&&(t[o]=i);}return Object.keys(t).length>0?t:void 0}function oy(a){if(!a.providerMetadata)return;let t=Object.keys(a.providerMetadata);return t.length>0?t[0]:void 0}function ty(a){if(!a)return;let t={};return a.id&&(t.id=a.id),a.timestamp&&(t.timestamp=a.timestamp.toISOString()),Object.keys(t).length>0?t:void 0}function iy(a){let t={};a.usage&&(t.usage=a.usage),a.warnings&&a.warnings.length>0&&(t.warnings=a.warnings);let e=ty(a.response);return e&&(t.response=e),a.providerMetadata&&(t.providerMetadata=a.providerMetadata),a.finishReason&&(t.finishReason=a.finishReason),Object.keys(t).length>0?t:void 0}function ay(a){let t={};return "text"in a&&a.text&&(t.text=a.text),"object"in a&&a.object!==void 0&&(t.object=a.object),"toolCalls"in a&&Array.isArray(a.toolCalls)&&(t.toolCalls=a.toolCalls),"toolResults"in a&&Array.isArray(a.toolResults)&&(t.toolResults=a.toolResults),"sources"in a&&Array.isArray(a.sources)&&(t.sources=a.sources),Object.keys(t).length>0?t:void 0}var Mr=class extends dr{constructor(t,e={trackGenerations:true}){let o=typeof t=="string"?t:t.modelId;super(o);let{trackGenerations:i,...n}=e;try{typeof t!="string"?(this.model=t,k.debug("Initialized VercelAIChatModel with custom LanguageModel")):(this.model=Tu(t,n),k.debug(`Initialized VercelAIChatModel with model ID: ${t}`)),i?(this._generateText=Ie({name:"model.generateText",type:ve.Llm,enrichSpan:c=>Eu(c,this.modelName)},ai$1.generateText),this._generateObject=Ie({name:"model.generateObject",type:ve.Llm,enrichSpan:c=>Eu(c,this.modelName)},ai$1.generateObject)):(this._generateText=ai$1.generateText,this._generateObject=ai$1.generateObject);}catch(c){throw new Le(`Failed to initialize model ${o}: ${c instanceof Error?c.message:String(c)}`)}}async generateString(t,e,o){try{let i;if(e){k.debug(`Generating structured output with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateObject({model:this.model,prompt:t,schema:e,...o});k.debug(`Generated structured output with model ${this.modelName}`),i=JSON.stringify(n.object);}else {k.debug(`Generating text with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateText({model:this.model,prompt:t,...o});k.debug(`Generated text with model ${this.modelName}, output length: ${n.text.length}`),i=n.text;}return i}catch(i){let n=e?`Failed to generate structured output with model ${this.modelName}`:`Failed to generate text with model ${this.modelName}`;throw k.error(n,{error:i}),new Dr(n,i instanceof Error?i:new Error(String(i)))}}async generateProviderResponse(t,e){try{k.debug(`Generating provider response with model ${this.modelName}, messages count: ${t.length}`);let o=await this._generateText({model:this.model,messages:t,...e});return k.debug(`Generated provider response with model ${this.modelName}`),o}catch(o){let i=`Failed to generate provider response with model ${this.modelName}`;throw k.error(i,{error:o}),new Dr(i,o instanceof Error?o:new Error(String(o)))}}};var gh="gpt-4o";function Pu(a,t){return new Mr(a,t)}function fh(a,t){return new Mr(a,t)}function ny(a){return a instanceof dr}function sy(a){return typeof a=="object"&&a!==null&&"modelId"in a&&typeof a.modelId=="string"}function py(a){return typeof a=="string"&&a.length>0}function cy(a){let t=typeof a,e=t==="object"?JSON.stringify(a):String(a);return new Error(`Invalid model type. Expected one of:
19
19
  - string (model ID like 'gpt-4o', 'claude-3-5-sonnet-latest')
20
20
  - LanguageModel instance from Vercel AI SDK
21
21
  - OpikBaseModel instance
22
22
  - undefined (uses default model: ${gh})
23
23
 
24
- Received: ${t} ${e}`)}function ni(a,t){if(a==null)return Pu(gh,t);if(py(a))return Pu(a,t);if(ny(a))return a;if(sy(a))return fh(a,t);throw cy(a)}function hh(a){return a.map(t=>{let e=Array.isArray(t.content)?ly(t.content):t.content;return `${t.role}: ${e}`}).join(`
24
+ Received: ${t} ${e}`)}function si(a,t){if(a==null)return Pu(gh,t);if(py(a))return Pu(a,t);if(ny(a))return a;if(sy(a))return fh(a,t);throw cy(a)}function hh(a){return a.map(t=>{let e=Array.isArray(t.content)?ly(t.content):t.content;return `${t.role}: ${e}`}).join(`
25
25
  `)}function ly(a){return a.map(t=>t.type==="text"?t.text:t.type==="file"?`[file: ${t.filename||"unknown"}]`:t.type==="tool-call"?`[tool-call: ${t.toolName}]`:t.type==="tool-result"?`[tool-result: ${t.toolName}]`:t.type==="reasoning"?`[reasoning: ${t.text}]`:"").filter(t=>t.length>0).join(`
26
- `)}function my(a,t,e){return typeof a=="string"?_e(a,t,e):Array.isArray(a)?a.map(i=>i.type==="text"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i.type==="image"&&typeof i.image=="string"?{...i,image:_e(i.image,t,e)}:i.type==="file"&&typeof i.data=="string"?{...i,data:_e(i.data,t,e)}:i.type==="reasoning"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i):a}function wh(a,t,e){let o=my(a.content,t,e);return {...a,content:o}}async function _ue(a){var i;if(!a.dataset)throw new Error("Dataset is required for prompt evaluation");if(!a.messages||a.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(a.experimentConfig!==void 0&&(typeof a.experimentConfig!="object"||a.experimentConfig===null||Array.isArray(a.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let t=ni(a.model),e={...a.experimentConfig,prompt_template:a.messages,model:t.modelName,...a.temperature!==void 0&&{temperature:a.temperature},...a.seed!==void 0&&{seed:a.seed}},o=dy(t,a.messages,(i=a.templateType)!=null?i:ye.MUSTACHE,{temperature:a.temperature,seed:a.seed});return mh({dataset:a.dataset,task:o,scoringMetrics:a.scoringMetrics,experimentName:a.experimentName,projectName:a.projectName,experimentConfig:e,prompts:a.prompts,client:a.client,nbSamples:a.nbSamples,scoringKeyMapping:a.scoringKeyMapping})}function dy(a,t,e,o){return async i=>{let n=t.map(g=>wh(g,i,e)),c=await a.generateProviderResponse(n,o),d=uy(c);return {input:hh(n),output:d}}}function uy(a){return a&&typeof a=="object"?"text"in a&&typeof a.text=="string"?a.text:"content"in a&&typeof a.content=="string"?a.content:JSON.stringify(a):String(a)}var fe=class{constructor(t,e=true){if(this.name=t,this.trackMetric=e,e){let o=this.score.bind(this);this.score=Ie({name:this.name,type:ve.General},o);}}};var gy=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()}),bh=class extends fe{constructor(e="exact_match",o=true){super(e,o);this.validationSchema=gy;}async score(e){let{output:o,expected:i}=e,n=o===i?1:0;return {name:this.name,value:n,reason:`Exact match: ${n===1?"Match":"No match"}`}}};var fy=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),xh=class extends fe{constructor(e="contains",o=true,i=false){super(e,o);this.validationSchema=fy;this.caseSensitive=i;}async score(e){let{output:o,substring:i}=e,n=this.caseSensitive?o:o.toLowerCase(),c=this.caseSensitive?i:i.toLowerCase();return n.includes(c)?{name:this.name,value:1,reason:`Contains: "${i}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${i}" not found in output.`}}};var hy=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),Rh=class extends fe{constructor(e="regex_match",o=true){super(e,o);this.validationSchema=hy;}async score(e){let{output:o,pattern:i,flags:n}=e,c;typeof i=="string"&&n?c=new RegExp(i,n):c=new RegExp(i);let d=c.test(o);return {name:this.name,value:d?1:0,reason:d?`Regex: Output matches the regex pattern: ${i}`:`Regex: Output does not match the regex pattern: ${i}`}}};var wy=zod.z.object({output:zod.z.unknown()}),kh=class extends fe{constructor(e="is_json_metric",o=true){super(e,o);this.validationSchema=wy;}async score(e){let{output:o}=e;try{return JSON.parse(o),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}}};var ke=class extends fe{constructor(t,e){var i;let o=(i=e==null?void 0:e.trackMetric)!=null?i:true;super(t,o),this.temperature=e==null?void 0:e.temperature,this.seed=e==null?void 0:e.seed,this.maxTokens=e==null?void 0:e.maxTokens,this.modelSettings=e==null?void 0:e.modelSettings,this.model=this.initModel(e==null?void 0:e.model,{trackGenerations:o});}initModel(t,e){return ni(t,e)}buildModelOptions(){return {...this.modelSettings,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},...this.maxTokens!==void 0&&{maxTokens:this.maxTokens}}}};function zh(a,t=[]){let e="";return t.length>0&&(e=`
26
+ `)}function my(a,t,e){return typeof a=="string"?_e(a,t,e):Array.isArray(a)?a.map(i=>i.type==="text"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i.type==="image"&&typeof i.image=="string"?{...i,image:_e(i.image,t,e)}:i.type==="file"&&typeof i.data=="string"?{...i,data:_e(i.data,t,e)}:i.type==="reasoning"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i):a}function wh(a,t,e){let o=my(a.content,t,e);return {...a,content:o}}async function Eue(a){var i;if(!a.dataset)throw new Error("Dataset is required for prompt evaluation");if(!a.messages||a.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(a.experimentConfig!==void 0&&(typeof a.experimentConfig!="object"||a.experimentConfig===null||Array.isArray(a.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let t=si(a.model),e={...a.experimentConfig,prompt_template:a.messages,model:t.modelName,...a.temperature!==void 0&&{temperature:a.temperature},...a.seed!==void 0&&{seed:a.seed}},o=dy(t,a.messages,(i=a.templateType)!=null?i:ye.MUSTACHE,{temperature:a.temperature,seed:a.seed});return mh({dataset:a.dataset,task:o,scoringMetrics:a.scoringMetrics,experimentName:a.experimentName,projectName:a.projectName,experimentConfig:e,prompts:a.prompts,client:a.client,nbSamples:a.nbSamples,scoringKeyMapping:a.scoringKeyMapping})}function dy(a,t,e,o){return async i=>{let n=t.map(g=>wh(g,i,e)),c=await a.generateProviderResponse(n,o),m=uy(c);return {input:hh(n),output:m}}}function uy(a){return a&&typeof a=="object"?"text"in a&&typeof a.text=="string"?a.text:"content"in a&&typeof a.content=="string"?a.content:JSON.stringify(a):String(a)}var fe=class{constructor(t,e=true){if(this.name=t,this.trackMetric=e,e){let o=this.score.bind(this);this.score=Ie({name:this.name,type:ve.General},o);}}};var gy=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()}),bh=class extends fe{constructor(e="exact_match",o=true){super(e,o);this.validationSchema=gy;}async score(e){let{output:o,expected:i}=e,n=o===i?1:0;return {name:this.name,value:n,reason:`Exact match: ${n===1?"Match":"No match"}`}}};var fy=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),xh=class extends fe{constructor(e="contains",o=true,i=false){super(e,o);this.validationSchema=fy;this.caseSensitive=i;}async score(e){let{output:o,substring:i}=e,n=this.caseSensitive?o:o.toLowerCase(),c=this.caseSensitive?i:i.toLowerCase();return n.includes(c)?{name:this.name,value:1,reason:`Contains: "${i}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${i}" not found in output.`}}};var hy=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),Rh=class extends fe{constructor(e="regex_match",o=true){super(e,o);this.validationSchema=hy;}async score(e){let{output:o,pattern:i,flags:n}=e,c;typeof i=="string"&&n?c=new RegExp(i,n):c=new RegExp(i);let m=c.test(o);return {name:this.name,value:m?1:0,reason:m?`Regex: Output matches the regex pattern: ${i}`:`Regex: Output does not match the regex pattern: ${i}`}}};var wy=zod.z.object({output:zod.z.unknown()}),kh=class extends fe{constructor(e="is_json_metric",o=true){super(e,o);this.validationSchema=wy;}async score(e){let{output:o}=e;try{return JSON.parse(o),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}}};var ke=class extends fe{constructor(t,e){var i;let o=(i=e==null?void 0:e.trackMetric)!=null?i:true;super(t,o),this.temperature=e==null?void 0:e.temperature,this.seed=e==null?void 0:e.seed,this.maxTokens=e==null?void 0:e.maxTokens,this.modelSettings=e==null?void 0:e.modelSettings,this.model=this.initModel(e==null?void 0:e.model,{trackGenerations:o});}initModel(t,e){return si(t,e)}buildModelOptions(){return {...this.modelSettings,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},...this.maxTokens!==void 0&&{maxTokens:this.maxTokens}}}};function zh(a,t=[]){let e="";return t.length>0&&(e=`
27
27
 
28
28
  ###EXAMPLES###
29
29
 
@@ -121,7 +121,7 @@ ${a}
121
121
  AI Response: ${t}
122
122
 
123
123
  Provide your evaluation in the specified JSON format.
124
- `}function _h(a,t){try{let e=Ve(a),o=Number(e.score);if(isNaN(o)||o<0||o>1)throw new Error(`Usefulness score must be between 0.0 and 1.0, got ${o}`);return {name:t,value:o,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate usefulness score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var yy=zod.z.object({input:zod.z.string(),output:zod.z.string()}),ky=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),_n=class extends ke{constructor(e){var i;let o=(i=e==null?void 0:e.name)!=null?i:"usefulness_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=yy;}async score(e){let{input:o,output:i}=e,n=Sh(o,i),c=this.buildModelOptions(),d=await this.model.generateString(n,ky,c);return _h(d,this.name)}};var zy=`You are an expert judge tasked with evaluating the faithfulness of an AI-generated answer to the given context. Analyze the provided INPUT, CONTEXT, and OUTPUT to determine if the OUTPUT contains any hallucinations or unfaithful information.
124
+ `}function _h(a,t){try{let e=Ve(a),o=Number(e.score);if(isNaN(o)||o<0||o>1)throw new Error(`Usefulness score must be between 0.0 and 1.0, got ${o}`);return {name:t,value:o,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate usefulness score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var yy=zod.z.object({input:zod.z.string(),output:zod.z.string()}),ky=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),_n=class extends ke{constructor(e){var i;let o=(i=e==null?void 0:e.name)!=null?i:"usefulness_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=yy;}async score(e){let{input:o,output:i}=e,n=Sh(o,i),c=this.buildModelOptions(),m=await this.model.generateString(n,ky,c);return _h(m,this.name)}};var zy=`You are an expert judge tasked with evaluating the faithfulness of an AI-generated answer to the given context. Analyze the provided INPUT, CONTEXT, and OUTPUT to determine if the OUTPUT contains any hallucinations or unfaithful information.
125
125
 
126
126
  Guidelines:
127
127
  1. The OUTPUT must not introduce new information beyond what's provided in the CONTEXT.
@@ -199,7 +199,7 @@ ${i}Output: ${o.output}
199
199
  {"score": "${o.score}", "reason": "${o.reason}"}
200
200
  </example>`}).join(`
201
201
 
202
- `)}`}function Th(a,t,e,o=[]){let i=Ah(o,true);return zy.replace("{examples_str}",i).replace("{input}",a).replace("{context}",JSON.stringify(e)).replace("{output}",t)}function Eh(a,t,e=[]){let o=Ah(e,false);return vy.replace("{examples_str}",o).replace("{input}",a).replace("{output}",t)}function Ph(a,t){try{let e=Ve(a),o=e.score;if(o==null)throw new Error(`Hallucination score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Hallucination score must be between 0.0 and 1.0, got ${i}`);let n="",c=e.reason;return Array.isArray(c)?n=c.map(d=>String(d)).join(" "):c&&(n=String(c)),{name:t,value:i,reason:n}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate hallucination score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var Sy=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),_y=zod.z.object({score:zod.z.number(),reason:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())])}),An=class extends ke{constructor(e){var i,n;let o=(i=e==null?void 0:e.name)!=null?i:"hallucination_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=Sy;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{input:o,output:i,context:n}=e,c=n?Th(o,i,n,this.fewShotExamples):Eh(o,i,this.fewShotExamples),d=this.buildModelOptions(),u=await this.model.generateString(c,_y,d);return Ph(u,this.name)}};var Ch=[{title:"Low Relevance Score",input:"What's the capital of France?",output:"The Eiffel Tower is a famous landmark.",context:["France is a country in Europe.","Paris is known for its iconic Eiffel Tower."],answer_relevance_score:.2,reason:"The answer provides information about the Eiffel Tower, which is related to France, but fails to address the specific question about the capital city. It doesn't directly answer the user's query, resulting in low relevance."},{title:"Medium Relevance Score",input:"What's the capital of France?",output:"France has many beautiful cities, including Paris.",context:["France is a country in Europe.","Paris is the capital and largest city of France."],answer_relevance_score:.6,reason:"The answer mentions Paris, which is the correct capital, but it's presented as just one of many cities rather than explicitly stating it's the capital. The response is partially relevant but lacks directness in addressing the specific question."},{title:"High Relevance Score",input:"What's the capital of France?",output:"The capital of France is Paris, a city known for its iconic Eiffel Tower.",context:["France is a country in Europe.","Paris is the capital and largest city of France."],answer_relevance_score:.9,reason:"The answer directly and correctly identifies Paris as the capital of France, which is highly relevant to the user's question. It also provides additional context about the Eiffel Tower, which aligns with the provided context. The response is comprehensive and relevant, though slightly more detailed than necessary, preventing a perfect score."}],jh=[{title:"Low Relevance Score",input:"What's the capital of France?",output:"The Eiffel Tower is a famous landmark.",answer_relevance_score:.2,reason:"The answer provides information about the Eiffel Tower, which is related to France, but fails to address the specific question about the capital city. It doesn't directly answer the user's query, resulting in low relevance."},{title:"Medium Relevance Score",input:"What's the capital of France?",output:"France has many beautiful cities, including Paris.",answer_relevance_score:.6,reason:"The answer mentions Paris, which is the correct capital, but it's presented as just one of many cities rather than explicitly stating it's the capital. The response is partially relevant but lacks directness in addressing the specific question."},{title:"High Relevance Score",input:"What's the capital of France?",output:"The capital of France is Paris, a city known for its iconic Eiffel Tower.",answer_relevance_score:.9,reason:"The answer directly and correctly identifies Paris as the capital of France, which is highly relevant to the user's question. It also provides additional context about the Eiffel Tower, which aligns with the provided context. The response is comprehensive and relevant, though slightly more detailed than necessary, preventing a perfect score."}];function Ay(a){return a.map((t,e)=>`#### Example ${e+1}: ${t.title}
202
+ `)}`}function Th(a,t,e,o=[]){let i=Ah(o,true);return zy.replace("{examples_str}",i).replace("{input}",a).replace("{context}",JSON.stringify(e)).replace("{output}",t)}function Eh(a,t,e=[]){let o=Ah(e,false);return vy.replace("{examples_str}",o).replace("{input}",a).replace("{output}",t)}function Ph(a,t){try{let e=Ve(a),o=e.score;if(o==null)throw new Error(`Hallucination score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Hallucination score must be between 0.0 and 1.0, got ${i}`);let n="",c=e.reason;return Array.isArray(c)?n=c.map(m=>String(m)).join(" "):c&&(n=String(c)),{name:t,value:i,reason:n}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate hallucination score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var Sy=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),_y=zod.z.object({score:zod.z.number(),reason:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())])}),An=class extends ke{constructor(e){var i,n;let o=(i=e==null?void 0:e.name)!=null?i:"hallucination_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=Sy;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{input:o,output:i,context:n}=e,c=n?Th(o,i,n,this.fewShotExamples):Eh(o,i,this.fewShotExamples),m=this.buildModelOptions(),u=await this.model.generateString(c,_y,m);return Ph(u,this.name)}};var Ch=[{title:"Low Relevance Score",input:"What's the capital of France?",output:"The Eiffel Tower is a famous landmark.",context:["France is a country in Europe.","Paris is known for its iconic Eiffel Tower."],answer_relevance_score:.2,reason:"The answer provides information about the Eiffel Tower, which is related to France, but fails to address the specific question about the capital city. It doesn't directly answer the user's query, resulting in low relevance."},{title:"Medium Relevance Score",input:"What's the capital of France?",output:"France has many beautiful cities, including Paris.",context:["France is a country in Europe.","Paris is the capital and largest city of France."],answer_relevance_score:.6,reason:"The answer mentions Paris, which is the correct capital, but it's presented as just one of many cities rather than explicitly stating it's the capital. The response is partially relevant but lacks directness in addressing the specific question."},{title:"High Relevance Score",input:"What's the capital of France?",output:"The capital of France is Paris, a city known for its iconic Eiffel Tower.",context:["France is a country in Europe.","Paris is the capital and largest city of France."],answer_relevance_score:.9,reason:"The answer directly and correctly identifies Paris as the capital of France, which is highly relevant to the user's question. It also provides additional context about the Eiffel Tower, which aligns with the provided context. The response is comprehensive and relevant, though slightly more detailed than necessary, preventing a perfect score."}],jh=[{title:"Low Relevance Score",input:"What's the capital of France?",output:"The Eiffel Tower is a famous landmark.",answer_relevance_score:.2,reason:"The answer provides information about the Eiffel Tower, which is related to France, but fails to address the specific question about the capital city. It doesn't directly answer the user's query, resulting in low relevance."},{title:"Medium Relevance Score",input:"What's the capital of France?",output:"France has many beautiful cities, including Paris.",answer_relevance_score:.6,reason:"The answer mentions Paris, which is the correct capital, but it's presented as just one of many cities rather than explicitly stating it's the capital. The response is partially relevant but lacks directness in addressing the specific question."},{title:"High Relevance Score",input:"What's the capital of France?",output:"The capital of France is Paris, a city known for its iconic Eiffel Tower.",answer_relevance_score:.9,reason:"The answer directly and correctly identifies Paris as the capital of France, which is highly relevant to the user's question. It also provides additional context about the Eiffel Tower, which aligns with the provided context. The response is comprehensive and relevant, though slightly more detailed than necessary, preventing a perfect score."}];function Ay(a){return a.map((t,e)=>`#### Example ${e+1}: ${t.title}
203
203
 
204
204
  - **Input:** "${t.input}"
205
205
  - **Output:** "${t.output}"
@@ -338,7 +338,7 @@ ${i}Output: ${o.output}
338
338
  Output:
339
339
  ${t}
340
340
  ***
341
- `}function Dh(a,t){try{let e=Ve(a),o=e.answer_relevance_score;if(o==null)throw new Error(`Answer relevance score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Answer relevance score must be between 0.0 and 1.0, got ${i}`);return {name:t,value:i,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate answer relevance score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var Ey=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),Py=zod.z.object({answer_relevance_score:zod.z.number(),reason:zod.z.string()}),Tn=class extends ke{constructor(e){var i,n,c,d;let o=(i=e==null?void 0:e.name)!=null?i:"answer_relevance_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=Ey;this.fewShotExamplesWithContext=(n=e==null?void 0:e.fewShotExamples)!=null?n:Ch,this.fewShotExamplesNoContext=(c=e==null?void 0:e.fewShotExamplesNoContext)!=null?c:jh,this.requireContext=(d=e==null?void 0:e.requireContext)!=null?d:true;}async score(e){let{input:o,output:i,context:n}=e;if(!n&&this.requireContext)throw new he(`${this.name} requires context by default. If you want to allow execution in no-context mode, enable it via 'new AnswerRelevance({ requireContext: false })'`);let c=n?Ih(o,i,n,this.fewShotExamplesWithContext):Uh(o,i,this.fewShotExamplesNoContext),d=this.buildModelOptions(),u=await this.model.generateString(c,Py,d);return Dh(u,this.name)}};/*! Bundled license information:
341
+ `}function Dh(a,t){try{let e=Ve(a),o=e.answer_relevance_score;if(o==null)throw new Error(`Answer relevance score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Answer relevance score must be between 0.0 and 1.0, got ${i}`);return {name:t,value:i,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate answer relevance score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var Ey=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),Py=zod.z.object({answer_relevance_score:zod.z.number(),reason:zod.z.string()}),Tn=class extends ke{constructor(e){var i,n,c,m;let o=(i=e==null?void 0:e.name)!=null?i:"answer_relevance_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=Ey;this.fewShotExamplesWithContext=(n=e==null?void 0:e.fewShotExamples)!=null?n:Ch,this.fewShotExamplesNoContext=(c=e==null?void 0:e.fewShotExamplesNoContext)!=null?c:jh,this.requireContext=(m=e==null?void 0:e.requireContext)!=null?m:true;}async score(e){let{input:o,output:i,context:n}=e;if(!n&&this.requireContext)throw new he(`${this.name} requires context by default. If you want to allow execution in no-context mode, enable it via 'new AnswerRelevance({ requireContext: false })'`);let c=n?Ih(o,i,n,this.fewShotExamplesWithContext):Uh(o,i,this.fewShotExamplesNoContext),m=this.buildModelOptions(),u=await this.model.generateString(c,Py,m);return Dh(u,this.name)}};/*! Bundled license information:
342
342
 
343
343
  mime-db/index.js:
344
344
  (*!
@@ -355,4 +355,4 @@ mime-types/index.js:
355
355
  * Copyright(c) 2015 Douglas Christopher Wilson
356
356
  * MIT Licensed
357
357
  *)
358
- */Object.defineProperty(exports,"z",{enumerable:true,get:function(){return zod.z}});exports.AnswerRelevance=Tn;exports.BaseLLMJudgeMetric=ke;exports.BaseMetric=fe;exports.Contains=xh;exports.ExactMatch=bh;exports.Hallucination=An;exports.IsJson=kh;exports.ModelConfigurationError=Le;exports.ModelError=ai;exports.ModelGenerationError=Mr;exports.Moderation=Sn;exports.Opik=lr;exports.OpikBaseModel=mr;exports.OpikQueryLanguage=Be;exports.OpikSpanType=ve;exports.Prompt=Oe;exports.PromptType=ye;exports.RegexMatch=Rh;exports.Usefulness=_n;exports.VercelAIChatModel=Nr;exports.createModel=Pu;exports.createModelFromInstance=fh;exports.detectProvider=Tu;exports.disableLogger=Gh;exports.evaluate=mh;exports.evaluatePrompt=_ue;exports.flushAll=LR;exports.generateId=oe;exports.getTrackContext=FR;exports.logger=k;exports.resolveModel=ni;exports.setLoggerLevel=Vu;exports.track=Ie;
358
+ */Object.defineProperty(exports,"z",{enumerable:true,get:function(){return zod.z}});exports.AnswerRelevance=Tn;exports.BaseLLMJudgeMetric=ke;exports.BaseMetric=fe;exports.Contains=xh;exports.ExactMatch=bh;exports.Hallucination=An;exports.IsJson=kh;exports.ModelConfigurationError=Le;exports.ModelError=ni;exports.ModelGenerationError=Dr;exports.Moderation=Sn;exports.Opik=mr;exports.OpikBaseModel=dr;exports.OpikQueryLanguage=Be;exports.OpikSpanType=ve;exports.Prompt=Oe;exports.PromptType=ye;exports.RegexMatch=Rh;exports.Usefulness=_n;exports.VercelAIChatModel=Mr;exports.createModel=Pu;exports.createModelFromInstance=fh;exports.detectProvider=Tu;exports.disableLogger=Gh;exports.evaluate=mh;exports.evaluatePrompt=Eue;exports.flushAll=LR;exports.generateId=oe;exports.getTrackContext=FR;exports.logger=k;exports.resolveModel=si;exports.setLoggerLevel=Vu;exports.track=Ie;