@gudhub/core 1.1.121 → 1.1.123
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.
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
export class GroupInvitation {
|
|
2
2
|
constructor(gudhub, req) {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
this.req = req;
|
|
4
|
+
this.gudhub = gudhub;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
async groupInvitationCreate(sharingGroups, actions) {
|
|
8
8
|
try {
|
|
9
|
-
|
|
10
|
-
sharing_groups: sharingGroups,
|
|
11
|
-
actions,
|
|
12
|
-
token: await this.gudhub.auth.getToken(),
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const groupInvitation = await this.req.post({
|
|
9
|
+
return await this.req.post({
|
|
16
10
|
url: "/api/invitation/create",
|
|
17
|
-
form
|
|
11
|
+
form: {
|
|
12
|
+
sharing_groups: sharingGroups,
|
|
13
|
+
actions
|
|
14
|
+
}
|
|
18
15
|
});
|
|
19
|
-
|
|
20
|
-
return groupInvitation;
|
|
21
16
|
} catch (err) {
|
|
22
17
|
console.log(err);
|
|
23
18
|
return null;
|
|
@@ -26,16 +21,12 @@ export class GroupInvitation {
|
|
|
26
21
|
|
|
27
22
|
async groupInvitationGet(invitationId) {
|
|
28
23
|
try {
|
|
29
|
-
|
|
30
|
-
invitation_id: invitationId
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const groupInvitation = await this.req.post({
|
|
24
|
+
return await this.req.get({
|
|
34
25
|
url: "/api/invitation/get",
|
|
35
|
-
|
|
26
|
+
params: {
|
|
27
|
+
invitation_id: invitationId
|
|
28
|
+
}
|
|
36
29
|
});
|
|
37
|
-
|
|
38
|
-
return groupInvitation;
|
|
39
30
|
} catch (err) {
|
|
40
31
|
console.log(err);
|
|
41
32
|
return null;
|
|
@@ -44,16 +35,12 @@ export class GroupInvitation {
|
|
|
44
35
|
|
|
45
36
|
async groupInvitationAccept(invitationId) {
|
|
46
37
|
try {
|
|
47
|
-
|
|
48
|
-
invitation_id: invitationId
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const groupInvitation = await this.req.post({
|
|
38
|
+
return await this.req.get({
|
|
52
39
|
url: "/api/invitation/accept",
|
|
53
|
-
|
|
40
|
+
params: {
|
|
41
|
+
invitation_id: invitationId
|
|
42
|
+
}
|
|
54
43
|
});
|
|
55
|
-
|
|
56
|
-
return groupInvitation;
|
|
57
44
|
} catch (err) {
|
|
58
45
|
console.log(err);
|
|
59
46
|
return null;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
// import should from "should";
|
|
2
1
|
import sinon from "sinon";
|
|
3
2
|
import { GroupInvitation } from "../GUDHUB/Utils/sharing/GroupInvitation.js";
|
|
4
3
|
|
|
5
4
|
describe("Invitation API", function () {
|
|
6
|
-
const token = "fgdr5rfd4e5hsjkdrkdemdxm6re5erl";
|
|
7
|
-
|
|
8
5
|
let gudhub;
|
|
9
6
|
let req;
|
|
10
7
|
let api;
|
|
@@ -12,12 +9,13 @@ describe("Invitation API", function () {
|
|
|
12
9
|
beforeEach(() => {
|
|
13
10
|
gudhub = {
|
|
14
11
|
auth: {
|
|
15
|
-
getToken: sinon.stub().resolves(
|
|
12
|
+
getToken: sinon.stub().resolves("fgdr5rfd4e5hsjkdrkdemdxm6re5erl")
|
|
16
13
|
}
|
|
17
14
|
};
|
|
18
15
|
|
|
19
16
|
req = {
|
|
20
|
-
post: sinon.stub()
|
|
17
|
+
post: sinon.stub(),
|
|
18
|
+
get: sinon.stub()
|
|
21
19
|
};
|
|
22
20
|
|
|
23
21
|
api = new GroupInvitation(gudhub, req);
|
|
@@ -48,21 +46,23 @@ describe("Invitation API", function () {
|
|
|
48
46
|
result.should.have.property("invitation_id", "r5fh587guj7r");
|
|
49
47
|
result.should.have.property("invitation_status", 0);
|
|
50
48
|
|
|
51
|
-
gudhub.auth.getToken.calledOnce.should.be.true();
|
|
52
49
|
req.post.calledOnce.should.be.true();
|
|
50
|
+
req.get.called.should.be.false();
|
|
53
51
|
|
|
54
52
|
const arg = req.post.firstCall.args[0];
|
|
55
53
|
arg.should.have.property("url", "/api/invitation/create");
|
|
56
54
|
arg.should.have.property("form");
|
|
57
|
-
arg.form.
|
|
55
|
+
arg.form.should.not.have.property("token");
|
|
58
56
|
arg.form.sharing_groups.should.eql(sharingGroups);
|
|
59
57
|
arg.form.actions.should.eql(actions);
|
|
58
|
+
|
|
59
|
+
gudhub.auth.getToken.called.should.be.false();
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
it("groupInvitationGet should return full invitation structure", async function () {
|
|
63
63
|
const invitationId = "lknvzl3266bkjbkb";
|
|
64
64
|
|
|
65
|
-
req.
|
|
65
|
+
req.get.resolves({
|
|
66
66
|
invitation_id: invitationId,
|
|
67
67
|
invitation_status: 0,
|
|
68
68
|
Inviter_user: {
|
|
@@ -85,18 +85,19 @@ describe("Invitation API", function () {
|
|
|
85
85
|
result.Inviter_user.should.have.property("fullname", "Andrii Atlas");
|
|
86
86
|
result.sharing_groups.should.be.Array();
|
|
87
87
|
|
|
88
|
-
req.
|
|
88
|
+
req.get.calledOnce.should.be.true();
|
|
89
|
+
req.post.called.should.be.false();
|
|
89
90
|
|
|
90
|
-
const arg = req.
|
|
91
|
+
const arg = req.get.firstCall.args[0];
|
|
91
92
|
arg.should.have.property("url", "/api/invitation/get");
|
|
92
|
-
arg.should.have.property("
|
|
93
|
-
arg.
|
|
93
|
+
arg.should.have.property("params");
|
|
94
|
+
arg.params.invitation_id.should.equal(invitationId);
|
|
94
95
|
});
|
|
95
96
|
|
|
96
97
|
it("groupInvitationAccept should send invitation id and return accepted status", async function () {
|
|
97
98
|
const invitationId = "lknvzl3266bkjbkb";
|
|
98
99
|
|
|
99
|
-
req.
|
|
100
|
+
req.get.resolves({
|
|
100
101
|
invitation_id: invitationId,
|
|
101
102
|
invitation_status: 1
|
|
102
103
|
});
|
|
@@ -106,11 +107,12 @@ describe("Invitation API", function () {
|
|
|
106
107
|
result.should.have.property("invitation_id", invitationId);
|
|
107
108
|
result.should.have.property("invitation_status", 1);
|
|
108
109
|
|
|
109
|
-
req.
|
|
110
|
+
req.get.calledOnce.should.be.true();
|
|
111
|
+
req.post.called.should.be.false();
|
|
110
112
|
|
|
111
|
-
const arg = req.
|
|
113
|
+
const arg = req.get.firstCall.args[0];
|
|
112
114
|
arg.should.have.property("url", "/api/invitation/accept");
|
|
113
|
-
arg.should.have.property("
|
|
114
|
-
arg.
|
|
115
|
+
arg.should.have.property("params");
|
|
116
|
+
arg.params.invitation_id.should.equal(invitationId);
|
|
115
117
|
});
|
|
116
|
-
});
|
|
118
|
+
});
|
|
@@ -206,8 +206,8 @@ export default function (app) {
|
|
|
206
206
|
});
|
|
207
207
|
});
|
|
208
208
|
|
|
209
|
-
app.
|
|
210
|
-
const { invitation_id } = req.
|
|
209
|
+
app.get('/api/invitation/get', (req, res) => {
|
|
210
|
+
const { invitation_id } = req.query;
|
|
211
211
|
|
|
212
212
|
if (!invitation_id) {
|
|
213
213
|
return res.status(400).json({ error: "Missing invitation_id" });
|
|
@@ -216,26 +216,26 @@ export default function (app) {
|
|
|
216
216
|
res.status(200).json({
|
|
217
217
|
invitation_id,
|
|
218
218
|
invitation_status: 0,
|
|
219
|
-
|
|
219
|
+
inviter_user: {
|
|
220
220
|
fullname: "Andrii Atlas",
|
|
221
221
|
avatar_128: "https://gudhub.com/avatars/22_2289_128.jpg",
|
|
222
222
|
avatar_512: "https://gudhub.com/avatars/22_2289_512.jpg"
|
|
223
223
|
},
|
|
224
224
|
sharing_groups: [
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
225
|
+
{
|
|
226
|
+
group_name: "3D Rendering Team",
|
|
227
|
+
group_permission: 1
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
group_name: "Design Team",
|
|
231
|
+
group_permission: 2
|
|
232
|
+
}
|
|
233
233
|
]
|
|
234
234
|
});
|
|
235
235
|
});
|
|
236
236
|
|
|
237
|
-
app.
|
|
238
|
-
const { invitation_id } = req.
|
|
237
|
+
app.get('/api/invitation/accept', (req, res) => {
|
|
238
|
+
const { invitation_id } = req.query;
|
|
239
239
|
|
|
240
240
|
if (!invitation_id) {
|
|
241
241
|
return res.status(400).json({ error: "Missing invitation_id" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gudhub/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.123",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"homepage": "https://bitbucket.org/AAtlas/gudhub#readme",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"axios": "
|
|
27
|
+
"axios": "1.14.0",
|
|
28
28
|
"canvas": "^3.2.0",
|
|
29
29
|
"date-fns": "^2.16.1",
|
|
30
30
|
"fuse.js": "^6.4.6",
|
package/umd/library.min.js
CHANGED
|
@@ -10,9 +10,9 @@ var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not bee
|
|
|
10
10
|
var global = arguments[3];
|
|
11
11
|
var define;
|
|
12
12
|
var process = require("process");
|
|
13
|
-
var e,t=arguments[3],r=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=o(require("./helpers/bind.js"));function o(e){return e&&e.__esModule?e:{default:e}}const{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:a,toStringTag:l}=Symbol,u=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),c=e=>(e=e.toLowerCase(),t=>u(t)===e),f=e=>t=>typeof t===e,{isArray:p}=Array,d=f("undefined");function
|
|
13
|
+
var e,t=arguments[3],r=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var n=o(require("./helpers/bind.js"));function o(e){return e&&e.__esModule?e:{default:e}}const{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:a,toStringTag:l}=Symbol,u=(e=>t=>{const r=i.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),c=e=>(e=e.toLowerCase(),t=>u(t)===e),f=e=>t=>typeof t===e,{isArray:p}=Array,d=f("undefined");function b(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const y=c("ArrayBuffer");function O(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer)}const m=f("string"),g=f("function"),h=f("number"),w=e=>null!==e&&"object"==typeof e,j=e=>!0===e||!1===e,F=e=>{if("object"!==u(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||l in e||a in e)},v=e=>{if(!w(e)||b(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},A=c("Date"),P=c("File"),S=e=>!(!e||void 0===e.uri),x=e=>e&&void 0!==e.getParts,B=c("Blob"),C=c("FileList"),E=e=>w(e)&&g(e.pipe);function L(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{}}const R=L(),T=void 0!==R.FormData?R.FormData:void 0,M=e=>{let t;return e&&(T&&e instanceof T||g(e.append)&&("formdata"===(t=u(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},D=c("URLSearchParams"),[k,N,_,U]=["ReadableStream","Request","Response","Headers"].map(c),q=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function H(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),p(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(b(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function I(e,t){if(b(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}const K=(()=>"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:t)(),V=e=>!d(e)&&e!==K;function z(){const{caseless:e,skipUndefined:t}=V(this)&&this||{},r={},n=(n,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=e&&I(r,o)||o;F(r[i])&&F(n)?r[i]=z(r[i],n):F(n)?r[i]=z({},n):p(n)?r[i]=n.slice():t&&d(n)||(r[i]=n)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&H(arguments[o],n);return r}const J=(e,t,r,{allOwnKeys:o}={})=>(H(t,(t,o)=>{r&&g(t)?Object.defineProperty(e,o,{value:(0,n.default)(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),$=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),W=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},G=(e,t,r,n)=>{let o,i,a;const l={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==r&&s(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Q=(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},X=e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!h(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Y=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&s(Uint8Array)),Z=(e,t)=>{const r=(e&&e[a]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},ee=(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},te=c("HTMLFormElement"),re=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),ne=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),oe=c("RegExp"),ie=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};H(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)},se=e=>{ie(e,(t,r)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];g(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=(()=>{throw Error("Can not rewrite read-only method '"+r+"'")})))})},ae=(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return p(e)?n(e):n(String(e).split(t)),r},le=()=>{},ue=(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t;function ce(e){return!!(e&&g(e.append)&&"FormData"===e[l]&&e[a])}const fe=e=>{const t=new Array(10),r=(e,n)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(b(e))return e;if(!("toJSON"in e)){t[n]=e;const o=p(e)?[]:{};return H(e,(e,t)=>{const i=r(e,n+1);!d(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},pe=c("AsyncFunction"),de=e=>e&&(w(e)||g(e))&&g(e.then)&&g(e.catch),be=((e,t)=>e?setImmediate:t?((e,t)=>(K.addEventListener("message",({source:r,data:n})=>{r===K&&n===e&&t.length&&t.shift()()},!1),r=>{t.push(r),K.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))("function"==typeof setImmediate,g(K.postMessage)),ye="undefined"!=typeof queueMicrotask?queueMicrotask.bind(K):void 0!==r&&r.nextTick||be,Oe=e=>null!=e&&g(e[a]);var me=exports.default={isArray:p,isArrayBuffer:y,isBuffer:b,isFormData:M,isArrayBufferView:O,isString:m,isNumber:h,isBoolean:j,isObject:w,isPlainObject:F,isEmptyObject:v,isReadableStream:k,isRequest:N,isResponse:_,isHeaders:U,isUndefined:d,isDate:A,isFile:P,isReactNativeBlob:S,isReactNative:x,isBlob:B,isRegExp:oe,isFunction:g,isStream:E,isURLSearchParams:D,isTypedArray:Y,isFileList:C,forEach:H,merge:z,extend:J,trim:q,stripBOM:$,inherits:W,toFlatObject:G,kindOf:u,kindOfTest:c,endsWith:Q,toArray:X,forEachEntry:Z,matchAll:ee,isHTMLForm:te,hasOwnProperty:ne,hasOwnProp:ne,reduceDescriptors:ie,freezeMethods:se,toObjectSet:ae,toCamelCase:re,noop:le,toFiniteNumber:ue,findKey:I,global:K,isContextDefined:V,isSpecCompliantForm:ce,toJSONObject:fe,isAsyncFn:pe,isThenable:de,setImmediate:be,asap:ye,isIterable:Oe};
|
|
14
14
|
},{"./helpers/bind.js":"hRTX","process":"g5IB"}],"Cb9L":[function(require,module,exports) {
|
|
15
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("../utils.js"));function s(e){return e&&e.__esModule?e:{default:e}}class
|
|
15
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("../utils.js"));function s(e){return e&&e.__esModule?e:{default:e}}class t extends Error{static from(e,s,R,E,i,r){const _=new t(e.message,s||e.code,R,E,i);return _.cause=e,_.name=e.name,null!=e.status&&null==_.status&&(_.status=e.status),r&&Object.assign(_,r),_}constructor(e,s,t,R,E){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),t&&(this.config=t),R&&(this.request=R),E&&(this.response=E,this.status=E.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:e.default.toJSONObject(this.config),code:this.code,status:this.status}}}t.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",t.ERR_BAD_OPTION="ERR_BAD_OPTION",t.ECONNABORTED="ECONNABORTED",t.ETIMEDOUT="ETIMEDOUT",t.ERR_NETWORK="ERR_NETWORK",t.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",t.ERR_DEPRECATED="ERR_DEPRECATED",t.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",t.ERR_BAD_REQUEST="ERR_BAD_REQUEST",t.ERR_CANCELED="ERR_CANCELED",t.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",t.ERR_INVALID_URL="ERR_INVALID_URL";var R=exports.default=t;
|
|
16
16
|
},{"../utils.js":"Feqj"}],"zNfz":[function(require,module,exports) {
|
|
17
17
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=exports.default=null;
|
|
18
18
|
},{}],"FRly":[function(require,module,exports) {
|
|
@@ -27,7 +27,7 @@ var global = arguments[3];
|
|
|
27
27
|
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(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 a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(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 e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.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}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.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 r=0;r<t;r+=2)b(this,r,r+1);return this},f.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 r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.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 r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=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-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
|
|
28
28
|
},{"base64-js":"FRly","ieee754":"Quj6","isarray":"aqZJ","buffer":"aMB2"}],"wxxD":[function(require,module,exports) {
|
|
29
29
|
var Buffer = require("buffer").Buffer;
|
|
30
|
-
var e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("../utils.js")),r=i(require("../core/AxiosError.js")),n=i(require("../platform/node/classes/FormData.js"));function i(e){return e&&e.__esModule?e:{default:e}}function u(e){return t.default.isPlainObject(e)||t.default.isArray(e)}function f(e){return t.default.endsWith(e,"[]")?e.slice(0,-2):e}function o(e,t,r){return e?e.concat(t).map(function(e,t){return e=f(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}function a(e){return t.default.isArray(e)&&!e.some(u)}const l=t.default.toFlatObject(t.default,{},null,function(e){return/^is[A-Z]/.test(e)});function s(i,s,d){if(!t.default.isObject(i))throw new TypeError("target must be an object");s=s||new(n.default||FormData);const c=(d=t.default.toFlatObject(d,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,r){return!t.default.isUndefined(r[e])})).metaTokens,p=d.visitor||
|
|
30
|
+
var e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=i(require("../utils.js")),r=i(require("../core/AxiosError.js")),n=i(require("../platform/node/classes/FormData.js"));function i(e){return e&&e.__esModule?e:{default:e}}function u(e){return t.default.isPlainObject(e)||t.default.isArray(e)}function f(e){return t.default.endsWith(e,"[]")?e.slice(0,-2):e}function o(e,t,r){return e?e.concat(t).map(function(e,t){return e=f(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}function a(e){return t.default.isArray(e)&&!e.some(u)}const l=t.default.toFlatObject(t.default,{},null,function(e){return/^is[A-Z]/.test(e)});function s(i,s,d){if(!t.default.isObject(i))throw new TypeError("target must be an object");s=s||new(n.default||FormData);const c=(d=t.default.toFlatObject(d,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,r){return!t.default.isUndefined(r[e])})).metaTokens,p=d.visitor||B,b=d.dots,j=d.indexes,y=(d.Blob||"undefined"!=typeof Blob&&Blob)&&t.default.isSpecCompliantForm(s);if(!t.default.isFunction(p))throw new TypeError("visitor must be a function");function m(n){if(null===n)return"";if(t.default.isDate(n))return n.toISOString();if(t.default.isBoolean(n))return n.toString();if(!y&&t.default.isBlob(n))throw new r.default("Blob is not supported. Use a Buffer instead.");return t.default.isArrayBuffer(n)||t.default.isTypedArray(n)?y&&"function"==typeof Blob?new Blob([n]):e.from(n):n}function B(e,r,n){let i=e;if(t.default.isReactNative(s)&&t.default.isReactNativeBlob(e))return s.append(o(n,r,b),m(e)),!1;if(e&&!n&&"object"==typeof e)if(t.default.endsWith(r,"{}"))r=c?r:r.slice(0,-2),e=JSON.stringify(e);else if(t.default.isArray(e)&&a(e)||(t.default.isFileList(e)||t.default.endsWith(r,"[]"))&&(i=t.default.toArray(e)))return r=f(r),i.forEach(function(e,n){!t.default.isUndefined(e)&&null!==e&&s.append(!0===j?o([r],n,b):null===j?r:r+"[]",m(e))}),!1;return!!u(e)||(s.append(o(n,r,b),m(e)),!1)}const h=[],w=Object.assign(l,{defaultVisitor:B,convertValue:m,isVisitable:u});if(!t.default.isObject(i))throw new TypeError("data must be an object");return function e(r,n){if(!t.default.isUndefined(r)){if(-1!==h.indexOf(r))throw Error("Circular reference detected in "+n.join("."));h.push(r),t.default.forEach(r,function(r,i){!0===(!(t.default.isUndefined(r)||null===r)&&p.call(s,r,t.default.isString(i)?i.trim():i,n,w))&&e(r,n?n.concat(i):[i])}),h.pop()}}(i),s}var d=exports.default=s;
|
|
31
31
|
},{"../utils.js":"Feqj","../core/AxiosError.js":"Cb9L","../platform/node/classes/FormData.js":"zNfz","buffer":"aMB2"}],"xqzv":[function(require,module,exports) {
|
|
32
32
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=e(require("./toFormData.js"));function e(t){return t&&t.__esModule?t:{default:t}}function n(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function r(e,n){this._pairs=[],e&&(0,t.default)(e,this,n)}const o=r.prototype;o.append=function(t,e){this._pairs.push([t,e])},o.toString=function(t){const e=t?function(e){return t.call(this,e,n)}:n;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};var u=exports.default=r;
|
|
33
33
|
},{"./toFormData.js":"wxxD"}],"phSU":[function(require,module,exports) {
|
|
@@ -57,7 +57,7 @@ var e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value
|
|
|
57
57
|
},{"../utils.js":"Feqj","../core/AxiosError.js":"Cb9L","./transitional.js":"hU1T","../helpers/toFormData.js":"wxxD","../helpers/toURLEncodedForm.js":"oiJV","../platform/index.js":"VfMV","../helpers/formDataToJSON.js":"NTPf"}],"Zn5P":[function(require,module,exports) {
|
|
58
58
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("../utils.js"));function t(e){return e&&e.__esModule?e:{default:e}}const r=e.default.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var o=e=>{const t={};let o,i,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),o=e.substring(0,s).trim().toLowerCase(),i=e.substring(s+1).trim(),!o||t[o]&&r[o]||("set-cookie"===o?t[o]?t[o].push(i):t[o]=[i]:t[o]=t[o]?t[o]+", "+i:i)}),t};exports.default=o;
|
|
59
59
|
},{"../utils.js":"Feqj"}],"sDZl":[function(require,module,exports) {
|
|
60
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("../utils.js")),e=r(require("../helpers/parseHeaders.js"));function r(t){return t&&t.__esModule?t:{default:t}}const s=Symbol("internals");function n(t){return t&&String(t).trim().toLowerCase()}function i(e){return!1===e||null==e?e:t.default.isArray(e)?e.map(i):String(e)}function o(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const a=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function c(e,r,s,n,i){return t.default.isFunction(n)?n.call(this,r,s):(i&&(r=s),t.default.isString(r)?t.default.isString(n)?-1!==r.indexOf(n):t.default.isRegExp(n)?n.test(r):void 0:void 0)}function u(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function l(e,r){const s=t.default.toCamelCase(" "+r);["get","set","has"].forEach(t=>{Object.defineProperty(e,t+s,{value:function(e,s,n){return this[t].call(this,r,e,s,n)},configurable:!0})})}class f{constructor(t){t&&this.set(t)}set(r,s,o){const c=this;function u(e,r,s){const o=n(r);if(!o)throw new Error("header name must be a non-empty string");const a=t.default.findKey(c,o);(!a||void 0===c[a]||!0===s||void 0===s&&!1!==c[a])&&(c[a||r]=i(e))}const l=(e,r)=>t.default.forEach(e,(t,e)=>u(t,e,r));if(t.default.isPlainObject(r)||r instanceof this.constructor)l(r,s);else if(t.default.isString(r)&&(r=r.trim())&&!a(r))l((0,e.default)(r),s);else if(t.default.isObject(r)&&t.default.isIterable(r)){let e,n,i={};for(const s of r){if(!t.default.isArray(s))throw TypeError("Object iterator must return a key-value pair");i[n=s[0]]=(e=i[n])?t.default.isArray(e)?[...e,s[1]]:[e,s[1]]:s[1]}l(i,s)}else null!=r&&u(s,r,o);return this}get(e,r){if(e=n(e)){const s=t.default.findKey(this,e);if(s){const e=this[s];if(!r)return e;if(!0===r)return o(e);if(t.default.isFunction(r))return r.call(this,e,s);if(t.default.isRegExp(r))return r.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=n(e)){const s=t.default.findKey(this,e);return!(!s||void 0===this[s]||r&&!c(this,this[s],s,r))}return!1}delete(e,r){const s=this;let i=!1;function o(e){if(e=n(e)){const n=t.default.findKey(s,e);!n||r&&!c(s,s[n],n,r)||(delete s[n],i=!0)}}return t.default.isArray(e)?e.forEach(o):o(e),i}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const n=e[r];t&&!c(this,this[n],n,t,!0)||(delete this[n],s=!0)}return s}normalize(e){const r=this,s={};return t.default.forEach(this,(n,o)=>{const a=t.default.findKey(s,o);if(a)return r[a]=i(n),void delete r[o];const c=e?u(o):String(o).trim();c!==o&&delete r[o],r[c]=i(n),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(e){const r=Object.create(null);return t.default.forEach(this,(s,n)=>{null!=s&&!1!==s&&(r[n]=e&&t.default.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(e){const r=(this[s]=this[s]={accessors:{}}).accessors,i=this.prototype;function o(t){const e=n(t);r[e]||(l(i,t),r[e]=!0)}return t.default.isArray(e)?e.forEach(o):o(e),this}}f.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),t.default.reduceDescriptors(f.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),t.default.freezeMethods(f);var d=exports.default=f;
|
|
60
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=r(require("../utils.js")),e=r(require("../helpers/parseHeaders.js"));function r(t){return t&&t.__esModule?t:{default:t}}const s=Symbol("internals");function n(t){return t&&String(t).trim().toLowerCase()}function i(e){return!1===e||null==e?e:t.default.isArray(e)?e.map(i):String(e).replace(/[\r\n]+$/,"")}function o(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const a=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function c(e,r,s,n,i){return t.default.isFunction(n)?n.call(this,r,s):(i&&(r=s),t.default.isString(r)?t.default.isString(n)?-1!==r.indexOf(n):t.default.isRegExp(n)?n.test(r):void 0:void 0)}function u(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function l(e,r){const s=t.default.toCamelCase(" "+r);["get","set","has"].forEach(t=>{Object.defineProperty(e,t+s,{value:function(e,s,n){return this[t].call(this,r,e,s,n)},configurable:!0})})}class f{constructor(t){t&&this.set(t)}set(r,s,o){const c=this;function u(e,r,s){const o=n(r);if(!o)throw new Error("header name must be a non-empty string");const a=t.default.findKey(c,o);(!a||void 0===c[a]||!0===s||void 0===s&&!1!==c[a])&&(c[a||r]=i(e))}const l=(e,r)=>t.default.forEach(e,(t,e)=>u(t,e,r));if(t.default.isPlainObject(r)||r instanceof this.constructor)l(r,s);else if(t.default.isString(r)&&(r=r.trim())&&!a(r))l((0,e.default)(r),s);else if(t.default.isObject(r)&&t.default.isIterable(r)){let e,n,i={};for(const s of r){if(!t.default.isArray(s))throw TypeError("Object iterator must return a key-value pair");i[n=s[0]]=(e=i[n])?t.default.isArray(e)?[...e,s[1]]:[e,s[1]]:s[1]}l(i,s)}else null!=r&&u(s,r,o);return this}get(e,r){if(e=n(e)){const s=t.default.findKey(this,e);if(s){const e=this[s];if(!r)return e;if(!0===r)return o(e);if(t.default.isFunction(r))return r.call(this,e,s);if(t.default.isRegExp(r))return r.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=n(e)){const s=t.default.findKey(this,e);return!(!s||void 0===this[s]||r&&!c(this,this[s],s,r))}return!1}delete(e,r){const s=this;let i=!1;function o(e){if(e=n(e)){const n=t.default.findKey(s,e);!n||r&&!c(s,s[n],n,r)||(delete s[n],i=!0)}}return t.default.isArray(e)?e.forEach(o):o(e),i}clear(t){const e=Object.keys(this);let r=e.length,s=!1;for(;r--;){const n=e[r];t&&!c(this,this[n],n,t,!0)||(delete this[n],s=!0)}return s}normalize(e){const r=this,s={};return t.default.forEach(this,(n,o)=>{const a=t.default.findKey(s,o);if(a)return r[a]=i(n),void delete r[o];const c=e?u(o):String(o).trim();c!==o&&delete r[o],r[c]=i(n),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(e){const r=Object.create(null);return t.default.forEach(this,(s,n)=>{null!=s&&!1!==s&&(r[n]=e&&t.default.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(e){const r=(this[s]=this[s]={accessors:{}}).accessors,i=this.prototype;function o(t){const e=n(t);r[e]||(l(i,t),r[e]=!0)}return t.default.isArray(e)?e.forEach(o):o(e),this}}f.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),t.default.reduceDescriptors(f.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),t.default.freezeMethods(f);var d=exports.default=f;
|
|
61
61
|
},{"../utils.js":"Feqj","../helpers/parseHeaders.js":"Zn5P"}],"IAOH":[function(require,module,exports) {
|
|
62
62
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;var e=u(require("../utils.js")),t=u(require("../defaults/index.js")),r=u(require("../core/AxiosHeaders.js"));function u(e){return e&&e.__esModule?e:{default:e}}function s(u,s){const a=this||t.default,o=s||a,i=r.default.from(o.headers);let l=o.data;return e.default.forEach(u,function(e){l=e.call(a,l,i.normalize(),s?s.status:void 0)}),i.normalize(),l}
|
|
63
63
|
},{"../utils.js":"Feqj","../defaults/index.js":"r0tr","../core/AxiosHeaders.js":"sDZl"}],"mXc0":[function(require,module,exports) {
|
|
@@ -95,13 +95,13 @@ var e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value
|
|
|
95
95
|
},{"../cancel/CanceledError.js":"lyDU","../core/AxiosError.js":"Cb9L","../utils.js":"Feqj"}],"p8fg":[function(require,module,exports) {
|
|
96
96
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.trackStream=exports.streamChunk=exports.readBytes=void 0;const e=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,a=0;for(;a<r;)n=a+t,yield e.slice(a,n),a=n};exports.streamChunk=e;const t=async function*(t,n){for await(const a of r(t))yield*e(a,n)};exports.readBytes=t;const r=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},n=(e,r,n,a)=>{const o=t(e,r);let s,c=0,i=e=>{s||(s=!0,a&&a(e))};return new ReadableStream({async pull(e){try{const{done:r,value:a}=await o.next();if(r)return i(),void e.close();let s=a.byteLength;if(n){let e=c+=s;n(e)}e.enqueue(new Uint8Array(a))}catch(t){throw i(t),t}},cancel:e=>(i(e),o.return())},{highWaterMark:2})};exports.trackStream=n;
|
|
97
97
|
},{}],"Afwx":[function(require,module,exports) {
|
|
98
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFetch=exports.default=void 0;var e=i(require("../platform/index.js")),t=i(require("../utils.js")),r=i(require("../core/AxiosError.js")),s=i(require("../helpers/composeSignals.js")),a=require("../helpers/trackStream.js"),o=i(require("../core/AxiosHeaders.js")),n=require("../helpers/progressEventReducer.js"),u=i(require("../helpers/resolveConfig.js")),l=i(require("../core/settle.js"));function i(e){return e&&e.__esModule?e:{default:e}}const d=65536,{isFunction:
|
|
98
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFetch=exports.default=void 0;var e=i(require("../platform/index.js")),t=i(require("../utils.js")),r=i(require("../core/AxiosError.js")),s=i(require("../helpers/composeSignals.js")),a=require("../helpers/trackStream.js"),o=i(require("../core/AxiosHeaders.js")),n=require("../helpers/progressEventReducer.js"),u=i(require("../helpers/resolveConfig.js")),l=i(require("../core/settle.js"));function i(e){return e&&e.__esModule?e:{default:e}}const d=65536,{isFunction:c}=t.default,f=(({Request:e,Response:t})=>({Request:e,Response:t}))(t.default.global),{ReadableStream:p,TextEncoder:h}=t.default.global,g=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},y=i=>{i=t.default.merge.call({skipUndefined:!0},f,i);const{fetch:d,Request:y,Response:m}=i,w=d?c(d):"function"==typeof fetch,b=c(y),R=c(m);if(!w)return!1;const x=w&&c(p),S=w&&("function"==typeof h?(e=>t=>e.encode(t))(new h):async e=>new Uint8Array(await new y(e).arrayBuffer())),T=b&&x&&g(()=>{let t=!1;const r=new p,s=new y(e.default.origin,{body:r,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return r.cancel(),t&&!s}),q=R&&x&&g(()=>t.default.isReadableStream(new m("").body)),v={stream:q&&(e=>e.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!v[e]&&(v[e]=((t,s)=>{let a=t&&t[e];if(a)return a.call(t);throw new r.default(`Response type '${e}' is not supported`,r.default.ERR_NOT_SUPPORT,s)}))});const E=async(r,s)=>{const a=t.default.toFiniteNumber(r.getContentLength());return null==a?(async r=>{if(null==r)return 0;if(t.default.isBlob(r))return r.size;if(t.default.isSpecCompliantForm(r)){const t=new y(e.default.origin,{method:"POST",body:r});return(await t.arrayBuffer()).byteLength}return t.default.isArrayBufferView(r)||t.default.isArrayBuffer(r)?r.byteLength:(t.default.isURLSearchParams(r)&&(r+=""),t.default.isString(r)?(await S(r)).byteLength:void 0)})(s):a};return async e=>{let{url:i,method:c,data:f,signal:p,cancelToken:h,timeout:g,onDownloadProgress:w,onUploadProgress:R,responseType:x,headers:S,withCredentials:j="same-origin",fetchOptions:O}=(0,u.default)(e),P=d||fetch;x=x?(x+"").toLowerCase():"text";let C=(0,s.default)([p,h&&h.toAbortSignal()],g),D=null;const F=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let L;try{if(R&&T&&"get"!==c&&"head"!==c&&0!==(L=await E(S,f))){let e,r=new y(i,{method:"POST",body:f,duplex:"half"});if(t.default.isFormData(f)&&(e=r.headers.get("content-type"))&&S.setContentType(e),r.body){const[e,t]=(0,n.progressEventDecorator)(L,(0,n.progressEventReducer)((0,n.asyncDecorator)(R)));f=(0,a.trackStream)(r.body,65536,e,t)}}t.default.isString(j)||(j=j?"include":"omit");const s=b&&"credentials"in y.prototype,u={...O,signal:C,method:c.toUpperCase(),headers:S.normalize().toJSON(),body:f,duplex:"half",credentials:s?j:void 0};D=b&&new y(i,u);let d=await(b?P(D,O):P(i,u));const p=q&&("stream"===x||"response"===x);if(q&&(w||p&&F)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=d[t]});const r=t.default.toFiniteNumber(d.headers.get("content-length")),[s,o]=w&&(0,n.progressEventDecorator)(r,(0,n.progressEventReducer)((0,n.asyncDecorator)(w),!0))||[];d=new m((0,a.trackStream)(d.body,65536,s,()=>{o&&o(),F&&F()}),e)}x=x||"text";let h=await v[t.default.findKey(v,x)||"text"](d,e);return!p&&F&&F(),await new Promise((t,r)=>{(0,l.default)(t,r,{data:h,headers:o.default.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:D})})}catch(_){if(F&&F(),_&&"TypeError"===_.name&&/Load failed|fetch/i.test(_.message))throw Object.assign(new r.default("Network Error",r.default.ERR_NETWORK,e,D,_&&_.response),{cause:_.cause||_});throw r.default.from(_,_&&_.code,e,D,_&&_.response)}}},m=new Map,w=e=>{let t=e&&e.env||{};const{fetch:r,Request:s,Response:a}=t,o=[s,a,r];let n,u,l=o.length,i=m;for(;l--;)n=o[l],void 0===(u=i.get(n))&&i.set(n,u=l?new Map:y(t)),i=u;return u};exports.getFetch=w;const b=w();var R=exports.default=b;
|
|
99
99
|
},{"../platform/index.js":"VfMV","../utils.js":"Feqj","../core/AxiosError.js":"Cb9L","../helpers/composeSignals.js":"T6jO","../helpers/trackStream.js":"p8fg","../core/AxiosHeaders.js":"sDZl","../helpers/progressEventReducer.js":"hEyL","../helpers/resolveConfig.js":"qSXR","../core/settle.js":"Ztkp"}],"aHrQ":[function(require,module,exports) {
|
|
100
100
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("../utils.js")),t=i(require("./http.js")),r=i(require("./xhr.js")),n=o(require("./fetch.js")),a=i(require("../core/AxiosError.js"));function o(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var a,o,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(a=t?n:r){if(a.has(e))return a.get(e);a.set(e,i)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((o=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(o.get||o.set)?a(i,r,o):i[r]=e[r]);return i})(e,t)}function i(e){return e&&e.__esModule?e:{default:e}}const u={http:t.default,xhr:r.default,fetch:{get:n.getFetch}};e.default.forEach(u,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const s=e=>`- ${e}`,f=t=>e.default.isFunction(t)||null===t||!1===t;function l(t,r){t=e.default.isArray(t)?t:[t];const{length:n}=t;let o,i;const l={};for(let s=0;s<n;s++){let n;if(i=o=t[s],!f(o)&&void 0===(i=u[(n=String(o)).toLowerCase()]))throw new a.default(`Unknown adapter '${n}'`);if(i&&(e.default.isFunction(i)||(i=i.get(r))))break;l[n||"#"+s]=i}if(!i){const e=Object.entries(l).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(s).join("\n"):" "+s(e[0]):"as no adapter specified";throw new a.default("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i}var c=exports.default={getAdapter:l,adapters:u};
|
|
101
101
|
},{"../utils.js":"Feqj","./http.js":"zNfz","./xhr.js":"akUF","./fetch.js":"Afwx","../core/AxiosError.js":"Cb9L"}],"HALK":[function(require,module,exports) {
|
|
102
102
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=d(require("./transformData.js")),r=d(require("../cancel/isCancel.js")),a=d(require("../defaults/index.js")),t=d(require("../cancel/CanceledError.js")),s=d(require("../core/AxiosHeaders.js")),n=d(require("../adapters/adapters.js"));function d(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new t.default(null,e)}function u(t){return o(t),t.headers=s.default.from(t.headers),t.data=e.default.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),n.default.getAdapter(t.adapter||a.default.adapter,t)(t).then(function(r){return o(t),r.data=e.default.call(t,t.transformResponse,r),r.headers=s.default.from(r.headers),r},function(a){return(0,r.default)(a)||(o(t),a&&a.response&&(a.response.data=e.default.call(t,t.transformResponse,a.response),a.response.headers=s.default.from(a.response.headers))),Promise.reject(a)})}
|
|
103
103
|
},{"./transformData.js":"IAOH","../cancel/isCancel.js":"mXc0","../defaults/index.js":"r0tr","../cancel/CanceledError.js":"lyDU","../core/AxiosHeaders.js":"sDZl","../adapters/adapters.js":"aHrQ"}],"xOzr":[function(require,module,exports) {
|
|
104
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VERSION=void 0;const e=exports.VERSION="1.
|
|
104
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VERSION=void 0;const e=exports.VERSION="1.14.0";
|
|
105
105
|
},{}],"bSmC":[function(require,module,exports) {
|
|
106
106
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../env/data.js"),t=n(require("../core/AxiosError.js"));function n(e){return e&&e.__esModule?e:{default:e}}const o={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const r={};function i(e,n,o){if("object"!=typeof e)throw new t.default("options must be an object",t.default.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],a=n[s];if(a){const n=e[s],o=void 0===n||a(n,s,e);if(!0!==o)throw new t.default("option "+s+" must be "+o,t.default.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new t.default("Unknown option "+s,t.default.ERR_BAD_OPTION)}}o.transitional=function(n,o,i){function s(t,n){return"[Axios v"+e.VERSION+"] Transitional option '"+t+"'"+n+(i?". "+i:"")}return(e,i,a)=>{if(!1===n)throw new t.default(s(i," has been removed"+(o?" in "+o:"")),t.default.ERR_DEPRECATED);return o&&!r[i]&&(r[i]=!0,console.warn(s(i," has been deprecated since v"+o+" and will be removed in the near future"))),!n||n(e,i,a)}},o.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var s=exports.default={assertOptions:i,validators:o};
|
|
107
107
|
},{"../env/data.js":"xOzr","../core/AxiosError.js":"Cb9L"}],"trUU":[function(require,module,exports) {
|
|
@@ -339,7 +339,7 @@ var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
339
339
|
},{}],"LS0j":[function(require,module,exports) {
|
|
340
340
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupSharing=void 0;var r=require("../groupManager/GroupManager.js"),e=require("./AppGroupSharing.js");function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function n(){var r,e,t="function"==typeof Symbol?Symbol:{},u=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function p(t,n,u,i){var p=n&&n.prototype instanceof c?n:c,s=Object.create(p.prototype);return o(s,"_invoke",function(t,n,o){var u,i,p,c=0,s=o||[],f=!1,l={p:0,n:0,v:r,a:y,f:y.bind(r,4),d:function(e,t){return u=e,i=0,p=r,l.n=t,a}};function y(t,n){for(i=t,p=n,e=0;!f&&c&&!o&&e<s.length;e++){var o,u=s[e],y=l.p,g=u[2];t>3?(o=g===n)&&(p=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=r):u[0]<=y&&((o=t<2&&y<u[1])?(i=0,l.v=n,l.n=u[1]):y<g&&(o=t<3||u[0]>n||n>g)&&(u[4]=t,u[5]=n,l.n=g,i=0))}if(o||t>1)return a;throw f=!0,n}return function(o,s,g){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,g),i=s,p=g;(e=i<2?r:p)||!f;){u||(i?i<3?(i>1&&(l.n=-1),y(i,p)):l.n=p:l.v=p);try{if(c=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,p)))throw TypeError("iterator result is not an object");if(!e.done)return e;p=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(p=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=r}else if((e=(f=l.n<0)?p:t.call(n,l))!==a)break}catch(e){u=r,i=1,p=e}finally{c=1}}return{value:e,done:f}}}(t,u,i),!0),s}var a={};function c(){}function s(){}function f(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(o(e={},u,function(){return this}),e),y=f.prototype=c.prototype=Object.create(l);function g(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,f):(r.__proto__=f,o(r,i,"GeneratorFunction")),r.prototype=Object.create(y),r}return s.prototype=f,o(y,"constructor",f),o(f,"constructor",s),s.displayName="GeneratorFunction",o(f,i,"GeneratorFunction"),o(y),o(y,i,"Generator"),o(y,u,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),(n=function(){return{w:p,m:g}})()}function o(r,e,t,n){var u=Object.defineProperty;try{u({},"",{})}catch(r){u=0}(o=function(r,e,t,n){function i(e,t){o(r,e,function(r){return this._invoke(e,t,r)})}e?u?u(r,e,{value:t,enumerable:!n,configurable:!n,writable:!n}):r[e]=t:(i("next",0),i("throw",1),i("return",2))})(r,e,t,n)}function u(r,e,t,n,o,u,i){try{var p=r[u](i),a=p.value}catch(r){return void t(r)}p.done?e(a):Promise.resolve(a).then(n,o)}function i(r){return function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function p(r){u(i,n,o,p,a,"next",r)}function a(r){u(i,n,o,p,a,"throw",r)}p(void 0)})}}function p(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function a(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,s(n.key),n)}}function c(r,e,t){return e&&a(r.prototype,e),t&&a(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function s(r){var e=f(r,"string");return"symbol"==t(e)?e:e+""}function f(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}var l=exports.GroupSharing=function(){return c(function t(n,o,u){p(this,t),this.req=o,this.gudhub=n,this.pipeService=u,this.groupManager=new r.GroupManager(n,o),this.appGroupSharing=new e.AppGroupSharing(n,o)},[{key:"createGroup",value:function(r){return this.groupManager.createGroupApi(r)}},{key:"updateGroup",value:function(r,e){return this.groupManager.updateGroupApi(r,e)}},{key:"deleteGroup",value:function(r){return this.groupManager.deleteGroupApi(r)}},{key:"addUserToGroup",value:function(){var r=i(n().m(function r(e,t,o){var u;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.addUserToGroupApi(e,t,o);case 1:return u=r.v,this.pipeService.emit("group_members_add",{app_id:"group_sharing"},u),r.a(2,u)}},r,this)}));return function(e,t,n){return r.apply(this,arguments)}}()},{key:"getUsersByGroup",value:function(r){return this.groupManager.getUsersByGroupApi(r)}},{key:"updateUserInGroup",value:function(){var r=i(n().m(function r(e,t,o){var u;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.updateUserInGroupApi(e,t,o);case 1:return u=r.v,this.pipeService.emit("group_members_update",{app_id:"group_sharing"},u),r.a(2,u)}},r,this)}));return function(e,t,n){return r.apply(this,arguments)}}()},{key:"deleteUserFromGroup",value:function(){var r=i(n().m(function r(e,t){var o;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.deleteUserFromGroupApi(e,t);case 1:return o=r.v,this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},o),r.a(2,o)}},r,this)}));return function(e,t){return r.apply(this,arguments)}}()},{key:"getGroupsByUser",value:function(r){return this.groupManager.getGroupsByUserApi(r)}},{key:"addAppToGroup",value:function(r,e,t){return this.appGroupSharing.addAppToGroupApi(r,e,t)}},{key:"getAppsByGroup",value:function(r){return this.appGroupSharing.getAppsByGroupApi(r)}},{key:"updateAppInGroup",value:function(r,e,t){return this.appGroupSharing.updateAppInGroupApi(r,e,t)}},{key:"deleteAppFromGroup",value:function(r,e,t){return this.appGroupSharing.deleteAppFromGroupApi(r,e,t)}},{key:"getGroupsByApp",value:function(r){return this.appGroupSharing.getGroupsByAppApi(r)}}])}();
|
|
341
341
|
},{"../groupManager/GroupManager.js":"qJXG","./AppGroupSharing.js":"Z7AV"}],"kPfD":[function(require,module,exports) {
|
|
342
|
-
"use strict";function t(
|
|
342
|
+
"use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(r,o,i,u){var a=o&&o.prototype instanceof f?o:f,p=Object.create(a.prototype);return n(p,"_invoke",function(r,n,o){var i,u,a,f=0,p=o||[],l=!1,s={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,n){return i=r,u=0,a=t,s.n=n,c}};function v(r,n){for(u=r,a=n,e=0;!l&&f&&!o&&e<p.length;e++){var o,i=p[e],v=s.p,y=i[2];r>3?(o=y===n)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=v&&((o=r<2&&v<i[1])?(u=0,s.v=n,s.n=i[1]):v<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,s.n=y,u=0))}if(o||r>1)return c;throw l=!0,n}return function(o,p,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===p&&v(p,y),u=p,a=y;(e=u<2?t:a)||!l;){i||(u?u<3?(u>1&&(s.n=-1),v(u,a)):s.n=a:s.v=a);try{if(f=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(l=s.n<0)?a:r.call(n,s))!==c)break}catch(e){i=t,u=1,a=e}finally{f=1}}return{value:e,done:l}}}(r,i,u),!0),p}var c={};function f(){}function p(){}function l(){}e=Object.getPrototypeOf;var s=[][i]?e(e([][i]())):(n(e={},i,function(){return this}),e),v=l.prototype=f.prototype=Object.create(s);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,n(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return p.prototype=l,n(v,"constructor",l),n(l,"constructor",p),p.displayName="GeneratorFunction",n(l,u,"GeneratorFunction"),n(v),n(v,u,"Generator"),n(v,i,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:y}})()}function n(t,r,e,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(n=function(t,r,e,o){function u(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?i?i(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(u("next",0),u("throw",1),u("return",2))})(t,r,e,o)}function e(t,r,n,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?r(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var u=t.apply(r,n);function a(t){e(u,o,i,a,c,"next",t)}function c(t){e(u,o,i,a,c,"throw",t)}a(void 0)})}}function i(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,r,n){return r&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(r){var n=f(r,"string");return"symbol"==t(n)?n:n+""}function f(r,n){if("object"!=t(r)||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var o=e.call(r,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.GroupInvitation=void 0;var p=exports.GroupInvitation=function(){return a(function t(r,n){i(this,t),this.req=n,this.gudhub=r},[{key:"groupInvitationCreate",value:function(){var t=o(r().m(function t(n,e){var o;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/invitation/create",form:{sharing_groups:n,actions:e}});case 1:return t.a(2,t.v);case 2:return t.p=2,o=t.v,console.log(o),t.a(2,null)}},t,this,[[0,2]])}));return function(r,n){return t.apply(this,arguments)}}()},{key:"groupInvitationGet",value:function(){var t=o(r().m(function t(n){var e;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.get({url:"/api/invitation/get",params:{invitation_id:n}});case 1:return t.a(2,t.v);case 2:return t.p=2,e=t.v,console.log(e),t.a(2,null)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()},{key:"groupInvitationAccept",value:function(){var t=o(r().m(function t(n){var e;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.req.get({url:"/api/invitation/accept",params:{invitation_id:n}});case 1:return t.a(2,t.v);case 2:return t.p=2,e=t.v,console.log(e),t.a(2,null)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()}])}(),l=exports.default=p;
|
|
343
343
|
},{}],"XaHW":[function(require,module,exports) {
|
|
344
344
|
"use strict";function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(r)}function r(){var t,e,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function a(r,o,u,i){var a=o&&o.prototype instanceof s?o:s,f=Object.create(a.prototype);return n(f,"_invoke",function(r,n,o){var u,i,a,s=0,f=o||[],p=!1,l={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,n){return u=r,i=0,a=t,l.n=n,c}};function v(r,n){for(i=r,a=n,e=0;!p&&s&&!o&&e<f.length;e++){var o,u=f[e],v=l.p,h=u[2];r>3?(o=h===n)&&(a=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=t):u[0]<=v&&((o=r<2&&v<u[1])?(i=0,l.v=n,l.n=u[1]):v<h&&(o=r<3||u[0]>n||n>h)&&(u[4]=r,u[5]=n,l.n=h,i=0))}if(o||r>1)return c;throw p=!0,n}return function(o,f,h){if(s>1)throw TypeError("Generator is already running");for(p&&1===f&&v(f,h),i=f,a=h;(e=i<2?t:a)||!p;){u||(i?i<3?(i>1&&(l.n=-1),v(i,a)):l.n=a:l.v=a);try{if(s=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=t}else if((e=(p=l.n<0)?a:r.call(n,l))!==c)break}catch(e){u=t,i=1,a=e}finally{s=1}}return{value:e,done:p}}}(r,u,i),!0),f}var c={};function s(){}function f(){}function p(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(n(e={},u,function(){return this}),e),v=p.prototype=s.prototype=Object.create(l);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,n(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t}return f.prototype=p,n(v,"constructor",p),n(p,"constructor",f),f.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,u,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:h}})()}function n(t,r,e,o){var u=Object.defineProperty;try{u({},"",{})}catch(t){u=0}(n=function(t,r,e,o){function i(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?u?u(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(i("next",0),i("throw",1),i("return",2))})(t,r,e,o)}function e(t,r,n,e,o,u,i){try{var a=t[u](i),c=a.value}catch(t){return void n(t)}a.done?r(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=t.apply(r,n);function a(t){e(i,o,u,a,c,"next",t)}function c(t){e(i,o,u,a,c,"throw",t)}a(void 0)})}}function u(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,r,n){return r&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(r){var n=s(r,"string");return"symbol"==t(n)?n:n+""}function s(r,n){if("object"!=t(r)||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var o=e.call(r,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sharing=void 0;var f=exports.Sharing=function(){return a(function t(r,n){u(this,t),this.req=n,this.gudhub=r},[{key:"add",value:function(){var t=o(r().m(function t(n,e,o){var u,i,a,c;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return a=t.v,u={token:a,app_id:n,user_id:e,sharing_permission:o},t.n=2,this.req.post({url:"/sharing/add",form:u});case 2:return i=t.v,t.a(2,i);case 3:return t.p=3,c=t.v,console.log(c),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n,e){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=o(r().m(function t(n,e,o){var u,i,a,c;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return a=t.v,u={token:a,app_id:n,user_id:e,sharing_permission:o},t.n=2,this.req.post({url:"/sharing/update",form:u});case 2:return i=t.v,t.a(2,i);case 3:return t.p=3,c=t.v,console.log(c),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n,e){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=o(r().m(function t(n,e){var o,u,i,a;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return i=t.v,o={token:i,app_id:n,user_id:e},t.n=2,this.req.post({url:"/sharing/delete",form:o});case 2:return u=t.v,t.a(2,u);case 3:return t.p=3,a=t.v,console.log(a),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n){return t.apply(this,arguments)}}()},{key:"getAppUsers",value:function(){var t=o(r().m(function t(n){var e,o,u,i;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return u=t.v,e={token:u,app_id:n},t.n=2,this.req.post({url:"/sharing/get-app-users",form:e});case 2:return o=t.v,t.a(2,o);case 3:return t.p=3,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,3]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addInvitation",value:function(){var t=o(r().m(function t(n,e){var o,u,i,a;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return i=t.v,o={token:i,guests_emails:n,apps:e},t.n=2,this.req.post({url:"/api/invitation/add",form:o});case 2:return u=t.v,t.a(2,u);case 3:return t.p=3,a=t.v,console.log(a),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n){return t.apply(this,arguments)}}()}])}();
|
|
345
345
|
},{}],"quyV":[function(require,module,exports) {
|