PageSourceSearch

https://mubert.ai/_next/static/chunks/4502-8a3b9e83aaf4311e.js?dpl=dpl_D5mUv3UjadX3vBWc27i3FQFR3X9R

js mubert.ai collected 2026-10-05 12:53:32 UTC 49,789 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4502],{5831:t=>{class e{constructor(t,e,r=null){this.owner=t,this.name=e,this.version=r}static parse(t){let r=t.match(/^(?<owner>[^/]+)\/(?<name>[^/:]+)(:(?<version>.+))?$/);if(!r)throw Error(`Invalid reference to model version: ${t}. Expected format: owner/name or owner/name:version`);let{owner:n,name:i,version:o}=r.groups;return new e(n,i,o)}}t.exports=e},10419:(t,e,r)=>{var n=r(10742).hp;t.exports={create:async function(t,e={},{signal:r}={}){let i,o,s=new FormData;if(t instanceof Blob)i=t.name||`blob_${Date.now()}`,o=t;else if(n.isBuffer(t))i=`buffer_${Date.now()}`,o=new Blob([new Uint8Array(t)],{type:"application/octet-stream",name:i});else throw Error("Invalid file argument, must be a Blob, File or Buffer");return s.append("content",o,i),s.append("metadata",new Blob([JSON.stringify(e)],{type:"application/json"})),(await this.request("/files",{method:"POST",data:s,headers:{"Content-Type":"multipart/form-data"},signal:r})).json()},list:async function({signal:t}={}){return(await this.request("/files",{method:"GET",signal:t})).json()},get:async function(t,{signal:e}={}){return(await this.request(`/files/${t}`,{method:"GET",signal:e})).json()},delete:async function(t,{signal:e}={}){return 204===(await this.request(`/files/${t}`,{method:"DELETE",signal:e})).status}}},10742:(t,e,r)=>{"use strict";let n=r(18446),i=r(78047),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return f(t,e,r)}function f(t,e,r){if("string"==typeof t){var n=t,i=e;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);let r=0|d(n,i),o=s(r),f=o.write(n,i);return f!==r&&(o=o.slice(0,f)),o}if(ArrayBuffer.isView(t)){var o=t;if(C(o,Uint8Array)){let t=new Uint8Array(o);return c(t.buffer,t.byteOffset,t.byteLength)}return h(o)}if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(C(t,ArrayBuffer)||t&&C(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(C(t,SharedArrayBuffer)||t&&C(t.buffer,SharedArrayBuffer)))return c(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let f=t.valueOf&&t.valueOf();if(null!=f&&f!==t)return a.from(f,e,r);let u=function(t){if(a.isBuffer(t)){let e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return u(t),s(t<0?0:0|p(t))}function h(t){let e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function c(t,e,r){let n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),a.prototype),n}function p(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(t).length;default:if(i)return n?-1:L(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;
vendor: 17,645 bytes, line 1
1++n)i+=N[t[n]];return i}(this,e,r);case"utf8":case"utf-8":return m(this,e,r);case"ascii":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":var o,s,a;return o=this,s=e,a=r,0===s&&a===o.length?n.fromByteArray(o):n.fromByteArray(o.slice(s,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}(this,e,r);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(i)return -1;else r=t.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return b(t,[e],r,n,i)}throw TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,a/=2,f/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===f)return n*s}else -1!==n&&(o-=o-n),n=-1}else for(r+f>a&&(r=a-f),o=r;o>=0;o--){let r=!0;for(let n=0;n<f;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return -1}function m(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,f;switch(s){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(f=(31&e)<<6|63&r)>127&&(o=f);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(f=(15&e)<<12|(63&r)<<6|63&n)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],(192&r)==128&&(192&n)==128&&(192&a)==128&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}var o=n;let s=o.length;if(s<=4096)return String.fromCharCode.apply(String,o);let a="",f=0;for(;f<s;)a+=String.fromCharCode.apply(String,o.slice(f,f+=4096));return a}function E(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function v(t,e,r,n,i,o){if(!a.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function B(t,e,r,n,i){j(e,n,i,t,r,7);let o=Number(e&BigInt(0xffffffff));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function A(t,e,r,n,i){j(e,n,i,t,r,7);let o=Number(e&BigInt(0xffffffff));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(0xffffffff));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function x(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function I(t,e,r,n,o){return e*=1,r>>>=0,o||x(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function T(t,e,r,n,o){return e*=1,r>>>=0,o||x(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.hp=a,e.IS=50,a.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof 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(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return f(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return(u(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(C(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),C(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:+(n<r)},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){let r;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;let n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(C(e,Uint8Array))i+e.length>n.length?(a.isBuffer(e)||(e=a.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(a.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},a.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},a.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},a.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?m(this,0,t):y.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){let t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if(C(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,s=r-e,f=Math.min(o,s),u=this.slice(n,i),l=t.slice(e,r);for(let t=0;t<f;++t)if(u[t]!==l[t]){o=u[t],s=l[t];break}return o<s?-1:+(s<o)},a.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return w(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return w(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){var i,o,s,a,f,u,l,h;if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=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");let c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let p=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let s=e.length;for(n>s/2&&(n=s/2),i=0;i<n;++i){var a;let n=parseInt(e.substr(2*i,2),16);if((a=n)!=a)break;t[r+i]=n}return i}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,q(L(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=e,a=r,q(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,s,a);case"base64":return f=e,u=r,q(P(t),this,f,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,h=r,q(function(t,e){let r,n,i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,h);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readBigUInt64LE=M(function(t){$(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&k(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+0x1000000*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+0x1000000*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),a.prototype.readBigUInt64BE=M(function(t){$(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&k(t,this.length-8);let n=0x1000000*e+65536*this[++t]+256*this[++t]+this[++t],i=0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return(t>>>=0,e||E(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readBigInt64LE=M(function(t){$(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&k(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+0x1000000*this[++t])}),a.prototype.readBigInt64BE=M(function(t){$(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&k(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(0x1000000*this[++t]+65536*this[++t]+256*this[++t]+r)}),a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;v(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;v(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigUInt64LE=M(function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=M(function(t,e=0){return A(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e>>>=0,!n){let n=Math.pow(2,8*r-1);v(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e>>>=0,!n){let n=Math.pow(2,8*r-1);v(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||v(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigInt64LE=M(function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=M(function(t,e=0){return A(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return T(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return T(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},a.prototype.fill=function(t,e,r,n){let i;if("string"==typeof t){if("string"==typeof e?(n=e,e=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&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=a.isBuffer(t)?t:a.from(t,n),s=o.length;
1if(0===s)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};let U={};function R(t,e,r){U[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function O(t){let e="",r=t.length,n=+("-"===t[0]);for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function j(t,e,r,n,i,o){if(t>r||t<e){let n,i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new U.ERR_OUT_OF_RANGE("value",n,t)}$(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&k(i,n.length-(o+1))}function $(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function k(t,e,r){if(Math.floor(t)!==t)throw $(t,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${e}`,t)}R("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),R("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),R("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=O(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=O(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let S=/[^+/0-9A-Za-z-_]/g;function L(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function P(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(S,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function C(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let N=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function M(t){return"undefined"==typeof BigInt?_:t}function _(){throw Error("BigInt not supported")}},14594:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n=(0,r(52715).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},15751:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n=(0,r(52715).A)("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]])},17449:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n=(0,r(52715).A)("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]])},18446:(t,e)=>{"use strict";e.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,o=f(t),s=o[0],a=o[1],u=new i((s+a)*3/4-a),l=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>
14,u[l++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(function(t,e,n){for(var i,o=[],s=e;s<n;s+=3)i=(t[s]<<16&0xff0000)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(t,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function f(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},20342:(t,e,r)=>{let{transformFileInputs:n}=r(49988);t.exports={create:async function(t){let e,{model:r,version:i,input:o,wait:s,signal:a,...f}=t;if(f.webhook)try{new URL(f.webhook)}catch(t){throw Error("Invalid webhook URL")}let u={};if(s)if("number"==typeof s){let t=Math.max(1,Math.ceil(Number(s))||1);u.Prefer=`wait=${t}`}else u.Prefer="wait";if(i)e=await this.request("/predictions",{method:"POST",headers:u,data:{...f,input:await n(this,o,this.fileEncodingStrategy),version:i},signal:a});else if(r)e=await this.request(`/models/${r}/predictions`,{method:"POST",headers:u,data:{...f,input:await n(this,o,this.fileEncodingStrategy)},signal:a});else throw Error("Either model or version must be specified");return e.json()},get:async function(t,{signal:e}={}){return(await this.request(`/predictions/${t}`,{method:"GET",signal:e})).json()},cancel:async function(t,{signal:e}={}){return(await this.request(`/predictions/${t}/cancel`,{method:"POST",signal:e})).json()},list:async function({signal:t}={}){return(await this.request("/predictions",{method:"GET",signal:t})).json()}}},21534:t=>{"use strict";t.exports=JSON.parse('{"name":"replicate","version":"1.3.1","description":"JavaScript client for Replicate","repository":"github:replicate/replicate-javascript","homepage":"https://github.com/replicate/replicate-javascript#readme","bugs":"https://github.com/replicate/replicate-javascript/issues","license":"Apache-2.0","main":"index.js","type":"commonjs","types":"index.d.ts","files":["CONTRIBUTING.md","LICENSE","README.md","index.d.ts","index.js","lib/**/*.js","vendor/**/*","package.json"],"engines":{"node":">=18.0.0","npm":">=7.19.0","git":">=2.11.0","yarn":">=1.7.0"},"scripts":{"check":"tsc","format":"biome format . --write","lint-biome":"biome lint .","lint-publint":"publint","lint":"npm run lint-biome && npm run lint-publint","test":"jest"},"optionalDependencies":{"readable-stream":">=4.0.0"},"devDependencies":{"@biomejs/biome":"^1.4.1","@types/jest":"^29.5.3","@typescript-eslint/eslint-plugin":"^5.56.0","cross-fetch":"^3.1.5","jest":"^29.7.0","nock":"^14.0.0-beta.6","publint":"^0.2.7","ts-jest":"^29.1.0","typescript":"^5.0.2"}}')},23221:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n=(0,r(52715).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},23684:(t,e,r)=>{var n=r(55036);let i=r(54094),o=r(5831),{createReadableStream:s,createFileOutput:a}=r(84016),{transform:f,withAutomaticRetries:u,validateWebhook:l,parseProgressFromLogs:h,streamAsyncIterator:c}=r(49988),p=r(82808),d=r(25989),y=r(48428),g=r(10419),w=r(31236),b=r(80126),m=r(20342),E=r(36335),v=r(66682),B=r(21534);class A{constructor(t={}){this.auth=t.auth||(void 0!==n?n.env.REPLICATE_API_TOKEN:null),this.userAgent=t.userAgent||`replicate-javascript/${B.version}`,this.baseUrl=t.baseUrl||"https://api.replicate.com/v1",this.fetch=t.fetch||globalThis.fetch,this.fileEncodingStrategy=t.fileEncodingStrategy||"default",this.useFileOutput=!1!==t.useFileOutput,this.accounts={current:p.current.bind(this)},this.collections={list:d.list.bind(this),get:d.get.bind(this)},this.deployments={get:y.get.bind(this),create:y.create.bind(this),update:y.update.bind(this),delete:y.delete.bind(this),list:y.list.bind(this),predictions:{create:y.predictions.create.bind(this)}},this.files={create:g.create.bind(this),get:g.get.bind(this),list:g.list.bind(this),delete:g.delete.bind(this)},this.hardware={list:w.list.bind(this)},this.models={get:b.get.bind(this),list:b.list.bind(this),create:b.create.bind(this),versions:{list:b.versions.list.bind(this),get:b.versions.get.bind(this)},search:b.search.bind(this)},this.predictions={create:m.create.bind(this),get:m.get.bind(this),cancel:m.cancel.bind(this),list:m.list.bind(this)},this.trainings={create:E.create.bind(this),get:E.get.bind(this),cancel:E.cancel.bind(this),list:E.list.bind(this)},this.webhooks={default:{secret:{get:v.default.secret.get.bind(this)}}}}async run(t,e,r){let n,{wait:i={mode:"block"},signal:s,...u}=e,l=o.parse(t);
1if(l.version)n=await this.predictions.create({...u,version:l.version,wait:"block"===i.mode&&(i.timeout??!0)});else if(l.owner&&l.name)n=await this.predictions.create({...u,model:`${l.owner}/${l.name}`,wait:"block"===i.mode&&(i.timeout??!0)});else throw Error("Invalid model version identifier");if(r&&r(n),("block"!==i.mode||"starting"===n.status)&&(n=await this.wait(n,{interval:"poll"===i.mode?i.interval:void 0},async t=>(r&&r(t),!!s&&!!s.aborted))),s&&s.aborted&&(n=await this.predictions.cancel(n.id)),r&&r(n),"failed"===n.status)throw Error(`Prediction failed: ${n.error}`);return f(n.output,t=>"string"==typeof t&&(t.startsWith("https:")||t.startsWith("data:"))&&this.useFileOutput?a({url:t,fetch:this.fetch}):t)}async request(t,e){let r,n,{auth:o,baseUrl:s,userAgent:a}=this;r=t instanceof URL?t:new URL(t.startsWith("/")?t.slice(1):t,s.endsWith("/")?s:`${s}/`);let{method:f="GET",params:l={},data:h,signal:c}=e;for(let[t,e]of Object.entries(l))r.searchParams.append(t,e);let p={"Content-Type":"application/json","User-Agent":a};if(o&&(p.Authorization=`Bearer ${o}`),e.headers)for(let[t,r]of Object.entries(e.headers))p[t]=r;h instanceof FormData?(n=h,delete p["Content-Type"]):h&&(n=JSON.stringify(h));let d={method:f,headers:p,body:n,signal:c},y="GET"===f?t=>429===t.status||t.status>=500:t=>429===t.status,g=this.fetch,w=await u(async()=>g(r,d),{shouldRetry:y});if(!w.ok){let t=new Request(r,d),e=await w.text();throw new i(`Request to ${r} failed with status ${w.status} ${w.statusText}: ${e}.`,t,w)}return w}async *stream(t,e){let r,{wait:n,signal:i,...a}=e,f=o.parse(t);if(f.version)r=await this.predictions.create({...a,version:f.version});else if(f.owner&&f.name)r=await this.predictions.create({...a,model:`${f.owner}/${f.name}`});else throw Error("Invalid model version identifier");if(r.urls&&r.urls.stream){let t=s({url:r.urls.stream,fetch:this.fetch,...i?{options:{signal:i}}:{}});yield*c(t)}else throw Error("Prediction does not support streaming")}async *paginate(t,e={}){let r=await t();if(yield r.results,r.next&&!(e.signal&&e.signal.aborted)){let t=()=>this.request(r.next,{method:"GET",signal:e.signal}).then(t=>t.json());yield*this.paginate(t,e)}}async wait(t,e,r){let{id:n}=t;if(!n)throw Error("Invalid prediction");if("succeeded"===t.status||"failed"===t.status||"canceled"===t.status)return t;let i=t=>new Promise(e=>setTimeout(e,t)),o=e&&e.interval||500,s=await this.predictions.get(n);for(;"succeeded"!==s.status&&"failed"!==s.status&&"canceled"!==s.status&&(!r||await r(s)!==!0);)await i(o),s=await this.predictions.get(t.id);if("failed"===s.status)throw Error(`Prediction failed: ${s.error}`);return s}}t.exports=A,t.exports.validateWebhook=l,t.exports.parseProgressFromLogs=h},24568:(t,e,r)=>{"use strict";r.d(e,{bL:()=>B,zi:()=>A});var n=r(17336),i=r(37054),o=r(17201),s=r(14255),a=r(51510),f=r(13674),u=r(47330),l=r(83357),h=r(77812),c="Switch",[p,d]=(0,s.A)(c),[y,g]=p(c),w=n.forwardRef((t,e)=>{let{__scopeSwitch:r,name:s,checked:f,defaultChecked:u,required:p,disabled:d,value:g="on",onCheckedChange:w,form:b,...m}=t,[B,A]=n.useState(null),x=(0,o.s)(e,t=>A(t)),I=n.useRef(!1),T=!B||b||!!B.closest("form"),[U,R]=(0,a.i)({prop:f,defaultProp:null!=u&&u,onChange:w,caller:c});return(0,h.jsxs)(y,{scope:r,checked:U,disabled:d,children:[(0,h.jsx)(l.sG.button,{type:"button",role:"switch","aria-checked":U,"aria-required":p,"data-state":v(U),"data-disabled":d?"":void 0,disabled:d,value:g,...m,ref:x,onClick:(0,i.mK)(t.onClick,t=>{R(t=>!t),T&&(I.current=t.isPropagationStopped(),I.current||t.stopPropagation())})}),T&&(0,h.jsx)(E,{control:B,bubbles:!I.current,name:s,value:g,checked:U,required:p,disabled:d,form:b,style:{transform:"translateX(-100%)"}})]})});w.displayName=c;var b="SwitchThumb",m=n.forwardRef((t,e)=>{let{__scopeSwitch:r,...n}=t,i=g(b,r);return(0,h.jsx)(l.sG.span,{"data-state":v(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:e})});m.displayName=b;var E=n.forwardRef((t,e)=>{let{__scopeSwitch:r,control:i,checked:s,bubbles:a=!0,...l}=t,c=n.useRef(null),p=(0,o.s)(c,e),d=(0,f.Z)(s),y=(0,u.X)(i);return n.useEffect(()=>{let t=c.current;if(!t)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(d!==s&&e){let r=new Event("click",{bubbles:a});
1e.call(t,s),t.dispatchEvent(r)}},[d,s,a]),(0,h.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...l,tabIndex:-1,ref:p,style:{...l.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(t){return t?"checked":"unchecked"}E.displayName="SwitchBubbleInput";var B=w,A=m},25989:t=>{t.exports={get:async function(t,{signal:e}={}){return(await this.request(`/collections/${t}`,{method:"GET",signal:e})).json()},list:async function({signal:t}={}){return(await this.request("/collections",{method:"GET",signal:t})).json()}}},28385:t=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={};((t,r)=>{for(var n in r)e(t,n,{get:r[n],enumerable:!0})})(o,{EventSourceParserStream:()=>a}),t.exports=((t,o,s,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let f of n(o))i.call(t,f)||f===s||e(t,f,{get:()=>o[f],enumerable:!(a=r(o,f))||a.enumerable});return t})(e({},"__esModule",{value:!0}),o);var s=[239,187,191],a=class extends TransformStream{constructor(){let t;super({start(e){t=function(t){let e,r,n,i,o,a,f;return u(),{feed:function(u){var l;r=r?r+u:u,e&&(l=r,s.every((t,e)=>l.charCodeAt(e)===t))&&(r=r.slice(s.length)),e=!1;let h=r.length,c=0,p=!1;for(;c<h;){let e;p&&("\n"===r[c]&&++c,p=!1);let s=-1,u=i;for(let t=n;s<0&&t<h;++t)":"===(e=r[t])&&u<0?u=t-c:"\r"===e?(p=!0,s=t-c):"\n"===e&&(s=t-c);if(s<0){n=h-c,i=u;break}n=0,i=-1,function(e,r,n,i){if(0===i){f.length>0&&(t({type:"event",id:o,event:a||void 0,data:f.slice(0,-1)}),f="",o=void 0),a=void 0;return}let s=n<0,u=e.slice(r,r+(s?i:n)),l=0;l=s?i:" "===e[r+n+1]?n+2:n+1;let h=r+l,c=i-l,p=e.slice(h,h+c).toString();if("data"===u)f+=p?"".concat(p,"\n"):"\n";else if("event"===u)a=p;else if("id"!==u||p.includes("\0")){if("retry"===u){let e=parseInt(p,10);Number.isNaN(e)||t({type:"reconnect-interval",value:e})}}else o=p}(r,c,u,s),c+=s+1}c===h?r="":c>0&&(r=r.slice(c))},reset:u};function u(){e=!0,r="",n=0,i=-1,o=void 0,a=void 0,f=""}}(t=>{"event"===t.type&&e.enqueue(t)})},transform(e){t.feed(e)}})}}},29752:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n=(0,r(52715).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},31236:t=>{t.exports={list:async function({signal:t}={}){return(await this.request("/hardware",{method:"GET",signal:t})).json()}}},34956:t=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={};((t,r)=>{for(var n in r)e(t,n,{get:r[n],enumerable:!0})})(o,{TextDecoderStream:()=>u}),t.exports=((t,o,s,a)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let f of n(o))i.call(t,f)||f===s||e(t,f,{get:()=>o[f],enumerable:!(a=r(o,f))||a.enumerable});return t})(e({},"__esModule",{value:!0}),o);var s=Symbol("decDecoder"),a=Symbol("decTransform"),f=class{constructor(t){this.decoder_=t}transform(t,e){if(!(t instanceof ArrayBuffer||ArrayBuffer.isView(t)))throw TypeError("Input data must be a BufferSource");let r=this.decoder_.decode(t,{stream:!0});0!==r.length&&e.enqueue(r)}flush(t){let e=this.decoder_.decode();0!==e.length&&t.enqueue(e)}},u=class{constructor(t,e){let r=new TextDecoder(t||"utf-8",e||{});this[s]=r,this[a]=new TransformStream(new f(r))}get encoding(){return this[s].encoding}get fatal(){return this[s].fatal}get ignoreBOM(){return this[s].ignoreBOM}get readable(){return this[a].readable}get writable(){return this[a].writable}};Symbol("encEncoder"),Symbol("encTransform")},36335:t=>{t.exports={create:async function(t,e,r,n){let{signal:i,...o}=n;if(o.webhook)try{new URL(o.webhook)}catch(t){throw Error("Invalid webhook URL")}return(await this.request(`/models/${t}/${e}/versions/${r}/trainings`,{method:"POST",data:o,signal:i})).json()},get:async function(t,{signal:e}={}){return(await this.request(`/trainings/${t}`,{method:"GET",signal:e})).json()},cancel:async function(t,{signal:e}={}){return(await this.request(`/trainings/${t}/cancel`,{method:"POST",signal:e})).json()},list:async function({signal:t}={}){return(await this.request("/trainings",{method:"GET",signal:t})).json()}}},48428:(t,e,r)=>{let{transformFileInputs:n}=r(49988);
1t.exports={predictions:{create:async function(t,e,r){let{input:i,wait:o,signal:s,...a}=r;if(a.webhook)try{new URL(a.webhook)}catch(t){throw Error("Invalid webhook URL")}let f={};if(o)if("number"==typeof o){let t=Math.max(1,Math.ceil(Number(o))||1);f.Prefer=`wait=${t}`}else f.Prefer="wait";return(await this.request(`/deployments/${t}/${e}/predictions`,{method:"POST",headers:f,data:{...a,input:await n(this,i,this.fileEncodingStrategy)},signal:s})).json()}},get:async function(t,e,{signal:r}={}){return(await this.request(`/deployments/${t}/${e}`,{method:"GET",signal:r})).json()},create:async function(t,{signal:e}={}){return(await this.request("/deployments",{method:"POST",data:t,signal:e})).json()},update:async function(t,e,r,{signal:n}={}){return(await this.request(`/deployments/${t}/${e}`,{method:"PATCH",data:r,signal:n})).json()},list:async function({signal:t}={}){return(await this.request("/deployments",{method:"GET",signal:t})).json()},delete:async function(t,e,{signal:r}={}){return 204===(await this.request(`/deployments/${t}/${e}`,{method:"DELETE",signal:r})).status}}},49988:(t,e,r)=>{var n=r(10742).hp;let i=r(54094),{create:o}=r(10419);async function s(t,e,r){var n;let i=new TextEncoder,o=await r.subtle.importKey("raw",(n=t,Uint8Array.from(atob(n),t=>t.codePointAt(0))),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return a(await r.subtle.sign("HMAC",o,i.encode(e)))}function a(t){return btoa(String.fromCharCode.apply(null,new Uint8Array(t)))}async function f(t,e){return await l(e,async e=>e instanceof Blob||e instanceof n?(await o.call(t,e)).urls.get:e)}async function u(t){let e=0;return await l(t,async t=>{let r,n;if(t instanceof Blob)r=await t.arrayBuffer(),n=t.type;else{if(!h(t))return t;r=t}if((e+=r.byteLength)>1e7)throw Error(`Combined filesize of prediction ${e} bytes exceeds 10mb limit for inline encoding, please provide URLs instead`);let i=a(r);return n=n||"application/octet-stream",`data:${n};base64,${i}`})}async function l(t,e){if(Array.isArray(t)){let r=[];for(let n of t){let t=await l(n,e);r.push(t)}return r}if(function(t){if("object"!=typeof t||null===t||"[object Object]"!==String(t))return!1;let e=Object.getPrototypeOf(t);if(null===e)return!0;let r=Object.prototype.hasOwnProperty.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Function.prototype.toString.call(r)===Function.prototype.toString.call(Object)}(t)){let r={};for(let n of Object.keys(t))r[n]=await l(t[n],e);return r}return await e(t)}function h(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}t.exports={transform:l,transformFileInputs:async function t(t,e,r){switch(r){case"data-uri":return await u(t,e);case"upload":return await f(t,e);case"default":try{return await f(t,e)}catch(t){if(t instanceof i&&t.response.status>=400&&t.response.status<500)throw t;return await u(e)}default:throw Error(`Unexpected file upload strategy: ${r}`)}},validateWebhook:async function t(t,e,r){let n,i,o,a,f,u=globalThis.crypto;if(t&&t.headers&&t.body){if("function"==typeof t.headers.get?(n=t.headers.get("webhook-id"),o=t.headers.get("webhook-timestamp"),a=t.headers.get("webhook-signature")):(n=t.headers["webhook-id"],o=t.headers["webhook-timestamp"],a=t.headers["webhook-signature"]),i=t.body,"string"!=typeof e)throw Error("Unexpected value for secret passed to validateWebhook, expected a string");f=e,r&&(u=r)}else n=t.id,i=t.body,o=t.timestamp,a=t.signature,f=t.secret,e&&(u=e);if(i instanceof ReadableStream||i.readable)try{i=await new Response(i).text()}catch(t){throw Error(`Error reading body: ${t.message}`)}else if(h(i))i=await new Blob([i]).text();else if("object"==typeof i)i=JSON.stringify(i);else if("string"!=typeof i)throw Error("Invalid body type");if(!n||!o||!a)throw Error("Missing required webhook headers");if(!i)throw Error("Missing required body");if(!f)throw Error("Missing required secret");if(!u)throw Error('Missing `crypto` implementation. If using Node 18 pass in require("node:crypto").webcrypto');let l=`${n}.${o}.${i}`,c=await s(f.split("_").pop(),l,u);return a.split(" ").map(t=>t.split(",")[1]).some(t=>t===c)},withAutomaticRetries:async function t(e,r={}){let n=r.shouldRetry||(()=>!1),o=r.maxRetries||5,s=r.interval||500,a=r.jitter||100,f=t=>new Promise(e=>setTimeout(e,t)),u=0;do{let t=s*2**u+Math.random()*a;try{let t=await e();if(t.ok||!n(t))return t}catch(e){if(e instanceof i){let r=e.response.headers.get("Retry-After");if(r)if(Number.isInteger(r))t=1e3*r;else{let e=new Date(r);Number.isNaN(e.getTime())||(t=e.getTime()-new Date().getTime())}}}Number.isInteger(o)&&o>0&&(Number.isInteger(t)&&t>0&&await f(s*2**(r.maxRetries-o)),u+=1)}while(u<o);return e()},parseProgressFromLogs:function(t){let e="object"==typeof t&&t.logs?t.logs:t;if(!e||"string"!=typeof e)return null;let r=/^\s*(\d+)%\s*\|.+?\|\s*(\d+)\/(\d+)/;for(let t of e.split("\n").reverse()){let e=t.match(r);if(e&&4===e.length)return{percentage:parseInt(e[1],10)/100,current:parseInt(e[2],10),total:parseInt(e[3],10)}}return null},streamAsyncIterator:async function*(t){let e=t.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}}}},54094:t=>
1{class e extends Error{constructor(t,e,r){super(t),this.name="ApiError",this.request=e,this.response=r}}t.exports=e},61460:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n=(0,r(52715).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},66682:t=>{t.exports={default:{secret:{get:async function({signal:t}={}){return(await this.request("/webhooks/default/secret",{method:"GET",signal:t})).json()}}}}},68225:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});let n=(0,r(52715).A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},78047:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,f=(1<<a)-1,u=f>>1,l=-7,h=r?i-1:0,c=r?-1:1,p=t[e+h];for(h+=c,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=c,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=c,l-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,f,u=8*o-i-1,l=(1<<u)-1,h=l>>1,c=5960464477539062e-23*(23===i),p=n?0:o-1,d=n?1:-1,y=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(a=+!!isNaN(e),s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-s))<1&&(s--,f*=2),s+h>=1?e+=c/f:e+=c*Math.pow(2,1-h),e*f>=2&&(s++,f/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*f-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+p]=255&s,p+=d,s/=256,u-=8);t[r+p-d]|=128*y}},80126:t=>{t.exports={get:async function(t,e,{signal:r}={}){return(await this.request(`/models/${t}/${e}`,{method:"GET",signal:r})).json()},list:async function({signal:t}={}){return(await this.request("/models",{method:"GET",signal:t})).json()},create:async function(t,e,r){let{signal:n,...i}=r,o={owner:t,name:e,...i};return(await this.request("/models",{method:"POST",data:o,signal:n})).json()},versions:{list:async function(t,e,{signal:r}={}){return(await this.request(`/models/${t}/${e}/versions`,{method:"GET",signal:r})).json()},get:async function(t,e,r,{signal:n}={}){return(await this.request(`/models/${t}/${e}/versions/${r}`,{method:"GET",signal:n})).json()}},search:async function(t,{signal:e}={}){return(await this.request("/models",{method:"QUERY",headers:{"Content-Type":"text/plain"},data:t,signal:e})).json()}}},82808:t=>{t.exports={current:async function({signal:t}={}){return(await this.request("/account",{method:"GET",signal:t})).json()}}},84016:(t,e,r)=>{let n=r(54094),{streamAsyncIterator:i}=r(49988),{EventSourceParserStream:o}=r(28385),{TextDecoderStream:s}=void 0===globalThis.TextDecoderStream?r(34956):globalThis;class a{constructor(t,e,r,n){this.event=t,this.data=e,this.id=r,this.retry=n}toString(){return"output"===this.event?this.data:""}}function f({url:t,fetch:e}){let r="application/octet-stream";class o extends ReadableStream{async blob(){let t=[];for await(let e of this)t.push(e);return new Blob(t,{type:r})}url(){return new URL(t)}toString(){return t}}return new o({async start(o){let s=await e(t);if(!s.ok){let e=await s.text(),r=new Request(t,init);o.error(new n(`Request to ${t} failed with status ${s.status}: ${e}`,r,s))}s.headers.get("Content-Type")&&(r=s.headers.get("Content-Type"));try{for await(let t of i(s.body))o.enqueue(t);o.close()}catch(t){o.error(t)}}})}t.exports={createFileOutput:f,createReadableStream:function({url:t,fetch:e,options:r={}}){let{useFileOutput:u=!0,headers:l={},...h}=r;return new ReadableStream({async start(r){let c={...h,headers:{...l,Accept:"text/event-stream"}},p=await e(t,c);if(!p.ok){let e=await p.text(),i=new Request(t,c);r.error(new n(`Request to ${t} failed with status ${p.status}: ${e}`,i,p))}for await(let t of i(p.body.pipeThrough(new s).pipeThrough(new o))){if("error"===t.event){r.error(Error(t.data));break}let n=t.data;if(u&&"string"==typeof n&&(n.startsWith("https:")||n.startsWith("data:"))&&(n=f({data:n,fetch:e})),r.enqueue(new a(t.event,n,t.id)),"done"===t.event)break}r.close()}})},ServerSentEvent:a}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.