(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,495644,831025,615416,348752,116398,61282,920747,384658,245997,419728,e=>{"use strict";let t,r;(o=i||(i={}))[o.NONE=0]="NONE",o[o.SAMPLED=1]="SAMPLED",e.s(["f",0,i],495644);var n,o,i,a,s="0000000000000000",u="00000000000000000000000000000000",f={traceId:u,spanId:s,traceFlags:i.NONE};e.s(["g",0,s,"c",0,f,"P",0,u],831025);var l=function(){function e(e){void 0===e&&(e=f),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),c=/^([0-9a-f]{32})$/i,p=/^[0-9a-f]{16}$/i;function d(e){var t,r;return t=e.traceId,c.test(t)&&t!==u&&(r=e.spanId,p.test(r)&&r!==s)}function h(e){return new l(e)}e.s(["e",0,d,"o",0,h],615416);var g="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:e.g,_="1.9.0",y=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,v=function(e){var t=new Set([e]),r=new Set,n=e.match(y);if(!n)return function(){return!1};var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=o.prerelease)return function(t){return t===e};function i(e){return r.add(e),!1}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var n=e.match(y);if(!n)return i(e);var a={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=a.prerelease||o.major!==a.major)return i(e);if(0===o.major)return o.minor===a.minor&&o.patch<=a.patch?(t.add(e),!0):i(e);return o.minor<=a.minor?(t.add(e),!0):i(e)}}(_),m=Symbol.for("opentelemetry.js.api."+_.split(".")[0]);function b(e,t,r,n){void 0===n&&(n=!1);var o,i=g[m]=null!=(o=g[m])?o:{version:_};if(!n&&i[e]){var a=Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(a.stack||a.message),!1}if(i.version!==_){var a=Error("@opentelemetry/api: Registration of version v"+i.version+" for "+e+" does not match previously registered API v"+_);return r.error(a.stack||a.message),!1}return i[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+_+"."),!0}function S(e){var t,r,n=null==(t=g[m])?void 0:t.version;if(n&&v(n))return null==(r=g[m])?void 0:r[e]}function w(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+_+".");var r=g[m];r&&delete r[e]}var A=new function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(e){return r._currentContext.get(e)},r.setValue=function(t,n){var o=new e(r._currentContext);return o._currentContext.set(t,n),o},r.deleteValue=function(t){var n=new e(r._currentContext);return n._currentContext.delete(t),n}},E=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},I=function(e,t,r){if(r||2==arguments.length)for(var n,o=0,i=t.length;o0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},k=function(e,t,r){if(r||2==arguments.length)for(var n,o=0,i=t.length;o0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},T=function(e,t,r){if(r||2==arguments.length)for(var n,o=0,i=t.length;o=n?o.bind(t):function(){}}return ea.ALL&&(e=a.ALL),t=t||{},{error:r("error",a.ERROR),warn:r("warn",a.WARN),info:r("info",a.INFO),debug:r("debug",a.DEBUG),verbose:r("verbose",a.VERBOSE)}}(null!=(o=r.logLevel)?o:a.INFO,e);if(u&&!r.suppressOverrideMessage){var l=null!=(i=Error().stack)?i:"";u.warn("Current logger will be overwritten from "+l),f.warn("Current logger will overwrite one already registered from "+l)}return b("diag",f,t,!0)},t.disable=function(){w("diag",t)},t.createComponentLogger=function(e){return new L(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),P=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},N=function(e,t,r){if(r||2==arguments.length)for(var n,o=0,i=t.length;oe.has(t)||r.some(e=>t.endsWith(e)));return r?.rule??"unlisted"}var ev=e.i(771271);let em="[hipaa_scrubbed]",eb=new Set([...ea,...es,...eu,...ef,...eg,"index","token_count","prompt_tokens","completion_tokens","total_tokens","cached_tokens","reasoning_tokens","audio_tokens","image_tokens","video_tokens","file_tokens","cache_write_tokens","is_partial","is_error","cache_hit","is_byok","previous_errors","chunk","choice","choices","request","attempts","usage","logprobs","tokens","prompt_tokens_details","completion_tokens_details","server_tool_use","web_search_requests","web_fetch_requests","code_execution_requests","file_search_requests","tool_calls_requested","tool_calls_executed"]),eS=/^(?!.*:\/\/)[\w.:/~+-]{1,128}$/;function ew(e){return"number"==typeof e||"boolean"==typeof e}let eA={keep:(e,t)=>eR(e,{...t,isStringScrubbed:!1}),unlisted:(e,t)=>eR(e,{...t,isStringScrubbed:t.isNested&&!t.isTrustedSubtree}),diagnostic_code:function(e){return ew(e)||"string"==typeof e&&ex(e)?e:em},blind:()=>em,scrub:e=>ew(e)?e:em,envelope:function(e,t){return ew(e)?e:null!==e&&"object"==typeof e?eR(e,{...t,isStringScrubbed:!0}):em}};({...{identifier:eA.keep,enum:eA.keep,diagnostic:function(e){return ew(e)||null==e?e:em},structured:function(e,t){return"string"==typeof e?em:eR(e,{...t,isNested:!0,isStringScrubbed:!1})}},audit_record:eA.keep});let eE={isStringTokenChecked:!1,unlistedFieldScrubber:()=>eA.unlisted};function eI(e){return e.length<=256?e:e.slice(0,256)+"[hipaa_truncated]"}function ex(e){return(0,er.q)(e,ev.R)||eS.test(e)}function eR(e,t){var r,n;if("string"==typeof e)return t.isStringScrubbed?em:t.isNested||t.isTopLevelStringTokenChecked?ex(e)?e:em:eI(e);return null==e||"number"==typeof e||"boolean"==typeof e?e:"bigint"==typeof e?t.isStringScrubbed?em:eI(e.toString()):t.depth>=8?em:Array.isArray(e)?(r=e,(n=t).seen.has(r)?em:(n.seen.add(r),r.map(e=>eR(e,{...n,depth:n.depth+1})))):(0,en.f)(e)?function(e,t){if(t.seen.has(e))return em;t.seen.add(e);let r={};try{for(let[i,a]of Object.entries(e))if(t.isTrustedSubtree||eb.has(i.toLowerCase())){var n,o;r[i]=(n={field:i,value:a},o={...t,depth:t.depth+1,isNested:!0},eA[ey(n.field)](n.value,o))}}catch{return em}return r}(e,t):em}e.s(["y",0,em,"L",0,function(e){let t={depth:0,seen:new WeakSet,isNested:!1,isStringScrubbed:!1,isTrustedSubtree:!1,isTopLevelStringTokenChecked:eE.isStringTokenChecked},r={};try{for(let[n,o]of Object.entries(e)){if("router_timing"===n){r[n]=eR(o,{...t,isNested:!0,isTrustedSubtree:!0});continue}let e=function(e,t){let r=ey(e);return"unlisted"===r?t.unlistedFieldScrubber(e):eA[r]}(n,eE);void 0!==e&&(r[n]=e(o,t))}}catch{return{hipaa_scrub_failed:!0}}return r},"z",0,function(e){let t=e.search(/[{[]/);return eI(-1===t?e:e.slice(0,t)+em)},"s",0,function(e){if(void 0===e.stack)return{message:em};let t=e.stack.indexOf("\n"),r=-1===t?"":e.stack.slice(t+1);return{message:em,stack:`${em} ${r}`}}],384658),e.s(["f",0,function(){return r?.()}],245997);let ek=["error","warn","info","verbose","debug"];e.s(["b",0,ek,"S",0,function(e,t){let r=Number.parseInt(e,10);return void 0!==ek[r]&&ek.indexOf(t)<=r}],419728)},371492,e=>{"use strict";e.s(["f",0,"57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9"])},167182,(e,t,r)=>{var n={872:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,i=u(e),a=i[0],s=i[1],f=new o((a+s)*3/4-s),l=0,c=s>0?a-4:a;for(r=0;r>16&255,f[l++]=t>>8&255,f[l++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[l++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[l++]=t>>8&255,f[l++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,a,a+16383>s?s:a+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="u">typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},230:function(e,t,r){"use strict";var n=r(872),o=r(321),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!s.isEncoding(o))throw TypeError("Unknown encoding: "+o);var i=0|d(n,o),u=a(i),f=u.write(n,o);return f!==i&&(u=u.slice(0,f)),u}if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(L(e,SharedArrayBuffer)||e&&L(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLengthtypeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return f(e),a(e<0?0:0|p(e))}function c(e){for(var t=e.length<0?0:0|p(e.length),r=a(t),n=0;ntypeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(f(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},s.allocUnsafe=function(e){return l(e)},s.allocUnsafeSlow=function(e){return l(e)};function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(e).length;default:if(o)return n?-1:I(e).length;t=(""+t).toLowerCase(),o=!0}}function h(e,t,r){var o,i,a,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(o)return -1;else r=e.length-1;else if(r<0)if(!o)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(o)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return y(e,[t],r,n,o)}throw TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){var i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,u/=2,r/=2}function f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){for(var c=!0,p=0;pr&&(e+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,o){if(L(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,a=r-t,u=Math.min(i,a),f=this.slice(n,o),l=e.slice(t,r),c=0;c239?4:f>223?3:f>191?2:1;if(o+c<=r)switch(c){case 1:f<128&&(l=f);break;case 2:(192&(i=e[o+1]))==128&&(u=(31&f)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],(192&i)==128&&(192&a)==128&&(u=(15&f)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],(192&i)==128&&(192&a)==128&&(192&s)==128&&(u=(15&f)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=c}var p=n,d=p.length;if(d<=4096)return String.fromCharCode.apply(String,p);for(var h="",g=0;gr)throw RangeError("Trying to access beyond buffer length")}function b(e,t,r,n,o,i){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw RangeError("Index out of range")}function S(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function w(e,t,r,n,i){return t*=1,r>>>=0,i||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,i){return t*=1,r>>>=0,i||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,i,a,s,u,f,l,c,p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var a=0;a>8,o.push(r%256),o.push(n);return o}(e,this.length-l),this,l,c);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||m(e,t,this.length);for(var n=this[e],o=1,i=0;++i>>=0,t>>>=0,r||m(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||m(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||m(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||m(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||m(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||m(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return(e>>>=0,t||m(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||m(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||m(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||m(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||m(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||m(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||m(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||m(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||m(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;b(this,e,t,r,o,0)}var i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;b(this,e,t,r,o,0)}var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var o=Math.pow(2,8*r-1);b(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>>=0,!n){var o=Math.pow(2,8*r-1);b(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||b(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return w(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return w(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var o,i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!o){if(r>56319||a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function x(e){for(var t=[],r=0;r=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var C=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},321:function(e,t){t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<>1,l=-7,c=r?o-1:0,p=r?-1:1,d=e[t+c];for(c+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+e[t+c],c+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+c],c+=p,l-=8);if(0===i)i=1-f;else{if(i===u)return a?0/0:(d?-1:1)*2e308;a+=Math.pow(2,n),i-=f}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,f=8*i-o-1,l=(1<>1,p=5960464477539062e-23*(23===o),d=n?0:i-1,h=n?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||1/0===t?(s=+!!isNaN(t),a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+c>=1?t+=p/u:t+=p*Math.pow(2,1-c),t*u>=2&&(a++,u/=2),a+c>=l?(s=0,a=l):a+c>=1?(s=(t*u-1)*Math.pow(2,o),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,o),a=0));o>=8;e[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;e[r+d]=255&a,d+=h,a/=256,f-=8);e[r+d-h]|=128*g}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},a=!0;try{n[e](r,r.exports,i),a=!1}finally{a&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.bun/next@16.4.5+16ef70e1eb34e847/node_modules/next/dist/compiled/buffer/",t.exports=i(230)},625025,e=>{"use strict";e.s(["S",0,function(e){return function(e,t){let r=Object.keys(e),n={};for(let o=0;o{let r=e[t];return{key:t,value:r}})},"i",0,function(e,t){let r=new Set(t);return Object.fromEntries(Object.entries(e).filter(([e])=>!r.has(e)))},"O",0,function(e,t){return Object.fromEntries(t.map(t=>[t,e[t]]))}])},647204,e=>{"use strict";let t=e=>({__kind:"OK",data:e}),r=e=>({__kind:"ERR",error:e});function n(e){return"ERR"===e.__kind}let o=(e,t)=>n(e)?t:e.data;function i(e){try{let n=e();if(n instanceof Promise||null!==n&&("object"==typeof n||"function"==typeof n)&&"then"in n&&"function"==typeof n.then)return n.then(t).catch(r);return t(n)}catch(e){return r(e)}}let a=async e=>i(()=>Promise.all(e));e.s(["c",0,function(e){let r=e.find(n);return r||t(e.map(e=>e.data))},"Y",0,r,"V",0,n,"C",0,e=>"OK"===e.__kind,"N",0,t,"u",0,e=>{if(n(e))throw Error("string"==typeof e.error?e.error:(e=>{try{return JSON.stringify(e)}catch{return`Not stringifiable: ${e}`}})(e.error));return e.data},"s",0,o,"F",0,e=>o(e,void 0),"$",0,i,"J",0,a])},622561,e=>{"use strict";let t=e=>{try{return JSON.stringify(e)??String(e)}catch{return`Not stringifiable: ${r(e)}`}};function r(e){try{return String(e)}catch{return typeof e}}e.s(["b",0,e=>e instanceof Error,"H",0,e=>"object"==typeof e&&null!==e&&"message"in e,"p",0,r,"A",0,e=>"string"==typeof e?e:e instanceof Error?e.message||e.name:t(e),"O",0,t])},427150,e=>{"use strict";e.s(["f",0,function(e){return null!=e}])},988590,e=>{"use strict";function t(e){return Array.isArray(e)?e:Object.values(e)}function r(e,r){var n;return n=t(r),n.includes(e)}function n(e){return new Set(t(e))}e.s(["q",0,r,"a",0,function(e,t){return null===e||r(e,t)},"v",0,function(e){let r=new Map;for(let n of t(e)){let e=n.toLowerCase();r.has(e)||r.set(e,n)}return r},"b",0,function(e){let t=n(e);return e=>("string"==typeof e||"number"==typeof e)&&t.has(e)},"x",0,n])},368174,e=>{"use strict";e.s(["f",0,function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}])},67089,e=>{"use strict";let t,r;var n=e.i(169798),o=e.i(427150),i=e.i(30012),a=e.i(495644),s=e.i(615416),u=e.i(116398),f=e.i(61282),l=e.i(920747),c=e.i(384658),p=e.i(245997),d=e.i(419728),h=e.i(371492);let g=`rt-${((e=21)=>{let t="",r=0|e;for(;r-- >0;)t+=h.f[64*Math.random()|0];return t})()}`,_={error:"ERROR",warn:"WARNING",info:"INFO",verbose:"DEBUG",debug:"DEBUG"};function y(e){return t=>globalThis.window?t:e+t+"\x1b[0m"}let v={error:y("\x1b[38;5;196m"),info:y("\x1b[38;5;69m"),warn:y("\x1b[38;5;208m"),verbose:y("\x1b[38;5;226m"),debug:y("\x1b[95m")},m=e=>!(0,l.f)()&&((0,i.M)(),(0,d.S)("3",e)),b=({level:e,message:r,extra:f,error:l,isLogContextIncluded:c})=>{m(e)&&function({level:e,message:r,extra:f,error:l,isLogContextIncluded:c}){let h=u.f.getActiveSpan()?.spanContext(),y=h?{...h,sampled:(h.traceFlags&a.f.SAMPLED)!=0}:void 0,m=h&&(0,s.e)(h)?{trace_id:h.traceId,span_id:h.spanId}:void 0,b="verbose"===e?console.log:console[e],S=c?void 0:(0,p.f)(),w=S||f?{...S,...f}:void 0,A=!!n.default.env.K_SERVICE;if((0,i.C)()||A)return b(JSON.stringify({message:r,extra:{...w,runtime_id:g},error:l,level:e,...A?{severity:_[e]}:{},otelSpanContext:y,...m}));!function({level:e,message:r,extra:n,error:a},s){let u,f="verbose"===e?console.log:console[e],{color:l,prefix:c}=(u=!(0,i.C)(),Object.fromEntries(d.b.map((e,t)=>[e,{priority:t,prefix:`[${e[0].toUpperCase()}]`,color:u?v[e]:e=>e}])))[e];f.apply(console,[l(c),l(r),n,a?function(e){if("string"!=typeof e||!e)return;let t=e.indexOf("\n");return e.substring(t)}(a.stack):null].filter(o.f)),t?.({level:e,message:r,extra:n??void 0,error:a,timestampMs:Date.now(),traceId:s?.trace_id,spanId:s?.span_id})}({level:e,message:r,extra:w,error:l},m)}({level:e,message:r,extra:f,error:l,isLogContextIncluded:c})},S={hipaa_strict_scrubber_missing:!0};function w(e){return(0,i.K)()?{extra:void 0===r?S:A(e,r),isLogContextIncluded:!0}:{extra:A(e,c.L)}}function A(e,t){let r=(0,p.f)();return r?t({...r,...e}):e?t(e):e}let E=(e,t)=>{!(0,i.C)()&&m("debug")&&b({level:"debug",message:(0,c.z)(e),...w(t)})},I=(e,t)=>{if((0,i.C)()||!m("verbose"))return;let[r,n]="function"==typeof e?e():[e],o=n||t?{...n,...t}:void 0;b({level:"verbose",message:(0,c.z)(r),...w(o)})},x=(e,t)=>{m("warn")&&b({level:"warn",message:(0,c.z)(e),...w(t)})},R=(e,t)=>{m("info")&&b({level:"info",message:(0,c.z)(e),...w(t)})},k=(e,t)=>{if(!m("error"))return;let r=U(U(Error().stack)),n=(0,c.z)(e);b({level:"error",message:n,...w(t),error:{message:n,stack:r}})},L=(e,t)=>{(0,i.C)()||b({level:"debug",message:e,extra:t})},C=(e,t)=>{if((0,i.C)())return;let[r,n]="function"==typeof e?e():[e];b({level:"verbose",message:r,extra:(n||t)&&{...n,...t}})},O=(e,t)=>b({level:"warn",message:e,extra:t}),T=(e,t)=>b({level:"info",message:e,extra:t}),B=(e,t)=>{b({level:"error",message:e,extra:t,error:{message:e,stack:U(Error().stack)}})},P=!1;function N(){!P&&(P=!0,(0,i.K)()&&M({dLog:E,vLog:I,wLog:x,iLog:R,eLog:k}))}let M=e=>{P=!0,e.dLog&&(L=e.dLog),e.vLog&&(C=e.vLog),e.wLog&&(O=e.wLog),e.iLog&&(T=e.iLog),e.eLog&&(B=e.eLog)};function U(e){if("string"!=typeof e||!e)return;let t=e.indexOf("\n"),r=e.indexOf("\n",t+1);return e.substring(0,t+1)+e.substring(r+1)}e.s(["j",0,(e,t)=>{N(),((0,f.k)()?E:L)(e,t)},"s",0,(e,t)=>{N(),((0,f.k)()?k:B)(e,t)},"r",0,(e,t)=>{N(),((0,f.k)()?R:T)(e,t)},"t",0,b,"_",0,w,"o",0,(e,t)=>{N(),((0,f.k)()?I:C)(e,t)},"L",0,(e,t)=>{N(),((0,f.k)()?x:O)(e,t)}],67089)},30012,e=>{"use strict";let t;var r=e.i(169798),n=e.i(647204),o=e.i(427150);let i=["production","development","staging","test"];function a(){return t||(t=function(){let e=r.default.env,t=(e=>{let t,r,a=[],s=e.OR_ENV;if((0,o.f)(s))if("string"!=typeof s)a.push(`OR_ENV: expected string, received ${typeof s}`);else i.some(e=>e===s)?t=s:a.push(`OR_ENV: expected one of ${i.join(" | ")}, received "${s}"`);else t=s;let u=e.LOG_LEVEL,f="2";void 0!==u&&("string"!=typeof u?a.push(`LOG_LEVEL: expected string, received ${typeof u}`):Number.isInteger(Number.parseInt(u,10))?f=u:a.push("LOG_LEVEL must parse as an integer"));let l=e.CI,c=!1;void 0!==l&&("string"!=typeof l?a.push(`CI: expected string, received ${typeof l}`):c=!!l);let p=e.IS_HIPAA_WORKER,d=!1;void 0!==p&&("boolean"==typeof p?d=p:"string"!=typeof p?a.push(`IS_HIPAA_WORKER: expected string or boolean, received ${typeof p}`):d="true"===p);let h=e.SERVICE_NAME;return(void 0!==h&&("string"!=typeof h?a.push(`SERVICE_NAME: expected string, received ${typeof h}`):r=h),a.length>0)?(0,n.Y)(a):(0,n.N)({OR_ENV:t,LOG_LEVEL:f,CI:c,IS_HIPAA_WORKER:d,SERVICE_NAME:r})})(e);if((0,n.V)(t)){let r=t.error.join("; ");throw Error(`Core ENV validation failed: ${r}. Source keys: ${Object.keys(e).join(", ")}`)}return t.data}()),t}e.s(["M",0,a,"T",0,function(){return!1},"K",0,function(){return a().IS_HIPAA_WORKER},"C",0,function(){return!0}],30012)},577980,342837,434,e=>{"use strict";let t={S100_Continue:100,S101_Switching_Protocols:101,S102_Processing:102,S200_OK:200,S201_Created:201,S202_Accepted:202,S203_Non_Authoritative_Information:203,S204_No_Content:204,S205_Reset_Content:205,S206_Partial_Content:206,S207_Multi_Status:207,S208_Already_Reported:208,S300_Multiple_Choices:300,S301_Moved_Permanently:301,S302_Found:302,S303_See_Other:303,S304_Not_Modified:304,S305_Use_Proxy:305,S307_Temporary_Redirect:307,S308_Permanent_Redirect:308,S400_Bad_Request:400,S401_Unauthorized:401,S402_Payment_Required:402,S403_Forbidden:403,S404_Not_Found:404,S405_Method_Not_Allowed:405,S406_Not_Acceptable:406,S407_Proxy_Authentication_Required:407,S408_Request_Timeout:408,S409_Conflict:409,S410_Gone:410,S411_Length_Required:411,S412_Precondition_Failed:412,S413_Payload_Too_Large:413,S414_URI_Too_Long:414,S415_Unsupported_Media_Type:415,S416_Range_Not_Satisfiable:416,S417_Expectation_Failed:417,S418_Im_a_teapot:418,S421_Misdirected_Request:421,S422_Unprocessable_Entity:422,S423_Locked:423,S424_Failed_Dependency:424,S425_Too_Early:425,S426_Upgrade_Required:426,S428_Precondition_Required:428,S429_Too_Many_Requests:429,S431_Request_Header_Fields_Too_Large:431,S451_Unavailable_For_Legal_Reasons:451,S498_Invalid_Token:498,S499_Client_Closed_Request:499,S500_Internal_Server_Error:500,S501_Not_Implemented:501,S502_Bad_Gateway:502,S503_Service_Unavailable:503,S504_Gateway_Timeout:504,S505_HTTP_Version_Not_Supported:505,S506_Variant_Also_Negotiates:506,S507_Insufficient_Storage:507,S508_Loop_Detected:508,S510_Not_Extended:510,S511_Network_Authentication_Required:511,S520_Web_Server_Returned_Unknown_Error:520,S521_Web_Server_Is_Down:521,S522_Connection_Timed_Out:522,S523_Origin_Unreachable:523,S524_A_Timeout_Occurred:524,S525_SSL_Handshake_Failed:525,S526_Invalid_SSL_Certificate:526,S529_Overloaded:529,S530_Origin_DNS_Error:530};t.S520_Web_Server_Returned_Unknown_Error,t.S521_Web_Server_Is_Down,t.S522_Connection_Timed_Out,t.S523_Origin_Unreachable,t.S525_SSL_Handshake_Failed,t.S526_Invalid_SSL_Certificate,t.S530_Origin_DNS_Error;let r=Object.entries(t).reduce((e,[t,r])=>{let n=t.split("_").slice(1).join(" ");return e[r]=n,e},{});e.s(["g",0,t,"e",0,r],342837),e.i(988590);let n={ContextLengthExceeded:"context_length_exceeded",MaxTokensExceeded:"max_tokens_exceeded",TokenLimitExceeded:"token_limit_exceeded",StringTooLong:"string_too_long",Authentication:"authentication",PermissionDenied:"permission_denied",PaymentRequired:"payment_required",RateLimitExceeded:"rate_limit_exceeded",ProviderOverloaded:"provider_overloaded",ProviderUnavailable:"provider_unavailable",InvalidRequest:"invalid_request",InvalidPrompt:"invalid_prompt",NotFound:"not_found",PreconditionFailed:"precondition_failed",PayloadTooLarge:"payload_too_large",Unprocessable:"unprocessable",ContentPolicyViolation:"content_policy_violation",Refusal:"refusal",InvalidImage:"invalid_image",ImageTooLarge:"image_too_large",ImageTooSmall:"image_too_small",UnsupportedImageFormat:"unsupported_image_format",ImageNotFound:"image_not_found",ImageDownloadFailed:"image_download_failed",Server:"server",Timeout:"timeout",Unmapped:"unmapped"},o={Refusal:n.Refusal,ContentPolicyViolation:n.ContentPolicyViolation},i={[n.ContextLengthExceeded]:t.S400_Bad_Request,[n.MaxTokensExceeded]:t.S400_Bad_Request,[n.TokenLimitExceeded]:t.S400_Bad_Request,[n.StringTooLong]:t.S400_Bad_Request,[n.Authentication]:t.S401_Unauthorized,[n.PermissionDenied]:t.S403_Forbidden,[n.PaymentRequired]:t.S402_Payment_Required,[n.RateLimitExceeded]:t.S429_Too_Many_Requests,[n.ProviderOverloaded]:t.S503_Service_Unavailable,[n.ProviderUnavailable]:t.S502_Bad_Gateway,[n.InvalidRequest]:t.S400_Bad_Request,[n.InvalidPrompt]:t.S400_Bad_Request,[n.NotFound]:t.S404_Not_Found,[n.PreconditionFailed]:t.S412_Precondition_Failed,[n.PayloadTooLarge]:t.S413_Payload_Too_Large,[n.Unprocessable]:t.S422_Unprocessable_Entity,[n.ContentPolicyViolation]:t.S403_Forbidden,[n.Refusal]:t.S403_Forbidden,[n.InvalidImage]:t.S400_Bad_Request,[n.ImageTooLarge]:t.S400_Bad_Request,[n.ImageTooSmall]:t.S400_Bad_Request,[n.UnsupportedImageFormat]:t.S400_Bad_Request,[n.ImageNotFound]:t.S404_Not_Found,[n.ImageDownloadFailed]:t.S400_Bad_Request,[n.Server]:t.S500_Internal_Server_Error,[n.Timeout]:t.S504_Gateway_Timeout,[n.Unmapped]:t.S500_Internal_Server_Error};e.s(["O",0,n,"c",0,i,"A",0,o],577980),e.s(["f",0,{Cyber:"cyber",Bio:"bio",FrontierLlm:"frontier_llm",ReasoningExtraction:"reasoning_extraction",GeneralHarms:"general_harms",None:"none",Other:"other"}],434)},549692,e=>{"use strict";var t=e.i(625025),r=e.i(342837),n=e.i(647204),o=e.i(622561),i=e.i(427150),a=e.i(882844),s=e.i(635157),u=e.i(577980),f=e.i(434);let l=s.z.record(s.z.string(),s.z.unknown()).and(s.z.object({provider_error_code:s.z.string().optional(),refusal_category:s.z.nativeEnum(f.f).optional()})),c=s.z.object({status:s.z.enum(r.g).nullable(),errorType:s.z.enum(u.O).optional(),message:s.z.string().optional(),location:s.z.string().nullish(),stack:s.z.string().nullish(),user:s.z.object({entityId:s.z.string()}).nullish(),metadata:l.nullish(),debug:s.z.record(s.z.string(),s.z.unknown()).nullish(),internal:s.z.record(s.z.string(),s.z.unknown()).nullish(),routerMetadata:s.z.record(s.z.string(),s.z.unknown()).nullish()}),p=s.z.object({id:s.z.string().optional(),error:s.z.object({code:s.z.enum(r.g),message:s.z.string(),metadata:s.z.record(s.z.string(),s.z.unknown()).nullish()}),user_id:s.z.string().nullish(),openrouter_metadata:s.z.record(s.z.string(),s.z.unknown()).nullish()}).openapi("ErrorResponse",{description:"Error response",example:{error:{code:400,message:"Invalid request parameters",metadata:{field:"temperature",reason:"Must be between 0 and 2"}},user_id:"user-abc123"}}),d=(0,a.j)(p),h=(0,a.j)(c),g=({error:{message:e,code:t,metadata:r},openrouter_metadata:n,location:o})=>({message:e,status:t,metadata:r,location:o,routerMetadata:n});function _({metadata:e,internal:r,debug:n,user:a,routerMetadata:s,errorType:u,...f}){let{location:l,rawError:c,status:p=null}=f,y=function(e,r,n){if(d(r)){let t=g(r);return(0,i.f)(e)?{...t,location:e}:t}if(h(r))return(0,i.f)(e)?{...r,location:e,status:n??r.status}:{...r,status:n??r.status};let a=(0,o.b)(r)?r:Error("string"==typeof r?r:(0,o.O)(r));return(0,t.S)({status:n,location:e,message:a.message,stack:a.stack,debug:{cause:a.cause}})}(l,c,p),v=s??y.routerMetadata;return(0,t.S)({...y,errorType:u??y.errorType,metadata:{...y.metadata,...e},internal:{...y.internal,...r},debug:{...y.debug,...n},user:a?(0,t.O)(a,["entityId"]):void 0,...v?{routerMetadata:v}:{}})}let y=["file_annotations","alignment"];function v(e){return e.message?e.message:null===e.status?"Unhandled Error":r.e[e.status]}e.s(["g",0,"clientStreamCancellationRelated","k",0,p,"N",0,c,"s",0,"isContentModerated","M",0,"isFinalizeFailurePermanent","Y",0,"isErrorUpstreamFault","h",0,"adapter: ","O",0,function(e){return(0,n.Y)(_(e))},"Z",0,v,"w",0,d,"A",0,h,"n",0,_,"P",0,"moderation: ","G",0,(e,n)=>{let o=e.status||r.g.S500_Internal_Server_Error,a=o===r.g.S500_Internal_Server_Error,s=a?v({status:o}):v(e),u=a?(0,t.S)({message:s,code:o,metadata:function(e){if(!e)return;let t=Object.fromEntries(y.flatMap(t=>(0,i.f)(e[t])?[[t,e[t]]]:[]));return Object.keys(t).length>0?t:void 0}(e.metadata)}):(0,t.S)({message:s,code:o,metadata:Object.keys(e.metadata??{}).length?e.metadata:void 0}),f=!a&&e.routerMetadata&&Object.keys(e.routerMetadata).length>0?e.routerMetadata:void 0;return(0,t.S)({id:n,error:u,user_id:e.user?.entityId,openrouter_metadata:f})},"o",0,g,"p",0,"Unknown Error"])},771271,e=>{"use strict";var t=e.i(988590);let r={AnyScale:"AnyScale",Atoma:"Atoma",CentML:"Cent-ML",CrofAI:"CrofAI",Enfer:"Enfer",GoPomelo:"GoPomelo",HuggingFace:"HuggingFace",Hyperbolic:"Hyperbolic",HyperbolicQuantized:"Hyperbolic 2",InoCloud:"InoCloud",Kluster:"Kluster",Lambda:"Lambda",Lepton:"Lepton",Lynn:"Lynn 2",LynnPrivate:"Lynn",Mancer:"Mancer",Modal:"Modal",NCompass:"NCompass",Nineteen:"Nineteen",OctoAI:"OctoAI",Recursal:"Recursal",Reflection:"Reflection",Replicate:"Replicate",SambaNovaCloaked:"SambaNova 2",SFCompute:"SF Compute",Targon:"Targon",TogetherLite:"Together 2",Ubicloud:"Ubicloud",ZeroOneAI:"01.AI",AkashML:"AkashML",AI21:"AI21",AionLabs:"AionLabs",Alibaba:"Alibaba",Ambient:"Ambient",AntDigital:"Ant Digital",Baidu:"Baidu",AmazonBedrock:"Amazon Bedrock",AmazonNova:"Amazon Nova",Anthropic:"Anthropic",ArceeAI:"Arcee AI",AssemblyAI:"AssemblyAI",AtlasCloud:"AtlasCloud",Avian:"Avian",Azure:"Azure",Baseten:"BaseTen",BytePlus:"BytePlus",BlackForestLabs:"Black Forest Labs",Cerebras:"Cerebras",Chutes:"Chutes",Cirrascale:"Cirrascale",ClaudeOnAws:"Claude Platform on AWS",Clarifai:"Clarifai",Cloudflare:"Cloudflare",Cohere:"Cohere",CoreWeave:"CoreWeave",Cosine:"Cosine",Crucible:"Crucible",Crusoe:"Crusoe",Darkbloom:"Darkbloom",Databricks:"Databricks",Decart:"Decart",Deepgram:"Deepgram",DeepInfra:"DeepInfra",DeepSeek:"DeepSeek",DekaLLM:"DekaLLM",DigitalOcean:"DigitalOcean",ElevenLabs:"ElevenLabs",Featherless:"Featherless",Fireworks:"Fireworks",FishAudio:"Fish Audio",Friendli:"Friendli",GMICloud:"GMICloud",Google:"Google",GoogleAIStudio:"Google AI Studio",Groq:"Groq",HeyGen:"HeyGen",Inception:"Inception",Inceptron:"Inceptron",InferenceNet:"InferenceNet",Ionstream:"Ionstream",Infermatic:"Infermatic",IONet:"Io Net",InferactVLLM:"Inferact vLLM",Inflection:"Inflection",KT:"KT",Liquid:"Liquid",Makora:"Makora",Mara:"Mara",MancerPrivate:"Mancer 2",Meta:"Meta",Minimax:"Minimax",ModelRun:"ModelRun",Mistral:"Mistral",Modular:"Modular",MoonshotAI:"Moonshot AI",Morph:"Morph",VoyageAI:"VoyageAI by MongoDB",TypeSafe:"TypeSafe",NearAI:"Near AI",Nebius:"Nebius",NexAGI:"Nex AGI",NextBit:"NextBit",Novita:"Novita",Nvidia:"Nvidia",Ollama:"Ollama",OpenAI:"OpenAI",OpenInference:"OpenInference",Parallel:"Parallel",Parasail:"Parasail",ParetoAlpha:"ParetoAlpha",ParticleAI:"Particle AI",PearlResearch:"Pearl Research",Poolside:"Poolside",PrimaLabs:"PrimaLabs",PrimeIntellect:"PrimeIntellect",Perceptron:"Perceptron",Perplexity:"Perplexity",Phala:"Phala",Recraft:"Recraft",Recursive:"Recursive",Reka:"Reka",Relace:"Relace",Respan:"Respan",River:"River",SailResearch:"Sail Research",SakanaAI:"Sakana AI",SambaNova:"SambaNova",ScaleDown:"ScaleDown",Seed:"Seed",SiliconFlow:"SiliconFlow",Sourceful:"Sourceful",Speechify:"Speechify",StepFun:"StepFun",Stealth:"Stealth",StreamLake:"StreamLake",Switchpoint:"Switchpoint",Tencent:"Tencent",Tenstorrent:"Tenstorrent",ThinkingMachines:"Thinking Machines",Together:"Together",Unbiased:"Unbiased",Upstage:"Upstage",Venice:"Venice",Wafer:"Wafer",WandB:"WandB",Quiver:"Quiver",Krea:"Krea",Runway:"Runway",Xiaomi:"Xiaomi",XAI:"xAI",ZAI:"Z.AI",FakeProvider:"FakeProvider"},n=(0,t.x)(r),o=(0,t.v)(r);e.s(["g",0,o,"R",0,r,"Z",0,function(e){return n.has(e)}])}]); //# sourceMappingURL=0mmmidh1h1u25.js.map