@endge/core 3.0.1 → 3.0.2

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/dist/core.cjs CHANGED
@@ -355,7 +355,7 @@ ${e.comment}`:e.comment}this.doc.range[2]=e.offset;break}default:this.errors.pus
355
355
  "use strict";
356
356
  const { convert, pick, path, template } = tools;
357
357
  ${((l=t.transform)==null?void 0:l.body)??""}
358
- `;return new Function("input","tools",n)(e,i)}_runPipeline(t,e,i,s,n){if(t.steps.some(d=>d.type==="select"))return this._runSelectPipeline(t,e);let a=[],l="item";const c=[];for(const d of t.steps){if(d.type==="from"){let f=i.path(e,d.source);for(const m of d.dataViews??[])f=this.runRef(m,f,i,s);a=Array.isArray(f)?f:[],l=d.as||"item"}if(d.type==="join"&&c.push(d),d.type==="map"){a=a.map(f=>{const m={input:e,[l]:f};for(const g of c)m[g.as]=this._resolveJoin(e,m,g,i);const y=this._createMapOutput(d.spreads??[],m,i);for(const[g,E]of Object.entries(d.fields))y[g]=this._evaluateExpression(E,m,i);return y});break}}return t.filter?a.filter(d=>!!Er(t.filter,{row:d,props:n,onWarning:J.isConfigured?f=>J.diagnostics.warn(`[DataView] ${f.message}`,{scope:{name:"endge.runtime.data-view"},phase:"runtime",eventName:"endge.expression.warning"}):void 0})):a}_resolveProps(t,e){const i={...e??{}};for(const s of t.props??[])i[s.key]===void 0&&s.defaultValue&&(i[s.key]=Er(s.defaultValue));return i}_runSelectPipeline(t,e){let i=e;for(const s of t.steps){if(s.type!=="select")throw new Error("[DataView] select pipeline cannot contain structural steps.");i=Er(s.expression,{scope:i,onWarning:J.isConfigured?n=>J.diagnostics.warn(`[DataView] ${n.message}`,{scope:{name:"endge.runtime.data-view"},phase:"runtime",eventName:"endge.expression.warning"}):void 0})}return i}_createMapOutput(t,e,i){const s={};for(const n of t){const a=i.path(e,n.source);a&&typeof a=="object"&&!Array.isArray(a)&&Object.assign(s,a)}return s}_resolveJoin(t,e,i,s){const n=s.path(e,i.left),a=s.path(t,i.source);return Array.isArray(a)?a.find(l=>s.path(l,i.right)===n)??null:null}_evaluateExpression(t,e,i){if(t.type==="literal")return t.value;if(t.type==="template")return i.template(t.template,e);if(t.type!=="path")return Er(t,{scope:e});let s=i.path(e,t.path);for(const n of t.operations)s=this._applyPathOperation(s,n,i);return s}_applyPathOperation(t,e,i){return e.type==="pick"?i.pick(t,e.path):e.type==="convert"?i.convert(e.converter,t,e.options):e.type==="find"?Array.isArray(t)?t.find(s=>Object.entries(e.criteria).every(([n,a])=>i.path(s,n)===a))??null:null:t}_createTools(t){return{...{convert:(i,s,n)=>this._convert(i,s,n),pick:(i,s)=>this._path(i,s),path:(i,s)=>this._path(i,s),template:(i,s={})=>i.replace(/\{([^{}]+)\}/g,(n,a)=>{const l=this._path(s,String(a).trim());return l==null?"":String(l)})},...t??{}}}_convert(t,e,i){if(J.isConfigured?J.domain.getConverter(t):null)return J.converters.execute(t,e,i);if(t==="date.iso_to_time"){const n=new Date(String(e??""));if(Number.isNaN(n.getTime()))return e;const a=String(n.getUTCHours()).padStart(2,"0"),l=String(n.getUTCMinutes()).padStart(2,"0");return String((i==null?void 0:i.format)??"HH:mm")==="HH:mm"?`${a}:${l}`:n.toISOString()}return e}convert(t,e,i){return this._convert(t,e,i)}_path(t,e){const i=String(e??"").split(".").filter(Boolean);let s=t;for(const n of i){if(s==null)return;s=s[n]}return s}_findLocalDataViewArtifact(t,e){for(const i of e){if(i.ref.entityType==="data-view"&&(i.ref.identity===t.ref.identity||i.ref.id===t.ref.id))return i;const s=this._findLocalDataViewArtifact(t,i.children??[]);if(s)return s}return null}}function RV(r,t){return function(){return r.apply(t,arguments)}}const{toString:rne}=Object.prototype,{getPrototypeOf:Ep}=Object,{iterator:Gh,toStringTag:BV}=Symbol,mA=(({hasOwnProperty:r})=>(t,e)=>r.call(t,e))(Object.prototype),Wf=(r,t)=>{let e=r;const i=[];for(;e!=null&&e!==Object.prototype;){if(i.indexOf(e)!==-1)return!1;if(i.push(e),mA(e,t))return!0;e=Ep(e)}return!1},ine=(r,t)=>r!=null&&Wf(r,t)?r[t]:void 0,uP=(r=>t=>{const e=rne.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Fn=r=>(r=r.toLowerCase(),t=>uP(t)===r),vb=r=>t=>typeof t===r,{isArray:Jc}=Array,Tp=vb("undefined");function Hp(r){return r!==null&&!Tp(r)&&r.constructor!==null&&!Tp(r.constructor)&&Bi(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const MV=Fn("ArrayBuffer");function sne(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&MV(r.buffer),t}const nne=vb("string"),Bi=vb("function"),LV=vb("number"),Wp=r=>r!==null&&typeof r=="object",ane=r=>r===!0||r===!1,hg=r=>{if(!Wp(r))return!1;const t=Ep(r);return(t===null||t===Object.prototype||Ep(t)===null)&&!Wf(r,BV)&&!Wf(r,Gh)},one=r=>{if(!Wp(r)||Hp(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},lne=Fn("Date"),cne=Fn("File"),une=r=>!!(r&&typeof r.uri<"u"),pne=r=>r&&typeof r.getParts<"u",dne=Fn("Blob"),fne=Fn("FileList"),hne=r=>Wp(r)&&Bi(r.pipe);function mne(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const LR=mne(),FR=typeof LR.FormData<"u"?LR.FormData:void 0,yne=r=>{if(!r)return!1;if(FR&&r instanceof FR)return!0;const t=Ep(r);if(!t||t===Object.prototype||!Bi(r.append))return!1;const e=uP(r);return e==="formdata"||e==="object"&&Bi(r.toString)&&r.toString()==="[object FormData]"},gne=Fn("URLSearchParams"),[Ane,Sne,bne,vne]=["ReadableStream","Request","Response","Headers"].map(Fn),Ene=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jh(r,t,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let i,s;if(typeof r!="object"&&(r=[r]),Jc(r))for(i=0,s=r.length;i<s;i++)t.call(null,r[i],i,r);else{if(Hp(r))return;const n=e?Object.getOwnPropertyNames(r):Object.keys(r),a=n.length;let l;for(i=0;i<a;i++)l=n[i],t.call(null,r[l],l,r)}}function FV(r,t){if(Hp(r))return null;t=t.toLowerCase();const e=Object.keys(r);let i=e.length,s;for(;i-- >0;)if(s=e[i],t===s.toLowerCase())return s;return null}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$V=r=>!Tp(r)&&r!==wc;function v0(...r){const{caseless:t,skipUndefined:e}=$V(this)&&this||{},i={},s=(n,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=t&&typeof a=="string"&&FV(i,a)||a,c=mA(i,l)?i[l]:void 0;hg(c)&&hg(n)?i[l]=v0(c,n):hg(n)?i[l]=v0({},n):Jc(n)?i[l]=n.slice():(!e||!Tp(n))&&(i[l]=n)};for(let n=0,a=r.length;n<a;n++){const l=r[n];if(!l||Hp(l)||(Jh(l,s),typeof l!="object"||Jc(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let d=0;d<c.length;d++){const f=c[d];Rne.call(l,f)&&s(l[f],f)}}return i}const Tne=(r,t,e,{allOwnKeys:i}={})=>(Jh(t,(s,n)=>{e&&Bi(s)?Object.defineProperty(r,n,{__proto__:null,value:RV(s,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,n,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),r),wne=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),xne=(r,t,e,i)=>{r.prototype=Object.create(t.prototype,i),Object.defineProperty(r.prototype,"constructor",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(r.prototype,e)},_ne=(r,t,e,i)=>{let s,n,a;const l={};if(t=t||{},r==null)return t;do{for(s=Object.getOwnPropertyNames(r),n=s.length;n-- >0;)a=s[n],(!i||i(a,r,t))&&!l[a]&&(t[a]=r[a],l[a]=!0);r=e!==!1&&Ep(r)}while(r&&(!e||e(r,t))&&r!==Object.prototype);return t},Ine=(r,t,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=t.length;const i=r.indexOf(t,e);return i!==-1&&i===e},Pne=r=>{if(!r)return null;if(Jc(r))return r;let t=r.length;if(!LV(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=r[t];return e},Cne=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&Ep(Uint8Array)),kne=(r,t)=>{const i=(r&&r[Gh]).call(r);let s;for(;(s=i.next())&&!s.done;){const n=s.value;t.call(r,n[0],n[1])}},Nne=(r,t)=>{let e;const i=[];for(;(e=r.exec(t))!==null;)i.push(e);return i},One=Fn("HTMLFormElement"),Dne=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,i,s){return i.toUpperCase()+s}),{propertyIsEnumerable:Rne}=Object.prototype,Bne=Fn("RegExp"),jV=(r,t)=>{const e=Object.getOwnPropertyDescriptors(r),i={};Jh(e,(s,n)=>{let a;(a=t(s,n,r))!==!1&&(i[n]=a||s)}),Object.defineProperties(r,i)},Mne=r=>{jV(r,(t,e)=>{if(Bi(r)&&["arguments","caller","callee"].includes(e))return!1;const i=r[e];if(Bi(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Lne=(r,t)=>{const e={},i=s=>{s.forEach(n=>{e[n]=!0})};return Jc(r)?i(r):i(String(r).split(t)),e},Fne=()=>{},$ne=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t;function jne(r){return!!(r&&Bi(r.append)&&r[BV]==="FormData"&&r[Gh])}const Une=r=>{const t=new WeakSet,e=i=>{if(Wp(i)){if(t.has(i))return;if(Hp(i))return i;if(!("toJSON"in i)){t.add(i);const s=Jc(i)?[]:{};return Jh(i,(n,a)=>{const l=e(n);!Tp(l)&&(s[a]=l)}),t.delete(i),s}}return i};return e(r)},Vne=Fn("AsyncFunction"),qne=r=>r&&(Wp(r)||Bi(r))&&Bi(r.then)&&Bi(r.catch),UV=((r,t)=>r?setImmediate:t?((e,i)=>(wc.addEventListener("message",({source:s,data:n})=>{s===wc&&n===e&&i.length&&i.shift()()},!1),s=>{i.push(s),wc.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Bi(wc.postMessage)),Kne=typeof queueMicrotask<"u"?queueMicrotask.bind(wc):typeof process<"u"&&process.nextTick||UV,VV=r=>r!=null&&Bi(r[Gh]),zne=r=>r!=null&&Wf(r,Gh)&&VV(r),ue={isArray:Jc,isArrayBuffer:MV,isBuffer:Hp,isFormData:yne,isArrayBufferView:sne,isString:nne,isNumber:LV,isBoolean:ane,isObject:Wp,isPlainObject:hg,isEmptyObject:one,isReadableStream:Ane,isRequest:Sne,isResponse:bne,isHeaders:vne,isUndefined:Tp,isDate:lne,isFile:cne,isReactNativeBlob:une,isReactNative:pne,isBlob:dne,isRegExp:Bne,isFunction:Bi,isStream:hne,isURLSearchParams:gne,isTypedArray:Cne,isFileList:fne,forEach:Jh,merge:v0,extend:Tne,trim:Ene,stripBOM:wne,inherits:xne,toFlatObject:_ne,kindOf:uP,kindOfTest:Fn,endsWith:Ine,toArray:Pne,forEachEntry:kne,matchAll:Nne,isHTMLForm:One,hasOwnProperty:mA,hasOwnProp:mA,hasOwnInPrototypeChain:Wf,getSafeProp:ine,reduceDescriptors:jV,freezeMethods:Mne,toObjectSet:Lne,toCamelCase:Dne,noop:Fne,toFiniteNumber:$ne,findKey:FV,global:wc,isContextDefined:$V,isSpecCompliantForm:jne,toJSONObject:Une,isAsyncFn:Vne,isThenable:qne,setImmediate:UV,asap:Kne,isIterable:VV,isSafeIterable:zne},Hne=ue.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"]),Wne=r=>{const t={};let e,i,s;return r&&r.split(`
358
+ `;return new Function("input","tools",n)(e,i)}_runPipeline(t,e,i,s,n){if(t.steps.some(d=>d.type==="select"))return this._runSelectPipeline(t,e);let a=[],l="item";const c=[];for(const d of t.steps){if(d.type==="from"){let f=i.path(e,d.source);for(const m of d.dataViews??[])f=this.runRef(m,f,i,s);a=Array.isArray(f)?f:[],l=d.as||"item"}if(d.type==="join"&&c.push(d),d.type==="map"){a=a.map(f=>{const m={input:e,[l]:f};for(const g of c)m[g.as]=this._resolveJoin(e,m,g,i);const y=this._createMapOutput(d.spreads??[],m,i);for(const[g,E]of Object.entries(d.fields))y[g]=this._evaluateExpression(E,m,i);return y});break}}return t.filter?a.filter(d=>!!Er(t.filter,{row:d,props:n,onWarning:J.isConfigured?f=>J.diagnostics.warn(`[DataView] ${f.message}`,{scope:{name:"endge.runtime.data-view"},phase:"runtime",eventName:"endge.expression.warning"}):void 0})):a}_resolveProps(t,e){const i={...e??{}};for(const s of t.props??[])i[s.key]===void 0&&s.defaultValue&&(i[s.key]=Er(s.defaultValue));return i}_runSelectPipeline(t,e){let i=e;for(const s of t.steps){if(s.type!=="select")throw new Error("[DataView] select pipeline cannot contain structural steps.");i=Er(s.expression,{scope:i,onWarning:J.isConfigured?n=>J.diagnostics.warn(`[DataView] ${n.message}`,{scope:{name:"endge.runtime.data-view"},phase:"runtime",eventName:"endge.expression.warning"}):void 0})}return i}_createMapOutput(t,e,i){const s={};for(const n of t){const a=i.path(e,n.source);a&&typeof a=="object"&&!Array.isArray(a)&&Object.assign(s,a)}return s}_resolveJoin(t,e,i,s){const n=s.path(e,i.left),a=s.path(t,i.source);return Array.isArray(a)?a.find(l=>s.path(l,i.right)===n)??null:null}_evaluateExpression(t,e,i){if(t.type==="literal")return t.value;if(t.type==="template")return i.template(t.template,e);if(t.type!=="path")return Er(t,{scope:e});let s=i.path(e,t.path);for(const n of t.operations)s=this._applyPathOperation(s,n,i);return s}_applyPathOperation(t,e,i){return e.type==="pick"?i.pick(t,e.path):e.type==="convert"?i.convert(e.converter,t,e.options):e.type==="find"?Array.isArray(t)?t.find(s=>Object.entries(e.criteria).every(([n,a])=>i.path(s,n)===a))??null:null:t}_createTools(t){return{...{convert:(i,s,n)=>this._convert(i,s,n),pick:(i,s)=>this._path(i,s),path:(i,s)=>this._path(i,s),template:(i,s={})=>i.replace(/\{([^{}]+)\}/g,(n,a)=>{const l=this._path(s,String(a).trim());return l==null?"":String(l)})},...t??{}}}_convert(t,e,i){if(J.converters.has(t))return J.converters.execute(t,e,i);if(t==="date.iso_to_time"){const s=new Date(String(e??""));if(Number.isNaN(s.getTime()))return e;const n=String(s.getUTCHours()).padStart(2,"0"),a=String(s.getUTCMinutes()).padStart(2,"0");return String((i==null?void 0:i.format)??"HH:mm")==="HH:mm"?`${n}:${a}`:s.toISOString()}return e}convert(t,e,i){return this._convert(t,e,i)}_path(t,e){const i=String(e??"").split(".").filter(Boolean);let s=t;for(const n of i){if(s==null)return;s=s[n]}return s}_findLocalDataViewArtifact(t,e){for(const i of e){if(i.ref.entityType==="data-view"&&(i.ref.identity===t.ref.identity||i.ref.id===t.ref.id))return i;const s=this._findLocalDataViewArtifact(t,i.children??[]);if(s)return s}return null}}function RV(r,t){return function(){return r.apply(t,arguments)}}const{toString:rne}=Object.prototype,{getPrototypeOf:Ep}=Object,{iterator:Gh,toStringTag:BV}=Symbol,mA=(({hasOwnProperty:r})=>(t,e)=>r.call(t,e))(Object.prototype),Wf=(r,t)=>{let e=r;const i=[];for(;e!=null&&e!==Object.prototype;){if(i.indexOf(e)!==-1)return!1;if(i.push(e),mA(e,t))return!0;e=Ep(e)}return!1},ine=(r,t)=>r!=null&&Wf(r,t)?r[t]:void 0,uP=(r=>t=>{const e=rne.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Fn=r=>(r=r.toLowerCase(),t=>uP(t)===r),vb=r=>t=>typeof t===r,{isArray:Jc}=Array,Tp=vb("undefined");function Hp(r){return r!==null&&!Tp(r)&&r.constructor!==null&&!Tp(r.constructor)&&Bi(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const MV=Fn("ArrayBuffer");function sne(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&MV(r.buffer),t}const nne=vb("string"),Bi=vb("function"),LV=vb("number"),Wp=r=>r!==null&&typeof r=="object",ane=r=>r===!0||r===!1,hg=r=>{if(!Wp(r))return!1;const t=Ep(r);return(t===null||t===Object.prototype||Ep(t)===null)&&!Wf(r,BV)&&!Wf(r,Gh)},one=r=>{if(!Wp(r)||Hp(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},lne=Fn("Date"),cne=Fn("File"),une=r=>!!(r&&typeof r.uri<"u"),pne=r=>r&&typeof r.getParts<"u",dne=Fn("Blob"),fne=Fn("FileList"),hne=r=>Wp(r)&&Bi(r.pipe);function mne(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const LR=mne(),FR=typeof LR.FormData<"u"?LR.FormData:void 0,yne=r=>{if(!r)return!1;if(FR&&r instanceof FR)return!0;const t=Ep(r);if(!t||t===Object.prototype||!Bi(r.append))return!1;const e=uP(r);return e==="formdata"||e==="object"&&Bi(r.toString)&&r.toString()==="[object FormData]"},gne=Fn("URLSearchParams"),[Ane,Sne,bne,vne]=["ReadableStream","Request","Response","Headers"].map(Fn),Ene=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jh(r,t,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let i,s;if(typeof r!="object"&&(r=[r]),Jc(r))for(i=0,s=r.length;i<s;i++)t.call(null,r[i],i,r);else{if(Hp(r))return;const n=e?Object.getOwnPropertyNames(r):Object.keys(r),a=n.length;let l;for(i=0;i<a;i++)l=n[i],t.call(null,r[l],l,r)}}function FV(r,t){if(Hp(r))return null;t=t.toLowerCase();const e=Object.keys(r);let i=e.length,s;for(;i-- >0;)if(s=e[i],t===s.toLowerCase())return s;return null}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$V=r=>!Tp(r)&&r!==wc;function v0(...r){const{caseless:t,skipUndefined:e}=$V(this)&&this||{},i={},s=(n,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=t&&typeof a=="string"&&FV(i,a)||a,c=mA(i,l)?i[l]:void 0;hg(c)&&hg(n)?i[l]=v0(c,n):hg(n)?i[l]=v0({},n):Jc(n)?i[l]=n.slice():(!e||!Tp(n))&&(i[l]=n)};for(let n=0,a=r.length;n<a;n++){const l=r[n];if(!l||Hp(l)||(Jh(l,s),typeof l!="object"||Jc(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let d=0;d<c.length;d++){const f=c[d];Rne.call(l,f)&&s(l[f],f)}}return i}const Tne=(r,t,e,{allOwnKeys:i}={})=>(Jh(t,(s,n)=>{e&&Bi(s)?Object.defineProperty(r,n,{__proto__:null,value:RV(s,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,n,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),r),wne=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),xne=(r,t,e,i)=>{r.prototype=Object.create(t.prototype,i),Object.defineProperty(r.prototype,"constructor",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(r.prototype,e)},_ne=(r,t,e,i)=>{let s,n,a;const l={};if(t=t||{},r==null)return t;do{for(s=Object.getOwnPropertyNames(r),n=s.length;n-- >0;)a=s[n],(!i||i(a,r,t))&&!l[a]&&(t[a]=r[a],l[a]=!0);r=e!==!1&&Ep(r)}while(r&&(!e||e(r,t))&&r!==Object.prototype);return t},Ine=(r,t,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=t.length;const i=r.indexOf(t,e);return i!==-1&&i===e},Pne=r=>{if(!r)return null;if(Jc(r))return r;let t=r.length;if(!LV(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=r[t];return e},Cne=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&Ep(Uint8Array)),kne=(r,t)=>{const i=(r&&r[Gh]).call(r);let s;for(;(s=i.next())&&!s.done;){const n=s.value;t.call(r,n[0],n[1])}},Nne=(r,t)=>{let e;const i=[];for(;(e=r.exec(t))!==null;)i.push(e);return i},One=Fn("HTMLFormElement"),Dne=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,i,s){return i.toUpperCase()+s}),{propertyIsEnumerable:Rne}=Object.prototype,Bne=Fn("RegExp"),jV=(r,t)=>{const e=Object.getOwnPropertyDescriptors(r),i={};Jh(e,(s,n)=>{let a;(a=t(s,n,r))!==!1&&(i[n]=a||s)}),Object.defineProperties(r,i)},Mne=r=>{jV(r,(t,e)=>{if(Bi(r)&&["arguments","caller","callee"].includes(e))return!1;const i=r[e];if(Bi(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Lne=(r,t)=>{const e={},i=s=>{s.forEach(n=>{e[n]=!0})};return Jc(r)?i(r):i(String(r).split(t)),e},Fne=()=>{},$ne=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t;function jne(r){return!!(r&&Bi(r.append)&&r[BV]==="FormData"&&r[Gh])}const Une=r=>{const t=new WeakSet,e=i=>{if(Wp(i)){if(t.has(i))return;if(Hp(i))return i;if(!("toJSON"in i)){t.add(i);const s=Jc(i)?[]:{};return Jh(i,(n,a)=>{const l=e(n);!Tp(l)&&(s[a]=l)}),t.delete(i),s}}return i};return e(r)},Vne=Fn("AsyncFunction"),qne=r=>r&&(Wp(r)||Bi(r))&&Bi(r.then)&&Bi(r.catch),UV=((r,t)=>r?setImmediate:t?((e,i)=>(wc.addEventListener("message",({source:s,data:n})=>{s===wc&&n===e&&i.length&&i.shift()()},!1),s=>{i.push(s),wc.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Bi(wc.postMessage)),Kne=typeof queueMicrotask<"u"?queueMicrotask.bind(wc):typeof process<"u"&&process.nextTick||UV,VV=r=>r!=null&&Bi(r[Gh]),zne=r=>r!=null&&Wf(r,Gh)&&VV(r),ue={isArray:Jc,isArrayBuffer:MV,isBuffer:Hp,isFormData:yne,isArrayBufferView:sne,isString:nne,isNumber:LV,isBoolean:ane,isObject:Wp,isPlainObject:hg,isEmptyObject:one,isReadableStream:Ane,isRequest:Sne,isResponse:bne,isHeaders:vne,isUndefined:Tp,isDate:lne,isFile:cne,isReactNativeBlob:une,isReactNative:pne,isBlob:dne,isRegExp:Bne,isFunction:Bi,isStream:hne,isURLSearchParams:gne,isTypedArray:Cne,isFileList:fne,forEach:Jh,merge:v0,extend:Tne,trim:Ene,stripBOM:wne,inherits:xne,toFlatObject:_ne,kindOf:uP,kindOfTest:Fn,endsWith:Ine,toArray:Pne,forEachEntry:kne,matchAll:Nne,isHTMLForm:One,hasOwnProperty:mA,hasOwnProp:mA,hasOwnInPrototypeChain:Wf,getSafeProp:ine,reduceDescriptors:jV,freezeMethods:Mne,toObjectSet:Lne,toCamelCase:Dne,noop:Fne,toFiniteNumber:$ne,findKey:FV,global:wc,isContextDefined:$V,isSpecCompliantForm:jne,toJSONObject:Une,isAsyncFn:Vne,isThenable:qne,setImmediate:UV,asap:Kne,isIterable:VV,isSafeIterable:zne},Hne=ue.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"]),Wne=r=>{const t={};let e,i,s;return r&&r.split(`
359
359
  `).forEach(function(a){s=a.indexOf(":"),e=a.substring(0,s).trim().toLowerCase(),i=a.substring(s+1).trim(),!(!e||t[e]&&Hne[e])&&(e==="set-cookie"?t[e]?t[e].push(i):t[e]=[i]:t[e]=t[e]?t[e]+", "+i:i)}),t};function Gne(r){let t=0,e=r.length;for(;t<e;){const i=r.charCodeAt(t);if(i!==9&&i!==32)break;t+=1}for(;e>t;){const i=r.charCodeAt(e-1);if(i!==9&&i!==32)break;e-=1}return t===0&&e===r.length?r:r.slice(t,e)}const Jne=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Yne=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function pP(r,t){return ue.isArray(r)?r.map(e=>pP(e,t)):Gne(String(r).replace(t,""))}const Qne=r=>pP(r,Jne),Xne=r=>pP(r,Yne);function qV(r){const t=Object.create(null);return ue.forEach(r.toJSON(),(e,i)=>{t[i]=Xne(e)}),t}const $R=Symbol("internals");function jd(r){return r&&String(r).trim().toLowerCase()}function mg(r){return r===!1||r==null?r:ue.isArray(r)?r.map(mg):Qne(String(r))}function Zne(r){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=e.exec(r);)t[i[1]]=i[2];return t}const eae=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function PT(r,t,e,i,s){if(ue.isFunction(i))return i.call(this,t,e);if(s&&(t=e),!!ue.isString(t)){if(ue.isString(i))return t.indexOf(i)!==-1;if(ue.isRegExp(i))return i.test(t)}}function tae(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,i)=>e.toUpperCase()+i)}function rae(r,t){const e=ue.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+e,{__proto__:null,value:function(s,n,a){return this[i].call(this,t,s,n,a)},configurable:!0})})}let oi=class{constructor(t){t&&this.set(t)}set(t,e,i){const s=this;function n(l,c,d){const f=jd(c);if(!f)return;const m=ue.findKey(s,f);(!m||s[m]===void 0||d===!0||d===void 0&&s[m]!==!1)&&(s[m||c]=mg(l))}const a=(l,c)=>ue.forEach(l,(d,f)=>n(d,f,c));if(ue.isPlainObject(t)||t instanceof this.constructor)a(t,e);else if(ue.isString(t)&&(t=t.trim())&&!eae(t))a(Wne(t),e);else if(ue.isObject(t)&&ue.isSafeIterable(t)){let l=Object.create(null),c,d;for(const f of t){if(!ue.isArray(f))throw new TypeError("Object iterator must return a key-value pair");d=f[0],ue.hasOwnProp(l,d)?(c=l[d],l[d]=ue.isArray(c)?[...c,f[1]]:[c,f[1]]):l[d]=f[1]}a(l,e)}else t!=null&&n(e,t,i);return this}get(t,e){if(t=jd(t),t){const i=ue.findKey(this,t);if(i){const s=this[i];if(!e)return s;if(e===!0)return Zne(s);if(ue.isFunction(e))return e.call(this,s,i);if(ue.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=jd(t),t){const i=ue.findKey(this,t);return!!(i&&this[i]!==void 0&&(!e||PT(this,this[i],i,e)))}return!1}delete(t,e){const i=this;let s=!1;function n(a){if(a=jd(a),a){const l=ue.findKey(i,a);l&&(!e||PT(i,i[l],l,e))&&(delete i[l],s=!0)}}return ue.isArray(t)?t.forEach(n):n(t),s}clear(t){const e=Object.keys(this);let i=e.length,s=!1;for(;i--;){const n=e[i];(!t||PT(this,this[n],n,t,!0))&&(delete this[n],s=!0)}return s}normalize(t){const e=this,i={};return ue.forEach(this,(s,n)=>{const a=ue.findKey(i,n);if(a){e[a]=mg(s),delete e[n];return}const l=t?tae(n):String(n).trim();l!==n&&delete e[n],e[l]=mg(s),i[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ue.forEach(this,(i,s)=>{i!=null&&i!==!1&&(e[s]=t&&ue.isArray(i)?i.join(", "):i)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
360
360
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const i=new this(t);return e.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[$R]=this[$R]={accessors:{}}).accessors,s=this.prototype;function n(a){const l=jd(a);i[l]||(rae(s,a),i[l]=!0)}return ue.isArray(t)?t.forEach(n):n(t),this}};oi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors(oi.prototype,({value:r},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(i){this[e]=i}}});ue.freezeMethods(oi);const iae="[REDACTED ****]";function sae(r){if(ue.hasOwnProp(r,"toJSON"))return!0;let t=Object.getPrototypeOf(r);for(;t&&t!==Object.prototype;){if(ue.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function nae(r,t){const e=new Set(t.map(n=>String(n).toLowerCase())),i=[],s=n=>{if(n===null||typeof n!="object"||ue.isBuffer(n))return n;if(i.indexOf(n)!==-1)return;n instanceof oi&&(n=n.toJSON()),i.push(n);let a;if(ue.isArray(n))a=[],n.forEach((l,c)=>{const d=s(l);ue.isUndefined(d)||(a[c]=d)});else{if(!ue.isPlainObject(n)&&sae(n))return i.pop(),n;a=Object.create(null);for(const[l,c]of Object.entries(n)){const d=e.has(l.toLowerCase())?iae:s(c);ue.isUndefined(d)||(a[l]=d)}}return i.pop(),a};return s(r)}let $e=class KV extends Error{static from(t,e,i,s,n,a){const l=new KV(t.message,e||t.code,i,s,n);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),a&&Object.assign(l,a),l}constructor(t,e,i,s,n){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),i&&(this.config=i),s&&(this.request=s),n&&(this.response=n,this.status=n.status)}toJSON(){const t=this.config,e=t&&ue.hasOwnProp(t,"redact")?t.redact:void 0,i=ue.isArray(e)&&e.length>0?nae(t,e):ue.toJSONObject(t);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:i,code:this.code,status:this.status}}};$e.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";$e.ERR_BAD_OPTION="ERR_BAD_OPTION";$e.ECONNABORTED="ECONNABORTED";$e.ETIMEDOUT="ETIMEDOUT";$e.ECONNREFUSED="ECONNREFUSED";$e.ERR_NETWORK="ERR_NETWORK";$e.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";$e.ERR_DEPRECATED="ERR_DEPRECATED";$e.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";$e.ERR_BAD_REQUEST="ERR_BAD_REQUEST";$e.ERR_CANCELED="ERR_CANCELED";$e.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";$e.ERR_INVALID_URL="ERR_INVALID_URL";$e.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const aae=null,zV=100;function E0(r){return ue.isPlainObject(r)||ue.isArray(r)}function HV(r){return ue.endsWith(r,"[]")?r.slice(0,-2):r}function CT(r,t,e){return r?r.concat(t).map(function(s,n){return s=HV(s),!e&&n?"["+s+"]":s}).join(e?".":""):t}function oae(r){return ue.isArray(r)&&!r.some(E0)}const lae=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function Eb(r,t,e){if(!ue.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,e=ue.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,x){return!ue.isUndefined(x[C])});const i=e.metaTokens,s=e.visitor||E,n=e.dots,a=e.indexes,l=e.Blob||typeof Blob<"u"&&Blob,c=e.maxDepth===void 0?zV:e.maxDepth,d=l&&ue.isSpecCompliantForm(t),f=[];if(!ue.isFunction(s))throw new TypeError("visitor must be a function");function m(v){if(v===null)return"";if(ue.isDate(v))return v.toISOString();if(ue.isBoolean(v))return v.toString();if(!d&&ue.isBlob(v))throw new $e("Blob is not supported. Use a Buffer instead.");if(ue.isArrayBuffer(v)||ue.isTypedArray(v)){if(d&&typeof l=="function")return new l([v]);if(typeof Buffer<"u")return Buffer.from(v);throw new $e("Blob is not supported. Use a Buffer instead.",$e.ERR_NOT_SUPPORT)}return v}function y(v){if(v>c)throw new $e("Object is too deeply nested ("+v+" levels). Max depth: "+c,$e.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(v,C){if(c===1/0)return JSON.stringify(v);const x=[];return JSON.stringify(v,function(D,O){if(!ue.isObject(O))return O;for(;x.length&&x[x.length-1]!==this;)x.pop();return x.push(O),y(C+x.length-1),O})}function E(v,C,x){let k=v;if(ue.isReactNative(t)&&ue.isReactNativeBlob(v))return t.append(CT(x,C,n),m(v)),!1;if(v&&!x&&typeof v=="object"){if(ue.endsWith(C,"{}"))C=i?C:C.slice(0,-2),v=g(v,1);else if(ue.isArray(v)&&oae(v)||(ue.isFileList(v)||ue.endsWith(C,"[]"))&&(k=ue.toArray(v)))return C=HV(C),k.forEach(function(O,V){!(ue.isUndefined(O)||O===null)&&t.append(a===!0?CT([C],V,n):a===null?C:C+"[]",m(O))}),!1}return E0(v)?!0:(t.append(CT(x,C,n),m(v)),!1)}const b=Object.assign(lae,{defaultVisitor:E,convertValue:m,isVisitable:E0});function T(v,C,x=0){if(!ue.isUndefined(v)){if(y(x),f.indexOf(v)!==-1)throw new Error("Circular reference detected in "+C.join("."));f.push(v),ue.forEach(v,function(D,O){(!(ue.isUndefined(D)||D===null)&&s.call(t,D,ue.isString(O)?O.trim():O,C,b))===!0&&T(D,C?C.concat(O):[O],x+1)}),f.pop()}}if(!ue.isObject(r))throw new TypeError("data must be an object");return T(r),t}function jR(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(r).replace(/[!'()~]|%20/g,function(i){return t[i]})}function dP(r,t){this._pairs=[],r&&Eb(r,this,t)}const WV=dP.prototype;WV.append=function(t,e){this._pairs.push([t,e])};WV.toString=function(t){const e=t?i=>t.call(this,i,jR):jR;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function cae(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function GV(r,t,e){if(!t)return r;r=r||"";const i=ue.isFunction(e)?{serialize:e}:e,s=ue.getSafeProp(i,"encode")||cae,n=ue.getSafeProp(i,"serialize");let a;if(n?a=n(t,i):a=ue.isURLSearchParams(t)?t.toString():new dP(t,i).toString(s),a){const l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}class UR{constructor(){this.handlers=[]}use(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(i){i!==null&&t(i)})}}const fP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},uae=typeof URLSearchParams<"u"?URLSearchParams:dP,pae=typeof FormData<"u"?FormData:null,dae=typeof Blob<"u"?Blob:null,fae={isBrowser:!0,classes:{URLSearchParams:uae,FormData:pae,Blob:dae},protocols:["http","https","file","blob","url","data"]},hP=typeof window<"u"&&typeof document<"u",T0=typeof navigator=="object"&&navigator||void 0,hae=hP&&(!T0||["ReactNative","NativeScript","NS"].indexOf(T0.product)<0),mae=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yae=hP&&window.location.href||"http://localhost",gae=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hP,hasStandardBrowserEnv:hae,hasStandardBrowserWebWorkerEnv:mae,navigator:T0,origin:yae},Symbol.toStringTag,{value:"Module"})),Yr={...gae,...fae};function Aae(r,t){return Eb(r,new Yr.classes.URLSearchParams,{visitor:function(e,i,s,n){return Yr.isNode&&ue.isBuffer(e)?(this.append(i,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}const VR=zV;function JV(r){if(r>VR)throw new $e("FormData field is too deeply nested ("+r+" levels). Max depth: "+VR,$e.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Sae(r){const t=[],e=/\w+|\[(\w*)]/g;let i;for(;(i=e.exec(r))!==null;)JV(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function bae(r){const t={},e=Object.keys(r);let i;const s=e.length;let n;for(i=0;i<s;i++)n=e[i],t[n]=r[n];return t}function YV(r){function t(e,i,s,n){JV(n);let a=e[n++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=n>=e.length;return a=!a&&ue.isArray(s)?s.length:a,c?(ue.hasOwnProp(s,a)?s[a]=ue.isArray(s[a])?s[a].concat(i):[s[a],i]:s[a]=i,!l):((!ue.hasOwnProp(s,a)||!ue.isObject(s[a]))&&(s[a]=[]),t(e,i,s[a],n)&&ue.isArray(s[a])&&(s[a]=bae(s[a])),!l)}if(ue.isFormData(r)&&ue.isFunction(r.entries)){const e={};return ue.forEachEntry(r,(i,s)=>{t(Sae(i),s,e,0)}),e}return null}const Pu=(r,t)=>r!=null&&ue.hasOwnProp(r,t)?r[t]:void 0;function vae(r,t,e){if(ue.isString(r))try{return(t||JSON.parse)(r),ue.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(e||JSON.stringify)(r)}const Yh={transitional:fP,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const i=e.getContentType()||"",s=i.indexOf("application/json")>-1,n=ue.isObject(t);if(n&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return s?JSON.stringify(YV(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(n){const c=Pu(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Aae(t,c).toString();if((l=ue.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=Pu(this,"env"),f=d&&d.FormData;return Eb(l?{"files[]":t}:t,f&&new f,c)}}return n||s?(e.setContentType("application/json",!1),vae(t)):t}],transformResponse:[function(t){const e=Pu(this,"transitional")||Yh.transitional,i=e&&e.forcedJSONParsing,s=Pu(this,"responseType"),n=s==="json";if(ue.isResponse(t)||ue.isReadableStream(t))return t;if(t&&ue.isString(t)&&(i&&!s||n)){const l=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,Pu(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?$e.from(c,$e.ERR_BAD_RESPONSE,this,null,Pu(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yr.classes.FormData,Blob:Yr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch","query"],r=>{Yh.headers[r]={}});function kT(r,t){const e=this||Yh,i=t||e,s=oi.from(i.headers);let n=i.data;return ue.forEach(r,function(l){n=l.call(e,n,s.normalize(),t?t.status:void 0)}),s.normalize(),n}function QV(r){return!!(r&&r.__CANCEL__)}let Qh=class extends $e{constructor(t,e,i){super(t??"canceled",$e.ERR_CANCELED,e,i),this.name="CanceledError",this.__CANCEL__=!0}};function XV(r,t,e){const i=e.config.validateStatus;!e.status||!i||i(e.status)?r(e):t(new $e("Request failed with status code "+e.status,e.status>=400&&e.status<500?$e.ERR_BAD_REQUEST:$e.ERR_BAD_RESPONSE,e.config,e.request,e))}function Eae(r){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(r);return t&&t[1]||""}function Tae(r,t){r=r||10;const e=new Array(r),i=new Array(r);let s=0,n=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=i[n];a||(a=d),e[s]=c,i[s]=d;let m=n,y=0;for(;m!==s;)y+=e[m++],m=m%r;if(s=(s+1)%r,s===n&&(n=(n+1)%r),d-a<t)return;const g=f&&d-f;return g?Math.round(y*1e3/g):void 0}}function wae(r,t){let e=0,i=1e3/t,s,n;const a=(d,f=Date.now())=>{e=f,s=null,n&&(clearTimeout(n),n=null),r(...d)};return[(...d)=>{const f=Date.now(),m=f-e;m>=i?a(d,f):(s=d,n||(n=setTimeout(()=>{n=null,a(s)},i-m)))},()=>s&&a(s)]}const yA=(r,t,e=3)=>{let i=0;const s=Tae(50,250);return wae(n=>{if(!n||typeof n.loaded!="number")return;const a=n.loaded,l=n.lengthComputable?n.total:void 0,c=l!=null?Math.min(a,l):a,d=Math.max(0,c-i),f=s(d);i=Math.max(i,c);const m={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:f||void 0,estimated:f&&l?(l-c)/f:void 0,event:n,lengthComputable:l!=null,[t?"download":"upload"]:!0};r(m)},e)},qR=(r,t)=>{const e=r!=null;return[i=>t[0]({lengthComputable:e,total:r,loaded:i}),t[1]]},KR=r=>(...t)=>ue.asap(()=>r(...t)),xae=Yr.hasStandardBrowserEnv?((r,t)=>e=>(e=new URL(e,Yr.origin),r.protocol===e.protocol&&r.host===e.host&&(t||r.port===e.port)))(new URL(Yr.origin),Yr.navigator&&/(msie|trident)/i.test(Yr.navigator.userAgent)):()=>!0,_ae=Yr.hasStandardBrowserEnv?{write(r,t,e,i,s,n,a){if(typeof document>"u")return;const l=[`${r}=${encodeURIComponent(t)}`];ue.isNumber(e)&&l.push(`expires=${new Date(e).toUTCString()}`),ue.isString(i)&&l.push(`path=${i}`),ue.isString(s)&&l.push(`domain=${s}`),n===!0&&l.push("secure"),ue.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(r){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let e=0;e<t.length;e++){const i=t[e].replace(/^\s+/,""),s=i.indexOf("=");if(s!==-1&&i.slice(0,s)===r)try{return decodeURIComponent(i.slice(s+1))}catch{return i.slice(s+1)}}return null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Iae(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Pae(r,t){return t?r.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):r}const Cae=/^https?:(?!\/\/)/i,kae=/[\t\n\r]/g;function Nae(r){let t=0;for(;t<r.length&&r.charCodeAt(t)<=32;)t++;return r.slice(t)}function Oae(r){return Nae(r).replace(kae,"")}function zR(r,t){if(typeof r=="string"&&Cae.test(Oae(r)))throw new $e('Invalid URL: missing "//" after protocol',$e.ERR_INVALID_URL,t)}function ZV(r,t,e,i){zR(t,i);let s=!Iae(t);return r&&(s||e===!1)?(zR(r,i),Pae(r,t)):t}const HR=r=>r instanceof oi?{...r}:r;function Yc(r,t){r=r||{},t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(f,m,y,g){return ue.isPlainObject(f)&&ue.isPlainObject(m)?ue.merge.call({caseless:g},f,m):ue.isPlainObject(m)?ue.merge({},m):ue.isArray(m)?m.slice():m}function s(f,m,y,g){if(ue.isUndefined(m)){if(!ue.isUndefined(f))return i(void 0,f,y,g)}else return i(f,m,y,g)}function n(f,m){if(!ue.isUndefined(m))return i(void 0,m)}function a(f,m){if(ue.isUndefined(m)){if(!ue.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function l(f){const m=ue.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ue.isUndefined(m))if(ue.isPlainObject(m)){if(ue.hasOwnProp(m,f))return m[f]}else return;const y=ue.hasOwnProp(r,"transitional")?r.transitional:void 0;if(ue.isPlainObject(y)&&ue.hasOwnProp(y,f))return y[f]}function c(f,m,y){if(ue.hasOwnProp(t,y))return i(f,m);if(ue.hasOwnProp(r,y))return i(void 0,f)}const d={url:n,method:n,data:n,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(f,m,y)=>s(HR(f),HR(m),y,!0)};return ue.forEach(Object.keys({...r,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const y=ue.hasOwnProp(d,m)?d[m]:s,g=ue.hasOwnProp(r,m)?r[m]:void 0,E=ue.hasOwnProp(t,m)?t[m]:void 0,b=y(g,E,m);ue.isUndefined(b)&&y!==c||(e[m]=b)}),ue.hasOwnProp(t,"validateStatus")&&ue.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(ue.hasOwnProp(r,"validateStatus")?e.validateStatus=i(void 0,r.validateStatus):delete e.validateStatus),e}const Dae=["content-type","content-length"];function Rae(r,t,e){if(e!=="content-only"){r.set(t);return}Object.entries(t||{}).forEach(([i,s])=>{Dae.includes(i.toLowerCase())&&r.set(i,s)})}const Bae=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16)));function e4(r){const t=Yc({},r),e=y=>ue.hasOwnProp(t,y)?t[y]:void 0,i=e("data");let s=e("withXSRFToken");const n=e("xsrfHeaderName"),a=e("xsrfCookieName");let l=e("headers");const c=e("auth"),d=e("baseURL"),f=e("allowAbsoluteUrls"),m=e("url");if(t.headers=l=oi.from(l),t.url=GV(ZV(d,m,f,t),e("params"),e("paramsSerializer")),c){const y=ue.getSafeProp(c,"username")||"",g=ue.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(y+":"+(g?Bae(g):"")))}catch(E){throw $e.from(E,$e.ERR_BAD_OPTION_VALUE,r)}}if(ue.isFormData(i)&&(Yr.hasStandardBrowserEnv||Yr.hasStandardBrowserWebWorkerEnv||ue.isReactNative(i)?l.setContentType(void 0):ue.isFunction(i.getHeaders)&&Rae(l,i.getHeaders(),e("formDataHeaderPolicy"))),Yr.hasStandardBrowserEnv&&(ue.isFunction(s)&&(s=s(t)),s===!0||s==null&&xae(t.url))){const g=n&&a&&_ae.read(a);g&&l.set(n,g)}return t}const Mae=typeof XMLHttpRequest<"u",Lae=Mae&&function(r){return new Promise(function(e,i){const s=e4(r);let n=s.data;const a=oi.from(s.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=s,f,m,y,g,E;function b(){g&&g(),E&&E(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let T=new XMLHttpRequest;T.open(s.method.toUpperCase(),s.url,!0),T.timeout=s.timeout;function v(){if(!T)return;const x=oi.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),D={data:!l||l==="text"||l==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:x,config:r,request:T};XV(function(V){e(V),b()},function(V){i(V),b()},D),T=null}"onloadend"in T?T.onloadend=v:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.startsWith("file:"))||setTimeout(v)},T.onabort=function(){T&&(i(new $e("Request aborted",$e.ECONNABORTED,r,T)),b(),T=null)},T.onerror=function(k){const D=k&&k.message?k.message:"Network Error",O=new $e(D,$e.ERR_NETWORK,r,T);O.event=k||null,i(O),b(),T=null},T.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const D=s.transitional||fP;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),i(new $e(k,D.clarifyTimeoutError?$e.ETIMEDOUT:$e.ECONNABORTED,r,T)),b(),T=null},n===void 0&&a.setContentType(null),"setRequestHeader"in T&&ue.forEach(qV(a),function(k,D){T.setRequestHeader(D,k)}),ue.isUndefined(s.withCredentials)||(T.withCredentials=!!s.withCredentials),l&&l!=="json"&&(T.responseType=s.responseType),d&&([y,E]=yA(d,!0),T.addEventListener("progress",y)),c&&T.upload&&([m,g]=yA(c),T.upload.addEventListener("progress",m),T.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(f=x=>{T&&(i(!x||x.type?new Qh(null,r,T):x),T.abort(),b(),T=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const C=Eae(s.url);if(C&&!Yr.protocols.includes(C)){i(new $e("Unsupported protocol "+C+":",$e.ERR_BAD_REQUEST,r)),b();return}T.send(n||null)})},Fae=(r,t)=>{if(r=r?r.filter(Boolean):[],!t&&!r.length)return;const e=new AbortController;let i=!1;const s=function(c){if(!i){i=!0,a();const d=c instanceof Error?c:this.reason;e.abort(d instanceof $e?d:new Qh(d instanceof Error?d.message:d))}};let n=t&&setTimeout(()=>{n=null,s(new $e(`timeout of ${t}ms exceeded`,$e.ETIMEDOUT))},t);const a=()=>{r&&(n&&clearTimeout(n),n=null,r.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),r=null)};r.forEach(c=>c.addEventListener("abort",s,{once:!0}));const{signal:l}=e;return l.unsubscribe=()=>ue.asap(a),l},$ae=function*(r,t){let e=r.byteLength;if(e<t){yield r;return}let i=0,s;for(;i<e;)s=i+t,yield r.slice(i,s),i=s},jae=async function*(r,t){for await(const e of Uae(r))yield*$ae(e,t)},Uae=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const t=r.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},WR=(r,t,e,i)=>{const s=jae(r,t);let n=0,a,l=c=>{a||(a=!0,i&&i(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await s.next();if(d){l(),c.close();return}let m=f.byteLength;if(e){let y=n+=m;e(y)}c.enqueue(new Uint8Array(f))}catch(d){throw l(d),d}},cancel(c){return l(c),s.return()}},{highWaterMark:2})},gA=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,Vae=(r,t,e)=>t+2<e&&gA(r.charCodeAt(t+1))&&gA(r.charCodeAt(t+2));function qae(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;const t=r.indexOf(",");if(t<0)return 0;const e=r.slice(5,t),i=r.slice(t+1);if(/;base64/i.test(e)){let a=i.length;const l=i.length;for(let g=0;g<l;g++)if(i.charCodeAt(g)===37&&g+2<l){const E=i.charCodeAt(g+1),b=i.charCodeAt(g+2);gA(E)&&gA(b)&&(a-=2,g+=2)}let c=0,d=l-1;const f=g=>g>=2&&i.charCodeAt(g-2)===37&&i.charCodeAt(g-1)===51&&(i.charCodeAt(g)===68||i.charCodeAt(g)===100);d>=0&&(i.charCodeAt(d)===61?(c++,d--):f(d)&&(c++,d-=3)),c===1&&d>=0&&(i.charCodeAt(d)===61||f(d))&&c++;const y=Math.floor(a/4)*3-(c||0);return y>0?y:0}let n=0;for(let a=0,l=i.length;a<l;a++){const c=i.charCodeAt(a);if(c===37&&Vae(i,a,l))n+=1,a+=2;else if(c<128)n+=1;else if(c<2048)n+=2;else if(c>=55296&&c<=56319&&a+1<l){const d=i.charCodeAt(a+1);d>=56320&&d<=57343?(n+=4,a++):n+=3}else n+=3}return n}const mP="1.18.1",GR=64*1024,{isFunction:$y}=ue,Kae=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))),JR=r=>{if(!ue.isString(r))return r;try{return decodeURIComponent(r)}catch{return r}},YR=(r,...t)=>{try{return!!r(...t)}catch{return!1}},zae=r=>{const t=r.indexOf("://");let e=r;return t!==-1&&(e=e.slice(t+3)),e.includes("@")||e.includes(":")},Hae=r=>{const t=ue.global!==void 0&&ue.global!==null?ue.global:globalThis,{ReadableStream:e,TextEncoder:i}=t;r=ue.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},r);const{fetch:s,Request:n,Response:a}=r,l=s?$y(s):typeof fetch=="function",c=$y(n),d=$y(a);if(!l)return!1;const f=l&&$y(e),m=l&&(typeof i=="function"?(v=>C=>v.encode(C))(new i):async v=>new Uint8Array(await new n(v).arrayBuffer())),y=c&&f&&YR(()=>{let v=!1;const C=new n(Yr.origin,{body:new e,method:"POST",get duplex(){return v=!0,"half"}}),x=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),v&&!x}),g=d&&f&&YR(()=>ue.isReadableStream(new a("").body)),E={stream:g&&(v=>v.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!E[v]&&(E[v]=(C,x)=>{let k=C&&C[v];if(k)return k.call(C);throw new $e(`Response type '${v}' is not supported`,$e.ERR_NOT_SUPPORT,x)})});const b=async v=>{if(v==null)return 0;if(ue.isBlob(v))return v.size;if(ue.isSpecCompliantForm(v))return(await new n(Yr.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(v)||ue.isArrayBuffer(v))return v.byteLength;if(ue.isURLSearchParams(v)&&(v=v+""),ue.isString(v))return(await m(v)).byteLength},T=async(v,C)=>{const x=ue.toFiniteNumber(v.getContentLength());return x??b(C)};return async v=>{let{url:C,method:x,data:k,signal:D,cancelToken:O,timeout:V,onDownloadProgress:F,onUploadProgress:L,responseType:H,headers:z,withCredentials:ie="same-origin",fetchOptions:ae,maxContentLength:fe,maxBodyLength:ne}=e4(v);const le=ue.isNumber(fe)&&fe>-1,Ee=ue.isNumber(ne)&&ne>-1,ge=Ie=>ue.hasOwnProp(v,Ie)?v[Ie]:void 0;let we=s||fetch;H=H?(H+"").toLowerCase():"text";let De=Fae([D,O&&O.toAbortSignal()],V),he=null;const se=De&&De.unsubscribe&&(()=>{De.unsubscribe()});let re,Te=null;const oe=()=>new $e("Request body larger than maxBodyLength limit",$e.ERR_BAD_REQUEST,v,he);try{let Ie;const pe=ge("auth");if(pe){const je=ue.getSafeProp(pe,"username")||"",Xe=ue.getSafeProp(pe,"password")||"";Ie={username:je,password:Xe}}if(zae(C)){const je=new URL(C,Yr.origin);if(!Ie&&(je.username||je.password)){const Xe=JR(je.username),St=JR(je.password);Ie={username:Xe,password:St}}(je.username||je.password)&&(je.username="",je.password="",C=je.href)}if(Ie&&(z.delete("authorization"),z.set("Authorization","Basic "+btoa(Kae((Ie.username||"")+":"+(Ie.password||""))))),le&&typeof C=="string"&&C.startsWith("data:")&&qae(C)>fe)throw new $e("maxContentLength size of "+fe+" exceeded",$e.ERR_BAD_RESPONSE,v,he);if(Ee&&x!=="get"&&x!=="head"){const je=await b(k);if(typeof je=="number"&&isFinite(je)&&(re=je,je>ne))throw oe()}const Se=Ee&&(ue.isReadableStream(k)||ue.isStream(k)),qe=(je,Xe,St)=>WR(je,GR,gt=>{if(Ee&&gt>ne)throw Te=oe();Xe&&Xe(gt)},St);if(y&&x!=="get"&&x!=="head"&&(L||Se)){if(re=re??await T(z,k),re!==0||Se){let je=new n(C,{method:"POST",body:k,duplex:"half"}),Xe;if(ue.isFormData(k)&&(Xe=je.headers.get("content-type"))&&z.setContentType(Xe),je.body){const[St,gt]=L&&qR(re,yA(KR(L)))||[];k=qe(je.body,St,gt)}}}else if(Se&&!c&&f&&x!=="get"&&x!=="head")k=qe(k);else if(Se&&c&&!y&&x!=="get"&&x!=="head")throw new $e("Stream request bodies are not supported by the current fetch implementation",$e.ERR_NOT_SUPPORT,v,he);ue.isString(ie)||(ie=ie?"include":"omit");const Pe=c&&"credentials"in n.prototype;if(ue.isFormData(k)){const je=z.getContentType();je&&/^multipart\/form-data/i.test(je)&&!/boundary=/i.test(je)&&z.delete("content-type")}z.set("User-Agent","axios/"+mP,!1);const at={...ae,signal:De,method:x.toUpperCase(),headers:qV(z.normalize()),body:k,duplex:"half",credentials:Pe?ie:void 0};he=c&&new n(C,at);let Re=await(c?we(he,ae):we(C,at));const Ye=oi.from(Re.headers);if(le){const je=ue.toFiniteNumber(Ye.getContentLength());if(je!=null&&je>fe)throw new $e("maxContentLength size of "+fe+" exceeded",$e.ERR_BAD_RESPONSE,v,he)}const ut=g&&(H==="stream"||H==="response");if(g&&Re.body&&(F||le||ut&&se)){const je={};["status","statusText","headers"].forEach(ar=>{je[ar]=Re[ar]});const Xe=ue.toFiniteNumber(Ye.getContentLength()),[St,gt]=F&&qR(Xe,yA(KR(F),!0))||[];let nr=0;const Dr=ar=>{if(le&&(nr=ar,nr>fe))throw new $e("maxContentLength size of "+fe+" exceeded",$e.ERR_BAD_RESPONSE,v,he);St&&St(ar)};Re=new a(WR(Re.body,GR,Dr,()=>{gt&&gt(),se&&se()}),je)}H=H||"text";let Ge=await E[ue.findKey(E,H)||"text"](Re,v);if(le&&!g&&!ut){let je;if(Ge!=null&&(typeof Ge.byteLength=="number"?je=Ge.byteLength:typeof Ge.size=="number"?je=Ge.size:typeof Ge=="string"&&(je=typeof i=="function"?new i().encode(Ge).byteLength:Ge.length)),typeof je=="number"&&je>fe)throw new $e("maxContentLength size of "+fe+" exceeded",$e.ERR_BAD_RESPONSE,v,he)}return!ut&&se&&se(),await new Promise((je,Xe)=>{XV(je,Xe,{data:Ge,headers:oi.from(Re.headers),status:Re.status,statusText:Re.statusText,config:v,request:he})})}catch(Ie){if(se&&se(),De&&De.aborted&&De.reason instanceof $e){const pe=De.reason;throw pe.config=v,he&&(pe.request=he),Ie!==pe&&Object.defineProperty(pe,"cause",{__proto__:null,value:Ie,writable:!0,enumerable:!1,configurable:!0}),pe}if(Te)throw he&&!Te.request&&(Te.request=he),Te;if(Ie instanceof $e)throw he&&!Ie.request&&(Ie.request=he),Ie;if(Ie&&Ie.name==="TypeError"&&/Load failed|fetch/i.test(Ie.message)){const pe=new $e("Network Error",$e.ERR_NETWORK,v,he,Ie&&Ie.response);throw Object.defineProperty(pe,"cause",{__proto__:null,value:Ie.cause||Ie,writable:!0,enumerable:!1,configurable:!0}),pe}throw $e.from(Ie,Ie&&Ie.code,v,he,Ie&&Ie.response)}}},Wae=new Map,t4=r=>{let t=r&&r.env||{};const{fetch:e,Request:i,Response:s}=t,n=[i,s,e];let a=n.length,l=a,c,d,f=Wae;for(;l--;)c=n[l],d=f.get(c),d===void 0&&f.set(c,d=l?new Map:Hae(t)),f=d;return d};t4();const yP={http:aae,xhr:Lae,fetch:{get:t4}};ue.forEach(yP,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(r,"adapterName",{__proto__:null,value:t})}});const QR=r=>`- ${r}`,Gae=r=>ue.isFunction(r)||r===null||r===!1;function Jae(r,t){r=ue.isArray(r)?r:[r];const{length:e}=r;let i,s;const n={};for(let a=0;a<e;a++){i=r[a];let l;if(s=i,!Gae(i)&&(s=yP[(l=String(i)).toLowerCase()],s===void 0))throw new $e(`Unknown adapter '${l}'`);if(s&&(ue.isFunction(s)||(s=s.get(t))))break;n[l||"#"+a]=s}if(!s){const a=Object.entries(n).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=e?a.length>1?`since :
361
361
  `+a.map(QR).join(`
@@ -746,7 +746,7 @@ ${d}`)}return{..._P(a),source:a,changed:a!==r}}catch(e){return PB(r,`Не уда
746
746
  property: field(String),
747
747
  })`,detail:"Anonymous inline object type expression"},{label:"recordOf",kind:"function",insertText:`recordOf(objectOf({
748
748
  property: field(String),
749
- }))`,detail:"String-keyed dictionary type expression"},{label:"description",kind:"function",insertText:".description('')",detail:"Field description"},{label:"optional",kind:"function",insertText:".optional()",detail:"Optional field"},{label:"array",kind:"function",insertText:".array()",detail:"Array field"},{label:"min",kind:"function",insertText:".min(0)",detail:"Minimum Number value"},{label:"max",kind:"function",insertText:".max(1)",detail:"Maximum Number value"},{label:"example",kind:"function",insertText:".example(null)",detail:"Static JSON example"}];class Tue{constructor(){R(this,"id","source:configuration");R(this,"sourceKind","configuration")}supports(t){return t===this.sourceKind}compile(t){const e=LS(t),i=!e.diagnostics.some(s=>s.severity==="error");return{ok:i,ast:e.ast??void 0,document:e.document??void 0,artifact:e.document??void 0,diagnostics:e.diagnostics,message:i?void 0:"Configuration source contains compilation errors."}}}class wue{constructor(){R(this,"id","source-language:configuration");R(this,"sourceKind","configuration");R(this,"syntax",vs({alias:"Endge Configuration Source",extension:".endge-config.ts",keywords:["defineConfig","value","objectOf","recordOf","enumOf","unionOf","arrayOf"],functions:["label","description","min","max","step"]}))}supports(t){return t===this.sourceKind}createDefaultSource(){return oA}validate(t,e){const i=((e==null?void 0:e.typeSymbols)??[]).map((a,l)=>({id:l,identity:a.identity,displayName:a.displayName??a.identity,category:a.category??"user",sourceVersion:1,definition:a.definition??null,entityReference:a.entityReference,status:"valid"})),s=LS(t,i),n=!s.diagnostics.some(a=>a.severity==="error");return{ok:n,diagnostics:s.diagnostics,message:n?void 0:"Configuration source contains validation errors."}}completions(t){const e=(t.typeSymbols??[]).map(i=>({label:i.identity,kind:"value",insertText:i.identity,detail:`${i.category??"user"} configuration type`,documentation:i.displayName}));return[...xue,...e]}resolveReference(t){return bue(t)}semanticHighlights(t){return gP(t,W4(t.source))}}const xue=[{label:"defineConfig",kind:"snippet",insertText:oA.trimEnd(),detail:"Configuration category"},{label:"value",kind:"snippet",insertText:"value(String, '')",detail:"Typed configuration value"},{label:"TriggerSet",kind:"value",insertText:"TriggerSet",detail:"Interaction trigger array"},{label:"JSON",kind:"value",insertText:"JSON",detail:"Any JSON value"},{label:"label",kind:"function",insertText:".label('')",detail:"Editor label"},{label:"description",kind:"function",insertText:".description('')",detail:"Editor description"},{label:"min",kind:"function",insertText:".min(0)",detail:"Minimum Number value"},{label:"max",kind:"function",insertText:".max(100)",detail:"Maximum Number value"},{label:"step",kind:"function",insertText:".step(1)",detail:"Number editor step"}];class _ue{constructor(){R(this,"id","source:action");R(this,"sourceKind","action")}supports(t){return t===this.sourceKind}compile(t){const e=rI({source:t}),i=!e.diagnostics.some(s=>s.severity==="error");return{ok:i,document:e.payload.sourceDocument??void 0,artifact:e.payload,diagnostics:e.diagnostics,message:i?void 0:"Action source contains compilation errors."}}}const FB=`defineAction({
749
+ }))`,detail:"String-keyed dictionary type expression"},{label:"description",kind:"function",insertText:".description('')",detail:"Field description"},{label:"optional",kind:"function",insertText:".optional()",detail:"Optional field"},{label:"array",kind:"function",insertText:".array()",detail:"Array field"},{label:"min",kind:"function",insertText:".min(0)",detail:"Minimum Number value"},{label:"max",kind:"function",insertText:".max(1)",detail:"Maximum Number value"},{label:"example",kind:"function",insertText:".example(null)",detail:"Static JSON example"}];class Tue{constructor(){R(this,"id","source:configuration");R(this,"sourceKind","configuration")}supports(t){return t===this.sourceKind}compile(t){const e=LS(t),i=!e.diagnostics.some(s=>s.severity==="error");return{ok:i,ast:e.ast??void 0,document:e.document??void 0,artifact:e.document??void 0,diagnostics:e.diagnostics,message:i?void 0:"Configuration source contains compilation errors."}}}class wue{constructor(){R(this,"id","source-language:configuration");R(this,"sourceKind","configuration");R(this,"syntax",vs({alias:"Endge Configuration Source",extension:".endge-config.ts",keywords:["defineConfig","value","objectOf","recordOf","enumOf","unionOf","arrayOf"],functions:["label","description","min","max","step"]}))}supports(t){return t===this.sourceKind}createDefaultSource(){return oA}validate(t,e){const i=((e==null?void 0:e.typeSymbols)??[]).map((a,l)=>({id:l,identity:a.identity,displayName:a.displayName??a.identity,category:a.category??"user",sourceVersion:1,definition:a.definition??null,entityReference:a.entityReference,status:"valid"})),s=LS(t,i),n=!s.diagnostics.some(a=>a.severity==="error");return{ok:n,diagnostics:s.diagnostics,message:n?void 0:"Configuration source contains validation errors."}}completions(t){const e=(t.typeSymbols??[]).map(i=>({label:i.identity,kind:"value",insertText:i.identity,detail:`${i.category??"user"} configuration type`,documentation:i.displayName}));return[...xue,...e]}resolveReference(t){return bue(t)}semanticHighlights(t){return gP(t,W4(t.source))}}const xue=[{label:"defineConfig",kind:"snippet",insertText:oA.trimEnd(),detail:"Configuration category"},{label:"value",kind:"snippet",insertText:"value(String, '')",detail:"Typed configuration value"},{label:"TriggerSet",kind:"value",insertText:"TriggerSet",detail:"Interaction trigger array"},{label:"JSON",kind:"value",insertText:"JSON",detail:"Any JSON value"},{label:"label",kind:"function",insertText:".label('')",detail:"Editor label"},{label:"description",kind:"function",insertText:".description('')",detail:"Editor description"},{label:"min",kind:"function",insertText:".min(0)",detail:"Minimum Number value"},{label:"max",kind:"function",insertText:".max(100)",detail:"Maximum Number value"},{label:"step",kind:"function",insertText:".step(1)",detail:"Number editor step"}];class _ue{constructor(){R(this,"id","source:action");R(this,"sourceKind","action")}supports(t){return t===this.sourceKind}compile(t){const e=rI({source:t}),i=!e.diagnostics.some(s=>s.severity==="error");return{ok:i,document:e.payload.sourceDocument??void 0,artifact:e.payload,diagnostics:e.diagnostics,dependencies:e.dependencies,message:i?void 0:"Action source contains compilation errors."}}}const FB=`defineAction({
750
750
  contract: {
751
751
  input: field('Object'),
752
752
  output: field('Object'),
package/dist/core.js CHANGED
@@ -83772,13 +83772,13 @@ class vse {
83772
83772
  }
83773
83773
  /** Минимальные built-in converters для preview v1. */
83774
83774
  _convert(t, e, i) {
83775
- if (G.isConfigured ? G.domain.getConverter(t) : null) return G.converters.execute(t, e, i);
83775
+ if (G.converters.has(t)) return G.converters.execute(t, e, i);
83776
83776
  if (t === "date.iso_to_time") {
83777
- const n = new Date(String(e ?? ""));
83778
- if (Number.isNaN(n.getTime()))
83777
+ const s = new Date(String(e ?? ""));
83778
+ if (Number.isNaN(s.getTime()))
83779
83779
  return e;
83780
- const a = String(n.getUTCHours()).padStart(2, "0"), l = String(n.getUTCMinutes()).padStart(2, "0");
83781
- return String((i == null ? void 0 : i.format) ?? "HH:mm") === "HH:mm" ? `${a}:${l}` : n.toISOString();
83780
+ const n = String(s.getUTCHours()).padStart(2, "0"), a = String(s.getUTCMinutes()).padStart(2, "0");
83781
+ return String((i == null ? void 0 : i.format) ?? "HH:mm") === "HH:mm" ? `${n}:${a}` : s.toISOString();
83782
83782
  }
83783
83783
  return e;
83784
83784
  }
@@ -93816,7 +93816,14 @@ class rue {
93816
93816
  }
93817
93817
  compile(t) {
93818
93818
  const e = bI({ source: t }), i = !e.diagnostics.some((s) => s.severity === "error");
93819
- return { ok: i, document: e.payload.sourceDocument ?? void 0, artifact: e.payload, diagnostics: e.diagnostics, message: i ? void 0 : "Action source contains compilation errors." };
93819
+ return {
93820
+ ok: i,
93821
+ document: e.payload.sourceDocument ?? void 0,
93822
+ artifact: e.payload,
93823
+ diagnostics: e.diagnostics,
93824
+ dependencies: e.dependencies,
93825
+ message: i ? void 0 : "Action source contains compilation errors."
93826
+ };
93820
93827
  }
93821
93828
  }
93822
93829
  const HR = `defineAction({
@@ -144,6 +144,8 @@ export interface SourceEngineCompileResult extends SourceEngineResult {
144
144
  metadata?: import('../program/program-metadata.types').ProgramMetadataMap;
145
145
  /** Diagnostics, найденные source compiler-ом. */
146
146
  diagnostics?: unknown[];
147
+ /** Static Program dependencies discovered by the source compiler. */
148
+ dependencies?: import('../program/program.types').ProgramDependency[];
147
149
  }
148
150
  /** Результат parse source без обязательной runtime-компиляции. */
149
151
  export interface SourceParseResult<TDocument = unknown> extends SourceEngineResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endge/core",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",