@typeform/api-client
Version:
JS SDK for Typeform API
1 lines • 54.7 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).typeformAPI={})}(this,(function(t){"use strict";const e=window;var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function i(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function a(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function s(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var u,f=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}},c=Object.prototype.toString,h=(u=Object.create(null),function(t){var e=c.call(t);return u[e]||(u[e]=e.slice(8,-1).toLowerCase())});function l(t){return t=t.toLowerCase(),function(e){return h(e)===t}}function p(t){return Array.isArray(t)}function d(t){return void 0===t}var g=l("ArrayBuffer");function y(t){return null!==t&&"object"==typeof t}function m(t){if("object"!==h(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var v=l("Date"),w=l("File"),b=l("Blob"),E=l("FileList");function _(t){return"[object Function]"===c.call(t)}var A=l("URLSearchParams");function R(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),p(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var T,O=(T="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return T&&t instanceof T}),S={isArray:p,isArrayBuffer:g,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return t&&("function"==typeof FormData&&t instanceof FormData||"[object FormData]"===c.call(t)||_(t.toString)&&"[object FormData]"===t.toString())},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&g(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:y,isPlainObject:m,isUndefined:d,isDate:v,isFile:w,isBlob:b,isFunction:_,isStream:function(t){return y(t)&&_(t.pipe)},isURLSearchParams:A,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:R,merge:function t(){var e={};function r(r,n){m(e[n])&&m(r)?e[n]=t(e[n],r):m(r)?e[n]=t({},r):p(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)R(arguments[n],r);return e},extend:function(t,e,r){return R(e,(function(e,n){t[n]=r&&"function"==typeof e?f(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,r&&Object.assign(t.prototype,r)},toFlatObject:function(t,e,r){var n,o,i,a={};e=e||{};do{for(o=(n=Object.getOwnPropertyNames(t)).length;o-- >0;)a[i=n[o]]||(e[i]=t[i],a[i]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:h,kindOfTest:l,endsWith:function(t,e,r){t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return-1!==n&&n===r},toArray:function(t){if(!t)return null;var e=t.length;if(d(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r},isTypedArray:O,isFileList:E};function P(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var U=function(t,e,r){if(!e)return t;var n;if(r)n=r(e);else if(S.isURLSearchParams(e))n=e.toString();else{var o=[];S.forEach(e,(function(t,e){null!=t&&(S.isArray(t)?e+="[]":t=[t],S.forEach(t,(function(t){S.isDate(t)?t=t.toISOString():S.isObject(t)&&(t=JSON.stringify(t)),o.push(P(e)+"="+P(t))})))})),n=o.join("&")}if(n){var i=t.indexOf("#");-1!==i&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t};function C(){this.handlers=[]}C.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},C.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},C.prototype.forEach=function(t){S.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var B=C,x=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function j(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}var N=j,D=k;function L(t){if(N===setTimeout)return setTimeout(t,0);if((N===j||!N)&&setTimeout)return N=setTimeout,setTimeout(t,0);try{return N(t,0)}catch(e){try{return N.call(null,t,0)}catch(e){return N.call(this,t,0)}}}"function"==typeof x.setTimeout&&(N=setTimeout),"function"==typeof x.clearTimeout&&(D=clearTimeout);var I,q=[],M=!1,Y=-1;function z(){M&&I&&(M=!1,I.length?q=I.concat(q):Y=-1,q.length&&F())}function F(){if(!M){var t=L(z);M=!0;for(var e=q.length;e;){for(I=q,q=[];++Y<e;)I&&I[Y].run();Y=-1,e=q.length}I=null,M=!1,function(t){if(D===clearTimeout)return clearTimeout(t);if((D===k||!D)&&clearTimeout)return D=clearTimeout,clearTimeout(t);try{D(t)}catch(e){try{return D.call(null,t)}catch(e){return D.call(this,t)}}}(t)}}function J(t,e){this.fun=t,this.array=e}J.prototype.run=function(){this.fun.apply(null,this.array)};function H(){}var V=H,W=H,K=H,X=H,Q=H,$=H,G=H;var Z=x.performance||{},tt=Z.now||Z.mozNow||Z.msNow||Z.oNow||Z.webkitNow||function(){return(new Date).getTime()};var et=new Date;var rt={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];q.push(new J(t,e)),1!==q.length||M||L(F)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:V,addListener:W,once:K,off:X,removeListener:Q,removeAllListeners:$,emit:G,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*tt.call(Z),r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r-=t[0],(n-=t[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-et)/1e3}},nt=function(t,e){S.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))};function ot(t,e,r,n,o){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}S.inherits(ot,Error,{toJSON: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}}});var it=ot.prototype,at={};["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(t){at[t]={value:t}})),Object.defineProperties(ot,at),Object.defineProperty(it,"isAxiosError",{value:!0}),ot.from=function(t,e,r,n,o,i){var a=Object.create(it);return S.toFlatObject(t,a,(function(t){return t!==Error.prototype})),ot.call(a,t.message,e,r,n,o),a.name=t.name,i&&Object.assign(a,i),a};var st=ot,ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ft=[],ct=[],ht="undefined"!=typeof Uint8Array?Uint8Array:Array,lt=!1;function pt(){lt=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)ft[e]=t[e],ct[t.charCodeAt(e)]=e;ct["-".charCodeAt(0)]=62,ct["_".charCodeAt(0)]=63}function dt(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(ft[(o=n)>>18&63]+ft[o>>12&63]+ft[o>>6&63]+ft[63&o]);return i.join("")}function gt(t){var e;lt||pt();for(var r=t.length,n=r%3,o="",i=[],a=0,s=r-n;a<s;a+=16383)i.push(dt(t,a,a+16383>s?s:a+16383));return 1===n?(e=t[r-1],o+=ft[e>>2],o+=ft[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=ft[e>>10],o+=ft[e>>4&63],o+=ft[e<<2&63],o+="="),i.push(o),i.join("")}function yt(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,f=u>>1,c=-7,h=r?o-1:0,l=r?-1:1,p=t[e+h];for(h+=l,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+t[e+h],h+=l,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=l,c-=8);if(0===i)i=1-f;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=f}return(p?-1:1)*a*Math.pow(2,i-n)}function mt(t,e,r,n,o,i){var a,s,u,f=8*i-o-1,c=(1<<f)-1,h=c>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*u-1)*Math.pow(2,o),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,f+=o;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*g}var vt={}.toString,wt=Array.isArray||function(t){return"[object Array]"==vt.call(t)};function bt(){return _t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Et(t,e){if(bt()<e)throw new RangeError("Invalid typed array length");return _t.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=_t.prototype:(null===t&&(t=new _t(e)),t.length=e),t}function _t(t,e,r){if(!(_t.TYPED_ARRAY_SUPPORT||this instanceof _t))return new _t(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Tt(this,t)}return At(this,t,e,r)}function At(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);_t.TYPED_ARRAY_SUPPORT?(t=e).__proto__=_t.prototype:t=Ot(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!_t.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|Ut(e,r),o=(t=Et(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(Pt(e)){var r=0|St(e.length);return 0===(t=Et(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Et(t,0):Ot(t,e);if("Buffer"===e.type&&wt(e.data))return Ot(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Rt(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Tt(t,e){if(Rt(e),t=Et(t,e<0?0:0|St(e)),!_t.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function Ot(t,e){var r=e.length<0?0:0|St(e.length);t=Et(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function St(t){if(t>=bt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+bt().toString(16)+" bytes");return 0|t}function Pt(t){return!(null==t||!t._isBuffer)}function Ut(t,e){if(Pt(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return re(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ne(t).length;default:if(n)return re(t).length;e=(""+e).toLowerCase(),n=!0}}function Ct(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Ht(this,e,r);case"utf8":case"utf-8":return Yt(this,e,r);case"ascii":return Ft(this,e,r);case"latin1":case"binary":return Jt(this,e,r);case"base64":return Mt(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Vt(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Bt(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function xt(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=_t.from(e,n)),Pt(e))return 0===e.length?-1:jt(t,e,r,n,o);if("number"==typeof e)return e&=255,_t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):jt(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function jt(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var c=-1;for(i=r;i<s;i++)if(f(t,i)===f(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var h=!0,l=0;l<u;l++)if(f(t,i+l)!==f(e,l)){h=!1;break}if(h)return i}return-1}function kt(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function Nt(t,e,r,n){return oe(re(e,t.length-r),t,r,n)}function Dt(t,e,r,n){return oe(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function Lt(t,e,r,n){return Dt(t,e,r,n)}function It(t,e,r,n){return oe(ne(e),t,r,n)}function qt(t,e,r,n){return oe(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function Mt(t,e,r){return 0===e&&r===t.length?gt(t):gt(t.slice(e,r))}function Yt(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,s,u,f=t[o],c=null,h=f>239?4:f>223?3:f>191?2:1;if(o+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&f)<<6|63&i)>127&&(c=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&f)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=h}return function(t){var e=t.length;if(e<=zt)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=zt));return r}(n)}_t.TYPED_ARRAY_SUPPORT=void 0===x.TYPED_ARRAY_SUPPORT||x.TYPED_ARRAY_SUPPORT,_t.poolSize=8192,_t._augment=function(t){return t.__proto__=_t.prototype,t},_t.from=function(t,e,r){return At(null,t,e,r)},_t.TYPED_ARRAY_SUPPORT&&(_t.prototype.__proto__=Uint8Array.prototype,_t.__proto__=Uint8Array),_t.alloc=function(t,e,r){return function(t,e,r,n){return Rt(e),e<=0?Et(t,e):void 0!==r?"string"==typeof n?Et(t,e).fill(r,n):Et(t,e).fill(r):Et(t,e)}(null,t,e,r)},_t.allocUnsafe=function(t){return Tt(null,t)},_t.allocUnsafeSlow=function(t){return Tt(null,t)},_t.isBuffer=function(t){return null!=t&&(!!t._isBuffer||ie(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&ie(t.slice(0,0))}(t))},_t.compare=function(t,e){if(!Pt(t)||!Pt(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},_t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},_t.concat=function(t,e){if(!wt(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return _t.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=_t.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!Pt(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},_t.byteLength=Ut,_t.prototype._isBuffer=!0,_t.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Bt(this,e,e+1);return this},_t.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Bt(this,e,e+3),Bt(this,e+1,e+2);return this},_t.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Bt(this,e,e+7),Bt(this,e+1,e+6),Bt(this,e+2,e+5),Bt(this,e+3,e+4);return this},_t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Yt(this,0,t):Ct.apply(this,arguments)},_t.prototype.equals=function(t){if(!Pt(t))throw new TypeError("Argument must be a Buffer");return this===t||0===_t.compare(this,t)},_t.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},_t.prototype.compare=function(t,e,r,n,o){if(!Pt(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),u=this.slice(n,o),f=t.slice(e,r),c=0;c<s;++c)if(u[c]!==f[c]){i=u[c],a=f[c];break}return i<a?-1:a<i?1:0},_t.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},_t.prototype.indexOf=function(t,e,r){return xt(this,t,e,r,!0)},_t.prototype.lastIndexOf=function(t,e,r){return xt(this,t,e,r,!1)},_t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return kt(this,t,e,r);case"utf8":case"utf-8":return Nt(this,t,e,r);case"ascii":return Dt(this,t,e,r);case"latin1":case"binary":return Lt(this,t,e,r);case"base64":return It(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},_t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var zt=4096;function Ft(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function Jt(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function Ht(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=ee(t[i]);return o}function Vt(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function Wt(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function Kt(t,e,r,n,o,i){if(!Pt(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Xt(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function Qt(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function $t(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Gt(t,e,r,n,o){return o||$t(t,0,r,4),mt(t,e,r,n,23,4),r+4}function Zt(t,e,r,n,o){return o||$t(t,0,r,8),mt(t,e,r,n,52,8),r+8}_t.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),_t.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=_t.prototype;else{var o=e-t;r=new _t(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},_t.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||Wt(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},_t.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||Wt(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},_t.prototype.readUInt8=function(t,e){return e||Wt(t,1,this.length),this[t]},_t.prototype.readUInt16LE=function(t,e){return e||Wt(t,2,this.length),this[t]|this[t+1]<<8},_t.prototype.readUInt16BE=function(t,e){return e||Wt(t,2,this.length),this[t]<<8|this[t+1]},_t.prototype.readUInt32LE=function(t,e){return e||Wt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},_t.prototype.readUInt32BE=function(t,e){return e||Wt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},_t.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||Wt(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},_t.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||Wt(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},_t.prototype.readInt8=function(t,e){return e||Wt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},_t.prototype.readInt16LE=function(t,e){e||Wt(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},_t.prototype.readInt16BE=function(t,e){e||Wt(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},_t.prototype.readInt32LE=function(t,e){return e||Wt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},_t.prototype.readInt32BE=function(t,e){return e||Wt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},_t.prototype.readFloatLE=function(t,e){return e||Wt(t,4,this.length),yt(this,t,!0,23,4)},_t.prototype.readFloatBE=function(t,e){return e||Wt(t,4,this.length),yt(this,t,!1,23,4)},_t.prototype.readDoubleLE=function(t,e){return e||Wt(t,8,this.length),yt(this,t,!0,52,8)},_t.prototype.readDoubleBE=function(t,e){return e||Wt(t,8,this.length),yt(this,t,!1,52,8)},_t.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Kt(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},_t.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Kt(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},_t.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,1,255,0),_t.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},_t.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,2,65535,0),_t.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Xt(this,t,e,!0),e+2},_t.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,2,65535,0),_t.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Xt(this,t,e,!1),e+2},_t.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,4,4294967295,0),_t.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):Qt(this,t,e,!0),e+4},_t.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,4,4294967295,0),_t.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Qt(this,t,e,!1),e+4},_t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);Kt(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},_t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);Kt(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},_t.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,1,127,-128),_t.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},_t.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,2,32767,-32768),_t.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Xt(this,t,e,!0),e+2},_t.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,2,32767,-32768),_t.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Xt(this,t,e,!1),e+2},_t.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,4,2147483647,-2147483648),_t.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Qt(this,t,e,!0),e+4},_t.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||Kt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),_t.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Qt(this,t,e,!1),e+4},_t.prototype.writeFloatLE=function(t,e,r){return Gt(this,t,e,!0,r)},_t.prototype.writeFloatBE=function(t,e,r){return Gt(this,t,e,!1,r)},_t.prototype.writeDoubleLE=function(t,e,r){return Zt(this,t,e,!0,r)},_t.prototype.writeDoubleBE=function(t,e,r){return Zt(this,t,e,!1,r)},_t.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!_t.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},_t.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!_t.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=Pt(t)?t:re(new _t(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var te=/[^+\/0-9A-Za-z-_]/g;function ee(t){return t<16?"0"+t.toString(16):t.toString(16)}function re(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function ne(t){return function(t){var e,r,n,o,i,a;lt||pt();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[s-2]?2:"="===t[s-1]?1:0,a=new ht(3*s/4-i),n=i>0?s-4:s;var u=0;for(e=0,r=0;e<n;e+=4,r+=3)o=ct[t.charCodeAt(e)]<<18|ct[t.charCodeAt(e+1)]<<12|ct[t.charCodeAt(e+2)]<<6|ct[t.charCodeAt(e+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=ct[t.charCodeAt(e)]<<2|ct[t.charCodeAt(e+1)]>>4,a[u++]=255&o):1===i&&(o=ct[t.charCodeAt(e)]<<10|ct[t.charCodeAt(e+1)]<<4|ct[t.charCodeAt(e+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(te,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function oe(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function ie(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var ae=function(t,e){e=e||new FormData;var r=[];function n(t){return null===t?"":S.isDate(t)?t.toISOString():S.isArrayBuffer(t)||S.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):_t.from(t):t}return function t(o,i){if(S.isPlainObject(o)||S.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+i);r.push(o),S.forEach(o,(function(r,o){if(!S.isUndefined(r)){var a,s=i?i+"."+o:o;if(r&&!i&&"object"==typeof r)if(S.endsWith(o,"{}"))r=JSON.stringify(r);else if(S.endsWith(o,"[]")&&(a=S.toArray(r)))return void a.forEach((function(t){!S.isUndefined(t)&&e.append(s,n(t))}));t(r,s)}})),r.pop()}else e.append(i,n(o))}(t),e},se=function(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new st("Request failed with status code "+r.status,[st.ERR_BAD_REQUEST,st.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)},ue=S.isStandardBrowserEnv()?{write:function(t,e,r,n,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),S.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),S.isString(n)&&a.push("path="+n),S.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},fe=function(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e},ce=["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"],he=function(t){var e,r,n,o={};return t?(S.forEach(t.split("\n"),(function(t){if(n=t.indexOf(":"),e=S.trim(t.substr(0,n)).toLowerCase(),r=S.trim(t.substr(n+1)),e){if(o[e]&&ce.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([r]):o[e]?o[e]+", "+r:r}})),o):o},le=S.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=n(window.location.href),function(e){var r=S.isString(e)?n(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0};function pe(t){st.call(this,null==t?"canceled":t,st.ERR_CANCELED),this.name="CanceledError"}S.inherits(pe,st,{__CANCEL__:!0});var de=pe,ge=function(t){return new Promise((function(e,r){var n,o=t.data,i=t.headers,a=t.responseType;function s(){t.cancelToken&&t.cancelToken.unsubscribe(n),t.signal&&t.signal.removeEventListener("abort",n)}S.isFormData(o)&&S.isStandardBrowserEnv()&&delete i["Content-Type"];var u=new XMLHttpRequest;if(t.auth){var f=t.auth.username||"",c=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.Authorization="Basic "+btoa(f+":"+c)}var h=fe(t.baseURL,t.url);function l(){if(u){var n="getAllResponseHeaders"in u?he(u.getAllResponseHeaders()):null,o={data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:t,request:u};se((function(t){e(t),s()}),(function(t){r(t),s()}),o),u=null}}if(u.open(t.method.toUpperCase(),U(h,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(new st("Request aborted",st.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new st("Network Error",st.ERR_NETWORK,t,u,u)),u=null},u.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",n=t.transitional||ut;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new st(e,n.clarifyTimeoutError?st.ETIMEDOUT:st.ECONNABORTED,t,u)),u=null},S.isStandardBrowserEnv()){var p=(t.withCredentials||le(h))&&t.xsrfCookieName?ue.read(t.xsrfCookieName):void 0;p&&(i[t.xsrfHeaderName]=p)}"setRequestHeader"in u&&S.forEach(i,(function(t,e){void 0===o&&"content-type"===e.toLowerCase()?delete i[e]:u.setRequestHeader(e,t)})),S.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),a&&"json"!==a&&(u.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&u.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(n=function(t){u&&(r(!t||t&&t.type?new de:t),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(n),t.signal&&(t.signal.aborted?n():t.signal.addEventListener("abort",n))),o||(o=null);var d,g=(d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(h))&&d[1]||"";g&&-1===["http","https","file"].indexOf(g)?r(new st("Unsupported protocol "+g+":",st.ERR_BAD_REQUEST,t)):u.send(o)}))},ye={"Content-Type":"application/x-www-form-urlencoded"};function me(t,e){!S.isUndefined(t)&&S.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var ve,we={transitional:ut,adapter:("undefined"!=typeof XMLHttpRequest?ve=ge:void 0!==rt&&"[object process]"===Object.prototype.toString.call(rt)&&(ve=ge),ve),transformRequest:[function(t,e){if(nt(e,"Accept"),nt(e,"Content-Type"),S.isFormData(t)||S.isArrayBuffer(t)||S.isBuffer(t)||S.isStream(t)||S.isFile(t)||S.isBlob(t))return t;if(S.isArrayBufferView(t))return t.buffer;if(S.isURLSearchParams(t))return me(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r,n=S.isObject(t),o=e&&e["Content-Type"];if((r=S.isFileList(t))||n&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return ae(r?{"files[]":t}:t,i&&new i)}return n||"application/json"===o?(me(e,"application/json"),function(t,e,r){if(S.isString(t))try{return(e||JSON.parse)(t),S.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||we.transitional,r=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&S.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw st.from(t,st.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};S.forEach(["delete","get","head"],(function(t){we.headers[t]={}})),S.forEach(["post","put","patch"],(function(t){we.headers[t]=S.merge(ye)}));var be=we,Ee=function(t,e,r){var n=this||be;return S.forEach(r,(function(r){t=r.call(n,t,e)})),t},_e=function(t){return!(!t||!t.__CANCEL__)};function Ae(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new de}var Re=function(t){return Ae(t),t.headers=t.headers||{},t.data=Ee.call(t,t.data,t.headers,t.transformRequest),t.headers=S.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),S.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||be.adapter)(t).then((function(e){return Ae(t),e.data=Ee.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return _e(e)||(Ae(t),e&&e.response&&(e.response.data=Ee.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},Te=function(t,e){e=e||{};var r={};function n(t,e){return S.isPlainObject(t)&&S.isPlainObject(e)?S.merge(t,e):S.isPlainObject(e)?S.merge({},e):S.isArray(e)?e.slice():e}function o(r){return S.isUndefined(e[r])?S.isUndefined(t[r])?void 0:n(void 0,t[r]):n(t[r],e[r])}function i(t){if(!S.isUndefined(e[t]))return n(void 0,e[t])}function a(r){return S.isUndefined(e[r])?S.isUndefined(t[r])?void 0:n(void 0,t[r]):n(void 0,e[r])}function s(r){return r in e?n(t[r],e[r]):r in t?n(void 0,t[r]):void 0}var u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials: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,responseEncoding:a,validateStatus:s};return S.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=u[t]||o,n=e(t);S.isUndefined(n)&&e!==s||(r[t]=n)})),r},Oe="0.27.2",Se=Oe,Pe={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){Pe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var Ue={};Pe.transitional=function(t,e,r){function n(t,e){return"[Axios v"+Se+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,o,i){if(!1===t)throw new st(n(o," has been removed"+(e?" in "+e:"")),st.ERR_DEPRECATED);return e&&!Ue[o]&&(Ue[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};var Ce={assertOptions:function(t,e,r){if("object"!=typeof t)throw new st("options must be an object",st.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),o=n.length;o-- >0;){var i=n[o],a=e[i];if(a){var s=t[i],u=void 0===s||a(s,i,t);if(!0!==u)throw new st("option "+i+" must be "+u,st.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new st("Unknown option "+i,st.ERR_BAD_OPTION)}},validators:Pe},Be=Ce.validators;function xe(t){this.defaults=t,this.interceptors={request:new B,response:new B}}xe.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=Te(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;void 0!==r&&Ce.assertOptions(r,{silentJSONParsing:Be.transitional(Be.boolean),forcedJSONParsing:Be.transitional(Be.boolean),clarifyTimeoutError:Be.transitional(Be.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(t){a.push(t.fulfilled,t.rejected)})),!o){var s=[Re,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),i=Promise.resolve(e);s.length;)i=i.then(s.shift(),s.shift());return i}for(var u=e;n.length;){var f=n.shift(),c=n.shift();try{u=f(u)}catch(t){c(t);break}}try{i=Re(u)}catch(t){return Promise.reject(t)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},xe.prototype.getUri=function(t){t=Te(this.defaults,t);var e=fe(t.baseURL,t.url);return U(e,t.params,t.paramsSerializer)},S.forEach(["delete","get","head","options"],(function(t){xe.prototype[t]=function(e,r){return this.request(Te(r||{},{method:t,url:e,data:(r||{}).data}))}})),S.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(Te(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}xe.prototype[t]=e(),xe.prototype[t+"Form"]=e(!0)}));var je=xe;function ke(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e<n;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,n=new Promise((function(t){r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t){r.reason||(r.reason=new de(t),e(r.reason))}))}ke.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ke.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},ke.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},ke.source=function(){var t;return{token:new ke((function(e){t=e})),cancel:t}};var Ne=ke;var De=function t(e){var r=new je(e),n=f(je.prototype.request,r);return S.extend(n,je.prototype,r),S.extend(n,r),n.create=function(r){return t(Te(e,r))},n}(be);De.Axios=je,De.CanceledError=de,De.CancelToken=Ne,De.isCancel=_e,De.VERSION=Oe,De.toFormData=ae,De.AxiosError=st,De.Cancel=De.CanceledError,De.all=function(t){return Promise.all(t)},De.spread=function(t){return function(e){return t.apply(null,e)}},De.isAxiosError=function(t){return S.isObject(t)&&!0===t.isAxiosError};var Le=De,Ie=De;Le.default=Ie;var qe,Me,Ye=Le,ze=["Acme","Arial","Arvo","Avenir Next","Bangers","Cabin","Cabin Condensed","Courier","Crete Round","Dancing Script","Exo","Georgia","Handlee","Helvetica Neue","Karla","Lato","Lekton","Lobster","Lora","McLaren","Montserrat","Nixie One","Old Standard TT","Open Sans","Oswald","Playfair Display","Quicksand","Raleway","Signika","Sniglet","Source Sans Pro","Vollkorn"];qe=t.Typeform||(t.Typeform={}),Me=function(t){function e(e,r,n){var o=t.call(this,r)||this;return o.code=e,o.details=n,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(Error),qe.ApiError=Me;var Fe=function(t,e){void 0===e&&(e={});var r=Object.keys(e).filter((function(t){return void 0!==e[t]&&null!==e[t]})).map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&");return r?"".concat(t,"?").concat(r):t},Je=function(){return new Promise((function(t){return setTimeout(t,500)}))},He=function(t,e){return void 0===e&&(e=1),i(void 0,void 0,void 0,(function(){var r,n,o,i;return a(this,(function(a){switch(a.label){case 0:return[4,Je()];case 1:return a.sent(),[4,t(e,200)];case 2:return r=(a.sent()||{}).items,200!==(n=void 0===r?[]:r).length?[3,4]:[4,He(t,e+1)];case 3:return i=a.sent(),[3,5];case 4:i=[],a.label=5;case 5:return o=i,[2,s(s([],n,!0),o,!0)]}}))}))},Ve=function(t){return i(void 0,void 0,void 0,(function(){var e,r,n,o,i,u,f,c;return a(this,(function(a){switch(a.label){case 0:return[4,t(1,200)];case 1:return e=a.sent()||{},r=e.total_items,n=void 0===r?0:r,o=e.items,c={total_items:n,page_count:1},u=[s([],i=void 0===o?[]:o,!0)],n>i.length?[4,He(t,2)]:[3,3];case 2:return f=a.sent(),[3,4];case 3:f=[],a.label=4;case 4:return[2,(c.items=s.apply(void 0,u.concat([f,!0])),c)]}}))}))},We=function(){function t(t){this._http=t,this._messages=new Ke(t)}return Object.defineProperty(t.prototype,"messages",{get:function(){return this._messages},enumerable:!1,configurable:!0}),t.prototype.create=function(t){var e=t.data;return this._http.request({method:"post",url:"/forms",data:e})},t.prototype.delete=function(t){var e=t.uid;return this._http.request({method:"delete",url:"/forms/".concat(e)})},t.prototype.get=function(t){var e=t.uid;return this._http.request({method:"get",url:"/forms/".concat(e)})},t.prototype.list=function(t){var e=this,r=t||{page:null,pageSize:null,search:null,workspaceId:null},n=r.page,o=r.pageSize,i=r.search,a=r.workspaceId,s=function(t,r){return e._http.request({method:"get",url:"/forms",params:{page:t,page_size:r,search:i,workspace_id:a}})};return"auto"===n?Ve(s):s(n,o)},t.prototype.update=function(t){var e=t.uid,r=t.override,n=t.data,o=r?"put":"patch";return this._http.request({method:o,url:"/forms/".concat(e),data:n})},t}(),Ke=function(){function t(t){this._http=t}return t.prototype.get=function(t){var e=t.uid;return this._http.request({method:"get",url:"/forms/".concat(e,"/messages")})},t.prototype.update=function(t){var e=t.uid,r=t.data;return this._http.request({method:"put",url:"/forms/".concat(e,"/messages"),data:r})},t}(),Xe=function(){function t(t){this._http=t}return t.prototype.add=function(t){var e=t.image,r=t.url,n=t.fileName;return this._http.request({method:"post",url:"/images",data:{image:e,file_name:n,url:r}})},t.prototype.delete=function(t){var e=t.id;return this._http.request({method:"delete",url:"/images/".concat(e)})},t.prototype.get=function(t){var e=t.id,r=t.size,n=t.backgroundSize,o=t.choiceSize,i={method:"get",url:"/images/".concat(e),headers:{Accept:"application/json"}};if(r){if(!["default","thumbnail","mobile"].includes(r))throw new Error("Image size doesn't exist");i.url+="/image/".concat(r)}else if(n){if(!["default","thumbnail","mobile","tablet"].includes(n))throw new Error("Image background size doesn't exist");i.url+="/background/".concat(n)}else if(o){if(!["default","thumbnail","supersize","supermobile","supersizefit","supermobilefit"].includes(o))throw new Error("Image choice size doesn't exist");i.url+="/choice/".concat(o)}return this._http.request(i)},t.prototype.list=function(){return this._http.request({method:"get",url:"/images"})},t}(),Qe=function(){function t(t){this._http=t}return t.prototype.create=function(t){return $e(this._http,t)},t.prototype.delete=function(t){var e=t.id;return this._http.request({method:"delete",url:"/themes/".concat(e)})},t.prototype.get=function(t){var e=t.id;return this._http.request({method:"get",url:"/themes/".concat(e)})},t.prototype.list=function(t){var e=this,r=t||{page:null,pageSize:null},n=r.page,o=r.pageSize,i=function(t,r){return e._http.request({method:"get",url:"/themes",params:{page:t,page_size:r}})};return"auto"===n?Ve(i):i(n,o)},t.prototype.update=function(t){return $e(this._http,t)},t}(),$e=function(t,e){var r=e.id,n=e.background,o=e.colors,i=e.font,a=e.hasTransparentButton,s=e.name,u={name:s,font:i,colors:o};if(Object.getOwnPropertyNames(u).forEach((function(t){if(!u[t])throw new Error("The property, ".concat(t,", is required"))})),!ze.includes(i))throw new Error("".concat(i," is not a valid font"));return t.request({method:r?"put":"post",url:r?"/themes/".concat(r):"/themes",background:n,colors:o,font:i,has_transparent_button:!!a,name:s})},Ge=function(){function t(t){this._http=t}return t.prototype.add=function(t){var e=t.name;if(!e)throw new Error("A name is required");return this._http.request({method:"post",url:"/workspaces",headers:{"Content-Type":"application/json"},data:{name:e}})},t.prototype.addMembers=function(t){var e=t.id,r=t.members,n=Ze("add",r);return this.update({id:e,data:n})},t.prototype.delete=function(t){var e=t.id;return this._http.request({me