@maincode-ai/matilda-code 0.20.2 → 0.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/mainy/docs/quickstart.md +12 -21
- package/chunks/{agent-WQRHTEJK.js → agent-HKV5XQAS.js} +1 -1
- package/chunks/{agent-headless-VPF3VPXU.js → agent-headless-QT5CMLXY.js} +1 -1
- package/chunks/chunk-67UAAXGB.js +101 -0
- package/chunks/{chunk-QJO23A2D.js → chunk-BAFQ36AO.js} +2 -2
- package/chunks/{chunk-A7VPKVYG.js → chunk-JHODF4MD.js} +1 -1
- package/chunks/chunk-MPXE4ICG.js +22 -0
- package/chunks/{chunk-RGBIKCMN.js → chunk-NCK377X6.js} +23 -17
- package/chunks/{chunk-IGQPRDMV.js → chunk-PTTKY4W4.js} +31 -9
- package/chunks/{computer-use-3BJWOZSA.js → computer-use-Z4JLQKGC.js} +1 -1
- package/chunks/{contextCommand-SOQLJJIW.js → contextCommand-B2LYSU5N.js} +1 -1
- package/chunks/{dist-ZOFMYY3D.js → dist-SVKXQXJX.js} +1 -1
- package/chunks/{edit-ZIPLKFNT.js → edit-C4NER5YK.js} +1 -1
- package/chunks/{en-75JQMW7P.js → en-2BILXSUL.js} +1 -1
- package/chunks/{enter-worktree-MWQ3Z7HX.js → enter-worktree-4LCYUYYU.js} +1 -1
- package/chunks/{enterPlanMode-XT6MNE2L.js → enterPlanMode-L74GNCED.js} +1 -1
- package/chunks/{exit-worktree-O7DBPVFA.js → exit-worktree-GASDDIUP.js} +1 -1
- package/chunks/{exitPlanMode-FDXKFQJF.js → exitPlanMode-D5SNMRGJ.js} +1 -1
- package/chunks/{geminiContentGenerator-HXWUQ2DI.js → geminiContentGenerator-JRTWRQNL.js} +1 -1
- package/chunks/{glob-GYLGTXYL.js → glob-MDLZ74XZ.js} +1 -1
- package/chunks/{grep-ZNYUS2MU.js → grep-QMU4OMPK.js} +1 -1
- package/chunks/{matildaAgentContentGenerator-HG4ABAJG.js → matildaAgentContentGenerator-ZXRXBMQP.js} +2 -2
- package/chunks/{matildaContentGenerator-WEAUMFNT.js → matildaContentGenerator-TUSXZGC2.js} +1 -1
- package/chunks/{monitor-755GJUC4.js → monitor-DOIBVKS6.js} +1 -1
- package/chunks/{notebook-edit-SWCJ3FMF.js → notebook-edit-3SYYLOZB.js} +1 -1
- package/chunks/{openaiContentGenerator-JIODOCNJ.js → openaiContentGenerator-SSKBJCPU.js} +1 -1
- package/chunks/{ripGrep-5GE6ECVF.js → ripGrep-FGPUVH6Z.js} +1 -1
- package/chunks/{scheduler-VA6HAYT4.js → scheduler-PFW7Z4IZ.js} +1 -1
- package/chunks/{serve-TVYEQNS6.js → serve-U64D74QQ.js} +1 -1
- package/chunks/{shell-JNZXS437.js → shell-KW3VBBYV.js} +1 -1
- package/chunks/{src-MMNXN6E3.js → src-HES7P35D.js} +1 -1
- package/chunks/{team-create-CUBBNHIF.js → team-create-4JLJ6GQN.js} +1 -1
- package/chunks/{workflow-WRWIXJCG.js → workflow-ODYOFAKB.js} +2 -2
- package/chunks/write-file-S7CRH7VA.js +15 -0
- package/cli.js +397 -390
- package/locales/en.js +2 -0
- package/npm-postinstall.js +103 -0
- package/package.json +6 -2
- package/chunks/chunk-DORRYU7L.js +0 -101
- package/chunks/chunk-YZVC65QR.js +0 -22
- package/chunks/write-file-7BFZXGIJ.js +0 -11
- package/chunks/zh-I4FV25MS.js +0 -25
- package/chunks/zh-TW-7HNBEDIB.js +0 -25
- package/locales/zh-TW.js +0 -1695
- package/locales/zh.js +0 -1895
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{Oe as X,Qe as H,Zh as K}from"./chunk-
|
|
3
|
+
import{Oe as X,Qe as H,Zh as K}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import{i as S}from"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{g as B,i as G}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as d}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";d();d();d();import{homedir as ye}from"node:os";d();import{join as I}from"node:path";import{homedir as R}from"node:os";var l="0.5.2",ue="https://matilda.maincode.com/assets/computer-use",me="https://github.com/trycua/cua/releases/download";function E(e=process.platform,t=process.arch,o=l){let r=o;if(e==="darwin"){let n=`cua-driver-rs-${r}-${t==="arm64"?"darwin-arm64":"darwin-x86_64"}`;return{asset:`${n}.tar.gz`,extractDir:n,binaryRelPath:"CuaDriver.app/Contents/MacOS/cua-driver",hasApp:!0}}if(e==="linux"){if(t!=="x64")throw new Error(`Computer Use: unsupported Linux arch '${t}' (only x64).`);return{asset:`cua-driver-rs-${r}-linux-x86_64-binary.tar.gz`,extractDir:".",binaryRelPath:"cua-driver",hasApp:!1}}if(e==="win32"){let n=`cua-driver-rs-${r}-${t==="arm64"?"windows-arm64":"windows-x86_64"}`;return{asset:`${n}.zip`,extractDir:n,binaryRelPath:"cua-driver.exe",hasApp:!1}}throw new Error(`Computer Use: unsupported platform '${e}'.`)}function U(e,t=process.env,o=l){let r=[],i=t.MATILDA_COMPUTER_USE_DOWNLOAD_HOST;return i&&r.push(`${ge(i)}/cua-driver-rs/v${o}/${e}`),r.push(`${ue}/cua-driver-rs/v${o}/${e}`),r.push(`${me}/cua-driver-rs-v${o}/${e}`),r}function J(e=process.env,t=l){return U("checksums.txt",e,t)}var he="MATILDA_COMPUTER_USE_MAX_IMAGE_DIMENSION";function V(e){if(e===void 0||typeof e=="string"&&e.trim()==="")return;let t=typeof e=="number"?e:Number(e);if(!(!Number.isInteger(t)||t<0))return t}function Y(e,t=process.env){let o=V(t[he]);return o!==void 0?o:V(e)}function fe(e=R()){return I(e,".matilda","computer-use")}function N(e=R(),t=l){return I(fe(e),`cua-driver-rs-${t}`)}function u(e=R(),t=process.platform,o=process.arch,r=l){let i=E(t,o,r);return I(N(e,r),i.extractDir,i.binaryRelPath)}function h(e=l){return`cua-driver-rs@${e}`}function ge(e){return e.endsWith("/")?e.slice(0,-1):e}var f=class e{static singleton;binary;onProgress;maxImageDimension;client;startPromise;constructor(t){this.binary=t.binary,this.onProgress=t.onProgress??(()=>{}),this.maxImageDimension=t.maxImageDimension}setMaxImageDimension(t){this.maxImageDimension=t}static shared(){return e.singleton||(e.singleton=new e({binary:u(ye())})),e.singleton}static setSharedForTest(t){e.singleton=t}isStarted(){return this.client!==void 0}async start(t){if(!this.client)return this.startPromise?this.startPromise:(this.startPromise=this.doStart(t).finally(()=>{this.startPromise=void 0}),this.startPromise)}async doStart(t){let o=t??this.onProgress;o("Starting Computer Use driver...");let r=new H({command:this.binary,args:["mcp"],env:{...process.env}}),i=new X({name:"matilda-code-computer-use",version:"1.0.0"},{capabilities:{}});await i.connect(r),this.client=i,await this.applyRuntimeConfig(i,o)}async applyRuntimeConfig(t,o){if(this.maxImageDimension!==void 0)try{await t.callTool({name:"set_config",arguments:{max_image_dimension:this.maxImageDimension}})}catch(r){let i=r instanceof Error?r.message:String(r);o(`Computer Use: could not apply max_image_dimension=${this.maxImageDimension} (${i}); using driver default.`)}}async listTools(){if(!this.client)throw new Error("ComputerUseClient not started");return this.client.listTools()}async callTool(t,o){if(!this.client)throw new Error("ComputerUseClient not started");try{return await this.client.callTool({name:t,arguments:o})}catch(r){if(!Q(r))throw r;let i=r;for(let n=0;n<3;n++){if(await this.stop(),await this.start(),!this.client)throw new Error("ComputerUseClient reconnect failed");try{return await this.client.callTool({name:t,arguments:o})}catch(s){if(!Q(s))throw s;i=s,await new Promise(a=>setTimeout(a,1e3))}}throw i}}async stop(){let t=this.client;if(this.client=void 0,t)try{await t.close()}catch{}}};function Q(e){let t=e instanceof Error?e.message:String(e);return/connection closed|not connected|connection refused|daemon transport error|os error 61/i.test(t)}d();var M=["bring_to_front","check_for_update","check_permissions","click","double_click","drag","end_session","get_accessibility_tree","get_agent_cursor_state","get_config","get_cursor_position","get_recording_state","get_screen_size","get_window_state","hotkey","kill_app","launch_app","list_apps","list_windows","move_cursor","page","press_key","replay_trajectory","right_click","scroll","set_agent_cursor_enabled","set_agent_cursor_motion","set_agent_cursor_style","set_config","set_value","start_recording","start_session","stop_recording","type_text","zoom"],g={bring_to_front:{description:'Activate a window so subsequent input tools with `dispatch:"foreground"` land on it without a per-call SetForegroundWindow flash. **Windows-only:** on macOS this tool returns an error pointing to the platform-native `NSRunningApplication.activate` (which the macOS input tools don\'t need because CGEvent.postToPid reaches backgrounded windows). On Linux this tool also stubs out; use `wmctrl -a` or `xdotool windowactivate` if you need explicit activation.',parameterSchema:{additionalProperties:!1,properties:{pid:{type:"integer"},window_id:{type:"integer"}},required:["pid"],type:"object"}},check_for_update:{description:"Check whether a newer cua-driver-rs release is available on GitHub. Returns the current and latest versions, an `update_available` boolean, the install one-liner, and the release notes URL. Read-only \u2014 never installs. Mirror of `cua-driver check-update --json`.",parameterSchema:{additionalProperties:!1,properties:{},type:"object"}},check_permissions:{description:"Report TCC permission status for Accessibility and Screen Recording. By default also raises the system permission dialogs for any missing grants \u2014 Apple's request APIs are no-ops when the grant is already active, so this is safe to call repeatedly. Pass {\"prompt\": false} for a purely read-only status check.\n\nReturns: `accessibility` + `screen_recording` (booleans from the TCC preflight APIs), `screen_recording_capturable` (a live ScreenCaptureKit probe \u2014 if it disagrees with `screen_recording`, the preflight grant belongs to a different process), and `source` (which TCC identity the booleans reflect: the CuaDriver daemon vs the launching terminal/IDE). macOS attributes grants to the responsible process, so a standalone call from a terminal reports the terminal's grants, not the driver's.",parameterSchema:{additionalProperties:!1,properties:{prompt:{description:"Raise the system permission prompts for missing grants. Default true.",type:"boolean"}},type:"object"}},click:{description:`Left-click against a target pid. **Prefer \`element_index\` over pixel coordinates** \u2014 element_index works on backgrounded / minimized / hidden / off-Space windows, surfaces a stable handle that survives rebuilds, and tells you what you're clicking via the cached element's role + label. Reach for \`x, y\` only when the target is a canvas / video / WebGL / custom-drawn surface that doesn't appear in the AX tree.
|
|
4
4
|
|
|
5
5
|
Two addressing modes:
|
|
6
6
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{c as a,d as b,e as c}from"./chunk-
|
|
3
|
+
import{c as a,d as b,e as c}from"./chunk-JHODF4MD.js";import"./chunk-MPXE4ICG.js";import"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as collectContextData,c as contextCommand,b as formatContextUsageText};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as Vh}from"./chunk-PA6532AY.js";import{a as Nh,b as Kh,c as Jh}from"./chunk-WZ75OGYY.js";import"./chunk-XMZIY7XX.js";import{f as js}from"./chunk-3HUM74NZ.js";import"./chunk-JSFA3NEP.js";import"./chunk-TZIDSCTF.js";import{a as Ch,b as Ah,c as Dh,d as Mh,e as Bh,f as Lh,g as Wh,h as Uh}from"./chunk-U347OO7S.js";import{i as Hh}from"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{a as __matilda_dirname,b as N}from"./chunk-GZPNIYVZ.js";import{a as Y,d as Xt,f as Rh}from"./chunk-OWGSC52X.js";var zo=Xt((qf,$o)=>{"use strict";N();var Qh=Nh(),Xh=Y("crypto"),Yh=Y("url"),Zh=Kh(),td=Y("http"),ed=Y("https"),ad=Y("http2"),rd=Y("util"),id=Jh(),sd=Y("zlib"),io=Y("stream"),od=Y("events");function ct(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}var so=ct(Qh),nd=ct(Xh),hd=ct(Yh),dd=ct(Zh),ld=ct(td),cd=ct(ed),oo=ct(ad),nr=ct(rd),pd=ct(id),zt=ct(sd),gt=ct(io);function no(y,e){return function(){return y.apply(e,arguments)}}var{toString:md}=Object.prototype,{getPrototypeOf:hr}=Object,{iterator:Ve,toStringTag:ho}=Symbol,Qe=(y=>e=>{let a=md.call(e);return y[a]||(y[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),pt=y=>(y=y.toLowerCase(),e=>Qe(e)===y),Xe=y=>e=>typeof e===y,{isArray:re}=Array,Zt=Xe("undefined");function fe(y){return y!==null&&!Zt(y)&&y.constructor!==null&&!Zt(y.constructor)&&rt(y.constructor.isBuffer)&&y.constructor.isBuffer(y)}var lo=pt("ArrayBuffer");function ud(y){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(y):e=y&&y.buffer&&lo(y.buffer),e}var yd=Xe("string"),rt=Xe("function"),co=Xe("number"),ve=y=>y!==null&&typeof y=="object",gd=y=>y===!0||y===!1,Le=y=>{if(Qe(y)!=="object")return!1;let e=hr(y);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ho in y)&&!(Ve in y)},fd=y=>{if(!ve(y)||fe(y))return!1;try{return Object.keys(y).length===0&&Object.getPrototypeOf(y)===Object.prototype}catch{return!1}},vd=pt("Date"),_d=pt("File"),bd=y=>!!(y&&typeof y.uri<"u"),Sd=y=>y&&typeof y.getParts<"u",Id=pt("Blob"),wd=pt("FileList"),kd=y=>ve(y)&&rt(y.pipe);function Td(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}var Gs=Td(),Rs=typeof Gs.FormData<"u"?Gs.FormData:void 0,Pd=y=>{let e;return y&&(Rs&&y instanceof Rs||rt(y.append)&&((e=Qe(y))==="formdata"||e==="object"&&rt(y.toString)&&y.toString()==="[object FormData]"))},qd=pt("URLSearchParams"),[Fd,$d,zd,Ed]=["ReadableStream","Request","Response","Headers"].map(pt),Od=y=>y.trim?y.trim():y.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(y,e,{allOwnKeys:a=!1}={}){if(y===null||typeof y>"u")return;let r,s;if(typeof y!="object"&&(y=[y]),re(y))for(r=0,s=y.length;r<s;r++)e.call(null,y[r],r,y);else{if(fe(y))return;let i=a?Object.getOwnPropertyNames(y):Object.keys(y),o=i.length,t;for(r=0;r<o;r++)t=i[r],e.call(null,y[t],t,y)}}function po(y,e){if(fe(y))return null;e=e.toLowerCase();let a=Object.keys(y),r=a.length,s;for(;r-- >0;)if(s=a[r],e===s.toLowerCase())return s;return null}var Ct=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,mo=y=>!Zt(y)&&y!==Ct;function Qa(){let{caseless:y,skipUndefined:e}=mo(this)&&this||{},a={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let o=y&&po(a,i)||i;Le(a[o])&&Le(s)?a[o]=Qa(a[o],s):Le(s)?a[o]=Qa({},s):re(s)?a[o]=s.slice():(!e||!Zt(s))&&(a[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&_e(arguments[s],r);return a}var xd=(y,e,a,{allOwnKeys:r}={})=>(_e(e,(s,i)=>{a&&rt(s)?Object.defineProperty(y,i,{value:no(s,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(y,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),y),jd=y=>(y.charCodeAt(0)===65279&&(y=y.slice(1)),y),Gd=(y,e,a,r)=>{y.prototype=Object.create(e.prototype,r),Object.defineProperty(y.prototype,"constructor",{value:y,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(y,"super",{value:e.prototype}),a&&Object.assign(y.prototype,a)},Rd=(y,e,a,r)=>{let s,i,o,t={};if(e=e||{},y==null)return e;do{for(s=Object.getOwnPropertyNames(y),i=s.length;i-- >0;)o=s[i],(!r||r(o,y,e))&&!t[o]&&(e[o]=y[o],t[o]=!0);y=a!==!1&&hr(y)}while(y&&(!a||a(y,e))&&y!==Object.prototype);return e},Cd=(y,e,a)=>{y=String(y),(a===void 0||a>y.length)&&(a=y.length),a-=e.length;let r=y.indexOf(e,a);return r!==-1&&r===a},Ad=y=>{if(!y)return null;if(re(y))return y;let e=y.length;if(!co(e))return null;let a=new Array(e);for(;e-- >0;)a[e]=y[e];return a},Dd=(y=>e=>y&&e instanceof y)(typeof Uint8Array<"u"&&hr(Uint8Array)),Md=(y,e)=>{let r=(y&&y[Ve]).call(y),s;for(;(s=r.next())&&!s.done;){let i=s.value;e.call(y,i[0],i[1])}},Bd=(y,e)=>{let a,r=[];for(;(a=y.exec(e))!==null;)r.push(a);return r},Ld=pt("HTMLFormElement"),Wd=y=>y.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,r,s){return r.toUpperCase()+s}),Cs=(({hasOwnProperty:y})=>(e,a)=>y.call(e,a))(Object.prototype),Ud=pt("RegExp"),uo=(y,e)=>{let a=Object.getOwnPropertyDescriptors(y),r={};_e(a,(s,i)=>{let o;(o=e(s,i,y))!==!1&&(r[i]=o||s)}),Object.defineProperties(y,r)},Hd=y=>{uo(y,(e,a)=>{if(rt(y)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;let r=y[a];if(rt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},Nd=(y,e)=>{let a={},r=s=>{s.forEach(i=>{a[i]=!0})};return re(y)?r(y):r(String(y).split(e)),a},Kd=()=>{},Jd=(y,e)=>y!=null&&Number.isFinite(y=+y)?y:e;function Vd(y){return!!(y&&rt(y.append)&&y[ho]==="FormData"&&y[Ve])}var Qd=y=>{let e=new Array(10),a=(r,s)=>{if(ve(r)){if(e.indexOf(r)>=0)return;if(fe(r))return r;if(!("toJSON"in r)){e[s]=r;let i=re(r)?[]:{};return _e(r,(o,t)=>{let f=a(o,s+1);!Zt(f)&&(i[t]=f)}),e[s]=void 0,i}}return r};return a(y,0)},Xd=pt("AsyncFunction"),Yd=y=>y&&(ve(y)||rt(y))&&rt(y.then)&&rt(y.catch),yo=((y,e)=>y?setImmediate:e?((a,r)=>(Ct.addEventListener("message",({source:s,data:i})=>{s===Ct&&i===a&&r.length&&r.shift()()},!1),s=>{r.push(s),Ct.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",rt(Ct.postMessage)),Zd=typeof queueMicrotask<"u"?queueMicrotask.bind(Ct):typeof process<"u"&&process.nextTick||yo,tl=y=>y!=null&&rt(y[Ve]),q={isArray:re,isArrayBuffer:lo,isBuffer:fe,isFormData:Pd,isArrayBufferView:ud,isString:yd,isNumber:co,isBoolean:gd,isObject:ve,isPlainObject:Le,isEmptyObject:fd,isReadableStream:Fd,isRequest:$d,isResponse:zd,isHeaders:Ed,isUndefined:Zt,isDate:vd,isFile:_d,isReactNativeBlob:bd,isReactNative:Sd,isBlob:Id,isRegExp:Ud,isFunction:rt,isStream:kd,isURLSearchParams:qd,isTypedArray:Dd,isFileList:wd,forEach:_e,merge:Qa,extend:xd,trim:Od,stripBOM:jd,inherits:Gd,toFlatObject:Rd,kindOf:Qe,kindOfTest:pt,endsWith:Cd,toArray:Ad,forEachEntry:Md,matchAll:Bd,isHTMLForm:Ld,hasOwnProperty:Cs,hasOwnProp:Cs,reduceDescriptors:uo,freezeMethods:Hd,toObjectSet:Nd,toCamelCase:Wd,noop:Kd,toFiniteNumber:Jd,findKey:po,global:Ct,isContextDefined:mo,isSpecCompliantForm:Vd,toJSONObject:Qd,isAsyncFn:Xd,isThenable:Yd,setImmediate:yo,asap:Zd,isIterable:tl},tt=class y extends Error{static from(e,a,r,s,i,o){let t=new y(e.message,a||e.code,r,s,i);return t.cause=e,t.name=e.name,e.status!=null&&t.status==null&&(t.status=e.status),o&&Object.assign(t,o),t}constructor(e,a,r,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";tt.ERR_BAD_OPTION="ERR_BAD_OPTION";tt.ECONNABORTED="ECONNABORTED";tt.ETIMEDOUT="ETIMEDOUT";tt.ERR_NETWORK="ERR_NETWORK";tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";tt.ERR_DEPRECATED="ERR_DEPRECATED";tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";tt.ERR_CANCELED="ERR_CANCELED";tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";tt.ERR_INVALID_URL="ERR_INVALID_URL";var z=tt;function Xa(y){return q.isPlainObject(y)||q.isArray(y)}function go(y){return q.endsWith(y,"[]")?y.slice(0,-2):y}function Ua(y,e,a){return y?y.concat(e).map(function(s,i){return s=go(s),!a&&i?"["+s+"]":s}).join(a?".":""):e}function el(y){return q.isArray(y)&&!y.some(Xa)}var al=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function Ye(y,e,a){if(!q.isObject(y))throw new TypeError("target must be an object");e=e||new(so.default||FormData),a=q.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,b){return!q.isUndefined(b[S])});let r=a.metaTokens,s=a.visitor||u,i=a.dots,o=a.indexes,f=(a.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(s))throw new TypeError("visitor must be a function");function p(_){if(_===null)return"";if(q.isDate(_))return _.toISOString();if(q.isBoolean(_))return _.toString();if(!f&&q.isBlob(_))throw new z("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(_)||q.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function u(_,S,b){let I=_;if(q.isReactNative(e)&&q.isReactNativeBlob(_))return e.append(Ua(b,S,i),p(_)),!1;if(_&&!b&&typeof _=="object"){if(q.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(q.isArray(_)&&el(_)||(q.isFileList(_)||q.endsWith(S,"[]"))&&(I=q.toArray(_)))return S=go(S),I.forEach(function(F,R){!(q.isUndefined(F)||F===null)&&e.append(o===!0?Ua([S],R,i):o===null?S:S+"[]",p(F))}),!1}return Xa(_)?!0:(e.append(Ua(b,S,i),p(_)),!1)}let c=[],m=Object.assign(al,{defaultVisitor:u,convertValue:p,isVisitable:Xa});function g(_,S){if(!q.isUndefined(_)){if(c.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));c.push(_),q.forEach(_,function(I,$){(!(q.isUndefined(I)||I===null)&&s.call(e,I,q.isString($)?$.trim():$,S,m))===!0&&g(I,S?S.concat($):[$])}),c.pop()}}if(!q.isObject(y))throw new TypeError("data must be an object");return g(y),e}function As(y){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(y).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function fo(y,e){this._pairs=[],y&&Ye(y,this,e)}var vo=fo.prototype;vo.append=function(e,a){this._pairs.push([e,a])};vo.toString=function(e){let a=e?function(r){return e.call(this,r,As)}:As;return this._pairs.map(function(s){return a(s[0])+"="+a(s[1])},"").join("&")};function rl(y){return encodeURIComponent(y).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dr(y,e,a){if(!e)return y;let r=a&&a.encode||rl,s=q.isFunction(a)?{serialize:a}:a,i=s&&s.serialize,o;if(i?o=i(e,s):o=q.isURLSearchParams(e)?e.toString():new fo(e,s).toString(r),o){let t=y.indexOf("#");t!==-1&&(y=y.slice(0,t)),y+=(y.indexOf("?")===-1?"?":"&")+o}return y}var Ya=class{constructor(){this.handlers=[]}use(e,a,r){return this.handlers.push({fulfilled:e,rejected:a,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(r){r!==null&&e(r)})}},Ds=Ya,Ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},il=hd.default.URLSearchParams,Ha="abcdefghijklmnopqrstuvwxyz",Ms="0123456789",_o={DIGIT:Ms,ALPHA:Ha,ALPHA_DIGIT:Ha+Ha.toUpperCase()+Ms},sl=(y=16,e=_o.ALPHA_DIGIT)=>{let a="",{length:r}=e,s=new Uint32Array(y);nd.default.randomFillSync(s);for(let i=0;i<y;i++)a+=e[s[i]%r];return a},ol={isNode:!0,classes:{URLSearchParams:il,FormData:so.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:_o,generateString:sl,protocols:["http","https","file","data"]},lr=typeof window<"u"&&typeof document<"u",Za=typeof navigator=="object"&&navigator||void 0,nl=lr&&(!Za||["ReactNative","NativeScript","NS"].indexOf(Za.product)<0),hl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dl=lr&&window.location.href||"http://localhost",ll=Object.freeze({__proto__:null,hasBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:hl,hasStandardBrowserEnv:nl,navigator:Za,origin:dl}),U={...ll,...ol};function cl(y,e){return Ye(y,new U.classes.URLSearchParams,{visitor:function(a,r,s,i){return U.isNode&&q.isBuffer(a)?(this.append(r,a.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function pl(y){return q.matchAll(/\w+|\[(\w*)]/g,y).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ml(y){let e={},a=Object.keys(y),r,s=a.length,i;for(r=0;r<s;r++)i=a[r],e[i]=y[i];return e}function bo(y){function e(a,r,s,i){let o=a[i++];if(o==="__proto__")return!0;let t=Number.isFinite(+o),f=i>=a.length;return o=!o&&q.isArray(s)?s.length:o,f?(q.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!t):((!s[o]||!q.isObject(s[o]))&&(s[o]=[]),e(a,r,s[o],i)&&q.isArray(s[o])&&(s[o]=ml(s[o])),!t)}if(q.isFormData(y)&&q.isFunction(y.entries)){let a={};return q.forEachEntry(y,(r,s)=>{e(pl(r),s,a,0)}),a}return null}function ul(y,e,a){if(q.isString(y))try{return(e||JSON.parse)(y),q.trim(y)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(y)}var cr={transitional:Ze,adapter:["xhr","http","fetch"],transformRequest:[function(e,a){let r=a.getContentType()||"",s=r.indexOf("application/json")>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return s?JSON.stringify(bo(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let t;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cl(e,this.formSerializer).toString();if((t=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return Ye(t?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(a.setContentType("application/json",!1),ul(e)):e}],transformResponse:[function(e){let a=this.transitional||cr.transitional,r=a&&a.forcedJSONParsing,s=this.responseType==="json";if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(r&&!this.responseType||s)){let o=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(t){if(o)throw t.name==="SyntaxError"?z.from(t,z.ERR_BAD_RESPONSE,this,null,this.response):t}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],y=>{cr.headers[y]={}});var pr=cr,yl=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gl=y=>{let e={},a,r,s;return y&&y.split(`
|
|
3
|
+
import{a as Nh,b as Kh,c as Jh}from"./chunk-WZ75OGYY.js";import{a as Vh}from"./chunk-PA6532AY.js";import"./chunk-XMZIY7XX.js";import{f as js}from"./chunk-3HUM74NZ.js";import"./chunk-JSFA3NEP.js";import"./chunk-TZIDSCTF.js";import{a as Ch,b as Ah,c as Dh,d as Mh,e as Bh,f as Lh,g as Wh,h as Uh}from"./chunk-U347OO7S.js";import{i as Hh}from"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{a as __matilda_dirname,b as N}from"./chunk-GZPNIYVZ.js";import{a as Y,d as Xt,f as Rh}from"./chunk-OWGSC52X.js";var zo=Xt((qf,$o)=>{"use strict";N();var Qh=Nh(),Xh=Y("crypto"),Yh=Y("url"),Zh=Kh(),td=Y("http"),ed=Y("https"),ad=Y("http2"),rd=Y("util"),id=Jh(),sd=Y("zlib"),io=Y("stream"),od=Y("events");function ct(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}var so=ct(Qh),nd=ct(Xh),hd=ct(Yh),dd=ct(Zh),ld=ct(td),cd=ct(ed),oo=ct(ad),nr=ct(rd),pd=ct(id),zt=ct(sd),gt=ct(io);function no(y,e){return function(){return y.apply(e,arguments)}}var{toString:md}=Object.prototype,{getPrototypeOf:hr}=Object,{iterator:Ve,toStringTag:ho}=Symbol,Qe=(y=>e=>{let a=md.call(e);return y[a]||(y[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),pt=y=>(y=y.toLowerCase(),e=>Qe(e)===y),Xe=y=>e=>typeof e===y,{isArray:re}=Array,Zt=Xe("undefined");function fe(y){return y!==null&&!Zt(y)&&y.constructor!==null&&!Zt(y.constructor)&&rt(y.constructor.isBuffer)&&y.constructor.isBuffer(y)}var lo=pt("ArrayBuffer");function ud(y){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(y):e=y&&y.buffer&&lo(y.buffer),e}var yd=Xe("string"),rt=Xe("function"),co=Xe("number"),ve=y=>y!==null&&typeof y=="object",gd=y=>y===!0||y===!1,Le=y=>{if(Qe(y)!=="object")return!1;let e=hr(y);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ho in y)&&!(Ve in y)},fd=y=>{if(!ve(y)||fe(y))return!1;try{return Object.keys(y).length===0&&Object.getPrototypeOf(y)===Object.prototype}catch{return!1}},vd=pt("Date"),_d=pt("File"),bd=y=>!!(y&&typeof y.uri<"u"),Sd=y=>y&&typeof y.getParts<"u",Id=pt("Blob"),wd=pt("FileList"),kd=y=>ve(y)&&rt(y.pipe);function Td(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}var Gs=Td(),Rs=typeof Gs.FormData<"u"?Gs.FormData:void 0,Pd=y=>{let e;return y&&(Rs&&y instanceof Rs||rt(y.append)&&((e=Qe(y))==="formdata"||e==="object"&&rt(y.toString)&&y.toString()==="[object FormData]"))},qd=pt("URLSearchParams"),[Fd,$d,zd,Ed]=["ReadableStream","Request","Response","Headers"].map(pt),Od=y=>y.trim?y.trim():y.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(y,e,{allOwnKeys:a=!1}={}){if(y===null||typeof y>"u")return;let r,s;if(typeof y!="object"&&(y=[y]),re(y))for(r=0,s=y.length;r<s;r++)e.call(null,y[r],r,y);else{if(fe(y))return;let i=a?Object.getOwnPropertyNames(y):Object.keys(y),o=i.length,t;for(r=0;r<o;r++)t=i[r],e.call(null,y[t],t,y)}}function po(y,e){if(fe(y))return null;e=e.toLowerCase();let a=Object.keys(y),r=a.length,s;for(;r-- >0;)if(s=a[r],e===s.toLowerCase())return s;return null}var Ct=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,mo=y=>!Zt(y)&&y!==Ct;function Qa(){let{caseless:y,skipUndefined:e}=mo(this)&&this||{},a={},r=(s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let o=y&&po(a,i)||i;Le(a[o])&&Le(s)?a[o]=Qa(a[o],s):Le(s)?a[o]=Qa({},s):re(s)?a[o]=s.slice():(!e||!Zt(s))&&(a[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&_e(arguments[s],r);return a}var xd=(y,e,a,{allOwnKeys:r}={})=>(_e(e,(s,i)=>{a&&rt(s)?Object.defineProperty(y,i,{value:no(s,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(y,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),y),jd=y=>(y.charCodeAt(0)===65279&&(y=y.slice(1)),y),Gd=(y,e,a,r)=>{y.prototype=Object.create(e.prototype,r),Object.defineProperty(y.prototype,"constructor",{value:y,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(y,"super",{value:e.prototype}),a&&Object.assign(y.prototype,a)},Rd=(y,e,a,r)=>{let s,i,o,t={};if(e=e||{},y==null)return e;do{for(s=Object.getOwnPropertyNames(y),i=s.length;i-- >0;)o=s[i],(!r||r(o,y,e))&&!t[o]&&(e[o]=y[o],t[o]=!0);y=a!==!1&&hr(y)}while(y&&(!a||a(y,e))&&y!==Object.prototype);return e},Cd=(y,e,a)=>{y=String(y),(a===void 0||a>y.length)&&(a=y.length),a-=e.length;let r=y.indexOf(e,a);return r!==-1&&r===a},Ad=y=>{if(!y)return null;if(re(y))return y;let e=y.length;if(!co(e))return null;let a=new Array(e);for(;e-- >0;)a[e]=y[e];return a},Dd=(y=>e=>y&&e instanceof y)(typeof Uint8Array<"u"&&hr(Uint8Array)),Md=(y,e)=>{let r=(y&&y[Ve]).call(y),s;for(;(s=r.next())&&!s.done;){let i=s.value;e.call(y,i[0],i[1])}},Bd=(y,e)=>{let a,r=[];for(;(a=y.exec(e))!==null;)r.push(a);return r},Ld=pt("HTMLFormElement"),Wd=y=>y.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,r,s){return r.toUpperCase()+s}),Cs=(({hasOwnProperty:y})=>(e,a)=>y.call(e,a))(Object.prototype),Ud=pt("RegExp"),uo=(y,e)=>{let a=Object.getOwnPropertyDescriptors(y),r={};_e(a,(s,i)=>{let o;(o=e(s,i,y))!==!1&&(r[i]=o||s)}),Object.defineProperties(y,r)},Hd=y=>{uo(y,(e,a)=>{if(rt(y)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;let r=y[a];if(rt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},Nd=(y,e)=>{let a={},r=s=>{s.forEach(i=>{a[i]=!0})};return re(y)?r(y):r(String(y).split(e)),a},Kd=()=>{},Jd=(y,e)=>y!=null&&Number.isFinite(y=+y)?y:e;function Vd(y){return!!(y&&rt(y.append)&&y[ho]==="FormData"&&y[Ve])}var Qd=y=>{let e=new Array(10),a=(r,s)=>{if(ve(r)){if(e.indexOf(r)>=0)return;if(fe(r))return r;if(!("toJSON"in r)){e[s]=r;let i=re(r)?[]:{};return _e(r,(o,t)=>{let f=a(o,s+1);!Zt(f)&&(i[t]=f)}),e[s]=void 0,i}}return r};return a(y,0)},Xd=pt("AsyncFunction"),Yd=y=>y&&(ve(y)||rt(y))&&rt(y.then)&&rt(y.catch),yo=((y,e)=>y?setImmediate:e?((a,r)=>(Ct.addEventListener("message",({source:s,data:i})=>{s===Ct&&i===a&&r.length&&r.shift()()},!1),s=>{r.push(s),Ct.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",rt(Ct.postMessage)),Zd=typeof queueMicrotask<"u"?queueMicrotask.bind(Ct):typeof process<"u"&&process.nextTick||yo,tl=y=>y!=null&&rt(y[Ve]),q={isArray:re,isArrayBuffer:lo,isBuffer:fe,isFormData:Pd,isArrayBufferView:ud,isString:yd,isNumber:co,isBoolean:gd,isObject:ve,isPlainObject:Le,isEmptyObject:fd,isReadableStream:Fd,isRequest:$d,isResponse:zd,isHeaders:Ed,isUndefined:Zt,isDate:vd,isFile:_d,isReactNativeBlob:bd,isReactNative:Sd,isBlob:Id,isRegExp:Ud,isFunction:rt,isStream:kd,isURLSearchParams:qd,isTypedArray:Dd,isFileList:wd,forEach:_e,merge:Qa,extend:xd,trim:Od,stripBOM:jd,inherits:Gd,toFlatObject:Rd,kindOf:Qe,kindOfTest:pt,endsWith:Cd,toArray:Ad,forEachEntry:Md,matchAll:Bd,isHTMLForm:Ld,hasOwnProperty:Cs,hasOwnProp:Cs,reduceDescriptors:uo,freezeMethods:Hd,toObjectSet:Nd,toCamelCase:Wd,noop:Kd,toFiniteNumber:Jd,findKey:po,global:Ct,isContextDefined:mo,isSpecCompliantForm:Vd,toJSONObject:Qd,isAsyncFn:Xd,isThenable:Yd,setImmediate:yo,asap:Zd,isIterable:tl},tt=class y extends Error{static from(e,a,r,s,i,o){let t=new y(e.message,a||e.code,r,s,i);return t.cause=e,t.name=e.name,e.status!=null&&t.status==null&&(t.status=e.status),o&&Object.assign(t,o),t}constructor(e,a,r,s,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}};tt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";tt.ERR_BAD_OPTION="ERR_BAD_OPTION";tt.ECONNABORTED="ECONNABORTED";tt.ETIMEDOUT="ETIMEDOUT";tt.ERR_NETWORK="ERR_NETWORK";tt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";tt.ERR_DEPRECATED="ERR_DEPRECATED";tt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";tt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";tt.ERR_CANCELED="ERR_CANCELED";tt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";tt.ERR_INVALID_URL="ERR_INVALID_URL";var z=tt;function Xa(y){return q.isPlainObject(y)||q.isArray(y)}function go(y){return q.endsWith(y,"[]")?y.slice(0,-2):y}function Ua(y,e,a){return y?y.concat(e).map(function(s,i){return s=go(s),!a&&i?"["+s+"]":s}).join(a?".":""):e}function el(y){return q.isArray(y)&&!y.some(Xa)}var al=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function Ye(y,e,a){if(!q.isObject(y))throw new TypeError("target must be an object");e=e||new(so.default||FormData),a=q.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,b){return!q.isUndefined(b[S])});let r=a.metaTokens,s=a.visitor||u,i=a.dots,o=a.indexes,f=(a.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(s))throw new TypeError("visitor must be a function");function p(_){if(_===null)return"";if(q.isDate(_))return _.toISOString();if(q.isBoolean(_))return _.toString();if(!f&&q.isBlob(_))throw new z("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(_)||q.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function u(_,S,b){let I=_;if(q.isReactNative(e)&&q.isReactNativeBlob(_))return e.append(Ua(b,S,i),p(_)),!1;if(_&&!b&&typeof _=="object"){if(q.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(q.isArray(_)&&el(_)||(q.isFileList(_)||q.endsWith(S,"[]"))&&(I=q.toArray(_)))return S=go(S),I.forEach(function(F,R){!(q.isUndefined(F)||F===null)&&e.append(o===!0?Ua([S],R,i):o===null?S:S+"[]",p(F))}),!1}return Xa(_)?!0:(e.append(Ua(b,S,i),p(_)),!1)}let c=[],m=Object.assign(al,{defaultVisitor:u,convertValue:p,isVisitable:Xa});function g(_,S){if(!q.isUndefined(_)){if(c.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));c.push(_),q.forEach(_,function(I,$){(!(q.isUndefined(I)||I===null)&&s.call(e,I,q.isString($)?$.trim():$,S,m))===!0&&g(I,S?S.concat($):[$])}),c.pop()}}if(!q.isObject(y))throw new TypeError("data must be an object");return g(y),e}function As(y){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(y).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function fo(y,e){this._pairs=[],y&&Ye(y,this,e)}var vo=fo.prototype;vo.append=function(e,a){this._pairs.push([e,a])};vo.toString=function(e){let a=e?function(r){return e.call(this,r,As)}:As;return this._pairs.map(function(s){return a(s[0])+"="+a(s[1])},"").join("&")};function rl(y){return encodeURIComponent(y).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dr(y,e,a){if(!e)return y;let r=a&&a.encode||rl,s=q.isFunction(a)?{serialize:a}:a,i=s&&s.serialize,o;if(i?o=i(e,s):o=q.isURLSearchParams(e)?e.toString():new fo(e,s).toString(r),o){let t=y.indexOf("#");t!==-1&&(y=y.slice(0,t)),y+=(y.indexOf("?")===-1?"?":"&")+o}return y}var Ya=class{constructor(){this.handlers=[]}use(e,a,r){return this.handlers.push({fulfilled:e,rejected:a,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(r){r!==null&&e(r)})}},Ds=Ya,Ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},il=hd.default.URLSearchParams,Ha="abcdefghijklmnopqrstuvwxyz",Ms="0123456789",_o={DIGIT:Ms,ALPHA:Ha,ALPHA_DIGIT:Ha+Ha.toUpperCase()+Ms},sl=(y=16,e=_o.ALPHA_DIGIT)=>{let a="",{length:r}=e,s=new Uint32Array(y);nd.default.randomFillSync(s);for(let i=0;i<y;i++)a+=e[s[i]%r];return a},ol={isNode:!0,classes:{URLSearchParams:il,FormData:so.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:_o,generateString:sl,protocols:["http","https","file","data"]},lr=typeof window<"u"&&typeof document<"u",Za=typeof navigator=="object"&&navigator||void 0,nl=lr&&(!Za||["ReactNative","NativeScript","NS"].indexOf(Za.product)<0),hl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dl=lr&&window.location.href||"http://localhost",ll=Object.freeze({__proto__:null,hasBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:hl,hasStandardBrowserEnv:nl,navigator:Za,origin:dl}),U={...ll,...ol};function cl(y,e){return Ye(y,new U.classes.URLSearchParams,{visitor:function(a,r,s,i){return U.isNode&&q.isBuffer(a)?(this.append(r,a.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function pl(y){return q.matchAll(/\w+|\[(\w*)]/g,y).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ml(y){let e={},a=Object.keys(y),r,s=a.length,i;for(r=0;r<s;r++)i=a[r],e[i]=y[i];return e}function bo(y){function e(a,r,s,i){let o=a[i++];if(o==="__proto__")return!0;let t=Number.isFinite(+o),f=i>=a.length;return o=!o&&q.isArray(s)?s.length:o,f?(q.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!t):((!s[o]||!q.isObject(s[o]))&&(s[o]=[]),e(a,r,s[o],i)&&q.isArray(s[o])&&(s[o]=ml(s[o])),!t)}if(q.isFormData(y)&&q.isFunction(y.entries)){let a={};return q.forEachEntry(y,(r,s)=>{e(pl(r),s,a,0)}),a}return null}function ul(y,e,a){if(q.isString(y))try{return(e||JSON.parse)(y),q.trim(y)}catch(r){if(r.name!=="SyntaxError")throw r}return(a||JSON.stringify)(y)}var cr={transitional:Ze,adapter:["xhr","http","fetch"],transformRequest:[function(e,a){let r=a.getContentType()||"",s=r.indexOf("application/json")>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return s?JSON.stringify(bo(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let t;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return cl(e,this.formSerializer).toString();if((t=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){let f=this.env&&this.env.FormData;return Ye(t?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(a.setContentType("application/json",!1),ul(e)):e}],transformResponse:[function(e){let a=this.transitional||cr.transitional,r=a&&a.forcedJSONParsing,s=this.responseType==="json";if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(r&&!this.responseType||s)){let o=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(t){if(o)throw t.name==="SyntaxError"?z.from(t,z.ERR_BAD_RESPONSE,this,null,this.response):t}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],y=>{cr.headers[y]={}});var pr=cr,yl=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gl=y=>{let e={},a,r,s;return y&&y.split(`
|
|
4
4
|
`).forEach(function(o){s=o.indexOf(":"),a=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!a||e[a]&&yl[a])&&(a==="set-cookie"?e[a]?e[a].push(r):e[a]=[r]:e[a]=e[a]?e[a]+", "+r:r)}),e},Bs=Symbol("internals");function ye(y){return y&&String(y).trim().toLowerCase()}function We(y){return y===!1||y==null?y:q.isArray(y)?y.map(We):String(y)}function fl(y){let e=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=a.exec(y);)e[r[1]]=r[2];return e}var vl=y=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(y.trim());function Na(y,e,a,r,s){if(q.isFunction(r))return r.call(this,e,a);if(s&&(e=a),!!q.isString(e)){if(q.isString(r))return e.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(e)}}function _l(y){return y.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,r)=>a.toUpperCase()+r)}function bl(y,e){let a=q.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(y,r+a,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}var te=class{constructor(e){e&&this.set(e)}set(e,a,r){let s=this;function i(t,f,p){let u=ye(f);if(!u)throw new Error("header name must be a non-empty string");let c=q.findKey(s,u);(!c||s[c]===void 0||p===!0||p===void 0&&s[c]!==!1)&&(s[c||f]=We(t))}let o=(t,f)=>q.forEach(t,(p,u)=>i(p,u,f));if(q.isPlainObject(e)||e instanceof this.constructor)o(e,a);else if(q.isString(e)&&(e=e.trim())&&!vl(e))o(gl(e),a);else if(q.isObject(e)&&q.isIterable(e)){let t={},f,p;for(let u of e){if(!q.isArray(u))throw TypeError("Object iterator must return a key-value pair");t[p=u[0]]=(f=t[p])?q.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}o(t,a)}else e!=null&&i(a,e,r);return this}get(e,a){if(e=ye(e),e){let r=q.findKey(this,e);if(r){let s=this[r];if(!a)return s;if(a===!0)return fl(s);if(q.isFunction(a))return a.call(this,s,r);if(q.isRegExp(a))return a.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=ye(e),e){let r=q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!a||Na(this,this[r],r,a)))}return!1}delete(e,a){let r=this,s=!1;function i(o){if(o=ye(o),o){let t=q.findKey(r,o);t&&(!a||Na(r,r[t],t,a))&&(delete r[t],s=!0)}}return q.isArray(e)?e.forEach(i):i(e),s}clear(e){let a=Object.keys(this),r=a.length,s=!1;for(;r--;){let i=a[r];(!e||Na(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let a=this,r={};return q.forEach(this,(s,i)=>{let o=q.findKey(r,i);if(o){a[o]=We(s),delete a[i];return}let t=e?_l(i):String(i).trim();t!==i&&delete a[i],a[t]=We(s),r[t]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let a=Object.create(null);return q.forEach(this,(r,s)=>{r!=null&&r!==!1&&(a[s]=e&&q.isArray(r)?r.join(", "):r)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join(`
|
|
5
5
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...a){let r=new this(e);return a.forEach(s=>r.set(s)),r}static accessor(e){let r=(this[Bs]=this[Bs]={accessors:{}}).accessors,s=this.prototype;function i(o){let t=ye(o);r[t]||(bl(s,o),r[t]=!0)}return q.isArray(e)?e.forEach(i):i(e),this}};te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(te.prototype,({value:y},e)=>{let a=e[0].toUpperCase()+e.slice(1);return{get:()=>y,set(r){this[a]=r}}});q.freezeMethods(te);var it=te;function Ka(y,e){let a=this||pr,r=e||a,s=it.from(r.headers),i=r.data;return q.forEach(y,function(t){i=t.call(a,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function So(y){return!!(y&&y.__CANCEL__)}var tr=class extends z{constructor(e,a,r){super(e??"canceled",z.ERR_CANCELED,a,r),this.name="CanceledError",this.__CANCEL__=!0}},Dt=tr;function Yt(y,e,a){let r=a.config.validateStatus;!a.status||!r||r(a.status)?y(a):e(new z("Request failed with status code "+a.status,[z.ERR_BAD_REQUEST,z.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function Sl(y){return typeof y!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(y)}function Il(y,e){return e?y.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):y}function mr(y,e,a){let r=!Sl(e);return y&&(r||a==!1)?Il(y,e):e}var Ne="1.13.6";function Io(y){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y);return e&&e[1]||""}var wl=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function kl(y,e,a){let r=a&&a.Blob||U.classes.Blob,s=Io(y);if(e===void 0&&r&&(e=!0),s==="data"){y=s.length?y.slice(s.length+1):y;let i=wl.exec(y);if(!i)throw new z("Invalid URL",z.ERR_INVALID_URL);let o=i[1],t=i[2],f=i[3],p=Buffer.from(decodeURIComponent(f),t?"base64":"utf8");if(e){if(!r)throw new z("Blob is not supported",z.ERR_NOT_SUPPORT);return new r([p],{type:o})}return p}throw new z("Unsupported protocol "+s,z.ERR_NOT_SUPPORT)}var Ja=Symbol("internals"),er=class extends gt.default.Transform{constructor(e){e=q.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(r,s)=>!q.isUndefined(s[r])),super({readableHighWaterMark:e.chunkSize});let a=this[Ja]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",r=>{r==="progress"&&(a.isCaptured||(a.isCaptured=!0))})}_read(e){let a=this[Ja];return a.onReadCallback&&a.onReadCallback(),super._read(e)}_transform(e,a,r){let s=this[Ja],i=s.maxRate,o=this.readableHighWaterMark,t=s.timeWindow,f=1e3/t,p=i/f,u=s.minChunkSize!==!1?Math.max(s.minChunkSize,p*.01):0,c=(g,_)=>{let S=Buffer.byteLength(g);s.bytesSeen+=S,s.bytes+=S,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(g)?process.nextTick(_):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(_)}},m=(g,_)=>{let S=Buffer.byteLength(g),b=null,I=o,$,F=0;if(i){let R=Date.now();(!s.ts||(F=R-s.ts)>=t)&&(s.ts=R,$=p-s.bytes,s.bytes=$<0?-$:0,F=0),$=p-s.bytes}if(i){if($<=0)return setTimeout(()=>{_(null,g)},t-F);$<I&&(I=$)}I&&S>I&&S-I>u&&(b=g.subarray(I),g=g.subarray(0,I)),c(g,b?()=>{process.nextTick(_,null,b)}:_)};m(e,function g(_,S){if(_)return r(_);S?m(S,g):r(null)})}},Ls=er,{asyncIterator:Ws}=Symbol,Tl=async function*(y){y.stream?yield*y.stream():y.arrayBuffer?yield await y.arrayBuffer():y[Ws]?yield*y[Ws]():yield y},wo=Tl,Pl=U.ALPHABET.ALPHA_DIGIT+"-_",ge=typeof TextEncoder=="function"?new TextEncoder:new nr.default.TextEncoder,At=`\r
|
|
6
6
|
`,ql=ge.encode(At),Fl=2,ar=class{constructor(e,a){let{escapeName:r}=this.constructor,s=q.isString(a),i=`Content-Disposition: form-data; name="${r(e)}"${!s&&a.name?`; filename="${r(a.name)}"`:""}${At}`;s?a=ge.encode(String(a).replace(/\r?\n|\r\n?/g,At)):i+=`Content-Type: ${a.type||"application/octet-stream"}${At}`,this.headers=ge.encode(i+At),this.contentLength=s?a.byteLength:a.size,this.size=this.headers.byteLength+this.contentLength+Fl,this.name=e,this.value=a}async*encode(){yield this.headers;let{value:e}=this;q.isTypedArray(e)?yield e:yield*wo(e),yield ql}static escapeName(e){return String(e).replace(/[\r\n"]/g,a=>({"\r":"%0D","\n":"%0A",'"':"%22"})[a])}},$l=(y,e,a)=>{let{tag:r="form-data-boundary",size:s=25,boundary:i=r+"-"+U.generateString(s,Pl)}=a||{};if(!q.isFormData(y))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let o=ge.encode("--"+i+At),t=ge.encode("--"+i+"--"+At),f=t.byteLength,p=Array.from(y.entries()).map(([c,m])=>{let g=new ar(c,m);return f+=g.size,g});f+=o.byteLength*p.length,f=q.toFiniteNumber(f);let u={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(f)&&(u["Content-Length"]=f),e&&e(u),io.Readable.from(async function*(){for(let c of p)yield o,yield*c.encode();yield t}())},zl=$l,rr=class extends gt.default.Transform{__transform(e,a,r){this.push(e),r()}_transform(e,a,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,a)}this.__transform(e,a,r)}},El=rr,Ol=(y,e)=>q.isAsyncFn(y)?function(...a){let r=a.pop();y.apply(this,a).then(s=>{try{e?r(null,...e(s)):r(null,s)}catch(i){r(i)}},r)}:y,xl=Ol;function jl(y,e){y=y||10;let a=new Array(y),r=new Array(y),s=0,i=0,o;return e=e!==void 0?e:1e3,function(f){let p=Date.now(),u=r[i];o||(o=p),a[s]=f,r[s]=p;let c=i,m=0;for(;c!==s;)m+=a[c++],c=c%y;if(s=(s+1)%y,s===i&&(i=(i+1)%y),p-o<e)return;let g=u&&p-u;return g?Math.round(m*1e3/g):void 0}}function Gl(y,e){let a=0,r=1e3/e,s,i,o=(p,u=Date.now())=>{a=u,s=null,i&&(clearTimeout(i),i=null),y(...p)};return[(...p)=>{let u=Date.now(),c=u-a;c>=r?o(p,u):(s=p,i||(i=setTimeout(()=>{i=null,o(s)},r-c)))},()=>s&&o(s)]}var ee=(y,e,a=3)=>{let r=0,s=jl(50,250);return Gl(i=>{let o=i.loaded,t=i.lengthComputable?i.total:void 0,f=o-r,p=s(f),u=o<=t;r=o;let c={loaded:o,total:t,progress:t?o/t:void 0,bytes:f,rate:p||void 0,estimated:p&&t&&u?(t-o)/p:void 0,event:i,lengthComputable:t!=null,[e?"download":"upload"]:!0};y(c)},a)},Ke=(y,e)=>{let a=y!=null;return[r=>e[0]({lengthComputable:a,total:y,loaded:r}),e[1]]},Je=y=>(...e)=>q.asap(()=>y(...e));function Rl(y){if(!y||typeof y!="string"||!y.startsWith("data:"))return 0;let e=y.indexOf(",");if(e<0)return 0;let a=y.slice(5,e),r=y.slice(e+1);if(/;base64/i.test(a)){let i=r.length,o=r.length;for(let m=0;m<o;m++)if(r.charCodeAt(m)===37&&m+2<o){let g=r.charCodeAt(m+1),_=r.charCodeAt(m+2);(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102)&&(i-=2,m+=2)}let t=0,f=o-1,p=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);f>=0&&(r.charCodeAt(f)===61?(t++,f--):p(f)&&(t++,f-=3)),t===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&t++;let c=Math.floor(i/4)*3-(t||0);return c>0?c:0}return Buffer.byteLength(r,"utf8")}var Us={flush:zt.default.constants.Z_SYNC_FLUSH,finishFlush:zt.default.constants.Z_SYNC_FLUSH},Cl={flush:zt.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:zt.default.constants.BROTLI_OPERATION_FLUSH},Hs=q.isFunction(zt.default.createBrotliDecompress),{http:Al,https:Dl}=pd.default,Ml=/https:?/,Ns=U.protocols.map(y=>y+":"),Ks=(y,[e,a])=>(y.on("end",a).on("error",a),e),ir=class{constructor(){this.sessions=Object.create(null)}getSession(e,a){a=Object.assign({sessionTimeout:1e3},a);let r=this.sessions[e];if(r){let u=r.length;for(let c=0;c<u;c++){let[m,g]=r[c];if(!m.destroyed&&!m.closed&&nr.default.isDeepStrictEqual(g,a))return m}}let s=oo.default.connect(e,a),i,o=()=>{if(i)return;i=!0;let u=r,c=u.length,m=c;for(;m--;)if(u[m][0]===s){c===1?delete this.sessions[e]:u.splice(m,1);return}},t=s.request,{sessionTimeout:f}=a;if(f!=null){let u,c=0;s.request=function(){let m=t.apply(this,arguments);return c++,u&&(clearTimeout(u),u=null),m.once("close",()=>{--c||(u=setTimeout(()=>{u=null,o()},f))}),m}}s.once("close",o);let p=[s,a];return r?r.push(p):r=this.sessions[e]=[p],s}},Bl=new ir;function Ll(y,e){y.beforeRedirects.proxy&&y.beforeRedirects.proxy(y),y.beforeRedirects.config&&y.beforeRedirects.config(y,e)}function ko(y,e,a){let r=e;if(!r&&r!==!1){let s=dd.default.getProxyForUrl(a);s&&(r=new URL(s))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){if(!!(r.auth.username||r.auth.password))r.auth=(r.auth.username||"")+":"+(r.auth.password||"");else if(typeof r.auth=="object")throw new z("Invalid proxy authorization",z.ERR_BAD_OPTION,{proxy:r});let o=Buffer.from(r.auth,"utf8").toString("base64");y.headers["Proxy-Authorization"]="Basic "+o}y.headers.host=y.hostname+(y.port?":"+y.port:"");let s=r.hostname||r.host;y.hostname=s,y.host=s,y.port=r.port,y.path=a,r.protocol&&(y.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}y.beforeRedirects.proxy=function(i){ko(i,e,i.href)}}var Wl=typeof process<"u"&&q.kindOf(process)==="process",Ul=y=>new Promise((e,a)=>{let r,s,i=(f,p)=>{s||(s=!0,r&&r(f,p))},o=f=>{i(f),e(f)},t=f=>{i(f,!0),a(f)};y(o,t,f=>r=f).catch(t)}),Hl=({address:y,family:e})=>{if(!q.isString(y))throw TypeError("address must be a string");return{address:y,family:e||(y.indexOf(".")<0?6:4)}},Js=(y,e)=>Hl(q.isObject(y)?y:{address:y,family:e}),Nl={request(y,e){let a=y.protocol+"//"+y.hostname+":"+(y.port||(y.protocol==="https:"?443:80)),{http2Options:r,headers:s}=y,i=Bl.getSession(a,r),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:t,HTTP2_HEADER_PATH:f,HTTP2_HEADER_STATUS:p}=oo.default.constants,u={[o]:y.protocol.replace(":",""),[t]:y.method,[f]:y.path};q.forEach(s,(m,g)=>{g.charAt(0)!==":"&&(u[g]=m)});let c=i.request(u);return c.once("response",m=>{let g=c;m=Object.assign({},m);let _=m[p];delete m[p],g.headers=m,g.statusCode=+_,e(g)}),c}},Kl=Wl&&function(e){return Ul(async function(r,s,i){let{data:o,lookup:t,family:f,httpVersion:p=1,http2Options:u}=e,{responseType:c,responseEncoding:m}=e,g=e.method.toUpperCase(),_,S=!1,b;if(p=+p,Number.isNaN(p))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(p!==1&&p!==2)throw TypeError(`Unsupported protocol version '${p}'`);let I=p===2;if(t){let j=xl(t,O=>q.isArray(O)?O:[O]);t=(O,A,st)=>{j(O,A,(H,lt,$t)=>{if(H)return st(H);let at=q.isArray(lt)?lt.map(Me=>Js(Me)):[Js(lt,$t)];A.all?st(H,at):st(H,at[0].address,at[0].family)})}}let $=new od.EventEmitter;function F(j){try{$.emit("abort",!j||j.type?new Dt(null,e,b):j)}catch(O){console.warn("emit error",O)}}$.once("abort",s);let R=()=>{e.cancelToken&&e.cancelToken.unsubscribe(F),e.signal&&e.signal.removeEventListener("abort",F),$.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(F),e.signal&&(e.signal.aborted?F():e.signal.addEventListener("abort",F))),i((j,O)=>{if(_=!0,O){S=!0,R();return}let{data:A}=j;if(A instanceof gt.default.Readable||A instanceof gt.default.Duplex){let st=gt.default.finished(A,()=>{st(),R()})}else R()});let M=mr(e.baseURL,e.url,e.allowAbsoluteUrls),C=new URL(M,U.hasBrowserEnv?U.origin:void 0),W=C.protocol||Ns[0];if(W==="data:"){if(e.maxContentLength>-1){let O=String(e.url||M||"");if(Rl(O)>e.maxContentLength)return s(new z("maxContentLength size of "+e.maxContentLength+" exceeded",z.ERR_BAD_RESPONSE,e))}let j;if(g!=="GET")return Yt(r,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{j=kl(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(O){throw z.from(O,z.ERR_BAD_REQUEST,e)}return c==="text"?(j=j.toString(m),(!m||m==="utf8")&&(j=q.stripBOM(j))):c==="stream"&&(j=gt.default.Readable.from(j)),Yt(r,s,{data:j,status:200,statusText:"OK",headers:new it,config:e})}if(Ns.indexOf(W)===-1)return s(new z("Unsupported protocol "+W,z.ERR_BAD_REQUEST,e));let J=it.from(e.headers).normalize();J.set("User-Agent","axios/"+Ne,!1);let{onUploadProgress:qt,onDownloadProgress:Vt}=e,Rt=e.maxRate,_t,yt;if(q.isSpecCompliantForm(o)){let j=J.getContentType(/boundary=([-_\w\d]{10,70})/i);o=zl(o,O=>{J.set(O)},{tag:`axios-${Ne}-boundary`,boundary:j&&j[1]||void 0})}else if(q.isFormData(o)&&q.isFunction(o.getHeaders)){if(J.set(o.getHeaders()),!J.hasContentLength())try{let j=await nr.default.promisify(o.getLength).call(o);Number.isFinite(j)&&j>=0&&J.setContentLength(j)}catch{}}else if(q.isBlob(o)||q.isFile(o))o.size&&J.setContentType(o.type||"application/octet-stream"),J.setContentLength(o.size||0),o=gt.default.Readable.from(wo(o));else if(o&&!q.isStream(o)){if(!Buffer.isBuffer(o))if(q.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(q.isString(o))o=Buffer.from(o,"utf-8");else return s(new z("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",z.ERR_BAD_REQUEST,e));if(J.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return s(new z("Request body larger than maxBodyLength limit",z.ERR_BAD_REQUEST,e))}let bt=q.toFiniteNumber(J.getContentLength());q.isArray(Rt)?(_t=Rt[0],yt=Rt[1]):_t=yt=Rt,o&&(qt||_t)&&(q.isStream(o)||(o=gt.default.Readable.from(o,{objectMode:!1})),o=gt.default.pipeline([o,new Ls({maxRate:q.toFiniteNumber(_t)})],q.noop),qt&&o.on("progress",Ks(o,Ke(bt,ee(Je(qt),!1,3)))));let Ft;if(e.auth){let j=e.auth.username||"",O=e.auth.password||"";Ft=j+":"+O}if(!Ft&&C.username){let j=C.username,O=C.password;Ft=j+":"+O}Ft&&J.delete("authorization");let Q;try{Q=dr(C.pathname+C.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(j){let O=new Error(j.message);return O.config=e,O.url=e.url,O.exists=!0,s(O)}J.set("Accept-Encoding","gzip, compress, deflate"+(Hs?", br":""),!1);let X={path:Q,method:g,headers:J.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:Ft,protocol:W,family:f,beforeRedirect:Ll,beforeRedirects:{},http2Options:u};!q.isUndefined(t)&&(X.lookup=t),e.socketPath?X.socketPath=e.socketPath:(X.hostname=C.hostname.startsWith("[")?C.hostname.slice(1,-1):C.hostname,X.port=C.port,ko(X,e.proxy,W+"//"+C.hostname+(C.port?":"+C.port:"")+X.path));let et,Qt=Ml.test(X.protocol);if(X.agent=Qt?e.httpsAgent:e.httpAgent,I?et=Nl:e.transport?et=e.transport:e.maxRedirects===0?et=Qt?cd.default:ld.default:(e.maxRedirects&&(X.maxRedirects=e.maxRedirects),e.beforeRedirect&&(X.beforeRedirects.config=e.beforeRedirect),et=Qt?Dl:Al),e.maxBodyLength>-1?X.maxBodyLength=e.maxBodyLength:X.maxBodyLength=1/0,e.insecureHTTPParser&&(X.insecureHTTPParser=e.insecureHTTPParser),b=et.request(X,function(O){if(b.destroyed)return;let A=[O],st=q.toFiniteNumber(O.headers["content-length"]);if(Vt||yt){let at=new Ls({maxRate:q.toFiniteNumber(yt)});Vt&&at.on("progress",Ks(at,Ke(st,ee(Je(Vt),!0,3)))),A.push(at)}let H=O,lt=O.req||b;if(e.decompress!==!1&&O.headers["content-encoding"])switch((g==="HEAD"||O.statusCode===204)&&delete O.headers["content-encoding"],(O.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":A.push(zt.default.createUnzip(Us)),delete O.headers["content-encoding"];break;case"deflate":A.push(new El),A.push(zt.default.createUnzip(Us)),delete O.headers["content-encoding"];break;case"br":Hs&&(A.push(zt.default.createBrotliDecompress(Cl)),delete O.headers["content-encoding"])}H=A.length>1?gt.default.pipeline(A,q.noop):A[0];let $t={status:O.statusCode,statusText:O.statusMessage,headers:new it(O.headers),config:e,request:lt};if(c==="stream")$t.data=H,Yt(r,s,$t);else{let at=[],Me=0;H.on("data",function(Z){at.push(Z),Me+=Z.length,e.maxContentLength>-1&&Me>e.maxContentLength&&(S=!0,H.destroy(),F(new z("maxContentLength size of "+e.maxContentLength+" exceeded",z.ERR_BAD_RESPONSE,e,lt)))}),H.on("aborted",function(){if(S)return;let Z=new z("stream has been aborted",z.ERR_BAD_RESPONSE,e,lt);H.destroy(Z),s(Z)}),H.on("error",function(Z){b.destroyed||s(z.from(Z,null,e,lt))}),H.on("end",function(){try{let Z=at.length===1?at[0]:Buffer.concat(at);c!=="arraybuffer"&&(Z=Z.toString(m),(!m||m==="utf8")&&(Z=q.stripBOM(Z))),$t.data=Z}catch(Z){return s(z.from(Z,null,e,$t.request,$t))}Yt(r,s,$t)})}$.once("abort",at=>{H.destroyed||(H.emit("error",at),H.destroy())})}),$.once("abort",j=>{b.close?b.close():b.destroy(j)}),b.on("error",function(O){s(z.from(O,null,e,b))}),b.on("socket",function(O){O.setKeepAlive(!0,1e3*60)}),e.timeout){let j=parseInt(e.timeout,10);if(Number.isNaN(j)){F(new z("error trying to parse `config.timeout` to int",z.ERR_BAD_OPTION_VALUE,e,b));return}b.setTimeout(j,function(){if(_)return;let A=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",st=e.transitional||Ze;e.timeoutErrorMessage&&(A=e.timeoutErrorMessage),F(new z(A,st.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,b))})}else b.setTimeout(0);if(q.isStream(o)){let j=!1,O=!1;o.on("end",()=>{j=!0}),o.once("error",A=>{O=!0,b.destroy(A)}),o.on("close",()=>{!j&&!O&&F(new Dt("Request stream has been aborted",e,b))}),o.pipe(b)}else o&&b.write(o),b.end()})},Jl=U.hasStandardBrowserEnv?((y,e)=>a=>(a=new URL(a,U.origin),y.protocol===a.protocol&&y.host===a.host&&(e||y.port===a.port)))(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0,Vl=U.hasStandardBrowserEnv?{write(y,e,a,r,s,i,o){if(typeof document>"u")return;let t=[`${y}=${encodeURIComponent(e)}`];q.isNumber(a)&&t.push(`expires=${new Date(a).toUTCString()}`),q.isString(r)&&t.push(`path=${r}`),q.isString(s)&&t.push(`domain=${s}`),i===!0&&t.push("secure"),q.isString(o)&&t.push(`SameSite=${o}`),document.cookie=t.join("; ")},read(y){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+y+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(y){this.write(y,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}},Vs=y=>y instanceof it?{...y}:y;function Mt(y,e){e=e||{};let a={};function r(p,u,c,m){return q.isPlainObject(p)&&q.isPlainObject(u)?q.merge.call({caseless:m},p,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function s(p,u,c,m){if(q.isUndefined(u)){if(!q.isUndefined(p))return r(void 0,p,c,m)}else return r(p,u,c,m)}function i(p,u){if(!q.isUndefined(u))return r(void 0,u)}function o(p,u){if(q.isUndefined(u)){if(!q.isUndefined(p))return r(void 0,p)}else return r(void 0,u)}function t(p,u,c){if(c in e)return r(p,u);if(c in y)return r(void 0,p)}let f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:t,headers:(p,u,c)=>s(Vs(p),Vs(u),c,!0)};return q.forEach(Object.keys({...y,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;let c=q.hasOwnProp(f,u)?f[u]:s,m=c(y[u],e[u],u);q.isUndefined(m)&&c!==t||(a[u]=m)}),a}var To=y=>{let e=Mt({},y),{data:a,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:t}=e;if(e.headers=o=it.from(o),e.url=dr(mr(e.baseURL,e.url,e.allowAbsoluteUrls),y.params,y.paramsSerializer),t&&o.set("Authorization","Basic "+btoa((t.username||"")+":"+(t.password?unescape(encodeURIComponent(t.password)):""))),q.isFormData(a)){if(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(q.isFunction(a.getHeaders)){let f=a.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([u,c])=>{p.includes(u.toLowerCase())&&o.set(u,c)})}}if(U.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(e)),r||r!==!1&&Jl(e.url))){let f=s&&i&&Vl.read(i);f&&o.set(s,f)}return e},Ql=typeof XMLHttpRequest<"u",Xl=Ql&&function(y){return new Promise(function(a,r){let s=To(y),i=s.data,o=it.from(s.headers).normalize(),{responseType:t,onUploadProgress:f,onDownloadProgress:p}=s,u,c,m,g,_;function S(){g&&g(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function I(){if(!b)return;let F=it.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),M={data:!t||t==="text"||t==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:F,config:y,request:b};Yt(function(W){a(W),S()},function(W){r(W),S()},M),b=null}"onloadend"in b?b.onloadend=I:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(I)},b.onabort=function(){b&&(r(new z("Request aborted",z.ECONNABORTED,y,b)),b=null)},b.onerror=function(R){let M=R&&R.message?R.message:"Network Error",C=new z(M,z.ERR_NETWORK,y,b);C.event=R||null,r(C),b=null},b.ontimeout=function(){let R=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",M=s.transitional||Ze;s.timeoutErrorMessage&&(R=s.timeoutErrorMessage),r(new z(R,M.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,y,b)),b=null},i===void 0&&o.setContentType(null),"setRequestHeader"in b&&q.forEach(o.toJSON(),function(R,M){b.setRequestHeader(M,R)}),q.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),t&&t!=="json"&&(b.responseType=s.responseType),p&&([m,_]=ee(p,!0),b.addEventListener("progress",m)),f&&b.upload&&([c,g]=ee(f),b.upload.addEventListener("progress",c),b.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=F=>{b&&(r(!F||F.type?new Dt(null,y,b):F),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));let $=Io(s.url);if($&&U.protocols.indexOf($)===-1){r(new z("Unsupported protocol "+$+":",z.ERR_BAD_REQUEST,y));return}b.send(i||null)})},Yl=(y,e)=>{let{length:a}=y=y?y.filter(Boolean):[];if(e||a){let r=new AbortController,s,i=function(p){if(!s){s=!0,t();let u=p instanceof Error?p:this.reason;r.abort(u instanceof z?u:new Dt(u instanceof Error?u.message:u))}},o=e&&setTimeout(()=>{o=null,i(new z(`timeout of ${e}ms exceeded`,z.ETIMEDOUT))},e),t=()=>{y&&(o&&clearTimeout(o),o=null,y.forEach(p=>{p.unsubscribe?p.unsubscribe(i):p.removeEventListener("abort",i)}),y=null)};y.forEach(p=>p.addEventListener("abort",i));let{signal:f}=r;return f.unsubscribe=()=>q.asap(t),f}},Zl=Yl,tc=function*(y,e){let a=y.byteLength;if(!e||a<e){yield y;return}let r=0,s;for(;r<a;)s=r+e,yield y.slice(r,s),r=s},ec=async function*(y,e){for await(let a of ac(y))yield*tc(a,e)},ac=async function*(y){if(y[Symbol.asyncIterator]){yield*y;return}let e=y.getReader();try{for(;;){let{done:a,value:r}=await e.read();if(a)break;yield r}}finally{await e.cancel()}},Qs=(y,e,a,r)=>{let s=ec(y,e),i=0,o,t=f=>{o||(o=!0,r&&r(f))};return new ReadableStream({async pull(f){try{let{done:p,value:u}=await s.next();if(p){t(),f.close();return}let c=u.byteLength;if(a){let m=i+=c;a(m)}f.enqueue(new Uint8Array(u))}catch(p){throw t(p),p}},cancel(f){return t(f),s.return()}},{highWaterMark:2})},Xs=64*1024,{isFunction:Be}=q,rc=(({Request:y,Response:e})=>({Request:y,Response:e}))(q.global),{ReadableStream:Ys,TextEncoder:Zs}=q.global,to=(y,...e)=>{try{return!!y(...e)}catch{return!1}},ic=y=>{y=q.merge.call({skipUndefined:!0},rc,y);let{fetch:e,Request:a,Response:r}=y,s=e?Be(e):typeof fetch=="function",i=Be(a),o=Be(r);if(!s)return!1;let t=s&&Be(Ys),f=s&&(typeof Zs=="function"?(_=>S=>_.encode(S))(new Zs):async _=>new Uint8Array(await new a(_).arrayBuffer())),p=i&&t&&to(()=>{let _=!1,S=new a(U.origin,{body:new Ys,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),u=o&&t&&to(()=>q.isReadableStream(new r("").body)),c={stream:u&&(_=>_.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!c[_]&&(c[_]=(S,b)=>{let I=S&&S[_];if(I)return I.call(S);throw new z(`Response type '${_}' is not supported`,z.ERR_NOT_SUPPORT,b)})});let m=async _=>{if(_==null)return 0;if(q.isBlob(_))return _.size;if(q.isSpecCompliantForm(_))return(await new a(U.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(q.isArrayBufferView(_)||q.isArrayBuffer(_))return _.byteLength;if(q.isURLSearchParams(_)&&(_=_+""),q.isString(_))return(await f(_)).byteLength},g=async(_,S)=>{let b=q.toFiniteNumber(_.getContentLength());return b??m(S)};return async _=>{let{url:S,method:b,data:I,signal:$,cancelToken:F,timeout:R,onDownloadProgress:M,onUploadProgress:C,responseType:W,headers:J,withCredentials:qt="same-origin",fetchOptions:Vt}=To(_),Rt=e||fetch;W=W?(W+"").toLowerCase():"text";let _t=Zl([$,F&&F.toAbortSignal()],R),yt=null,bt=_t&&_t.unsubscribe&&(()=>{_t.unsubscribe()}),Ft;try{if(C&&p&&b!=="get"&&b!=="head"&&(Ft=await g(J,I))!==0){let O=new a(S,{method:"POST",body:I,duplex:"half"}),A;if(q.isFormData(I)&&(A=O.headers.get("content-type"))&&J.setContentType(A),O.body){let[st,H]=Ke(Ft,ee(Je(C)));I=Qs(O.body,Xs,st,H)}}q.isString(qt)||(qt=qt?"include":"omit");let Q=i&&"credentials"in a.prototype,X={...Vt,signal:_t,method:b.toUpperCase(),headers:J.normalize().toJSON(),body:I,duplex:"half",credentials:Q?qt:void 0};yt=i&&new a(S,X);let et=await(i?Rt(yt,Vt):Rt(S,X)),Qt=u&&(W==="stream"||W==="response");if(u&&(M||Qt&&bt)){let O={};["status","statusText","headers"].forEach(lt=>{O[lt]=et[lt]});let A=q.toFiniteNumber(et.headers.get("content-length")),[st,H]=M&&Ke(A,ee(Je(M),!0))||[];et=new r(Qs(et.body,Xs,st,()=>{H&&H(),bt&&bt()}),O)}W=W||"text";let j=await c[q.findKey(c,W)||"text"](et,_);return!Qt&&bt&&bt(),await new Promise((O,A)=>{Yt(O,A,{data:j,headers:it.from(et.headers),status:et.status,statusText:et.statusText,config:_,request:yt})})}catch(Q){throw bt&&bt(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new z("Network Error",z.ERR_NETWORK,_,yt,Q&&Q.response),{cause:Q.cause||Q}):z.from(Q,Q&&Q.code,_,yt,Q&&Q.response)}}},sc=new Map,Po=y=>{let e=y&&y.env||{},{fetch:a,Request:r,Response:s}=e,i=[r,s,a],o=i.length,t=o,f,p,u=sc;for(;t--;)f=i[t],p=u.get(f),p===void 0&&u.set(f,p=t?new Map:ic(e)),u=p;return p};Po();var ur={http:Kl,xhr:Xl,fetch:{get:Po}};q.forEach(ur,(y,e)=>{if(y){try{Object.defineProperty(y,"name",{value:e})}catch{}Object.defineProperty(y,"adapterName",{value:e})}});var eo=y=>`- ${y}`,oc=y=>q.isFunction(y)||y===null||y===!1;function nc(y,e){y=q.isArray(y)?y:[y];let{length:a}=y,r,s,i={};for(let o=0;o<a;o++){r=y[o];let t;if(s=r,!oc(r)&&(s=ur[(t=String(r)).toLowerCase()],s===void 0))throw new z(`Unknown adapter '${t}'`);if(s&&(q.isFunction(s)||(s=s.get(e))))break;i[t||"#"+o]=s}if(!s){let o=Object.entries(i).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build")),t=a?o.length>1?`since :
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as V}from"./chunk-OCXGNAAT.js";import{a as G}from"./chunk-I55PXD4N.js";import{Kd as S,Ld as k,Ob as j,Sd as B,de as z,ee as T,ja as b,ke as q,le as H,oe as X}from"./chunk-
|
|
3
|
+
import{a as V}from"./chunk-OCXGNAAT.js";import{a as G}from"./chunk-I55PXD4N.js";import{Kd as S,Ld as k,Ob as j,Sd as B,de as z,ee as T,ja as b,ke as q,le as H,oe as X}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import{Lb as $,Oa as M,_c as W,ca as O,ha as x,wc as F}from"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{w as U}from"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{i as R,p as v,q as A}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{A as C,C as L,Y as I,a as w,z as E}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as y}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";y();import*as _ from"node:fs";import*as g from"node:path";y();var re={"\u2010":"-","\u2011":"-","\u2012":"-","\u2013":"-","\u2014":"-","\u2015":"-","\u2212":"-","\u2018":"'","\u2019":"'","\u201A":"'","\u201B":"'","\u201C":'"',"\u201D":'"',"\u201E":'"',"\u201F":'"',"\xA0":" ","\u2002":" ","\u2003":" ","\u2004":" ","\u2005":" ","\u2006":" ","\u2007":" ","\u2008":" ","\u2009":" ","\u200A":" ","\u202F":" ","\u205F":" ","\u3000":" "};function P(r){if(r==="")return r;let t="";for(let e of r)t+=re[e]??e;return t}var oe=[r=>r,r=>r.trimEnd()];function ae(r){return P(r).trimEnd()}function K(r,t,e){if(t.length===0)return 0;if(t.length>r.length)return null;e:for(let i=0;i<=r.length-t.length;i++){for(let n=0;n<t.length;n++)if(e(r[i+n])!==e(t[n]))continue e;return i}return null}function se(r){let t=r.split(`
|
|
4
4
|
`),e=new Array(t.length+1),i=0;for(let n=0;n<t.length;n++)e[n]=i,i+=t[n].length,n<t.length-1&&(i+=1);return e[t.length]=r.length,{lines:t,offsets:e}}function Q(r,t,e,i,n,o){if(n===0)return o?`
|
|
5
5
|
`:"";let c=t[i]??0,s=i+n-1,l=(t[s]??0)+(e[s]?.length??0);if(o){let p=t[i+n];p!==void 0?l=p:r.endsWith(`
|
|
6
6
|
`)&&(l=r.length)}return r.slice(c,l)}function le(r,t){let{lines:e,offsets:i}=se(r),n=t.split(`
|
|
@@ -15,7 +15,7 @@ import{b as e}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";e();var t={"
|
|
|
15
15
|
`," Issue: API key not found in environment or settings\n":` Issue: API key not found in environment or settings
|
|
16
16
|
`," Run `matilda auth coding-plan` to re-configure.\n":" Run `matilda auth coding-plan` to re-configure.\n","\u2713 Authentication Method: {{type}}":"\u2713 Authentication Method: {{type}}"," Status: Configured\n":` Status: Configured
|
|
17
17
|
`,"Failed to check authentication status: {{error}}":"Failed to check authentication status: {{error}}","Select an option:":"Select an option:","Raw mode not available. Please run in an interactive terminal.":"Raw mode not available. Please run in an interactive terminal.","(Use \u2191 \u2193 arrows to navigate, Enter to select, Ctrl+C to exit)\n":`(Use \u2191 \u2193 arrows to navigate, Enter to select, Ctrl+C to exit)
|
|
18
|
-
`,"Hide tool output and thinking for a cleaner view (toggle with Ctrl+O).":"Hide tool output and thinking for a cleaner view (toggle with Ctrl+O).","Press Ctrl+O to show full tool output":"Press Ctrl+O to show full tool output","Switch to plan mode or exit plan mode":"Switch to plan mode or exit plan mode","Set a goal \u2014 keep working until the condition is met (pause/resume/clear)":"Set a goal \u2014 keep working until the condition is met (pause/resume/clear)","Exited plan mode. Previous approval mode restored.":"Exited plan mode. Previous approval mode restored.","Enabled plan mode. The agent will analyze and plan without executing tools.":"Enabled plan mode. The agent will analyze and plan without executing tools.",'Already in plan mode. Use "/plan exit" to exit plan mode.':'Already in plan mode. Use "/plan exit" to exit plan mode.','Not in plan mode. Use "/plan" to enter plan mode first.':'Not in plan mode. Use "/plan" to enter plan mode first.',"Set up Matilda's status line UI":"Set up Matilda's status line UI","Open the memory manager.":"Open the memory manager.","Show current process memory diagnostics":"Show current process memory diagnostics","Record a CPU profile for Chrome DevTools analysis":"Record a CPU profile for Chrome DevTools analysis","Roll back a standalone update to the previous version":"Roll back a standalone update to the previous version","Rollback is not available in ACP mode.":"Rollback is not available in ACP mode.","Rollback is only available for standalone installations.":"Rollback is only available for standalone installations.","Rollback successful. Restart your terminal to use the previous version.":"Rollback successful. Restart your terminal to use the previous version.","Rollback failed:":"Rollback failed:","Rollback on Windows requires manual intervention. Rename matilda-code.old to matilda-code in your installation directory.":"Rollback on Windows requires manual intervention. Rename matilda-code.old to matilda-code in your installation directory.","Save a durable memory to the memory system.":"Save a durable memory to the memory system.","Quick side question without derailing the main yarn":"Quick side question without derailing the main yarn","Manage Arena sessions":"Manage Arena sessions","Start an Arena session with multiple models competing on the same task":"Start an Arena session with multiple models competing on the same task","Stop the current Arena session":"Stop the current Arena session","Show the current Arena session status":"Show the current Arena session status","Select a model result and merge its diff into the current workspace":"Select a model result and merge its diff into the current workspace","No running Arena session found.":"No running Arena session found.","No Arena session found. Start one with /arena start.":"No Arena session found. Start one with /arena start.","Arena session is still running. Wait for it to complete or use /arena stop first.":"Arena session is still running. Wait for it to complete or use /arena stop first.","No successful agent results to select from. All agents failed or were cancelled.":"No successful agent results to select from. All agents failed or were cancelled.","Use /arena stop to end the session.":"Use /arena stop to end the session.",'No idle agent found matching "{{name}}".':'No idle agent found matching "{{name}}".',"Failed to apply changes from {{label}}: {{error}}":"Failed to apply changes from {{label}}: {{error}}","Applied changes from {{label}} to workspace. Arena session complete.":"Applied changes from {{label}} to workspace. Arena session complete.","Discard all Arena results and clean up worktrees?":"Discard all Arena results and clean up worktrees?","Arena results discarded. All worktrees cleaned up.":"Arena results discarded. All worktrees cleaned up.","Arena is not supported in non-interactive mode. Use interactive mode to start an Arena session.":"Arena is not supported in non-interactive mode. Use interactive mode to start an Arena session.","Arena is not supported in non-interactive mode. Use interactive mode to stop an Arena session.":"Arena is not supported in non-interactive mode. Use interactive mode to stop an Arena session.","Arena is not supported in non-interactive mode.":"Arena is not supported in non-interactive mode.","An Arena session exists. Use /arena stop or /arena select to end it before starting a new one.":"An Arena session exists. Use /arena stop or /arena select to end it before starting a new one.","Usage: /arena start --models model1,model2 <task>":"Usage: /arena start --models model1,model2 <task>","Models to compete (required, at least 2)":"Models to compete (required, at least 2)","Format: authType:modelId or just modelId":"Format: authType:modelId or just modelId","Arena requires at least 2 models. Use --models model1,model2 to specify.":"Arena requires at least 2 models. Use --models model1,model2 to specify.",'Arena started with {{count}} agents on task: "{{task}}"\nModels:\n{{modelList}}':`Arena started with {{count}} agents on task: "{{task}}"
|
|
18
|
+
`,"Hide tool output and thinking for a cleaner view (toggle with Ctrl+O).":"Hide tool output and thinking for a cleaner view (toggle with Ctrl+O).","Press Ctrl+O to show full tool output":"Press Ctrl+O to show full tool output","Switch to plan mode or exit plan mode":"Switch to plan mode or exit plan mode","Set a goal \u2014 keep working until the condition is met (pause/resume/clear)":"Set a goal \u2014 keep working until the condition is met (pause/resume/clear)","Exited plan mode. Previous approval mode restored.":"Exited plan mode. Previous approval mode restored.","Enabled plan mode. The agent will analyze and plan without executing tools.":"Enabled plan mode. The agent will analyze and plan without executing tools.",'Already in plan mode. Use "/plan exit" to exit plan mode.':'Already in plan mode. Use "/plan exit" to exit plan mode.','Not in plan mode. Use "/plan" to enter plan mode first.':'Not in plan mode. Use "/plan" to enter plan mode first.',"Set up Matilda's status line UI":"Set up Matilda's status line UI","Open the memory manager.":"Open the memory manager.","Turn model thinking on or off for this session":"Turn model thinking on or off for this session","Show current process memory diagnostics":"Show current process memory diagnostics","Record a CPU profile for Chrome DevTools analysis":"Record a CPU profile for Chrome DevTools analysis","Roll back a standalone update to the previous version":"Roll back a standalone update to the previous version","Rollback is not available in ACP mode.":"Rollback is not available in ACP mode.","Rollback is only available for standalone installations.":"Rollback is only available for standalone installations.","Rollback successful. Restart your terminal to use the previous version.":"Rollback successful. Restart your terminal to use the previous version.","Rollback failed:":"Rollback failed:","Rollback on Windows requires manual intervention. Rename matilda-code.old to matilda-code in your installation directory.":"Rollback on Windows requires manual intervention. Rename matilda-code.old to matilda-code in your installation directory.","Save a durable memory to the memory system.":"Save a durable memory to the memory system.","Quick side question without derailing the main yarn":"Quick side question without derailing the main yarn","Manage Arena sessions":"Manage Arena sessions","Start an Arena session with multiple models competing on the same task":"Start an Arena session with multiple models competing on the same task","Stop the current Arena session":"Stop the current Arena session","Show the current Arena session status":"Show the current Arena session status","Select a model result and merge its diff into the current workspace":"Select a model result and merge its diff into the current workspace","No running Arena session found.":"No running Arena session found.","No Arena session found. Start one with /arena start.":"No Arena session found. Start one with /arena start.","Arena session is still running. Wait for it to complete or use /arena stop first.":"Arena session is still running. Wait for it to complete or use /arena stop first.","No successful agent results to select from. All agents failed or were cancelled.":"No successful agent results to select from. All agents failed or were cancelled.","Use /arena stop to end the session.":"Use /arena stop to end the session.",'No idle agent found matching "{{name}}".':'No idle agent found matching "{{name}}".',"Failed to apply changes from {{label}}: {{error}}":"Failed to apply changes from {{label}}: {{error}}","Applied changes from {{label}} to workspace. Arena session complete.":"Applied changes from {{label}} to workspace. Arena session complete.","Discard all Arena results and clean up worktrees?":"Discard all Arena results and clean up worktrees?","Arena results discarded. All worktrees cleaned up.":"Arena results discarded. All worktrees cleaned up.","Arena is not supported in non-interactive mode. Use interactive mode to start an Arena session.":"Arena is not supported in non-interactive mode. Use interactive mode to start an Arena session.","Arena is not supported in non-interactive mode. Use interactive mode to stop an Arena session.":"Arena is not supported in non-interactive mode. Use interactive mode to stop an Arena session.","Arena is not supported in non-interactive mode.":"Arena is not supported in non-interactive mode.","An Arena session exists. Use /arena stop or /arena select to end it before starting a new one.":"An Arena session exists. Use /arena stop or /arena select to end it before starting a new one.","Usage: /arena start --models model1,model2 <task>":"Usage: /arena start --models model1,model2 <task>","Models to compete (required, at least 2)":"Models to compete (required, at least 2)","Format: authType:modelId or just modelId":"Format: authType:modelId or just modelId","Arena requires at least 2 models. Use --models model1,model2 to specify.":"Arena requires at least 2 models. Use --models model1,model2 to specify.",'Arena started with {{count}} agents on task: "{{task}}"\nModels:\n{{modelList}}':`Arena started with {{count}} agents on task: "{{task}}"
|
|
19
19
|
Models:
|
|
20
20
|
{{modelList}}`,"Arena panes are running in tmux. Attach with: `{{command}}`":"Arena panes are running in tmux. Attach with: `{{command}}`","[{{label}}] failed: {{error}}":"[{{label}}] failed: {{error}}","Loading suggestions...":"Loading suggestions...","Show per-item context usage breakdown.":"Show per-item context usage breakdown.","No compression needed.":"No compression needed.","Session duration: {{duration}}":"Session duration: {{duration}}","Prompts: {{count}}":"Prompts: {{count}}","API requests: {{count}}":"API requests: {{count}}","Tokens \u2014 prompt: {{prompt}}, output: {{output}}":"Tokens \u2014 prompt: {{prompt}}, output: {{output}}","Tool calls: {{total}} ({{success}} ok, {{fail}} fail)":"Tool calls: {{total}} ({{success}} ok, {{fail}} fail)","Files: +{{added}} / -{{removed}} lines":"Files: +{{added}} / -{{removed}} lines",prompt:"prompt",output:"output",cached:"cached","Estimated cost: ${{cost}}":"Estimated cost: ${{cost}}","No model usage data yet.":"No model usage data yet.","No tool usage data yet.":"No tool usage data yet.",Models:"Models","All time":"All time","Last 7 days":"Last 7 days","Last 30 days":"Last 30 days","N/A":"N/A",Sessions:"Sessions",days:"days",Input:"Input","Tool calls":"Tool calls","Code changes":"Code changes",Projects:"Projects",Name:"Name",Duration:"Duration","Activity Heatmap":"Activity Heatmap","Loading stats...":"Loading stats...","\u2191 tabs \xB7 r to cycle dates \xB7 esc to close":"\u2191 tabs \xB7 r to cycle dates \xB7 esc to close",Cost:"Cost",Less:"Less",More:"More","(no data)":"(no data)",d:"d",h:"h",m:"m","tab \xB7 esc":"tab \xB7 esc","tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc":"tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc","tab \xB7 r dates \xB7 esc":"tab \xB7 r dates \xB7 esc",Session:"Session",Activity:"Activity",Efficiency:"Efficiency",Success:"Success",Today:"Today","Cache Hit Rate":"Cache Hit Rate","Tool Success":"Tool Success","Tool Leaderboard":"Tool Leaderboard",Time:"Time",Cache:"Cache",Latency:"Latency","Code Impact":"Code Impact","Failed to load stats. Press r to retry.":"Failed to load stats. Press r to retry.",net:"net",streak:"streak",best:"best","Token Trend":"Token Trend","In/Out":"In/Out","API Requests":"API Requests","Tool Calls":"Tool Calls","Success rate":"Success rate","Code Changes":"Code Changes",Tool:"Tool",reqs:"reqs",in:"in",out:"out"};export{t as default};
|
|
21
21
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{ej as T,kf as W,sf as s}from"./chunk-
|
|
3
|
+
import{ej as T,kf as W,sf as s}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{g as $,i as E,p as m,q as R}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{Y as b}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as y}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";y();var o=b("ENTER_WORKTREE"),P=`Creates an isolated git worktree at \`<projectRoot>/.matilda/worktrees/<slug>\` and returns its absolute path so subsequent file edits, shell commands, and other tools can operate inside it.
|
|
4
4
|
|
|
5
5
|
## When to Use
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{I as r}from"./chunk-
|
|
3
|
+
import{I as r}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{g as m,i as u,p as d,q as c}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{Y as p}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as l}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";l();var y=p("ENTER_PLAN_MODE"),g=`Use this tool to lower into plan mode before doing uncertain or complex work. Entering plan mode is a privilege reduction, so it does not require user confirmation.
|
|
4
4
|
|
|
5
5
|
## When to Use This Tool
|
|
6
6
|
Use this tool when the task is not yet clear enough to safely execute, for example when it requires multi-file changes, design choices, investigation before a plan can be summarized, or when requirements are ambiguous. While investigating, if complexity rises or you find yourself repeatedly needing to ask the user, enter plan mode and consolidate a plan.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{dj as C,fj as x,if as k,lf as W,sf as l}from"./chunk-
|
|
3
|
+
import{dj as C,fj as x,if as k,lf as W,sf as l}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{g as E,i as R,p as c,q as T}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{Y as b,a as $}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as y}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";y();import*as S from"node:fs/promises";var h=b("EXIT_WORKTREE"),O=`Exits a worktree previously created by ${c.ENTER_WORKTREE}.
|
|
4
4
|
|
|
5
5
|
## Behavior
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as k}from"./chunk-ILBTI4K5.js";import{Df as $,I as w,_e as M}from"./chunk-
|
|
3
|
+
import{a as k}from"./chunk-ILBTI4K5.js";import{Df as $,I as w,_e as M}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{g as G,i as R,p as T,q as _}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{Y as f}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as h}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";h();h();h();var E=f("GATE_REVIEW_AGENTS");function L(n){return`You are a Plan Design Reviewer for the Plan Approval Gate. Review the plan across three dimensions:
|
|
4
4
|
|
|
5
5
|
1. **Request Fit** \u2014 Does the plan fulfill every part of the user's original request and respect all explicit constraints? Does it do anything the user explicitly asked NOT to do?
|
|
6
6
|
2. **System Fit** \u2014 Does the plan align with the codebase structure, file paths, function names, permission model, and integration boundaries found during investigation?
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as g}from"./chunk-EMWHQSMS.js";import{g as u}from"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{f as d}from"./chunk-XJDC3ZQZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-FWDMPRKU.js";import{b as m}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";m();m();var p=class{googleGenAI;contentGeneratorConfig;constructor(e,t){let r=t?.customHeaders,n=r?(()=>{let i=e.httpOptions,s=i?.headers??{},l=Object.fromEntries(Object.entries(r).filter(([a])=>!d(a)));return{...e,httpOptions:{...i??{},headers:{...s,...l}}}})():e;this.googleGenAI=new u(n),this.contentGeneratorConfig=t}buildGenerateContentConfig(e){let t=this.contentGeneratorConfig?.samplingParams,r=e.config||{},n=(i,s,l)=>{let a=r[s];return i!==void 0?i:a!==void 0?a:l};return{...r,temperature:n(t?.temperature,"temperature",1),topP:n(t?.top_p,"topP",.95),topK:n(t?.top_k,"topK",64),maxOutputTokens:n(t?.max_tokens,"maxOutputTokens"),presencePenalty:n(t?.presence_penalty,"presencePenalty"),frequencyPenalty:n(t?.frequency_penalty,"frequencyPenalty"),thinkingConfig:n(this.buildThinkingConfig(),"thinkingConfig",{includeThoughts:!0,thinkingLevel:"THINKING_LEVEL_UNSPECIFIED"})}}buildThinkingConfig(){let e=this.contentGeneratorConfig?.reasoning;if(e===!1)return{includeThoughts:!1};if(e)return{includeThoughts:!0,thinkingLevel:e.effort==="low"?"LOW":e.effort==="high"||e.effort==="max"?"HIGH":"THINKING_LEVEL_UNSPECIFIED"}}async generateContent(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContent(r)}async generateContentStream(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContentStream(r)}stripUnsupportedFields(e){return!e||typeof e=="string"?e:Array.isArray(e)?e.map(t=>this.stripContentFields(t)):this.stripContentFields(e)}stripContentFields(e){if(typeof e=="string")return e;if(!("role"in e)&&!("parts"in e))return this.stripPartFields(e);let t=e;return t.parts?{...t,parts:t.parts.map(r=>this.stripPartFields(r))}:t}stripPartFields(e){if(typeof e=="string")return e;let t={...e};if(t.inlineData){let{displayName:r,...n}=t.inlineData;t.inlineData=n}if(t.fileData){let{displayName:r,...n}=t.fileData;t.fileData=n}if(t.functionResponse?.parts){let r=t.functionResponse.parts.map(n=>{let i=this.convertUnsupportedMediaToText(n);return this.stripPartFields(i)});t.functionResponse={...t.functionResponse,parts:r}}return t}convertUnsupportedMediaToText(e){if(typeof e=="string")return e;let t=e.inlineData?.mimeType||"",r=e.fileData?.mimeType||"";if(t.startsWith("audio/")||t.startsWith("video/")){let n=e.inlineData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${t}${i}.`}}if(r.startsWith("audio/")||r.startsWith("video/")){let n=e.fileData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${r}${i}.`}}return e}async countTokens(e){return this.googleGenAI.models.countTokens(e)}async embedContent(e){return this.googleGenAI.models.embedContent(e)}useSummarizedThinking(){return!0}};function T(o,e){let i={...{"User-Agent":o.userAgent||`MatildaCode/0.20.
|
|
3
|
+
import{a as g}from"./chunk-EMWHQSMS.js";import{g as u}from"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{f as d}from"./chunk-XJDC3ZQZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-FWDMPRKU.js";import{b as m}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";m();m();var p=class{googleGenAI;contentGeneratorConfig;constructor(e,t){let r=t?.customHeaders,n=r?(()=>{let i=e.httpOptions,s=i?.headers??{},l=Object.fromEntries(Object.entries(r).filter(([a])=>!d(a)));return{...e,httpOptions:{...i??{},headers:{...s,...l}}}})():e;this.googleGenAI=new u(n),this.contentGeneratorConfig=t}buildGenerateContentConfig(e){let t=this.contentGeneratorConfig?.samplingParams,r=e.config||{},n=(i,s,l)=>{let a=r[s];return i!==void 0?i:a!==void 0?a:l};return{...r,temperature:n(t?.temperature,"temperature",1),topP:n(t?.top_p,"topP",.95),topK:n(t?.top_k,"topK",64),maxOutputTokens:n(t?.max_tokens,"maxOutputTokens"),presencePenalty:n(t?.presence_penalty,"presencePenalty"),frequencyPenalty:n(t?.frequency_penalty,"frequencyPenalty"),thinkingConfig:n(this.buildThinkingConfig(),"thinkingConfig",{includeThoughts:!0,thinkingLevel:"THINKING_LEVEL_UNSPECIFIED"})}}buildThinkingConfig(){let e=this.contentGeneratorConfig?.reasoning;if(e===!1)return{includeThoughts:!1};if(e)return{includeThoughts:!0,thinkingLevel:e.effort==="low"?"LOW":e.effort==="high"||e.effort==="max"?"HIGH":"THINKING_LEVEL_UNSPECIFIED"}}async generateContent(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContent(r)}async generateContentStream(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContentStream(r)}stripUnsupportedFields(e){return!e||typeof e=="string"?e:Array.isArray(e)?e.map(t=>this.stripContentFields(t)):this.stripContentFields(e)}stripContentFields(e){if(typeof e=="string")return e;if(!("role"in e)&&!("parts"in e))return this.stripPartFields(e);let t=e;return t.parts?{...t,parts:t.parts.map(r=>this.stripPartFields(r))}:t}stripPartFields(e){if(typeof e=="string")return e;let t={...e};if(t.inlineData){let{displayName:r,...n}=t.inlineData;t.inlineData=n}if(t.fileData){let{displayName:r,...n}=t.fileData;t.fileData=n}if(t.functionResponse?.parts){let r=t.functionResponse.parts.map(n=>{let i=this.convertUnsupportedMediaToText(n);return this.stripPartFields(i)});t.functionResponse={...t.functionResponse,parts:r}}return t}convertUnsupportedMediaToText(e){if(typeof e=="string")return e;let t=e.inlineData?.mimeType||"",r=e.fileData?.mimeType||"";if(t.startsWith("audio/")||t.startsWith("video/")){let n=e.inlineData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${t}${i}.`}}if(r.startsWith("audio/")||r.startsWith("video/")){let n=e.fileData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${r}${i}.`}}return e}async countTokens(e){return this.googleGenAI.models.countTokens(e)}async embedContent(e){return this.googleGenAI.models.embedContent(e)}useSummarizedThinking(){return!0}};function T(o,e){let i={...{"User-Agent":o.userAgent||`MatildaCode/0.20.4 (${process.platform}; ${process.arch})`}};if(e?.getUsageStatisticsEnabled()){let f=new g().getInstallationId();i={...i,"x-gemini-api-privileged-user-id":`${f}`}}let s=o.baseUrl?{headers:i,baseUrl:o.baseUrl}:{headers:i};return new p({apiKey:o.apiKey===""?void 0:o.apiKey,vertexai:o.vertexai,httpOptions:s},o)}export{p as GeminiContentGenerator,T as createGeminiContentGenerator};
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2025 Google LLC
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{he as _,ie as j}from"./chunk-
|
|
3
|
+
import{he as _,ie as j}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import{b as D}from"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{g as k}from"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{g as M,i as C,p as N,q as A}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{C as $,F as O,J as v,Y as R,c as x}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as L}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";L();import z from"node:fs";import T from"node:path";var V=R("GLOB"),Y=100,B=2e4,W=15e3,q=500;function K(u,g,t){let e=[...u];return e.sort((r,s)=>{let c=r.mtimeMs??0,a=s.mtimeMs??0,o=g-c<t,l=g-a<t;return o&&l?a-c:o?-1:l?1:r.fullpath().localeCompare(s.fullpath())}),e}var S=class extends M{constructor(t,e){super(e);this.config=t;this.fileService=t.getFileService()}fileService;getDescription(){let t=`'${this.params.pattern}'`;return this.params.path&&(t+=` in path '${this.params.path}'`),t}async getDefaultPermission(){if(!this.params.path)return"allow";let t=this.config.getWorkspaceContext(),e=T.resolve(this.config.getTargetDir(),this.params.path);return t.isPathWithinWorkspace(e)||O(k(),e)?"allow":"ask"}async globInDirectory(t,e,r){let s=e,c=T.join(t,s);z.existsSync(c)&&(s=_(s));let a=j(s,{cwd:t,withFileTypes:!0,nodir:!0,stat:!0,nocase:!0,dot:!0,ignore:this.config.getFileExclusions().getGlobExcludes(),follow:!1,signal:r}),o=[],l=Date.now(),p=null;for await(let n of a){if(o.push(n),o.length>=B){p="count";break}if(Date.now()-l>W){p="time";break}o.length%q===0&&await new Promise(b=>setImmediate(b))}p&&a.destroy?.();let d=this.config.getTargetDir(),P=o.map(n=>T.relative(d,n.fullpath())),{filteredPaths:m}=this.fileService.filterFilesWithReport(P,this.getFileFilteringOptions()),h=n=>process.platform==="win32"||process.platform==="darwin"?n.toLowerCase():n,f=new Set(m.map(n=>h(T.resolve(d,n))));return{entries:o.filter(n=>f.has(h(n.fullpath()))),limited:p}}async execute(t){try{let e=[],r;if(this.params.path){let i=v(this.config,this.params.path,{allowExternalPaths:!0});e.push(i),r=`within ${i}`}else{let i=this.config.getWorkspaceContext().getDirectories();e.push(...i),r=i.length>1?`across ${i.length} workspace directories`:"in the workspace directory"}let s=this.params.pattern,c=[],a=new Set,o=null;for(let i of e){let{entries:F,limited:E}=await this.globInDirectory(i,s,t);E&&(o=E);for(let G of F){let I=G.fullpath();a.has(I)||(a.add(I),c.push(G))}}let l=c,p=o==="time"?`
|
|
4
4
|
|
|
5
5
|
[Search stopped after ${W/1e3}s before scanning the whole tree. Results may be incomplete \u2014 narrow the search by passing a more specific 'path' or pattern.]`:o==="count"?`
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{$i as K,aa as q,aj as Y,ie as z,zc as F}from"./chunk-
|
|
3
|
+
import{$i as K,aa as q,aj as Y,ie as z,zc as F}from"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{g as _}from"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import{g as U,i as V,p as H,q as J}from"./chunk-5U3A6KMU.js";import"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{C as O,F as W,J as S,Y as j,a as I,c as P}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as B}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";B();import tt from"node:fs/promises";import y from"node:path";import{EOL as et}from"node:os";import{spawn as X}from"node:child_process";var k=j("GREP"),M=class extends U{constructor(e,s){super(s);this.config=e;this.fileExclusions=e.getFileExclusions()}fileExclusions;async getDefaultPermission(){if(!this.params.path)return"allow";let e=this.config.getWorkspaceContext(),s=y.resolve(this.config.getTargetDir(),this.params.path);return e.isPathWithinWorkspace(s)||W(_(),s)?"allow":"ask"}async execute(e){try{let s=[],i;if(this.params.path){let t=S(this.config,this.params.path,{allowExternalPaths:!0});s.push(t),i=`in path "${this.params.path}"`}else{let t=this.config.getWorkspaceContext().getDirectories();s.push(...t),i=t.length>1?`across ${t.length} workspace directories`:"in the workspace directory"}let l=[];for(let t of s){let o=await this.performGrepSearch({pattern:this.params.pattern,path:t,glob:this.params.glob,signal:e});if(s.length>1)for(let a of o)y.isAbsolute(a.filePath)||(a.filePath=y.resolve(t,a.filePath));l.push(...o)}if(s.length>1){let t=new Set;l=l.filter(o=>{let a=`${o.filePath}:${o.lineNumber}`;return t.has(a)?!1:(t.add(a),!0)})}let f=this.params.glob?` (filter: "${this.params.glob}")`:"";if(l.length===0)return{llmContent:`No matches found for pattern "${this.params.pattern}" ${i}${f}.`,returnDisplay:"No matches found"};let h=this.config.getTruncateToolOutputThreshold(),w=Math.min(this.config.getTruncateToolOutputLines(),this.params.limit??Number.POSITIVE_INFINITY),$=!1,C=l;l.length>w&&(C=l.slice(0,w),$=!0);let E=l.length,x=E===1?"match":"matches",G=`Found ${E} ${x} for pattern "${this.params.pattern}" ${i}${f}:
|
|
4
4
|
---
|
|
5
5
|
`,v=C.reduce((t,o)=>{let a=o.filePath;return t[a]||(t[a]=[]),t[a].push(o),t[a].sort((L,D)=>L.lineNumber-D.lineNumber),t},{}),n="",g=[],m=!1,c=(t,o)=>Number.isFinite(h)&&n.length+t.length>h?(n+=t.slice(0,Math.max(h-n.length,0)),n+="...",o&&g.push(o),m=!0,!1):(n+=t,o&&g.push(o),!0);for(let t in v){if(!c(`File: ${t}
|
|
6
6
|
`))break;let o=!1;for(let a of v[t]){let L=a.line.trim();if(!c(`L${a.lineNumber}: ${L}
|
package/chunks/{matildaAgentContentGenerator-HG4ABAJG.js → matildaAgentContentGenerator-ZXRXBMQP.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as I,b as F,c as U}from"./chunk-ISW2QC5B.js";import{b as x,x as $}from"./chunk-
|
|
3
|
+
import{a as I,b as F,c as U}from"./chunk-ISW2QC5B.js";import{b as x,x as $}from"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import{b as M,e as w}from"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{k as E,n as O}from"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import"./chunk-5U3A6KMU.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{p as P}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";b();b();var L="2026-06-23",W="auto",H="instant",J=12e4,g=18e4,V=5e4,v=16e3,X=["Treat this as Matilda Code traffic.","Prefer the code specialist path for implementation, debugging, refactoring, tests, repo edits, and code review.","Use the fast instruct path for simple coordination, status, clarification, or non-code conversational replies.","Keep the response concise and action-oriented."].join(" "),B=["You are powering Matilda Code, an interactive terminal coding agent.","Matilda Code owns the local agent loop: codebase reads, edits, shell commands, approvals, memory, subagents, skills, and MCP tools run through the CLI.","Use the conversation context and tool results as facts. Do not claim to have inspected files, run commands, or edited code unless that action appears in the provided context.",`When the user gives a vague starter such as "let's code" without a concrete development task, ask a concise clarifying question instead of inventing an app or dumping code.`].join(" ");function K(n){let e=(n||"https://matilda.maincode.com/api/v1").trim().replace(/\/+$/,"");return/\/api\/v1$/i.test(e)?e.replace(/\/api\/v1$/i,"/api"):/\/api$/i.test(e)?e:`${e}/api`}function A(n){try{let e=JSON.parse(n);return e&&typeof e=="object"?e:void 0}catch{return}}function d(n,e){let o=A(n)?.[e];return typeof o=="string"?o:void 0}function j(n){return G(n)}function G(n){return typeof n=="string"?n:Array.isArray(n)?n.map(e=>{if(typeof e=="string")return e;if(!e||typeof e!="object")return"";let t=e;return typeof t.text=="string"?t.text:t.image_url?"[image omitted: Matilda native chat accepts text only]":t.input_audio?"[audio omitted: Matilda native chat accepts text only]":t.file?"[file omitted: Matilda native chat accepts text only]":""}).filter(Boolean).join(`
|
|
4
4
|
`):""}function u(n,e){if(n.length<=e)return n;let t=`
|
|
5
5
|
[...omitted to fit Matilda native agent context...]
|
|
6
6
|
`,o=e-t.length,s=Math.floor(o*.6),i=o-s;return`${n.slice(0,s)}${t}${n.slice(-i)}`}function z(n){return(n.candidates?.[0]?.content?.parts??[]).map(t=>typeof t=="string"?t:"thought"in t&&t.thought?"":"text"in t&&t.text||"").join("")}function Q(n){let e=A(n),t=typeof e?.output_tokens=="number"?e.output_tokens:void 0;if(t!==void 0)return{promptTokenCount:0,candidatesTokenCount:t,totalTokenCount:t}}function p(n){return JSON.stringify(n).length}function Y(n){if(p(n)<=g)return n;let e=`
|
|
@@ -8,7 +8,7 @@ import{a as I,b as F,c as U}from"./chunk-ISW2QC5B.js";import{b as x,x as $}from"
|
|
|
8
8
|
`;for(let t=0;t<n.messages.length;t+=1){let o=n.messages[t];!o||o.content.length<=v||(n.messages[t]={...o,content:u(o.content,v)})}if(p(n)<=g)return n;for(;n.messages.length>2&&p(n)>g;){n.messages.splice(1,1);let t=n.messages[0];t&&!t.content.includes(e.trim())&&(n.messages[0]={...t,content:`${t.content}${e}`})}for(;p(n)>g;){let t=n.messages.length>1?n.messages.length-1:0,o=n.messages[t];if(!o||o.content.length<=1e3)break;let s=p(n)-g,i=Math.max(1e3,o.content.length-s-e.length-2e3);n.messages[t]={...o,content:u(o.content,i)}}return p(n)<=g||n.clientTools&&delete n.clientTools,n}function Z(n){let e=A(n.data);if(!e)return;let t=typeof e.name=="string"?e.name:void 0;if(!t)return;let o=e.args&&typeof e.args=="object"?e.args:{};return{id:typeof e.id=="string"?e.id:void 0,name:t,args:o}}function q(n){let e=A(n.data);if(n.event==="thinking"){let t=d(n.data,"content");return t?`**Thinking** ${t}`:void 0}if(n.event==="generation_status"){let t=d(n.data,"phase");return t?`**Planning** ${t}`:void 0}if(n.event==="status"){let t=d(n.data,"state");if(!t)return;let o=typeof e?.position=="number"?` position ${e.position}`:"";return`**Status** ${t}${o}`}if(n.event==="tool_start"){let t=d(n.data,"tool");if(!t)return;let o=d(n.data,"input")??(e?.args?JSON.stringify(e.args):void 0);return`**Remote tool** Starting ${t}${o?` with ${o}`:""}`}if(n.event==="tool_progress"){let t=d(n.data,"tool"),o=d(n.data,"message");return t&&o?`**Remote tool** ${t}: ${o}`:void 0}if(n.event==="tool_result"){let t=d(n.data,"tool"),o=d(n.data,"status"),s=d(n.data,"output")??d(n.data,"result");return t?`**Remote tool** ${t} ${o??"completed"}${s?`: ${u(s,600)}`:""}`:void 0}}function k(n,e,t){let o=new w;return o.candidates=[{content:{parts:n?[{text:n}]:[],role:"model"},index:0,safetyRatings:[]}],o.createTime=Date.now().toString(),o.modelVersion=e,t&&(o.usageMetadata=t),o}function ee(n,e){let t=new w;return t.candidates=[{content:{parts:n?[{text:n,thought:!0}]:[],role:"model"},index:0,safetyRatings:[]}],t.createTime=Date.now().toString(),t.modelVersion=e,t}function te(n,e){let t=new w;return t.candidates=[{content:{parts:[{functionCall:n}],role:"model"},index:0,safetyRatings:[]}],t.createTime=Date.now().toString(),t.modelVersion=e,Object.defineProperty(t,"functionCalls",{value:[n],writable:!0,configurable:!0,enumerable:!0}),t}function D(n,e,t){let o=k("",n,t);return o.candidates=[{content:{parts:[],role:"model"},finishReason:e,index:0,safetyRatings:[]}],o}async function*ne(n,e){let t=n.body?.getReader();if(!t)throw new Error("Matilda agent stream returned no response body");let o=new TextDecoder,s="",i="message",r=[],c=!1,a,l=()=>{e<=0||(a&&clearTimeout(a),a=setTimeout(()=>{c=!0,t.cancel().catch(()=>{})},e))},m=()=>{a&&(clearTimeout(a),a=void 0)},h=()=>{if(r.length===0){i="message";return}let T={event:i,data:r.join(`
|
|
9
9
|
`)};return i="message",r=[],l(),T};l();try{for(;;){let{done:C,value:f}=await t.read();if(C||c)break;s+=o.decode(f,{stream:!0});let N=s.split(`
|
|
10
10
|
`);s=N.pop()??"";for(let S of N){let y=S.endsWith("\r")?S.slice(0,-1):S;if(y.length===0){let _=h();_&&(yield _)}else y.startsWith("event:")?i=y.slice(6).trim():y.startsWith("data:")&&r.push(y.slice(5).trimStart())}}if(s+=o.decode(),s.length>0)for(let C of s.split(`
|
|
11
|
-
`)){let f=C.endsWith("\r")?C.slice(0,-1):C;f.startsWith("event:")?i=f.slice(6).trim():f.startsWith("data:")&&r.push(f.slice(5).trimStart())}let T=h();T&&(yield T)}finally{m()}if(c)throw new Error(`No Matilda agent SSE events for ${e}ms`)}var R=class{constructor(e,t){this.contentGeneratorConfig=e;this.cliConfig=t}async generateContent(e,t){let o=await this.generateContentStream(e,t),s="",i,r=M.STOP;for await(let a of o){s+=z(a),a.usageMetadata&&(i=a.usageMetadata);let l=a.candidates?.[0]?.finishReason;l&&(r=l)}let c=k(s,this.modelFor(e),i);return c.candidates=[{content:{parts:s?[{text:s}]:[],role:"model"},finishReason:r,index:0,safetyRatings:[]}],c}async generateContentStream(e,t){return this.streamNativeChat(e)}async countTokens(e){return{totalTokens:Math.ceil(JSON.stringify(e.contents??"").length/4)}}async embedContent(e){throw new Error("Matilda agent SDK transport does not support embeddings.")}useSummarizedThinking(){return!1}async*streamNativeChat(e){let t=this.modelFor(e),o=await this.fetchNativeChat(e),s=!1,i=!1,r=M.STOP,c;for await(let a of ne(o,J))if(a.data!=="[DONE]"){if(a.event==="token"){let l=d(a.data,"content");l&&(i=!0,yield k(l,t))}else if(a.event==="thinking"||a.event==="generation_status"||a.event==="status"||a.event==="tool_start"||a.event==="tool_progress"||a.event==="tool_result"){let l=q(a);l&&(i=!0,yield ee(l,t))}else if(a.event==="client_tool_call"){let l=Z(a);l&&(i=!0,yield te(l,t))}else if(a.event==="usage")c=Q(a.data)??c;else if(a.event==="safety_replace"){let l=d(a.data,"message")??d(a.data,"content");l&&(i=!0,yield k(l,t))}else if(a.event==="truncated")r=M.MAX_TOKENS;else if(a.event==="done"){if(r=d(a.data,"reason")==="max_tokens"?M.MAX_TOKENS:r,!i)throw new Error("Matilda agent returned an empty response.");yield D(t,r,c),s=!0}else if(a.event==="error"){let l=A(a.data),m=typeof l?.error=="string"?l.error:"Unknown Matilda agent stream error";throw new Error(`Matilda agent stream error: ${m}`)}}if(!s){if(!i)throw new Error("Matilda agent returned an empty response.");yield D(t,r,c)}}async fetchNativeChat(e){let t=await $({baseUrl:this.contentGeneratorConfig.baseUrl,fallbackAccessToken:this.contentGeneratorConfig.apiKey,signal:e.config?.abortSignal}),o=await this.postNativeChat(e,t);if(o.status!==401)return this.assertOkResponse(o);let s;try{s=await $({baseUrl:this.contentGeneratorConfig.baseUrl,fallbackAccessToken:t,forceRefresh:!0,signal:e.config?.abortSignal})}catch(r){throw new P(r instanceof Error?r.message:String(r))}if(!s||s===t)throw new P("Matilda session expired. Please sign in again.");let i=await E("retry",()=>this.postNativeChat(e,s));return this.assertOkResponse(i)}async postNativeChat(e,t){return fetch(`${K(this.contentGeneratorConfig.baseUrl)}/chat`,{method:"POST",headers:this.buildHeaders(t),body:JSON.stringify(this.buildNativeRequest(e)),signal:e.config?.abortSignal})}async assertOkResponse(e){if(e.ok)return e;let t=`Matilda agent request failed (${e.status}): ${await e.text()}`;throw e.status===401?new P(t):new Error(t)}buildHeaders(e){let t={"Content-Type":"application/json",Accept:"text/event-stream","X-Matilda-API-Version":L,"X-Matilda-Client":"matilda-code","User-Agent":`MatildaCode/${this.cliConfig.getCliVersion?.()||"unknown"}`};for(let[o,s]of Object.entries(this.contentGeneratorConfig.customHeaders??{}))o.toLowerCase()!=="x-matilda-response-mode"&&!F(o)&&(t[o]=s);return U(this.contentGeneratorConfig,e)&&Object.assign(t,I(this.cliConfig),O()),e&&(t.Authorization=`Bearer ${e}`),t}buildNativeRequest(e){let t=this.inferPurpose(e),o=this.clientToolsFromRequest(e),s={messages:this.buildNativeMessages(e,t),responseMode:this.responseModeForPurpose(t)};return o.length>0&&(s.clientTools=o),Y(s)}buildNativeMessages(e,t){let o=this.openAIMessagesFromRequest(e),i=[{role:"user",content:this.buildSystemContext(e,t)}];for(let c of o){if(c.role==="system")continue;let a=this.nativeMessageFromOpenAIMessage(c);a&&i.push(a)}i.length===1&&i.push({role:"user",content:`${this.purposeLabel(t)}:
|
|
11
|
+
`)){let f=C.endsWith("\r")?C.slice(0,-1):C;f.startsWith("event:")?i=f.slice(6).trim():f.startsWith("data:")&&r.push(f.slice(5).trimStart())}let T=h();T&&(yield T)}finally{m()}if(c)throw new Error(`No Matilda agent SSE events for ${e}ms`)}var R=class{constructor(e,t){this.contentGeneratorConfig=e;this.cliConfig=t}async generateContent(e,t){let o=await this.generateContentStream(e,t),s="",i,r=M.STOP;for await(let a of o){s+=z(a),a.usageMetadata&&(i=a.usageMetadata);let l=a.candidates?.[0]?.finishReason;l&&(r=l)}let c=k(s,this.modelFor(e),i);return c.candidates=[{content:{parts:s?[{text:s}]:[],role:"model"},finishReason:r,index:0,safetyRatings:[]}],c}async generateContentStream(e,t){return this.streamNativeChat(e)}async countTokens(e){return{totalTokens:Math.ceil(JSON.stringify(e.contents??"").length/4)}}async embedContent(e){throw new Error("Matilda agent SDK transport does not support embeddings.")}useSummarizedThinking(){return!1}async*streamNativeChat(e){let t=this.modelFor(e),o=await this.fetchNativeChat(e),s=!1,i=!1,r=M.STOP,c;for await(let a of ne(o,J))if(a.data!=="[DONE]"){if(a.event==="token"){let l=d(a.data,"content");l&&(i=!0,yield k(l,t))}else if(a.event==="thinking"||a.event==="generation_status"||a.event==="status"||a.event==="tool_start"||a.event==="tool_progress"||a.event==="tool_result"){let l=q(a);l&&(i=!0,yield ee(l,t))}else if(a.event==="client_tool_call"){let l=Z(a);l&&(i=!0,yield te(l,t))}else if(a.event==="usage")c=Q(a.data)??c;else if(a.event==="safety_replace"){let l=d(a.data,"message")??d(a.data,"content");l&&(i=!0,yield k(l,t))}else if(a.event==="truncated")r=M.MAX_TOKENS;else if(a.event==="done"){if(r=d(a.data,"reason")==="max_tokens"?M.MAX_TOKENS:r,!i)throw new Error("Matilda agent returned an empty response.");yield D(t,r,c),s=!0}else if(a.event==="error"){let l=A(a.data),m=typeof l?.error=="string"?l.error:"Unknown Matilda agent stream error";throw new Error(`Matilda agent stream error: ${m}`)}}if(!s){if(!i)throw new Error("Matilda agent returned an empty response.");yield D(t,r,c)}}async fetchNativeChat(e){let t=await $({baseUrl:this.contentGeneratorConfig.baseUrl,fallbackAccessToken:this.contentGeneratorConfig.apiKey,signal:e.config?.abortSignal,channel:this.cliConfig.getChannel?.()}),o=await this.postNativeChat(e,t);if(o.status!==401)return this.assertOkResponse(o);let s;try{s=await $({baseUrl:this.contentGeneratorConfig.baseUrl,fallbackAccessToken:t,forceRefresh:!0,signal:e.config?.abortSignal,channel:this.cliConfig.getChannel?.()})}catch(r){throw new P(r instanceof Error?r.message:String(r))}if(!s||s===t)throw new P("Matilda session expired. Please sign in again.");let i=await E("retry",()=>this.postNativeChat(e,s));return this.assertOkResponse(i)}async postNativeChat(e,t){return fetch(`${K(this.contentGeneratorConfig.baseUrl)}/chat`,{method:"POST",headers:this.buildHeaders(t),body:JSON.stringify(this.buildNativeRequest(e)),signal:e.config?.abortSignal})}async assertOkResponse(e){if(e.ok)return e;let t=`Matilda agent request failed (${e.status}): ${await e.text()}`;throw e.status===401?new P(t):new Error(t)}buildHeaders(e){let t={"Content-Type":"application/json",Accept:"text/event-stream","X-Matilda-API-Version":L,"X-Matilda-Client":"matilda-code","User-Agent":`MatildaCode/${this.cliConfig.getCliVersion?.()||"unknown"}`};for(let[o,s]of Object.entries(this.contentGeneratorConfig.customHeaders??{}))o.toLowerCase()!=="x-matilda-response-mode"&&!F(o)&&(t[o]=s);return U(this.contentGeneratorConfig,e)&&Object.assign(t,I(this.cliConfig),O()),e&&(t.Authorization=`Bearer ${e}`),t}buildNativeRequest(e){let t=this.inferPurpose(e),o=this.clientToolsFromRequest(e),s={messages:this.buildNativeMessages(e,t),responseMode:this.responseModeForPurpose(t)};return o.length>0&&(s.clientTools=o),Y(s)}buildNativeMessages(e,t){let o=this.openAIMessagesFromRequest(e),i=[{role:"user",content:this.buildSystemContext(e,t)}];for(let c of o){if(c.role==="system")continue;let a=this.nativeMessageFromOpenAIMessage(c);a&&i.push(a)}i.length===1&&i.push({role:"user",content:`${this.purposeLabel(t)}:
|
|
12
12
|
(empty prompt)`});let r=i[i.length-1];return r?.role!=="user"?i.push({role:"user",content:`${this.purposeLabel(t)}:
|
|
13
13
|
Continue from the previous assistant response.`}):r.content.startsWith(`${this.purposeLabel(t)}:
|
|
14
14
|
`)||(i[i.length-1]={...r,content:`${this.purposeLabel(t)}:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as d,i as u}from"./chunk-
|
|
3
|
+
import{a as d,i as u}from"./chunk-BAFQ36AO.js";import"./chunk-QCIDUZV6.js";import"./chunk-ISW2QC5B.js";import"./chunk-PTTKY4W4.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-GIIMOLLN.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-SS5WUOSJ.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-67UAAXGB.js";import"./chunk-4F4DA5UI.js";import{d as s}from"./chunk-DC7LAFZZ.js";import"./chunk-2XZIKUB6.js";import"./chunk-XYA3SFGC.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{k as o}from"./chunk-XJDC3ZQZ.js";import"./chunk-CFBZKYFB.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-NDR7ZFUA.js";import"./chunk-5U3A6KMU.js";import{c}from"./chunk-IMYUVCF7.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-IOCF4XSR.js";import{Y as i}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as a}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";a();var l=class extends u{debugLogger=i("MATILDA");matildaClient;sharedManager;currentToken;constructor(e,t,r){let n=new d(t,r);super(t,r,n),this.matildaClient=e,this.sharedManager=c.getInstance(),t?.baseUrl&&t?.apiKey&&(this.pipeline.client.baseURL=t?.baseUrl,this.pipeline.client.apiKey=t?.apiKey)}getCurrentEndpoint(e){let t=e||s,r="/v1",n=t.startsWith("http")?t:`https://${t}`;return n.endsWith(r)||n.endsWith("/api/v1")||n.endsWith("/api/v1/code")?n:`${n}${r}`}shouldSuppressErrorLogging(e,t){return this.isAuthError(e)}async getValidToken(){try{let e=await this.sharedManager.getValidCredentials(this.matildaClient);if(!e.access_token)throw new Error("No access token available");return{token:e.access_token,endpoint:this.getCurrentEndpoint(e.resource_url)}}catch(e){throw this.isAuthError(e)?e:(this.debugLogger.warn("Failed to get token from shared manager:",e),new Error("Failed to obtain a valid legacy OAuth access token. Please re-authenticate with Matilda."))}}async executeWithCredentialManagement(e){let t=async()=>{let{token:r,endpoint:n}=await this.getValidToken();return this.pipeline.client.apiKey=r,this.pipeline.client.baseURL=n,await e()};try{return await t()}catch(r){if(this.isAuthError(r))return await this.sharedManager.getValidCredentials(this.matildaClient,!0),await o("retry",t);throw r}}async generateContent(e,t){return this.executeWithCredentialManagement(()=>super.generateContent(e,t))}async generateContentStream(e,t){return this.executeWithCredentialManagement(()=>super.generateContentStream(e,t))}async countTokens(e){return super.countTokens(e)}async embedContent(e){return this.executeWithCredentialManagement(()=>super.embedContent(e))}isAuthError(e){if(!e)return!1;let t=e instanceof Error?e.message.toLowerCase():String(e).toLowerCase(),r=e,n=r?.status||r?.code;return n===401||n===403||n==="401"||n==="403"||t.includes("unauthorized")||t.includes("forbidden")||t.includes("invalid api key")||t.includes("invalid access token")||t.includes("token expired")||t.includes("authentication")||t.includes("access denied")||t.includes("token")&&t.includes("expired")}getCurrentToken(){return this.currentToken?this.currentToken:this.sharedManager.getCurrentCredentials()?.access_token||null}clearToken(){this.currentToken=void 0,this.sharedManager.clearCache()}};export{l as MatildaContentGenerator};
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2025 Matilda
|