New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

demoway-sdk

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

demoway-sdk - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

1

dist/index.d.ts

@@ -11,1 +11,2 @@ import type { ISDKService } from './lib/service-host';

export declare function initialize({ accessToken }: ISDKInitializeOptions): Promise<ISDKService>;
export declare function rageClick(element: HTMLElement, count: number, timeLimit: number): Promise<void>;

@@ -1,57 +0,1031 @@

const d = (e) => {
const t = /* @__PURE__ */ new Set();
var C = function(r, n) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var i in t)
Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
}, C(r, n);
};
function Y(r, n) {
if (typeof n != "function" && n !== null)
throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
C(r, n);
function e() {
this.constructor = r;
}
r.prototype = n === null ? Object.create(n) : (e.prototype = n.prototype, new e());
}
function nr(r, n, e, t) {
function i(o) {
return o instanceof e ? o : new e(function(u) {
u(o);
});
}
return new (e || (e = Promise))(function(o, u) {
function a(l) {
try {
c(t.next(l));
} catch (y) {
u(y);
}
}
function s(l) {
try {
c(t.throw(l));
} catch (y) {
u(y);
}
}
function c(l) {
l.done ? o(l.value) : i(l.value).then(a, s);
}
c((t = t.apply(r, n || [])).next());
});
}
function W(r, n) {
var e = { label: 0, sent: function() {
if (o[0] & 1)
throw o[1];
return o[1];
}, trys: [], ops: [] }, t, i, o, u;
return u = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
return this;
}), u;
function a(c) {
return function(l) {
return s([c, l]);
};
}
function s(c) {
if (t)
throw new TypeError("Generator is already executing.");
for (; u && (u = 0, c[0] && (e = 0)), e; )
try {
if (t = 1, i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, c[1])).done)
return o;
switch (i = 0, o && (c = [c[0] & 2, o.value]), c[0]) {
case 0:
case 1:
o = c;
break;
case 4:
return e.label++, { value: c[1], done: !1 };
case 5:
e.label++, i = c[1], c = [0];
continue;
case 7:
c = e.ops.pop(), e.trys.pop();
continue;
default:
if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
e = 0;
continue;
}
if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
e.label = c[1];
break;
}
if (c[0] === 6 && e.label < o[1]) {
e.label = o[1], o = c;
break;
}
if (o && e.label < o[2]) {
e.label = o[2], e.ops.push(c);
break;
}
o[2] && e.ops.pop(), e.trys.pop();
continue;
}
c = n.call(r, e);
} catch (l) {
c = [6, l], i = 0;
} finally {
t = o = 0;
}
if (c[0] & 5)
throw c[1];
return { value: c[0] ? c[1] : void 0, done: !0 };
}
}
function w(r) {
var n = typeof Symbol == "function" && Symbol.iterator, e = n && r[n], t = 0;
if (e)
return e.call(r);
if (r && typeof r.length == "number")
return {
next: function() {
return r && t >= r.length && (r = void 0), { value: r && r[t++], done: !r };
}
};
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function E(r, n) {
var e = typeof Symbol == "function" && r[Symbol.iterator];
if (!e)
return r;
var t = e.call(r), i, o = [], u;
try {
for (; (n === void 0 || n-- > 0) && !(i = t.next()).done; )
o.push(i.value);
} catch (a) {
u = { error: a };
} finally {
try {
i && !i.done && (e = t.return) && e.call(t);
} finally {
if (u)
throw u.error;
}
}
return o;
}
function x(r, n, e) {
if (e || arguments.length === 2)
for (var t = 0, i = n.length, o; t < i; t++)
(o || !(t in n)) && (o || (o = Array.prototype.slice.call(n, 0, t)), o[t] = n[t]);
return r.concat(o || Array.prototype.slice.call(n));
}
function g(r) {
return this instanceof g ? (this.v = r, this) : new g(r);
}
function tr(r, n, e) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var t = e.apply(r, n || []), i, o = [];
return i = {}, u("next"), u("throw"), u("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function u(f) {
t[f] && (i[f] = function(p) {
return new Promise(function(v, h) {
o.push([f, p, v, h]) > 1 || a(f, p);
});
});
}
function a(f, p) {
try {
s(t[f](p));
} catch (v) {
y(o[0][3], v);
}
}
function s(f) {
f.value instanceof g ? Promise.resolve(f.value.v).then(c, l) : y(o[0][2], f);
}
function c(f) {
a("next", f);
}
function l(f) {
a("throw", f);
}
function y(f, p) {
f(p), o.shift(), o.length && a(o[0][0], o[0][1]);
}
}
function or(r) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var n = r[Symbol.asyncIterator], e;
return n ? n.call(r) : (r = typeof w == "function" ? w(r) : r[Symbol.iterator](), e = {}, t("next"), t("throw"), t("return"), e[Symbol.asyncIterator] = function() {
return this;
}, e);
function t(o) {
e[o] = r[o] && function(u) {
return new Promise(function(a, s) {
u = r[o](u), i(a, s, u.done, u.value);
});
};
}
function i(o, u, a, s) {
Promise.resolve(s).then(function(c) {
o({ value: c, done: a });
}, u);
}
}
function d(r) {
return typeof r == "function";
}
function z(r) {
var n = function(t) {
Error.call(t), t.stack = new Error().stack;
}, e = r(n);
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
}
var L = z(function(r) {
return function(e) {
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
` + e.map(function(t, i) {
return i + 1 + ") " + t.toString();
}).join(`
`) : "", this.name = "UnsubscriptionError", this.errors = e;
};
});
function M(r, n) {
if (r) {
var e = r.indexOf(n);
0 <= e && r.splice(e, 1);
}
}
var H = function() {
function r(n) {
this.initialTeardown = n, this.closed = !1, this._parentage = null, this._finalizers = null;
}
return r.prototype.unsubscribe = function() {
var n, e, t, i, o;
if (!this.closed) {
this.closed = !0;
var u = this._parentage;
if (u)
if (this._parentage = null, Array.isArray(u))
try {
for (var a = w(u), s = a.next(); !s.done; s = a.next()) {
var c = s.value;
c.remove(this);
}
} catch (h) {
n = { error: h };
} finally {
try {
s && !s.done && (e = a.return) && e.call(a);
} finally {
if (n)
throw n.error;
}
}
else
u.remove(this);
var l = this.initialTeardown;
if (d(l))
try {
l();
} catch (h) {
o = h instanceof L ? h.errors : [h];
}
var y = this._finalizers;
if (y) {
this._finalizers = null;
try {
for (var f = w(y), p = f.next(); !p.done; p = f.next()) {
var v = p.value;
try {
K(v);
} catch (h) {
o = o ?? [], h instanceof L ? o = x(x([], E(o)), E(h.errors)) : o.push(h);
}
}
} catch (h) {
t = { error: h };
} finally {
try {
p && !p.done && (i = f.return) && i.call(f);
} finally {
if (t)
throw t.error;
}
}
}
if (o)
throw new L(o);
}
}, r.prototype.add = function(n) {
var e;
if (n && n !== this)
if (this.closed)
K(n);
else {
if (n instanceof r) {
if (n.closed || n._hasParent(this))
return;
n._addParent(this);
}
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(n);
}
}, r.prototype._hasParent = function(n) {
var e = this._parentage;
return e === n || Array.isArray(e) && e.includes(n);
}, r.prototype._addParent = function(n) {
var e = this._parentage;
this._parentage = Array.isArray(e) ? (e.push(n), e) : e ? [e, n] : n;
}, r.prototype._removeParent = function(n) {
var e = this._parentage;
e === n ? this._parentage = null : Array.isArray(e) && M(e, n);
}, r.prototype.remove = function(n) {
var e = this._finalizers;
e && M(e, n), n instanceof r && n._removeParent(this);
}, r.EMPTY = function() {
var n = new r();
return n.closed = !0, n;
}(), r;
}();
H.EMPTY;
function X(r) {
return r instanceof H || r && "closed" in r && d(r.remove) && d(r.add) && d(r.unsubscribe);
}
function K(r) {
d(r) ? r() : r.unsubscribe();
}
var Z = {
onUnhandledError: null,
onStoppedNotification: null,
Promise: void 0,
useDeprecatedSynchronousErrorHandling: !1,
useDeprecatedNextContext: !1
}, j = {
setTimeout: function(r, n) {
for (var e = [], t = 2; t < arguments.length; t++)
e[t - 2] = arguments[t];
var i = j.delegate;
return i != null && i.setTimeout ? i.setTimeout.apply(i, x([r, n], E(e))) : setTimeout.apply(void 0, x([r, n], E(e)));
},
clearTimeout: function(r) {
var n = j.delegate;
return ((n == null ? void 0 : n.clearTimeout) || clearTimeout)(r);
},
delegate: void 0
};
function B(r) {
j.setTimeout(function() {
throw r;
});
}
function F() {
}
function ir(r) {
r();
}
var G = function(r) {
Y(n, r);
function n(e) {
var t = r.call(this) || this;
return t.isStopped = !1, e ? (t.destination = e, X(e) && e.add(t)) : t.destination = sr, t;
}
return n.create = function(e, t, i) {
return new A(e, t, i);
}, n.prototype.next = function(e) {
this.isStopped || this._next(e);
}, n.prototype.error = function(e) {
this.isStopped || (this.isStopped = !0, this._error(e));
}, n.prototype.complete = function() {
this.isStopped || (this.isStopped = !0, this._complete());
}, n.prototype.unsubscribe = function() {
this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
}, n.prototype._next = function(e) {
this.destination.next(e);
}, n.prototype._error = function(e) {
try {
this.destination.error(e);
} finally {
this.unsubscribe();
}
}, n.prototype._complete = function() {
try {
this.destination.complete();
} finally {
this.unsubscribe();
}
}, n;
}(H), ur = Function.prototype.bind;
function D(r, n) {
return ur.call(r, n);
}
var cr = function() {
function r(n) {
this.partialObserver = n;
}
return r.prototype.next = function(n) {
var e = this.partialObserver;
if (e.next)
try {
e.next(n);
} catch (t) {
T(t);
}
}, r.prototype.error = function(n) {
var e = this.partialObserver;
if (e.error)
try {
e.error(n);
} catch (t) {
T(t);
}
else
T(n);
}, r.prototype.complete = function() {
var n = this.partialObserver;
if (n.complete)
try {
n.complete();
} catch (e) {
T(e);
}
}, r;
}(), A = function(r) {
Y(n, r);
function n(e, t, i) {
var o = r.call(this) || this, u;
if (d(e) || !e)
u = {
next: e ?? void 0,
error: t ?? void 0,
complete: i ?? void 0
};
else {
var a;
o && Z.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
return o.unsubscribe();
}, u = {
next: e.next && D(e.next, a),
error: e.error && D(e.error, a),
complete: e.complete && D(e.complete, a)
}) : u = e;
}
return o.destination = new cr(u), o;
}
return n;
}(G);
function T(r) {
B(r);
}
function ar(r) {
throw r;
}
var sr = {
closed: !0,
next: F,
error: ar,
complete: F
}, _ = function() {
return typeof Symbol == "function" && Symbol.observable || "@@observable";
}();
function lr(r) {
return r;
}
function fr(r) {
return r.length === 0 ? lr : r.length === 1 ? r[0] : function(e) {
return r.reduce(function(t, i) {
return i(t);
}, e);
};
}
var S = function() {
function r(n) {
n && (this._subscribe = n);
}
return r.prototype.lift = function(n) {
var e = new r();
return e.source = this, e.operator = n, e;
}, r.prototype.subscribe = function(n, e, t) {
var i = this, o = dr(n) ? n : new A(n, e, t);
return ir(function() {
var u = i, a = u.operator, s = u.source;
o.add(a ? a.call(o, s) : s ? i._subscribe(o) : i._trySubscribe(o));
}), o;
}, r.prototype._trySubscribe = function(n) {
try {
return this._subscribe(n);
} catch (e) {
n.error(e);
}
}, r.prototype.forEach = function(n, e) {
var t = this;
return e = $(e), new e(function(i, o) {
var u = new A({
next: function(a) {
try {
n(a);
} catch (s) {
o(s), u.unsubscribe();
}
},
error: o,
complete: i
});
t.subscribe(u);
});
}, r.prototype._subscribe = function(n) {
var e;
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(n);
}, r.prototype[_] = function() {
return this;
}, r.prototype.pipe = function() {
for (var n = [], e = 0; e < arguments.length; e++)
n[e] = arguments[e];
return fr(n)(this);
}, r.prototype.toPromise = function(n) {
var e = this;
return n = $(n), new n(function(t, i) {
var o;
e.subscribe(function(u) {
return o = u;
}, function(u) {
return i(u);
}, function() {
return t(o);
});
});
}, r.create = function(n) {
return new r(n);
}, r;
}();
function $(r) {
var n;
return (n = r ?? Z.Promise) !== null && n !== void 0 ? n : Promise;
}
function hr(r) {
return r && d(r.next) && d(r.error) && d(r.complete);
}
function dr(r) {
return r && r instanceof G || hr(r) && X(r);
}
function yr(r) {
return d(r == null ? void 0 : r.lift);
}
function k(r) {
return function(n) {
if (yr(n))
return n.lift(function(e) {
try {
return r(e, this);
} catch (t) {
this.error(t);
}
});
throw new TypeError("Unable to lift unknown Observable type");
};
}
function I(r, n, e, t, i) {
return new pr(r, n, e, t, i);
}
var pr = function(r) {
Y(n, r);
function n(e, t, i, o, u, a) {
var s = r.call(this, e) || this;
return s.onFinalize = u, s.shouldUnsubscribe = a, s._next = t ? function(c) {
try {
t(c);
} catch (l) {
e.error(l);
}
} : r.prototype._next, s._error = o ? function(c) {
try {
o(c);
} catch (l) {
e.error(l);
} finally {
this.unsubscribe();
}
} : r.prototype._error, s._complete = i ? function() {
try {
i();
} catch (c) {
e.error(c);
} finally {
this.unsubscribe();
}
} : r.prototype._complete, s;
}
return n.prototype.unsubscribe = function() {
var e;
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
var t = this.closed;
r.prototype.unsubscribe.call(this), !t && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
}
}, n;
}(G), N = function(r) {
return r && typeof r.length == "number" && typeof r != "function";
};
function vr(r) {
return d(r == null ? void 0 : r.then);
}
function mr(r) {
return d(r[_]);
}
function br(r) {
return Symbol.asyncIterator && d(r == null ? void 0 : r[Symbol.asyncIterator]);
}
function wr(r) {
return new TypeError("You provided " + (r !== null && typeof r == "object" ? "an invalid object" : "'" + r + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
}
function Sr() {
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
}
var gr = Sr();
function Er(r) {
return d(r == null ? void 0 : r[gr]);
}
function xr(r) {
return tr(this, arguments, function() {
var e, t, i, o;
return W(this, function(u) {
switch (u.label) {
case 0:
e = r.getReader(), u.label = 1;
case 1:
u.trys.push([1, , 9, 10]), u.label = 2;
case 2:
return [4, g(e.read())];
case 3:
return t = u.sent(), i = t.value, o = t.done, o ? [4, g(void 0)] : [3, 5];
case 4:
return [2, u.sent()];
case 5:
return [4, g(i)];
case 6:
return [4, u.sent()];
case 7:
return u.sent(), [3, 2];
case 8:
return [3, 10];
case 9:
return e.releaseLock(), [7];
case 10:
return [2];
}
});
});
}
function Ir(r) {
return d(r == null ? void 0 : r.getReader);
}
function q(r) {
if (r instanceof S)
return r;
if (r != null) {
if (mr(r))
return Pr(r);
if (N(r))
return Tr(r);
if (vr(r))
return Ar(r);
if (br(r))
return rr(r);
if (Er(r))
return Or(r);
if (Ir(r))
return Rr(r);
}
throw wr(r);
}
function Pr(r) {
return new S(function(n) {
var e = r[_]();
if (d(e.subscribe))
return e.subscribe(n);
throw new TypeError("Provided object does not correctly implement Symbol.observable");
});
}
function Tr(r) {
return new S(function(n) {
for (var e = 0; e < r.length && !n.closed; e++)
n.next(r[e]);
n.complete();
});
}
function Ar(r) {
return new S(function(n) {
r.then(function(e) {
n.closed || (n.next(e), n.complete());
}, function(e) {
return n.error(e);
}).then(null, B);
});
}
function Or(r) {
return new S(function(n) {
var e, t;
try {
for (var i = w(r), o = i.next(); !o.done; o = i.next()) {
var u = o.value;
if (n.next(u), n.closed)
return;
}
} catch (a) {
e = { error: a };
} finally {
try {
o && !o.done && (t = i.return) && t.call(i);
} finally {
if (e)
throw e.error;
}
}
n.complete();
});
}
function rr(r) {
return new S(function(n) {
kr(r, n).catch(function(e) {
return n.error(e);
});
});
}
function Rr(r) {
return rr(xr(r));
}
function kr(r, n) {
var e, t, i, o;
return nr(this, void 0, void 0, function() {
var u, a;
return W(this, function(s) {
switch (s.label) {
case 0:
s.trys.push([0, 5, 6, 11]), e = or(r), s.label = 1;
case 1:
return [4, e.next()];
case 2:
if (t = s.sent(), !!t.done)
return [3, 4];
if (u = t.value, n.next(u), n.closed)
return [2];
s.label = 3;
case 3:
return [3, 1];
case 4:
return [3, 11];
case 5:
return a = s.sent(), i = { error: a }, [3, 11];
case 6:
return s.trys.push([6, , 9, 10]), t && !t.done && (o = e.return) ? [4, o.call(e)] : [3, 8];
case 7:
s.sent(), s.label = 8;
case 8:
return [3, 10];
case 9:
if (i)
throw i.error;
return [7];
case 10:
return [7];
case 11:
return n.complete(), [2];
}
});
});
}
function Lr(r, n, e, t, i) {
t === void 0 && (t = 0), i === void 0 && (i = !1);
var o = n.schedule(function() {
e(), i ? r.add(this.schedule(null, t)) : this.unsubscribe();
}, t);
if (r.add(o), !i)
return o;
}
var Dr = z(function(r) {
return function() {
r(this), this.name = "EmptyError", this.message = "no elements in sequence";
};
});
function Ur(r, n) {
var e = typeof n == "object";
return new Promise(function(t, i) {
var o = new A({
next: function(u) {
t(u), o.unsubscribe();
},
error: i,
complete: function() {
e ? t(n.defaultValue) : i(new Dr());
}
});
r.subscribe(o);
});
}
function O(r, n) {
return k(function(e, t) {
var i = 0;
e.subscribe(I(t, function(o) {
t.next(r.call(n, o, i++));
}));
});
}
var Cr = Array.isArray;
function Mr(r, n) {
return Cr(n) ? r.apply(void 0, x([], E(n))) : r(n);
}
function jr(r) {
return O(function(n) {
return Mr(r, n);
});
}
function Fr(r, n, e, t, i, o, u, a) {
var s = [], c = 0, l = 0, y = !1, f = function() {
y && !s.length && !c && n.complete();
}, p = function(h) {
return c < t ? v(h) : s.push(h);
}, v = function(h) {
o && n.next(h), c++;
var b = !1;
q(e(h, l++)).subscribe(I(n, function(m) {
i == null || i(m), o ? p(m) : n.next(m);
}, function() {
b = !0;
}, void 0, function() {
if (b)
try {
c--;
for (var m = function() {
var P = s.shift();
u ? Lr(n, u, function() {
return v(P);
}) : v(P);
}; s.length && c < t; )
m();
f();
} catch (P) {
n.error(P);
}
}));
};
return r.subscribe(I(n, p, function() {
y = !0, f();
})), function() {
a == null || a();
};
}
function er(r, n, e) {
return e === void 0 && (e = 1 / 0), d(n) ? er(function(t, i) {
return O(function(o, u) {
return n(t, o, i, u);
})(q(r(t, i)));
}, e) : (typeof n == "number" && (e = n), k(function(t, i) {
return Fr(t, i, r, e);
}));
}
var Vr = ["addListener", "removeListener"], Yr = ["addEventListener", "removeEventListener"], Hr = ["on", "off"];
function V(r, n, e, t) {
if (d(e) && (t = e, e = void 0), t)
return V(r, n, e).pipe(jr(t));
var i = E(qr(r) ? Yr.map(function(a) {
return function(s) {
return r[a](n, s, e);
};
}) : Gr(r) ? Vr.map(J(r, n)) : _r(r) ? Hr.map(J(r, n)) : [], 2), o = i[0], u = i[1];
if (!o && N(r))
return er(function(a) {
return V(a, n, e);
})(q(r));
if (!o)
throw new TypeError("Invalid event target");
return new S(function(a) {
var s = function() {
for (var c = [], l = 0; l < arguments.length; l++)
c[l] = arguments[l];
return a.next(1 < c.length ? c : c[0]);
};
return o(s), function() {
return u(s);
};
});
}
function J(r, n) {
return function(e) {
return function(t) {
return r[e](n, t);
};
};
}
function Gr(r) {
return d(r.addListener) && d(r.removeListener);
}
function _r(r) {
return d(r.on) && d(r.off);
}
function qr(r) {
return d(r.addEventListener) && d(r.removeEventListener);
}
function Kr(r, n) {
return k(function(e, t) {
var i = 0;
e.subscribe(I(t, function(o) {
return r.call(n, o, i++) && t.next(o);
}));
});
}
function $r(r, n) {
return n === void 0 && (n = null), n = n ?? r, k(function(e, t) {
var i = [], o = 0;
e.subscribe(I(t, function(u) {
var a, s, c, l, y = null;
o++ % n === 0 && i.push([]);
try {
for (var f = w(i), p = f.next(); !p.done; p = f.next()) {
var v = p.value;
v.push(u), r <= v.length && (y = y ?? [], y.push(v));
}
} catch (m) {
a = { error: m };
} finally {
try {
p && !p.done && (s = f.return) && s.call(f);
} finally {
if (a)
throw a.error;
}
}
if (y)
try {
for (var h = w(y), b = h.next(); !b.done; b = h.next()) {
var v = b.value;
M(i, v), t.next(v);
}
} catch (m) {
c = { error: m };
} finally {
try {
b && !b.done && (l = h.return) && l.call(h);
} finally {
if (c)
throw c.error;
}
}
}, function() {
var u, a;
try {
for (var s = w(i), c = s.next(); !c.done; c = s.next()) {
var l = c.value;
t.next(l);
}
} catch (y) {
u = { error: y };
} finally {
try {
c && !c.done && (a = s.return) && a.call(s);
} finally {
if (u)
throw u.error;
}
}
t.complete();
}, void 0, function() {
i = null;
}));
});
}
const Jr = (r) => {
const n = /* @__PURE__ */ new Set();
do
for (const o of Reflect.ownKeys(e))
t.add([e, o]);
while ((e = Reflect.getPrototypeOf(e)) && e !== Object.prototype);
return t;
for (const e of Reflect.ownKeys(r))
n.add([r, e]);
while ((r = Reflect.getPrototypeOf(r)) && r !== Object.prototype);
return n;
};
function p(e, { include: t, exclude: o } = {}) {
const i = (c) => {
const r = (n) => typeof n == "string" ? c === n : n.test(c);
return t ? t.some(r) : o ? !o.some(r) : !0;
function Qr(r, { include: n, exclude: e } = {}) {
const t = (i) => {
const o = (u) => typeof u == "string" ? i === u : u.test(i);
return n ? n.some(o) : e ? !e.some(o) : !0;
};
for (const [c, r] of d(e.constructor.prototype)) {
if (r === "constructor" || !i(r))
for (const [i, o] of Jr(r.constructor.prototype)) {
if (o === "constructor" || !t(o))
continue;
const n = Reflect.getOwnPropertyDescriptor(c, r);
n && typeof n.value == "function" && (e[r] = e[r].bind(e));
const u = Reflect.getOwnPropertyDescriptor(i, o);
u && typeof u.value == "function" && (r[o] = r[o].bind(r));
}
return e;
return r;
}
class u {
constructor(t) {
this.delegate = t, p(this);
class Wr {
constructor(n) {
this.delegate = n, Qr(this);
}
enableRecord() {
return this.delegate.then((t) => t.enableRecord());
return this.delegate.then((n) => n.enableRecord());
}
openDemoDialog(t, o) {
return this.delegate.then((i) => i.openDemoDialog(t, o));
openDemoDialog(n, e) {
return this.delegate.then((t) => t.openDemoDialog(n, e));
}
}
function f(e) {
return typeof localStorage == "object" ? localStorage.getItem(e) : null;
function zr(r) {
return typeof localStorage == "object" ? localStorage.getItem(r) : null;
}
const g = "MIAOLU_SERVICE_ENDPOINT", l = f(g) || "//s.demoway.co/sdk/sdk-service/index.js";
function a() {
const Xr = "MIAOLU_SERVICE_ENDPOINT", U = zr(Xr) || "//s.demoway.co/sdk/sdk-service/index.js";
function Q() {
throw new Error("sdk is not initialized");
}
const s = new u(
const R = new Wr(
Promise.resolve({
openDemoDialog: a,
enableRecord: a
openDemoDialog: Q,
enableRecord: Q
})
), h = s.openDemoDialog, D = s.enableRecord;
function m({ accessToken: e }) {
if (!e)
), Zr = R.openDemoDialog, Br = R.enableRecord;
function Nr({ accessToken: r }) {
if (!r)
throw new Error("Invalid token");
const t = l.startsWith("http") ? l : `${location.protocol}${l}`, o = import(new URL(t).toString()).then((i) => i.initialize(e));
return s.delegate = o, o.then(() => s);
const n = U.startsWith("http") ? U : `${location.protocol}${U}`, e = import(new URL(n).toString()).then((t) => t.initialize(r));
return R.delegate = e, e.then(() => R);
}
function re(r, n, e) {
return Ur(
V(r, "click").pipe(
O(() => Date.now()),
$r(n),
Kr((t) => t[t.length - 1] - t[0] < e),
O(F)
)
);
}
export {
l as SERVICE_ENDPOINT,
D as enableRecord,
m as initialize,
h as openDemoDialog
U as SERVICE_ENDPOINT,
Br as enableRecord,
Nr as initialize,
Zr as openDemoDialog,
re as rageClick
};

2

package.json
{
"name": "demoway-sdk",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc