chat-pane 2.4.23-21b2e5c7 → 2.4.23-2cfc1985

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/main.js CHANGED
@@ -14418,353 +14418,306 @@ var fetcher = solid_logic__WEBPACK_IMPORTED_MODULE_0__.store.fetcher;
14418
14418
 
14419
14419
  /***/ }),
14420
14420
 
14421
- /***/ "./src/create.ts":
14422
- /*!***********************!*\
14423
- !*** ./src/create.ts ***!
14424
- \***********************/
14421
+ /***/ "./src/createChat.ts":
14422
+ /*!***************************!*\
14423
+ !*** ./src/createChat.ts ***!
14424
+ \***************************/
14425
14425
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14426
14426
 
14427
14427
  "use strict";
14428
14428
  __webpack_require__.r(__webpack_exports__);
14429
14429
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14430
- /* harmony export */ "findChat": () => (/* binding */ findChat),
14431
- /* harmony export */ "getChat": () => (/* binding */ getChat)
14430
+ /* harmony export */ "createChatThing": () => (/* binding */ createChatThing)
14432
14431
  /* harmony export */ });
14433
- /* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
14434
- /* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
14435
- /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
14436
- /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
14437
- /* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
14432
+ /* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
14433
+ /* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
14438
14434
  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); }
14439
14435
  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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
14440
14436
  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); } }
14441
14437
  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); }); }; }
14442
14438
 
14443
14439
 
14444
-
14445
-
14446
- function getMe() {
14447
- return _getMe.apply(this, arguments);
14448
- }
14449
- function _getMe() {
14450
- _getMe = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
14451
- var me;
14452
- return _regeneratorRuntime().wrap(function _callee$(_context) {
14453
- while (1) {
14454
- switch (_context.prev = _context.next) {
14455
- case 0:
14456
- me = solid_logic__WEBPACK_IMPORTED_MODULE_1__.authn.currentUser();
14457
- if (!(me === null)) {
14458
- _context.next = 3;
14459
- break;
14460
- }
14461
- throw new Error('Current user not found! Not logged in?');
14462
- case 3:
14463
- _context.next = 5;
14464
- return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(me.doc());
14465
- case 5:
14466
- return _context.abrupt("return", me);
14467
- case 6:
14468
- case "end":
14469
- return _context.stop();
14470
- }
14471
- }
14472
- }, _callee);
14473
- }));
14474
- return _getMe.apply(this, arguments);
14475
- }
14476
- function getPodRoot(_x) {
14477
- return _getPodRoot.apply(this, arguments);
14478
- }
14479
- function _getPodRoot() {
14480
- _getPodRoot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(me) {
14481
- var podRoot;
14482
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
14483
- while (1) {
14484
- switch (_context2.prev = _context2.next) {
14485
- case 0:
14486
- podRoot = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.space('storage'), undefined, me.doc());
14487
- if (podRoot) {
14488
- _context2.next = 3;
14489
- break;
14490
- }
14491
- throw new Error('Current user pod root not found!');
14492
- case 3:
14493
- return _context2.abrupt("return", podRoot);
14494
- case 4:
14495
- case "end":
14496
- return _context2.stop();
14497
- }
14498
- }
14499
- }, _callee2);
14500
- }));
14501
- return _getPodRoot.apply(this, arguments);
14502
- }
14503
- function sendInvite(_x2, _x3) {
14504
- return _sendInvite.apply(this, arguments);
14505
- }
14506
- function _sendInvite() {
14507
- _sendInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(invitee, chatThing) {
14508
- var inviteeInbox, inviteBody, inviteResponse, locationStr;
14509
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
14510
- while (1) {
14511
- switch (_context3.prev = _context3.next) {
14512
- case 0:
14513
- _context3.next = 2;
14514
- return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(invitee.doc());
14515
- case 2:
14516
- inviteeInbox = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(invitee, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.ldp('inbox'), undefined, invitee.doc());
14517
- if (inviteeInbox) {
14518
- _context3.next = 5;
14519
- break;
14520
- }
14521
- throw new Error("Invitee inbox not found! ".concat(invitee.value));
14522
- case 5:
14523
- inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('seeAlso'), " <").concat(chatThing.value, "> . \n ");
14524
- _context3.next = 8;
14525
- return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.webOperation('POST', inviteeInbox.value, {
14526
- data: inviteBody,
14527
- contentType: 'text/turtle'
14528
- });
14529
- case 8:
14530
- inviteResponse = _context3.sent;
14531
- locationStr = inviteResponse.headers.get('location');
14532
- if (locationStr) {
14533
- _context3.next = 12;
14534
- break;
14535
- }
14536
- throw new Error("Invite sending returned a ".concat(inviteResponse.status));
14537
- case 12:
14538
- case "end":
14539
- return _context3.stop();
14540
- }
14541
- }
14542
- }, _callee3);
14543
- }));
14544
- return _sendInvite.apply(this, arguments);
14545
- }
14546
- function determineChatContainer(invitee, podRoot) {
14547
- // Create chat
14548
- // See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
14549
- var chatContainerStr = new URL("IndividualChats/".concat(new URL(invitee.value).host, "/"), podRoot.value).toString();
14550
- return new rdflib__WEBPACK_IMPORTED_MODULE_3__["default"](chatContainerStr);
14551
- }
14552
- function createChatThing(_x4, _x5) {
14440
+ function createChatThing(_x, _x2) {
14553
14441
  return _createChatThing.apply(this, arguments);
14554
14442
  }
14555
14443
  function _createChatThing() {
14556
- _createChatThing = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(chatContainer, me) {
14444
+ _createChatThing = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(chatContainer, me) {
14557
14445
  var created;
14558
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
14446
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
14559
14447
  while (1) {
14560
- switch (_context4.prev = _context4.next) {
14448
+ switch (_context.prev = _context.next) {
14561
14449
  case 0:
14562
- _context4.next = 2;
14563
- return _longChatPane__WEBPACK_IMPORTED_MODULE_2__.longChatPane.mintNew({
14450
+ _context.next = 2;
14451
+ return _longChatPane__WEBPACK_IMPORTED_MODULE_1__.longChatPane.mintNew({
14564
14452
  session: {
14565
- store: solid_logic__WEBPACK_IMPORTED_MODULE_1__.store
14453
+ store: solid_logic__WEBPACK_IMPORTED_MODULE_0__.store
14566
14454
  }
14567
14455
  }, {
14568
14456
  me: me,
14569
14457
  newBase: chatContainer.value
14570
14458
  });
14571
14459
  case 2:
14572
- created = _context4.sent;
14573
- return _context4.abrupt("return", created.newInstance);
14460
+ created = _context.sent;
14461
+ return _context.abrupt("return", created.newInstance);
14574
14462
  case 4:
14575
14463
  case "end":
14576
- return _context4.stop();
14464
+ return _context.stop();
14577
14465
  }
14578
14466
  }
14579
- }, _callee4);
14467
+ }, _callee);
14580
14468
  }));
14581
14469
  return _createChatThing.apply(this, arguments);
14582
14470
  }
14583
- function setAcl(_x6, _x7, _x8) {
14584
- return _setAcl.apply(this, arguments);
14585
- }
14586
- function _setAcl() {
14587
- _setAcl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(chatContainer, me, invitee) {
14588
- var chatAclDoc, aclBody, aclResponse;
14589
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
14590
- while (1) {
14591
- switch (_context5.prev = _context5.next) {
14592
- case 0:
14593
- _context5.next = 2;
14594
- return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(chatContainer);
14595
- case 2:
14596
- // FIXME: check the Why value on this quad:
14597
- chatAclDoc = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(chatContainer, new rdflib__WEBPACK_IMPORTED_MODULE_3__["default"]('http://www.iana.org/assignments/link-relations/acl'));
14598
- if (chatAclDoc) {
14599
- _context5.next = 5;
14600
- break;
14601
- }
14602
- throw new Error('Chat ACL doc not found!');
14603
- case 5:
14604
- 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");
14605
- _context5.next = 8;
14606
- return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.webOperation('PUT', chatAclDoc.value, {
14607
- data: aclBody,
14608
- contentType: 'text/turtle'
14609
- });
14610
- case 8:
14611
- aclResponse = _context5.sent;
14612
- case 9:
14613
- case "end":
14614
- return _context5.stop();
14615
- }
14616
- }
14617
- }, _callee5);
14618
- }));
14619
- return _setAcl.apply(this, arguments);
14620
- }
14621
- function addToPrivateTypeIndex(_x9, _x10) {
14622
- return _addToPrivateTypeIndex.apply(this, arguments);
14623
- }
14624
- function _addToPrivateTypeIndex() {
14625
- _addToPrivateTypeIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(chatThing, me) {
14626
- var privateTypeIndex, reg, ins;
14627
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
14628
- while (1) {
14629
- switch (_context6.prev = _context6.next) {
14630
- case 0:
14631
- // Add to private type index
14632
- privateTypeIndex = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('privateTypeIndex'));
14633
- if (privateTypeIndex) {
14634
- _context6.next = 3;
14635
- break;
14636
- }
14637
- throw new Error('Private type index not found!');
14638
- case 3:
14639
- _context6.next = 5;
14640
- return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(privateTypeIndex);
14641
- case 5:
14642
- reg = solid_ui__WEBPACK_IMPORTED_MODULE_0__.widgets.newThing(privateTypeIndex);
14643
- ins = [(0,rdflib__WEBPACK_IMPORTED_MODULE_4__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('type'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('TypeRegistration'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_4__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('forClass'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.meeting('LongChat'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_4__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('instance'), chatThing, privateTypeIndex.doc())];
14644
- _context6.next = 9;
14645
- return new Promise(function (resolve, reject) {
14646
- solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.updater.update([], ins, function (_uri, ok, errm) {
14647
- if (!ok) {
14648
- reject(new Error(errm));
14649
- } else {
14650
- resolve();
14651
- }
14652
- });
14653
- });
14654
- case 9:
14655
- case "end":
14656
- return _context6.stop();
14657
- }
14658
- }
14659
- }, _callee6);
14660
- }));
14661
- return _addToPrivateTypeIndex.apply(this, arguments);
14662
- }
14663
- function findChat(_x11) {
14471
+
14472
+ /***/ }),
14473
+
14474
+ /***/ "./src/findChat.ts":
14475
+ /*!*************************!*\
14476
+ !*** ./src/findChat.ts ***!
14477
+ \*************************/
14478
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14479
+
14480
+ "use strict";
14481
+ __webpack_require__.r(__webpack_exports__);
14482
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14483
+ /* harmony export */ "findChat": () => (/* binding */ findChat)
14484
+ /* harmony export */ });
14485
+ /* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
14486
+ /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
14487
+ /* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
14488
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
14489
+ 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); }
14490
+ 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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
14491
+ 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); } }
14492
+ 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); }); }; }
14493
+
14494
+
14495
+
14496
+
14497
+ function findChat(_x) {
14664
14498
  return _findChat.apply(this, arguments);
14665
14499
  }
14666
14500
  function _findChat() {
14667
- _findChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(invitee) {
14501
+ _findChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(invitee) {
14668
14502
  var me, podRoot, chatContainer, exists;
14669
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
14503
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
14670
14504
  while (1) {
14671
- switch (_context7.prev = _context7.next) {
14505
+ switch (_context.prev = _context.next) {
14672
14506
  case 0:
14673
- _context7.next = 2;
14674
- return getMe();
14507
+ _context.next = 2;
14508
+ return (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.getMe)();
14675
14509
  case 2:
14676
- me = _context7.sent;
14677
- _context7.next = 5;
14678
- return getPodRoot(me);
14510
+ me = _context.sent;
14511
+ _context.next = 5;
14512
+ return (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.getPodRoot)(me);
14679
14513
  case 5:
14680
- podRoot = _context7.sent;
14681
- chatContainer = determineChatContainer(invitee, podRoot);
14514
+ podRoot = _context.sent;
14515
+ chatContainer = (0,_helpers__WEBPACK_IMPORTED_MODULE_2__.determineChatContainer)(invitee, podRoot);
14682
14516
  exists = true;
14683
- _context7.prev = 8;
14684
- _context7.next = 11;
14685
- return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(new rdflib__WEBPACK_IMPORTED_MODULE_3__["default"](chatContainer.value + _longChatPane__WEBPACK_IMPORTED_MODULE_2__.longChatPane.CHAT_LOCATION_IN_CONTAINER));
14517
+ _context.prev = 8;
14518
+ _context.next = 11;
14519
+ return solid_logic__WEBPACK_IMPORTED_MODULE_0__.store.fetcher.load(new rdflib__WEBPACK_IMPORTED_MODULE_3__["default"](chatContainer.value + _longChatPane__WEBPACK_IMPORTED_MODULE_1__.longChatPane.CHAT_LOCATION_IN_CONTAINER));
14686
14520
  case 11:
14687
- _context7.next = 16;
14521
+ _context.next = 16;
14688
14522
  break;
14689
14523
  case 13:
14690
- _context7.prev = 13;
14691
- _context7.t0 = _context7["catch"](8);
14524
+ _context.prev = 13;
14525
+ _context.t0 = _context["catch"](8);
14692
14526
  exists = false;
14693
14527
  case 16:
14694
- return _context7.abrupt("return", {
14528
+ return _context.abrupt("return", {
14695
14529
  me: me,
14696
14530
  chatContainer: chatContainer,
14697
14531
  exists: exists
14698
14532
  });
14699
14533
  case 17:
14700
14534
  case "end":
14701
- return _context7.stop();
14535
+ return _context.stop();
14702
14536
  }
14703
14537
  }
14704
- }, _callee7, null, [[8, 13]]);
14538
+ }, _callee, null, [[8, 13]]);
14705
14539
  }));
14706
14540
  return _findChat.apply(this, arguments);
14707
14541
  }
14708
- function getChat(_x12) {
14542
+
14543
+ /***/ }),
14544
+
14545
+ /***/ "./src/getChat.ts":
14546
+ /*!************************!*\
14547
+ !*** ./src/getChat.ts ***!
14548
+ \************************/
14549
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14550
+
14551
+ "use strict";
14552
+ __webpack_require__.r(__webpack_exports__);
14553
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14554
+ /* harmony export */ "getChat": () => (/* binding */ getChat)
14555
+ /* harmony export */ });
14556
+ /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
14557
+ /* harmony import */ var _longChatPane__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./longChatPane */ "./src/longChatPane.js");
14558
+ /* harmony import */ var _manageNotifications__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./manageNotifications */ "./src/manageNotifications.ts");
14559
+ /* harmony import */ var _manageChat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./manageChat */ "./src/manageChat.ts");
14560
+ /* harmony import */ var _findChat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./findChat */ "./src/findChat.ts");
14561
+ /* harmony import */ var _createChat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createChat */ "./src/createChat.ts");
14562
+ 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); }
14563
+ 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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
14564
+ 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); } }
14565
+ 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); }); }; }
14566
+
14567
+
14568
+
14569
+
14570
+
14571
+
14572
+ function getChat(_x) {
14709
14573
  return _getChat.apply(this, arguments);
14710
14574
  }
