Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@unique-nft/sdk

Package Overview
Dependencies
Maintainers
5
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unique-nft/sdk - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

6

bundles/index.js
var UniqueSdk = (function () {
'use strict';
var lr=Object.create;var Y=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var dr=Object.getPrototypeOf,fr=Object.prototype.hasOwnProperty;var mr=(r,e,t)=>e in r?Y(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var s=(r,e)=>Y(r,"name",{value:e,configurable:!0});var f=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var yr=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pr(e))!fr.call(r,n)&&n!==t&&Y(r,n,{get:()=>e[n],enumerable:!(i=hr(e,n))||i.enumerable});return r};var $e=(r,e,t)=>(t=r!=null?lr(dr(r)):{},yr(e||!r||!r.__esModule?Y(t,"default",{value:r,enumerable:!0}):t,r));var o=(r,e,t)=>(mr(r,typeof e!="symbol"?e+"":e,t),t);var pe=f((Ps,Ie)=>{Ie.exports=s(function(e,t){return s(function(){for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];return e.apply(t,n)},"wrap")},"bind");});var w=f((gs,He)=>{var wr=pe(),fe=Object.prototype.toString,me=function(r){return function(e){var t=fe.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())}}(Object.create(null));function C(r){return r=r.toLowerCase(),s(function(t){return me(t)===r},"isKindOf")}s(C,"kindOfTest");function ye(r){return Array.isArray(r)}s(ye,"isArray");function ee(r){return typeof r>"u"}s(ee,"isUndefined");function xr(r){return r!==null&&!ee(r)&&r.constructor!==null&&!ee(r.constructor)&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}s(xr,"isBuffer");var Me=C("ArrayBuffer");function br(r){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&Me(r.buffer),e}s(br,"isArrayBufferView");function Er(r){return typeof r=="string"}s(Er,"isString");function Tr(r){return typeof r=="number"}s(Tr,"isNumber");function We(r){return r!==null&&typeof r=="object"}s(We,"isObject");function Z(r){if(me(r)!=="object")return !1;var e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}s(Z,"isPlainObject");var vr=C("Date"),qr=C("File"),Sr=C("Blob"),Or=C("FileList");function we(r){return fe.call(r)==="[object Function]"}s(we,"isFunction");function Rr(r){return We(r)&&we(r.pipe)}s(Rr,"isStream");function Pr(r){var e="[object FormData]";return r&&(typeof FormData=="function"&&r instanceof FormData||fe.call(r)===e||we(r.toString)&&r.toString()===e)}s(Pr,"isFormData");var Ar=C("URLSearchParams");function gr(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}s(gr,"trim");function Cr(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}s(Cr,"isStandardBrowserEnv");function xe(r,e){if(!(r===null||typeof r>"u"))if(typeof r!="object"&&(r=[r]),ye(r))for(var t=0,i=r.length;t<i;t++)e.call(null,r[t],t,r);else for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.call(null,r[n],n,r);}s(xe,"forEach");function de(){var r={};function e(n,a){Z(r[a])&&Z(n)?r[a]=de(r[a],n):Z(n)?r[a]=de({},n):ye(n)?r[a]=n.slice():r[a]=n;}s(e,"assignValue");for(var t=0,i=arguments.length;t<i;t++)xe(arguments[t],e);return r}s(de,"merge");function Ur(r,e,t){return xe(e,s(function(n,a){t&&typeof n=="function"?r[a]=wr(n,t):r[a]=n;},"assignValue")),r}s(Ur,"extend");function Nr(r){return r.charCodeAt(0)===65279&&(r=r.slice(1)),r}s(Nr,"stripBOM");function kr(r,e,t,i){r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,t&&Object.assign(r.prototype,t);}s(kr,"inherits");function Dr(r,e,t){var i,n,a,u={};e=e||{};do{for(i=Object.getOwnPropertyNames(r),n=i.length;n-- >0;)a=i[n],u[a]||(e[a]=r[a],u[a]=!0);r=Object.getPrototypeOf(r);}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e}s(Dr,"toFlatObject");function Lr(r,e,t){r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;var i=r.indexOf(e,t);return i!==-1&&i===t}s(Lr,"endsWith");function Br(r){if(!r)return null;var e=r.length;if(ee(e))return null;for(var t=new Array(e);e-- >0;)t[e]=r[e];return t}s(Br,"toArray");var Fr=function(r){return function(e){return r&&e instanceof r}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));He.exports={isArray:ye,isArrayBuffer:Me,isBuffer:xr,isFormData:Pr,isArrayBufferView:br,isString:Er,isNumber:Tr,isObject:We,isPlainObject:Z,isUndefined:ee,isDate:vr,isFile:qr,isBlob:Sr,isFunction:we,isStream:Rr,isURLSearchParams:Ar,isStandardBrowserEnv:Cr,forEach:xe,merge:de,extend:Ur,trim:gr,stripBOM:Nr,inherits:kr,toFlatObject:Dr,kindOf:me,kindOfTest:C,endsWith:Lr,toArray:Br,isTypedArray:Fr,isFileList:Or};});var be=f((Us,ze)=>{var k=w();function Je(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}s(Je,"encode");ze.exports=s(function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(k.isURLSearchParams(t))n=t.toString();else {var a=[];k.forEach(t,s(function(d,b){d===null||typeof d>"u"||(k.isArray(d)?b=b+"[]":d=[d],k.forEach(d,s(function(m){k.isDate(m)?m=m.toISOString():k.isObject(m)&&(m=JSON.stringify(m)),a.push(Je(b)+"="+Je(m));},"parseValue")));},"serialize")),n=a.join("&");}if(n){var u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+n;}return e},"buildURL");});var Ge=f((ks,Ve)=>{var _r=w();function te(){this.handlers=[];}s(te,"InterceptorManager");te.prototype.use=s(function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1},"use");te.prototype.eject=s(function(e){this.handlers[e]&&(this.handlers[e]=null);},"eject");te.prototype.forEach=s(function(e){_r.forEach(this.handlers,s(function(i){i!==null&&e(i);},"forEachHandler"));},"forEach");Ve.exports=te;});var Qe=f((Ls,Ke)=>{var jr=w();Ke.exports=s(function(e,t){jr.forEach(e,s(function(n,a){a!==t&&a.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[a]);},"processHeader"));},"normalizeHeaderName");});var U=f((Fs,et)=>{var Xe=w();function D(r,e,t,i,n){Error.call(this),this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),n&&(this.response=n);}s(D,"AxiosError");Xe.inherits(D,Error,{toJSON:s(function(){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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var Ye=D.prototype,Ze={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(r){Ze[r]={value:r};});Object.defineProperties(D,Ze);Object.defineProperty(Ye,"isAxiosError",{value:!0});D.from=function(r,e,t,i,n,a){var u=Object.create(Ye);return Xe.toFlatObject(r,u,s(function(d){return d!==Error.prototype},"filter")),D.call(u,r.message,e,t,i,n),u.name=r.name,a&&Object.assign(u,a),u};et.exports=D;});var Ee=f((js,tt)=>{tt.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};});var Te=f(($s,rt)=>{var O=w();function $r(r,e){e=e||new FormData;var t=[];function i(a){return a===null?"":O.isDate(a)?a.toISOString():O.isArrayBuffer(a)||O.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}s(i,"convertValue");function n(a,u){if(O.isPlainObject(a)||O.isArray(a)){if(t.indexOf(a)!==-1)throw Error("Circular reference detected in "+u);t.push(a),O.forEach(a,s(function(d,b){if(!O.isUndefined(d)){var c=u?u+"."+b:b,m;if(d&&!u&&typeof d=="object"){if(O.endsWith(b,"{}"))d=JSON.stringify(d);else if(O.endsWith(b,"[]")&&(m=O.toArray(d))){m.forEach(function(v){!O.isUndefined(v)&&e.append(c,i(v));});return}}n(d,c);}},"each")),t.pop();}else e.append(u,i(a));}return s(n,"build"),n(r),e}s($r,"toFormData");rt.exports=$r;});var it=f((Ms,st)=>{var ve=U();st.exports=s(function(e,t,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):t(new ve("Request failed with status code "+i.status,[ve.ERR_BAD_REQUEST,ve.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i));},"settle");});var ot=f((Hs,nt)=>{var re=w();nt.exports=re.isStandardBrowserEnv()?s(function(){return {write:s(function(t,i,n,a,u,h){var d=[];d.push(t+"="+encodeURIComponent(i)),re.isNumber(n)&&d.push("expires="+new Date(n).toGMTString()),re.isString(a)&&d.push("path="+a),re.isString(u)&&d.push("domain="+u),h===!0&&d.push("secure"),document.cookie=d.join("; ");},"write"),read:s(function(t){var i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},"read"),remove:s(function(t){this.write(t,"",Date.now()-864e5);},"remove")}},"standardBrowserEnv")():s(function(){return {write:s(function(){},"write"),read:s(function(){return null},"read"),remove:s(function(){},"remove")}},"nonStandardBrowserEnv")();});var ut=f((zs,at)=>{at.exports=s(function(e){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},"isAbsoluteURL");});var lt=f((Gs,ct)=>{ct.exports=s(function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},"combineURLs");});var qe=f((Qs,ht)=>{var Ir=ut(),Mr=lt();ht.exports=s(function(e,t){return e&&!Ir(t)?Mr(e,t):t},"buildFullPath");});var dt=f((Ys,pt)=>{var Se=w(),Wr=["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"];pt.exports=s(function(e){var t={},i,n,a;return e&&Se.forEach(e.split(`
`),s(function(h){if(a=h.indexOf(":"),i=Se.trim(h.substr(0,a)).toLowerCase(),n=Se.trim(h.substr(a+1)),i){if(t[i]&&Wr.indexOf(i)>=0)return;i==="set-cookie"?t[i]=(t[i]?t[i]:[]).concat([n]):t[i]=t[i]?t[i]+", "+n:n;}},"parser")),t},"parseHeaders");});var yt=f((ei,mt)=>{var ft=w();mt.exports=ft.isStandardBrowserEnv()?s(function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),i;function n(a){var u=a;return e&&(t.setAttribute("href",u),u=t.href),t.setAttribute("href",u),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return s(n,"resolveURL"),i=n(window.location.href),s(function(u){var h=ft.isString(u)?n(u):u;return h.protocol===i.protocol&&h.host===i.host},"isURLSameOrigin")},"standardBrowserEnv")():s(function(){return s(function(){return !0},"isURLSameOrigin")},"nonStandardBrowserEnv")();});var J=f((ri,xt)=>{var Oe=U(),Hr=w();function wt(r){Oe.call(this,r??"canceled",Oe.ERR_CANCELED),this.name="CanceledError";}s(wt,"CanceledError");Hr.inherits(wt,Oe,{__CANCEL__:!0});xt.exports=wt;});var Et=f((ii,bt)=>{bt.exports=s(function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""},"parseProtocol");});var Re=f((oi,Tt)=>{var z=w(),Jr=it(),zr=ot(),Vr=be(),Gr=qe(),Kr=dt(),Qr=yt(),Xr=Ee(),R=U(),Yr=J(),Zr=Et();Tt.exports=s(function(e){return new Promise(s(function(i,n){var a=e.data,u=e.headers,h=e.responseType,d;function b(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d);}s(b,"done"),z.isFormData(a)&&z.isStandardBrowserEnv()&&delete u["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";u.Authorization="Basic "+btoa(m+":"+v);}var E=Gr(e.baseURL,e.url);c.open(e.method.toUpperCase(),Vr(E,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function _e(){if(c){var S="getAllResponseHeaders"in c?Kr(c.getAllResponseHeaders()):null,N=!h||h==="text"||h==="json"?c.responseText:c.response,g={data:N,status:c.status,statusText:c.statusText,headers:S,config:e,request:c};Jr(s(function(he){i(he),b();},"_resolve"),s(function(he){n(he),b();},"_reject"),g),c=null;}}if(s(_e,"onloadend"),"onloadend"in c?c.onloadend=_e:c.onreadystatechange=s(function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(_e);},"handleLoad"),c.onabort=s(function(){c&&(n(new R("Request aborted",R.ECONNABORTED,e,c)),c=null);},"handleAbort"),c.onerror=s(function(){n(new R("Network Error",R.ERR_NETWORK,e,c,c)),c=null;},"handleError"),c.ontimeout=s(function(){var N=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",g=e.transitional||Xr;e.timeoutErrorMessage&&(N=e.timeoutErrorMessage),n(new R(N,g.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,c)),c=null;},"handleTimeout"),z.isStandardBrowserEnv()){var je=(e.withCredentials||Qr(E))&&e.xsrfCookieName?zr.read(e.xsrfCookieName):void 0;je&&(u[e.xsrfHeaderName]=je);}"setRequestHeader"in c&&z.forEach(u,s(function(N,g){typeof a>"u"&&g.toLowerCase()==="content-type"?delete u[g]:c.setRequestHeader(g,N);},"setRequestHeader")),z.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),h&&h!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=s(function(S){c&&(n(!S||S&&S.type?new Yr:S),c.abort(),c=null);},"onCanceled"),e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),a||(a=null);var le=Zr(E);if(le&&["http","https","file"].indexOf(le)===-1){n(new R("Unsupported protocol "+le+":",R.ERR_BAD_REQUEST,e));return}c.send(a);},"dispatchXhrRequest"))},"xhrAdapter");});var qt=f((ui,vt)=>{vt.exports=null;});var ie=f((ci,Pt)=>{var x=w(),St=Qe(),Ot=U(),es=Ee(),ts=Te(),rs={"Content-Type":"application/x-www-form-urlencoded"};function Rt(r,e){!x.isUndefined(r)&&x.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e);}s(Rt,"setContentTypeIfUnset");function ss(){var r;return typeof XMLHttpRequest<"u"?r=Re():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(r=Re()),r}s(ss,"getDefaultAdapter");function is(r,e,t){if(x.isString(r))try{return (e||JSON.parse)(r),x.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return (t||JSON.stringify)(r)}s(is,"stringifySafely");var se={transitional:es,adapter:ss(),transformRequest:[s(function(e,t){if(St(t,"Accept"),St(t,"Content-Type"),x.isFormData(e)||x.isArrayBuffer(e)||x.isBuffer(e)||x.isStream(e)||x.isFile(e)||x.isBlob(e))return e;if(x.isArrayBufferView(e))return e.buffer;if(x.isURLSearchParams(e))return Rt(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var i=x.isObject(e),n=t&&t["Content-Type"],a;if((a=x.isFileList(e))||i&&n==="multipart/form-data"){var u=this.env&&this.env.FormData;return ts(a?{"files[]":e}:e,u&&new u)}else if(i||n==="application/json")return Rt(t,"application/json"),is(e);return e},"transformRequest")],transformResponse:[s(function(e){var t=this.transitional||se.transitional,i=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,a=!i&&this.responseType==="json";if(a||n&&x.isString(e)&&e.length)try{return JSON.parse(e)}catch(u){if(a)throw u.name==="SyntaxError"?Ot.from(u,Ot.ERR_BAD_RESPONSE,this,null,this.response):u}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qt()},validateStatus:s(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*"}}};x.forEach(["delete","get","head"],s(function(e){se.headers[e]={};},"forEachMethodNoData"));x.forEach(["post","put","patch"],s(function(e){se.headers[e]=x.merge(rs);},"forEachMethodWithData"));Pt.exports=se;});var gt=f((hi,At)=>{var ns=w(),os=ie();At.exports=s(function(e,t,i){var n=this||os;return ns.forEach(i,s(function(u){e=u.call(n,e,t);},"transform")),e},"transformData");});var Pe=f((di,Ct)=>{Ct.exports=s(function(e){return !!(e&&e.__CANCEL__)},"isCancel");});var kt=f((mi,Nt)=>{var Ut=w(),Ae=gt(),as=Pe(),us=ie(),cs=J();function ge(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new cs}s(ge,"throwIfCancellationRequested");Nt.exports=s(function(e){ge(e),e.headers=e.headers||{},e.data=Ae.call(e,e.data,e.headers,e.transformRequest),e.headers=Ut.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Ut.forEach(["delete","get","head","post","put","patch","common"],s(function(n){delete e.headers[n];},"cleanHeaderConfig"));var t=e.adapter||us.adapter;return t(e).then(s(function(n){return ge(e),n.data=Ae.call(e,n.data,n.headers,e.transformResponse),n},"onAdapterResolution"),s(function(n){return as(n)||(ge(e),n&&n.response&&(n.response.data=Ae.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)},"onAdapterRejection"))},"dispatchRequest");});var Ce=f((wi,Dt)=>{var q=w();Dt.exports=s(function(e,t){t=t||{};var i={};function n(c,m){return q.isPlainObject(c)&&q.isPlainObject(m)?q.merge(c,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}s(n,"getMergedValue");function a(c){if(q.isUndefined(t[c])){if(!q.isUndefined(e[c]))return n(void 0,e[c])}else return n(e[c],t[c])}s(a,"mergeDeepProperties");function u(c){if(!q.isUndefined(t[c]))return n(void 0,t[c])}s(u,"valueFromConfig2");function h(c){if(q.isUndefined(t[c])){if(!q.isUndefined(e[c]))return n(void 0,e[c])}else return n(void 0,t[c])}s(h,"defaultToConfig2");function d(c){if(c in t)return n(e[c],t[c]);if(c in e)return n(void 0,e[c])}s(d,"mergeDirectKeys");var b={url:u,method:u,data:u,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:d};return q.forEach(Object.keys(e).concat(Object.keys(t)),s(function(m){var v=b[m]||a,E=v(m);q.isUndefined(E)&&v!==d||(i[m]=E);},"computeConfigValue")),i},"mergeConfig");});var Ue=f((bi,Lt)=>{Lt.exports={version:"0.27.2"};});var _t=f((Ei,Ft)=>{var ls=Ue().version,A=U(),Ne={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){Ne[r]=s(function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r},"validator");});var Bt={};Ne.transitional=s(function(e,t,i){function n(a,u){return "[Axios v"+ls+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return s(n,"formatMessage"),function(a,u,h){if(e===!1)throw new A(n(u," has been removed"+(t?" in "+t:"")),A.ERR_DEPRECATED);return t&&!Bt[u]&&(Bt[u]=!0,console.warn(n(u," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,u,h):!0}},"transitional");function hs(r,e,t){if(typeof r!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(r),n=i.length;n-- >0;){var a=i[n],u=e[a];if(u){var h=r[a],d=h===void 0||u(h,a,r);if(d!==!0)throw new A("option "+a+" must be "+d,A.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new A("Unknown option "+a,A.ERR_BAD_OPTION)}}s(hs,"assertOptions");Ft.exports={assertOptions:hs,validators:Ne};});var Ht=f((vi,Wt)=>{var It=w(),ps=be(),jt=Ge(),$t=kt(),ne=Ce(),ds=qe(),Mt=_t(),L=Mt.validators;function B(r){this.defaults=r,this.interceptors={request:new jt,response:new jt};}s(B,"Axios");B.prototype.request=s(function(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ne(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var i=t.transitional;i!==void 0&&Mt.assertOptions(i,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1);var n=[],a=!0;this.interceptors.request.forEach(s(function(E){typeof E.runWhen=="function"&&E.runWhen(t)===!1||(a=a&&E.synchronous,n.unshift(E.fulfilled,E.rejected));},"unshiftRequestInterceptors"));var u=[];this.interceptors.response.forEach(s(function(E){u.push(E.fulfilled,E.rejected);},"pushResponseInterceptors"));var h;if(!a){var d=[$t,void 0];for(Array.prototype.unshift.apply(d,n),d=d.concat(u),h=Promise.resolve(t);d.length;)h=h.then(d.shift(),d.shift());return h}for(var b=t;n.length;){var c=n.shift(),m=n.shift();try{b=c(b);}catch(v){m(v);break}}try{h=$t(b);}catch(v){return Promise.reject(v)}for(;u.length;)h=h.then(u.shift(),u.shift());return h},"request");B.prototype.getUri=s(function(e){e=ne(this.defaults,e);var t=ds(e.baseURL,e.url);return ps(t,e.params,e.paramsSerializer)},"getUri");It.forEach(["delete","get","head","options"],s(function(e){B.prototype[e]=function(t,i){return this.request(ne(i||{},{method:e,url:t,data:(i||{}).data}))};},"forEachMethodNoData"));It.forEach(["post","put","patch"],s(function(e){function t(i){return s(function(a,u,h){return this.request(ne(h||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))},"httpMethod")}s(t,"generateHTTPMethod"),B.prototype[e]=t(),B.prototype[e+"Form"]=t(!0);},"forEachMethodWithData"));Wt.exports=B;});var zt=f((Si,Jt)=>{var fs=J();function F(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(s(function(n){e=n;},"promiseExecutor"));var t=this;this.promise.then(function(i){if(t._listeners){var n,a=t._listeners.length;for(n=0;n<a;n++)t._listeners[n](i);t._listeners=null;}}),this.promise.then=function(i){var n,a=new Promise(function(u){t.subscribe(u),n=u;}).then(i);return a.cancel=s(function(){t.unsubscribe(n);},"reject"),a},r(s(function(n){t.reason||(t.reason=new fs(n),e(t.reason));},"cancel"));}s(F,"CancelToken");F.prototype.throwIfRequested=s(function(){if(this.reason)throw this.reason},"throwIfRequested");F.prototype.subscribe=s(function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e];},"subscribe");F.prototype.unsubscribe=s(function(e){if(this._listeners){var t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1);}},"unsubscribe");F.source=s(function(){var e,t=new F(s(function(n){e=n;},"executor"));return {token:t,cancel:e}},"source");Jt.exports=F;});var Gt=f((Ri,Vt)=>{Vt.exports=s(function(e){return s(function(i){return e.apply(null,i)},"wrap")},"spread");});var Qt=f((Ai,Kt)=>{var ms=w();Kt.exports=s(function(e){return ms.isObject(e)&&e.isAxiosError===!0},"isAxiosError");});var Zt=f((Ci,ke)=>{var Xt=w(),ys=pe(),oe=Ht(),ws=Ce(),xs=ie();function Yt(r){var e=new oe(r),t=ys(oe.prototype.request,e);return Xt.extend(t,oe.prototype,e),Xt.extend(t,e),t.create=s(function(n){return Yt(ws(r,n))},"create"),t}s(Yt,"createInstance");var T=Yt(xs);T.Axios=oe;T.CanceledError=J();T.CancelToken=zt();T.isCancel=Pe();T.VERSION=Ue().version;T.toFormData=Te();T.AxiosError=U();T.Cancel=T.CanceledError;T.all=s(function(e){return Promise.all(e)},"all");T.spread=Gt();T.isAxiosError=Qt();ke.exports=T;ke.exports.default=T;});var tr=f((Ni,er)=>{er.exports=Zt();});var ar=f((Jn,or)=>{or.exports=typeof self=="object"?self.FormData:window.FormData;});var nr=$e(tr(),1);var V=class extends Error{constructor(t){super(t.message);o(this,"code");o(this,"details");this.code=t.code,this.name=t.name,this.details=t.details;}};s(V,"ApiError");var l;(function(r){r.GET="GET",r.POST="POST",r.DELETE="DELETE",r.PATCH="PATCH",r.PUT="PUT";})(l||(l={}));var rr;(function(r){r.SYSTEM="system",r.BLOCKS="blocks",r.EXTRINSICS="extrinsics",r.COLLECTION="collection",r.CONTRACT="contract",r.EVENTS="events",r.BALANCE="balance",r.ACCOUNT_CURRENT_BALANCE="account-current-balance";})(rr||(rr={}));var sr;(function(r){r.SYSTEM="system",r.BLOCKS="blocks",r.EXTRINSICS="extrinsics",r.EVENTS="events",r.CONTRACT_LOGS="contract-logs",r.COLLECTIONS="collections",r.HAS_NEXT="has-next",r.BALANCES="balances",r.ACCOUNT_CURRENT_BALANCE="account-current-balance",r.SUBSCRIBE_STATE="subscribe-state";})(sr||(sr={}));var ir;(function(r){r.WITHDRAW="Withdraw",r.TRANSFER="Transfer",r.DEPOSIT="Deposit",r.DUST_LOST="DustLost",r.ENDOWED="Endowed",r.LOCKED="Locked",r.UNLOCKED="Unlocked",r.RESERVED="Reserved";})(ir||(ir={}));var y=class{constructor(e,t){o(this,"client");o(this,"path");o(this,"baseUrl");this.client=e,this.path=t,this.baseUrl=`${this.client.options.baseUrl}/${t}`;}async query(e,t){return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:e,params:t})).data}async postRequest(e,t,i){return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:e,data:t,params:i})).data}};s(y,"Section");var De=s(r=>typeof r=="object"&&!!r&&"signerPayloadJSON"in r,"isUnsignedTxPayloadResponse"),Le=s(r=>De(r)&&!!r&&"signature"in r,"isSubmitTxBody");function ae(r){return new Promise(e=>{setTimeout(e,r);})}s(ae,"sleep");var bs=s((r,e)=>{if(e.address)return e.address;if(r.signer?.address)return r.signer.address;if(r.account?.address)return r.account.address;if(r.account?.signer?.address)return r.account.signer.address},"getAddress"),Be=s((r,e)=>{let t=bs(r,e);if(!t)throw new Error("No address provided");return {...e,address:t}},"addAddress");var Es=s((r,e)=>{if(e)return "sign"in e?e:e.signer;if(r.signer)return r.signer;if(r.account?.signer)return r.account.signer},"getSigner"),Ts=s((r,e)=>{if(e.address)return e.address;if(r.signer?.address)return r.signer.address;if(r.account?.address)return r.account.address;if(r.account?.signer?.address)return r.account.signer.address},"getAddress"),_=class extends y{async build(e){let t=Ts(this.client.options,e);if(!t)throw new Error("Invalid address");return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:"build",data:{...e,address:t}})).data}async getFee(e){return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:"calculate-fee",data:e})).data}async sign(e,t){let i=Es(this.client.options,t);if(!i)throw new Error("No signer provided");return i.sign(e)}async submit(e){return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:"submit",data:e})).data}async submitWatch(e,t=this.client.options.signer){let i=await this.client.extrinsic.build(e),n=await this.client.extrinsic.sign(i,t);return await this.client.extrinsic.submit({signerPayloadJSON:i.signerPayloadJSON,signature:n.signature})}async submitWaitResult(e,t=this.client.options.signer){let{hash:i}=await this.client.extrinsic.submitWatch(e,t),n,a=0;for(;(!n||!n?.isCompleted)&&a<=this.client.options.maximumNumberOfStatusRequests;){if(a+=1,n=await this.client.extrinsic.status({hash:i}),n.isCompleted||n.error)return n;await ae(this.client.options.waitBetweenStatusRequestsInMs);}throw new Error}async status(e){return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:"status",params:e})).data}async get(e){return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:"",params:e})).data}};s(_,"Extrinsic");var Fe="0.6.1";var G=class{constructor(e){o(this,"instance");o(this,"options");o(this,"extrinsic");this.options=e,this.setDefaultOptions(),this.instance=nr.default.create({baseURL:`${this.options.baseUrl}`,maxContentLength:1/0,maxBodyLength:1/0}),this.instance.interceptors.response.use(t=>t,t=>{let i=t.response?.data?.error;throw i&&typeof i=="object"?new V(i):t}),(this.instance.defaults.headers.common["X-SDK-Version"]=Fe),this.extrinsic=new _(this,"extrinsic");}setDefaultOptions(){this.options.baseUrl=this.options.baseUrl.replace(/\/$/,""),this.options.maximumNumberOfStatusRequests=this.options.maximumNumberOfStatusRequests||5,this.options.waitBetweenStatusRequestsInMs=this.options.waitBetweenStatusRequestsInMs||5e3;}};s(G,"BaseClient");var ue=class{constructor(e,t,i){o(this,"client");o(this,"method");o(this,"path");o(this,"url");this.client=e,this.method=t,this.path=i,this.url=`${this.client.options.baseUrl}/${this.path}`;}async buildBatch(e,t){let i=e.map(a=>Be(this.client.options,a));return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"BuildBatch"},data:i})).data}async build(e,t){let i=Be(this.client.options,e);return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"Build"},data:i})).data}async getFee(e){return (await this.client.instance({method:this.method,url:this.url,params:{use:"GetFee"},data:e}))?.data}async sign(e,t){let i=De(e)?e:await this.build(e,t),{signerPayloadJSON:n}=i,{signature:a}=await this.client.extrinsic.sign(i,t?.signer);return {signature:a,signerPayloadJSON:n}}async submit(e,t){let i=Le(e)?e:await this.sign(e,t);return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"Submit"},data:i})).data}async submitWatch(e,t){let i=Le(e)?e:await this.sign(e,t);return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"SubmitWatch"},data:i})).data}async submitWaitResult(e,t){let{hash:i}=await this.submitWatch(e,t),n,a=0;for(;(!n||!n?.isCompleted)&&a<=this.client.options.maximumNumberOfStatusRequests;){if(a+=1,n=await this.client.extrinsic.status({hash:i}),n.isCompleted||n.error)return n;await ae(this.client.options.waitBetweenStatusRequestsInMs);}throw new Error}};s(ue,"MutationAbstract");var qs=s(class extends ue{},"Mutation");function Ss(r){let e=s((t,i)=>r.submitWaitResult(t,i),"submitWaitResult");return e.build=r.build.bind(r),e.buildBatch=r.buildBatch.bind(r),e.getFee=r.getFee.bind(r),e.sign=r.sign.bind(r),e.submit=r.submit.bind(r),e.submitWatch=r.submitWatch.bind(r),e.submitWaitResult=r.submitWaitResult.bind(r),e}s(Ss,"createMutationByInstance");function p(r,e,t){let i=new qs(r,e,t);return Ss(i)}s(p,"createMutationEx");var j=class extends y{constructor(){super(...arguments);o(this,"transfer",p(this.client,l.POST,`${this.path}/transfer`));o(this,"get",s(t=>this.query("",t),"get"));}};s(j,"Balance");var $=class extends y{constructor(){super(...arguments);o(this,"setProperties",p(this.client,l.POST,`${this.path}/properties`));o(this,"deleteProperties",p(this.client,l.DELETE,`${this.path}/properties`));o(this,"setPropertyPermissions",p(this.client,l.POST,`${this.path}/property-permissions`));o(this,"properties",s(t=>this.query("properties",t),"properties"));o(this,"tokens",s(t=>this.query("tokens",t),"tokens"));o(this,"propertyPermissions",s(t=>this.query("property-permissions",t),"propertyPermissions"));o(this,"creation",p(this.client,l.POST,this.path));o(this,"create",p(this.client,l.POST,this.path));o(this,"getLimits",s(t=>this.query("limits",t),"getLimits"));o(this,"setLimits",p(this.client,l.POST,`${this.path}/set-limits`));o(this,"get",s(t=>this.query("",t),"get"));o(this,"transfer",p(this.client,l.PATCH,`${this.path}/transfer`));o(this,"destroy",p(this.client,l.DELETE,this.path));o(this,"stats",s(()=>this.query("stats"),"stats"));o(this,"setTransfersEnabled",p(this.client,l.POST,`${this.path}/transfers-enabled`));o(this,"setPermissions",p(this.client,l.POST,`${this.path}/permissions`));o(this,"nextSponsored",s(t=>this.query("next-sponsored",t),"nextSponsored"));o(this,"lastTokenId",s(t=>this.query("last-token-id",t),"lastTokenId"));o(this,"allowList",s(t=>this.query("allow-list",t),"allowList"));o(this,"allowed",s(t=>this.query("allowed",t),"allowed"));o(this,"addToAllowList",p(this.client,l.POST,`${this.path}/add-to-allow-list`));o(this,"removeFromAllowList",p(this.client,l.POST,`${this.path}/remove-from-allow-list`));o(this,"admins",s(t=>this.query("admins",t),"admins"));o(this,"addAdmin",p(this.client,l.POST,`${this.path}/admins`));o(this,"removeAdmin",p(this.client,l.DELETE,`${this.path}/admins`));o(this,"setSponsorship",p(this.client,l.POST,`${this.path}/sponsorship`));o(this,"confirmSponsorship",p(this.client,l.POST,`${this.path}/sponsorship/confirm`));o(this,"removeSponsorship",p(this.client,l.DELETE,`${this.path}/sponsorship`));o(this,"totalSupply",s(t=>this.query("total-supply",t),"totalSupply"));}};s($,"Collection");var I=class extends y{constructor(){super(...arguments);o(this,"createCollection",p(this.client,l.POST,`${this.path}/collection`));o(this,"createToken",p(this.client,l.POST,`${this.path}/token`));}};s(I,"ERC721");var M=class extends y{constructor(){super(...arguments);o(this,"transfer",p(this.client,l.POST,`${this.path}/transfer`));o(this,"getCollection",s(t=>this.query("collection",t),"getCollection"));o(this,"burn",p(this.client,l.DELETE,this.path));o(this,"createCollection",p(this.client,l.POST,`${this.path}/collection`));o(this,"getBalance",s(t=>this.query("balance",t),"getBalance"));o(this,"addTokens",p(this.client,l.POST,`${this.path}/tokens`));o(this,"transferTokens",p(this.client,l.POST,`${this.path}/tokens/transfer`));o(this,"approveTokens",p(this.client,l.POST,`${this.path}/tokens/approve`));o(this,"allowanceTokens",s(t=>this.query("tokens/allowance",t),"allowanceTokens"));o(this,"totalPieces",s(t=>this.query("total-pieces",t),"totalPieces"));}};s(M,"Fungible");var W=class extends y{constructor(){super(...arguments);o(this,"getCollection",s(t=>this.query("collection",t),"getCollection"));o(this,"burn",p(this.client,l.DELETE,this.path));o(this,"getBalance",s(t=>this.query("tokens/balance",t),"getBalance"));o(this,"createCollection",p(this.client,l.POST,`${this.path}/collection`));o(this,"createToken",p(this.client,l.POST,`${this.path}/tokens`));o(this,"transferToken",p(this.client,l.POST,`${this.path}/tokens/transfer`));o(this,"approveToken",p(this.client,l.POST,`${this.path}/tokens/approve`));o(this,"allowanceToken",s(t=>this.query("tokens/allowance",t),"allowanceToken"));o(this,"repartitionToken",p(this.client,l.POST,`${this.path}/tokens/repartition`));o(this,"totalPieces",s(t=>this.query("tokens/total-pieces",t),"totalPieces"));o(this,"accountTokens",s(t=>this.query("tokens/account-tokens",t),"accountTokens"));}};s(W,"Refungible");var ce=$e(ar(),1);var Os=s(r=>Object.hasOwnProperty.call(r,"content"),"isFileLike"),P=class extends y{constructor(){super(...arguments);o(this,"headers",{"Content-Type":"multipart/form-data"});}async uploadFile({file:t}){let i=new ce.default;return i.append("file",t,"file"),(await this.client.instance({method:l.POST,url:`${this.baseUrl}/upload-file`,data:i,headers:this.headers})).data}async uploadFiles({files:t}){let i=P.filesToFormData(t);return (await this.client.instance({method:l.POST,url:`${this.baseUrl}/upload-files`,data:i,headers:this.headers})).data}async addFiles({cid:t,files:i}){let n=P.filesToFormData(i);return n.append("cid",t),(await this.client.instance({method:l.PATCH,url:`${this.baseUrl}/add-files`,data:n,headers:this.headers})).data}async uploadZip({file:t}){let i=new ce.default;return i.append("file",t,"file"),(await this.client.instance({method:l.POST,url:`${this.baseUrl}/upload-zip`,data:i,headers:{"Content-Type":"multipart/form-data"}})).data}static filesToFormData(t){let i=new ce.default;return t.forEach(n=>{i.append("files",Os(n)?n.content:n,n.name);}),i}};s(P,"Ipfs");var H=class extends y{constructor(){super(...arguments);o(this,"setProperties",p(this.client,l.POST,`${this.path}/properties`));o(this,"deleteProperties",p(this.client,l.DELETE,`${this.path}/properties`));o(this,"properties",s(t=>this.query("properties",t),"properties"));o(this,"create",p(this.client,l.POST,this.path));o(this,"createMultiple",p(this.client,l.POST,`${this.path}/create-multiple`));o(this,"accountTokens",s(t=>this.query("account-tokens",t),"accountTokens"));o(this,"get",s(t=>this.query("",t),"get"));o(this,"exists",s(t=>this.query("exists",t),"exists"));o(this,"children",s(t=>this.query("children",t),"children"));o(this,"parent",s(t=>this.query("parent",t),"parent"));o(this,"owner",s(t=>this.query("owner",t),"owner"));o(this,"topmostOwner",s(t=>this.query("topmost-owner",t),"topmostOwner"));o(this,"nest",p(this.client,l.POST,`${this.path}/nest`));o(this,"unnest",p(this.client,l.POST,`${this.path}/unnest`));o(this,"burn",p(this.client,l.DELETE,this.path));o(this,"transfer",p(this.client,l.PATCH,`${this.path}/transfer`));o(this,"approve",p(this.client,l.POST,`${this.path}/approve`));o(this,"allowance",s(t=>this.query("allowance",t),"allowance"));o(this,"isBundle",s(t=>this.query("is-bundle",t),"isBundle"));o(this,"getBundle",s(t=>this.query("get-bundle",t),"getBundle"));o(this,"balance",s(t=>this.query("balance",t),"balance"));}};s(H,"Token");var K=class extends y{constructor(){super(...arguments);o(this,"chainProperties",s(()=>this.query("chain-properties"),"chainProperties"));o(this,"getNonce",s(t=>this.query("nonce",t),"getNonce"));o(this,"batch",p(this.client,l.POST,`${this.path}/batching`));}};s(K,"Common");var Q=class extends y{async get(e){let{endpoint:t,module:i,method:n}=e,a=`${t}/${i}/${n}`;return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:a})).data}async execute(e,t){let{endpoint:i,module:n,method:a}=e,u=`${i}/${n}/${a}`;return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:u,data:t||{}})).data}};s(Q,"StateQueries");var ur;(function(r){r.opal="opal",r.sapphire="sapphire",r.quartz="quartz",r.unique="unique";})(ur||(ur={}));var X=class extends G{constructor(t){super(t);o(this,"options");o(this,"common");o(this,"balance");o(this,"fungible");o(this,"refungible");o(this,"collection");o(this,"token");o(this,"erc721");o(this,"ipfs");o(this,"stateQuery");o(this,"defaults");this.options=t,this.defaults={baseUrl:""},this.common=new K(this,"common"),this.balance=new j(this,"balance"),this.fungible=new M(this,"fungible"),this.refungible=new W(this,"refungible"),this.collection=new $(this,"collections"),this.token=new H(this,"tokens"),this.erc721=new I(this,"erc721"),this.ipfs=new P(this,"ipfs"),this.stateQuery=new Q(this,"query");}};s(X,"ThinClient");var Uo=X;
var pr=Object.create;var ee=Object.defineProperty;var dr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var mr=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty;var wr=(r,e,t)=>e in r?ee(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var s=(r,e)=>ee(r,"name",{value:e,configurable:!0});var f=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var yr=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of fr(e))!xr.call(r,n)&&n!==t&&ee(r,n,{get:()=>e[n],enumerable:!(i=dr(e,n))||i.enumerable});return r};var Ie=(r,e,t)=>(t=r!=null?pr(mr(r)):{},yr(e||!r||!r.__esModule?ee(t,"default",{value:r,enumerable:!0}):t,r));var o=(r,e,t)=>(wr(r,typeof e!="symbol"?e+"":e,t),t);var de=f((gs,Me)=>{Me.exports=s(function(e,t){return s(function(){for(var n=new Array(arguments.length),a=0;a<n.length;a++)n[a]=arguments[a];return e.apply(t,n)},"wrap")},"bind");});var w=f((Cs,Je)=>{var br=de(),me=Object.prototype.toString,xe=function(r){return function(e){var t=me.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())}}(Object.create(null));function A(r){return r=r.toLowerCase(),s(function(t){return xe(t)===r},"isKindOf")}s(A,"kindOfTest");function we(r){return Array.isArray(r)}s(we,"isArray");function re(r){return typeof r>"u"}s(re,"isUndefined");function Er(r){return r!==null&&!re(r)&&r.constructor!==null&&!re(r.constructor)&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}s(Er,"isBuffer");var He=A("ArrayBuffer");function Tr(r){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&He(r.buffer),e}s(Tr,"isArrayBufferView");function vr(r){return typeof r=="string"}s(vr,"isString");function qr(r){return typeof r=="number"}s(qr,"isNumber");function We(r){return r!==null&&typeof r=="object"}s(We,"isObject");function te(r){if(xe(r)!=="object")return !1;var e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}s(te,"isPlainObject");var Sr=A("Date"),Or=A("File"),Rr=A("Blob"),Pr=A("FileList");function ye(r){return me.call(r)==="[object Function]"}s(ye,"isFunction");function Ur(r){return We(r)&&ye(r.pipe)}s(Ur,"isStream");function gr(r){var e="[object FormData]";return r&&(typeof FormData=="function"&&r instanceof FormData||me.call(r)===e||ye(r.toString)&&r.toString()===e)}s(gr,"isFormData");var Ar=A("URLSearchParams");function Cr(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}s(Cr,"trim");function Nr(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}s(Nr,"isStandardBrowserEnv");function be(r,e){if(!(r===null||typeof r>"u"))if(typeof r!="object"&&(r=[r]),we(r))for(var t=0,i=r.length;t<i;t++)e.call(null,r[t],t,r);else for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.call(null,r[n],n,r);}s(be,"forEach");function fe(){var r={};function e(n,a){te(r[a])&&te(n)?r[a]=fe(r[a],n):te(n)?r[a]=fe({},n):we(n)?r[a]=n.slice():r[a]=n;}s(e,"assignValue");for(var t=0,i=arguments.length;t<i;t++)be(arguments[t],e);return r}s(fe,"merge");function kr(r,e,t){return be(e,s(function(n,a){t&&typeof n=="function"?r[a]=br(n,t):r[a]=n;},"assignValue")),r}s(kr,"extend");function Dr(r){return r.charCodeAt(0)===65279&&(r=r.slice(1)),r}s(Dr,"stripBOM");function Lr(r,e,t,i){r.prototype=Object.create(e.prototype,i),r.prototype.constructor=r,t&&Object.assign(r.prototype,t);}s(Lr,"inherits");function Br(r,e,t){var i,n,a,u={};e=e||{};do{for(i=Object.getOwnPropertyNames(r),n=i.length;n-- >0;)a=i[n],u[a]||(e[a]=r[a],u[a]=!0);r=Object.getPrototypeOf(r);}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e}s(Br,"toFlatObject");function Fr(r,e,t){r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;var i=r.indexOf(e,t);return i!==-1&&i===t}s(Fr,"endsWith");function _r(r){if(!r)return null;var e=r.length;if(re(e))return null;for(var t=new Array(e);e-- >0;)t[e]=r[e];return t}s(_r,"toArray");var jr=function(r){return function(e){return r&&e instanceof r}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));Je.exports={isArray:we,isArrayBuffer:He,isBuffer:Er,isFormData:gr,isArrayBufferView:Tr,isString:vr,isNumber:qr,isObject:We,isPlainObject:te,isUndefined:re,isDate:Sr,isFile:Or,isBlob:Rr,isFunction:ye,isStream:Ur,isURLSearchParams:Ar,isStandardBrowserEnv:Nr,forEach:be,merge:fe,extend:kr,trim:Cr,stripBOM:Dr,inherits:Lr,toFlatObject:Br,kindOf:xe,kindOfTest:A,endsWith:Fr,toArray:_r,isTypedArray:jr,isFileList:Pr};});var Ee=f((ks,Ge)=>{var k=w();function ze(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}s(ze,"encode");Ge.exports=s(function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(k.isURLSearchParams(t))n=t.toString();else {var a=[];k.forEach(t,s(function(d,b){d===null||typeof d>"u"||(k.isArray(d)?b=b+"[]":d=[d],k.forEach(d,s(function(m){k.isDate(m)?m=m.toISOString():k.isObject(m)&&(m=JSON.stringify(m)),a.push(ze(b)+"="+ze(m));},"parseValue")));},"serialize")),n=a.join("&");}if(n){var u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+n;}return e},"buildURL");});var Qe=f((Ls,Ve)=>{var $r=w();function se(){this.handlers=[];}s(se,"InterceptorManager");se.prototype.use=s(function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1},"use");se.prototype.eject=s(function(e){this.handlers[e]&&(this.handlers[e]=null);},"eject");se.prototype.forEach=s(function(e){$r.forEach(this.handlers,s(function(i){i!==null&&e(i);},"forEachHandler"));},"forEach");Ve.exports=se;});var Xe=f((Fs,Ke)=>{var Ir=w();Ke.exports=s(function(e,t){Ir.forEach(e,s(function(n,a){a!==t&&a.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[a]);},"processHeader"));},"normalizeHeaderName");});var C=f((js,tt)=>{var Ye=w();function D(r,e,t,i,n){Error.call(this),this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),n&&(this.response=n);}s(D,"AxiosError");Ye.inherits(D,Error,{toJSON:s(function(){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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var Ze=D.prototype,et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach(function(r){et[r]={value:r};});Object.defineProperties(D,et);Object.defineProperty(Ze,"isAxiosError",{value:!0});D.from=function(r,e,t,i,n,a){var u=Object.create(Ze);return Ye.toFlatObject(r,u,s(function(d){return d!==Error.prototype},"filter")),D.call(u,r.message,e,t,i,n),u.name=r.name,a&&Object.assign(u,a),u};tt.exports=D;});var Te=f((Is,rt)=>{rt.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};});var ve=f((Ms,st)=>{var O=w();function Mr(r,e){e=e||new FormData;var t=[];function i(a){return a===null?"":O.isDate(a)?a.toISOString():O.isArrayBuffer(a)||O.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}s(i,"convertValue");function n(a,u){if(O.isPlainObject(a)||O.isArray(a)){if(t.indexOf(a)!==-1)throw Error("Circular reference detected in "+u);t.push(a),O.forEach(a,s(function(d,b){if(!O.isUndefined(d)){var c=u?u+"."+b:b,m;if(d&&!u&&typeof d=="object"){if(O.endsWith(b,"{}"))d=JSON.stringify(d);else if(O.endsWith(b,"[]")&&(m=O.toArray(d))){m.forEach(function(v){!O.isUndefined(v)&&e.append(c,i(v));});return}}n(d,c);}},"each")),t.pop();}else e.append(u,i(a));}return s(n,"build"),n(r),e}s(Mr,"toFormData");st.exports=Mr;});var nt=f((Ws,it)=>{var qe=C();it.exports=s(function(e,t,i){var n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):t(new qe("Request failed with status code "+i.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i));},"settle");});var at=f((zs,ot)=>{var ie=w();ot.exports=ie.isStandardBrowserEnv()?s(function(){return {write:s(function(t,i,n,a,u,h){var d=[];d.push(t+"="+encodeURIComponent(i)),ie.isNumber(n)&&d.push("expires="+new Date(n).toGMTString()),ie.isString(a)&&d.push("path="+a),ie.isString(u)&&d.push("domain="+u),h===!0&&d.push("secure"),document.cookie=d.join("; ");},"write"),read:s(function(t){var i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},"read"),remove:s(function(t){this.write(t,"",Date.now()-864e5);},"remove")}},"standardBrowserEnv")():s(function(){return {write:s(function(){},"write"),read:s(function(){return null},"read"),remove:s(function(){},"remove")}},"nonStandardBrowserEnv")();});var ct=f((Vs,ut)=>{ut.exports=s(function(e){return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},"isAbsoluteURL");});var ht=f((Ks,lt)=>{lt.exports=s(function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},"combineURLs");});var Se=f((Ys,pt)=>{var Hr=ct(),Wr=ht();pt.exports=s(function(e,t){return e&&!Hr(t)?Wr(e,t):t},"buildFullPath");});var ft=f((ei,dt)=>{var Oe=w(),Jr=["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"];dt.exports=s(function(e){var t={},i,n,a;return e&&Oe.forEach(e.split(`
`),s(function(h){if(a=h.indexOf(":"),i=Oe.trim(h.substr(0,a)).toLowerCase(),n=Oe.trim(h.substr(a+1)),i){if(t[i]&&Jr.indexOf(i)>=0)return;i==="set-cookie"?t[i]=(t[i]?t[i]:[]).concat([n]):t[i]=t[i]?t[i]+", "+n:n;}},"parser")),t},"parseHeaders");});var wt=f((ri,xt)=>{var mt=w();xt.exports=mt.isStandardBrowserEnv()?s(function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),i;function n(a){var u=a;return e&&(t.setAttribute("href",u),u=t.href),t.setAttribute("href",u),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return s(n,"resolveURL"),i=n(window.location.href),s(function(u){var h=mt.isString(u)?n(u):u;return h.protocol===i.protocol&&h.host===i.host},"isURLSameOrigin")},"standardBrowserEnv")():s(function(){return s(function(){return !0},"isURLSameOrigin")},"nonStandardBrowserEnv")();});var J=f((ii,bt)=>{var Re=C(),zr=w();function yt(r){Re.call(this,r??"canceled",Re.ERR_CANCELED),this.name="CanceledError";}s(yt,"CanceledError");zr.inherits(yt,Re,{__CANCEL__:!0});bt.exports=yt;});var Tt=f((oi,Et)=>{Et.exports=s(function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""},"parseProtocol");});var Pe=f((ui,vt)=>{var z=w(),Gr=nt(),Vr=at(),Qr=Ee(),Kr=Se(),Xr=ft(),Yr=wt(),Zr=Te(),R=C(),es=J(),ts=Tt();vt.exports=s(function(e){return new Promise(s(function(i,n){var a=e.data,u=e.headers,h=e.responseType,d;function b(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d);}s(b,"done"),z.isFormData(a)&&z.isStandardBrowserEnv()&&delete u["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";u.Authorization="Basic "+btoa(m+":"+v);}var E=Kr(e.baseURL,e.url);c.open(e.method.toUpperCase(),Qr(E,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function je(){if(c){var S="getAllResponseHeaders"in c?Xr(c.getAllResponseHeaders()):null,N=!h||h==="text"||h==="json"?c.responseText:c.response,g={data:N,status:c.status,statusText:c.statusText,headers:S,config:e,request:c};Gr(s(function(pe){i(pe),b();},"_resolve"),s(function(pe){n(pe),b();},"_reject"),g),c=null;}}if(s(je,"onloadend"),"onloadend"in c?c.onloadend=je:c.onreadystatechange=s(function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(je);},"handleLoad"),c.onabort=s(function(){c&&(n(new R("Request aborted",R.ECONNABORTED,e,c)),c=null);},"handleAbort"),c.onerror=s(function(){n(new R("Network Error",R.ERR_NETWORK,e,c,c)),c=null;},"handleError"),c.ontimeout=s(function(){var N=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",g=e.transitional||Zr;e.timeoutErrorMessage&&(N=e.timeoutErrorMessage),n(new R(N,g.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,c)),c=null;},"handleTimeout"),z.isStandardBrowserEnv()){var $e=(e.withCredentials||Yr(E))&&e.xsrfCookieName?Vr.read(e.xsrfCookieName):void 0;$e&&(u[e.xsrfHeaderName]=$e);}"setRequestHeader"in c&&z.forEach(u,s(function(N,g){typeof a>"u"&&g.toLowerCase()==="content-type"?delete u[g]:c.setRequestHeader(g,N);},"setRequestHeader")),z.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),h&&h!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=s(function(S){c&&(n(!S||S&&S.type?new es:S),c.abort(),c=null);},"onCanceled"),e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),a||(a=null);var he=ts(E);if(he&&["http","https","file"].indexOf(he)===-1){n(new R("Unsupported protocol "+he+":",R.ERR_BAD_REQUEST,e));return}c.send(a);},"dispatchXhrRequest"))},"xhrAdapter");});var St=f((li,qt)=>{qt.exports=null;});var oe=f((hi,Ut)=>{var y=w(),Ot=Xe(),Rt=C(),rs=Te(),ss=ve(),is={"Content-Type":"application/x-www-form-urlencoded"};function Pt(r,e){!y.isUndefined(r)&&y.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e);}s(Pt,"setContentTypeIfUnset");function ns(){var r;return typeof XMLHttpRequest<"u"?r=Pe():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(r=Pe()),r}s(ns,"getDefaultAdapter");function os(r,e,t){if(y.isString(r))try{return (e||JSON.parse)(r),y.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return (t||JSON.stringify)(r)}s(os,"stringifySafely");var ne={transitional:rs,adapter:ns(),transformRequest:[s(function(e,t){if(Ot(t,"Accept"),Ot(t,"Content-Type"),y.isFormData(e)||y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return Pt(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var i=y.isObject(e),n=t&&t["Content-Type"],a;if((a=y.isFileList(e))||i&&n==="multipart/form-data"){var u=this.env&&this.env.FormData;return ss(a?{"files[]":e}:e,u&&new u)}else if(i||n==="application/json")return Pt(t,"application/json"),os(e);return e},"transformRequest")],transformResponse:[s(function(e){var t=this.transitional||ne.transitional,i=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,a=!i&&this.responseType==="json";if(a||n&&y.isString(e)&&e.length)try{return JSON.parse(e)}catch(u){if(a)throw u.name==="SyntaxError"?Rt.from(u,Rt.ERR_BAD_RESPONSE,this,null,this.response):u}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:St()},validateStatus:s(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],s(function(e){ne.headers[e]={};},"forEachMethodNoData"));y.forEach(["post","put","patch"],s(function(e){ne.headers[e]=y.merge(is);},"forEachMethodWithData"));Ut.exports=ne;});var At=f((di,gt)=>{var as=w(),us=oe();gt.exports=s(function(e,t,i){var n=this||us;return as.forEach(i,s(function(u){e=u.call(n,e,t);},"transform")),e},"transformData");});var Ue=f((mi,Ct)=>{Ct.exports=s(function(e){return !!(e&&e.__CANCEL__)},"isCancel");});var Dt=f((wi,kt)=>{var Nt=w(),ge=At(),cs=Ue(),ls=oe(),hs=J();function Ae(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new hs}s(Ae,"throwIfCancellationRequested");kt.exports=s(function(e){Ae(e),e.headers=e.headers||{},e.data=ge.call(e,e.data,e.headers,e.transformRequest),e.headers=Nt.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Nt.forEach(["delete","get","head","post","put","patch","common"],s(function(n){delete e.headers[n];},"cleanHeaderConfig"));var t=e.adapter||ls.adapter;return t(e).then(s(function(n){return Ae(e),n.data=ge.call(e,n.data,n.headers,e.transformResponse),n},"onAdapterResolution"),s(function(n){return cs(n)||(Ae(e),n&&n.response&&(n.response.data=ge.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)},"onAdapterRejection"))},"dispatchRequest");});var Ce=f((bi,Lt)=>{var q=w();Lt.exports=s(function(e,t){t=t||{};var i={};function n(c,m){return q.isPlainObject(c)&&q.isPlainObject(m)?q.merge(c,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}s(n,"getMergedValue");function a(c){if(q.isUndefined(t[c])){if(!q.isUndefined(e[c]))return n(void 0,e[c])}else return n(e[c],t[c])}s(a,"mergeDeepProperties");function u(c){if(!q.isUndefined(t[c]))return n(void 0,t[c])}s(u,"valueFromConfig2");function h(c){if(q.isUndefined(t[c])){if(!q.isUndefined(e[c]))return n(void 0,e[c])}else return n(void 0,t[c])}s(h,"defaultToConfig2");function d(c){if(c in t)return n(e[c],t[c]);if(c in e)return n(void 0,e[c])}s(d,"mergeDirectKeys");var b={url:u,method:u,data:u,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:d};return q.forEach(Object.keys(e).concat(Object.keys(t)),s(function(m){var v=b[m]||a,E=v(m);q.isUndefined(E)&&v!==d||(i[m]=E);},"computeConfigValue")),i},"mergeConfig");});var Ne=f((Ti,Bt)=>{Bt.exports={version:"0.27.2"};});var jt=f((vi,_t)=>{var ps=Ne().version,U=C(),ke={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){ke[r]=s(function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r},"validator");});var Ft={};ke.transitional=s(function(e,t,i){function n(a,u){return "[Axios v"+ps+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return s(n,"formatMessage"),function(a,u,h){if(e===!1)throw new U(n(u," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Ft[u]&&(Ft[u]=!0,console.warn(n(u," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,u,h):!0}},"transitional");function ds(r,e,t){if(typeof r!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(r),n=i.length;n-- >0;){var a=i[n],u=e[a];if(u){var h=r[a],d=h===void 0||u(h,a,r);if(d!==!0)throw new U("option "+a+" must be "+d,U.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new U("Unknown option "+a,U.ERR_BAD_OPTION)}}s(ds,"assertOptions");_t.exports={assertOptions:ds,validators:ke};});var Jt=f((Si,Wt)=>{var Mt=w(),fs=Ee(),$t=Qe(),It=Dt(),ae=Ce(),ms=Se(),Ht=jt(),L=Ht.validators;function B(r){this.defaults=r,this.interceptors={request:new $t,response:new $t};}s(B,"Axios");B.prototype.request=s(function(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ae(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var i=t.transitional;i!==void 0&&Ht.assertOptions(i,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1);var n=[],a=!0;this.interceptors.request.forEach(s(function(E){typeof E.runWhen=="function"&&E.runWhen(t)===!1||(a=a&&E.synchronous,n.unshift(E.fulfilled,E.rejected));},"unshiftRequestInterceptors"));var u=[];this.interceptors.response.forEach(s(function(E){u.push(E.fulfilled,E.rejected);},"pushResponseInterceptors"));var h;if(!a){var d=[It,void 0];for(Array.prototype.unshift.apply(d,n),d=d.concat(u),h=Promise.resolve(t);d.length;)h=h.then(d.shift(),d.shift());return h}for(var b=t;n.length;){var c=n.shift(),m=n.shift();try{b=c(b);}catch(v){m(v);break}}try{h=It(b);}catch(v){return Promise.reject(v)}for(;u.length;)h=h.then(u.shift(),u.shift());return h},"request");B.prototype.getUri=s(function(e){e=ae(this.defaults,e);var t=ms(e.baseURL,e.url);return fs(t,e.params,e.paramsSerializer)},"getUri");Mt.forEach(["delete","get","head","options"],s(function(e){B.prototype[e]=function(t,i){return this.request(ae(i||{},{method:e,url:t,data:(i||{}).data}))};},"forEachMethodNoData"));Mt.forEach(["post","put","patch"],s(function(e){function t(i){return s(function(a,u,h){return this.request(ae(h||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))},"httpMethod")}s(t,"generateHTTPMethod"),B.prototype[e]=t(),B.prototype[e+"Form"]=t(!0);},"forEachMethodWithData"));Wt.exports=B;});var Gt=f((Ri,zt)=>{var xs=J();function F(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(s(function(n){e=n;},"promiseExecutor"));var t=this;this.promise.then(function(i){if(t._listeners){var n,a=t._listeners.length;for(n=0;n<a;n++)t._listeners[n](i);t._listeners=null;}}),this.promise.then=function(i){var n,a=new Promise(function(u){t.subscribe(u),n=u;}).then(i);return a.cancel=s(function(){t.unsubscribe(n);},"reject"),a},r(s(function(n){t.reason||(t.reason=new xs(n),e(t.reason));},"cancel"));}s(F,"CancelToken");F.prototype.throwIfRequested=s(function(){if(this.reason)throw this.reason},"throwIfRequested");F.prototype.subscribe=s(function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e];},"subscribe");F.prototype.unsubscribe=s(function(e){if(this._listeners){var t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1);}},"unsubscribe");F.source=s(function(){var e,t=new F(s(function(n){e=n;},"executor"));return {token:t,cancel:e}},"source");zt.exports=F;});var Qt=f((Ui,Vt)=>{Vt.exports=s(function(e){return s(function(i){return e.apply(null,i)},"wrap")},"spread");});var Xt=f((Ai,Kt)=>{var ws=w();Kt.exports=s(function(e){return ws.isObject(e)&&e.isAxiosError===!0},"isAxiosError");});var er=f((Ni,De)=>{var Yt=w(),ys=de(),ue=Jt(),bs=Ce(),Es=oe();function Zt(r){var e=new ue(r),t=ys(ue.prototype.request,e);return Yt.extend(t,ue.prototype,e),Yt.extend(t,e),t.create=s(function(n){return Zt(bs(r,n))},"create"),t}s(Zt,"createInstance");var T=Zt(Es);T.Axios=ue;T.CanceledError=J();T.CancelToken=Gt();T.isCancel=Ue();T.VERSION=Ne().version;T.toFormData=ve();T.AxiosError=C();T.Cancel=T.CanceledError;T.all=s(function(e){return Promise.all(e)},"all");T.spread=Qt();T.isAxiosError=Xt();De.exports=T;De.exports.default=T;});var rr=f((Di,tr)=>{tr.exports=er();});var cr=f((eo,ur)=>{ur.exports=typeof self=="object"?self.FormData:window.FormData;});var ar=Ie(rr(),1);var G=class extends Error{constructor(t){super(t.message);o(this,"code");o(this,"details");this.code=t.code,this.name=t.name,this.details=t.details;}};s(G,"ApiError");var V=class extends Error{constructor(t,i){let n=`Extrinsic status was not changed within the specified count of status requests (${i}).`;super(n);o(this,"details");o(this,"txHash");o(this,"limit");this.details=`${n} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`,this.txHash=t,this.limit=i;}};s(V,"MaxStatusRequestsError");var Q=class extends Error{constructor(t,i){let n=`Extrinsic status was not changed within the specified time (${i} ms).`;super(n);o(this,"details");o(this,"txHash");o(this,"timeoutMs");this.details=`${n} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`,this.txHash=t,this.timeoutMs=i;}};s(Q,"TimeoutError");var l;(function(r){r.GET="GET",r.POST="POST",r.DELETE="DELETE",r.PATCH="PATCH",r.PUT="PUT";})(l||(l={}));var sr;(function(r){r.SYSTEM="system",r.BLOCKS="blocks",r.EXTRINSICS="extrinsics",r.COLLECTION="collection",r.CONTRACT="contract",r.EVENTS="events",r.BALANCE="balance",r.ACCOUNT_CURRENT_BALANCE="account-current-balance";})(sr||(sr={}));var ir;(function(r){r.SYSTEM="system",r.BLOCKS="blocks",r.EXTRINSICS="extrinsics",r.EVENTS="events",r.CONTRACT_LOGS="contract-logs",r.COLLECTIONS="collections",r.HAS_NEXT="has-next",r.BALANCES="balances",r.ACCOUNT_CURRENT_BALANCE="account-current-balance",r.SUBSCRIBE_STATE="subscribe-state";})(ir||(ir={}));var nr;(function(r){r.WITHDRAW="Withdraw",r.TRANSFER="Transfer",r.DEPOSIT="Deposit",r.DUST_LOST="DustLost",r.ENDOWED="Endowed",r.LOCKED="Locked",r.UNLOCKED="Unlocked",r.RESERVED="Reserved";})(nr||(nr={}));var x=class{constructor(e,t){o(this,"client");o(this,"path");o(this,"baseUrl");this.client=e,this.path=t,this.baseUrl=`${this.client.options.baseUrl}/${t}`;}async query(e,t){return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:e,params:t})).data}async postRequest(e,t,i){return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:e,data:t,params:i})).data}};s(x,"Section");var Le=s(r=>typeof r=="object"&&!!r&&"signerPayloadJSON"in r,"isUnsignedTxPayloadResponse"),Be=s(r=>Le(r)&&!!r&&"signature"in r,"isSubmitTxBody");function or(r){return new Promise(e=>{setTimeout(e,r);})}s(or,"sleep");var Ts=s((r,e)=>{if(e.address)return e.address;if(r.signer?.address)return r.signer.address;if(r.account?.address)return r.account.address;if(r.account?.signer?.address)return r.account.signer.address},"getAddress"),Fe=s((r,e)=>{let t=Ts(r,e);if(!t)throw new Error("No address provided");return {...e,address:t}},"addAddress");var vs=s((r,e)=>{if(e)return "sign"in e?e:e.signer;if(r.signer)return r.signer;if(r.account?.signer)return r.account.signer},"getSigner"),qs=s((r,e)=>{if(e.address)return e.address;if(r.signer?.address)return r.signer.address;if(r.account?.address)return r.account.address;if(r.account?.signer?.address)return r.account.signer.address},"getAddress"),_=class extends x{async build(e){let t=qs(this.client.options,e);if(!t)throw new Error("Invalid address");return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:"build",data:{...e,address:t}})).data}async getFee(e){return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:"calculate-fee",data:e})).data}async sign(e,t){let i=vs(this.client.options,t);if(!i)throw new Error("No signer provided");return i.sign(e)}async submit(e){return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:"submit",data:e})).data}async submitWatch(e,t=this.client.options.signer){let i=await this.client.extrinsic.build(e),n=await this.client.extrinsic.sign(i,t);return await this.client.extrinsic.submit({signerPayloadJSON:i.signerPayloadJSON,signature:n.signature})}async submitWaitResult(e,t=this.client.options.signer){let{hash:i}=await this.client.extrinsic.submitWatch(e,t);return this.client.extrinsic.waitResult({hash:i})}async waitResult({hash:e}){let t=this.client.options.statusTotalTimeoutInMs,i=this.client.options.maximumNumberOfStatusRequests,n=this.client.options.waitBetweenStatusRequestsInMs,a=!1;setTimeout(()=>{a=!0;},t);let u=0;do{let h=await this.client.extrinsic.status({hash:e});if(h.isCompleted||h.error)return h;await or(n),u+=1;}while(!a&&u<i);throw a?new Q(e,t):new V(e,i)}async status(e){return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:"status",params:e})).data}async get(e){return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:"",params:e})).data}};s(_,"Extrinsic");var _e="0.6.2";var K=class{constructor(e){o(this,"instance");o(this,"options");o(this,"extrinsic");this.options=e,this.checkOptions(),this.instance=ar.default.create({baseURL:`${this.options.baseUrl}`,maxContentLength:1/0,maxBodyLength:1/0}),this.instance.interceptors.response.use(t=>t,t=>{let i=t.response?.data?.error;throw i&&typeof i=="object"?new G(i):t}),(this.instance.defaults.headers.common["X-SDK-Version"]=_e),this.extrinsic=new _(this,"extrinsic");}checkOptions(){let{baseUrl:e}=this.options;if(!this.options.baseUrl)throw new Error("'baseUrl' option is required");this.options.baseUrl=e.replace(/\/$/,""),this.options.statusTotalTimeoutInMs||(this.options.statusTotalTimeoutInMs=3*60*1e3),this.options.maximumNumberOfStatusRequests||(this.options.maximumNumberOfStatusRequests=Number.MAX_SAFE_INTEGER),this.options.waitBetweenStatusRequestsInMs||(this.options.waitBetweenStatusRequestsInMs=5e3);}};s(K,"BaseClient");var ce=class{constructor(e,t,i){o(this,"client");o(this,"method");o(this,"path");o(this,"url");this.client=e,this.method=t,this.path=i,this.url=`${this.client.options.baseUrl}/${this.path}`;}async buildBatch(e,t){let i=e.map(a=>Fe(this.client.options,a));return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"BuildBatch"},data:i})).data}async build(e,t){let i=Fe(this.client.options,e);return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"Build"},data:i})).data}async getFee(e){return (await this.client.instance({method:this.method,url:this.url,params:{use:"GetFee"},data:e}))?.data}async sign(e,t){let i=Le(e)?e:await this.build(e,t),{signerPayloadJSON:n}=i,{signature:a}=await this.client.extrinsic.sign(i,t?.signer);return {signature:a,signerPayloadJSON:n}}async submit(e,t){let i=Be(e)?e:await this.sign(e,t);return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"Submit"},data:i})).data}async submitWatch(e,t){let i=Be(e)?e:await this.sign(e,t);return (await this.client.instance({method:this.method,url:this.url,params:{...t,use:"SubmitWatch"},data:i})).data}async submitWaitResult(e,t){let{hash:i}=await this.submitWatch(e,t);return this.client.extrinsic.waitResult({hash:i})}};s(ce,"MutationAbstract");var Os=s(class extends ce{},"Mutation");function Rs(r){let e=s((t,i)=>r.submitWaitResult(t,i),"submitWaitResult");return e.build=r.build.bind(r),e.buildBatch=r.buildBatch.bind(r),e.getFee=r.getFee.bind(r),e.sign=r.sign.bind(r),e.submit=r.submit.bind(r),e.submitWatch=r.submitWatch.bind(r),e.submitWaitResult=r.submitWaitResult.bind(r),e}s(Rs,"createMutationByInstance");function p(r,e,t){let i=new Os(r,e,t);return Rs(i)}s(p,"createMutationEx");var j=class extends x{constructor(){super(...arguments);o(this,"transfer",p(this.client,l.POST,`${this.path}/transfer`));o(this,"get",s(t=>this.query("",t),"get"));}};s(j,"Balance");var $=class extends x{constructor(){super(...arguments);o(this,"setProperties",p(this.client,l.POST,`${this.path}/properties`));o(this,"deleteProperties",p(this.client,l.DELETE,`${this.path}/properties`));o(this,"setPropertyPermissions",p(this.client,l.POST,`${this.path}/property-permissions`));o(this,"properties",s(t=>this.query("properties",t),"properties"));o(this,"tokens",s(t=>this.query("tokens",t),"tokens"));o(this,"propertyPermissions",s(t=>this.query("property-permissions",t),"propertyPermissions"));o(this,"creation",p(this.client,l.POST,this.path));o(this,"create",p(this.client,l.POST,this.path));o(this,"getLimits",s(t=>this.query("limits",t),"getLimits"));o(this,"setLimits",p(this.client,l.POST,`${this.path}/set-limits`));o(this,"get",s(t=>this.query("",t),"get"));o(this,"transfer",p(this.client,l.PATCH,`${this.path}/transfer`));o(this,"destroy",p(this.client,l.DELETE,this.path));o(this,"stats",s(()=>this.query("stats"),"stats"));o(this,"setTransfersEnabled",p(this.client,l.POST,`${this.path}/transfers-enabled`));o(this,"setPermissions",p(this.client,l.POST,`${this.path}/permissions`));o(this,"nextSponsored",s(t=>this.query("next-sponsored",t),"nextSponsored"));o(this,"lastTokenId",s(t=>this.query("last-token-id",t),"lastTokenId"));o(this,"allowList",s(t=>this.query("allow-list",t),"allowList"));o(this,"allowed",s(t=>this.query("allowed",t),"allowed"));o(this,"addToAllowList",p(this.client,l.POST,`${this.path}/add-to-allow-list`));o(this,"removeFromAllowList",p(this.client,l.POST,`${this.path}/remove-from-allow-list`));o(this,"admins",s(t=>this.query("admins",t),"admins"));o(this,"addAdmin",p(this.client,l.POST,`${this.path}/admins`));o(this,"removeAdmin",p(this.client,l.DELETE,`${this.path}/admins`));o(this,"setSponsorship",p(this.client,l.POST,`${this.path}/sponsorship`));o(this,"confirmSponsorship",p(this.client,l.POST,`${this.path}/sponsorship/confirm`));o(this,"removeSponsorship",p(this.client,l.DELETE,`${this.path}/sponsorship`));o(this,"totalSupply",s(t=>this.query("total-supply",t),"totalSupply"));}};s($,"Collection");var I=class extends x{constructor(){super(...arguments);o(this,"createCollection",p(this.client,l.POST,`${this.path}/collection`));o(this,"createToken",p(this.client,l.POST,`${this.path}/token`));}};s(I,"ERC721");var M=class extends x{constructor(){super(...arguments);o(this,"transfer",p(this.client,l.POST,`${this.path}/transfer`));o(this,"getCollection",s(t=>this.query("collection",t),"getCollection"));o(this,"burn",p(this.client,l.DELETE,this.path));o(this,"createCollection",p(this.client,l.POST,`${this.path}/collection`));o(this,"getBalance",s(t=>this.query("balance",t),"getBalance"));o(this,"addTokens",p(this.client,l.POST,`${this.path}/tokens`));o(this,"transferTokens",p(this.client,l.POST,`${this.path}/tokens/transfer`));o(this,"approveTokens",p(this.client,l.POST,`${this.path}/tokens/approve`));o(this,"allowanceTokens",s(t=>this.query("tokens/allowance",t),"allowanceTokens"));o(this,"totalPieces",s(t=>this.query("total-pieces",t),"totalPieces"));}};s(M,"Fungible");var H=class extends x{constructor(){super(...arguments);o(this,"getCollection",s(t=>this.query("collection",t),"getCollection"));o(this,"burn",p(this.client,l.DELETE,this.path));o(this,"getBalance",s(t=>this.query("tokens/balance",t),"getBalance"));o(this,"createCollection",p(this.client,l.POST,`${this.path}/collection`));o(this,"createToken",p(this.client,l.POST,`${this.path}/tokens`));o(this,"transferToken",p(this.client,l.POST,`${this.path}/tokens/transfer`));o(this,"approveToken",p(this.client,l.POST,`${this.path}/tokens/approve`));o(this,"allowanceToken",s(t=>this.query("tokens/allowance",t),"allowanceToken"));o(this,"repartitionToken",p(this.client,l.POST,`${this.path}/tokens/repartition`));o(this,"totalPieces",s(t=>this.query("tokens/total-pieces",t),"totalPieces"));o(this,"accountTokens",s(t=>this.query("tokens/account-tokens",t),"accountTokens"));}};s(H,"Refungible");var le=Ie(cr(),1);var Ps=s(r=>Object.hasOwnProperty.call(r,"content"),"isFileLike"),P=class extends x{constructor(){super(...arguments);o(this,"headers",{"Content-Type":"multipart/form-data"});}async uploadFile({file:t}){let i=new le.default;return i.append("file",t,"file"),(await this.client.instance({method:l.POST,url:`${this.baseUrl}/upload-file`,data:i,headers:this.headers})).data}async uploadFiles({files:t}){let i=P.filesToFormData(t);return (await this.client.instance({method:l.POST,url:`${this.baseUrl}/upload-files`,data:i,headers:this.headers})).data}async addFiles({cid:t,files:i}){let n=P.filesToFormData(i);return n.append("cid",t),(await this.client.instance({method:l.PATCH,url:`${this.baseUrl}/add-files`,data:n,headers:this.headers})).data}async uploadZip({file:t}){let i=new le.default;return i.append("file",t,"file"),(await this.client.instance({method:l.POST,url:`${this.baseUrl}/upload-zip`,data:i,headers:{"Content-Type":"multipart/form-data"}})).data}static filesToFormData(t){let i=new le.default;return t.forEach(n=>{i.append("files",Ps(n)?n.content:n,n.name);}),i}};s(P,"Ipfs");var W=class extends x{constructor(){super(...arguments);o(this,"setProperties",p(this.client,l.POST,`${this.path}/properties`));o(this,"deleteProperties",p(this.client,l.DELETE,`${this.path}/properties`));o(this,"properties",s(t=>this.query("properties",t),"properties"));o(this,"create",p(this.client,l.POST,this.path));o(this,"createMultiple",p(this.client,l.POST,`${this.path}/create-multiple`));o(this,"accountTokens",s(t=>this.query("account-tokens",t),"accountTokens"));o(this,"get",s(t=>this.query("",t),"get"));o(this,"exists",s(t=>this.query("exists",t),"exists"));o(this,"children",s(t=>this.query("children",t),"children"));o(this,"parent",s(t=>this.query("parent",t),"parent"));o(this,"owner",s(t=>this.query("owner",t),"owner"));o(this,"topmostOwner",s(t=>this.query("topmost-owner",t),"topmostOwner"));o(this,"nest",p(this.client,l.POST,`${this.path}/nest`));o(this,"unnest",p(this.client,l.POST,`${this.path}/unnest`));o(this,"burn",p(this.client,l.DELETE,this.path));o(this,"transfer",p(this.client,l.PATCH,`${this.path}/transfer`));o(this,"approve",p(this.client,l.POST,`${this.path}/approve`));o(this,"allowance",s(t=>this.query("allowance",t),"allowance"));o(this,"isBundle",s(t=>this.query("is-bundle",t),"isBundle"));o(this,"getBundle",s(t=>this.query("get-bundle",t),"getBundle"));o(this,"balance",s(t=>this.query("balance",t),"balance"));}};s(W,"Token");var X=class extends x{constructor(){super(...arguments);o(this,"chainProperties",s(()=>this.query("chain-properties"),"chainProperties"));o(this,"getNonce",s(t=>this.query("nonce",t),"getNonce"));o(this,"batch",p(this.client,l.POST,`${this.path}/batching`));}};s(X,"Common");var Y=class extends x{async get(e){let{endpoint:t,module:i,method:n}=e,a=`${t}/${i}/${n}`;return (await this.client.instance({method:l.GET,baseURL:this.baseUrl,url:a})).data}async execute(e,t){let{endpoint:i,module:n,method:a}=e,u=`${i}/${n}/${a}`;return (await this.client.instance({method:l.POST,baseURL:this.baseUrl,url:u,data:t||{}})).data}};s(Y,"StateQueries");var lr;(function(r){r.opal="opal",r.sapphire="sapphire",r.quartz="quartz",r.unique="unique";})(lr||(lr={}));var Z=class extends K{constructor(t){super(t);o(this,"options");o(this,"common");o(this,"balance");o(this,"fungible");o(this,"refungible");o(this,"collection");o(this,"token");o(this,"erc721");o(this,"ipfs");o(this,"stateQuery");o(this,"defaults");this.options=t,this.defaults={baseUrl:""},this.common=new X(this,"common"),this.balance=new j(this,"balance"),this.fungible=new M(this,"fungible"),this.refungible=new H(this,"refungible"),this.collection=new $(this,"collections"),this.token=new W(this,"tokens"),this.erc721=new I(this,"erc721"),this.ipfs=new P(this,"ipfs"),this.stateQuery=new Y(this,"query");}};s(Z,"ThinClient");var Mo=Z;
return Uo;
return Mo;

@@ -9,0 +9,0 @@ })();

@@ -25,2 +25,32 @@ var __defProp = Object.defineProperty;

// packages/sdk/src/errors/max-status-requests-error.ts
var MaxStatusRequestsError = class extends Error {
constructor(txHash, limit) {
const message = `Extrinsic status was not changed within the specified count of status requests (${limit}).`;
super(message);
__publicField(this, "details");
__publicField(this, "txHash");
__publicField(this, "limit");
this.details = `${message} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`;
this.txHash = txHash;
this.limit = limit;
}
};
__name(MaxStatusRequestsError, "MaxStatusRequestsError");
// packages/sdk/src/errors/timeout-error.ts
var TimeoutError = class extends Error {
constructor(txHash, timeoutMs) {
const message = `Extrinsic status was not changed within the specified time (${timeoutMs} ms).`;
super(message);
__publicField(this, "details");
__publicField(this, "txHash");
__publicField(this, "timeoutMs");
this.details = `${message} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`;
this.txHash = txHash;
this.timeoutMs = timeoutMs;
}
};
__name(TimeoutError, "TimeoutError");
// packages/sdk/src/types/enums.ts

@@ -208,7 +238,17 @@ var Method;

const { hash } = await this.client.extrinsic.submitWatch(args, signer);
let checkStatusResult;
let i = 0;
while ((!checkStatusResult || !checkStatusResult?.isCompleted) && i <= this.client.options.maximumNumberOfStatusRequests) {
i += 1;
checkStatusResult = await this.client.extrinsic.status({
return this.client.extrinsic.waitResult({
hash
});
}
async waitResult({ hash }) {
const timeout = this.client.options.statusTotalTimeoutInMs;
const maxRequests = this.client.options.maximumNumberOfStatusRequests;
const waitTime = this.client.options.waitBetweenStatusRequestsInMs;
let isTimeExceeded = false;
setTimeout(() => {
isTimeExceeded = true;
}, timeout);
let requestCount = 0;
do {
const checkStatusResult = await this.client.extrinsic.status({
hash

@@ -219,5 +259,8 @@ });

}
await sleep(this.client.options.waitBetweenStatusRequestsInMs);
}
throw new Error();
await sleep(waitTime);
requestCount += 1;
} while (!isTimeExceeded && requestCount < maxRequests);
if (isTimeExceeded)
throw new TimeoutError(hash, timeout);
throw new MaxStatusRequestsError(hash, maxRequests);
}

@@ -246,3 +289,3 @@ async status(args) {

// packages/sdk/package.json
var version = "0.6.1";
var version = "0.6.2";

@@ -256,3 +299,3 @@ // packages/sdk/src/common/base-client.ts

this.options = options;
this.setDefaultOptions();
this.checkOptions();
this.instance = Axios.create({

@@ -272,6 +315,17 @@ baseURL: `${this.options.baseUrl}`,

}
setDefaultOptions() {
this.options.baseUrl = this.options.baseUrl.replace(/\/$/, "");
this.options.maximumNumberOfStatusRequests = this.options.maximumNumberOfStatusRequests || 5;
this.options.waitBetweenStatusRequestsInMs = this.options.waitBetweenStatusRequestsInMs || 5e3;
checkOptions() {
const { baseUrl } = this.options;
if (!this.options.baseUrl) {
throw new Error(`'baseUrl' option is required`);
}
this.options.baseUrl = baseUrl.replace(/\/$/, "");
if (!this.options.statusTotalTimeoutInMs) {
this.options.statusTotalTimeoutInMs = 3 * 60 * 1e3;
}
if (!this.options.maximumNumberOfStatusRequests) {
this.options.maximumNumberOfStatusRequests = Number.MAX_SAFE_INTEGER;
}
if (!this.options.waitBetweenStatusRequestsInMs) {
this.options.waitBetweenStatusRequestsInMs = 5e3;
}
}

@@ -367,15 +421,5 @@ };

const { hash } = await this.submitWatch(args, options);
let checkStatusResult;
let i = 0;
while ((!checkStatusResult || !checkStatusResult?.isCompleted) && i <= this.client.options.maximumNumberOfStatusRequests) {
i += 1;
checkStatusResult = await this.client.extrinsic.status({
hash
});
if (checkStatusResult.isCompleted || checkStatusResult.error) {
return checkStatusResult;
}
await sleep(this.client.options.waitBetweenStatusRequestsInMs);
}
throw new Error();
return this.client.extrinsic.waitResult({
hash
});
}

@@ -382,0 +426,0 @@ };

@@ -204,15 +204,5 @@ var __defProp = Object.defineProperty;

const { hash } = await this.submitWatch(args, options);
let checkStatusResult;
let i = 0;
while ((!checkStatusResult || !checkStatusResult?.isCompleted) && i <= this.client.options.maximumNumberOfStatusRequests) {
i += 1;
checkStatusResult = await this.client.extrinsic.status({
hash
});
if (checkStatusResult.isCompleted || checkStatusResult.error) {
return checkStatusResult;
}
await sleep(this.client.options.waitBetweenStatusRequestsInMs);
}
throw new Error();
return this.client.extrinsic.waitResult({
hash
});
}

@@ -310,2 +300,45 @@ };

// packages/sdk/src/errors/api-error.ts
var ApiError = class extends Error {
constructor(responseError) {
super(responseError.message);
__publicField(this, "code");
__publicField(this, "details");
this.code = responseError.code;
this.name = responseError.name;
this.details = responseError.details;
}
};
__name(ApiError, "ApiError");
// packages/sdk/src/errors/max-status-requests-error.ts
var MaxStatusRequestsError = class extends Error {
constructor(txHash, limit) {
const message = `Extrinsic status was not changed within the specified count of status requests (${limit}).`;
super(message);
__publicField(this, "details");
__publicField(this, "txHash");
__publicField(this, "limit");
this.details = `${message} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`;
this.txHash = txHash;
this.limit = limit;
}
};
__name(MaxStatusRequestsError, "MaxStatusRequestsError");
// packages/sdk/src/errors/timeout-error.ts
var TimeoutError = class extends Error {
constructor(txHash, timeoutMs) {
const message = `Extrinsic status was not changed within the specified time (${timeoutMs} ms).`;
super(message);
__publicField(this, "details");
__publicField(this, "txHash");
__publicField(this, "timeoutMs");
this.details = `${message} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`;
this.txHash = txHash;
this.timeoutMs = timeoutMs;
}
};
__name(TimeoutError, "TimeoutError");
// packages/sdk/src/sections/extrinsic.ts

@@ -384,7 +417,17 @@ var getSigner = /* @__PURE__ */ __name((options, accountOrSigner) => {

const { hash } = await this.client.extrinsic.submitWatch(args, signer);
let checkStatusResult;
let i = 0;
while ((!checkStatusResult || !checkStatusResult?.isCompleted) && i <= this.client.options.maximumNumberOfStatusRequests) {
i += 1;
checkStatusResult = await this.client.extrinsic.status({
return this.client.extrinsic.waitResult({
hash
});
}
async waitResult({ hash }) {
const timeout = this.client.options.statusTotalTimeoutInMs;
const maxRequests = this.client.options.maximumNumberOfStatusRequests;
const waitTime = this.client.options.waitBetweenStatusRequestsInMs;
let isTimeExceeded = false;
setTimeout(() => {
isTimeExceeded = true;
}, timeout);
let requestCount = 0;
do {
const checkStatusResult = await this.client.extrinsic.status({
hash

@@ -395,5 +438,8 @@ });

}
await sleep(this.client.options.waitBetweenStatusRequestsInMs);
}
throw new Error();
await sleep(waitTime);
requestCount += 1;
} while (!isTimeExceeded && requestCount < maxRequests);
if (isTimeExceeded)
throw new TimeoutError(hash, timeout);
throw new MaxStatusRequestsError(hash, maxRequests);
}

@@ -792,17 +838,4 @@ async status(args) {

// packages/sdk/src/errors/api-error.ts
var ApiError = class extends Error {
constructor(responseError) {
super(responseError.message);
__publicField(this, "code");
__publicField(this, "details");
this.code = responseError.code;
this.name = responseError.name;
this.details = responseError.details;
}
};
__name(ApiError, "ApiError");
// packages/sdk/package.json
var version = "0.6.1";
var version = "0.6.2";

@@ -816,3 +849,3 @@ // packages/sdk/src/common/base-client.ts

this.options = options;
this.setDefaultOptions();
this.checkOptions();
this.instance = Axios.create({

@@ -832,6 +865,17 @@ baseURL: `${this.options.baseUrl}`,

}
setDefaultOptions() {
this.options.baseUrl = this.options.baseUrl.replace(/\/$/, "");
this.options.maximumNumberOfStatusRequests = this.options.maximumNumberOfStatusRequests || 5;
this.options.waitBetweenStatusRequestsInMs = this.options.waitBetweenStatusRequestsInMs || 5e3;
checkOptions() {
const { baseUrl } = this.options;
if (!this.options.baseUrl) {
throw new Error(`'baseUrl' option is required`);
}
this.options.baseUrl = baseUrl.replace(/\/$/, "");
if (!this.options.statusTotalTimeoutInMs) {
this.options.statusTotalTimeoutInMs = 3 * 60 * 1e3;
}
if (!this.options.maximumNumberOfStatusRequests) {
this.options.maximumNumberOfStatusRequests = Number.MAX_SAFE_INTEGER;
}
if (!this.options.waitBetweenStatusRequestsInMs) {
this.options.waitBetweenStatusRequestsInMs = 5e3;
}
}

@@ -1149,2 +1193,18 @@ };

__name(Sdk, "Sdk");
var Opal = /* @__PURE__ */ __name((options) => new Sdk({
baseUrl: CHAIN_CONFIG.opal.restUrl,
...options
}), "Opal");
var Quartz = /* @__PURE__ */ __name((options) => new Sdk({
baseUrl: CHAIN_CONFIG.quartz.restUrl,
...options
}), "Quartz");
var Sapphire = /* @__PURE__ */ __name((options) => new Sdk({
baseUrl: CHAIN_CONFIG.sapphire.restUrl,
...options
}), "Sapphire");
var Unique = /* @__PURE__ */ __name((options) => new Sdk({
baseUrl: CHAIN_CONFIG.unique.restUrl,
...options
}), "Unique");
var Client = Sdk;

@@ -1157,6 +1217,10 @@ export {

Method,
Opal,
Quartz,
Rooms,
Sapphire,
Sdk,
SubscriptionEvents
SubscriptionEvents,
Unique
};
//# sourceMappingURL=full.js.map

@@ -25,2 +25,32 @@ var __defProp = Object.defineProperty;

// packages/sdk/src/errors/max-status-requests-error.ts
var MaxStatusRequestsError = class extends Error {
constructor(txHash, limit) {
const message = `Extrinsic status was not changed within the specified count of status requests (${limit}).`;
super(message);
__publicField(this, "details");
__publicField(this, "txHash");
__publicField(this, "limit");
this.details = `${message} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`;
this.txHash = txHash;
this.limit = limit;
}
};
__name(MaxStatusRequestsError, "MaxStatusRequestsError");
// packages/sdk/src/errors/timeout-error.ts
var TimeoutError = class extends Error {
constructor(txHash, timeoutMs) {
const message = `Extrinsic status was not changed within the specified time (${timeoutMs} ms).`;
super(message);
__publicField(this, "details");
__publicField(this, "txHash");
__publicField(this, "timeoutMs");
this.details = `${message} This does not mean that the Extrinsic has failed nor that it will be included in the future. You can check the status of the Extrinsic by calling the getStatus() method.`;
this.txHash = txHash;
this.timeoutMs = timeoutMs;
}
};
__name(TimeoutError, "TimeoutError");
// packages/sdk/src/types/enums.ts

@@ -208,7 +238,17 @@ var Method;

const { hash } = await this.client.extrinsic.submitWatch(args, signer);
let checkStatusResult;
let i = 0;
while ((!checkStatusResult || !checkStatusResult?.isCompleted) && i <= this.client.options.maximumNumberOfStatusRequests) {
i += 1;
checkStatusResult = await this.client.extrinsic.status({
return this.client.extrinsic.waitResult({
hash
});
}
async waitResult({ hash }) {
const timeout = this.client.options.statusTotalTimeoutInMs;
const maxRequests = this.client.options.maximumNumberOfStatusRequests;
const waitTime = this.client.options.waitBetweenStatusRequestsInMs;
let isTimeExceeded = false;
setTimeout(() => {
isTimeExceeded = true;
}, timeout);
let requestCount = 0;
do {
const checkStatusResult = await this.client.extrinsic.status({
hash

@@ -219,5 +259,8 @@ });

}
await sleep(this.client.options.waitBetweenStatusRequestsInMs);
}
throw new Error();
await sleep(waitTime);
requestCount += 1;
} while (!isTimeExceeded && requestCount < maxRequests);
if (isTimeExceeded)
throw new TimeoutError(hash, timeout);
throw new MaxStatusRequestsError(hash, maxRequests);
}

@@ -246,3 +289,3 @@ async status(args) {

// packages/sdk/package.json
var version = "0.6.1";
var version = "0.6.2";

@@ -256,3 +299,3 @@ // packages/sdk/src/common/base-client.ts

this.options = options;
this.setDefaultOptions();
this.checkOptions();
this.instance = Axios.create({

@@ -272,6 +315,17 @@ baseURL: `${this.options.baseUrl}`,

}
setDefaultOptions() {
this.options.baseUrl = this.options.baseUrl.replace(/\/$/, "");
this.options.maximumNumberOfStatusRequests = this.options.maximumNumberOfStatusRequests || 5;
this.options.waitBetweenStatusRequestsInMs = this.options.waitBetweenStatusRequestsInMs || 5e3;
checkOptions() {
const { baseUrl } = this.options;
if (!this.options.baseUrl) {
throw new Error(`'baseUrl' option is required`);
}
this.options.baseUrl = baseUrl.replace(/\/$/, "");
if (!this.options.statusTotalTimeoutInMs) {
this.options.statusTotalTimeoutInMs = 3 * 60 * 1e3;
}
if (!this.options.maximumNumberOfStatusRequests) {
this.options.maximumNumberOfStatusRequests = Number.MAX_SAFE_INTEGER;
}
if (!this.options.waitBetweenStatusRequestsInMs) {
this.options.waitBetweenStatusRequestsInMs = 5e3;
}
}

@@ -367,15 +421,5 @@ };

const { hash } = await this.submitWatch(args, options);
let checkStatusResult;
let i = 0;
while ((!checkStatusResult || !checkStatusResult?.isCompleted) && i <= this.client.options.maximumNumberOfStatusRequests) {
i += 1;
checkStatusResult = await this.client.extrinsic.status({
hash
});
if (checkStatusResult.isCompleted || checkStatusResult.error) {
return checkStatusResult;
}
await sleep(this.client.options.waitBetweenStatusRequestsInMs);
}
throw new Error();
return this.client.extrinsic.waitResult({
hash
});
}

@@ -382,0 +426,0 @@ };

{
"name": "@unique-nft/sdk",
"version": "0.6.1",
"version": "0.6.2",
"type": "module",

@@ -5,0 +5,0 @@ "homepage": "https://unique.network/",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc