UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

7 lines 53.5 kB
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.13.4`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`572f480a-0b23-4bc5-b55d-59790f76db00`,e._sentryDebugIdIdentifier=`sentry-dbid-572f480a-0b23-4bc5-b55d-59790f76db00`)})()}catch{}import{r as e,t}from"./chunk-DxpFCn6T.js";import{At as n,Bt as r,Et as i,Ft as a,L as o,Mt as s,Nt as c,R as l,S as u,Tt as d,Vt as f,W as p,gt as m,jt as h,kt as g,zt as _}from"./vue.runtime.esm-bundler-D9KLAxvJ.js";import{ft as v,m as y,pt as b}from"./_MapCache-CUJwh2qp.js";import{C as x,E as S,y as C}from"./src-wni2AGA3.js";import{$a as w,Bi as ee,Zo as T,ca as E,no as D,zi as te}from"./constants-CIP7tKq1.js";import{E as ne,b as re,o as ie}from"./merge-BqvKZ38d.js";var ae,O=e=>ae=e,oe=()=>o()&&l(k)||ae,k=Symbol();function se(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var ce;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(ce||={});var le=typeof window<`u`,ue=(()=>typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null})();function de(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function fe(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){_e(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function pe(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function me(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=document.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var he=typeof navigator==`object`?navigator:{userAgent:``},ge=(()=>/Macintosh/.test(he.userAgent)&&/AppleWebKit/.test(he.userAgent)&&!/Safari/.test(he.userAgent))(),_e=le?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!ge?ve:`msSaveOrOpenBlob`in he?ye:be:()=>{};function ve(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?me(r):pe(r.href)?fe(e,t,n):(r.target=`_blank`,me(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){me(r)},0))}function ye(e,t=`download`,n){if(typeof e==`string`)if(pe(e))fe(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){me(t)})}else navigator.msSaveOrOpenBlob(de(e,n),t)}function be(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return fe(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(ue.HTMLElement))||`safari`in ue,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||ge)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:xe}=Object;function Se(){let e=d(!0),t=e.run(()=>a({})),n=[],r=[],i=h({install(e){O(i),i._a=e,e.provide(k,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var Ce=()=>{};function we(e,t,n,r=Ce){e.push(t);let a=()=>{let n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&i()&&s(a),a}function A(e,...t){e.slice().forEach(e=>{e(...t)})}var Te=e=>e(),Ee=Symbol(),De=Symbol();function Oe(e,t){for(let r in e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e),t){if(!t.hasOwnProperty(r))continue;let i=t[r],a=e[r];se(a)&&se(i)&&e.hasOwnProperty(r)&&!n(i)&&!g(i)?e[r]=Oe(a,i):e[r]=i}return e}var ke=Symbol();function Ae(e){return!se(e)||!e.hasOwnProperty(ke)}var{assign:j}=Object;function je(e){return!!(n(e)&&e.effect)}function Me(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),j(f(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=h(u(()=>{O(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=Ne(e,l,t,n,r,!0),c}function Ne(e,t,r={},i,o,s){let l,u=j({actions:{}},r),f={deep:!0},h,v,y=[],b=[],x=i.state.value[e];!s&&!x&&(i.state.value[e]={}),a({});let S;function C(t){let n;h=v=!1,typeof t==`function`?(t(i.state.value[e]),n={type:ce.patchFunction,storeId:e,events:void 0}):(Oe(i.state.value[e],t),n={type:ce.patchObject,payload:t,storeId:e,events:void 0});let r=S=Symbol();p().then(()=>{S===r&&(h=!0)}),v=!0,A(y,n,i.state.value[e])}let w=s?function(){let{state:e}=r,t=e?e():{};this.$patch(e=>{j(e,t)})}:Ce;function ee(){l.stop(),y=[],b=[],i._s.delete(e)}let T=(t,n=``)=>{if(Ee in t)return t[De]=n,t;let r=function(){O(i);let n=Array.from(arguments),a=[],o=[];function s(e){a.push(e)}function c(e){o.push(e)}A(b,{args:n,name:r[De],store:E,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:E,n)}catch(e){throw A(o,e),e}return l instanceof Promise?l.then(e=>(A(a,e),e)).catch(e=>(A(o,e),Promise.reject(e))):(A(a,l),l)};return r[Ee]=!0,r[De]=n,r},E=c({_p:i,$id:e,$onAction:we.bind(null,b),$patch:C,$reset:w,$subscribe(t,n={}){let r=we(y,t,n.detached,()=>a()),a=l.run(()=>m(()=>i.state.value[e],r=>{(n.flush===`sync`?v:h)&&t({storeId:e,type:ce.direct,events:void 0},r)},j({},f,n)));return r},$dispose:ee});i._s.set(e,E);let D=(i._a&&i._a.runWithContext||Te)(()=>i._e.run(()=>(l=d()).run(()=>t({action:T}))));for(let t in D){let r=D[t];n(r)&&!je(r)||g(r)?s||(x&&Ae(r)&&(n(r)?r.value=x[t]:Oe(r,x[t])),i.state.value[e][t]=r):typeof r==`function`&&(D[t]=T(r,t),u.actions[t]=r)}return j(E,D),j(_(E),D),Object.defineProperty(E,`$state`,{get:()=>i.state.value[e],set:e=>{C(t=>{j(t,e)})}}),i._p.forEach(e=>{j(E,l.run(()=>e({store:E,app:i._a,pinia:i,options:u})))}),x&&s&&r.hydrate&&r.hydrate(E.$state,x),h=!0,v=!0,E}function Pe(e,t,n){let r,i,a=typeof t==`function`;typeof e==`string`?(r=e,i=a?n:t):(i=e,r=e.id);function s(e,n){let s=o();return e||=s?l(k,null):null,e&&O(e),e=ae,e._s.has(r)||(a?Ne(r,t,i,e):Me(r,i,e)),e._s.get(r)}return s.$id=r,s}function Fe(e){{e=_(e);let t={};for(let i in e){let a=e[i];(n(a)||g(a))&&(t[i]=r(e,i))}return t}}var Ie=function(e){e.mixin({beforeCreate(){let e=this.$options;if(e.pinia){let t=e.pinia;if(!this._provided){let e={};Object.defineProperty(this,`_provided`,{get:()=>e,set:t=>Object.assign(e,t)})}this._provided[k]=t,this.$pinia||=t,t._a=this,le&&O(t)}else !this.$pinia&&e.parent&&e.parent.$pinia&&(this.$pinia=e.parent.$pinia)},destroyed(){delete this._pStores}})};const Le=`n8n-browserId`,Re=`https://api.npms.io/v2/`,ze=`n8n-instance-id`,Be=`n8n-version`,Ve=`PartialExecutionToolExecutor`,He={milliseconds:{toHours:1/(3600*1e3),toMinutes:1/(60*1e3),toSeconds:1/1e3},seconds:{toMilliseconds:1e3},minutes:{toMilliseconds:60*1e3},hours:{toMilliseconds:3600*1e3,toSeconds:3600},days:{toSeconds:1440*60,toMilliseconds:1440*60*1e3}},Ue=5,We=50;5*He.seconds.toMilliseconds,3*He.minutes.toMilliseconds;const Ge=5,Ke=1*He.minutes.toMilliseconds,qe=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;function Je(e,t){if(!e)throw Error(t??`Assertion failed`)}function Ye(e,t){return function(){return e.apply(t,arguments)}}var{toString:Xe}=Object.prototype,{getPrototypeOf:Ze}=Object,{iterator:M,toStringTag:Qe}=Symbol,$e=(e=>t=>{let n=Xe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=e=>(e=e.toLowerCase(),t=>$e(t)===e),P=e=>t=>typeof t===e,{isArray:F}=Array,I=P(`undefined`);function L(e){return e!==null&&!I(e)&&e.constructor!==null&&!I(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var et=N(`ArrayBuffer`);function tt(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&et(e.buffer),t}var nt=P(`string`),R=P(`function`),rt=P(`number`),z=e=>typeof e==`object`&&!!e,it=e=>e===!0||e===!1,at=e=>{if($e(e)!==`object`)return!1;let t=Ze(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Qe in e)&&!(M in e)},ot=e=>{if(!z(e)||L(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},st=N(`Date`),ct=N(`File`),lt=N(`Blob`),ut=N(`FileList`),dt=e=>z(e)&&R(e.pipe),ft=e=>{let t;return e&&(typeof FormData==`function`&&e instanceof FormData||R(e.append)&&((t=$e(e))===`formdata`||t===`object`&&R(e.toString)&&e.toString()===`[object FormData]`))},pt=N(`URLSearchParams`),[mt,ht,gt,_t]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(N),vt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function B(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),F(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(L(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function yt(e,t){if(L(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var V=(()=>typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global)(),bt=e=>!I(e)&&e!==V;function xt(){let{caseless:e,skipUndefined:t}=bt(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&yt(n,i)||i;at(n[a])&&at(r)?n[a]=xt(n[a],r):at(r)?n[a]=xt({},r):F(r)?n[a]=r.slice():(!t||!I(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&B(arguments[e],r);return n}var St=(e,t,n,{allOwnKeys:r}={})=>(B(t,(t,r)=>{n&&R(t)?Object.defineProperty(e,r,{value:Ye(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ct=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},Tt=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Ze(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Et=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Dt=e=>{if(!e)return null;if(F(e))return e;let t=e.length;if(!rt(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Ot=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Ze(Uint8Array)),kt=(e,t)=>{let n=(e&&e[M]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},At=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},jt=N(`HTMLFormElement`),Mt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Nt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pt=N(`RegExp`),Ft=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};B(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},It=e=>{Ft(e,(t,n)=>{if(R(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(R(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Lt=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return F(e)?r(e):r(String(e).split(t)),n},Rt=()=>{},zt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Bt(e){return!!(e&&R(e.append)&&e[Qe]===`FormData`&&e[M])}var Vt=e=>{let t=Array(10),n=(e,r)=>{if(z(e)){if(t.indexOf(e)>=0)return;if(L(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=F(e)?[]:{};return B(e,(e,t)=>{let a=n(e,r+1);!I(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},Ht=N(`AsyncFunction`),Ut=e=>e&&(z(e)||R(e))&&R(e.then)&&R(e.catch),Wt=((e,t)=>e?setImmediate:t?((e,t)=>(V.addEventListener(`message`,({source:n,data:r})=>{n===V&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),V.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,R(V.postMessage)),H={isArray:F,isArrayBuffer:et,isBuffer:L,isFormData:ft,isArrayBufferView:tt,isString:nt,isNumber:rt,isBoolean:it,isObject:z,isPlainObject:at,isEmptyObject:ot,isReadableStream:mt,isRequest:ht,isResponse:gt,isHeaders:_t,isUndefined:I,isDate:st,isFile:ct,isBlob:lt,isRegExp:Pt,isFunction:R,isStream:dt,isURLSearchParams:pt,isTypedArray:Ot,isFileList:ut,forEach:B,merge:xt,extend:St,trim:vt,stripBOM:Ct,inherits:wt,toFlatObject:Tt,kindOf:$e,kindOfTest:N,endsWith:Et,toArray:Dt,forEachEntry:kt,matchAll:At,isHTMLForm:jt,hasOwnProperty:Nt,hasOwnProp:Nt,reduceDescriptors:Ft,freezeMethods:It,toObjectSet:Lt,toCamelCase:Mt,noop:Rt,toFiniteNumber:zt,findKey:yt,global:V,isContextDefined:bt,isSpecCompliantForm:Bt,toJSONObject:Vt,isAsyncFn:Ht,isThenable:Ut,setImmediate:Wt,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(V):typeof process<`u`&&process.nextTick||Wt,isIterable:e=>e!=null&&R(e[M])},U=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),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:H.toJSONObject(this.config),code:this.code,status:this.status}}};U.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,U.ERR_BAD_OPTION=`ERR_BAD_OPTION`,U.ECONNABORTED=`ECONNABORTED`,U.ETIMEDOUT=`ETIMEDOUT`,U.ERR_NETWORK=`ERR_NETWORK`,U.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,U.ERR_DEPRECATED=`ERR_DEPRECATED`,U.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,U.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,U.ERR_CANCELED=`ERR_CANCELED`,U.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,U.ERR_INVALID_URL=`ERR_INVALID_URL`;var W=U;function Gt(e){return H.isPlainObject(e)||H.isArray(e)}function Kt(e){return H.endsWith(e,`[]`)?e.slice(0,-2):e}function qt(e,t,n){return e?e.concat(t).map(function(e,t){return e=Kt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Jt(e){return H.isArray(e)&&!e.some(Gt)}var Yt=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)});function Xt(e,t,n){if(!H.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!H.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<`u`&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw TypeError(`visitor must be a function`);function c(e){if(e===null)return``;if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!s&&H.isBlob(e))throw new W(`Blob is not supported. Use a Buffer instead.`);return H.isArrayBuffer(e)||H.isTypedArray(e)?s&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(e&&!i&&typeof e==`object`){if(H.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&Jt(e)||(H.isFileList(e)||H.endsWith(n,`[]`))&&(s=H.toArray(e)))return n=Kt(n),s.forEach(function(e,r){!(H.isUndefined(e)||e===null)&&t.append(o===!0?qt([n],r,a):o===null?n:n+`[]`,c(e))}),!1}return Gt(e)?!0:(t.append(qt(i,n,a),c(e)),!1)}let u=[],d=Object.assign(Yt,{defaultVisitor:l,convertValue:c,isVisitable:Gt});function f(e,n){if(!H.isUndefined(e)){if(u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),H.forEach(e,function(e,r){(!(H.isUndefined(e)||e===null)&&i.call(t,e,H.isString(r)?r.trim():r,n,d))===!0&&f(e,n?n.concat(r):[r])}),u.pop()}}if(!H.isObject(e))throw TypeError(`data must be an object`);return f(e),t}var Zt=Xt;function Qt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function $t(e,t){this._pairs=[],e&&Zt(e,this,t)}var en=$t.prototype;en.append=function(e,t){this._pairs.push([e,t])},en.toString=function(e){let t=e?function(t){return e.call(this,t,Qt)}:Qt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};var tn=$t;function nn(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function rn(e,t,n){if(!t)return e;let r=n&&n.encode||nn,i=H.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):H.isURLSearchParams(t)?t.toString():new tn(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var an=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){H.forEach(this.handlers,function(t){t!==null&&e(t)})}},on={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},sn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:tn,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},cn=e({hasBrowserEnv:()=>ln,hasStandardBrowserEnv:()=>dn,hasStandardBrowserWebWorkerEnv:()=>fn,navigator:()=>un,origin:()=>pn},1),ln=typeof window<`u`&&typeof document<`u`,un=typeof navigator==`object`&&navigator||void 0,dn=ln&&(!un||[`ReactNative`,`NativeScript`,`NS`].indexOf(un.product)<0),fn=(()=>typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`)(),pn=ln&&window.location.href||`http://localhost`,G={...cn,...sn};function mn(e,t){return Zt(e,new G.classes.URLSearchParams,{visitor:function(e,t,n,r){return G.isNode&&H.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function hn(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function gn(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function _n(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&H.isArray(r)?r.length:a,s?(H.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):((!r[a]||!H.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&H.isArray(r[a])&&(r[a]=gn(r[a])),!o)}if(H.isFormData(e)&&H.isFunction(e.entries)){let n={};return H.forEachEntry(e,(e,r)=>{t(hn(e),r,n,0)}),n}return null}var vn=_n;function yn(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var bn={transitional:on,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=H.isObject(e);if(i&&H.isHTMLForm(e)&&(e=new FormData(e)),H.isFormData(e))return r?JSON.stringify(vn(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return mn(e,this.formSerializer).toString();if((a=H.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return Zt(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),yn(e)):e}],transformResponse:[function(e){let t=this.transitional||bn.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(n&&!this.responseType||r)){let n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n)throw e.name===`SyntaxError`?W.from(e,W.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:G.classes.FormData,Blob:G.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};H.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{bn.headers[e]={}});var xn=bn,Sn=H.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`]),Cn=e=>{let t={},n,r,i;return e&&e.split(` `).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Sn[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},wn=Symbol(`internals`);function K(e){return e&&String(e).trim().toLowerCase()}function Tn(e){return e===!1||e==null?e:H.isArray(e)?e.map(Tn):String(e)}function En(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var Dn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function On(e,t,n,r,i){if(H.isFunction(r))return r.call(this,t,n);if(i&&(t=n),H.isString(t)){if(H.isString(r))return t.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(t)}}function kn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function An(e,t){let n=H.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var jn=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=K(t);if(!i)throw Error(`header name must be a non-empty string`);let a=H.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=Tn(e))}let a=(e,t)=>H.forEach(e,(e,n)=>i(e,n,t));if(H.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(H.isString(e)&&(e=e.trim())&&!Dn(e))a(Cn(e),t);else if(H.isObject(e)&&H.isIterable(e)){let n={},r,i;for(let t of e){if(!H.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?H.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=K(e),e){let n=H.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return En(e);if(H.isFunction(t))return t.call(this,e,n);if(H.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=K(e),e){let n=H.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||On(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=K(e),e){let i=H.findKey(n,e);i&&(!t||On(n,n[i],i,t))&&(delete n[i],r=!0)}}return H.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||On(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return H.forEach(this,(r,i)=>{let a=H.findKey(n,i);if(a){t[a]=Tn(r),delete t[i];return}let o=e?kn(i):String(i).trim();o!==i&&delete t[i],t[o]=Tn(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return H.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&H.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` `)}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,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[wn]=this[wn]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=K(e);t[r]||(An(n,e),t[r]=!0)}return H.isArray(e)?e.forEach(r):r(e),this}};jn.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),H.reduceDescriptors(jn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),H.freezeMethods(jn);var q=jn;function Mn(e,t){let n=this||xn,r=t||n,i=q.from(r.headers),a=r.data;return H.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Nn(e){return!!(e&&e.__CANCEL__)}var J=class extends W{constructor(e,t,n){super(e??`canceled`,W.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Pn(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new W(`Request failed with status code `+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Fn(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function In(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}var Ln=In;function Rn(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var zn=Rn;const Bn=(e,t,n=3)=>{let r=0,i=Ln(50,250);return zn(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Vn=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Hn=e=>(...t)=>H.asap(()=>e(...t));var Un=G.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,G.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(G.origin),G.navigator&&/(msie|trident)/i.test(G.navigator.userAgent)):()=>!0,Wn=G.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];H.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),H.isString(r)&&s.push(`path=${r}`),H.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),H.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Gn(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Kn(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function qn(e,t,n){let r=!Gn(t);return e&&(r||n==0)?Kn(e,t):t}var Jn=e=>e instanceof q?{...e}:e;function Y(e,t){t||={};let n={};function r(e,t,n,r){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:r},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function i(e,t,n,i){if(H.isUndefined(t)){if(!H.isUndefined(e))return r(void 0,e,n,i)}else return r(e,t,n,i)}function a(e,t){if(!H.isUndefined(t))return r(void 0,t)}function o(e,t){if(H.isUndefined(t)){if(!H.isUndefined(e))return r(void 0,e)}else return r(void 0,t)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,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:s,headers:(e,t,n)=>i(Jn(e),Jn(t),n,!0)};return H.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=H.hasOwnProp(c,r)?c[r]:i,o=a(e[r],t[r],r);H.isUndefined(o)&&a!==s||(n[r]=o)}),n}var Yn=e=>{let t=Y({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=q.from(o),t.url=rn(qn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),H.isFormData(n)){if(G.hasStandardBrowserEnv||G.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(H.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(G.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||r!==!1&&Un(t.url))){let e=i&&a&&Wn.read(a);e&&o.set(i,e)}return t},Xn=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=Yn(e),i=r.data,a=q.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=q.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Pn(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new W(`Request aborted`,W.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new W(t&&t.message?t.message:`Network Error`,W.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||on;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new W(t,i.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&H.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),H.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Bn(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Bn(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new J(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Fn(r.url);if(_&&G.protocols.indexOf(_)===-1){n(new W(`Unsupported protocol `+_+`:`,W.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Zn=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof W?t:new J(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new W(`timeout of ${t}ms exceeded`,W.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>H.asap(o),s}};const Qn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},$n=async function*(e,t){for await(let n of er(e))yield*Qn(n,t)};var er=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}};const tr=(e,t,n,r)=>{let i=$n(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};var nr=64*1024,{isFunction:rr}=H,ir=(({Request:e,Response:t})=>({Request:e,Response:t}))(H.global),{ReadableStream:ar,TextEncoder:or}=H.global,sr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},cr=e=>{e=H.merge.call({skipUndefined:!0},ir,e);let{fetch:t,Request:n,Response:r}=e,i=t?rr(t):typeof fetch==`function`,a=rr(n),o=rr(r);if(!i)return!1;let s=i&&rr(ar),c=i&&(typeof or==`function`?(e=>t=>e.encode(t))(new or):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&sr(()=>{let e=!1,t=new n(G.origin,{body:new ar,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return e&&!t}),u=o&&s&&sr(()=>H.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new W(`Response type '${e}' is not supported`,W.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new n(G.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e+=``),H.isString(e))return(await c(e)).byteLength},p=async(e,t)=>H.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=Yn(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=Zn([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),ee;try{if(g&&l&&o!==`get`&&o!==`head`&&(ee=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(H.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=Vn(ee,Bn(Hn(g)));s=tr(e.body,nr,t,n)}}H.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=H.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&Vn(t,Bn(Hn(h),!0))||[];f=new r(tr(f.body,nr,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let T=await d[H.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{Pn(t,n,{data:T,headers:q.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new W(`Network Error`,W.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):W.from(t,t&&t.code,e,C,t&&t.response)}}},lr=new Map;const ur=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=lr;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:cr(t)),l=c;return c};ur();var dr={http:null,xhr:Xn,fetch:{get:ur}};H.forEach(dr,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var fr=e=>`- ${e}`,pr=e=>H.isFunction(e)||e===null||e===!1;function mr(e,t){e=H.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!pr(r)&&(i=dr[(n=String(r)).toLowerCase()],i===void 0))throw new W(`Unknown adapter '${n}'`);if(i&&(H.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new W(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : `+e.map(fr).join(` `):` `+fr(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var hr={getAdapter:mr,adapters:dr};function gr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new J(null,e)}function _r(e){return gr(e),e.headers=q.from(e.headers),e.data=Mn.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),hr.getAdapter(e.adapter||xn.adapter,e)(e).then(function(t){return gr(e),t.data=Mn.call(e,e.transformResponse,t),t.headers=q.from(t.headers),t},function(t){return Nn(t)||(gr(e),t&&t.response&&(t.response.data=Mn.call(e,e.transformResponse,t.response),t.response.headers=q.from(t.response.headers))),Promise.reject(t)})}const vr=`1.13.5`;var yr={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{yr[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var br={};yr.transitional=function(e,t,n){function r(e,t){return`[Axios v`+vr+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new W(r(i,` has been removed`+(t?` in `+t:``)),W.ERR_DEPRECATED);return t&&!br[i]&&(br[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},yr.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function xr(e,t,n){if(typeof e!=`object`)throw new W(`options must be an object`,W.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new W(`option `+a+` must be `+n,W.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new W(`Unknown option `+a,W.ERR_BAD_OPTION)}}var Sr={assertOptions:xr,validators:yr},X=Sr.validators,Cr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new an,response:new an}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=` `+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Y(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Sr.assertOptions(n,{silentJSONParsing:X.transitional(X.boolean),forcedJSONParsing:X.transitional(X.boolean),clarifyTimeoutError:X.transitional(X.boolean),legacyInterceptorReqResOrdering:X.transitional(X.boolean)},!1),r!=null&&(H.isFunction(r)?t.paramsSerializer={serialize:r}:Sr.assertOptions(r,{encode:X.function,serialize:X.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Sr.assertOptions(t,{baseUrl:X.spelling(`baseURL`),withXsrfToken:X.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&H.merge(i.common,i[t.method]);i&&H.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=q.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||on;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[_r.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=_r.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=Y(this.defaults,e),rn(qn(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};H.forEach([`delete`,`get`,`head`,`options`],function(e){Cr.prototype[e]=function(t,n){return this.request(Y(n||{},{method:e,url:t,data:(n||{}).data}))}}),H.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(Y(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Cr.prototype[e]=t(),Cr.prototype[e+`Form`]=t(!0)});var wr=Cr,Tr=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new J(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Er(e){return function(t){return e.apply(null,t)}}function Dr(e){return H.isObject(e)&&e.isAxiosError===!0}var Or={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Or).forEach(([e,t])=>{Or[t]=e});var kr=Or;function Ar(e){let t=new wr(e),n=Ye(wr.prototype.request,t);return H.extend(n,wr.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Ar(Y(e,t))},n}var Z=Ar(xn);Z.Axios=wr,Z.CanceledError=J,Z.CancelToken=Tr,Z.isCancel=Nn,Z.VERSION=vr,Z.toFormData=Zt,Z.AxiosError=W,Z.Cancel=Z.CanceledError,Z.all=function(e){return Promise.all(e)},Z.spread=Er,Z.isAxiosError=Dr,Z.mergeConfig=Y,Z.AxiosHeaders=q,Z.formToJSON=e=>vn(H.isHTMLForm(e)?new FormData(e):e),Z.getAdapter=hr.getAdapter,Z.HttpStatusCode=kr,Z.default=Z;var jr=Z,{Axios:Mr,AxiosError:Nr,CanceledError:Pr,isCancel:Fr,CancelToken:Ir,VERSION:Lr,all:Rr,Cancel:zr,isAxiosError:Br,spread:Vr,toFormData:Hr,AxiosHeaders:Ur,HttpStatusCode:Wr,formToJSON:Gr,getAdapter:Kr,mergeConfig:qr}=jr,Jr=()=>{let e=localStorage.getItem(Le);return e||(e=crypto.randomUUID(),localStorage.setItem(Le,e)),e},Yr=999,Xr=`⧉⇋⇋➽⌑⧉§§ `,Zr=class extends T{constructor(){super(`MFA is required to access this resource. Please set up MFA in your user settings.`),this.name=`MfaRequiredError`}},Q=class extends T{httpStatusCode;errorCode;serverStackTrace;meta;hint;constructor(e,t={}){super(e),this.name=`ResponseError`;let{errorCode:n,httpStatusCode:r,stack:i,meta:a,hint:o}=t;n&&(this.errorCode=n),r&&(this.httpStatusCode=r),i&&(this.serverStackTrace=i),a&&(this.meta=a),o&&(this.hint=o)}},Qr=e=>Object.keys(e).filter(t=>e[t]!==void 0).map(t=>Array.isArray(e[t])?e[t].map(e=>`${t}[]=${encodeURIComponent(e)}`).join(`&`):(typeof e[t]==`object`&&(e[t]=JSON.stringify(e[t])),`${t}=${encodeURIComponent(e[t])}`)).join(`&`);async function $(e){let{method:t,baseURL:n,endpoint:r,headers:i,data:a}=e,o={method:t,url:r,baseURL:n,headers:i??{}};n.startsWith(`/`)&&(o.headers[`browser-id`]=Jr()),!n.includes(`api.n8n.io`)&&!n.includes(`n8n.cloud`)&&(o.withCredentials=o.withCredentials??!0),[`POST`,`PATCH`,`PUT`].includes(t)?o.data=a:a&&(o.params=a,o.paramsSerializer=Qr);try{return(await jr.request(o)).data}catch(e){if(e.message===`Network Error`)throw new Q(`Can't connect to n8n.`,{errorCode:999});let t=e.response?.data;throw t?.mfaRequired===!0?new Zr:t?.message===void 0?e:t.name===`NodeApiError`?(t.httpStatusCode=e.response.status,t):new Q(t.message,{errorCode:t.code,httpStatusCode:e.response.status,stack:t.stack,meta:t.meta,hint:t.hint})}}async function $r(e,t,n,r){return await $({method:t,baseURL:e.baseUrl,endpoint:n,headers:{"push-ref":e.pushRef},data:r})}async function ei(e,t,n,r){return(await $({method:t,baseURL:e.baseUrl,endpoint:n,headers:{"push-ref":e.pushRef},data:r})).data}async function ti(e,t,n,r){return await $({method:`GET`,baseURL:e,endpoint:t,headers:r,data:n})}async function ni(e,t,n,r){return await $({method:`POST`,baseURL:e,endpoint:t,headers:r,data:n})}async function ri(e,t,n,r){return await $({method:`PATCH`,baseURL:e,endpoint:t,headers:r,data:n})}async function ii(e,t,n,r,i,a,o=Xr,s){let c=e=>{c=void 0,a?.(e)},l={headers:{"browser-id":Jr(),"Content-Type":`application/json`},method:`POST`,credentials:`include`,body:JSON.stringify(n),signal:s};try{let n=await fetch(`${e.baseUrl}${t}`,l);if(n.body){let e=n.body.getReader(),t=new TextDecoder(`utf-8`),a=``;async function s(){let{done:l,value:u}=await e.read();if(l){n.ok?i?.():c?.(new Q(n.statusText,{httpStatusCode:n.status}));return}let d=t.decode(u);a+=d;let f=a.split(o);a=``;for(let e of f)if(e){let t;try{t=w(e,{errorMessage:`Invalid json`})}catch{a+=e;continue}try{if(n.ok)r?.(t);else{let e=`message`in t?t.message:n.statusText;c?.(new Q(String(e),{httpStatusCode:n.status}))}}catch(e){e instanceof Error&&c?.(e)}}await s()}await s()}else c&&c(Error(n.statusText))}catch(e){Je(e instanceof Error),c?.(e)}}const ai={COMMUNITY_NODES:`communityNodes`,ROOT:`root`,SETTINGS:`settings`,UI:`ui`,USERS:`users`,WORKFLOWS:`workflows`,WORKFLOWS_LIST:`workflowsList`,WORKFLOWS_V2:`workflowsV2`,WORKFLOWS_EE:`workflowsEE`,WORKFLOW_DOCUMENTS:`workflowDocuments`,EXECUTIONS:`executions`,NDV:`ndv`,TEMPLATES:`templates`,NODE_TYPES:`nodeTypes`,CREDENTIALS:`credentials`,TAGS:`tags`,ANNOTATION_TAGS:`annotationTags`,VERSIONS:`versions`,NODE_CREATOR:`nodeCreator`,WEBHOOKS:`webhooks`,HISTORY:`history`,CLOUD_PLAN:`cloudPlan`,RBAC:`rbac`,PUSH:`push`,COLLABORATION:`collaboration`,ASSISTANT:`assistant`,BUILDER:`builder`,CHAT_PANEL:`chatPanel`,CHAT_PANEL_STATE:`chatPanelState`,BECOME_TEMPLATE_CREATOR:`becomeTemplateCreator`,PROJECTS:`projects`,API_KEYS:`apiKeys`,EVALUATION:`evaluation`,FOLDERS:`folders`,MODULES:`modules`,FOCUS_PANEL:`focusPanel`,WORKFLOW_STATE:`workflowState`,AI_TEMPLATES_STARTER_COLLECTION:`aiTemplatesStarterCollection`,PERSONALIZED_TEMPLATES:`personalizedTemplates`,EXPERIMENT_READY_TO_RUN_WORKFLOWS:`readyToRunWorkflows`,EXPERIMENT_READY_TO_RUN_WORKFLOWS_V2:`readyToRunWorkflowsV2`,EXPERIMENT_TEMPLATE_RECO_V2:`templateRecoV2`,PERSONALIZED_TEMPLATES_V3:`personalizedTemplatesV3`,READY_TO_RUN:`readyToRun`,TEMPLATES_DATA_QUALITY:`templatesDataQuality`,BANNERS:`banners`,CONSENT:`consent`,CHAT_HUB:`chatHub`,CHAT_HUB_PANEL:`chatHubPanel`,EXPERIMENT_EMPTY_STATE_BUILDER_PROMPT:`emptyStateBuilderPrompt`,EXPERIMENT_CREDENTIALS_APP_SELECTION:`credentialsAppSelection`,SETUP_PANEL:`setupPanel`,FOCUSED_NODES:`focusedNodes`};function oi(e){return`n8n:config:${e}`}function si(e){let t=oi(e);try{let e=document.querySelector(`meta[name="${t}"]`);if(!e)return null;let n=e.getAttribute(`content`);return n?atob(n):null}catch(e){return console.warn(`Failed to read n8n config for "${t}":`,e),null}}function ci(e){let t=si(e);if(!t)return null;try{return JSON.parse(t)}catch(t){return console.warn(`Failed to parse n8n config for "${oi(e)}":`,t),null}}var{VUE_APP_URL_BASE_API:li}={};const ui=Pe(ai.ROOT,()=>{let e=a({baseUrl:li??window.BASE_PATH,restEndpoint:si(`rest-endpoint`)??`rest`,defaultLocale:`en`,endpointForm:`form`,endpointFormTest:`form-test`,endpointFormWaiting:`form-waiting`,endpointMcp:`mcp`,endpointMcpTest:`mcp-test`,endpointWebhook:`webhook`,endpointWebhookTest:`webhook-test`,endpointWebhookWaiting:`webhook-waiting`,timezone:`America/New_York`,executionTimeout:-1,maxExecutionTimeout:2**53-1,versionCli:`0.0.0`,oauthCallbackUrls:{},n8nMetadata:{},pushRef:(()=>{let e=`n8n-client-id`,t=sessionStorage.getItem(e);if(t)return t;let n=D(10).toLowerCase();return sessionStorage.setItem(e,n),n})(),urlBaseWebhook:`http://localhost:5678/`,urlBaseEditor:`http://localhost:5678`,instanceId:``,binaryDataMode:`default`}),t=u(()=>e.value.baseUrl),n=u(()=>`${e.value.urlBaseWebhook}${e.value.endpointForm}`),r=u(()=>`${e.value.urlBaseEditor}${e.value.endpointFormTest}`),i=u(()=>`${e.value.urlBaseEditor}${e.value.endpointFormWaiting}`),o=u(()=>`${e.value.urlBaseWebhook}${e.value.endpointWebhook}`),s=u(()=>`${e.value.urlBaseEditor}${e.value.endpointWebhookTest}`),c=u(()=>`${e.value.urlBaseEditor}${e.value.endpointWebhookWaiting}`),l=u(()=>`${e.value.urlBaseWebhook}${e.valu