14711
14575
  function _getChat() {
14712
- _getChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(invitee) {
14576
+ _getChat = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(invitee) {
14713
14577
  var createIfMissing,
14714
14578
  _yield$findChat,
14715
14579
  me,
14716
14580
  chatContainer,
14717
14581
  exists,
14718
14582
  chatThing,
14719
- _args8 = arguments;
14720
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
14583
+ _args = arguments;
14584
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
14721
14585
  while (1) {
14722
- switch (_context8.prev = _context8.next) {
14586
+ switch (_context.prev = _context.next) {
14723
14587
  case 0:
14724
- createIfMissing = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : true;
14725
- _context8.next = 3;
14726
- return findChat(invitee);
14588
+ createIfMissing = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
14589
+ _context.next = 3;
14590
+ return (0,_findChat__WEBPACK_IMPORTED_MODULE_3__.findChat)(invitee);
14727
14591
  case 3:
14728
- _yield$findChat = _context8.sent;
14592
+ _yield$findChat = _context.sent;
14729
14593
  me = _yield$findChat.me;
14730
14594
  chatContainer = _yield$findChat.chatContainer;
14731
14595
  exists = _yield$findChat.exists;
14732
14596
  if (!exists) {
14733
- _context8.next = 9;
14597
+ _context.next = 9;
14734
14598
  break;
14735
14599
  }
14736
- return _context8.abrupt("return", new rdflib__WEBPACK_IMPORTED_MODULE_3__["default"](chatContainer.value + _longChatPane__WEBPACK_IMPORTED_MODULE_2__.longChatPane.CHAT_LOCATION_IN_CONTAINER));
14600
+ return _context.abrupt("return", new rdflib__WEBPACK_IMPORTED_MODULE_5__["default"](chatContainer.value + _longChatPane__WEBPACK_IMPORTED_MODULE_0__.longChatPane.CHAT_LOCATION_IN_CONTAINER));
14737
14601
  case 9:
14738
14602
  if (!createIfMissing) {
14739
- _context8.next = 20;
14603
+ _context.next = 20;
14740
14604
  break;
14741
14605
  }
14742
- _context8.next = 12;
14743
- return createChatThing(chatContainer, me);
14606
+ _context.next = 12;
14607
+ return (0,_createChat__WEBPACK_IMPORTED_MODULE_4__.createChatThing)(chatContainer, me);
14744
14608
  case 12:
14745
- chatThing = _context8.sent;
14746
- _context8.next = 15;
14747
- return sendInvite(invitee, chatThing);
14609
+ chatThing = _context.sent;
14610
+ _context.next = 15;
14611
+ return (0,_manageNotifications__WEBPACK_IMPORTED_MODULE_1__.sendInvite)(invitee, chatThing);
14748
14612
  case 15:
14749
- _context8.next = 17;
14750
- return setAcl(chatContainer, me, invitee);
14613
+ _context.next = 17;
14614
+ return (0,_manageChat__WEBPACK_IMPORTED_MODULE_2__.setAcl)(chatContainer, me, invitee);
14751
14615
  case 17:
14752
- _context8.next = 19;
14753
- return addToPrivateTypeIndex(chatThing, me);
14616
+ _context.next = 19;
14617
+ return (0,_manageChat__WEBPACK_IMPORTED_MODULE_2__.addToPrivateTypeIndex)(chatThing, me);
14754
14618
  case 19:
14755
- return _context8.abrupt("return", chatThing);
14619
+ return _context.abrupt("return", chatThing);
14756
14620
  case 20:
14757
14621
  case "end":
14758
- return _context8.stop();
14622
+ return _context.stop();
14759
14623
  }
14760
14624
  }
14761
- }, _callee8);
14625
+ }, _callee);
14762
14626
  }));
14763
14627
  return _getChat.apply(this, arguments);
14764
14628
  }
14765
14629
 
14766
14630
  /***/ }),
14767
14631
 
14632
+ /***/ "./src/helpers.ts":
14633
+ /*!************************!*\
14634
+ !*** ./src/helpers.ts ***!
14635
+ \************************/
14636
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14637
+
14638
+ "use strict";
14639
+ __webpack_require__.r(__webpack_exports__);
14640
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14641
+ /* harmony export */ "determineChatContainer": () => (/* binding */ determineChatContainer),
14642
+ /* harmony export */ "getMe": () => (/* binding */ getMe),
14643
+ /* harmony export */ "getPodRoot": () => (/* binding */ getPodRoot)
14644
+ /* harmony export */ });
14645
+ /* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
14646
+ /* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
14647
+ /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
14648
+ 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); }
14649
+ 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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
14650
+ 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); } }
14651
+ 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); }); }; }
14652
+
14653
+
14654
+
14655
+ function getMe() {
14656
+ return _getMe.apply(this, arguments);
14657
+ }
14658
+ function _getMe() {
14659
+ _getMe = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
14660
+ var me;
14661
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
14662
+ while (1) {
14663
+ switch (_context.prev = _context.next) {
14664
+ case 0:
14665
+ me = solid_logic__WEBPACK_IMPORTED_MODULE_1__.authn.currentUser();
14666
+ if (!(me === null)) {
14667
+ _context.next = 3;
14668
+ break;
14669
+ }
14670
+ throw new Error('Current user not found! Not logged in?');
14671
+ case 3:
14672
+ _context.next = 5;
14673
+ return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(me.doc());
14674
+ case 5:
14675
+ return _context.abrupt("return", me);
14676
+ case 6:
14677
+ case "end":
14678
+ return _context.stop();
14679
+ }
14680
+ }
14681
+ }, _callee);
14682
+ }));
14683
+ return _getMe.apply(this, arguments);
14684
+ }
14685
+ function getPodRoot(_x) {
14686
+ return _getPodRoot.apply(this, arguments);
14687
+ }
14688
+ function _getPodRoot() {
14689
+ _getPodRoot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(me) {
14690
+ var podRoot;
14691
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
14692
+ while (1) {
14693
+ switch (_context2.prev = _context2.next) {
14694
+ case 0:
14695
+ podRoot = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.space('storage'), undefined, me.doc());
14696
+ if (podRoot) {
14697
+ _context2.next = 3;
14698
+ break;
14699
+ }
14700
+ throw new Error('Current user pod root not found!');
14701
+ case 3:
14702
+ return _context2.abrupt("return", podRoot);
14703
+ case 4:
14704
+ case "end":
14705
+ return _context2.stop();
14706
+ }
14707
+ }
14708
+ }, _callee2);
14709
+ }));
14710
+ return _getPodRoot.apply(this, arguments);
14711
+ }
14712
+ function determineChatContainer(invitee, podRoot) {
14713
+ // Create chat
14714
+ // See https://gitter.im/solid/chat-app?at=5f3c800f855be416a23ae74a
14715
+ var chatContainerStr = new URL("IndividualChats/".concat(new URL(invitee.value).host, "/"), podRoot.value).toString();
14716
+ return new rdflib__WEBPACK_IMPORTED_MODULE_2__["default"](chatContainerStr);
14717
+ }
14718
+
14719
+ /***/ }),
14720
+
14768
14721
  /***/ "./src/longChatPane.js":
