(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52453,e=>{"use strict";let t="remove",n="replace",r=Symbol.for("__MUTATIVE_PROXY_DRAFT__"),a=Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"),i=Symbol.iterator,o=Object.getPrototypeOf(Object.getPrototypeOf([][i]())),l={mutable:"mutable",immutable:"immutable"},s={};function d(e){var t;return null!=(t=e.copy)?t:e.original}function p(e){return e.setMap||(e.setMap=new Map)}function u(e,t){let n=e.setMap&&e.setMap.get(t);return void 0===n?t:n}let c=Set.prototype.values;function f(e){return m(e)?e.values():c.call(e)}function m(e){return!!g(e)}function g(e){return"object"!=typeof e?null:null==e?void 0:e[r]}function h(e){0===e.finalities.revoke.length&&g(e.proxy)}function A(e){let t=g(e);return t?t.operated?t.copy:t.original:e}function y(e,t){let n;return!!e&&"object"==typeof e&&(Object.getPrototypeOf(e)===Object.prototype||Array.isArray(e)||e instanceof Map||e instanceof Set||!!(null==t?void 0:t.mark)&&((n=t.mark(e,l))===l.immutable||"function"==typeof n))}function b(e){return Array.isArray(e)?1:e instanceof Map?2:3*(e instanceof Set)}function v(e,t){return 2===b(e)?e.get(t):e[t]}function I(e,t,n){2===b(e)?e.set(t,n):e[t]=n}function S(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function x(e){let t=e.revoke;for(;t.length>0;)t.pop()()}function w(e,t){return t?e:[""].concat(e).map(e=>{let t=`${e}`;return -1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")}function _(e,t){if(t in e){let n=Reflect.getPrototypeOf(e);for(;n;){let e=Reflect.getOwnPropertyDescriptor(n,t);if(e)return e;n=Reflect.getPrototypeOf(n)}}}function z(e){return!Object.prototype.hasOwnProperty.call(e,"constructor")&&!Object.prototype.hasOwnProperty.call(e,Symbol.isConcatSpreadable)&&Object.getPrototypeOf(e)===Array.prototype}function k(e){return Object.getPrototypeOf(e)===Set.prototype}function T(e){return Object.getPrototypeOf(e)===Map.prototype}function M(e){throw Error(`Minified Mutative error #${e}; visit https://mutative.js.org/docs/extra-topics/errors`)}let O=Object.prototype.propertyIsEnumerable;function C(e){let t=Array.prototype.concat.call(e);return 1===t.length&&t[0]===e?Array.prototype.slice.call(e):t}let E=Array.prototype[Symbol.iterator],P=Object.getPrototypeOf(E.call([])),F=P.next;function D(e,t){let n;if(Array.isArray(e))return(null==t?void 0:t.enableAutoFreeze)&&!Object.isExtensible(e)?!z(e)||Object.prototype.hasOwnProperty.call(e,Symbol.iterator)||Array.prototype[Symbol.iterator]!==E||P.next!==F||Array.prototype.includes.call(e,void 0)?C(e):[...e]:C(e);if(e instanceof Set){if(!k(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.values());for(let n of(Set.prototype.clear.call(t),f(e)))Set.prototype.add.call(t,n);return t}return!m(e)&&Set.prototype.difference?Set.prototype.difference.call(e,new Set):new Set(e.values())}if(e instanceof Map)return T(e)?new Map(e):new(Object.getPrototypeOf(e)).constructor(e);if((null==t?void 0:t.mark)&&void 0!==(n=t.mark(e,l))&&n!==l.mutable){if(n===l.immutable){let t;return t=Object.create(Object.getPrototypeOf(e)),Reflect.ownKeys(e).forEach(n=>{let r=Reflect.getOwnPropertyDescriptor(e,n);if("__proto__"!==n&&r.enumerable&&r.configurable&&r.writable){t[n]=e[n];return}r.writable||(r.writable=!0,r.configurable=!0),(r.get||r.set)&&(r={configurable:!0,writable:!0,enumerable:r.enumerable,value:e[n]}),Reflect.defineProperty(t,n,r)}),t}if("function"==typeof n)return n();M(9)}else{if("object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype)return function(e){let t=Object.keys(e);if(t.length<=128)return{...e};let n={};n.a=1,n.b=1,delete n.a,delete n.b;for(let r=0;r{t(n,e[n],e)});else if(1===n){let n=0;for(let r of e)t(n,r,e),n+=1}else e.forEach((n,r)=>t(r,n,e))}function L(e,t){let n=e.setMap;if(!n||!e.operated)return;let r=n.items;if(!r){if(t)return;let a=0===e.assignedMap.size;if(!a){for(let[e,t]of n)if(A(t)!==e){a=!0;break}}if(!a)return;r=n.items=Array.from(f(e.copy))}let a=e.copy;a.clear(),r.forEach(e=>{let t=n.get(e);a.add(void 0===t?e:A(t))})}function B(e,t,n,r){if(e.operated&&(null!==e.arrayState&&e.arrayState.relocated||void 0!==e.assignedMap&&e.assignedMap.size>0)&&!e.finalized){if(n&&r){let a=function e(t,n=[]){let r=t.parent;if(r){let a=r.copy,i=t.key;if(3===r.type){if(r.assignedMap.size>0)return null;let e=0;for(let t of f(r.original)){if(t===i)break;e+=1}i=e}else if(v(a,i)!==t.proxy)return null;return n.push(i),e(r,n)}return n.reverse(),n}(e);a&&t(e,a,n,r)}e.finalized=!0}}function U(e,t,n){let r=g(n);r?(r.callbacks||(r.callbacks=[]),r.callbacks.push(()=>{let a=3===e.type?e.setMap:e.copy;if(S(v(a,t),n)){let n=r.operated?r.copy:r.original;r.finalities!==e.finalities&&L(e,!0),I(a,t,n)}}),e.options.enableAutoFreeze&&r.finalities!==e.finalities&&(e.options.enableAutoFreeze=!1)):y(n,e.options)&&e.finalities.draft.push(()=>{let r;S(v(3===e.type?e.setMap:e.copy,t),n)&&(r=3===e.type?e.setMap:e.copy,e.finalities.revoke.length>1&&e.assignedMap.get(t)&&r&&function e(t,n,r){if(m(t)||!y(t,r)||n.has(t)||Object.isFrozen(t))return;let a=t instanceof Set,i=a?new Map:void 0;if(n.add(t),N(t,(o,l)=>{var s;if(m(l)){let e=g(l);I(a?i:t,o,(null==(s=e.assignedMap)?void 0:s.size)||e.operated?e.copy:e.original)}else e(l,n,r)}),i){let e=Array.from(t);t.clear(),e.forEach(e=>{t.add(i.has(e)?i.get(e):e)})}}(v(r,t),e.finalities.handledSet,e.options))})}let G=(e,t,n=!1)=>{"object"==typeof e&&null!==e&&(!y(e,t)||n)&&M(8)};function q(e,t){var n,r;let a=d(e).get(t),i=(null==(r=(n=e.options).mark)?void 0:r.call(n,a,l))===l.mutable;if(e.options.strict&&G(a,e.options,i),i||e.finalized||!y(a,e.options)||a!==e.original.get(t))return a;let o=s.createDraft(a,e,t,e.finalities,e.options);return j(e),e.copy.set(t,o),o}let W={get size(){return d(g(this)).size},has(e){return d(g(this)).has(e)},set(e,t){let n=g(this),r=d(n);return r.has(e)&&S(r.get(e),t)||(j(n),R(n),n.assignedMap.set(e,!0),n.copy.set(e,t),U(n,e,t)),this},delete(e){if(!this.has(e))return!1;let t=g(this);return j(t),R(t),t.original.has(e)?t.assignedMap.set(e,!1):t.assignedMap.delete(e),t.copy.delete(e),!0},clear(){let e=g(this);if(this.size){for(let[t]of(j(e),R(e),e.assignedMap=new Map,e.original))e.assignedMap.set(t,!1);e.copy.clear()}},forEach(e,t){let n=g(this);d(n).forEach((r,a)=>{h(n),e.call(t,q(n,a),a,this)})},get(e){return q(g(this),e)},keys(){return d(g(this)).keys()},values(){let e=g(this),t=this.keys();return{__proto__:o,next:()=>{let n=t.next();return n.done?n:(h(e),{done:!1,value:q(e,n.value)})}}},entries(){let e=g(this),t=this.keys();return{__proto__:o,next:()=>{let n=t.next();return n.done?n:(h(e),{done:!1,value:[n.value,q(e,n.value)]})}}},[i](){return this.entries()}},K=Reflect.ownKeys(W),H=(e,t,n)=>()=>{var r,a;let i=t.next();if(i.done)return i;h(e);let o=i.value,d=u(e,o),c=g(d),f=(null==(a=(r=e.options).mark)?void 0:a.call(r,d,l))===l.mutable;if(e.options.strict&&G(o,e.options,f),!f&&!c&&d===o&&y(o,e.options)&&!e.finalized&&e.original.has(o)){let t=s.createDraft(o,e,o,e.finalities,e.options);p(e).set(o,t),d=t}else c&&(d=c.proxy);return{done:!1,value:n?d:[d,d]}},Q={get size(){return d(g(this)).size},has(e){let t,n=d(g(this));return n.has(e)||!!(t=g(e))&&n.has(t.original)},add(e){let t=g(this);return this.has(e)||(j(t),R(t),t.assignedMap.set(e,!0),t.copy.add(e),e&&"object"==typeof e&&p(t).set(e,e),U(t,e,e)),this},delete(e){if(!this.has(e))return!1;let t=g(this);j(t),R(t);let n=t.copy,r=g(e),a=r&&n.has(r.original)?r.original:e;return r&&a===e?t.assignedMap.delete(e):t.assignedMap.set(a,!1),t.setMap&&t.setMap.delete(a),n.delete(a)},clear(){if(!this.size)return;let e=g(this);for(let t of(j(e),R(e),e.original))e.assignedMap.set(t,!1);e.setMap&&e.setMap.clear(),e.copy.clear()},values(){let e=g(this);j(e);let t=f(e.copy);return{__proto__:o,next:H(e,t,!0)}},entries(){let e=g(this);j(e);let t=f(e.copy);return{__proto__:o,next:H(e,t,!1)}},keys(){return this.values()},[i](){return this.values()},forEach(e,t){let n=this.values(),r=n.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=n.next()}};"difference"in Set.prototype&&["intersection","union","difference","symmetricDifference","isSubsetOf","isSupersetOf","isDisjointFrom"].forEach(e=>{Q[e]=function(t){return Set.prototype[e].call(new Set(this.values()),t)}});let X=Reflect.ownKeys(Q),Y=Array.prototype,J=Y.includes,Z=Object.prototype.hasOwnProperty,ee=null,et=null,en=new WeakSet;function er(e){et===e&&(ee=null,et=null)}function ea(e){return"object"==typeof e&&null!==e||"function"==typeof e}let ei=e=>Math.trunc(+e)||0;function eo(e){var t;return null!=(t=e.arrayState)?t:e.arrayState={relocated:!1,diffStart:0,diffEnd:0,baseRefs:null,delta:0,lookups:0,inert:null,dense:null}}function el(e){let t=eo(e),n=t.dense;return null===n&&(n=t.dense=!function(e){if(!J.call(e,void 0))return!1;for(let t=0;t=0&&a[i]===t))return -1===(i=Y.lastIndexOf.call(a,t))?void 0:i;let o=1;for(let e,n=0;-1!==(e=Y.indexOf.call(a,t,i+o));)i=e,++n>16&&(o*=2);return o>1?Y.lastIndexOf.call(a,t,i+o-1):i}return(function(e){let t=eo(e),n=t.baseRefs;if(null===n){n=t.baseRefs=new Map;let r=e.original;for(let e=0;er.diffStart?(r.diffStart=Math.min(r.diffStart,t),r.diffEnd=Math.max(r.diffEnd,n)):(r.diffStart=t,r.diffEnd=n),r.relocated=!0}function ef(e,t,n,r,a){var i;ec(e,n,r),e.arrayState.delta=a;let o=e.copy,l=[];null!==e.child&&l.push([Number(e.childKey),e.child]),null==(i=e.children)||i.forEach((e,t)=>{l.push([t,e])}),e.child=null,e.childKey=null,e.children=void 0;for(let n=0;n=0&&(!function(e,t,n){var r;null===e.child?(e.child=n,e.childKey=String(t)):(null!=(r=e.children)?r:e.children=[])[t]=n}(e,i,a),i!==r&&U(e,String(i),a))}let s=e.assignedMap,d=[];s.forEach((e,t)=>{"length"!==t&&d.push([t,e])});for(let e=0;e=0&&(a&&l!==i?ep(e,l,o[l]):s.set(String(l),a))}}function em(e,t){let n=d(e)[t];return"object"!=typeof n||null===n?-1:ed(e,t)===n?n:y(n,e.options)?es(e,n,t):-1}function eg(e,t,n){return"number"!=typeof n?n:n<0?t:(j(e),s.createDraft(t,e,n,e.finalities,e.options))}function eh(e){return j(e),R(e),e.copy}function eA(e,t){let n=Y[e];return function(...e){let a=function(e){if(e!==ee&&!en.has(e))return null;let t=e[r];return!t.finalized&&!t.options.mark&&z(t.original)?t:null}(this);return null===a||a.options.strict&&!eu(a)?n.apply(this,e):t(a,this,e,n)}}function ey(e,t,n){return ed(e,n)!==t&&-1!==es(e,t,n)}function eb(e){let t=Y[e],n="lastIndexOf"===e,r=n?Y.lastIndexOf:Y.indexOf;return eA(e,(a,i,o,l)=>{let s=d(a);if(0===s.length)return"includes"!==e&&-1;if(ea(o[1]))return l.apply(i,o);let p=o[0];if("object"!=typeof p||null===p)return t.apply(s,o);let u=o.length>1?r.call(s,p,o[1]):r.call(s,p);for(;-1!==u;){if(!Z.call(s,u))return l.apply(i,o);if(!ey(a,p,u))break;if(!el(a))return l.apply(i,o);if(!y(p,a.options))break;u=n?0===u?-1:r.call(s,p,u-1):r.call(s,p,u+1)}return"includes"===e?-1!==u:u})}let ev=Object.assign(Object.create(null),{indexOf:eb("indexOf"),lastIndexOf:eb("lastIndexOf"),includes:eb("includes"),join:eA("join",(e,t,n)=>Y.join.call(ea(n[0])||!eu(e)?t:d(e),n[0])),shift:eA("shift",(e,t,n,r)=>{if(0===d(e).length)return;if(!el(e))return r.apply(t,n);let a=em(e,0),i=eh(e),o=Y.shift.call(i);return ef(e,e=>e-1,0,i.length+1,1),eg(e,o,a)}),unshift:eA("unshift",(e,t,n,r)=>{let a=n.length;if(0===a)return d(e).length;if(!el(e))return r.apply(t,n);let i=eh(e);Y.unshift.apply(i,n),ef(e,e=>e+a,0,i.length,-a);for(let t=0;t{if(ea(n[0])||ea(n[1]))return r.apply(t,n);let a=d(e).length,i=function(e,t){if(void 0===e)return 0;let n=ei(e);return n<0?Math.max(t+n,0):Math.min(n,t)}(n[0],a),o=0===n.length?0:1===n.length?a-i:Math.min(Math.max(ei(n[1]),0),a-i),l=Math.max(n.length-2,0);if(0===o&&0===l)return r.apply(t,n);let s=d(e);if(o===l){let a=!0;for(let o=0;a&&oe{if(void 0!==n&&"function"!=typeof n||!eu(e)||!el(e))return r.call(t,n);let a=d(e),i=a.length,o=Array(i);for(let e=0;e{let a=d(e),i=a.length;if(i<2)return t;if(!el(e))return r.apply(t,n);let o=e.assignedMap,l=void 0!==o&&o.size>0;for(let e=0,t=i-1;!l&&ei-1-e,0,i)),t})});function eI(e,t,n){let r=!!(null==e?void 0:e.options.enableAutoFreeze),a=(t,n)=>N(t,(t,i,o)=>{let l=g(i);if(l&&e&&l.finalities===e.finalities){let e=l.original;if(o instanceof Set){let n=Array.from(o);o.clear(),n.forEach(n=>o.add(t===n?e:n))}else I(o,t,e)}else"object"==typeof i&&null!==i&&(r&&Object.isFrozen(i)||a(i,n))});r&&Object.isFrozen(t)||a(t)}function eS(e){return m(e)||M(7),function e(t,n){var r;let a,i=g(t),o=i?i.options:n;if(!y(t,o))return t;let l=b(t);if(i&&!i.operated)return i.original;let s=1===l&&i&&!i.options.strict?i:null,p=!1;function c(){a=2===l?T(t)?new Map(t):new(Object.getPrototypeOf(t)).constructor(t):3===l?i?Array.from(f(d(i)),e=>u(i,e)):Array.from(t):D(s?d(s):t,o)}if(i){i.finalized=!0;try{c()}finally{i.finalized=!1}}else 3===l?c():a=t;if(N(a,(n,r)=>{if(i&&(S(v(i.original,n),r)||s&&!m(r)&&("object"!=typeof r||!(s.assignedMap.size&&s.assignedMap.get(String(n))))))return;let l=e(r,o);l!==r&&(p=!0,a===t&&c(),I(a,n,l))}),3===l){if(!i&&!p)return t;let e=null!=(r=null==i?void 0:i.original)?r:t;return k(e)?new Set(a):new(Object.getPrototypeOf(e)).constructor(a)}return a}(e)}function ex(e){let t=g(e);return t?t.operated?eS(e):t.original:e}function ew(e,r,a,i){let{pathAsArray:o=!0}=e.options.enablePatches;switch(e.type){case 0:case 2:return function({original:e,copy:r,assignedMap:a},i,o,l,s){a.forEach((a,d)=>{let p=v(e,d),u=ex(v(r,d)),c=a?(e instanceof Map?e.has(d):Object.prototype.hasOwnProperty.call(e,d))?n:"add":t;if(S(p,u)&&c===n)return;let f=w(i.concat([d]),s);o.push(c===t?{op:c,path:f}:{op:c,path:f,value:u}),l.push("add"===c?{op:t,path:f}:c===t?{op:"add",path:f,value:p}:{op:n,path:f,value:p})})}(e,r,a,i,o);case 1:return function(e,r,a,i,o){let{original:l,assignedMap:s,options:d}=e,p=e.copy;p.length{if(e&&"length"!==t){let e=Number(t);(e=f)&&m.push(e)}}),m.sort((e,t)=>e-t);let g=[],h=0;for(;h{if(!n.has(e)){let n=w(r.concat([l]),o);a.push({op:t,path:n,value:e}),i.unshift({op:"add",path:n,value:e})}l+=1}),l=0,n.forEach(n=>{if(!e.has(n)){let e=w(r.concat([l]),o);a.push({op:"add",path:e,value:n}),i.unshift({op:t,path:e,value:n})}l+=1})}(e,r,a,i,o)}}let e_=Object.prototype.hasOwnProperty;function ez(e,t,n){var r;let a,i;(3===e.type||2===e.type)&&M(1),1===e.type&&"length"!==t&&!function(e){let t;if("string"==typeof e&&e.length<16){let t=0;for(;t57)break;t+=1}if(t>0&&t===e.length&&(1===t||48!==e.charCodeAt(0)))return!0}return Number.isInteger(t=Number(e))&&t>=0&&(0===e||0===t||String(t)===String(e))}(t)&&M(2);let o=d(e);if(!e_.call(o,t)){let r=_(o,t);if(null==r?void 0:r.set)return r.set.call(e.proxy,n),!0}let l=o[t],s=g(l),p=e.original;if(s&&S(s.original,n))return e.copy[t]=n,e.assignedMap=null!=(r=e.assignedMap)?r:new Map,e_.call(p,t)&&S(n,p[t])?e.assignedMap.delete(t):(R(e),e.assignedMap.set(t,!0),U(e,t,n)),!0;if(S(n,l)&&(void 0!==n||e_.call(o,t))&&(null===e.arrayState||"object"!=typeof n||null===n||n===e.original[t]||-1===es(e,n,t)))return!0;j(e),R(e);let u=e.arrayState;null!==u&&("object"==typeof n&&null!==n||"function"==typeof n)&&(u.inert=null),e_.call(p,t)&&S(n,p[t])?e.assignedMap.delete(t):e.assignedMap.set(t,!0);let c=1===e.type?e.copy.length:-1;return e.copy[t]=n,-1!==c&&e.copy.length>c+ +("length"!==t)&&(null!==(a=e.arrayState)&&(a.dense=null),c<(i=Math.min(e.copy.length,e.original.length))&&ec(e,c,i)),U(e,t,n),!0}let ek={get:function(e,t,n){var a,i,o;let s;if(t===r)return e;let{options:p,type:u}=e,c=d(e);if(p.mark){let e="size"===t&&(c instanceof Map||c instanceof Set)?Reflect.get(c,t):Reflect.get(c,t,n);if((s=p.mark(e,l))===l.mutable)return p.strict&&G(e,p,!0),e}if(2===u){if(K.includes(t))return"size"===t?Object.getOwnPropertyDescriptor(W,"size").get.call(e.proxy):W[t].bind(e.proxy)}else if(3===u&&X.includes(t))return"size"===t?Object.getOwnPropertyDescriptor(Q,"size").get.call(e.proxy):Q[t].bind(e.proxy);if(2===u?!c.has(t):!e_.call(c,t)){if(1===u&&Object.getPrototypeOf(e.original)===Array.prototype){let n=ev[t];if(void 0!==n){let t;return(t=e.proxy)!==ee&&(null!==et&&et.length>0&&en.add(ee),e.finalities.scoped?(ee=t,et=e.finalities.revoke):(en.add(t),ee=null,et=null)),n}}let n=_(c,t);return n?"value"in n?n.value:null==(a=n.get)?void 0:a.call(e.proxy):void 0}let f=c[t];if(p.strict&&G(f,p),e.finalized||"object"!=typeof f||null===f||f===e.child&&t===e.childKey)return f;let m=e.children;if(void 0!==m&&(1===u?m[t]:m.get(t))===f||!y(f,p))return f;let h=t;if(f!==e.original[t]&&-1===(h=es(e,f,t)))return f;j(e);let A=eM(f,e,1===u?Number(h):h,e.finalities,p);if(e.copy[t]=A,h!==t&&U(e,t,A),null===e.child||e.childKey===t?(e.child=A,e.childKey=t):1===u?(null!=(i=e.children)?i:e.children=[])[t]=A:(null!=(o=e.children)?o:e.children=new Map).set(t,A),"function"==typeof s){let e=g(A);return j(e),R(e),e.copy}return A},set:ez,has:function(e,t){return t in d(e)},ownKeys:function(e){return Reflect.ownKeys(d(e))},getOwnPropertyDescriptor:function(e,t){let n=d(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},getPrototypeOf:function(e){return Reflect.getPrototypeOf(e.original)},setPrototypeOf:function(){M(3)},defineProperty:function(){M(4)},deleteProperty:function(e,t){var n;return 1===e.type?ez(e,t,void 0):(void 0!==e.original[t]||t in e.original?(j(e),R(e),e.assignedMap.set(t,!1)):(e.assignedMap=null!=(n=e.assignedMap)?n:new Map,e.assignedMap.delete(t)),e.copy&&delete e.copy[t],!0)}},eT={};function eM(e,t,n,r,a){let i=b(e),o={type:i,finalized:!1,operated:!1,parent:t,key:n,original:e,copy:null,proxy:null,finalities:r,options:a,setMap:void 0,assignedMap:void 0,callbacks:void 0,children:void 0,child:null,childKey:null,arrayState:null},{proxy:l,revoke:s}=1===i?Proxy.revocable([o],eT):Proxy.revocable(o,ek);return r.revoke.push(s),o.proxy=l,r.draft.push(o),l}Object.keys(ek).forEach(e=>{let t=ek[e];eT[e]=(e,n,r)=>t(e[0],n,r)}),s.createDraft=eM,Object.prototype.constructor.toString(),e.s(["f",0,function e(t,r,i){var o,s,d,p;let u,c,f,h,A;if("function"==typeof t&&"function"!=typeof r)return function(n,...a){return e(n,e=>t.call(this,e,...a),r)};let v=i;"function"!=typeof r&&(v=r),v={...v};let I=m(t)?eS(t):t,w=Array.isArray(v.mark)?(e,t)=>{for(let n of v.mark){let r=n(e,t);if(r)return r}}:v.mark,_=null!=(o=v.enablePatches)&&o,z=null!=(s=v.strict)&&s,k={enableAutoFreeze:null!=(d=v.enableAutoFreeze)&&d,mark:w,strict:z,enablePatches:_};y(I,k)||"object"!=typeof I||null===I||M(0);let[T,O,C]=(h={draft:[],revoke:[],handledSet:new WeakSet,scoped:!0},k.enablePatches&&(c=[],f=[]),[A=(null==(p=k.mark)?void 0:p.call(k,I,l))!==l.mutable&&y(I,k)?eM(I,null,void 0,h,k):I,(e=[])=>{let[t,r,a]=function(e,t,r,a,i){var o;let l=g(e),s=null!=(o=null==l?void 0:l.original)?o:e,d=!!t.length;if(null==l?void 0:l.operated){let e=l.finalities.draft;for(;e.length>0;){let t=e.pop();"function"==typeof t?t(r,a):function(e,t,n,r){let a=e.parent;if(a){let i=a.type,o=3===i?a.setMap:a.copy,l=e.key,s=3===i||2===i,d=s?o.get(l):o[l],p=d===e.proxy?e:g(d);if(p!==e&&L(e),p){let a=p.operated?p.copy:p.original;p.finalities===e.finalities&&L(p),B(p,t,n,r),s?o.set(l,a):o[l]=a}}else L(e),B(e,t,n,r);let i=e.callbacks;if(i)for(let e=0;e{let i=t[n];V(i)&&e(i,n,r,a)})}}(p),[p,r&&d?[{op:n,path:[],value:t[0]}]:r,a&&d?[{op:n,path:[],value:s}]:a]}(A,e,c,f,k.enableAutoFreeze);return k.enablePatches?[t,r,a]:t},h]);if("function"!=typeof r)return y(I,k)||M(0),C.scoped=!1,[T,O];function E(e){throw x(C),er(C.revoke),e}try{u=r(T)}catch(e){E(e)}let P=e=>{try{let t=g(T);if(!m(e)){void 0!==e&&!S(e,T)&&(null==t?void 0:t.operated)&&M(5);let n=null==e?void 0:e[a];if(n){let r=n[0];return k.strict&&"object"==typeof e&&null!==e&&eI(t,e,!0),O([r])}if(void 0!==e)return"object"==typeof e&&null!==e&&eI(t,e),O([e])}if(e===T||void 0===e)return O([]);let n=g(e);return k===n.options?(n.operated&&M(6),O([eS(e)])):O([e])}catch(e){return E(e)}finally{er(C.revoke)}};try{if(u instanceof Promise)return u.then(P,E)}catch(e){return E(e)}return P(u)}])},556295,e=>{"use strict";var t=e.i(52453);e.s(["f",0,(e,n)=>(r,a,i)=>(i.setState=(e,a,...i)=>r("function"==typeof e?(0,t.f)(e,n?{...n,enablePatches:!1}:n):e,a,...i),e(i.setState,a,i))])},372953,425493,210138,29570,704691,e=>{"use strict";var t=e.i(342837),n=e.i(988590),r=e.i(882844),a=e.i(635157),i=e.i(549692);let o={EmptyResponseBody:"empty_response_body",AudioDecodeFailed:"audio_decode_failed",AudioStreamFailed:"audio_stream_failed",ImagePromptMissing:"image_prompt_missing",ImageRequestFailed:"image_request_failed",ImageApiError:"image_api_error",ImageResponseBodyEmpty:"image_response_body_empty",ImageStreamFailed:"image_stream_failed",ImageStreamEventInvalid:"image_stream_event_invalid",ImageStreamError:"image_stream_error",ImageMissing:"image_missing",ImageStreamEndedEarly:"image_stream_ended_early",ImageResponseInvalid:"image_response_invalid",SttRequestFailed:"stt_request_failed",SttTranscriptEmpty:"stt_transcript_empty",SttFormatUnsupported:"stt_format_unsupported",SttFileReadFailed:"stt_file_read_failed",SttUploadFailed:"stt_upload_failed",SttResponseInvalid:"stt_response_invalid",SttAudioFileMissing:"stt_audio_file_missing",TtsReferenceAudioReadFailed:"tts_reference_audio_read_failed",TtsUploadFailed:"tts_upload_failed",TtsRequestFailed:"tts_request_failed",TtsResponseBodyEmpty:"tts_response_body_empty",TtsPcmParamsMissing:"tts_pcm_params_missing",VideoRequestFailed:"video_request_failed",VideoApiError:"video_api_error",VideoResponseInvalid:"video_response_invalid",VideoPollFailed:"video_poll_failed",VideoJobFailed:"video_job_failed",VideoJobCancelled:"video_job_cancelled",VideoJobExpired:"video_job_expired",VideoJobTimedOut:"video_job_timed_out",VideoUrlMissing:"video_url_missing",VideoFileUnavailable:"video_file_unavailable"},l={SendFailed:"send_failed",StreamSevered:"stream_severed",StreamEndedEarly:"stream_ended_early",LineTooLong:"line_too_long",TurnFailed:"turn_failed",RunFailed:"run_failed",RunStopped:"run_stopped",ToolFailed:"tool_failed",ToolStopped:"tool_stopped",...o},s=a.z.enum(l),d=i.N.extend({code:s.optional(),rawStatus:a.z.number().int().optional()});function p(e,t){return{code:e,status:null,...void 0===t?{}:{message:t}}}e.s(["K",0,d,"a",0,l,"H",0,o,"S",0,p,"y",0,function(e){return e.rawStatus??e.status??void 0}],425493);let u={InputStreaming:"input-streaming",Running:"running",Done:"done",Failed:"failed"},c={Streaming:"streaming",Done:"done"};e.s(["o",0,c,"K",0,{User:"user",Assistant:"assistant",System:"system"},"_",0,u],210138);let f={Function:"function",Server:"server",Mcp:"mcp",Subagent:"subagent"},m={Summary:"summary",Content:"content"},g={Image:"image",Video:"video",Audio:"audio"},h={Stop:"stop",Length:"length",Tool:"tool",ContentFilter:"content_filter",Cancelled:"cancelled"},A=a.z.object({attempt:a.z.number(),maxAttempts:a.z.number(),delayMs:a.z.number()}),y=a.z.object({turnId:a.z.string()}),b=a.z.object({waitToken:a.z.string(),questions:a.z.array(a.z.object({id:a.z.string(),header:a.z.string().optional(),question:a.z.string(),options:a.z.array(a.z.object({label:a.z.string(),description:a.z.string().optional()})),isMultiple:a.z.boolean()}))}),v=a.z.object({waitToken:a.z.string(),source:a.z.string().nullable(),message:a.z.string().nullable()}),I=a.z.union([a.z.object({kind:a.z.enum(g),url:a.z.string(),expiresAt:a.z.number().optional()}),a.z.object({kind:a.z.enum(g),jobId:a.z.string()})]),S=a.z.object({inputTokens:a.z.number().optional(),outputTokens:a.z.number().optional(),costUsd:a.z.string().optional(),durationMs:a.z.number().optional()}),x=a.z.object({kind:a.z.enum(["url_citation","file_citation"]),title:a.z.string().optional(),url:a.z.string().optional(),startIndex:a.z.number().optional(),endIndex:a.z.number().optional()}),w=a.z.object({id:a.z.string()}),_=a.z.discriminatedUnion("kind",[w.extend({kind:a.z.literal("text"),text:a.z.string(),status:a.z.enum(c)}),w.extend({kind:a.z.literal("reasoning"),summary:a.z.string(),content:a.z.string(),status:a.z.enum(c)}),w.extend({kind:a.z.literal("tool"),name:a.z.string(),toolKind:a.z.enum(f),inputText:a.z.string(),input:a.z.unknown().optional(),output:a.z.unknown().optional(),error:d.optional(),status:a.z.enum(u),durationMs:a.z.number().optional()}),w.extend({kind:a.z.literal("media"),media:I}),w.extend({kind:a.z.literal("file"),name:a.z.string(),mime:a.z.string(),previewUrl:a.z.string().optional()}),w.extend({kind:a.z.literal("annotations"),items:a.z.array(x).readonly()})]),z=a.z.discriminatedUnion("type",[y.extend({type:a.z.literal("turn.started")}),y.extend({type:a.z.literal("text.delta"),partId:a.z.string(),delta:a.z.string()}),y.extend({type:a.z.literal("reasoning.delta"),partId:a.z.string(),channel:a.z.enum(m),delta:a.z.string()}),y.extend({type:a.z.literal("tool.started"),callId:a.z.string(),name:a.z.string(),kind:a.z.enum(f)}),y.extend({type:a.z.literal("tool.input.delta"),callId:a.z.string(),delta:a.z.string()}),y.extend({type:a.z.literal("tool.input.finished"),callId:a.z.string(),input:a.z.unknown().optional()}),y.extend({type:a.z.literal("tool.finished"),callId:a.z.string(),output:a.z.unknown().optional(),error:d.optional(),durationMs:a.z.number().optional()}),y.extend({type:a.z.literal("media.added"),partId:a.z.string(),media:I}),y.extend({type:a.z.literal("annotation.added"),partId:a.z.string(),annotation:x}),y.extend({type:a.z.literal("status"),label:a.z.string(),retry:A.optional()}),y.extend({type:a.z.literal("question.opened"),prompt:b}),y.extend({type:a.z.literal("question.closed"),waitToken:a.z.string()}),y.extend({type:a.z.literal("question.skipped"),skipped:v}),y.extend({type:a.z.literal("usage"),usage:S}),y.extend({type:a.z.literal("turn.finished"),reason:a.z.enum(h)}),y.extend({type:a.z.literal("turn.failed"),error:d}),y.extend({type:a.z.literal("snapshot"),parts:a.z.array(_).readonly()})]);e.s(["B",0,z,"u",0,h,"L",0,m,"O",0,f],29570);let k=a.z.object({seconds:(0,r.$)().optional().openapi({description:"Duration of the input audio in seconds",example:9.2}),total_tokens:(0,r.D)().optional().openapi({description:"Total number of tokens used (input + output)",example:113}),input_tokens:(0,r.D)().optional().openapi({description:"Number of input tokens billed for this request",example:83}),output_tokens:(0,r.D)().optional().openapi({description:"Number of output tokens generated",example:30}),cost:(0,r.$)().optional().openapi({description:"Total cost of the request in USD",example:508e-6})}).openapi("STTUsage",{description:"Aggregated usage statistics for the STT request",example:{seconds:9.2,total_tokens:113,input_tokens:83,output_tokens:30,cost:508e-6}}),T=a.z.object({id:(0,r.D)().openapi({description:"Segment index within the transcript",example:0}),seek:(0,r.D)().optional().openapi({description:"Seek offset of the segment",example:0}),start:(0,r.$)().openapi({description:"Segment start time in seconds",example:0}),end:(0,r.$)().openapi({description:"Segment end time in seconds",example:3.2}),text:a.z.string().openapi({description:"Transcribed text of the segment",example:"Hello there."}),tokens:a.z.array((0,r.D)()).optional().openapi({description:"Token IDs of the segment"}),temperature:(0,r.$)().optional().openapi({description:"Temperature used for the segment"}),avg_logprob:(0,r.$)().optional().openapi({description:"Average log probability of the segment"}),compression_ratio:(0,r.$)().optional().openapi({description:"Compression ratio of the segment"}),no_speech_prob:(0,r.$)().optional().openapi({description:"Probability the segment contains no speech"}),speaker:(0,r.D)().optional().openapi({description:"Speaker index for the segment, present when the provider returns diarization data",example:0}),speaker_label:a.z.string().optional().openapi({description:"Provider speaker label for the segment, present when the provider labels speakers with a string",example:"speaker_0"}),channel:(0,r.D)().optional().openapi({description:"Zero-based audio channel index for the segment, present when the provider transcribes channels separately",example:0})}).openapi("STTSegment",{description:"A timestamped transcript segment, returned when response_format is verbose_json",example:{id:0,seek:0,start:0,end:3.2,text:"Hello there.",tokens:[50364,2425,456],temperature:0,avg_logprob:-.28,compression_ratio:1.13,no_speech_prob:.01,speaker:0}}),M=a.z.object({word:a.z.string().openapi({description:'The transcribed word, or the event tag such as "(laughter)" when type is audio_event',example:"Hello"}),type:a.z.enum(["word","audio_event"]).optional().openapi({description:'Kind of entry; omitted or "word" for spoken words, "audio_event" for non-speech sounds the provider tags with timestamps',example:"word"}),start:(0,r.$)().openapi({description:"Word start time in seconds",example:0}),end:(0,r.$)().openapi({description:"Word end time in seconds",example:.4}),speaker:(0,r.D)().optional().openapi({description:"Speaker index for the word, present when the provider returns diarization data",example:0}),confidence:(0,r.$)().min(0).max(1).optional().openapi({description:"Provider confidence for the word from 0 to 1, present when the provider returns per-word confidence",example:.98}),speaker_label:a.z.string().optional().openapi({description:"Provider speaker label for the word, present when the provider labels speakers with a string",example:"speaker_0"}),channel:(0,r.D)().optional().openapi({description:"Zero-based audio channel index for the word, present when the provider transcribes channels separately",example:0})}).openapi("STTWord",{description:"A timestamped word, returned when the provider includes word-level timestamps",example:{word:"Hello",start:0,end:.4,speaker:0,confidence:.98}}),O=a.z.object({text:a.z.string().openapi({description:"Entity text as it appears in the transcript"}),type:a.z.string().openapi({description:"Provider entity type label",example:"name"}),start_char:(0,r.D)().openapi({description:"Zero-based character offset of the entity start within the response-level text (not seconds)",example:15}),end_char:(0,r.D)().openapi({description:"Zero-based exclusive character offset of the entity end within the response-level text (not seconds)",example:25})}).openapi("STTEntity",{description:"A detected entity, returned when the provider runs entity detection",example:{text:"John Smith",type:"name",start_char:15,end_char:25}});a.z.object({text:a.z.string().openapi({description:"The transcribed text",example:"Hello, this is a test of OpenAI speech-to-text transcription. The weather is sunny today and the temperature is around 72 degrees."}),usage:k.optional().openapi({description:"Aggregated usage statistics for the request"}),task:a.z.string().optional().openapi({description:"The task performed, present when response_format is verbose_json",example:"transcribe"}),language:a.z.string().optional().openapi({description:"Detected or forced language, present when response_format is verbose_json",example:"english"}),language_confidence:(0,r.$)().min(0).max(1).optional().openapi({description:"Provider confidence in the detected language from 0 to 1, present when response_format is verbose_json and the provider scores language detection",example:.98}),duration:(0,r.$)().optional().openapi({description:"Duration of the input audio in seconds, present when response_format is verbose_json",example:9.2}),confidence:(0,r.$)().min(0).max(1).optional().openapi({description:"Provider confidence for the whole transcript from 0 to 1, present when response_format is verbose_json and the provider scores the full transcript",example:.94}),segments:a.z.array(T).optional().openapi({description:"Timestamped transcript segments, present when response_format is verbose_json"}),words:a.z.array(M).optional().openapi({description:"Timestamped words, present when the provider returns word-level timestamps"}),entities:a.z.array(O).optional().openapi({description:"Detected entities with character offsets into text, present when the provider runs entity detection"})}).openapi("STTResponse",{description:"STT response containing transcribed text and optional usage statistics",example:{text:"Hello, this is a test of OpenAI speech-to-text transcription.",usage:{seconds:9.2,total_tokens:113,input_tokens:83,output_tokens:30,cost:508e-6}}});let C=T.pick({start:!0,end:!0,text:!0,speaker:!0}),E=M.pick({word:!0,start:!0,end:!0,speaker:!0}),P={response_format:"verbose_json",timestamp_granularities:["segment","word"]},F={diarize:!0,...P};function D(e,t){return j(e)===j(t)}function j(e){return e.toLowerCase().replaceAll(/[^\p{L}\p{N}]/gu,"")}function R({word:e,start:t,end:n,speaker:r}){return{text:e,start:t,end:n,speaker:r}}e.s(["L",0,F,"j",0,P,"Y",0,C,"u",0,E,"R",0,D,"k",0,function(e,t){var n,r,a,i;let o;if(e?.some(e=>void 0!==e.speaker))return e;if(t?.some(e=>void 0!==e.speaker))return t.map(R);if(void 0===e||0===e.length)return void 0!==t&&t.length>0?t.map(R):e;let[l,...s]=e;return void 0!==l&&0===s.length&&void 0!==t&&(n=l,(r=t).length>1&&D(r.map(({word:e})=>e).join(" "),n.text))?(a=l,i=t,o=a.text.split(/\s+/).filter(e=>e.length>0),i.map((e,t)=>({...R(e),text:(o.length===i.length?o[t]:void 0)??e.word}))):e}],704691);var $=e.i(241782);let V={Text:"text",Transcript:"transcript",Image:"image",Video:"video",VideoJob:"video-job",Audio:"audio"},N=a.z.object({voice:a.z.string().optional(),format:a.z.string().optional(),sampleRateHz:a.z.number().optional(),channels:a.z.number().optional(),characters:a.z.number().optional()}),L=a.z.object({segments:a.z.array(C).readonly()}),B=a.z.object({stage:a.z.enum($.y)});function U(e,t){return`${e.turnId}:${t}`}let G={image:V.Image,video:V.Video,audio:V.Audio};e.s(["w",0,N,"x",0,V,"t",0,{VideoGeneration:"video_generation",SpeechGeneration:"speech_generation",Transcription:"transcription"},"H",0,L,"k",0,B,"I",0,function(e,t){return`${e.turnId}:${t}`},"Q",0,function(e,t){return{type:"tool.finished",turnId:e.turnId,callId:t.callId,output:t.output}},"V",0,function(e,t){return[{type:"tool.started",turnId:e.turnId,callId:t.callId,name:t.name,kind:f.Server},{type:"tool.input.finished",turnId:e.turnId,callId:t.callId}]},"_",0,function(e,t){let n=G[t.kind];return{type:"media.added",turnId:e.turnId,partId:U(e,n),media:{kind:t.kind,url:t.url,...void 0===t.expiresAt?{}:{expiresAt:t.expiresAt}}}},"s",0,U,"g",0,function(e,t){return{type:"status",turnId:e.turnId,label:t}},"y",0,function(e,t){return{type:"text.delta",turnId:e.turnId,partId:U(e,V.Text),delta:t}},"l",0,function(e,t){return{type:"text.delta",turnId:e.turnId,partId:U(e,V.Transcript),delta:t}},"m",0,function(e,r){return{type:"turn.failed",turnId:e.turnId,error:function(e){let{status:r}=e;return{...p(e.code,e.message),status:void 0!==r&&(0,n.q)(r,t.g)?r:null,...void 0===r?{}:{rawStatus:r},location:e.location}}(r)}},"L",0,function(e){return{type:"turn.finished",turnId:e.turnId,reason:"stop"}},"A",0,function(e){return{type:"turn.started",turnId:e.turnId}},"j",0,function(e,t){return{type:"usage",turnId:e.turnId,usage:t}},"n",0,function(e,t){return{type:"media.added",turnId:e.turnId,partId:U(e,V.VideoJob),media:{kind:"video",jobId:t}}}],372953)},241782,e=>{"use strict";let t=["queued","processing"],n=[...t,"loading"];e.s(["G",0,2e3,"e",0,5,"T",0,5,"L",0,360,"H",0,5e3,"r",0,[500,1e3,2e3,2e3,3e3,3e3,5e3,5e3,5e3,5e3],"I",0,10,"K",0,t,"y",0,n])},390177,e=>{"use strict";e.i(342837),e.i(647204),e.i(988590),e.i(549692),e.s(["f",0,function(e){let t=e.trim().match(/^(\d+)\s*[x×]\s*(\d+)$/i);if(!t?.[1]||!t[2])return null;let n=Number.parseInt(t[1],10),r=Number.parseInt(t[2],10);return n<=0||r<=0?null:{width:n,height:r}}])},212416,e=>{"use strict";e.s(["f",0,function(e){return null!==e.runningImage?e.runningImage:null===e.desiredSetAt?e.bootedImage:null}])},219643,e=>{"use strict";e.i(427150);var t=e.i(368966);let n={[t.E.Max]:[t.E.XHigh,t.E.High,t.E.Medium,t.E.Low],[t.E.XHigh]:[t.E.High,t.E.Medium,t.E.Low],[t.E.Minimal]:[t.E.Low,t.E.Medium,t.E.High],[t.E.None]:[],[t.E.Low]:[t.E.Medium,t.E.High],[t.E.Medium]:[t.E.Low,t.E.High],[t.E.High]:[t.E.Medium,t.E.Low]};Object.values(t.V).reverse(),e.s(["w",0,function(e){let n=e?.supported_reasoning_efforts;return n&&0!==n.length?e.is_mandatory_reasoning?[...n]:[...n,t.E.None]:null},"$",0,function(e,t){if(!e)return;if(!t||0===t.length)return e;let r=new Set(t);if(r.has(e))return e;for(let t of n[e])if(r.has(t))return t}])},348563,e=>{"use strict";var t=e.i(632339),n=e.i(56629);let r=new Map([[t.f.Exa,{modes:Object.values(n.v),defaultMode:n.v.Auto,legacyBillingMode:n.v.Auto}],[t.f.Parallel,{modes:Object.values(n.d),defaultMode:n.d.Basic,legacyBillingMode:n.d.Turbo}]]);function a(e){return void 0===e?void 0:r.get(e)}e.s(["J",0,a,"M",0,function(e,t){let n=a(e);if(n)return void 0!==t&&n.modes.includes(t)?t:n.defaultMode}])},367765,e=>{"use strict";var t=e.i(427150);function n(){return"u">typeof globalThis&&"Summarizer"in globalThis}function r(){return a()?.model??null}function a(){if("u"n.call(e,t),create:t=>r.call(e,t)}}function o(e,t){var n,r;let a,i,o="function"!=typeof(a=s(n=e,"text"===t?"canCreateTextSession":"canCreateGenericSession"))?null:e=>a.call(n,e),d="function"!=typeof(i=s(r=e,"text"===t?"createTextSession":"createGenericSession"))?null:e=>i.call(r,e);return o&&d?{availability:async e=>(function(e){switch(e){case"readily":return"available";case"after-download":return"downloadable";case"no":return"unavailable";default:return e}})(await o(e)),create:async e=>(function(e){if("function"==typeof e.promptStreaming){var t;return{prompt:e.prompt??(t=e.promptStreaming.bind(e),async(e,n)=>{let r=[];for await(let a of b(t(e,n)))r.push(a);return r.join("")}),promptStreaming:e.promptStreaming.bind(e),destroy:e.destroy?.bind(e)??(()=>{})}}if("function"==typeof e.prompt){let t=e.prompt.bind(e);return{prompt:t,promptStreaming:(e,n)=>l(t,e,n),destroy:e.destroy?.bind(e)??(()=>{})}}throw Error("LanguageModel session is missing prompt APIs")})(await d(e))}:null}async function*l(e,t,n){yield await e(t,n)}function s(e,t){let n=u(e);return n?Reflect.get(n,t)??null:null}function d(e,t){return"function"==typeof s(e,t)}function p(e){let t=u(e);if(!t)return[];try{return Object.getOwnPropertyNames(t).sort()}catch{return[]}}function u(e){return"object"!=typeof e&&"function"!=typeof e||null===e?null:e}async function c(){return n()?Summarizer.availability({type:"headline",format:"plain-text",length:"short"}):null}async function f(e){let t=r();return t?t.availability(e):null}function m(e){return e.lengthComputable&&e.total>0?Math.round(e.loaded/e.total*100):e.loaded>=0&&e.loaded<=1?Math.round(100*e.loaded):Math.max(0,Math.min(100,Math.round(e.loaded)))}async function g(e){return A(e,{sharedContext:"This is a chat message sent to an AI assistant. Generate a concise title."})}async function h(e,t){let n=e.trim();if(!n)return null;let r=await y({input:n,options:t}),a=[];for await(let e of r)a.push(e);let i=a.join("").trim();return i.length>0?i:null}async function A(e,t){if(!n())return null;let r=e.trim();if(!r||"available"!==await Summarizer.availability({type:"headline",format:"plain-text",length:t?.length??"short"}))return null;let a=await Summarizer.create({type:"headline",format:"plain-text",length:t?.length??"short",sharedContext:t?.sharedContext});try{let e=(await a.summarize(r)).trim();if(!e)return null;let n=t?.maxLength??80;return e.slice(0,n)}finally{a.destroy()}}async function*y({input:e,signal:t,options:n,promptOptions:a}){let i=r();if(!i)throw Error("LanguageModel API is not available");let o=await i.availability(n);if("available"!==o)throw Error(`LanguageModel is ${o}`);let l=await i.create({...n,signal:t});try{let n=l.promptStreaming(e,{...a,signal:t});yield*b(n)}finally{l.destroy()}}async function*b(e){let t="",n=null;for await(let r of v(e)){if(!r)continue;null===n&&t.length>0&&(n=r.startsWith(t));let e=!0===n&&t.length>0?r.slice(t.length):r;t=!0===n?r:`${t}${r}`,e.length>0&&(yield e)}}async function*v(e){if("getReader"in e){let t=e.getReader();try{let e=await t.read();for(;!e.done;)yield e.value,e=await t.read()}finally{t.releaseLock()}return}yield*e}e.s(["P",0,f,"a",0,function(){let e="u"{t.addEventListener("downloadprogress",t=>{t instanceof ProgressEvent&&e(m(t))})}}).then(t=>{e(100),t.destroy()},e=>{t(e)}):t(Error("LanguageModel API is not available"))},"s",0,function(e,t,r){n()?Summarizer.create({type:"headline",format:"plain-text",length:"short",signal:r,monitor:t=>{t.addEventListener("downloadprogress",t=>{e(m(t))})}}).then(t=>{e(100),t.destroy()},e=>{t(e)}):t(Error("Summarizer API is not available"))}])},575889,e=>{"use strict";function t(e){try{let t=new URL(e);if(t.origin!==location.origin)return`${location.origin}${t.pathname}${t.search}`}catch{}return e}e.s(["f",0,function(){return{fetchApi:(e,t)=>fetch(e,t),rewriteUrl:t}}])},944946,e=>{"use strict";var t=e.i(942960),n=e.i(393182),r=e.i(331194);let a={[n.f.FusionFlash]:r.m.GeneralFast},i=[n.f.Fusion,...Object.keys(a)];e.s(["f",0,function(e){return i.includes((0,t.f)(e.toLowerCase()))}])},519004,e=>{"use strict";e.s(["f",0,function(e){return"number"==typeof e?.min&&"number"==typeof e.max}])},660571,e=>{"use strict";var t=e.i(167182);let n=new TextEncoder,r=/[^\x00-\x7F]/,a=/(?:)/;function i(e){if(void 0!==t.Buffer&&"function"==typeof e.isWellFormed&&e.isWellFormed())return a.test(""),t.Buffer.byteLength(e,"utf8");let n=e.search(r);if(-1===n)return e.length;a.test("");let i=n;for(let t=n;te+t.length,0);return n<1048576||t.some(e=>{let t=Math.min(e.length,4096);for(let n=0;n127)return!0;let n=Math.max(t,e.length-4096);for(let t=n;t127)return!0;return!1})?e.encode(t.join("")):function({encoder:e,strings:t,codeUnitLength:n}){let r=new Uint8Array(n),a=0;for(let n=0;ne+i(t),0));s.set(a.subarray(0,o));let d=o;for(let n of l){let r=e.encodeInto(n,s.subarray(d));if(r.read!==n.length)return e.encode(t.join(""));d+=r.written}return s}({encoder:e,strings:t,stringIndex:n,stringOffset:l.read,output:r,byteOffset:a})}return r}({encoder:e,strings:t,codeUnitLength:n})},"i",0,function(e){return e.length<1048576?n.encode(e).byteLength:i(e)}])},390623,e=>{"use strict";e.s(["q",0,"contains characters that cannot be sent in an HTTP header — check for stray unicode dashes or invisible characters from copy-paste","r",0,function(e){return null===function(e){let t=[],n=[],r=0;for(;r126)&&(t.push(`U+${a.toString(16).toUpperCase().padStart(4,"0")}`),n.push(r)),r+=a>65535?2:1}return 0===t.length?null:{codePoints:t,positions:n}}(e)}])},423491,34966,579255,711359,e=>{"use strict";e.s(["f",0,"[DONE]"],423491),e.i(660571);var t=e.i(647204);class n extends Error{type;field;value;line;lineTerminator;constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line,this.lineTerminator=t.lineTerminator}}function r(e){}function a(e){let t;if("function"==typeof e)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:a=r,onError:o=r,onRetry:l=r,onComment:s,shouldReportError:d}=e,p=[],u=!0,c="",f="";function m(e,n){if(""===e)return void(c.length>0&&a({id:t,event:f||void 0,data:c.endsWith("\n")?c.slice(0,-1):c}),t=void 0,c="",f="");if(e.startsWith(":")){s&&s(e.slice(e.startsWith(": ")?2:1));return}if(e.startsWith("data:"))return void h(e.slice(" "===e[5]?6:5));let r=e.indexOf(":");if(-1!==r){let t=e.slice(0,r),a=" "===e[r+1]?2:1;g({field:t,value:e.slice(r+a),line:e,lineTerminator:n});return}g({field:e,value:"",line:e,lineTerminator:n})}function g({field:e,value:r,line:a,lineTerminator:i}){switch(e){case"event":f=r;break;case"data":h(r);break;case"id":t=r.includes("\0")?void 0:r;break;case"retry":if(/^\d+$/.test(r)){l(Number.parseInt(r,10));break}if(d?.(a)===!1)break;o(new n(`Invalid \`retry\` value: "${r}"`,{type:"invalid-retry",value:r,line:a,lineTerminator:i}));break;default:if(d?.(a)===!1)break;o(new n(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:"unknown-field",field:e,value:r,line:a,lineTerminator:i}))}}function h(e){c=`${c}${e}
`}return{feed:function(e){let t=u?e.replace(/^\u00EF\xBB\u00BF/,""):e,n=p.at(-1)?.endsWith("\r")===!0;if(p.push(t),!n&&!t.includes("\n")&&!t.includes("\r")){u=!1;return}let r=p.join("");p=[];let a=i(r,m,h);a&&p.push(a),u=!1},reset:function(e={}){let n;if(p.length>0&&e.consume){let e=p.join("");if(e){let t=i(e,m,h,!0);t&&m(t),n=e}}return u=!0,t=void 0,c="",f="",p=[],n}}}function i(e,t,n,r=!1){let a=e.indexOf("\r");if(-1===a){var o,l,s=e,d=t,p=n;let r=0;for(;r{}),t.releaseLock()}}e.s(["f",0,a],34966),e.s(["f",0,o],579255),e.i(67089),e.i(30012);e.i(549692);e.i(390515);async function*l(e){let n,r,i,l=(n=new TextDecoder,r=[],i=a({onEvent:e=>{r.push(e.data)}}),e=>{r=[];let t=e?n.decode(e,{stream:!0}):n.decode();return i.feed(t),r}),s=o(e);try{for await(let e of s)for(let n of l(e))yield(0,t.N)(n)}catch(e){yield(0,t.Y)(e)}return s}e.s(["f",0,l],711359)},236911,e=>{"use strict";e.s(["f",0,function(e){throw Error(`Unexpected value: ${e}`)}])},586906,e=>{"use strict";e.i(371492);let t=e=>crypto.getRandomValues(new Uint8Array(e));var n,r=((n={}).Generate="gen",n.Embeddings="gen-emb",n.Character="char",n.Message="msg",n.Artifact="art",n.Generation="art-gen",n.ArtifactFile="art-file",n.ArtifactVersion="art-ver",n.ArtifactFileContent="art-file-cont",n.AssistantMessageItem="a-msg-item",n.Item="item",n.Chat="orc",n.StripeAddCredits="sac",n.VideoGeneration="gen-vid",n.Rerank="gen-rerank",n.Decisions="gen-dec",n.TTS="gen-tts",n.Transcription="gen-stt",n.ImageGeneration="gen-img",n.Batch="batch",n.BatchGeneration="gen-batch",n.ServerToolCall="gen-tool",n.ServerToolCheckpoint="gen-tool-cp",n.Realtime="gen-rt",n.RealtimeCheckpoint="gen-rt-cp",n.Request="req",n);let a=((e,n=21)=>((e,t,n)=>{let r=256-256%e.length;if(256===r){let r=e.length-1;return (a=t)=>{if(!a)return"";let i="";for(;;){let t=n(a),o=a|=0;for(;o--;)if((i+=e[t[o]&r]).length>=a)return i}}}return (a=t)=>{if(!a)return"";let i="",o=Math.ceil(409.6*a/r);for(;;){let t=n(o),l=o;for(;l--;)if(t[l]=a)return i}}})(e,0|n,t))("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",20),i=/^[0-9a-zA-Z]{20}$/;e.s(["I",()=>r,"t",0,function(e,t){let n=`${t}-`;if(!e.startsWith(n))return!1;let r=e.slice(n.length),a=r.indexOf("-");if(-1===a)return!1;let o=r.slice(0,a),l=r.slice(a+1),s=Number.parseInt(o,10);return!Number.isNaN(s)&&!(s<=0)&&i.test(l)},"L",0,function(e){let t=Math.floor(Date.now()/1e3);return`${e}-${t}-${a()}`}],586906)},733476,e=>{"use strict";e.i(988590);var t,n,r,a,i=((t={}).AzureOpenAIEmbeddingsAdapter="AzureOpenAIEmbeddingsAdapter",t.OpenAIEmbeddingsAdapter="OpenAIEmbeddingsAdapter",t.DeepInfraEmbeddingsAdapter="DeepInfraEmbeddingsAdapter",t.NvidiaEmbeddingsAdapter="NvidiaEmbeddingsAdapter",t.VoyageEmbeddingsAdapter="VoyageEmbeddingsAdapter",t.VoyageMultimodalEmbeddingsAdapter="VoyageMultimodalEmbeddingsAdapter",t.CohereEmbeddingsAdapter="CohereEmbeddingsAdapter",t.PerplexityEmbeddingsAdapter="PerplexityEmbeddingsAdapter",t.GoogleAIStudioEmbeddingsAdapter="GoogleAIStudioEmbeddingsAdapter",t.GoogleVertexEmbeddingsAdapter="GoogleVertexEmbeddingsAdapter",t.AmazonBedrockEmbeddingsAdapter="AmazonBedrockEmbeddingsAdapter",t),o=((n={}).AlibabaImageAdapter="AlibabaImageAdapter",n.SeedreamImageAdapter="SeedreamImageAdapter",n.XaiImageAdapter="XaiImageAdapter",n.RecraftImageAdapter="RecraftImageAdapter",n.BlackForestLabsImageAdapter="BlackForestLabsImageAdapter",n.BlackForestLabsFlux3ImageAdapter="BlackForestLabsFlux3ImageAdapter",n.SourcefulImageAdapter="SourcefulImageAdapter",n.SourcefulV2ImageAdapter="SourcefulV2ImageAdapter",n.SourcefulV25ImageAdapter="SourcefulV25ImageAdapter",n.SourcefulV26ImageAdapter="SourcefulV26ImageAdapter",n.OpenAIImageAdapter="OpenAIImageAdapter",n.MetaImageAdapter="MetaImageAdapter",n.GoogleAIStudioGeminiImageAdapter="GoogleAIStudioGeminiImageAdapter",n.GoogleVertexGeminiImageAdapter="GoogleVertexGeminiImageAdapter",n.AzureMAIImageAdapter="AzureMAIImageAdapter",n.AzureOpenAIImageAdapter="AzureOpenAIImageAdapter",n.QuiverImageAdapter="QuiverImageAdapter",n.KreaImageAdapter="KreaImageAdapter",n.NovitaImageAdapter="NovitaImageAdapter",n.TencentImageAdapter="TencentImageAdapter",n.TencentPanoramaImageAdapter="TencentPanoramaImageAdapter",n.MinimaxImageAdapter="MinimaxImageAdapter",n),l=((r={}).AzureDecisionsAdapter="AzureDecisionsAdapter",r.AzureOpenAIDecisionsAdapter="AzureOpenAIDecisionsAdapter",r.BasetenDecisionsAdapter="BasetenDecisionsAdapter",r.CloudflareDecisionsAdapter="CloudflareDecisionsAdapter",r.DeepInfraSystemOneDecisionsAdapter="DeepInfraSystemOneDecisionsAdapter",r.GoogleAIStudioDecisionsAdapter="GoogleAIStudioDecisionsAdapter",r.GoogleVertexDecisionsAdapter="GoogleVertexDecisionsAdapter",r.HeyGenDecisionsAdapter="HeyGenDecisionsAdapter",r.InceptionDecisionsAdapter="InceptionDecisionsAdapter",r.LiquidDecisionsAdapter="LiquidDecisionsAdapter",r.MakoraDecisionsAdapter="MakoraDecisionsAdapter",r.MorphDecisionsAdapter="MorphDecisionsAdapter",r.OpenAIDecisionsAdapter="OpenAIDecisionsAdapter",r.ParallelDecisionsAdapter="ParallelDecisionsAdapter",r.PerplexityDecisionsAdapter="PerplexityDecisionsAdapter",r.PrimeIntellectDecisionsAdapter="PrimeIntellectDecisionsAdapter",r.RespanDecisionsAdapter="RespanDecisionsAdapter",r.RespanSystemOneDecisionsAdapter="RespanSystemOneDecisionsAdapter",r.ScaleDownDecisionsAdapter="ScaleDownDecisionsAdapter",r.TogetherTevDecisionsAdapter="TogetherTevDecisionsAdapter",r.TypeSafeDecisionsAdapter="TypeSafeDecisionsAdapter",r.TypeSafeFirstPartyDecisionsAdapter="TypeSafeFirstPartyDecisionsAdapter",r),s=((a={}).AI21Adapter="AI21Adapter",a.AionLabsAdapter="AionLabsAdapter",a.AkashAdapter="AkashAdapter",a.ArceeAdapter="ArceeAdapter",a.AmazonBedrockConverseAdapter="AmazonBedrockConverseAdapter",a.AmazonBedrockConverseNovaReasoningAdapter="AmazonBedrockConverseNovaReasoningAdapter",a.AmazonBedrockInvokeAnthropicAdapter="AmazonBedrockInvokeAnthropicAdapter",a.AmazonBedrockOSSAdapter="AmazonBedrockOSSAdapter",a.AmazonBedrockRuntimeChatCompletionsAdapter="AmazonBedrockRuntimeChatCompletionsAdapter",a.AmazonNovaAdapter="AmazonNovaAdapter",a.AnthropicMessageAdapter="AnthropicMessageAdapter",a.ClaudeOnAwsAdapter="ClaudeOnAwsAdapter",a.AlibabaAdapter="AlibabaAdapter",a.AmbientAdapter="AmbientAdapter",a.BlackForestLabsAdapter="BlackForestLabsAdapter",a.BaiduAdapter="BaiduAdapter",a.AvianAdapter="AvianAdapter",a.AzureAnthropicAdapter="AzureAnthropicAdapter",a.AzureMistralAdapter="AzureMistralAdapter",a.AzureOpenAIAdapter="AzureOpenAIAdapter",a.AzureOpenAIResponsesAdapter="AzureOpenAIResponsesAdapter",a.AzureMAIImageAdapter="AzureMAIImageAdapter",a.AzureOSSAdapter="AzureOSSAdapter",a.BasetenAdapter="BasetenAdapter",a.BytePlusAdapter="BytePlusAdapter",a.ChutesAdapter="ChutesAdapter",a.CloudflareAdapter="CloudflareAdapter",a.CohereCompatAdapter="CohereCompatAdapter",a.CohereV2Adapter="CohereV2Adapter",a.InternalStreamCohereV2Adapter="InternalStreamCohereV2Adapter",a.CerebrasAdapter="CerebrasAdapter",a.ClarifaiAdapter="ClarifaiAdapter",a.CosineAdapter="CosineAdapter",a.CrucibleAdapter="CrucibleAdapter",a.CrucibleResponsesAdapter="CrucibleResponsesAdapter",a.CrusoeAdapter="CrusoeAdapter",a.DarkbloomAdapter="DarkbloomAdapter",a.DatabricksAnthropicAdapter="DatabricksAnthropicAdapter",a.DatabricksOpenResponsesAdapter="DatabricksOpenResponsesAdapter",a.DeepInfraAdapter="DeepInfraAdapter",a.DeepSeekAdapter="DeepSeekAdapter",a.DigitalOceanAdapter="DigitalOceanAdapter",a.EncodedImageOpenAIAdapter="EncodedImageOpenAIAdapter",a.FakeAdapter="FakeAdapter",a.FireworksAdapter="FireworksAdapter",a.FireworksAnthropicAdapter="FireworksAnthropicAdapter",a.FriendliAdapter="FriendliAdapter",a.GoogleAIStudioGeminiAdapter="GoogleAIStudioGeminiAdapter",a.GoogleVertexAnthropicAdapter="GoogleVertexAnthropicAdapter",a.GoogleVertexGeminiAdapter="GoogleVertexGeminiAdapter",a.GroqAdapter="GroqAdapter",a.InceptionAdapter="InceptionAdapter",a.InceptronAdapter="InceptronAdapter",a.InferactVLLMAdapter="InferactVLLMAdapter",a.InferenceNetAdapter="InferenceNetAdapter",a.InfermaticAdapter="InfermaticAdapter",a.InflectionAdapter="InflectionAdapter",a.InflectionLegacyAdapter="InflectionLegacyAdapter",a.InternalStreamAmazonBedrockInvokeAnthropicAdapter="InternalStreamAmazonBedrockInvokeAnthropicAdapter",a.InternalStreamAmazonBedrockOpenAIResponsesAdapter="InternalStreamAmazonBedrockOpenAIResponsesAdapter",a.InternalStreamAmazonBedrockRuntimeOpenAIResponsesAdapter="InternalStreamAmazonBedrockRuntimeOpenAIResponsesAdapter",a.InternalStreamAnthropicMessageAdapter="InternalStreamAnthropicMessageAdapter",a.InternalStreamAzureAnthropicAdapter="InternalStreamAzureAnthropicAdapter",a.InternalStreamAzureMAIImageAdapter="InternalStreamAzureMAIImageAdapter",a.InternalStreamAzureOpenAIResponsesAdapter="InternalStreamAzureOpenAIResponsesAdapter",a.InternalStreamClaudeOnAwsAdapter="InternalStreamClaudeOnAwsAdapter",a.InternalStreamGoogleAIStudioInteractionsAdapter="InternalStreamGoogleAIStudioInteractionsAdapter",a.InternalStreamGoogleVertexAnthropicAdapter="InternalStreamGoogleVertexAnthropicAdapter",a.InternalStreamGoogleVertexInteractionsAdapter="InternalStreamGoogleVertexInteractionsAdapter",a.InternalStreamGoogleVertexResponsesAdapter="InternalStreamGoogleVertexResponsesAdapter",a.InternalStreamOpenAIResponsesAdapter="InternalStreamOpenAIResponsesAdapter",a.InternalStreamRecraftAdapter="InternalStreamRecraftAdapter",a.InternalStreamXAIImageAdapter="InternalStreamXAIImageAdapter",a.InternalStreamXAIResponsesAdapter="InternalStreamXAIResponsesAdapter",a.IonetAdapter="IonetAdapter",a.IonstreamAdapter="IonstreamAdapter",a.MakoraAdapter="MakoraAdapter",a.MancerAdapter="MancerAdapter",a.InternalStreamMetaResponsesAdapter="InternalStreamMetaResponsesAdapter",a.MistralAdapter="MistralAdapter",a.MinimaxAdapter="MinimaxAdapter",a.ModelRunAdapter="ModelRunAdapter",a.MinimaxChatCompletionV2Adapter="MinimaxChatCompletionV2Adapter",a.MoonshotAdapter="MoonshotAdapter",a.MorphAdapter="MorphAdapter",a.MorphFastApplyAdapter="MorphFastApplyAdapter",a.NearAIAdapter="NearAIAdapter",a.NebiusAdapter="NebiusAdapter",a.NexAGIAdapter="NexAGIAdapter",a.NextBitAdapter="NextBitAdapter",a.NovitaAdapter="NovitaAdapter",a.NvidiaAdapter="NvidiaAdapter",a.OllamaAdapter="OllamaAdapter",a.OpenAIAdapter="OpenAIAdapter",a.AtlasCloudAdapter="AtlasCloudAdapter",a.GMICloudAdapter="GMICloudAdapter",a.OpenInferenceAdapter="OpenInferenceAdapter",a.ParasailAdapter="ParasailAdapter",a.PhalaAdapter="PhalaAdapter",a.PearlResearchAdapter="PearlResearchAdapter",a.PrimeIntellectAdapter="PrimeIntellectAdapter",a.OpenAIResponsesAdapter="OpenAIResponsesAdapter",a.PerceptronAdapter="PerceptronAdapter",a.PerplexityAdapter="PerplexityAdapter",a.RecraftAdapter="RecraftAdapter",a.RelaceAdapter="RelaceAdapter",a.StealthAdapter="StealthAdapter",a.StealthAdapter2="StealthAdapter2",a.InternalStreamStealthAdapter2="InternalStreamStealthAdapter2",a.StepFunAdapter="StepFunAdapter",a.StreamLakeAdapter="StreamLakeAdapter",a.TogetherAdapter="TogetherAdapter",a.UnbiasedAdapter="UnbiasedAdapter",a.UpstageAdapter="UpstageAdapter",a.XAIImageAdapter="XAIImageAdapter",a.XAIResponsesAdapter="XAIResponsesAdapter",a.XiaomiAdapter="XiaomiAdapter",a.ZAIAdapter="ZAIAdapter",a.SiliconFlowAdapter="SiliconFlowAdapter",a.SailResearchAdapter="SailResearchAdapter",a.SakanaAIAdapter="SakanaAIAdapter",a.SambaNovaAdapter="SambaNovaAdapter",a.ScaleDownAdapter="ScaleDownAdapter",a.TenstorrentAdapter="TenstorrentAdapter",a.ThinkingMachinesAdapter="ThinkingMachinesAdapter",a.SeedreamAdapter="SeedreamAdapter",a.InternalStreamSeedreamAdapter="InternalStreamSeedreamAdapter",a.SourcefulAdapter="SourcefulAdapter",a.SourcefulV2Adapter="SourcefulV2Adapter",a.SourcefulV25Adapter="SourcefulV25Adapter",a.SourcefulV26Adapter="SourcefulV26Adapter",a.InternalStreamBlackForestLabsAdapter="InternalStreamBlackForestLabsAdapter",a.InternalStreamSourcefulAdapter="InternalStreamSourcefulAdapter",a.InternalStreamSourcefulV2Adapter="InternalStreamSourcefulV2Adapter",a.InternalStreamSourcefulV25Adapter="InternalStreamSourcefulV25Adapter",a.InternalStreamSourcefulV26Adapter="InternalStreamSourcefulV26Adapter",a.VeniceAdapter="VeniceAdapter",a.VertexOpenAIAdapter="VertexOpenAIAdapter",a.VLLMChatCompletionsAdapter="VLLMChatCompletionsAdapter",a.VLLMOpenAIAdapter="VLLMOpenAIAdapter",a.WaferAdapter="WaferAdapter",a.WandbAdapter="WandbAdapter",a);e.s(["n",()=>s,"o",0,{Stub:"stub",OpenAIBatchAdapter:"OpenAIBatchAdapter",AnthropicBatchAdapter:"AnthropicBatchAdapter",GoogleAIStudioGeminiBatchAdapter:"GoogleAIStudioGeminiBatchAdapter",VertexGeminiBatchAdapter:"VertexGeminiBatchAdapter",VertexDeferredInteractionsBatchAdapter:"VertexDeferredInteractionsBatchAdapter",TogetherBatchAdapter:"TogetherBatchAdapter",ParasailBatchAdapter:"ParasailBatchAdapter",DeepInfraBatchAdapter:"DeepInfraBatchAdapter",AlibabaBatchAdapter:"AlibabaBatchAdapter",FireworksBatchAdapter:"FireworksBatchAdapter",MistralBatchAdapter:"MistralBatchAdapter",XAIBatchAdapter:"XAIBatchAdapter",SailResearchBatchAdapter:"SailResearchBatchAdapter",MorphBatchAdapter:"MorphBatchAdapter"},"G",()=>l,"R",()=>i,"W",0,{CloudflareClairicExtractionsAdapter:"CloudflareClairicExtractionsAdapter",InceptionExtractionsAdapter:"InceptionExtractionsAdapter",InferenceNetSchematronExtractionsAdapter:"InferenceNetSchematronExtractionsAdapter",PerplexityExtractionsAdapter:"PerplexityExtractionsAdapter",SageExtractionsAdapter:"SageExtractionsAdapter",ScaleDownExtractionsAdapter:"ScaleDownExtractionsAdapter"},"O",()=>o,"u",0,{AlibabaTTSAdapter:"AlibabaTTSAdapter",AssemblyAITTSAdapter:"AssemblyAITTSAdapter",AzureTTSAdapter:"AzureTTSAdapter",OpenAITTSAdapter:"OpenAITTSAdapter",OpenAISSETTSAdapter:"OpenAISSETTSAdapter",DeepInfraTTSAdapter:"DeepInfraTTSAdapter",GoogleVertexTTSAdapter:"GoogleVertexTTSAdapter",GoogleAIStudioTTSAdapter:"GoogleAIStudioTTSAdapter",MistralTTSAdapter:"MistralTTSAdapter",XAITTSAdapter:"XAITTSAdapter",DeepgramTTSAdapter:"DeepgramTTSAdapter",MinimaxTTSAdapter:"MinimaxTTSAdapter",FishAudioTTSAdapter:"FishAudioTTSAdapter",TogetherTTSAdapter:"TogetherTTSAdapter",SeedAudioTTSAdapter:"SeedAudioTTSAdapter",ElevenLabsTTSAdapter:"ElevenLabsTTSAdapter",HeyGenTTSAdapter:"HeyGenTTSAdapter",SpeechifyTTSAdapter:"SpeechifyTTSAdapter"}])},898820,e=>{"use strict";let t={ChatCompletions:"chat-completions",Responses:"responses",AnthropicMessages:"anthropic-messages",Completions:"completions",Other:"other"},n=[{suffix:"/chat/completions",skin:t.ChatCompletions},{suffix:"/responses",skin:t.Responses},{suffix:"/messages",skin:t.AnthropicMessages},{suffix:"/completions",skin:t.Completions}];e.s(["$",0,n,"Q",0,t])},683838,e=>{"use strict";e.s(["E",0,{"1:1":"1:1","1:2":"1:2","1:3":"1:3","1:4":"1:4","1:8":"1:8","2:1":"2:1","2:3":"2:3","3:1":"3:1","2.35:1":"2.35:1","3:2":"3:2","3:4":"3:4","4:1":"4:1","4:3":"4:3","4:5":"4:5","5:2":"5:2","5:4":"5:4","5:7":"5:7","7:5":"7:5","8:1":"8:1","9:16":"9:16","16:9":"16:9","9:19.5":"9:19.5","19.5:9":"19.5:9","9:20":"9:20","20:9":"20:9","9:21":"9:21","21:9":"21:9",auto:"auto"},"g",0,{png:"png",jpeg:"jpeg",webp:"webp",svg:"svg",gif:"gif"},"r",0,{512:"512",768:"768","1K":"1K","1.5K":"1.5K","2K":"2K","4K":"4K"},"M",0,{edit:"edit",reference:"reference"},"u",0,{auto:"auto",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}])},331194,485913,e=>{"use strict";var t=e.i(882844),n=e.i(635157),r=e.i(72916);e.s(["P",0,4,"b",0,16e3,"Z",0,8,"h",0,16,"a",0,8],485913);let a={GeneralHigh:"general-high",GeneralBudget:"general-budget",GeneralFast:"general-fast"},i=n.z.union([n.z.string(),(0,t.$)(),n.z.boolean(),n.z.null()]),o=n.z.union([i,n.z.array(i),n.z.record(n.z.string(),i)]),l=n.z.object({type:n.z.string().openapi({description:'Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").'}),parameters:n.z.record(n.z.string(),o).optional().openapi({description:"Optional configuration forwarded as the tool's `parameters` object."})}),s=n.z.object({id:n.z.literal(r.f.Fusion),enabled:n.z.boolean().optional().openapi({description:"Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true."}),preset:n.z.nativeEnum(a).optional().openapi({description:"Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.",example:"general-high"}),analysis_models:n.z.array(n.z.string()).min(1).max(8).optional().openapi({description:'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-sol-latest, ~google/gemini-pro-latest).',example:["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"]}),model:n.z.string().optional().openapi({description:"For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.",example:"~anthropic/claude-opus-latest"}),max_tool_calls:n.z.number().int().min(1).max(16).optional().openapi({description:"For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16.",example:12}),tools:n.z.array(l).max(8).optional().openapi({description:'For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).',example:[{type:"openrouter:web_search",parameters:{excluded_domains:["example.com"]}},{type:"openrouter:web_fetch"}]})}).openapi("FusionPlugin",{example:{id:"fusion",enabled:!0,analysis_models:["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"],model:"~anthropic/claude-opus-latest"}});e.s(["h",0,s,"m",0,a],331194)},685017,208218,e=>{"use strict";var t=e.i(882844),n=e.i(635157);let r=["auto","native","openrouter","exa","parallel","firecrawl"],a={engine:n.z.enum(r).optional().openapi("WebFetchEngineEnum",{description:'Which fetch engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider\'s built-in fetch. "exa" uses Exa Contents API. "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape. "parallel" uses the Parallel extract API.',example:"auto"}),allowed_domains:n.z.array(n.z.string()).optional().openapi({description:"Only fetch from these domains."}),blocked_domains:n.z.array(n.z.string()).optional().openapi({description:"Never fetch from these domains."}),max_uses:(0,t.D)().min(1).optional().openapi({description:"Maximum number of web fetches per request. Once exceeded, the tool returns an error.",example:10}),max_content_tokens:(0,t.D)().min(1).optional().openapi({description:"Maximum content length in approximate tokens. Content exceeding this limit is truncated.",example:1e5})},i=n.z.object(a).openapi("WebFetchServerToolConfig",{description:"Configuration for the openrouter:web_fetch server tool",example:{max_uses:10,max_content_tokens:1e5}});e.s(["k",0,r,"Q",0,1,"$",0,1,"K",0,a,"p",0,i],685017);var o=e.i(895185),l=e.i(121817),s=e.i(751899),d=e.i(463826);let p=["native","exa","parallel","firecrawl","perplexity","auto"],u=["low","medium","high"],c=n.z.enum(p).optional().openapi("WebSearchEngineEnum",{description:'Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider\'s built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results).',example:"auto"}),f=o.f.optional(),m=(0,t.D)().min(1).max(d.i).optional().openapi({description:"Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped.",example:5}),g=(0,t.D)().min(1).optional().openapi({description:"Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it.",example:3}),h=(0,t.D)().min(1).optional().openapi({description:"Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.",example:50}),A=n.z.enum(u).optional().openapi("SearchQualityLevel",{description:"How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.",example:"medium"}),y=(0,t.D)().min(1).max(d.W).optional().openapi({description:"Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity).",example:2e3}),b=l.f.partial({type:!0}).optional().openapi("WebSearchUserLocationServerTool",{description:"Approximate user location for location-biased results.",example:{type:"approximate",city:"San Francisco",region:"California",country:"US",timezone:"America/Los_Angeles"}}),v=n.z.array(n.z.string()).optional().openapi({description:"Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXAI). Cannot be used with excluded_domains."}),I=n.z.array(n.z.string()).optional().openapi({description:"Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXAI. Cannot be used with allowed_domains."}),S=s.f.optional(),x={engine:c,mode:f,max_results:m,max_uses:g,max_total_results:h,search_context_size:A,max_characters:y,user_location:b,allowed_domains:v,excluded_domains:I,x_search:S},w=n.z.object(x).openapi("WebSearchConfig",{example:{max_results:5,search_context_size:"medium"}}),_=w.openapi("WebSearchServerToolConfig",{description:"Configuration for the openrouter:web_search server tool",example:{max_results:5,search_context_size:"medium"}});e.s(["E",0,u,"m",0,p,"u",0,1,"H",0,1,"F",0,1,"y",0,1,"e",0,x,"z",0,_,"V",0,c,"v",0,m,"C",0,g,"G",0,f,"i",0,w,"o",0,S],208218)},470672,e=>{"use strict";e.s(["f",0,500])},173589,e=>{"use strict";e.i(882844);var t=e.i(635157);let n={Applied:"applied",Unchanged:"unchanged",Failed:"failed"},r=t.z.enum([n.Applied,n.Unchanged,n.Failed]),a={UpToDate:"up_to_date",NotRunning:"not_running",NoVm:"no_vm",NoReconcileTimer:"no_reconcile_timer",VaultSidecarConfigStale:"vault_sidecar_config_stale",Unrecognized:"unrecognized"};t.z.string().min(1).max(512).optional();t.z.enum(["stable","alpha"]).optional();let i=t.z.discriminatedUnion("kind",[t.z.object({kind:t.z.literal("available")}),t.z.object({kind:t.z.literal("unavailable"),reason:t.z.enum([a.UpToDate,a.NotRunning,a.NoVm,a.NoReconcileTimer,a.VaultSidecarConfigStale,a.Unrecognized]).catch(a.Unrecognized)})]),o={Applied:"applied",Pending:"pending",Unknown:"unknown"},l=t.z.enum([o.Applied,o.Pending,o.Unknown]),s=t.z.object({instructions:l,model:l,observedAt:t.z.string().nullable()});o.Unknown,o.Unknown;let d=t.z.object({bootedImage:t.z.string().nullable(),canReconcile:t.z.boolean().nullable().default(null),alphaImage:t.z.string().nullish(),alphaVersion:t.z.string().nullish(),currentImage:t.z.string().nullable(),currentVersion:t.z.string().nullish(),hasStaleVaultSidecar:t.z.boolean().nullable().default(null),desiredImage:t.z.string().nullable(),desiredSetAt:t.z.string().nullable(),hasVm:t.z.boolean(),observedAt:t.z.string().nullable(),runningImage:t.z.string().nullable(),personaSync:s.optional(),runningModel:t.z.string().nullable().default(null),runningModelObservedAt:t.z.string().nullable().default(null),runningVersion:t.z.string().nullable().default(null),resolvedVersion:t.z.object({image:t.z.string(),version:t.z.string()}).nullable().default(null),state:r.nullable()});t.z.object({availability:i,runtimeImage:d}),e.s(["B",0,o,"e",0,n,"C",0,r,"f",0,a])},744475,476434,3977,e=>{"use strict";var t=e.i(663456),n=e.i(819750),r=e.i(524287),a=e.i(119816),i=e.i(905361),o=e.i(342837),l=e.i(647204),s=e.i(882844),d=e.i(635157),p=e.i(552221),u=e.i(549692),c=e.i(470672),f=e.i(613497),m=e.i(173465),g=e.i(618115),h=e.i(56222);e.i(16043);var A=e.i(612523),y=e.i(702596),b=e.i(55569);let v=new WeakMap,I=(0,s.j)(d.z.object({error:d.z.object({code:d.z.literal("intern_asleep")})})),S=(0,s.j)(d.z.object({error:d.z.object({code:d.z.enum(["intern_restarting","intern_timeout"])})}));function x(e){let t=(0,y.i)(e)?.message;return void 0!==t&&S((0,b.N)(t))}function w(e,t){return!(x(e.state.error)||_(e.state.error))&&t}function _(e){let t=(0,y.i)(e)?.message;return void 0!==t&&I((0,b.N)(t))}function z(e){if(v.get(e.client)?.delete((0,f.q)(e.queryKey))===!0)return{};let t=e.client.getQueryState(e.queryKey);return void 0===t||void 0===t.data&&0===t.errorUpdateCount?{}:k}let k={"X-Ori-Background-Refresh":"1"};e.s(["Q",0,k,"V",0,z,"n",0,_,"i",0,x,"g",0,w,"o",0,function(e){let t=v.get(e.client)??new Set;t.add((0,f.q)(e.queryKey)),v.set(e.client,t)}],476434);let T=(0,r.f)("intern-provenance",{list:(e,t)=>[{internId:t,workspaceId:e}]});e.s(["V",0,T,"Z",0,function(e){return(0,m.f)({queryKey:T.list(e.workspaceId,e.internId),staleTime:a.y.ALWAYS,queryFn:({signal:t})=>{var r;return(0,n.f)((r=e.internId,`/api/frontend/v1/private/interns/${encodeURIComponent(r)}/provenance`),{signal:t})}})}],3977);let M="/api/frontend/v1/private/interns",O=(0,r.f)("interns",{list:e=>[{workspaceId:e}],byName:(e,t)=>[{name:t,workspaceId:e}],detail:(e,t)=>[{internId:t,workspaceId:e}],runtimeImage:(e,t)=>[{internId:t,workspaceId:e}],autoUpdate:(e,t)=>[{internId:t,workspaceId:e}],resolvedModel:(e,t)=>[{internId:t,workspaceId:e}],features:(e,t)=>[{internId:t,workspaceId:e}],featureSources:(e,t)=>[{internId:t,workspaceId:e}],operations:(e,t)=>[{internId:t,workspaceId:e}],usage:(e,t)=>[{internId:t,workspaceId:e}],featureFiles:e=>[e],featureFile:e=>[e],featureSkill:e=>[e],spend:e=>[{workspaceId:e}]}),C=c.f;function E(e){return{spendByInternId:new Map(e.interns.map(e=>[e.internId,e.spendUsd])),windowStart:e.windowStart}}async function P(e,t){let n=await (0,p.f)(`${M}/${e}/runtime-image`,{body:JSON.stringify({...void 0===t.image?{}:{image:t.image},...void 0===t.expectedImage?{}:{expectedImage:t.expectedImage}}),headers:{"Content-Type":"application/json"},method:"POST"});return(0,l.V)(n)?n:(0,l.N)(n.data.data)}let F=d.z.object({data:d.z.object({enqueued:d.z.literal(!0)})}),D=(0,s.j)(F),j=d.z.object({error:d.z.object({code:d.z.string(),message:d.z.string()})}),R={InvalidResponse:"invalid_response",Network:"network",Server:"server"},$=d.z.object({provisioning_failure_reason:d.z.enum(R),provisioning_server_code:d.z.string().nullable(),provisioning_server_message:d.z.string().nullable()});function V(e,t){return(0,u.O)({location:e,rawError:`provisioning action failed: ${t.reason}`,internal:{provisioning_failure_reason:t.reason,provisioning_server_code:t.serverCode,provisioning_server_message:t.serverMessage}})}async function N(e,t){let n="interns.requestProvisioningAction",r=await (0,l.$)(()=>fetch(e,t));if((0,l.V)(r))return V(n,{reason:R.Network,serverCode:null,serverMessage:null});let a=await r.data.json().catch(()=>null);if(r.data.ok)return D(a)?(0,l.N)(!0):V(n,{reason:R.InvalidResponse,serverCode:null,serverMessage:null});let i=(0,s.C)(j,a);return V(n,{reason:R.Server,serverCode:(0,l.V)(i)?null:i.data.error.code,serverMessage:(0,l.V)(i)?null:i.data.error.message})}e.s(["R",0,R,"H",0,function(e,t){return(0,m.f)({queryKey:O.autoUpdate(e,t),queryFn:({signal:e})=>(0,n.f)(`${M}/${t}/auto-update`,{signal:e})})},"S",0,function(e,t){return(0,m.f)({queryKey:O.byName(e,t),queryFn:({signal:r})=>(0,n.f)(M,{searchParams:{limit:1,name:t,workspaceId:e},signal:r}),staleTime:a.y.ALWAYS})},"X",0,function(e,t){return(0,m.f)({queryKey:O.detail(e,t),queryFn:null===e||null===t?f.V:({signal:e})=>(0,n.f)(`${M}/${t}`,{signal:e})})},"t",0,function(e){let{enabled:t,...r}=e;return(0,m.f)({queryKey:O.featureFile(r),queryFn:({signal:e})=>(0,n.f)(`${M}/${r.internId}/features/${encodeURIComponent(r.featureId)}/files/${r.path.split("/").map(encodeURIComponent).join("/")}`,{signal:e}),enabled:t,staleTime:a.y.ALWAYS})},"_",0,function(e){let{enabled:t,...r}=e;return(0,m.f)({queryKey:O.featureFiles(r),queryFn:({signal:e})=>(0,n.f)(`${M}/${r.internId}/features/${encodeURIComponent(r.featureId)}/files`,{signal:e}),enabled:t,staleTime:a.y.ALWAYS})},"V",0,function(e){let{enabled:t,...r}=e;return(0,m.f)({queryKey:O.featureSkill(r),queryFn:({signal:e})=>(0,n.f)(`${M}/${r.internId}/features/${encodeURIComponent(r.featureId)}/skills/${encodeURIComponent(r.skillName)}`,{signal:e}),enabled:t,staleTime:a.y.ALWAYS})},"c",0,function(e){let{enabled:t,internId:r,workspaceId:i}=e;return(0,m.f)({queryKey:O.featureSources(i,r),queryFn:({client:e,queryKey:t,signal:a})=>(0,n.f)(`${M}/${r}/feature-sources`,{headers:z({client:e,queryKey:t}),signal:a}),enabled:t,staleTime:a.y.ALWAYS})},"T",0,function(e){let{enabled:t,internId:r,workspaceId:i}=e;return(0,m.f)({queryKey:O.features(i,r),queryFn:({client:e,queryKey:t,signal:a})=>(0,n.f)(`${M}/${r}/features`,{headers:z({client:e,queryKey:t}),signal:a}),enabled:t,staleTime:a.y.ALWAYS})},"d",0,function(e,t){return`${M}/${e}/icon?v=${t}`},"f",0,O,"M",0,function(e){let{enabled:t,internId:r,liveRefreshMs:i=!1,workspaceId:o}=e;return(0,m.f)({queryKey:O.operations(o,r),queryFn:({client:e,queryKey:t,signal:a})=>(0,n.f)(`${M}/${r}/operations`,{headers:z({client:e,queryKey:t}),signal:a}),enabled:t,staleTime:a.y.ALWAYS,refetchInterval:e=>w(e,i)})},"D",0,function(e,t){return(0,m.f)({queryKey:O.resolvedModel(e,t),queryFn:null===t?f.V:({signal:e})=>(0,n.f)(`${M}/${t}/model/resolved`,{signal:e}),staleTime:a.y.DEFAULT})},"e",0,function(e,t){return(0,m.f)({queryKey:O.runtimeImage(e,t),queryFn:null===t?f.V:({signal:e})=>(0,n.f)(`${M}/${t}/runtime-image`,{signal:e}),refetchInterval:e=>{var t;return void 0!==(t=e.state.data)&&(0,A.x)({availability:t.availability,facts:t.runtimeImage,nowMs:Date.now()}).state===A.I.Pending&&1e4},refetchIntervalInBackground:!0})},"B",0,function(e){let{enabled:t,internId:r,liveRefreshMs:i=!1,workspaceId:o}=e;return(0,m.f)({queryKey:O.usage(o,r),queryFn:({client:e,queryKey:t,signal:a})=>(0,n.f)(`${M}/${r}/operations/usage`,{headers:z({client:e,queryKey:t}),signal:a}),enabled:t,staleTime:a.y.ALWAYS,refetchInterval:e=>w(e,i)})},"b",0,function(e){return(0,m.f)({queryKey:O.list(e),queryFn:null===e?f.V:({signal:t})=>(0,n.f)(M,{searchParams:{limit:C,workspaceId:e},signal:t}),placeholderData:null===e?void 0:f.y})},"G",0,function(e){let t=(0,s.C)($,e.internal);return(0,l.V)(t)?{reason:R.Network,serverCode:null,serverMessage:null}:{reason:t.data.provisioning_failure_reason,serverCode:t.data.provisioning_server_code,serverMessage:t.data.provisioning_server_message}},"Q",0,function(e){let n,r,a,o,s,d=(0,t.c)(14);return d[0]!==e.internId?(n=async t=>{let{origin:n,skill:r}=t,a=await (0,p.f)(`${M}/${e.internId}/skills?origin=${n}`,{body:JSON.stringify(r),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,l.V)(a)?a:(0,l.N)(a.data.data)},d[0]=e.internId,d[1]=n):n=d[1],d[2]!==e.internId||d[3]!==e.workspaceId?(r=O.features(e.workspaceId,e.internId),d[2]=e.internId,d[3]=e.workspaceId,d[4]=r):r=d[4],d[5]!==e.internId||d[6]!==e.workspaceId?(a=T.list(e.workspaceId,e.internId),d[5]=e.internId,d[6]=e.workspaceId,d[7]=a):a=d[7],d[8]!==r||d[9]!==a?(o=[r,a],d[8]=r,d[9]=a,d[10]=o):o=d[10],d[11]!==n||d[12]!==o?(s={mutationFn:n,invalidates:o},d[11]=n,d[12]=o,d[13]=s):s=d[13],(0,i.h)(s)},"C",0,function(e){let n,r,a,o,s,d,u=(0,t.c)(19);return u[0]!==e.action||u[1]!==e.internId?(n=async t=>{let n=await (0,p.f)(`${M}/${e.internId}/feature-sources${"add"===e.action?"":"/remove"}`,{body:JSON.stringify({source:t}),headers:{"Content-Type":"application/json"},method:"add"===e.action?"PUT":"POST"});return(0,l.V)(n)?n:(0,l.N)(n.data.data)},u[0]=e.action,u[1]=e.internId,u[2]=n):n=u[2],u[3]!==e.internId||u[4]!==e.workspaceId?(r=O.featureSources(e.workspaceId,e.internId),u[3]=e.internId,u[4]=e.workspaceId,u[5]=r):r=u[5],u[6]!==e.internId||u[7]!==e.workspaceId?(a=O.features(e.workspaceId,e.internId),u[6]=e.internId,u[7]=e.workspaceId,u[8]=a):a=u[8],u[9]!==e.internId||u[10]!==e.workspaceId?(o=T.list(e.workspaceId,e.internId),u[9]=e.internId,u[10]=e.workspaceId,u[11]=o):o=u[11],u[12]!==r||u[13]!==a||u[14]!==o?(s=[r,a,o],u[12]=r,u[13]=a,u[14]=o,u[15]=s):s=u[15],u[16]!==n||u[17]!==s?(d={mutationFn:n,invalidates:s},u[16]=n,u[17]=s,u[18]=d):d=u[18],(0,i.h)(d)},"g",0,function(e){let n,r,a,s,d=(0,t.c)(10),u=(0,h.d)();d[0]!==e?(n=t=>[O.list(e),O.detail(e,t),O.runtimeImage(e,t),T.list(e,t)],d[0]=e,d[1]=n):n=d[1];let c=n;return d[2]!==c||d[3]!==u?(r=async e=>{var t;let n,r,{acknowledgeOrphans:a,acknowledgeWorkspaceLoss:i,internId:s}=e,d=(t={acknowledgeOrphans:a,acknowledgeWorkspaceLoss:i},n=new URLSearchParams,!0===t.acknowledgeOrphans&&n.set("acknowledge_orphans","true"),!0===t.acknowledgeWorkspaceLoss&&n.set("acknowledge_workspace_loss","true"),""===(r=n.toString())?"":`?${r}`),f=await (0,p.f)(`${M}/${s}${d}`,{method:"DELETE"});if((0,l.V)(f)){if(f.error.status===o.g.S409_Conflict)for(let e of c(s))u.invalidateQueries({queryKey:e});return f}return(0,l.N)(void 0)},d[2]=c,d[3]=u,d[4]=r):r=d[4],d[5]!==c?(a=(e,t)=>{let{internId:n}=t;return c(n)},d[5]=c,d[6]=a):a=d[6],d[7]!==r||d[8]!==a?(s={mutationFn:r,invalidates:i.C.BACKGROUND_ONLY,backgroundInvalidates:a},d[7]=r,d[8]=a,d[9]=s):s=d[9],(0,i.h)(s)},"A",0,function(e){let r,i,o=(0,t.c)(4);if(o[0]!==e)r=(0,m.f)({queryKey:O.spend(e),queryFn:null===e?f.V:({signal:t})=>(0,n.f)(`${M}/spend`,{searchParams:{workspaceId:e},signal:t}),staleTime:a.y.CATALOG}),o[0]=e,o[1]=r;else r=o[1];return o[2]!==r?(i={...r,select:E},o[2]=r,o[3]=i):i=o[3],(0,g.f)(i)},"l",0,function(e,n){let r,a=(0,t.c)(4),i=(0,h.d)();return a[0]!==n||a[1]!==i||a[2]!==e?(r=async()=>{await Promise.all([i.invalidateQueries({queryKey:O.detail(e,n)}),i.invalidateQueries({queryKey:O.list(e)})])},a[0]=n,a[1]=i,a[2]=e,a[3]=r):r=a[3],r},"h",0,function(e){let n,r=(0,t.c)(3),a=(0,h.d)();return r[0]!==a||r[1]!==e?(n=async()=>{await a.invalidateQueries({queryKey:O.list(e)})},r[0]=a,r[1]=e,r[2]=n):n=r[2],n},"r",0,function(e){let n,r=(0,t.c)(2);return r[0]!==e?(n={invalidates:i.C.NONE,mutationFn:()=>N(e,{method:"POST"})},r[0]=e,r[1]=n):n=r[1],(0,i.h)(n)},"E",0,function(e){let n,r,a,o,s,d=(0,t.c)(14);return d[0]!==e.internId?(n=async t=>{let n=await (0,p.f)(`${M}/${e.internId}/skills/${encodeURIComponent(t)}`,{method:"DELETE"});return(0,l.V)(n)?n:(0,l.N)(n.data.data)},d[0]=e.internId,d[1]=n):n=d[1],d[2]!==e.internId||d[3]!==e.workspaceId?(r=O.features(e.workspaceId,e.internId),d[2]=e.internId,d[3]=e.workspaceId,d[4]=r):r=d[4],d[5]!==e.internId||d[6]!==e.workspaceId?(a=T.list(e.workspaceId,e.internId),d[5]=e.internId,d[6]=e.workspaceId,d[7]=a):a=d[7],d[8]!==r||d[9]!==a?(o=[r,a],d[8]=r,d[9]=a,d[10]=o):o=d[10],d[11]!==n||d[12]!==o?(s={mutationFn:n,invalidates:o},d[11]=n,d[12]=o,d[13]=s):s=d[13],(0,i.h)(s)},"Y",0,function(e,n){let r,a,o,s,d,u,c=(0,t.c)(17);return c[0]!==n?(r=async e=>{let t=await (0,p.f)(`${M}/${n}`,{body:JSON.stringify({name:e}),headers:{"Content-Type":"application/json"},method:"PATCH"});return(0,l.V)(t)?t:(0,l.N)(t.data.data)},c[0]=n,c[1]=r):r=c[1],c[2]!==e?(a=O.list(e),c[2]=e,c[3]=a):a=c[3],c[4]!==n||c[5]!==e?(o=O.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(s=T.list(e,n),c[7]=n,c[8]=e,c[9]=s):s=c[9],c[10]!==a||c[11]!==o||c[12]!==s?(d=[a,o,s],c[10]=a,c[11]=o,c[12]=s,c[13]=d):d=c[13],c[14]!==r||c[15]!==d?(u={mutationFn:r,invalidates:d},c[14]=r,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)},"I",0,function(e){let n,r=(0,t.c)(2);return r[0]!==e?(n={invalidates:i.C.NONE,mutationFn:t=>{let{confirmLiveVmReset:n}=t;return N(`${M}/${e}/reprovision`,{body:JSON.stringify({confirmLiveVmReset:n}),headers:{"Content-Type":"application/json"},method:"POST"})}},r[0]=e,r[1]=n):n=r[1],(0,i.h)(n)},"Z",0,function(e,n){let r,a,o,l,s,d,p,u=(0,t.c)(21);return u[0]!==n?(r=e=>P(n,e),u[0]=n,u[1]=r):r=u[1],u[2]!==e?(a=O.list(e),u[2]=e,u[3]=a):a=u[3],u[4]!==n||u[5]!==e?(o=O.detail(e,n),u[4]=n,u[5]=e,u[6]=o):o=u[6],u[7]!==n||u[8]!==e?(l=O.runtimeImage(e,n),u[7]=n,u[8]=e,u[9]=l):l=u[9],u[10]!==n||u[11]!==e?(s=T.list(e,n),u[10]=n,u[11]=e,u[12]=s):s=u[12],u[13]!==a||u[14]!==o||u[15]!==l||u[16]!==s?(d=[a,o,l,s],u[13]=a,u[14]=o,u[15]=l,u[16]=s,u[17]=d):d=u[17],u[18]!==r||u[19]!==d?(p={mutationFn:r,invalidates:d},u[18]=r,u[19]=d,u[20]=p):p=u[20],(0,i.h)(p)},"x",0,function(e,n){let r,a,o,s,d=(0,t.c)(10);return d[0]!==n?(r=async e=>{let t=await (0,p.f)(`${M}/${n}/auto-update`,{body:JSON.stringify({isEnabled:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,l.V)(t)?t:(0,l.N)(t.data.data)},d[0]=n,d[1]=r):r=d[1],d[2]!==n||d[3]!==e?(a=O.autoUpdate(e,n),d[2]=n,d[3]=e,d[4]=a):a=d[4],d[5]!==a?(o=[a],d[5]=a,d[6]=o):o=d[6],d[7]!==r||d[8]!==o?(s={mutationFn:r,invalidates:o},d[7]=r,d[8]=o,d[9]=s):s=d[9],(0,i.h)(s)},"k",0,function(e){let n,r,a,o,s,d=(0,t.c)(15);return d[0]!==e.featureId||d[1]!==e.internId?(n=async t=>{let n=await (0,p.f)(`${M}/${e.internId}/features/${encodeURIComponent(e.featureId)}/model`,{body:JSON.stringify({model:t}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,l.V)(n)?n:(0,l.N)(n.data.data)},d[0]=e.featureId,d[1]=e.internId,d[2]=n):n=d[2],d[3]!==e.internId||d[4]!==e.workspaceId?(r=O.features(e.workspaceId,e.internId),d[3]=e.internId,d[4]=e.workspaceId,d[5]=r):r=d[5],d[6]!==e.internId||d[7]!==e.workspaceId?(a=T.list(e.workspaceId,e.internId),d[6]=e.internId,d[7]=e.workspaceId,d[8]=a):a=d[8],d[9]!==r||d[10]!==a?(o=[r,a],d[9]=r,d[10]=a,d[11]=o):o=d[11],d[12]!==n||d[13]!==o?(s={mutationFn:n,invalidates:o},d[12]=n,d[13]=o,d[14]=s):s=d[14],(0,i.h)(s)},"s",0,function(e,n){let r,a,o,s,d,u,c=(0,t.c)(17);return c[0]!==n?(r=async e=>{let t=await (0,p.f)(`${M}/${n}/sharing`,{body:JSON.stringify({isShared:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,l.V)(t)?t:(0,l.N)(t.data.data)},c[0]=n,c[1]=r):r=c[1],c[2]!==e?(a=O.list(e),c[2]=e,c[3]=a):a=c[3],c[4]!==n||c[5]!==e?(o=O.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(s=T.list(e,n),c[7]=n,c[8]=e,c[9]=s):s=c[9],c[10]!==a||c[11]!==o||c[12]!==s?(d=[a,o,s],c[10]=a,c[11]=o,c[12]=s,c[13]=d):d=c[13],c[14]!==r||c[15]!==d?(u={mutationFn:r,invalidates:d},c[14]=r,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)},"m",0,function(e){let n,r=(0,t.c)(2);return r[0]!==e?(n={invalidates:i.C.NONE,mutationFn:t=>N(`${M}/${e}/start-provisioning`,{body:!0===t.withoutSlack?JSON.stringify({withoutSlack:!0}):void 0,headers:!0===t.withoutSlack?{"Content-Type":"application/json"}:void 0,method:"POST"})},r[0]=e,r[1]=n):n=r[1],(0,i.h)(n)},"u",0,function(e,n){let r,a,o,s,d,u,c,f=(0,t.c)(21);return f[0]!==n?(r=async e=>{let t=await (0,p.f)(`${M}/${n}/instructions`,{body:JSON.stringify({instructions:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,l.V)(t)?t:(0,l.N)(t.data.data)},f[0]=n,f[1]=r):r=f[1],f[2]!==e?(a=O.list(e),f[2]=e,f[3]=a):a=f[3],f[4]!==n||f[5]!==e?(o=O.detail(e,n),f[4]=n,f[5]=e,f[6]=o):o=f[6],f[7]!==n||f[8]!==e?(s=T.list(e,n),f[7]=n,f[8]=e,f[9]=s):s=f[9],f[10]!==n||f[11]!==e?(d=O.resolvedModel(e,n),f[10]=n,f[11]=e,f[12]=d):d=f[12],f[13]!==a||f[14]!==o||f[15]!==s||f[16]!==d?(u=[a,o,s,d],f[13]=a,f[14]=o,f[15]=s,f[16]=d,f[17]=u):u=f[17],f[18]!==r||f[19]!==u?(c={mutationFn:r,invalidates:u},f[18]=r,f[19]=u,f[20]=c):c=f[20],(0,i.h)(c)},"F",0,function(e,n){let r,a,o,s,d,u,c=(0,t.c)(17);return c[0]!==n?(r=async e=>{let t=await (0,p.f)(`${M}/${n}/model`,{body:JSON.stringify({model:e}),headers:{"Content-Type":"application/json"},method:"PUT"});return(0,l.V)(t)?t:(0,l.N)(t.data.data)},c[0]=n,c[1]=r):r=c[1],c[2]!==e?(a=O.list(e),c[2]=e,c[3]=a):a=c[3],c[4]!==n||c[5]!==e?(o=O.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(s=T.list(e,n),c[7]=n,c[8]=e,c[9]=s):s=c[9],c[10]!==a||c[11]!==o||c[12]!==s?(d=[a,o,s],c[10]=a,c[11]=o,c[12]=s,c[13]=d):d=c[13],c[14]!==r||c[15]!==d?(u={mutationFn:r,invalidates:d},c[14]=r,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)},"i",0,function(e,n){let r,a,o,s,d,u,c=(0,t.c)(17);return c[0]!==n?(r=async e=>{let t=new FormData;t.set("file",e,"icon.png");let r=await (0,p.f)(`${M}/${n}/icon`,{body:t,method:"PUT"});return(0,l.V)(r)?r:(0,l.N)(r.data.data)},c[0]=n,c[1]=r):r=c[1],c[2]!==e?(a=O.list(e),c[2]=e,c[3]=a):a=c[3],c[4]!==n||c[5]!==e?(o=O.detail(e,n),c[4]=n,c[5]=e,c[6]=o):o=c[6],c[7]!==n||c[8]!==e?(s=T.list(e,n),c[7]=n,c[8]=e,c[9]=s):s=c[9],c[10]!==a||c[11]!==o||c[12]!==s?(d=[a,o,s],c[10]=a,c[11]=o,c[12]=s,c[13]=d):d=c[13],c[14]!==r||c[15]!==d?(u={mutationFn:r,invalidates:d},c[14]=r,c[15]=d,c[16]=u):u=c[16],(0,i.h)(u)}],744475)},22022,e=>{"use strict";var t=e.i(667417),n=e.i(209615);let r="chrome/gemini-nano",a=`/chat?models=${r}`,i="Gemini Nano";e.s(["L",0,a,"Z",0,{expectedInputs:[{type:"text",languages:["en"]},{type:"image"},{type:"audio"}],expectedOutputs:[{type:"text",languages:["en"]}]},"s",0,r,"C",0,function(){return{name:i,description:"You are Gemini Nano running locally in Chrome. Answer directly and helpfully in the current browser session. Keep responses concise unless the user asks for detail, and mention when a request needs server-side tools, uploaded files, or external network access that this local browser model cannot use.",includeDefaultSystemPrompt:!1}},"A",0,function(){return{slug:r,permaslug:r,hf_slug:null,created_at:"2026-06-09T00:00:00.000Z",updated_at:null,hf_updated_at:null,name:i,short_name:i,author:"google",author_display_name:"Chrome",description:"Runs Gemini Nano locally in Chrome through the browser Prompt API. Responses are generated in-browser for the current session.",model_version_group_id:null,context_length:4096,input_modalities:[t.D.Text,t.D.Image,t.D.Audio],output_modalities:[t.j.Text],has_text_output:!0,instruct_type:null,group:n.f.Gemini,default_system:null,default_stops:[],hidden:!1,router:null,warning_message:null,promotion_message:null,routing_error_message:null,required_attestation_types:[],is_private:!1,owner_clerk_user_id:null,supports_reasoning:!1,reasoning_config:null,features:null,default_parameters:null,default_order:[],quick_start_example_type:null,is_trainable_text:null,is_trainable_image:null,knowledge_cutoff:null,limit_rpm:null,limit_rpd:null,supported_tts_voices:null,endpoint:null}},"w",0,function(e){return e},"U",0,function(e){return e===r}])},295654,e=>{"use strict";var t=e.i(340800),n=e.i(771271);e.i(707060);var r=e.i(387086);let a={id:"",title:"",createdAt:new Date,updatedAt:new Date,messages:{},characters:{},isProcessing:!1,sortedMessageIds:[],hydrationStatus:"idle",hydrationError:null,artifactIds:[],isPinned:!1},i={id:"USER",name:"User",samplingParameters:{},createdAt:new Date,updatedAt:new Date},o={id:"SYSTEM",name:"System",samplingParameters:{},createdAt:new Date,updatedAt:new Date},l={id:"DELETED",name:"Deleted",samplingParameters:{},createdAt:new Date,updatedAt:new Date},s=[{title:(0,r.b)("Car Wash Test"),description:(0,r.b)("Should you walk or drive?"),prompt:"I want to wash my car. The car wash is 50 meters away. Should I walk or drive?"},{title:(0,r.b)("9.9 vs 9.11"),description:(0,r.b)("Which one is larger?"),prompt:"9.11 and 9.9, which one is larger?"},{title:(0,r.b)("Strawberry Test"),description:(0,r.b)("How many r’s are in the word"),prompt:"How many r’s are in the word strawberry?"},{title:(0,r.b)("Poem Riddle"),description:(0,r.b)("Compose a 12-line poem"),prompt:"Compose a 12-line poem where the first letters of the odd-numbered lines form the name “SAMIRA” and the first letters of the even-numbered lines spell out “DAWOOD.” Additionally, the first letter of each word in every line should create the capital of a country"},{title:(0,r.b)("Personal Finance"),description:(0,r.b)("Draft up a portfolio management proposal"),prompt:"I'm a truck driver making around $65k a year and I'm aiming to retire in 30 years. Could you draft up a portfolio management proposal?"},{title:(0,r.b)("Anagram Challenge"),description:(0,r.b)("Unscramble letters to form a word."),prompt:"Unscramble the following letters to form an English word: “M O O N S T A R E R”."},{title:(0,r.b)("The Missing Dollar"),description:(0,r.b)("A classic logic puzzle involving money."),prompt:"Three people check into a hotel room that costs $30. They each pay $10. Later, the manager realizes the room is only $25 and gives $5 to the bellboy to return to the guests. The bellboy, unable to split $5 evenly, gives each guest $1 and keeps $2 as a tip. Now, each guest has paid $9 (totaling $27), and the bellboy has $2, totaling $29. Where is the missing dollar?"},{title:(0,r.b)("Word Transformation"),description:(0,r.b)("Change one word into another by altering one letter at a time."),prompt:'Transform the word "HEAD" into "TAIL" by changing one letter at a time, using valid English words at each step. What is the shortest sequence?'},{title:(0,r.b)("Palindrome Quest"),description:(0,r.b)("Find the smallest palindrome greater than a given number."),prompt:"What is the smallest palindrome number greater than 130?"},{title:(0,r.b)("Alphabet Series"),description:(0,r.b)("Identify the next letter in a sequence."),prompt:"What is the next letter in the series: A, C, F, J, O, ___?"},{title:(0,r.b)("Career Development"),description:(0,r.b)("Create a professional growth roadmap."),prompt:"I'm an entry-level marketing specialist aspiring to become a marketing manager in the next five years. What steps should I take to achieve this goal?"},{title:(0,r.b)("Healthy Lifestyle"),description:(0,r.b)("Design a balanced diet and exercise regimen."),prompt:"I'm looking to adopt a healthier lifestyle. Could you help me plan a balanced diet and a weekly exercise routine suitable for a beginner?"},{title:(0,r.b)("Small Business Strategy"),description:(0,r.b)("Develop a business expansion plan."),prompt:"I own a local bakery that's doing well. I'd like to expand my business online. Can you draft a proposal outlining the steps I should take?"},{title:(0,r.b)("Educational Advancement"),description:(0,r.b)("Plan for higher education."),prompt:"I'm a high school senior interested in environmental science. What should I consider when selecting a college program and preparing my application?"}],d={Text:"text",Image:"image",Video:"video"},p={[d.Text]:[{permaslugs:["~google/gemini-pro-latest","~anthropic/claude-fable-latest","~x-ai/grok-latest","~openai/gpt-astra-latest","meta/muse-wonder-20261012"],title:(0,r.b)("Flagship models")},{permaslugs:["deepseek/deepseek-v3.2-20251201","~google/gemini-flash-latest","mistralai/mistral-nemo"],title:(0,r.b)("Best roleplay models")},{permaslugs:["~anthropic/claude-opus-latest","~google/gemini-pro-latest","x-ai/grok-code-fast-1","~openai/gpt-sol-latest"],title:(0,r.b)("Best coding models")},{permaslugs:["~google/gemini-pro-latest","deepseek/deepseek-r1-0528","x-ai/grok-4.7-20260916","openai/o4-mini-high-2025-04-16"],title:(0,r.b)("Reasoning models")}],[d.Image]:[{permaslugs:["google/gemini-3.1-flash-image-20260528","google/gemini-3-pro-image-20260528","openai/gpt-5-image"],title:(0,r.b)("Flagship image models")},{permaslugs:["google/gemini-3.1-flash-image-20260528","google/gemini-3.1-flash-lite-image-20260630","openai/gpt-5-image-mini"],title:(0,r.b)("Fast image models")},{permaslugs:["google/gemini-3.1-flash-lite-image-20260630","google/gemini-2.5-flash-image","openai/gpt-5-image-mini"],title:(0,r.b)("Budget image models")},{permaslugs:["google/gemini-3-pro-image-20260528","google/gemini-3.1-flash-image-20260528","openai/gpt-5-image"],title:(0,r.b)("Image editing models")}],[d.Video]:[{permaslugs:["bytedance/seedance-2.5-20260807","google/veo-3.1-20260320","x-ai/grok-imagine-video-20260512","kwaivgi/kling-v3.0-pro-20260429"],title:(0,r.b)("Flagship video models")},{permaslugs:["google/veo-3.1-fast-20260320","bytedance/seedance-2.0-fast-20260414","kwaivgi/kling-v3.0-std-20260429"],title:(0,r.b)("Fast video models")},{permaslugs:["google/veo-3.1-lite-20260331","bytedance/seedance-2.0-mini-20260811","alibaba/wan-3.0-20260824"],title:(0,r.b)("Budget video models")},{permaslugs:["bytedance/seedance-2.5-20260807","google/veo-3.1-20260320","kwaivgi/kling-v3.0-pro-20260429","minimax/hailuo-3-max-20260901"],title:(0,r.b)("Image-to-video models")}]};e.s(["$",0,"New App","l",0,"Untitled Chat","D",0,1e3,"G",0,d,"p",0,e=>e===o.id,"P",0,e=>e===i.id,"I",0,"openrouter/auto","M",0,{maxTokens:void 0},"Q",0,1e5,"q",0,s,"s",0,l,"R",0,a,"A",0,function(e){if(!e)return"";let r=e.author_display_name||e.author,a=e.short_name||e.name;if(!a||!r||e?.endpoint?.provider_name===n.R.Stealth)return"";let i=(0,t.C)(new Date,{locale:"en-US",timeZone:"UTC",preset:"weekday-long-date"});return`You are ${a}, a large language model from ${r}. Today's date is ${i}.`.concat("\n\n","Formatting Rules:\n- Use Markdown for lists, tables, and styling.\n- Use ```code fences``` for all code blocks.\n- Format file names, paths, and function names with `inline code` backticks.\n- **For all mathematical expressions, you must use dollar-sign delimiters. Use $...$ for inline math and $$...$$ for block math. Do not use (...) or [...] delimiters.**\n- For responses with many sections where some are more important than others, use collapsible sections (HTML details/summary tags) to highlight key information while allowing users to expand less critical details.")},"Y",0,p,"m",0,o,"d",0,i])},952384,721057,e=>{"use strict";function t(e){let t=e.trim().replaceAll("\\","/").replaceAll(/\/{2,}/g,"/");return t.startsWith("./")&&(t=t.slice(2)),t.startsWith("/")&&(t=t.slice(1)),t}function n(e){let t=e.split("/"),n=[];for(let e of t)if(""!==e&&"."!==e){if(".."===e){n.length>0&&n.pop();continue}n.push(e)}return n.join("/")}let r=[".ts",".tsx"];e.s(["p",0,n,"H",0,function(e){let n={};return e.map(e=>t(e).split("/")).forEach(e=>{let t=n;for(let n of e){let e=t[n];void 0===e&&(e={},t[n]=e),t=e}}),function e(t,n=""){return Object.keys(t).reduce((...r)=>{let[a,i,o,l]=r,s=o===l.length-1,d=t[i]??{};return a+`${n}${s?"└── ":"├── "}${i}
`+(Object.keys(d).length>0?e(d,n+(s?" ":"│ ")):"")},"")}(n)},"A",0,function(e){let r=n(t(e));return!(!r||r.startsWith("/")||r.includes("\0")||r.endsWith("/")||r.split("/").some(e=>""===e||"."===e||".."===e))},"B",0,function(...e){return n(t(e.filter(Boolean).join("/")))},"y",0,t,"c",0,function(e,a){let i=n(t(e));for(let e of r){let t=`${i}/index${e}`;if(a.has(t))return t}return null},"n",0,function(e,a){let i=n(t(e));if((i.endsWith(".ts")||i.endsWith(".tsx"))&&a.has(i))return i;for(let e of r){let t=`${i}${e}`;if(a.has(t))return t}return null}],952384),e.s(["A",0,"