chat-pane 2.4.19 → 2.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/longChatPane.js +2387 -7783
- package/dist/longChatPane.js.map +1 -1
- package/dist/main.js +2461 -8037
- package/dist/main.js.map +1 -1
- package/dist/shortChatPane.js +2387 -7783
- package/dist/shortChatPane.js.map +1 -1
- package/lib/create.js +7 -79
- package/lib/create.js.map +1 -1
- package/lib/longChatPane.js +27 -98
- package/lib/longChatPane.js.map +1 -1
- package/lib/main.js +0 -3
- package/lib/main.js.map +1 -1
- package/lib/shortChatPane.js +6 -23
- package/lib/shortChatPane.js.map +1 -1
- package/package.json +11 -11
package/lib/create.js
CHANGED
|
@@ -5,27 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.findChat = findChat;
|
|
7
7
|
exports.getChat = getChat;
|
|
8
|
-
|
|
9
8
|
var _solidUi = require("solid-ui");
|
|
10
|
-
|
|
11
9
|
var _solidLogic = require("solid-logic");
|
|
12
|
-
|
|
13
10
|
var _rdflib = require("rdflib");
|
|
14
|
-
|
|
15
11
|
var _longChatPane = require("./longChatPane");
|
|
16
|
-
|
|
17
12
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
18
|
-
|
|
19
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
20
|
-
|
|
13
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
21
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
22
|
-
|
|
23
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
24
|
-
|
|
25
16
|
function getMe() {
|
|
26
17
|
return _getMe.apply(this, arguments);
|
|
27
18
|
}
|
|
28
|
-
|
|
29
19
|
function _getMe() {
|
|
30
20
|
_getMe = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
31
21
|
var me;
|
|
@@ -34,21 +24,16 @@ function _getMe() {
|
|
|
34
24
|
switch (_context.prev = _context.next) {
|
|
35
25
|
case 0:
|
|
36
26
|
me = _solidLogic.authn.currentUser();
|
|
37
|
-
|
|
38
27
|
if (!(me === null)) {
|
|
39
28
|
_context.next = 3;
|
|
40
29
|
break;
|
|
41
30
|
}
|
|
42
|
-
|
|
43
31
|
throw new Error('Current user not found! Not logged in?');
|
|
44
|
-
|
|
45
32
|
case 3:
|
|
46
33
|
_context.next = 5;
|
|
47
34
|
return _solidLogic.store.fetcher.load(me.doc());
|
|
48
|
-
|
|
49
35
|
case 5:
|
|
50
36
|
return _context.abrupt("return", me);
|
|
51
|
-
|
|
52
37
|
case 6:
|
|
53
38
|
case "end":
|
|
54
39
|
return _context.stop();
|
|
@@ -58,11 +43,9 @@ function _getMe() {
|
|
|
58
43
|
}));
|
|
59
44
|
return _getMe.apply(this, arguments);
|
|
60
45
|
}
|
|
61
|
-
|
|
62
46
|
function getPodRoot(_x) {
|
|
63
47
|
return _getPodRoot.apply(this, arguments);
|
|
64
48
|
}
|
|
65
|
-
|
|
66
49
|
function _getPodRoot() {
|
|
67
50
|
_getPodRoot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(me) {
|
|
68
51
|
var podRoot;
|
|
@@ -71,17 +54,13 @@ function _getPodRoot() {
|
|
|
71
54
|
switch (_context2.prev = _context2.next) {
|
|
72
55
|
case 0:
|
|
73
56
|
podRoot = _solidLogic.store.any(me, _solidUi.ns.space('storage'), undefined, me.doc());
|
|
74
|
-
|
|
75
57
|
if (podRoot) {
|
|
76
58
|
_context2.next = 3;
|
|
77
59
|
break;
|
|
78
60
|
}
|
|
79
|
-
|
|
80
61
|
throw new Error('Current user pod root not found!');
|
|
81
|
-
|
|
82
62
|
case 3:
|
|
83
63
|
return _context2.abrupt("return", podRoot);
|
|
84
|
-
|
|
85
64
|
case 4:
|
|
86
65
|
case "end":
|
|
87
66
|
return _context2.stop();
|
|
@@ -91,11 +70,9 @@ function _getPodRoot() {
|
|
|
91
70
|
}));
|
|
92
71
|
return _getPodRoot.apply(this, arguments);
|
|
93
72
|
}
|
|
94
|
-
|
|
95
73
|
function sendInvite(_x2, _x3) {
|
|
96
74
|
return _sendInvite.apply(this, arguments);
|
|
97
75
|
}
|
|
98
|
-
|
|
99
76
|
function _sendInvite() {
|
|
100
77
|
_sendInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(invitee, chatThing) {
|
|
101
78
|
var inviteeInbox, inviteBody, inviteResponse, locationStr;
|
|
@@ -105,17 +82,13 @@ function _sendInvite() {
|
|
|
105
82
|
case 0:
|
|
106
83
|
_context3.next = 2;
|
|
107
84
|
return _solidLogic.store.fetcher.load(invitee.doc());
|
|
108
|
-
|
|
109
85
|
case 2:
|
|
110
86
|
inviteeInbox = _solidLogic.store.any(invitee, _solidUi.ns.ldp('inbox'), undefined, invitee.doc());
|
|
111
|
-
|
|
112
87
|
if (inviteeInbox) {
|
|
113
88
|
_context3.next = 5;
|
|
114
89
|
break;
|
|
115
90
|
}
|
|
116
|
-
|
|
117
91
|
throw new Error("Invitee inbox not found! ".concat(invitee.value));
|
|
118
|
-
|
|
119
92
|
case 5:
|
|
120
93
|
inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(_solidUi.ns.rdf('seeAlso'), " <").concat(chatThing.value, "> . \n ");
|
|
121
94
|
_context3.next = 8;
|
|
@@ -123,18 +96,14 @@ function _sendInvite() {
|
|
|
123
96
|
data: inviteBody,
|
|
124
97
|
contentType: 'text/turtle'
|
|
125
98
|
});
|
|
126
|
-
|
|
127
99
|
case 8:
|
|
128
100
|
inviteResponse = _context3.sent;
|
|
129
101
|
locationStr = inviteResponse.headers.get('location');
|
|
130
|
-
|
|
131
102
|
if (locationStr) {
|
|
132
103
|
_context3.next = 12;
|
|
133
104
|
break;
|
|
134
105
|
}
|
|
135
|
-
|
|
136
106
|
throw new Error("Invite sending returned a ".concat(inviteResponse.status));
|
|
137
|
-
|
|
138
107
|
case 12:
|
|
139
108
|
case "end":
|
|
140
109
|
return _context3.stop();
|
|
@@ -144,18 +113,15 @@ function _sendInvite() {
|
|
|
144
113
|
}));
|
|
145
114
|
return _sendInvite.apply(this, arguments);
|
|
146
115
|
}
|
|
147
|
-
|
|
148
116
|
function determineChatContainer(invitee, podRoot) {
|
|
149
117
|
// Create chat
|
|
150
118
|
// See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
|
|
151
119
|
var chatContainerStr = new URL("IndividualChats/".concat(new URL(invitee.value).host, "/"), podRoot.value).toString();
|
|
152
120
|
return new _rdflib.NamedNode(chatContainerStr);
|
|
153
121
|
}
|
|
154
|
-
|
|
155
122
|
function createChatThing(_x4, _x5) {
|
|
156
123
|
return _createChatThing.apply(this, arguments);
|
|
157
124
|
}
|
|
158
|
-
|
|
159
125
|
function _createChatThing() {
|
|
160
126
|
_createChatThing = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(chatContainer, me) {
|
|
161
127
|
var created;
|
|
@@ -172,11 +138,9 @@ function _createChatThing() {
|
|
|
172
138
|
me: me,
|
|
173
139
|
newBase: chatContainer.value
|
|
174
140
|
});
|
|
175
|
-
|
|
176
141
|
case 2:
|
|
177
142
|
created = _context4.sent;
|
|
178
143
|
return _context4.abrupt("return", created.newInstance);
|
|
179
|
-
|
|
180
144
|
case 4:
|
|
181
145
|
case "end":
|
|
182
146
|
return _context4.stop();
|
|
@@ -186,11 +150,9 @@ function _createChatThing() {
|
|
|
186
150
|
}));
|
|
187
151
|
return _createChatThing.apply(this, arguments);
|
|
188
152
|
}
|
|
189
|
-
|
|
190
153
|
function setAcl(_x6, _x7, _x8) {
|
|
191
154
|
return _setAcl.apply(this, arguments);
|
|
192
155
|
}
|
|
193
|
-
|
|
194
156
|
function _setAcl() {
|
|
195
157
|
_setAcl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(chatContainer, me, invitee) {
|
|
196
158
|
var chatAclDoc, aclBody, aclResponse;
|
|
@@ -200,18 +162,14 @@ function _setAcl() {
|
|
|
200
162
|
case 0:
|
|
201
163
|
_context5.next = 2;
|
|
202
164
|
return _solidLogic.store.fetcher.load(chatContainer);
|
|
203
|
-
|
|
204
165
|
case 2:
|
|
205
166
|
// FIXME: check the Why value on this quad:
|
|
206
167
|
chatAclDoc = _solidLogic.store.any(chatContainer, new _rdflib.NamedNode('http://www.iana.org/assignments/link-relations/acl'));
|
|
207
|
-
|
|
208
168
|
if (chatAclDoc) {
|
|
209
169
|
_context5.next = 5;
|
|
210
170
|
break;
|
|
211
171
|
}
|
|
212
|
-
|
|
213
172
|
throw new Error('Chat ACL doc not found!');
|
|
214
|
-
|
|
215
173
|
case 5:
|
|
216
174
|
aclBody = "\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <".concat(me.value, ">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n<#invitee>\n a acl:Authorization;\n acl:agent <").concat(invitee.value, ">;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n");
|
|
217
175
|
_context5.next = 8;
|
|
@@ -219,10 +177,8 @@ function _setAcl() {
|
|
|
219
177
|
data: aclBody,
|
|
220
178
|
contentType: 'text/turtle'
|
|
221
179
|
});
|
|
222
|
-
|
|
223
180
|
case 8:
|
|
224
181
|
aclResponse = _context5.sent;
|
|
225
|
-
|
|
226
182
|
case 9:
|
|
227
183
|
case "end":
|
|
228
184
|
return _context5.stop();
|
|
@@ -232,11 +188,9 @@ function _setAcl() {
|
|
|
232
188
|
}));
|
|
233
189
|
return _setAcl.apply(this, arguments);
|
|
234
190
|
}
|
|
235
|
-
|
|
236
191
|
function addToPrivateTypeIndex(_x9, _x10) {
|
|
237
192
|
return _addToPrivateTypeIndex.apply(this, arguments);
|
|
238
193
|
}
|
|
239
|
-
|
|
240
194
|
function _addToPrivateTypeIndex() {
|
|
241
195
|
_addToPrivateTypeIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(chatThing, me) {
|
|
242
196
|
var privateTypeIndex, reg, ins;
|
|
@@ -246,18 +200,14 @@ function _addToPrivateTypeIndex() {
|
|
|
246
200
|
case 0:
|
|
247
201
|
// Add to private type index
|
|
248
202
|
privateTypeIndex = _solidLogic.store.any(me, _solidUi.ns.solid('privateTypeIndex'));
|
|
249
|
-
|
|
250
203
|
if (privateTypeIndex) {
|
|
251
204
|
_context6.next = 3;
|
|
252
205
|
break;
|
|
253
206
|
}
|
|
254
|
-
|
|
255
207
|
throw new Error('Private type index not found!');
|
|
256
|
-
|
|
257
208
|
case 3:
|
|
258
209
|
_context6.next = 5;
|
|
259
210
|
return _solidLogic.store.fetcher.load(privateTypeIndex);
|
|
260
|
-
|
|
261
211
|
case 5:
|
|
262
212
|
reg = _solidUi.widgets.newThing(privateTypeIndex);
|
|
263
213
|
ins = [(0, _rdflib.st)(reg, _solidUi.ns.rdf('type'), _solidUi.ns.solid('TypeRegistration'), privateTypeIndex.doc()), (0, _rdflib.st)(reg, _solidUi.ns.solid('forClass'), _solidUi.ns.meeting('LongChat'), privateTypeIndex.doc()), (0, _rdflib.st)(reg, _solidUi.ns.solid('instance'), chatThing, privateTypeIndex.doc())];
|
|
@@ -271,7 +221,6 @@ function _addToPrivateTypeIndex() {
|
|
|
271
221
|
}
|
|
272
222
|
});
|
|
273
223
|
});
|
|
274
|
-
|
|
275
224
|
case 9:
|
|
276
225
|
case "end":
|
|
277
226
|
return _context6.stop();
|
|
@@ -281,11 +230,9 @@ function _addToPrivateTypeIndex() {
|
|
|
281
230
|
}));
|
|
282
231
|
return _addToPrivateTypeIndex.apply(this, arguments);
|
|
283
232
|
}
|
|
284
|
-
|
|
285
233
|
function findChat(_x11) {
|
|
286
234
|
return _findChat.apply(this, arguments);
|
|
287
235
|
}
|
|
288
|
-
|
|
289
236
|
function _findChat() {
|
|
290
237
|
_findChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(invitee) {
|
|
291
238
|
var me, podRoot, chatContainer, exists;
|
|
@@ -295,12 +242,10 @@ function _findChat() {
|
|
|
295
242
|
case 0:
|
|
296
243
|
_context7.next = 2;
|
|
297
244
|
return getMe();
|
|
298
|
-
|
|
299
245
|
case 2:
|
|
300
246
|
me = _context7.sent;
|
|
301
247
|
_context7.next = 5;
|
|
302
248
|
return getPodRoot(me);
|
|
303
|
-
|
|
304
249
|
case 5:
|
|
305
250
|
podRoot = _context7.sent;
|
|
306
251
|
chatContainer = determineChatContainer(invitee, podRoot);
|
|
@@ -308,23 +253,19 @@ function _findChat() {
|
|
|
308
253
|
_context7.prev = 8;
|
|
309
254
|
_context7.next = 11;
|
|
310
255
|
return _solidLogic.store.fetcher.load(new _rdflib.NamedNode(chatContainer.value + _longChatPane.longChatPane.CHAT_LOCATION_IN_CONTAINER));
|
|
311
|
-
|
|
312
256
|
case 11:
|
|
313
257
|
_context7.next = 16;
|
|
314
258
|
break;
|
|
315
|
-
|
|
316
259
|
case 13:
|
|
317
260
|
_context7.prev = 13;
|
|
318
261
|
_context7.t0 = _context7["catch"](8);
|
|
319
262
|
exists = false;
|
|
320
|
-
|
|
321
263
|
case 16:
|
|
322
264
|
return _context7.abrupt("return", {
|
|
323
265
|
me: me,
|
|
324
266
|
chatContainer: chatContainer,
|
|
325
267
|
exists: exists
|
|
326
268
|
});
|
|
327
|
-
|
|
328
269
|
case 17:
|
|
329
270
|
case "end":
|
|
330
271
|
return _context7.stop();
|
|
@@ -334,21 +275,18 @@ function _findChat() {
|
|
|
334
275
|
}));
|
|
335
276
|
return _findChat.apply(this, arguments);
|
|
336
277
|
}
|
|
337
|
-
|
|
338
278
|
function getChat(_x12) {
|
|
339
279
|
return _getChat.apply(this, arguments);
|
|
340
280
|
}
|
|
341
|
-
|
|
342
281
|
function _getChat() {
|
|
343
282
|
_getChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(invitee) {
|
|
344
283
|
var createIfMissing,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
284
|
+
_yield$findChat,
|
|
285
|
+
me,
|
|
286
|
+
chatContainer,
|
|
287
|
+
exists,
|
|
288
|
+
chatThing,
|
|
289
|
+
_args8 = arguments;
|
|
352
290
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
353
291
|
while (1) {
|
|
354
292
|
switch (_context8.prev = _context8.next) {
|
|
@@ -356,45 +294,35 @@ function _getChat() {
|
|
|
356
294
|
createIfMissing = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : true;
|
|
357
295
|
_context8.next = 3;
|
|
358
296
|
return findChat(invitee);
|
|
359
|
-
|
|
360
297
|
case 3:
|
|
361
298
|
_yield$findChat = _context8.sent;
|
|
362
299
|
me = _yield$findChat.me;
|
|
363
300
|
chatContainer = _yield$findChat.chatContainer;
|
|
364
301
|
exists = _yield$findChat.exists;
|
|
365
|
-
|
|
366
302
|
if (!exists) {
|
|
367
303
|
_context8.next = 9;
|
|
368
304
|
break;
|
|
369
305
|
}
|
|
370
|
-
|
|
371
306
|
return _context8.abrupt("return", new _rdflib.NamedNode(chatContainer.value + _longChatPane.longChatPane.CHAT_LOCATION_IN_CONTAINER));
|
|
372
|
-
|
|
373
307
|
case 9:
|
|
374
308
|
if (!createIfMissing) {
|
|
375
309
|
_context8.next = 20;
|
|
376
310
|
break;
|
|
377
311
|
}
|
|
378
|
-
|
|
379
312
|
_context8.next = 12;
|
|
380
313
|
return createChatThing(chatContainer, me);
|
|
381
|
-
|
|
382
314
|
case 12:
|
|
383
315
|
chatThing = _context8.sent;
|
|
384
316
|
_context8.next = 15;
|
|
385
317
|
return sendInvite(invitee, chatThing);
|
|
386
|
-
|
|
387
318
|
case 15:
|
|
388
319
|
_context8.next = 17;
|
|
389
320
|
return setAcl(chatContainer, me, invitee);
|
|
390
|
-
|
|
391
321
|
case 17:
|
|
392
322
|
_context8.next = 19;
|
|
393
323
|
return addToPrivateTypeIndex(chatThing, me);
|
|
394
|
-
|
|
395
324
|
case 19:
|
|
396
325
|
return _context8.abrupt("return", chatThing);
|
|
397
|
-
|
|
398
326
|
case 20:
|
|
399
327
|
case "end":
|
|
400
328
|
return _context8.stop();
|
package/lib/create.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","names":["getMe","me","authn","currentUser","Error","store","fetcher","load","doc","getPodRoot","podRoot","any","ns","space","undefined","sendInvite","invitee","chatThing","inviteeInbox","ldp","value","inviteBody","rdf","webOperation","data","contentType","inviteResponse","locationStr","headers","get","status","determineChatContainer","chatContainerStr","URL","host","toString","NamedNode","createChatThing","chatContainer","longChatPane","mintNew","session","newBase","created","newInstance","setAcl","chatAclDoc","aclBody","aclResponse","addToPrivateTypeIndex","privateTypeIndex","solid","reg","widgets","newThing","ins","st","meeting","Promise","resolve","reject","updater","update","_uri","ok","errm","findChat","exists","CHAT_LOCATION_IN_CONTAINER","getChat","createIfMissing"],"sources":["../src/create.ts"],"sourcesContent":["import { ns, widgets } from 'solid-ui'\nimport { authn, store } from 'solid-logic'\nimport { NamedNode, st } from 'rdflib'\nimport { longChatPane } from './longChatPane'\n\nasync function getMe () {\n const me = authn.currentUser()\n if (me === null) {\n throw new Error('Current user not found! Not logged in?')\n }\n await store.fetcher.load(me.doc())\n return me\n}\n\nasync function getPodRoot (me): Promise<NamedNode> {\n const podRoot = store.any(me, ns.space('storage'), undefined, me.doc())\n if (!podRoot) {\n throw new Error('Current user pod root not found!')\n }\n return podRoot\n}\n\nasync function sendInvite (invitee: NamedNode, chatThing: NamedNode) {\n await store.fetcher.load(invitee.doc())\n const inviteeInbox = store.any(invitee, ns.ldp('inbox'), undefined, invitee.doc())\n if (!inviteeInbox) {\n throw new Error(`Invitee inbox not found! ${invitee.value}`)\n }\n const inviteBody = `\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n${ns.rdf('seeAlso')} <${chatThing.value}> . \n `\n \n const inviteResponse = await store.fetcher.webOperation('POST', inviteeInbox.value, {\n data: inviteBody,\n contentType: 'text/turtle'\n })\n const locationStr = inviteResponse.headers.get('location')\n if (!locationStr) {\n throw new Error(`Invite sending returned a ${inviteResponse.status}`)\n }\n}\n\nfunction determineChatContainer (invitee, podRoot) {\n // Create chat\n // See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a\n const chatContainerStr = new URL(`IndividualChats/${new URL(invitee.value).host}/`, podRoot.value).toString()\n return new NamedNode(chatContainerStr)\n}\n\nasync function createChatThing (chatContainer, me) {\n const created = await longChatPane.mintNew({\n session: {\n store\n }\n },\n {\n me,\n newBase: chatContainer.value\n })\n return created.newInstance\n}\n\nasync function setAcl(chatContainer, me, invitee) {\n // Some servers don't present a Link http response header\n // if the container doesn't exist yet, so refetch the container\n // now that it has been created:\n await store.fetcher.load(chatContainer)\n\n // FIXME: check the Why value on this quad:\n const chatAclDoc = store.any(chatContainer, new NamedNode('http://www.iana.org/assignments/link-relations/acl'))\n if (!chatAclDoc) {\n throw new Error('Chat ACL doc not found!')\n }\n\n const aclBody = `\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <${me.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n<#invitee>\n a acl:Authorization;\n acl:agent <${invitee.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n`\n const aclResponse = await store.fetcher.webOperation('PUT', chatAclDoc.value, {\n data: aclBody,\n contentType: 'text/turtle'\n })\n}\nasync function addToPrivateTypeIndex(chatThing, me) {\n // Add to private type index\n const privateTypeIndex = store.any(me, ns.solid('privateTypeIndex')) as NamedNode | null\n if (!privateTypeIndex) {\n throw new Error('Private type index not found!')\n }\n await store.fetcher.load(privateTypeIndex)\n const reg = widgets.newThing(privateTypeIndex)\n const ins = [\n st(reg, ns.rdf('type'), ns.solid('TypeRegistration'), privateTypeIndex.doc()),\n st(reg, ns.solid('forClass'), ns.meeting('LongChat'), privateTypeIndex.doc()),\n st(reg, ns.solid('instance'), chatThing, privateTypeIndex.doc())\n ]\n await new Promise((resolve, reject) => {\n store.updater.update([], ins, function (_uri, ok, errm) {\n if (!ok) {\n reject(new Error(errm))\n } else {\n resolve()\n }\n })\n })\n}\n\nexport async function findChat (invitee: NamedNode) {\n const me = await getMe()\n const podRoot = await getPodRoot(me)\n const chatContainer = determineChatContainer(invitee, podRoot)\n let exists = true\n try {\n await store.fetcher.load(new NamedNode(chatContainer.value + longChatPane.CHAT_LOCATION_IN_CONTAINER))\n } catch (e) {\n exists = false\n }\n return { me, chatContainer, exists}\n}\n\nexport async function getChat (invitee: NamedNode, createIfMissing = true): Promise<NamedNode> {\n const { me, chatContainer, exists } = await findChat (invitee)\n if (exists) {\n return new NamedNode(chatContainer.value + longChatPane.CHAT_LOCATION_IN_CONTAINER)\n }\n\n if (createIfMissing) {\n const chatThing = await createChatThing(chatContainer, me)\n await sendInvite(invitee, chatThing)\n await setAcl(chatContainer, me, invitee)\n await addToPrivateTypeIndex(chatThing, me)\n return chatThing\n }\n}\n"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;+CAFA,oJ;;;;;;SAIeA,K;;;;;sEAAf;IAAA;IAAA;MAAA;QAAA;UAAA;YACQC,EADR,GACaC,iBAAA,CAAMC,WAAN,EADb;;YAAA,MAEMF,EAAE,KAAK,IAFb;cAAA;cAAA;YAAA;;YAAA,MAGU,IAAIG,KAAJ,CAAU,wCAAV,CAHV;;UAAA;YAAA;YAAA,OAKQC,iBAAA,CAAMC,OAAN,CAAcC,IAAd,CAAmBN,EAAE,CAACO,GAAH,EAAnB,CALR;;UAAA;YAAA,iCAMSP,EANT;;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C;;;;SASeQ,U;;;;;2EAAf,kBAA2BR,EAA3B;IAAA;IAAA;MAAA;QAAA;UAAA;YACQS,OADR,GACkBL,iBAAA,CAAMM,GAAN,CAAUV,EAAV,EAAcW,WAAA,CAAGC,KAAH,CAAS,SAAT,CAAd,EAAmCC,SAAnC,EAA8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AAa,CAAClB,KAAd,GAAsBmB,0BAAA,CAAa6B,0BAAjD,CAHJ;;UAAA;YAAA,KAMDE,eANC;cAAA;cAAA;YAAA;;YAAA;YAAA,OAOqBjC,eAAe,CAACC,aAAD,EAAgBrC,EAAhB,CAPpC;;UAAA;YAOGgB,SAPH;YAAA;YAAA,OAQGF,UAAU,CAACC,OAAD,EAAUC,SAAV,CARb;;UAAA;YAAA;YAAA,OASG4B,MAAM,CAACP,aAAD,EAAgBrC,EAAhB,EAAoBe,OAApB,CATT;;UAAA;YAAA;YAAA,OAUGiC,qBAAqB,CAAChC,SAAD,EAAYhB,EAAZ,CAVxB;;UAAA;YAAA,kCAWIgB,SAXJ;;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C"}
|
|
1
|
+
{"version":3,"file":"create.js","names":["getMe","me","authn","currentUser","Error","store","fetcher","load","doc","getPodRoot","podRoot","any","ns","space","undefined","sendInvite","invitee","chatThing","inviteeInbox","ldp","value","inviteBody","rdf","webOperation","data","contentType","inviteResponse","locationStr","headers","get","status","determineChatContainer","chatContainerStr","URL","host","toString","NamedNode","createChatThing","chatContainer","longChatPane","mintNew","session","newBase","created","newInstance","setAcl","chatAclDoc","aclBody","aclResponse","addToPrivateTypeIndex","privateTypeIndex","solid","reg","widgets","newThing","ins","st","meeting","Promise","resolve","reject","updater","update","_uri","ok","errm","findChat","exists","CHAT_LOCATION_IN_CONTAINER","getChat","createIfMissing"],"sources":["../src/create.ts"],"sourcesContent":["import { ns, widgets } from 'solid-ui'\nimport { authn, store } from 'solid-logic'\nimport { NamedNode, st } from 'rdflib'\nimport { longChatPane } from './longChatPane'\n\nasync function getMe () {\n const me = authn.currentUser()\n if (me === null) {\n throw new Error('Current user not found! Not logged in?')\n }\n await store.fetcher.load(me.doc())\n return me\n}\n\nasync function getPodRoot (me): Promise<NamedNode> {\n const podRoot = store.any(me, ns.space('storage'), undefined, me.doc())\n if (!podRoot) {\n throw new Error('Current user pod root not found!')\n }\n return podRoot\n}\n\nasync function sendInvite (invitee: NamedNode, chatThing: NamedNode) {\n await store.fetcher.load(invitee.doc())\n const inviteeInbox = store.any(invitee, ns.ldp('inbox'), undefined, invitee.doc())\n if (!inviteeInbox) {\n throw new Error(`Invitee inbox not found! ${invitee.value}`)\n }\n const inviteBody = `\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n${ns.rdf('seeAlso')} <${chatThing.value}> . \n `\n \n const inviteResponse = await store.fetcher.webOperation('POST', inviteeInbox.value, {\n data: inviteBody,\n contentType: 'text/turtle'\n })\n const locationStr = inviteResponse.headers.get('location')\n if (!locationStr) {\n throw new Error(`Invite sending returned a ${inviteResponse.status}`)\n }\n}\n\nfunction determineChatContainer (invitee, podRoot) {\n // Create chat\n // See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a\n const chatContainerStr = new URL(`IndividualChats/${new URL(invitee.value).host}/`, podRoot.value).toString()\n return new NamedNode(chatContainerStr)\n}\n\nasync function createChatThing (chatContainer, me) {\n const created = await longChatPane.mintNew({\n session: {\n store\n }\n },\n {\n me,\n newBase: chatContainer.value\n })\n return created.newInstance\n}\n\nasync function setAcl(chatContainer, me, invitee) {\n // Some servers don't present a Link http response header\n // if the container doesn't exist yet, so refetch the container\n // now that it has been created:\n await store.fetcher.load(chatContainer)\n\n // FIXME: check the Why value on this quad:\n const chatAclDoc = store.any(chatContainer, new NamedNode('http://www.iana.org/assignments/link-relations/acl'))\n if (!chatAclDoc) {\n throw new Error('Chat ACL doc not found!')\n }\n\n const aclBody = `\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <${me.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n<#invitee>\n a acl:Authorization;\n acl:agent <${invitee.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n`\n const aclResponse = await store.fetcher.webOperation('PUT', chatAclDoc.value, {\n data: aclBody,\n contentType: 'text/turtle'\n })\n}\nasync function addToPrivateTypeIndex(chatThing, me) {\n // Add to private type index\n const privateTypeIndex = store.any(me, ns.solid('privateTypeIndex')) as NamedNode | null\n if (!privateTypeIndex) {\n throw new Error('Private type index not found!')\n }\n await store.fetcher.load(privateTypeIndex)\n const reg = widgets.newThing(privateTypeIndex)\n const ins = [\n st(reg, ns.rdf('type'), ns.solid('TypeRegistration'), privateTypeIndex.doc()),\n st(reg, ns.solid('forClass'), ns.meeting('LongChat'), privateTypeIndex.doc()),\n st(reg, ns.solid('instance'), chatThing, privateTypeIndex.doc())\n ]\n await new Promise((resolve, reject) => {\n store.updater.update([], ins, function (_uri, ok, errm) {\n if (!ok) {\n reject(new Error(errm))\n } else {\n resolve()\n }\n })\n })\n}\n\nexport async function findChat (invitee: NamedNode) {\n const me = await getMe()\n const podRoot = await getPodRoot(me)\n const chatContainer = determineChatContainer(invitee, podRoot)\n let exists = true\n try {\n await store.fetcher.load(new NamedNode(chatContainer.value + longChatPane.CHAT_LOCATION_IN_CONTAINER))\n } catch (e) {\n exists = false\n }\n return { me, chatContainer, exists}\n}\n\nexport async function getChat (invitee: NamedNode, createIfMissing = true): Promise<NamedNode> {\n const { me, chatContainer, exists } = await findChat (invitee)\n if (exists) {\n return new NamedNode(chatContainer.value + longChatPane.CHAT_LOCATION_IN_CONTAINER)\n }\n\n if (createIfMissing) {\n const chatThing = await createChatThing(chatContainer, me)\n await sendInvite(invitee, chatThing)\n await setAcl(chatContainer, me, invitee)\n await addToPrivateTypeIndex(chatThing, me)\n return chatThing\n }\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AAA8C;AAAA,+CAF9C;AAAA;AAAA;AAAA,SAIeA,KAAK;EAAA;AAAA;AAAA;EAAA,oEAApB;IAAA;IAAA;MAAA;QAAA;UAAA;YACQC,EAAE,GAAGC,iBAAK,CAACC,WAAW,EAAE;YAAA,MAC1BF,EAAE,KAAK,IAAI;cAAA;cAAA;YAAA;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