14769
14722
  /*!*****************************!*\
14770
14723
  !*** ./src/longChatPane.js ***!
@@ -15254,6 +15207,177 @@ var longChatPane = {
15254
15207
 
15255
15208
  /***/ }),
15256
15209
 
15210
+ /***/ "./src/manageChat.ts":
15211
+ /*!***************************!*\
15212
+ !*** ./src/manageChat.ts ***!
15213
+ \***************************/
15214
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15215
+
15216
+ "use strict";
15217
+ __webpack_require__.r(__webpack_exports__);
15218
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15219
+ /* harmony export */ "addToPrivateTypeIndex": () => (/* binding */ addToPrivateTypeIndex),
15220
+ /* harmony export */ "setAcl": () => (/* binding */ setAcl)
15221
+ /* harmony export */ });
15222
+ /* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
15223
+ /* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
15224
+ /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/named-node.js");
15225
+ /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
15226
+ 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); }
15227
+ 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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
15228
+ 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); } }
15229
+ 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); }); }; }
15230
+
15231
+
15232
+
15233
+ function setAcl(_x, _x2, _x3) {
15234
+ return _setAcl.apply(this, arguments);
15235
+ }
15236
+ function _setAcl() {
15237
+ _setAcl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(chatContainer, me, invitee) {
15238
+ var chatAclDoc, aclBody, aclResponse;
15239
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15240
+ while (1) {
15241
+ switch (_context.prev = _context.next) {
15242
+ case 0:
15243
+ _context.next = 2;
15244
+ return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(chatContainer);
15245
+ case 2:
15246
+ // FIXME: check the Why value on this quad:
15247
+ chatAclDoc = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(chatContainer, new rdflib__WEBPACK_IMPORTED_MODULE_2__["default"]('http://www.iana.org/assignments/link-relations/acl'));
15248
+ if (chatAclDoc) {
15249
+ _context.next = 5;
15250
+ break;
15251
+ }
15252
+ throw new Error('Chat ACL doc not found!');
15253
+ case 5:
15254
+ 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");
15255
+ _context.next = 8;
15256
+ return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.webOperation('PUT', chatAclDoc.value, {
15257
+ data: aclBody,
15258
+ contentType: 'text/turtle'
15259
+ });
15260
+ case 8:
15261
+ aclResponse = _context.sent;
15262
+ case 9:
15263
+ case "end":
15264
+ return _context.stop();
15265
+ }
15266
+ }
15267
+ }, _callee);
15268
+ }));
15269
+ return _setAcl.apply(this, arguments);
15270
+ }
15271
+ function addToPrivateTypeIndex(_x4, _x5) {
15272
+ return _addToPrivateTypeIndex.apply(this, arguments);
15273
+ }
15274
+ function _addToPrivateTypeIndex() {
15275
+ _addToPrivateTypeIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(chatThing, me) {
15276
+ var privateTypeIndex, reg, ins;
15277
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
15278
+ while (1) {
15279
+ switch (_context2.prev = _context2.next) {
15280
+ case 0:
15281
+ // Add to private type index
15282
+ privateTypeIndex = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(me, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('privateTypeIndex'));
15283
+ if (privateTypeIndex) {
15284
+ _context2.next = 3;
15285
+ break;
15286
+ }
15287
+ throw new Error('Private type index not found!');
15288
+ case 3:
15289
+ _context2.next = 5;
15290
+ return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(privateTypeIndex);
15291
+ case 5:
15292
+ reg = solid_ui__WEBPACK_IMPORTED_MODULE_0__.widgets.newThing(privateTypeIndex);
15293
+ ins = [(0,rdflib__WEBPACK_IMPORTED_MODULE_3__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('type'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('TypeRegistration'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_3__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('forClass'), solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.meeting('LongChat'), privateTypeIndex.doc()), (0,rdflib__WEBPACK_IMPORTED_MODULE_3__.st)(reg, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.solid('instance'), chatThing, privateTypeIndex.doc())];
15294
+ _context2.next = 9;
15295
+ return new Promise(function (resolve, reject) {
15296
+ solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.updater.update([], ins, function (_uri, ok, errm) {
15297
+ if (!ok) {
15298
+ reject(new Error(errm));
15299
+ } else {
15300
+ resolve();
15301
+ }
15302
+ });
15303
+ });
15304
+ case 9:
15305
+ case "end":
15306
+ return _context2.stop();
15307
+ }
15308
+ }
15309
+ }, _callee2);
15310
+ }));
15311
+ return _addToPrivateTypeIndex.apply(this, arguments);
15312
+ }
15313
+
15314
+ /***/ }),
15315
+
15316
+ /***/ "./src/manageNotifications.ts":
15317
+ /*!************************************!*\
15318
+ !*** ./src/manageNotifications.ts ***!
15319
+ \************************************/
15320
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15321
+
15322
+ "use strict";
15323
+ __webpack_require__.r(__webpack_exports__);
15324
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15325
+ /* harmony export */ "sendInvite": () => (/* binding */ sendInvite)
15326
+ /* harmony export */ });
15327
+ /* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
15328
+ /* harmony import */ var solid_logic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
15329
+ 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); }
15330
+ 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 methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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; }
15331
+ 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); } }
15332
+ 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); }); }; }
15333
+
15334
+
15335
+ function sendInvite(_x, _x2) {
15336
+ return _sendInvite.apply(this, arguments);
15337
+ }
15338
+ function _sendInvite() {
15339
+ _sendInvite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(invitee, chatThing) {
15340
+ var inviteeInbox, inviteBody, inviteResponse, locationStr;
15341
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15342
+ while (1) {
15343
+ switch (_context.prev = _context.next) {
15344
+ case 0:
15345
+ _context.next = 2;
15346
+ return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.load(invitee.doc());
15347
+ case 2:
15348
+ inviteeInbox = solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.any(invitee, solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.ldp('inbox'), undefined, invitee.doc());
15349
+ if (inviteeInbox) {
15350
+ _context.next = 5;
15351
+ break;
15352
+ }
15353
+ throw new Error("Invitee inbox not found! ".concat(invitee.value));
15354
+ case 5:
15355
+ inviteBody = "\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n".concat(solid_ui__WEBPACK_IMPORTED_MODULE_0__.ns.rdf('seeAlso'), " <").concat(chatThing.value, "> . \n ");
15356
+ _context.next = 8;
15357
+ return solid_logic__WEBPACK_IMPORTED_MODULE_1__.store.fetcher.webOperation('POST', inviteeInbox.value, {
15358
+ data: inviteBody,
15359
+ contentType: 'text/turtle'
15360
+ });
15361
+ case 8:
15362
+ inviteResponse = _context.sent;
15363
+ locationStr = inviteResponse.headers.get('location');
15364
+ if (locationStr) {
15365
+ _context.next = 12;
15366
+ break;
15367
+ }
15368
+ throw new Error("Invite sending returned a ".concat(inviteResponse.status));
15369
+ case 12:
15370
+ case "end":
15371
+ return _context.stop();
15372
+ }
15373
+ }
15374
+ }, _callee);
15375
+ }));
15376
+ return _sendInvite.apply(this, arguments);
15377
+ }
15378
+
15379
+ /***/ }),
15380
+
15257
15381
  /***/ "./node_modules/base64-js/index.js":
15258
15382
  /*!*****************************************!*\
15259
15383
  !*** ./node_modules/base64-js/index.js ***!
@@ -87625,7 +87749,7 @@ __webpack_require__.r(__webpack_exports__);
87625
87749
  /* harmony import */ var rdflib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
87626
87750
  /* harmony import */ var solid_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-ui */ "./node_modules/solid-ui/lib/index.js");
87627
87751
  /* harmony import */ var _src_longChatPane_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../src/longChatPane.js */ "./src/longChatPane.js");
87628
- /* harmony import */ var _src_create_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../src/create.ts */ "./src/create.ts");
87752
+ /* harmony import */ var _src_getChat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../src/getChat */ "./src/getChat.ts");
87629
87753
  /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./dev/context.ts");
87630
87754
  /* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ "./node_modules/console-browserify/index.js");
87631
87755
  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); }
@@ -87774,7 +87898,7 @@ window.inviteSomeone = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerator
87774
87898
  case 0:
87775
87899
  invitee = solid_logic__WEBPACK_IMPORTED_MODULE_0__.store.namedNode(document.getElementById('invitee').value);
87776
87900
  _context2.next = 3;
87777
- return (0,_src_create_ts__WEBPACK_IMPORTED_MODULE_3__.getChat)(invitee);
87901
+ return (0,_src_getChat__WEBPACK_IMPORTED_MODULE_3__.getChat)(invitee);
87778
87902
  case 3:
87779
87903
  created = _context2.sent;
87780
87904
  console.log(created);