@pushwoosh/http-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +201 -0
- package/lib/http-client.d.ts +169 -0
- package/lib/http-client.errors.d.ts +106 -0
- package/lib/http-client.types.d.ts +71 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/package.json +73 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("tslib"),require("js-cookie"),require("jwt-decode"),require("qs"),require("axios"),require("path-to-regexp"));else if("function"==typeof define&&define.amd)define(["tslib","js-cookie","jwt-decode","qs","axios","path-to-regexp"],e);else{var r="object"==typeof exports?e(require("tslib"),require("js-cookie"),require("jwt-decode"),require("qs"),require("axios"),require("path-to-regexp")):e(t.tslib,t["js-cookie"],t["jwt-decode"],t.qs,t.axios,t["path-to-regexp"]);for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(t,e,r,n,o,i){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=164)}([function(e,r){e.exports=t},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(96))},function(t,e,r){var n=r(1),o=r(68),i=r(10),c=r(69),u=r(67),a=r(66),s=o("wks"),f=n.Symbol,p=f&&f.for,l=a?f:f&&f.withoutSetter||c;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(f,t)?s[t]=f[t]:s[t]=a&&p?p(e):l(e)}return s[t]}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e){var r=Function.prototype,n=r.bind,o=r.call,i=n&&n.bind(o);t.exports=n?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,r){t.exports=r(161)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";var n=r(1),o=r(39),i=r(4),c=r(3),u=r(40).f,a=r(71),s=r(21),f=r(31),p=r(14),l=r(10),v=function(t){var e=function(r,n,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,i)}return o(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var r,o,h,d,y,g,x,b,w=t.target,m=t.global,_=t.stat,O=t.proto,j=m?n:_?n[w]:(n[w]||{}).prototype,T=m?s:s[w]||p(s,w,{})[w],E=T.prototype;for(h in e)r=!a(m?h:w+(_?".":"#")+h,t.forced)&&j&&l(j,h),y=T[h],r&&(g=t.noTargetGet?(b=u(j,h))&&b.value:j[h]),d=r&&g?g:e[h],r&&typeof y==typeof d||(x=t.bind&&r?f(d,n):t.wrap&&r?v(d):O&&c(d)?i(d):d,(t.sham||d&&d.sham||y&&y.sham)&&p(x,"sham",!0),p(T,h,x),O&&(l(s,o=w+"Prototype")||p(s,o,{}),p(s[o],h,d),t.real&&E&&!E[h]&&p(E,h,d)))}},function(t,e,r){var n=r(3);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},function(t,e){var r=Function.prototype.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,r){var n=r(4),o=r(44),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,r){var n=r(1),o=r(8),i=n.String,c=n.TypeError;t.exports=function(t){if(o(t))return t;throw c(i(t)+" is not an object")}},function(t,e,r){var n=r(21),o=r(1),i=r(3),c=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?c(n[t])||c(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},function(t,e,r){var n=r(6);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var n=r(13),o=r(17),i=r(19);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(4);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(1),o=r(3),i=r(30),c=n.TypeError;t.exports=function(t){if(o(t))return t;throw c(i(t)+" is not a function")}},function(t,e,r){var n=r(1),o=r(13),i=r(70),c=r(11),u=r(41),a=n.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,r){if(c(t),e=u(e),c(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw a("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,r){t.exports=e},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(98),o=r(28);t.exports=function(t){return n(o(t))}},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){t.exports={}},function(t,e,r){var n=r(4),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){var n=r(12);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(1),o=r(47),i=r(3),c=r(24),u=r(2)("toStringTag"),a=n.Object,s="Arguments"==c(function(){return arguments}());t.exports=o?c:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=a(t),u))?r:s?c(e):"Object"==(n=c(e))&&i(e.callee)?"Arguments":n}},function(t,e,r){var n=r(14);t.exports=function(t,e,r,o){o&&o.enumerable?t[e]=r:n(t,e,r)}},function(t,e,r){var n=r(1).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},function(t,e,r){var n,o,i=r(1),c=r(25),u=i.process,a=i.Deno,s=u&&u.versions||a&&a.version,f=s&&s.v8;f&&(o=(n=f.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&c&&(!(n=c.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=c.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},function(t,e,r){var n=r(1).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(4),o=r(16),i=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(102);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(21);t.exports=function(t){return n[t+"Prototype"]}},function(t,e,r){var n=r(1),o=r(26),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,r){var n=r(4),o=r(11),i=r(116);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},function(t,e,r){var n=r(1),o=r(31),i=r(9),c=r(11),u=r(30),a=r(125),s=r(32),f=r(15),p=r(126),l=r(79),v=r(127),h=n.TypeError,d=function(t,e){this.stopped=t,this.result=e},y=d.prototype;t.exports=function(t,e,r){var n,g,x,b,w,m,_,O=r&&r.that,j=!(!r||!r.AS_ENTRIES),T=!(!r||!r.IS_ITERATOR),E=!(!r||!r.INTERRUPTED),S=o(e,O),A=function(t){return n&&v(n,"normal",t),new d(!0,t)},k=function(t){return j?(c(t),E?S(t[0],t[1],A):S(t[0],t[1])):E?S(t,A):S(t)};if(T)n=t;else{if(!(g=l(t)))throw h(u(t)+" is not iterable");if(a(g)){for(x=0,b=s(t);b>x;x++)if((w=k(t[x]))&&f(y,w))return w;return new d(!1)}n=p(t,g)}for(m=n.next;!(_=i(m,n)).done;){try{w=k(_.value)}catch(t){v(n,"throw",t)}if("object"==typeof w&&w&&f(y,w))return w}return new d(!1)}},function(t,e,r){"use strict";var n=r(16),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},function(t,e,r){t.exports=r(155)},function(t,e){var r=Function.prototype,n=r.apply,o=r.bind,i=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(n):function(){return i.apply(n,arguments)})},function(t,e,r){var n=r(13),o=r(9),i=r(97),c=r(19),u=r(20),a=r(41),s=r(10),f=r(70),p=Object.getOwnPropertyDescriptor;e.f=n?p:function(t,e){if(t=u(t),e=a(e),f)try{return p(t,e)}catch(t){}if(s(t,e))return c(!o(i.f,t,e),t[e])}},function(t,e,r){var n=r(99),o=r(65);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(16);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e,r){var n=r(1),o=r(101),i="__core-js_shared__",c=n[i]||o(i,{});t.exports=c},function(t,e,r){var n=r(1),o=r(28),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(1),o=r(8),i=n.document,c=o(i)&&o(i.createElement);t.exports=function(t){return c?i.createElement(t):{}}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?n:r)(e)}},function(t,e,r){var n={};n[r(2)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(24);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(4),o=r(6),i=r(3),c=r(26),u=r(12),a=r(50),s=function(){},f=[],p=u("Reflect","construct"),l=/^\s*(?:class|function)\b/,v=n(l.exec),h=!l.exec(s),d=function(t){if(!i(t))return!1;try{return p(s,f,t),!0}catch(t){return!1}},y=function(t){if(!i(t))return!1;switch(c(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!v(l,a(t))}catch(t){return!0}};y.sham=!0,t.exports=!p||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?y:d},function(t,e,r){var n=r(4),o=r(3),i=r(43),c=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return c(t)}),t.exports=i.inspectSource},function(t,e,r){var n=r(4);t.exports=n([].slice)},function(t,e,r){var n=r(1),o=r(10),i=r(3),c=r(44),u=r(53),a=r(115),s=u("IE_PROTO"),f=n.Object,p=f.prototype;t.exports=a?f.getPrototypeOf:function(t){var e=c(t);if(o(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof f?p:null}},function(t,e,r){var n=r(68),o=r(69),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var n,o=r(11),i=r(121),c=r(55),u=r(54),a=r(78),s=r(45),f=r(53),p=f("IE_PROTO"),l=function(){},v=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;d="undefined"!=typeof document?document.domain&&n?h(n):((e=s("iframe")).style.display="none",a.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):h(n);for(var r=c.length;r--;)delete d.prototype[c[r]];return d()};u[p]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(l.prototype=o(t),r=new l,l.prototype=null,r[p]=t):r=d(),void 0===e?r:i(r,e)}},function(t,e,r){var n,o,i,c=r(130),u=r(1),a=r(4),s=r(8),f=r(14),p=r(10),l=r(43),v=r(53),h=r(54),d="Object already initialized",y=u.TypeError,g=u.WeakMap;if(c||l.state){var x=l.state||(l.state=new g),b=a(x.get),w=a(x.has),m=a(x.set);n=function(t,e){if(w(x,t))throw new y(d);return e.facade=t,m(x,t,e),e},o=function(t){return b(x,t)||{}},i=function(t){return w(x,t)}}else{var _=v("state");h[_]=!0,n=function(t,e){if(p(t,_))throw new y(d);return e.facade=t,f(t,_,e),e},o=function(t){return p(t,_)?t[_]:{}},i=function(t){return p(t,_)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var n=r(47),o=r(17).f,i=r(14),c=r(10),u=r(133),a=r(2)("toStringTag");t.exports=function(t,e,r,s){if(t){var f=r?t:t.prototype;c(f,a)||o(f,a,{configurable:!0,value:e}),s&&!n&&i(f,"toString",u)}}},function(t,e,r){var n=r(24),o=r(1);t.exports="process"==n(o.process)},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,r){t.exports=r(108)},function(t,e,r){t.exports=r(112)},function(t,e){t.exports=r},function(t,e){t.exports=n},function(t,e,r){var n=r(1),o=r(12),i=r(3),c=r(15),u=r(66),a=n.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&c(e.prototype,a(t))}},function(t,e,r){var n=r(67);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(29),o=r(6);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e,r){var n=r(22),o=r(43);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.20.0",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){var n=r(4),o=0,i=Math.random(),c=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+c(++o+i,36)}},function(t,e,r){var n=r(13),o=r(6),i=r(45);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(6),o=r(3),i=/#|\.prototype\./,c=function(t,e){var r=a[u(t)];return r==f||r!=s&&(o(e)?n(e):!!e)},u=c.normalize=function(t){return String(t).replace(i,".").toLowerCase()},a=c.data={},s=c.NATIVE="N",f=c.POLYFILL="P";t.exports=c},function(t,e,r){var n=r(20),o=r(73),i=r(32),c=function(t){return function(e,r,c){var u,a=n(e),s=i(a),f=o(c,s);if(t&&r!=r){for(;s>f;)if((u=a[f++])!=u)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:c(!0),indexOf:c(!1)}},function(t,e,r){var n=r(46),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e){t.exports=function(){}},function(t,e,r){"use strict";var n=r(41),o=r(17),i=r(19);t.exports=function(t,e,r){var c=n(e);c in t?o.f(t,c,i(0,r)):t[c]=r}},function(t,e,r){var n=r(6),o=r(2),i=r(29),c=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){var n=r(4),o=r(10),i=r(20),c=r(72).indexOf,u=r(54),a=n([].push);t.exports=function(t,e){var r,n=i(t),s=0,f=[];for(r in n)!o(u,r)&&o(n,r)&&a(f,r);for(;e.length>s;)o(n,r=e[s++])&&(~c(f,r)||a(f,r));return f}},function(t,e,r){var n=r(12);t.exports=n("document","documentElement")},function(t,e,r){var n=r(26),o=r(42),i=r(23),c=r(2)("iterator");t.exports=function(t){if(null!=t)return o(t,c)||o(t,"@@iterator")||i[n(t)]}},function(t,e,r){"use strict";var n=r(20),o=r(74),i=r(23),c=r(57),u=r(17).f,a=r(81),s=r(22),f=r(13),p="Array Iterator",l=c.set,v=c.getterFor(p);t.exports=a(Array,"Array",(function(t,e){l(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=v(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");var h=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!s&&f&&"values"!==h.name)try{u(h,"name",{value:"values"})}catch(t){}},function(t,e,r){"use strict";var n=r(7),o=r(9),i=r(22),c=r(131),u=r(3),a=r(132),s=r(52),f=r(35),p=r(58),l=r(14),v=r(27),h=r(2),d=r(23),y=r(82),g=c.PROPER,x=c.CONFIGURABLE,b=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,m=h("iterator"),_="keys",O="values",j="entries",T=function(){return this};t.exports=function(t,e,r,c,h,y,E){a(r,e,c);var S,A,k,P=function(t){if(t===h&&L)return L;if(!w&&t in M)return M[t];switch(t){case _:case O:case j:return function(){return new r(this,t)}}return function(){return new r(this)}},R=e+" Iterator",I=!1,M=t.prototype,C=M[m]||M["@@iterator"]||h&&M[h],L=!w&&C||P(h),q="Array"==e&&M.entries||C;if(q&&(S=s(q.call(new t)))!==Object.prototype&&S.next&&(i||s(S)===b||(f?f(S,b):u(S[m])||v(S,m,T)),p(S,R,!0,!0),i&&(d[R]=T)),g&&h==O&&C&&C.name!==O&&(!i&&x?l(M,"name",O):(I=!0,L=function(){return o(C,this)})),h)if(A={values:P(O),keys:y?L:P(_),entries:P(j)},E)for(k in A)(w||I||!(k in M))&&v(M,k,A[k]);else n({target:e,proto:!0,forced:w||I},A);return i&&!E||M[m]===L||v(M,m,L,{name:h}),d[e]=L,A}},function(t,e,r){"use strict";var n,o,i,c=r(6),u=r(3),a=r(56),s=r(52),f=r(27),p=r(2),l=r(22),v=p("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):h=!0),null==n||c((function(){var t={};return n[v].call(t)!==t}))?n={}:l&&(n=a(n)),u(n[v])||f(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},function(t,e,r){var n=r(1);t.exports=n.Promise},function(t,e,r){var n=r(11),o=r(140),i=r(2)("species");t.exports=function(t,e){var r,c=n(t).constructor;return void 0===c||null==(r=n(c)[i])?e:o(r)}},function(t,e,r){var n,o,i,c,u=r(1),a=r(39),s=r(31),f=r(3),p=r(10),l=r(6),v=r(78),h=r(51),d=r(45),y=r(86),g=r(59),x=u.setImmediate,b=u.clearImmediate,w=u.process,m=u.Dispatch,_=u.Function,O=u.MessageChannel,j=u.String,T=0,E={},S="onreadystatechange";try{n=u.location}catch(t){}var A=function(t){if(p(E,t)){var e=E[t];delete E[t],e()}},k=function(t){return function(){A(t)}},P=function(t){A(t.data)},R=function(t){u.postMessage(j(t),n.protocol+"//"+n.host)};x&&b||(x=function(t){var e=h(arguments,1);return E[++T]=function(){a(f(t)?t:_(t),void 0,e)},o(T),T},b=function(t){delete E[t]},g?o=function(t){w.nextTick(k(t))}:m&&m.now?o=function(t){m.now(k(t))}:O&&!y?(c=(i=new O).port2,i.port1.onmessage=P,o=s(c.postMessage,c)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!l(R)?(o=R,u.addEventListener("message",P,!1)):o=S in d("script")?function(t){v.appendChild(d("script")).onreadystatechange=function(){v.removeChild(this),A(t)}}:function(t){setTimeout(k(t),0)}),t.exports={set:x,clear:b}},function(t,e,r){var n=r(25);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},function(t,e,r){var n=r(11),o=r(8),i=r(37);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){t.exports=r(92)},function(t,e,r){t.exports=r(153)},function(t,e){t.exports=o},function(t,e){t.exports=i},function(t,e,r){var n=r(93);t.exports=n},function(t,e,r){var n=r(15),o=r(94),i=r(103),c=Array.prototype,u=String.prototype;t.exports=function(t){var e=t.includes;return t===c||n(c,t)&&e===c.includes?o:"string"==typeof t||t===u||n(u,t)&&e===u.includes?i:e}},function(t,e,r){r(95);var n=r(33);t.exports=n("Array").includes},function(t,e,r){"use strict";var n=r(7),o=r(72).includes,i=r(74);n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e,r){var n=r(1),o=r(4),i=r(6),c=r(24),u=n.Object,a=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==c(t)?a(t,""):u(t)}:u},function(t,e,r){var n=r(1),o=r(9),i=r(8),c=r(65),u=r(42),a=r(100),s=r(2),f=n.TypeError,p=s("toPrimitive");t.exports=function(t,e){if(!i(t)||c(t))return t;var r,n=u(t,p);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||c(r))return r;throw f("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},function(t,e,r){var n=r(1),o=r(9),i=r(3),c=r(8),u=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!c(n=o(r,t)))return n;if(i(r=t.valueOf)&&!c(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!c(n=o(r,t)))return n;throw u("Can't convert object to primitive value")}},function(t,e,r){var n=r(1),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},function(t,e,r){var n=r(46),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){r(104);var n=r(33);t.exports=n("String").includes},function(t,e,r){"use strict";var n=r(7),o=r(4),i=r(105),c=r(28),u=r(34),a=r(107),s=o("".indexOf);n({target:"String",proto:!0,forced:!a("includes")},{includes:function(t){return!!~s(u(c(this)),u(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(1),o=r(106),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(8),o=r(24),i=r(2)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,r){var n=r(2)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,r){var n=r(109);t.exports=n},function(t,e,r){var n=r(15),o=r(110),i=Array.prototype;t.exports=function(t){var e=t.slice;return t===i||n(i,t)&&e===i.slice?o:e}},function(t,e,r){r(111);var n=r(33);t.exports=n("Array").slice},function(t,e,r){"use strict";var n=r(7),o=r(1),i=r(48),c=r(49),u=r(8),a=r(73),s=r(32),f=r(20),p=r(75),l=r(2),v=r(76),h=r(51),d=v("slice"),y=l("species"),g=o.Array,x=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var r,n,o,l=f(this),v=s(l),d=a(t,v),b=a(void 0===e?v:e,v);if(i(l)&&(r=l.constructor,(c(r)&&(r===g||i(r.prototype))||u(r)&&null===(r=r[y]))&&(r=void 0),r===g||void 0===r))return h(l,d,b);for(n=new(void 0===r?g:r)(x(b-d,0)),o=0;d<b;d++,o++)d in l&&p(n,o,l[d]);return n.length=o,n}})},function(t,e,r){var n=r(113);r(151),t.exports=n},function(t,e,r){r(114),r(80),r(134),r(135),r(146),r(147),r(148),r(149);var n=r(21);t.exports=n.Promise},function(t,e,r){"use strict";var n=r(7),o=r(1),i=r(15),c=r(52),u=r(35),a=r(117),s=r(56),f=r(14),p=r(19),l=r(123),v=r(124),h=r(36),d=r(128),y=r(2),g=r(129),x=y("toStringTag"),b=o.Error,w=[].push,m=function(t,e){var r,n=arguments.length>2?arguments[2]:void 0,o=i(_,this);u?r=u(new b,o?c(this):_):(r=o?this:s(_),f(r,x,"Error")),void 0!==e&&f(r,"message",d(e)),g&&f(r,"stack",l(r.stack,1)),v(r,n);var a=[];return h(t,w,{that:a}),f(r,"errors",a),r};u?u(m,b):a(m,b,{name:!0});var _=m.prototype=s(b.prototype,{constructor:p(1,m),message:p(1,""),name:p(1,"AggregateError")});n({global:!0},{AggregateError:m})},function(t,e,r){var n=r(6);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(1),o=r(3),i=n.String,c=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw c("Can't set "+i(t)+" as a prototype")}},function(t,e,r){var n=r(10),o=r(118),i=r(40),c=r(17);t.exports=function(t,e,r){for(var u=o(e),a=c.f,s=i.f,f=0;f<u.length;f++){var p=u[f];n(t,p)||r&&n(r,p)||a(t,p,s(e,p))}}},function(t,e,r){var n=r(12),o=r(4),i=r(119),c=r(120),u=r(11),a=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(u(t)),r=c.f;return r?a(e,r(t)):e}},function(t,e,r){var n=r(77),o=r(55).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(13),o=r(17),i=r(11),c=r(20),u=r(122);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=c(e),a=u(e),s=a.length,f=0;s>f;)o.f(t,r=a[f++],n[r]);return t}},function(t,e,r){var n=r(77),o=r(55);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(4)("".replace),o=String(Error("zxcasd").stack),i=/\n\s*at [^:]*:[^\n]*/,c=i.test(o);t.exports=function(t,e){if(c&&"string"==typeof t)for(;e--;)t=n(t,i,"");return t}},function(t,e,r){var n=r(8),o=r(14);t.exports=function(t,e){n(e)&&"cause"in e&&o(t,"cause",e.cause)}},function(t,e,r){var n=r(2),o=r(23),i=n("iterator"),c=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||c[i]===t)}},function(t,e,r){var n=r(1),o=r(9),i=r(16),c=r(11),u=r(30),a=r(79),s=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?a(t):e;if(i(r))return c(o(r,t));throw s(u(t)+" is not iterable")}},function(t,e,r){var n=r(9),o=r(11),i=r(42);t.exports=function(t,e,r){var c,u;o(t);try{if(!(c=i(t,"return"))){if("throw"===e)throw r;return r}c=n(c,t)}catch(t){u=!0,c=t}if("throw"===e)throw r;if(u)throw c;return o(c),r}},function(t,e,r){var n=r(34);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},function(t,e,r){var n=r(6),o=r(19);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},function(t,e,r){var n=r(1),o=r(3),i=r(50),c=n.WeakMap;t.exports=o(c)&&/native code/.test(i(c))},function(t,e,r){var n=r(13),o=r(10),i=Function.prototype,c=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),a=u&&"something"===function(){}.name,s=u&&(!n||n&&c(i,"name").configurable);t.exports={EXISTS:u,PROPER:a,CONFIGURABLE:s}},function(t,e,r){"use strict";var n=r(82).IteratorPrototype,o=r(56),i=r(19),c=r(58),u=r(23),a=function(){return this};t.exports=function(t,e,r,s){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),c(t,f,!1,!0),u[f]=a,t}},function(t,e,r){"use strict";var n=r(47),o=r(26);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e){},function(t,e,r){"use strict";var n,o,i,c,u=r(7),a=r(22),s=r(1),f=r(12),p=r(9),l=r(83),v=r(27),h=r(136),d=r(35),y=r(58),g=r(137),x=r(16),b=r(3),w=r(8),m=r(138),_=r(50),O=r(36),j=r(139),T=r(84),E=r(85).set,S=r(141),A=r(87),k=r(144),P=r(37),R=r(60),I=r(57),M=r(71),C=r(2),L=r(145),q=r(59),N=r(29),z=C("species"),F="Promise",U=I.getterFor(F),D=I.set,G=I.getterFor(F),H=l&&l.prototype,B=l,K=H,V=s.TypeError,W=s.document,Z=s.process,Y=P.f,X=Y,J=!!(W&&W.createEvent&&s.dispatchEvent),Q=b(s.PromiseRejectionEvent),$="unhandledrejection",tt=!1,et=M(F,(function(){var t=_(B),e=t!==String(B);if(!e&&66===N)return!0;if(a&&!K.finally)return!0;if(N>=51&&/native code/.test(t))return!1;var r=new B((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[z]=n,!(tt=r.then((function(){}))instanceof n)||!e&&L&&!Q})),rt=et||!j((function(t){B.all(t).catch((function(){}))})),nt=function(t){var e;return!(!w(t)||!b(e=t.then))&&e},ot=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;S((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var c,u,a,s=r[i++],f=o?s.ok:s.fail,l=s.resolve,v=s.reject,h=s.domain;try{f?(o||(2===t.rejection&&at(t),t.rejection=1),!0===f?c=n:(h&&h.enter(),c=f(n),h&&(h.exit(),a=!0)),c===s.promise?v(V("Promise-chain cycle")):(u=nt(c))?p(u,c,l,v):l(c)):v(n)}catch(t){h&&!a&&h.exit(),v(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ct(t)}))}},it=function(t,e,r){var n,o;J?((n=W.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),s.dispatchEvent(n)):n={promise:e,reason:r},!Q&&(o=s["on"+t])?o(n):t===$&&k("Unhandled promise rejection",r)},ct=function(t){p(E,s,(function(){var e,r=t.facade,n=t.value;if(ut(t)&&(e=R((function(){q?Z.emit("unhandledRejection",n,r):it($,r,n)})),t.rejection=q||ut(t)?2:1,e.error))throw e.value}))},ut=function(t){return 1!==t.rejection&&!t.parent},at=function(t){p(E,s,(function(){var e=t.facade;q?Z.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},st=function(t,e,r){return function(n){t(e,n,r)}},ft=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,ot(t,!0))},pt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw V("Promise can't be resolved itself");var n=nt(e);n?S((function(){var r={done:!1};try{p(n,e,st(pt,r,t),st(ft,r,t))}catch(e){ft(r,e,t)}})):(t.value=e,t.state=1,ot(t,!1))}catch(e){ft({done:!1},e,t)}}};if(et&&(K=(B=function(t){m(this,K),x(t),p(n,this);var e=U(this);try{t(st(pt,e),st(ft,e))}catch(t){ft(e,t)}}).prototype,(n=function(t){D(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(K,{then:function(t,e){var r=G(this),n=r.reactions,o=Y(T(this,B));return o.ok=!b(t)||t,o.fail=b(e)&&e,o.domain=q?Z.domain:void 0,r.parent=!0,n[n.length]=o,0!=r.state&&ot(r,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=U(t);this.promise=t,this.resolve=st(pt,e),this.reject=st(ft,e)},P.f=Y=function(t){return t===B||t===i?new o(t):X(t)},!a&&b(l)&&H!==Object.prototype)){c=H.then,tt||(v(H,"then",(function(t,e){var r=this;return new B((function(t,e){p(c,r,t,e)})).then(t,e)}),{unsafe:!0}),v(H,"catch",K.catch,{unsafe:!0}));try{delete H.constructor}catch(t){}d&&d(H,K)}u({global:!0,wrap:!0,forced:et},{Promise:B}),y(B,F,!1,!0),g(F),i=f(F),u({target:F,stat:!0,forced:et},{reject:function(t){var e=Y(this);return p(e.reject,void 0,t),e.promise}}),u({target:F,stat:!0,forced:a||et},{resolve:function(t){return A(a&&this===i?B:this,t)}}),u({target:F,stat:!0,forced:rt},{all:function(t){var e=this,r=Y(e),n=r.resolve,o=r.reject,i=R((function(){var r=x(e.resolve),i=[],c=0,u=1;O(t,(function(t){var a=c++,s=!1;u++,p(r,e,t).then((function(t){s||(s=!0,i[a]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=Y(e),n=r.reject,o=R((function(){var o=x(e.resolve);O(t,(function(t){p(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},function(t,e,r){var n=r(27);t.exports=function(t,e,r){for(var o in e)r&&r.unsafe&&t[o]?t[o]=e[o]:n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(12),o=r(17),i=r(2),c=r(13),u=i("species");t.exports=function(t){var e=n(t),r=o.f;c&&e&&!e[u]&&r(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(1),o=r(15),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,r){var n=r(2)("iterator"),o=!1;try{var i=0,c={next:function(){return{done:!!i++}},return:function(){o=!0}};c[n]=function(){return this},Array.from(c,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},function(t,e,r){var n=r(1),o=r(49),i=r(30),c=n.TypeError;t.exports=function(t){if(o(t))return t;throw c(i(t)+" is not a constructor")}},function(t,e,r){var n,o,i,c,u,a,s,f,p=r(1),l=r(31),v=r(40).f,h=r(85).set,d=r(86),y=r(142),g=r(143),x=r(59),b=p.MutationObserver||p.WebKitMutationObserver,w=p.document,m=p.process,_=p.Promise,O=v(p,"queueMicrotask"),j=O&&O.value;j||(n=function(){var t,e;for(x&&(t=m.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?c():i=void 0,t}}i=void 0,t&&t.enter()},d||x||g||!b||!w?!y&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,f=l(s.then,s),c=function(){f(n)}):x?c=function(){m.nextTick(n)}:(h=l(h,p),c=function(){h(n)}):(u=!0,a=w.createTextNode(""),new b(n).observe(a,{characterData:!0}),c=function(){a.data=u=!u})),t.exports=j||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,c()),i=e}},function(t,e,r){var n=r(25),o=r(1);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},function(t,e,r){var n=r(25);t.exports=/web0s(?!.*chrome)/i.test(n)},function(t,e,r){var n=r(1);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},function(t,e){t.exports="object"==typeof window},function(t,e,r){"use strict";var n=r(7),o=r(9),i=r(16),c=r(37),u=r(60),a=r(36);n({target:"Promise",stat:!0},{allSettled:function(t){var e=this,r=c.f(e),n=r.resolve,s=r.reject,f=u((function(){var r=i(e.resolve),c=[],u=0,s=1;a(t,(function(t){var i=u++,a=!1;s++,o(r,e,t).then((function(t){a||(a=!0,c[i]={status:"fulfilled",value:t},--s||n(c))}),(function(t){a||(a=!0,c[i]={status:"rejected",reason:t},--s||n(c))}))})),--s||n(c)}));return f.error&&s(f.value),r.promise}})},function(t,e,r){"use strict";var n=r(7),o=r(16),i=r(12),c=r(9),u=r(37),a=r(60),s=r(36),f="No one promise resolved";n({target:"Promise",stat:!0},{any:function(t){var e=this,r=i("AggregateError"),n=u.f(e),p=n.resolve,l=n.reject,v=a((function(){var n=o(e.resolve),i=[],u=0,a=1,v=!1;s(t,(function(t){var o=u++,s=!1;a++,c(n,e,t).then((function(t){s||v||(v=!0,p(t))}),(function(t){s||v||(s=!0,i[o]=t,--a||l(new r(i,f)))}))})),--a||l(new r(i,f))}));return v.error&&l(v.value),n.promise}})},function(t,e,r){"use strict";var n=r(7),o=r(22),i=r(83),c=r(6),u=r(12),a=r(3),s=r(84),f=r(87),p=r(27);if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&c((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=s(this,u("Promise")),r=a(t);return this.then(r?function(r){return f(e,t()).then((function(){return r}))}:t,r?function(r){return f(e,t()).then((function(){throw r}))}:t)}}),!o&&a(i)){var l=u("Promise").prototype.finally;i.prototype.finally!==l&&p(i.prototype,"finally",l,{unsafe:!0})}},function(t,e,r){"use strict";var n=r(150).charAt,o=r(34),i=r(57),c=r(81),u="String Iterator",a=i.set,s=i.getterFor(u);c(String,"String",(function(t){a(this,{type:u,string:o(t),index:0})}),(function(){var t,e=s(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){var n=r(4),o=r(46),i=r(34),c=r(28),u=n("".charAt),a=n("".charCodeAt),s=n("".slice),f=function(t){return function(e,r){var n,f,p=i(c(e)),l=o(r),v=p.length;return l<0||l>=v?t?"":void 0:(n=a(p,l))<55296||n>56319||l+1===v||(f=a(p,l+1))<56320||f>57343?t?u(p,l):n:t?s(p,l,l+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},function(t,e,r){r(80);var n=r(152),o=r(1),i=r(26),c=r(14),u=r(23),a=r(2)("toStringTag");for(var s in n){var f=o[s],p=f&&f.prototype;p&&i(p)!==a&&c(p,a,s),u[s]=u.Array}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,r){r(154);var n=r(21);t.exports=n.setTimeout},function(t,e,r){var n=r(7),o=r(1),i=r(39),c=r(3),u=r(25),a=r(51),s=/MSIE .\./.test(u),f=o.Function,p=function(t){return function(e,r){var n=arguments.length>2,o=n?a(arguments,2):void 0;return t(n?function(){i(c(e)?e:f(e),this,o)}:e,r)}};n({global:!0,bind:!0,forced:s},{setTimeout:p(o.setTimeout),setInterval:p(o.setInterval)})},function(t,e,r){var n=r(156);t.exports=n},function(t,e,r){var n=r(15),o=r(157),i=Array.prototype;t.exports=function(t){var e=t.concat;return t===i||n(i,t)&&e===i.concat?o:e}},function(t,e,r){r(158);var n=r(33);t.exports=n("Array").concat},function(t,e,r){"use strict";var n=r(7),o=r(1),i=r(6),c=r(48),u=r(8),a=r(44),s=r(32),f=r(75),p=r(159),l=r(76),v=r(2),h=r(29),d=v("isConcatSpreadable"),y=9007199254740991,g="Maximum allowed index exceeded",x=o.TypeError,b=h>=51||!i((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),w=l("concat"),m=function(t){if(!u(t))return!1;var e=t[d];return void 0!==e?!!e:c(t)};n({target:"Array",proto:!0,forced:!b||!w},{concat:function(t){var e,r,n,o,i,c=a(this),u=p(c,0),l=0;for(e=-1,n=arguments.length;e<n;e++)if(m(i=-1===e?c:arguments[e])){if(l+(o=s(i))>y)throw x(g);for(r=0;r<o;r++,l++)r in i&&f(u,l,i[r])}else{if(l>=y)throw x(g);f(u,l++,i)}return u.length=l,u}})},function(t,e,r){var n=r(160);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){var n=r(1),o=r(48),i=r(49),c=r(8),u=r(2)("species"),a=n.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===a||o(e.prototype))||c(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?a:e}},function(t,e,r){var n=r(162);t.exports=n},function(t,e,r){r(163);var n=r(21);t.exports=n.Object.setPrototypeOf},function(t,e,r){r(7)({target:"Object",stat:!0},{setPrototypeOf:r(35)})},function(t,e,r){"use strict";r.r(e),r.d(e,"HttpClient",(function(){return F})),r.d(e,"HttpClientError",(function(){return j})),r.d(e,"InternalError",(function(){return T})),r.d(e,"UnknownError",(function(){return E})),r.d(e,"BadRequestError",(function(){return S})),r.d(e,"UnauthorizedError",(function(){return A})),r.d(e,"ForbiddenError",(function(){return k})),r.d(e,"NotFoundError",(function(){return P})),r.d(e,"MethodNotAllowedError",(function(){return R})),r.d(e,"UnsupportedMediaTypeError",(function(){return I})),r.d(e,"UnprocessableEntityError",(function(){return M})),r.d(e,"InternalServerError",(function(){return C})),r.d(e,"BadGatewayError",(function(){return L})),r.d(e,"ServiceUnavailableError",(function(){return q})),r.d(e,"GatewayTimeoutError",(function(){return N}));var n=r(88),o=r.n(n),i=r(61),c=r.n(i),u=r(62),a=r.n(u),s=r(89),f=r.n(s),p=r(38),l=r.n(p),v=r(0),h=r(90),d=r.n(h),y=r(18),g=r.n(y),x=r(63),b=r.n(x),w=r(91),m=r(64),_=r(5),O=r.n(_),j=function(t){function e(r,n,o){var i=t.call(this,r)||this;return i.name="HttpClient",i.status=n,i.details=o,O()(i,e.prototype),i}return Object(v.__extends)(e,t),e}(Error),T=function(t){function e(r,n){var o=t.call(this,r,0,n)||this;return o.name="HttpClient",O()(o,e.prototype),o}return Object(v.__extends)(e,t),e}(j),E=function(t){function e(r,n){var o=t.call(this,"Unknown Network Client error!",r,n)||this;return O()(o,e.prototype),o}return Object(v.__extends)(e,t),e}(j),S=function(t){function e(r){var n=t.call(this,"Bad Request Error!",400,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),A=function(t){function e(r){var n=t.call(this,"Unauthorized Error!",401,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),k=function(t){function e(r){var n=t.call(this,"Forbidden Error!",403,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),P=function(t){function e(r){var n=t.call(this,"Not Found Error!",404,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),R=function(t){function e(e){var r=t.call(this,"Method Not Allowed Error!",405,e)||this;return O()(r,P.prototype),r}return Object(v.__extends)(e,t),e}(j),I=function(t){function e(r){var n=t.call(this,"Unprocessable Entity Error",415,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),M=function(t){function e(r){var n=t.call(this,"Unprocessable Entity Error",422,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),C=function(t){function e(r){var n=t.call(this,"Internal Server Error",500,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),L=function(t){function e(r){var n=t.call(this,"Bad Gateway Error",502,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),q=function(t){function e(r){var n=t.call(this,"Service Unavailable Error",503,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),N=function(t){function e(r){var n=t.call(this,"Gateway Timeout Error",504,r)||this;return O()(n,e.prototype),n}return Object(v.__extends)(e,t),e}(j),z=d.a.create({paramsSerializer:m.stringify}),F=function(){function t(t,e){var r;this.accessToken=null,this.refreshToken=null,this.isRefreshing=!1,this.isAccessTokenSetManual=!1;var n=window.location.hostname,i=o()(n).call(n,".")?".".concat(c()(r=n.split(".")).call(r,-2).join(".")):n;this.config=t,this.cookieOptions=Object(v.__assign)({domain:i,path:"/"},e)}return t.parseResponse=function(t){if(t.status>=400)switch(t.status){case 400:throw new S(t.message);case 401:throw new A(t.message);case 403:throw new k(t.message);case 404:throw new P(t.message);case 405:throw new R(t.message);case 415:throw new I(t.message);case 422:throw new M(t.message);case 500:throw new C(t.message);case 502:throw new L(t.message);case 503:throw new q(t.message);case 504:throw new N(t.message);default:throw new E(t.status,t.message)}return t.result},t.prototype.guardAuthorization=function(){return Object(v.__awaiter)(this,void 0,void 0,(function(){var t,e;return Object(v.__generator)(this,(function(r){switch(r.label){case 0:return this.isAccessTokenSetManual?[2]:this.isRefreshing?[4,new a.a((function(t){f()(t,250)}))]:[3,3];case 1:return r.sent(),[4,this.guardAuthorization()];case 2:return r.sent(),[2];case 3:return this.accessToken&&this.refreshToken?(t=(new Date).getTime()/1e3,e=b()(this.accessToken),e.expired_at<t?[4,this.updateTokensPairByRefreshToken(this.refreshToken,e)]:[3,6]):[3,7];case 4:return r.sent(),[4,this.guardAuthorization()];case 5:r.sent(),r.label=6;case 6:return[2];case 7:throw new A("Have not access token or refresh token!")}}))}))},t.prototype.updateTokensPair=function(e){return Object(v.__awaiter)(this,void 0,void 0,(function(){var r,n,o,i,c,u;return Object(v.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),this.isRefreshing=!0,r=window.btoa("".concat(this.config.clientId,":")),n="Basic ".concat(r),c=(i=t).parseResponse,[4,this.request(this.config.urls.token,{method:"POST",headers:{Authorization:n},query:e,withAuthorization:!1,withCredentials:!0})];case 1:return o=c.apply(i,[a.sent()]),this.isRefreshing=!1,this.accessToken=o.access_token,this.refreshToken=o.refresh_token,[3,3];case 2:throw u=a.sent(),this.isRefreshing=!1,this.accessToken=null,this.refreshToken=null,u;case 3:return[2]}}))}))},t.prototype.updateTokensPairByAuthorizationCode=function(t){return Object(v.__awaiter)(this,void 0,void 0,(function(){var e;return Object(v.__generator)(this,(function(r){var n;switch(r.label){case 0:return e=l()(n="".concat(window.location.origin)).call(n,window.location.pathname),[4,this.updateTokensPair({grant_type:"authorization_code",code:t,redirect_uri:e})];case 1:return r.sent(),[2]}}))}))},t.prototype.updateTokensPairByRefreshToken=function(t,e){return Object(v.__awaiter)(this,void 0,void 0,(function(){return Object(v.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.updateTokensPair({grant_type:"refresh_token",refresh_token:t,username:e.username,account_id:e.account_id})];case 1:return r.sent(),[2]}}))}))},t.prototype.initialize=function(e,r){return Object(v.__awaiter)(this,void 0,void 0,(function(){var n,o;return Object(v.__generator)(this,(function(i){switch(i.label){case 0:if(!e||!r)return[2,null];if(n=g.a.get(t.STORIED_URL_COOKIE_NAME),o=g.a.get(t.STORIED_AUTHORIZATION_STATE_COOKIE_NAME),g.a.remove(t.STORIED_URL_COOKIE_NAME),g.a.remove(t.STORIED_AUTHORIZATION_STATE_COOKIE_NAME),!(o===r))throw new T("Storied authorization state and received authorization state NOT equals!","[HttpClient::initialize]");return[4,this.updateTokensPairByAuthorizationCode(e)];case 1:if(i.sent(),!this.accessToken)throw new T("Access Token is null after update tokens!","[HttpClient::initialize]");return window.history.replaceState(null,document.title,n),[2,b()(this.accessToken)]}}))}))},t.prototype.login=function(){return Object(v.__awaiter)(this,void 0,void 0,(function(){var e,r,n;return Object(v.__generator)(this,(function(o){var i,u,s;return e=l()(i="".concat(window.location.origin)).call(i,window.location.pathname),r=c()(u=Math.random().toString()).call(u,2,12),g.a.set(t.STORIED_URL_COOKIE_NAME,window.location.href,this.cookieOptions),g.a.set(t.STORIED_AUTHORIZATION_STATE_COOKIE_NAME,r),n=Object(m.stringify)({response_type:"code",client_id:this.config.clientId,redirect_uri:e,state:r}),window.location.href=l()(s="".concat(this.config.urls.authorize,"?")).call(s,n),[2,new a.a((function(){}))]}))}))},t.prototype.logout=function(){return Object(v.__awaiter)(this,void 0,void 0,(function(){var e,r;return Object(v.__generator)(this,(function(n){switch(n.label){case 0:return this.accessToken=null,this.refreshToken=null,r=(e=t).parseResponse,[4,this.request(this.config.urls.logout,{method:"GET",withAuthorization:!1,withCredentials:!0})];case 1:return[2,r.apply(e,[n.sent()])]}}))}))},t.prototype.setAccessToken=function(t){this.isAccessTokenSetManual=!0,this.accessToken=t},t.prototype.getAccessToken=function(){return Object(v.__awaiter)(this,void 0,void 0,(function(){return Object(v.__generator)(this,(function(t){switch(t.label){case 0:return[4,this.guardAuthorization()];case 1:if(t.sent(),!this.accessToken)throw new T("AccessToken is null after guard authorization!","[HttpClient::getAccessToken]");return[2,this.accessToken]}}))}))},t.prototype.request=function(t,e){return Object(v.__awaiter)(this,void 0,void 0,(function(){var r,n,o;return Object(v.__generator)(this,(function(i){switch(i.label){case 0:return r={url:t,method:e.method,headers:e.headers,validateStatus:null,withCredentials:e.withCredentials},"params"in e&&(n=Object(w.compile)(t),r.url=n(e.params)),"query"in e&&(r.params=e.query),"body"in e&&(r.data=e.body),e.withAuthorization?[4,this.guardAuthorization()]:[3,2];case 1:i.sent(),r.headers=r.headers||{},r.headers.Authorization="Bearer ".concat(this.accessToken),i.label=2;case 2:return[4,z.request(r)];case 3:return[2,{result:(o=i.sent()).data,status:o.status,message:o.statusText}]}}))}))},t.prototype.get=function(e,r){return Object(v.__awaiter)(this,void 0,void 0,(function(){var n,o;return Object(v.__generator)(this,(function(i){switch(i.label){case 0:return o=(n=t).parseResponse,[4,this.request(e,Object(v.__assign)({method:"GET"},r))];case 1:return[2,o.apply(n,[i.sent()])]}}))}))},t.prototype.post=function(e,r){return Object(v.__awaiter)(this,void 0,void 0,(function(){var n,o;return Object(v.__generator)(this,(function(i){switch(i.label){case 0:return o=(n=t).parseResponse,[4,this.request(e,Object(v.__assign)({method:"POST"},r))];case 1:return[2,o.apply(n,[i.sent()])]}}))}))},t.prototype.put=function(e,r){return Object(v.__awaiter)(this,void 0,void 0,(function(){var n,o;return Object(v.__generator)(this,(function(i){switch(i.label){case 0:return o=(n=t).parseResponse,[4,this.request(e,Object(v.__assign)({method:"PUT"},r))];case 1:return[2,o.apply(n,[i.sent()])]}}))}))},t.prototype.patch=function(e,r){return Object(v.__awaiter)(this,void 0,void 0,(function(){var n,o;return Object(v.__generator)(this,(function(i){switch(i.label){case 0:return o=(n=t).parseResponse,[4,this.request(e,Object(v.__assign)({method:"PATCH"},r))];case 1:return[2,o.apply(n,[i.sent()])]}}))}))},t.prototype.delete=function(e,r){return Object(v.__awaiter)(this,void 0,void 0,(function(){var n,o;return Object(v.__generator)(this,(function(i){switch(i.label){case 0:return o=(n=t).parseResponse,[4,this.request(e,Object(v.__assign)({method:"DELETE"},r))];case 1:return[2,o.apply(n,[i.sent()])]}}))}))},t.STORIED_AUTHORIZATION_STATE_COOKIE_NAME="__PW_STORIED_AUTHORIZATION_STATE",t.STORIED_URL_COOKIE_NAME="__PW_STORIED_URL",t}()}])}));
|
|
2
|
+
//# sourceMappingURL=index.js.map
|