@pod-os/core 0.22.1-rc.77c38a0.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1819,6 +1819,102 @@ function __extends(d, b) {
1819
1819
  }
1820
1820
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1821
1821
  }
1822
+ function __awaiter(thisArg, _arguments, P, generator3) {
1823
+ function adopt(value7) {
1824
+ return value7 instanceof P ? value7 : new P(function(resolve) {
1825
+ resolve(value7);
1826
+ });
1827
+ }
1828
+ return new (P || (P = Promise))(function(resolve, reject) {
1829
+ function fulfilled(value7) {
1830
+ try {
1831
+ step4(generator3.next(value7));
1832
+ } catch (e) {
1833
+ reject(e);
1834
+ }
1835
+ }
1836
+ function rejected(value7) {
1837
+ try {
1838
+ step4(generator3["throw"](value7));
1839
+ } catch (e) {
1840
+ reject(e);
1841
+ }
1842
+ }
1843
+ function step4(result6) {
1844
+ result6.done ? resolve(result6.value) : adopt(result6.value).then(fulfilled, rejected);
1845
+ }
1846
+ step4((generator3 = generator3.apply(thisArg, _arguments || [])).next());
1847
+ });
1848
+ }
1849
+ function __generator(thisArg, body) {
1850
+ var _ = { label: 0, sent: function() {
1851
+ if (t[0] & 1) throw t[1];
1852
+ return t[1];
1853
+ }, trys: [], ops: [] }, f, y, t, g;
1854
+ return g = { next: verb2(0), "throw": verb2(1), "return": verb2(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1855
+ return this;
1856
+ }), g;
1857
+ function verb2(n2) {
1858
+ return function(v2) {
1859
+ return step4([n2, v2]);
1860
+ };
1861
+ }
1862
+ function step4(op2) {
1863
+ if (f) throw new TypeError("Generator is already executing.");
1864
+ while (g && (g = 0, op2[0] && (_ = 0)), _) try {
1865
+ if (f = 1, y && (t = op2[0] & 2 ? y["return"] : op2[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op2[1])).done) return t;
1866
+ if (y = 0, t) op2 = [op2[0] & 2, t.value];
1867
+ switch (op2[0]) {
1868
+ case 0:
1869
+ case 1:
1870
+ t = op2;
1871
+ break;
1872
+ case 4:
1873
+ _.label++;
1874
+ return { value: op2[1], done: false };
1875
+ case 5:
1876
+ _.label++;
1877
+ y = op2[1];
1878
+ op2 = [0];
1879
+ continue;
1880
+ case 7:
1881
+ op2 = _.ops.pop();
1882
+ _.trys.pop();
1883
+ continue;
1884
+ default:
1885
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op2[0] === 6 || op2[0] === 2)) {
1886
+ _ = 0;
1887
+ continue;
1888
+ }
1889
+ if (op2[0] === 3 && (!t || op2[1] > t[0] && op2[1] < t[3])) {
1890
+ _.label = op2[1];
1891
+ break;
1892
+ }
1893
+ if (op2[0] === 6 && _.label < t[1]) {
1894
+ _.label = t[1];
1895
+ t = op2;
1896
+ break;
1897
+ }
1898
+ if (t && _.label < t[2]) {
1899
+ _.label = t[2];
1900
+ _.ops.push(op2);
1901
+ break;
1902
+ }
1903
+ if (t[2]) _.ops.pop();
1904
+ _.trys.pop();
1905
+ continue;
1906
+ }
1907
+ op2 = body.call(thisArg, _);
1908
+ } catch (e) {
1909
+ op2 = [6, e];
1910
+ y = 0;
1911
+ } finally {
1912
+ f = t = 0;
1913
+ }
1914
+ if (op2[0] & 5) throw op2[1];
1915
+ return { value: op2[0] ? op2[1] : void 0, done: true };
1916
+ }
1917
+ }
1822
1918
  function __values(o) {
1823
1919
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1824
1920
  if (m) return m.call(o);
@@ -1847,14 +1943,69 @@ function __read(o, n2) {
1847
1943
  }
1848
1944
  return ar;
1849
1945
  }
1850
- function __spreadArray(to2, from, pack) {
1851
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1852
- if (ar || !(i in from)) {
1853
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1854
- ar[i] = from[i];
1946
+ function __spreadArray(to2, from2, pack) {
1947
+ if (pack || arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++) {
1948
+ if (ar || !(i in from2)) {
1949
+ if (!ar) ar = Array.prototype.slice.call(from2, 0, i);
1950
+ ar[i] = from2[i];
1951
+ }
1952
+ }
1953
+ return to2.concat(ar || Array.prototype.slice.call(from2));
1954
+ }
1955
+ function __await(v2) {
1956
+ return this instanceof __await ? (this.v = v2, this) : new __await(v2);
1957
+ }
1958
+ function __asyncGenerator(thisArg, _arguments, generator3) {
1959
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1960
+ var g = generator3.apply(thisArg, _arguments || []), i, q = [];
1961
+ return i = {}, verb2("next"), verb2("throw"), verb2("return"), i[Symbol.asyncIterator] = function() {
1962
+ return this;
1963
+ }, i;
1964
+ function verb2(n2) {
1965
+ if (g[n2]) i[n2] = function(v2) {
1966
+ return new Promise(function(a, b) {
1967
+ q.push([n2, v2, a, b]) > 1 || resume(n2, v2);
1968
+ });
1969
+ };
1970
+ }
1971
+ function resume(n2, v2) {
1972
+ try {
1973
+ step4(g[n2](v2));
1974
+ } catch (e) {
1975
+ settle(q[0][3], e);
1855
1976
  }
1856
1977
  }
1857
- return to2.concat(ar || Array.prototype.slice.call(from));
1978
+ function step4(r) {
1979
+ r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
1980
+ }
1981
+ function fulfill(value7) {
1982
+ resume("next", value7);
1983
+ }
1984
+ function reject(value7) {
1985
+ resume("throw", value7);
1986
+ }
1987
+ function settle(f, v2) {
1988
+ if (f(v2), q.shift(), q.length) resume(q[0][0], q[0][1]);
1989
+ }
1990
+ }
1991
+ function __asyncValues(o) {
1992
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1993
+ var m = o[Symbol.asyncIterator], i;
1994
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb2("next"), verb2("throw"), verb2("return"), i[Symbol.asyncIterator] = function() {
1995
+ return this;
1996
+ }, i);
1997
+ function verb2(n2) {
1998
+ i[n2] = o[n2] && function(v2) {
1999
+ return new Promise(function(resolve, reject) {
2000
+ v2 = o[n2](v2), settle(resolve, reject, v2.done, v2.value);
2001
+ });
2002
+ };
2003
+ }
2004
+ function settle(resolve, reject, d, v2) {
2005
+ Promise.resolve(v2).then(function(v3) {
2006
+ resolve({ value: v3, done: d });
2007
+ }, reject);
2008
+ }
1858
2009
  }
1859
2010
 
1860
2011
  // ../node_modules/rxjs/dist/esm5/internal/util/isFunction.js
@@ -2309,18 +2460,18 @@ function pipeFromArray(fns) {
2309
2460
 
2310
2461
  // ../node_modules/rxjs/dist/esm5/internal/Observable.js
2311
2462
  var Observable = (function() {
2312
- function Observable2(subscribe) {
2463
+ function Observable3(subscribe) {
2313
2464
  if (subscribe) {
2314
2465
  this._subscribe = subscribe;
2315
2466
  }
2316
2467
  }
2317
- Observable2.prototype.lift = function(operator2) {
2318
- var observable2 = new Observable2();
2468
+ Observable3.prototype.lift = function(operator2) {
2469
+ var observable2 = new Observable3();
2319
2470
  observable2.source = this;
2320
2471
  observable2.operator = operator2;
2321
2472
  return observable2;
2322
2473
  };
2323
- Observable2.prototype.subscribe = function(observerOrNext, error4, complete2) {
2474
+ Observable3.prototype.subscribe = function(observerOrNext, error4, complete2) {
2324
2475
  var _this = this;
2325
2476
  var subscriber3 = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error4, complete2);
2326
2477
  errorContext(function() {
@@ -2329,14 +2480,14 @@ var Observable = (function() {
2329
2480
  });
2330
2481
  return subscriber3;
2331
2482
  };
2332
- Observable2.prototype._trySubscribe = function(sink) {
2483
+ Observable3.prototype._trySubscribe = function(sink) {
2333
2484
  try {
2334
2485
  return this._subscribe(sink);
2335
2486
  } catch (err2) {
2336
2487
  sink.error(err2);
2337
2488
  }
2338
2489
  };
2339
- Observable2.prototype.forEach = function(next4, promiseCtor) {
2490
+ Observable3.prototype.forEach = function(next4, promiseCtor) {
2340
2491
  var _this = this;
2341
2492
  promiseCtor = getPromiseCtor(promiseCtor);
2342
2493
  return new promiseCtor(function(resolve, reject) {
@@ -2355,21 +2506,21 @@ var Observable = (function() {
2355
2506
  _this.subscribe(subscriber3);
2356
2507
  });
2357
2508
  };
2358
- Observable2.prototype._subscribe = function(subscriber3) {
2509
+ Observable3.prototype._subscribe = function(subscriber3) {
2359
2510
  var _a;
2360
2511
  return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber3);
2361
2512
  };
2362
- Observable2.prototype[observable] = function() {
2513
+ Observable3.prototype[observable] = function() {
2363
2514
  return this;
2364
2515
  };
2365
- Observable2.prototype.pipe = function() {
2516
+ Observable3.prototype.pipe = function() {
2366
2517
  var operations = [];
2367
2518
  for (var _i = 0; _i < arguments.length; _i++) {
2368
2519
  operations[_i] = arguments[_i];
2369
2520
  }
2370
2521
  return pipeFromArray(operations)(this);
2371
2522
  };
2372
- Observable2.prototype.toPromise = function(promiseCtor) {
2523
+ Observable3.prototype.toPromise = function(promiseCtor) {
2373
2524
  var _this = this;
2374
2525
  promiseCtor = getPromiseCtor(promiseCtor);
2375
2526
  return new promiseCtor(function(resolve, reject) {
@@ -2383,10 +2534,10 @@ var Observable = (function() {
2383
2534
  });
2384
2535
  });
2385
2536
  };
2386
- Observable2.create = function(subscribe) {
2387
- return new Observable2(subscribe);
2537
+ Observable3.create = function(subscribe) {
2538
+ return new Observable3(subscribe);
2388
2539
  };
2389
- return Observable2;
2540
+ return Observable3;
2390
2541
  })();
2391
2542
  function getPromiseCtor(promiseCtor) {
2392
2543
  var _a;
@@ -2664,6 +2815,585 @@ var BehaviorSubject = (function(_super) {
2664
2815
  return BehaviorSubject3;
2665
2816
  })(Subject);
2666
2817
 
2818
+ // ../node_modules/rxjs/dist/esm5/internal/observable/empty.js
2819
+ var EMPTY = new Observable(function(subscriber3) {
2820
+ return subscriber3.complete();
2821
+ });
2822
+
2823
+ // ../node_modules/rxjs/dist/esm5/internal/util/isScheduler.js
2824
+ function isScheduler(value7) {
2825
+ return value7 && isFunction(value7.schedule);
2826
+ }
2827
+
2828
+ // ../node_modules/rxjs/dist/esm5/internal/util/args.js
2829
+ function last(arr) {
2830
+ return arr[arr.length - 1];
2831
+ }
2832
+ function popScheduler(args) {
2833
+ return isScheduler(last(args)) ? args.pop() : void 0;
2834
+ }
2835
+ function popNumber(args, defaultValue5) {
2836
+ return typeof last(args) === "number" ? args.pop() : defaultValue5;
2837
+ }
2838
+
2839
+ // ../node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js
2840
+ var isArrayLike = (function(x) {
2841
+ return x && typeof x.length === "number" && typeof x !== "function";
2842
+ });
2843
+
2844
+ // ../node_modules/rxjs/dist/esm5/internal/util/isPromise.js
2845
+ function isPromise(value7) {
2846
+ return isFunction(value7 === null || value7 === void 0 ? void 0 : value7.then);
2847
+ }
2848
+
2849
+ // ../node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js
2850
+ function isInteropObservable(input2) {
2851
+ return isFunction(input2[observable]);
2852
+ }
2853
+
2854
+ // ../node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js
2855
+ function isAsyncIterable(obj) {
2856
+ return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);
2857
+ }
2858
+
2859
+ // ../node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js
2860
+ function createInvalidObservableTypeError(input2) {
2861
+ return new TypeError("You provided " + (input2 !== null && typeof input2 === "object" ? "an invalid object" : "'" + input2 + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
2862
+ }
2863
+
2864
+ // ../node_modules/rxjs/dist/esm5/internal/symbol/iterator.js
2865
+ function getSymbolIterator() {
2866
+ if (typeof Symbol !== "function" || !Symbol.iterator) {
2867
+ return "@@iterator";
2868
+ }
2869
+ return Symbol.iterator;
2870
+ }
2871
+ var iterator = getSymbolIterator();
2872
+
2873
+ // ../node_modules/rxjs/dist/esm5/internal/util/isIterable.js
2874
+ function isIterable(input2) {
2875
+ return isFunction(input2 === null || input2 === void 0 ? void 0 : input2[iterator]);
2876
+ }
2877
+
2878
+ // ../node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js
2879
+ function readableStreamLikeToAsyncGenerator(readableStream) {
2880
+ return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {
2881
+ var reader, _a, value7, done;
2882
+ return __generator(this, function(_b) {
2883
+ switch (_b.label) {
2884
+ case 0:
2885
+ reader = readableStream.getReader();
2886
+ _b.label = 1;
2887
+ case 1:
2888
+ _b.trys.push([1, , 9, 10]);
2889
+ _b.label = 2;
2890
+ case 2:
2891
+ if (false) return [3, 8];
2892
+ return [4, __await(reader.read())];
2893
+ case 3:
2894
+ _a = _b.sent(), value7 = _a.value, done = _a.done;
2895
+ if (!done) return [3, 5];
2896
+ return [4, __await(void 0)];
2897
+ case 4:
2898
+ return [2, _b.sent()];
2899
+ case 5:
2900
+ return [4, __await(value7)];
2901
+ case 6:
2902
+ return [4, _b.sent()];
2903
+ case 7:
2904
+ _b.sent();
2905
+ return [3, 2];
2906
+ case 8:
2907
+ return [3, 10];
2908
+ case 9:
2909
+ reader.releaseLock();
2910
+ return [7];
2911
+ case 10:
2912
+ return [2];
2913
+ }
2914
+ });
2915
+ });
2916
+ }
2917
+ function isReadableStreamLike(obj) {
2918
+ return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);
2919
+ }
2920
+
2921
+ // ../node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js
2922
+ function innerFrom(input2) {
2923
+ if (input2 instanceof Observable) {
2924
+ return input2;
2925
+ }
2926
+ if (input2 != null) {
2927
+ if (isInteropObservable(input2)) {
2928
+ return fromInteropObservable(input2);
2929
+ }
2930
+ if (isArrayLike(input2)) {
2931
+ return fromArrayLike(input2);
2932
+ }
2933
+ if (isPromise(input2)) {
2934
+ return fromPromise(input2);
2935
+ }
2936
+ if (isAsyncIterable(input2)) {
2937
+ return fromAsyncIterable(input2);
2938
+ }
2939
+ if (isIterable(input2)) {
2940
+ return fromIterable(input2);
2941
+ }
2942
+ if (isReadableStreamLike(input2)) {
2943
+ return fromReadableStreamLike(input2);
2944
+ }
2945
+ }
2946
+ throw createInvalidObservableTypeError(input2);
2947
+ }
2948
+ function fromInteropObservable(obj) {
2949
+ return new Observable(function(subscriber3) {
2950
+ var obs = obj[observable]();
2951
+ if (isFunction(obs.subscribe)) {
2952
+ return obs.subscribe(subscriber3);
2953
+ }
2954
+ throw new TypeError("Provided object does not correctly implement Symbol.observable");
2955
+ });
2956
+ }
2957
+ function fromArrayLike(array) {
2958
+ return new Observable(function(subscriber3) {
2959
+ for (var i = 0; i < array.length && !subscriber3.closed; i++) {
2960
+ subscriber3.next(array[i]);
2961
+ }
2962
+ subscriber3.complete();
2963
+ });
2964
+ }
2965
+ function fromPromise(promise) {
2966
+ return new Observable(function(subscriber3) {
2967
+ promise.then(function(value7) {
2968
+ if (!subscriber3.closed) {
2969
+ subscriber3.next(value7);
2970
+ subscriber3.complete();
2971
+ }
2972
+ }, function(err2) {
2973
+ return subscriber3.error(err2);
2974
+ }).then(null, reportUnhandledError);
2975
+ });
2976
+ }
2977
+ function fromIterable(iterable) {
2978
+ return new Observable(function(subscriber3) {
2979
+ var e_1, _a;
2980
+ try {
2981
+ for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {
2982
+ var value7 = iterable_1_1.value;
2983
+ subscriber3.next(value7);
2984
+ if (subscriber3.closed) {
2985
+ return;
2986
+ }
2987
+ }
2988
+ } catch (e_1_1) {
2989
+ e_1 = { error: e_1_1 };
2990
+ } finally {
2991
+ try {
2992
+ if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);
2993
+ } finally {
2994
+ if (e_1) throw e_1.error;
2995
+ }
2996
+ }
2997
+ subscriber3.complete();
2998
+ });
2999
+ }
3000
+ function fromAsyncIterable(asyncIterable) {
3001
+ return new Observable(function(subscriber3) {
3002
+ process(asyncIterable, subscriber3).catch(function(err2) {
3003
+ return subscriber3.error(err2);
3004
+ });
3005
+ });
3006
+ }
3007
+ function fromReadableStreamLike(readableStream) {
3008
+ return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
3009
+ }
3010
+ function process(asyncIterable, subscriber3) {
3011
+ var asyncIterable_1, asyncIterable_1_1;
3012
+ var e_2, _a;
3013
+ return __awaiter(this, void 0, void 0, function() {
3014
+ var value7, e_2_1;
3015
+ return __generator(this, function(_b) {
3016
+ switch (_b.label) {
3017
+ case 0:
3018
+ _b.trys.push([0, 5, 6, 11]);
3019
+ asyncIterable_1 = __asyncValues(asyncIterable);
3020
+ _b.label = 1;
3021
+ case 1:
3022
+ return [4, asyncIterable_1.next()];
3023
+ case 2:
3024
+ if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];
3025
+ value7 = asyncIterable_1_1.value;
3026
+ subscriber3.next(value7);
3027
+ if (subscriber3.closed) {
3028
+ return [2];
3029
+ }
3030
+ _b.label = 3;
3031
+ case 3:
3032
+ return [3, 1];
3033
+ case 4:
3034
+ return [3, 11];
3035
+ case 5:
3036
+ e_2_1 = _b.sent();
3037
+ e_2 = { error: e_2_1 };
3038
+ return [3, 11];
3039
+ case 6:
3040
+ _b.trys.push([6, , 9, 10]);
3041
+ if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];
3042
+ return [4, _a.call(asyncIterable_1)];
3043
+ case 7:
3044
+ _b.sent();
3045
+ _b.label = 8;
3046
+ case 8:
3047
+ return [3, 10];
3048
+ case 9:
3049
+ if (e_2) throw e_2.error;
3050
+ return [7];
3051
+ case 10:
3052
+ return [7];
3053
+ case 11:
3054
+ subscriber3.complete();
3055
+ return [2];
3056
+ }
3057
+ });
3058
+ });
3059
+ }
3060
+
3061
+ // ../node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js
3062
+ function executeSchedule(parentSubscription, scheduler, work, delay, repeat3) {
3063
+ if (delay === void 0) {
3064
+ delay = 0;
3065
+ }
3066
+ if (repeat3 === void 0) {
3067
+ repeat3 = false;
3068
+ }
3069
+ var scheduleSubscription = scheduler.schedule(function() {
3070
+ work();
3071
+ if (repeat3) {
3072
+ parentSubscription.add(this.schedule(null, delay));
3073
+ } else {
3074
+ this.unsubscribe();
3075
+ }
3076
+ }, delay);
3077
+ parentSubscription.add(scheduleSubscription);
3078
+ if (!repeat3) {
3079
+ return scheduleSubscription;
3080
+ }
3081
+ }
3082
+
3083
+ // ../node_modules/rxjs/dist/esm5/internal/operators/observeOn.js
3084
+ function observeOn(scheduler, delay) {
3085
+ if (delay === void 0) {
3086
+ delay = 0;
3087
+ }
3088
+ return operate(function(source8, subscriber3) {
3089
+ source8.subscribe(createOperatorSubscriber(subscriber3, function(value7) {
3090
+ return executeSchedule(subscriber3, scheduler, function() {
3091
+ return subscriber3.next(value7);
3092
+ }, delay);
3093
+ }, function() {
3094
+ return executeSchedule(subscriber3, scheduler, function() {
3095
+ return subscriber3.complete();
3096
+ }, delay);
3097
+ }, function(err2) {
3098
+ return executeSchedule(subscriber3, scheduler, function() {
3099
+ return subscriber3.error(err2);
3100
+ }, delay);
3101
+ }));
3102
+ });
3103
+ }
3104
+
3105
+ // ../node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js
3106
+ function subscribeOn(scheduler, delay) {
3107
+ if (delay === void 0) {
3108
+ delay = 0;
3109
+ }
3110
+ return operate(function(source8, subscriber3) {
3111
+ subscriber3.add(scheduler.schedule(function() {
3112
+ return source8.subscribe(subscriber3);
3113
+ }, delay));
3114
+ });
3115
+ }
3116
+
3117
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js
3118
+ function scheduleObservable(input2, scheduler) {
3119
+ return innerFrom(input2).pipe(subscribeOn(scheduler), observeOn(scheduler));
3120
+ }
3121
+
3122
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js
3123
+ function schedulePromise(input2, scheduler) {
3124
+ return innerFrom(input2).pipe(subscribeOn(scheduler), observeOn(scheduler));
3125
+ }
3126
+
3127
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js
3128
+ function scheduleArray(input2, scheduler) {
3129
+ return new Observable(function(subscriber3) {
3130
+ var i = 0;
3131
+ return scheduler.schedule(function() {
3132
+ if (i === input2.length) {
3133
+ subscriber3.complete();
3134
+ } else {
3135
+ subscriber3.next(input2[i++]);
3136
+ if (!subscriber3.closed) {
3137
+ this.schedule();
3138
+ }
3139
+ }
3140
+ });
3141
+ });
3142
+ }
3143
+
3144
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js
3145
+ function scheduleIterable(input2, scheduler) {
3146
+ return new Observable(function(subscriber3) {
3147
+ var iterator2;
3148
+ executeSchedule(subscriber3, scheduler, function() {
3149
+ iterator2 = input2[iterator]();
3150
+ executeSchedule(subscriber3, scheduler, function() {
3151
+ var _a;
3152
+ var value7;
3153
+ var done;
3154
+ try {
3155
+ _a = iterator2.next(), value7 = _a.value, done = _a.done;
3156
+ } catch (err2) {
3157
+ subscriber3.error(err2);
3158
+ return;
3159
+ }
3160
+ if (done) {
3161
+ subscriber3.complete();
3162
+ } else {
3163
+ subscriber3.next(value7);
3164
+ }
3165
+ }, 0, true);
3166
+ });
3167
+ return function() {
3168
+ return isFunction(iterator2 === null || iterator2 === void 0 ? void 0 : iterator2.return) && iterator2.return();
3169
+ };
3170
+ });
3171
+ }
3172
+
3173
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js
3174
+ function scheduleAsyncIterable(input2, scheduler) {
3175
+ if (!input2) {
3176
+ throw new Error("Iterable cannot be null");
3177
+ }
3178
+ return new Observable(function(subscriber3) {
3179
+ executeSchedule(subscriber3, scheduler, function() {
3180
+ var iterator2 = input2[Symbol.asyncIterator]();
3181
+ executeSchedule(subscriber3, scheduler, function() {
3182
+ iterator2.next().then(function(result6) {
3183
+ if (result6.done) {
3184
+ subscriber3.complete();
3185
+ } else {
3186
+ subscriber3.next(result6.value);
3187
+ }
3188
+ });
3189
+ }, 0, true);
3190
+ });
3191
+ });
3192
+ }
3193
+
3194
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js
3195
+ function scheduleReadableStreamLike(input2, scheduler) {
3196
+ return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input2), scheduler);
3197
+ }
3198
+
3199
+ // ../node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js
3200
+ function scheduled(input2, scheduler) {
3201
+ if (input2 != null) {
3202
+ if (isInteropObservable(input2)) {
3203
+ return scheduleObservable(input2, scheduler);
3204
+ }
3205
+ if (isArrayLike(input2)) {
3206
+ return scheduleArray(input2, scheduler);
3207
+ }
3208
+ if (isPromise(input2)) {
3209
+ return schedulePromise(input2, scheduler);
3210
+ }
3211
+ if (isAsyncIterable(input2)) {
3212
+ return scheduleAsyncIterable(input2, scheduler);
3213
+ }
3214
+ if (isIterable(input2)) {
3215
+ return scheduleIterable(input2, scheduler);
3216
+ }
3217
+ if (isReadableStreamLike(input2)) {
3218
+ return scheduleReadableStreamLike(input2, scheduler);
3219
+ }
3220
+ }
3221
+ throw createInvalidObservableTypeError(input2);
3222
+ }
3223
+
3224
+ // ../node_modules/rxjs/dist/esm5/internal/observable/from.js
3225
+ function from(input2, scheduler) {
3226
+ return scheduler ? scheduled(input2, scheduler) : innerFrom(input2);
3227
+ }
3228
+
3229
+ // ../node_modules/rxjs/dist/esm5/internal/operators/map.js
3230
+ function map(project, thisArg) {
3231
+ return operate(function(source8, subscriber3) {
3232
+ var index2 = 0;
3233
+ source8.subscribe(createOperatorSubscriber(subscriber3, function(value7) {
3234
+ subscriber3.next(project.call(thisArg, value7, index2++));
3235
+ }));
3236
+ });
3237
+ }
3238
+
3239
+ // ../node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js
3240
+ function mergeInternals(source8, subscriber3, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
3241
+ var buffer = [];
3242
+ var active2 = 0;
3243
+ var index2 = 0;
3244
+ var isComplete = false;
3245
+ var checkComplete = function() {
3246
+ if (isComplete && !buffer.length && !active2) {
3247
+ subscriber3.complete();
3248
+ }
3249
+ };
3250
+ var outerNext = function(value7) {
3251
+ return active2 < concurrent ? doInnerSub(value7) : buffer.push(value7);
3252
+ };
3253
+ var doInnerSub = function(value7) {
3254
+ expand && subscriber3.next(value7);
3255
+ active2++;
3256
+ var innerComplete = false;
3257
+ innerFrom(project(value7, index2++)).subscribe(createOperatorSubscriber(subscriber3, function(innerValue) {
3258
+ onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
3259
+ if (expand) {
3260
+ outerNext(innerValue);
3261
+ } else {
3262
+ subscriber3.next(innerValue);
3263
+ }
3264
+ }, function() {
3265
+ innerComplete = true;
3266
+ }, void 0, function() {
3267
+ if (innerComplete) {
3268
+ try {
3269
+ active2--;
3270
+ var _loop_1 = function() {
3271
+ var bufferedValue = buffer.shift();
3272
+ if (innerSubScheduler) {
3273
+ executeSchedule(subscriber3, innerSubScheduler, function() {
3274
+ return doInnerSub(bufferedValue);
3275
+ });
3276
+ } else {
3277
+ doInnerSub(bufferedValue);
3278
+ }
3279
+ };
3280
+ while (buffer.length && active2 < concurrent) {
3281
+ _loop_1();
3282
+ }
3283
+ checkComplete();
3284
+ } catch (err2) {
3285
+ subscriber3.error(err2);
3286
+ }
3287
+ }
3288
+ }));
3289
+ };
3290
+ source8.subscribe(createOperatorSubscriber(subscriber3, outerNext, function() {
3291
+ isComplete = true;
3292
+ checkComplete();
3293
+ }));
3294
+ return function() {
3295
+ additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
3296
+ };
3297
+ }
3298
+
3299
+ // ../node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js
3300
+ function mergeMap(project, resultSelector, concurrent) {
3301
+ if (concurrent === void 0) {
3302
+ concurrent = Infinity;
3303
+ }
3304
+ if (isFunction(resultSelector)) {
3305
+ return mergeMap(function(a, i) {
3306
+ return map(function(b, ii) {
3307
+ return resultSelector(a, b, i, ii);
3308
+ })(innerFrom(project(a, i)));
3309
+ }, concurrent);
3310
+ } else if (typeof resultSelector === "number") {
3311
+ concurrent = resultSelector;
3312
+ }
3313
+ return operate(function(source8, subscriber3) {
3314
+ return mergeInternals(source8, subscriber3, project, concurrent);
3315
+ });
3316
+ }
3317
+
3318
+ // ../node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js
3319
+ function mergeAll(concurrent) {
3320
+ if (concurrent === void 0) {
3321
+ concurrent = Infinity;
3322
+ }
3323
+ return mergeMap(identity, concurrent);
3324
+ }
3325
+
3326
+ // ../node_modules/rxjs/dist/esm5/internal/operators/concatAll.js
3327
+ function concatAll() {
3328
+ return mergeAll(1);
3329
+ }
3330
+
3331
+ // ../node_modules/rxjs/dist/esm5/internal/observable/concat.js
3332
+ function concat() {
3333
+ var args = [];
3334
+ for (var _i = 0; _i < arguments.length; _i++) {
3335
+ args[_i] = arguments[_i];
3336
+ }
3337
+ return concatAll()(from(args, popScheduler(args)));
3338
+ }
3339
+
3340
+ // ../node_modules/rxjs/dist/esm5/internal/observable/merge.js
3341
+ function merge() {
3342
+ var args = [];
3343
+ for (var _i = 0; _i < arguments.length; _i++) {
3344
+ args[_i] = arguments[_i];
3345
+ }
3346
+ var scheduler = popScheduler(args);
3347
+ var concurrent = popNumber(args, Infinity);
3348
+ var sources = args;
3349
+ return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler));
3350
+ }
3351
+
3352
+ // ../node_modules/rxjs/dist/esm5/internal/operators/filter.js
3353
+ function filter(predicate4, thisArg) {
3354
+ return operate(function(source8, subscriber3) {
3355
+ var index2 = 0;
3356
+ source8.subscribe(createOperatorSubscriber(subscriber3, function(value7) {
3357
+ return predicate4.call(thisArg, value7, index2++) && subscriber3.next(value7);
3358
+ }));
3359
+ });
3360
+ }
3361
+
3362
+ // ../node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js
3363
+ function distinctUntilChanged(comparator2, keySelector) {
3364
+ if (keySelector === void 0) {
3365
+ keySelector = identity;
3366
+ }
3367
+ comparator2 = comparator2 !== null && comparator2 !== void 0 ? comparator2 : defaultCompare;
3368
+ return operate(function(source8, subscriber3) {
3369
+ var previousKey;
3370
+ var first4 = true;
3371
+ source8.subscribe(createOperatorSubscriber(subscriber3, function(value7) {
3372
+ var currentKey = keySelector(value7);
3373
+ if (first4 || !comparator2(previousKey, currentKey)) {
3374
+ first4 = false;
3375
+ previousKey = currentKey;
3376
+ subscriber3.next(value7);
3377
+ }
3378
+ }));
3379
+ });
3380
+ }
3381
+ function defaultCompare(a, b) {
3382
+ return a === b;
3383
+ }
3384
+
3385
+ // ../node_modules/rxjs/dist/esm5/internal/operators/startWith.js
3386
+ function startWith() {
3387
+ var values2 = [];
3388
+ for (var _i = 0; _i < arguments.length; _i++) {
3389
+ values2[_i] = arguments[_i];
3390
+ }
3391
+ var scheduler = popScheduler(values2);
3392
+ return operate(function(source8, subscriber3) {
3393
+ (scheduler ? concat(values2, source8, scheduler) : concat(values2, source8)).subscribe(subscriber3);
3394
+ });
3395
+ }
3396
+
2667
3397
  // ../node_modules/rxjs/dist/esm5/internal/operators/tap.js
2668
3398
  function tap(observerOrNext, error4, complete2) {
2669
3399
  var tapObserver = isFunction(observerOrNext) || error4 || complete2 ? { next: observerOrNext, error: error4, complete: complete2 } : observerOrNext;
@@ -2761,7 +3491,7 @@ var createNeverThrowError = (message4, result6, config2 = defaultErrorConfig) =>
2761
3491
  stack: maybeStack
2762
3492
  };
2763
3493
  };
2764
- function __awaiter(thisArg, _arguments, P, generator3) {
3494
+ function __awaiter2(thisArg, _arguments, P, generator3) {
2765
3495
  function adopt(value7) {
2766
3496
  return value7 instanceof P ? value7 : new P(function(resolve) {
2767
3497
  resolve(value7);
@@ -2799,10 +3529,10 @@ function __values2(o) {
2799
3529
  };
2800
3530
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2801
3531
  }
2802
- function __await(v2) {
2803
- return this instanceof __await ? (this.v = v2, this) : new __await(v2);
3532
+ function __await2(v2) {
3533
+ return this instanceof __await2 ? (this.v = v2, this) : new __await2(v2);
2804
3534
  }
2805
- function __asyncGenerator(thisArg, _arguments, generator3) {
3535
+ function __asyncGenerator2(thisArg, _arguments, generator3) {
2806
3536
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2807
3537
  var g = generator3.apply(thisArg, _arguments || []), i, q = [];
2808
3538
  return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb2("next"), verb2("throw"), verb2("return", awaitReturn), i[Symbol.asyncIterator] = function() {
@@ -2831,7 +3561,7 @@ function __asyncGenerator(thisArg, _arguments, generator3) {
2831
3561
  }
2832
3562
  }
2833
3563
  function step4(r) {
2834
- r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
3564
+ r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
2835
3565
  }
2836
3566
  function fulfill(value7) {
2837
3567
  resume("next", value7);
@@ -2852,11 +3582,11 @@ function __asyncDelegator(o) {
2852
3582
  }, i;
2853
3583
  function verb2(n2, f) {
2854
3584
  i[n2] = o[n2] ? function(v2) {
2855
- return (p = !p) ? { value: __await(o[n2](v2)), done: false } : f ? f(v2) : v2;
3585
+ return (p = !p) ? { value: __await2(o[n2](v2)), done: false } : f ? f(v2) : v2;
2856
3586
  } : f;
2857
3587
  }
2858
3588
  }
2859
- function __asyncValues(o) {
3589
+ function __asyncValues2(o) {
2860
3590
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2861
3591
  var m = o[Symbol.asyncIterator], i;
2862
3592
  return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb2("next"), verb2("throw"), verb2("return"), i[Symbol.asyncIterator] = function() {
@@ -2890,7 +3620,7 @@ var ResultAsync = class _ResultAsync {
2890
3620
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2891
3621
  static fromThrowable(fn2, errorFn) {
2892
3622
  return (...args) => {
2893
- return new _ResultAsync((() => __awaiter(this, void 0, void 0, function* () {
3623
+ return new _ResultAsync((() => __awaiter2(this, void 0, void 0, function* () {
2894
3624
  try {
2895
3625
  return new Ok(yield fn2(...args));
2896
3626
  } catch (error4) {
@@ -2906,7 +3636,7 @@ var ResultAsync = class _ResultAsync {
2906
3636
  return combineResultAsyncListWithAllErrors(asyncResultList);
2907
3637
  }
2908
3638
  map(f) {
2909
- return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
3639
+ return new _ResultAsync(this._promise.then((res) => __awaiter2(this, void 0, void 0, function* () {
2910
3640
  if (res.isErr()) {
2911
3641
  return new Err(res.error);
2912
3642
  }
@@ -2914,7 +3644,7 @@ var ResultAsync = class _ResultAsync {
2914
3644
  })));
2915
3645
  }
2916
3646
  andThrough(f) {
2917
- return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
3647
+ return new _ResultAsync(this._promise.then((res) => __awaiter2(this, void 0, void 0, function* () {
2918
3648
  if (res.isErr()) {
2919
3649
  return new Err(res.error);
2920
3650
  }
@@ -2926,7 +3656,7 @@ var ResultAsync = class _ResultAsync {
2926
3656
  })));
2927
3657
  }
2928
3658
  andTee(f) {
2929
- return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
3659
+ return new _ResultAsync(this._promise.then((res) => __awaiter2(this, void 0, void 0, function* () {
2930
3660
  if (res.isErr()) {
2931
3661
  return new Err(res.error);
2932
3662
  }
@@ -2938,7 +3668,7 @@ var ResultAsync = class _ResultAsync {
2938
3668
  })));
2939
3669
  }
2940
3670
  orTee(f) {
2941
- return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
3671
+ return new _ResultAsync(this._promise.then((res) => __awaiter2(this, void 0, void 0, function* () {
2942
3672
  if (res.isOk()) {
2943
3673
  return new Ok(res.value);
2944
3674
  }
@@ -2950,7 +3680,7 @@ var ResultAsync = class _ResultAsync {
2950
3680
  })));
2951
3681
  }
2952
3682
  mapErr(f) {
2953
- return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
3683
+ return new _ResultAsync(this._promise.then((res) => __awaiter2(this, void 0, void 0, function* () {
2954
3684
  if (res.isOk()) {
2955
3685
  return new Ok(res.value);
2956
3686
  }
@@ -2969,7 +3699,7 @@ var ResultAsync = class _ResultAsync {
2969
3699
  }
2970
3700
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
2971
3701
  orElse(f) {
2972
- return new _ResultAsync(this._promise.then((res) => __awaiter(this, void 0, void 0, function* () {
3702
+ return new _ResultAsync(this._promise.then((res) => __awaiter2(this, void 0, void 0, function* () {
2973
3703
  if (res.isErr()) {
2974
3704
  return f(res.error);
2975
3705
  }
@@ -2995,8 +3725,8 @@ var ResultAsync = class _ResultAsync {
2995
3725
  * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.
2996
3726
  */
2997
3727
  safeUnwrap() {
2998
- return __asyncGenerator(this, arguments, function* safeUnwrap_1() {
2999
- return yield __await(yield __await(yield* __asyncDelegator(__asyncValues(yield __await(this._promise.then((res) => res.safeUnwrap()))))));
3728
+ return __asyncGenerator2(this, arguments, function* safeUnwrap_1() {
3729
+ return yield __await2(yield __await2(yield* __asyncDelegator(__asyncValues2(yield __await2(this._promise.then((res) => res.safeUnwrap()))))));
3000
3730
  });
3001
3731
  }
3002
3732
  // Makes ResultAsync implement PromiseLike<Result>
@@ -3004,19 +3734,19 @@ var ResultAsync = class _ResultAsync {
3004
3734
  return this._promise.then(successCallback, failureCallback);
3005
3735
  }
3006
3736
  [Symbol.asyncIterator]() {
3007
- return __asyncGenerator(this, arguments, function* _a() {
3008
- const result6 = yield __await(this._promise);
3737
+ return __asyncGenerator2(this, arguments, function* _a() {
3738
+ const result6 = yield __await2(this._promise);
3009
3739
  if (result6.isErr()) {
3010
- yield yield __await(errAsync(result6.error));
3740
+ yield yield __await2(errAsync(result6.error));
3011
3741
  }
3012
- return yield __await(result6.value);
3742
+ return yield __await2(result6.value);
3013
3743
  });
3014
3744
  }
3015
3745
  };
3016
3746
  function errAsync(err2) {
3017
3747
  return new ResultAsync(Promise.resolve(new Err(err2)));
3018
3748
  }
3019
- var fromPromise = ResultAsync.fromPromise;
3749
+ var fromPromise2 = ResultAsync.fromPromise;
3020
3750
  var fromSafePromise = ResultAsync.fromSafePromise;
3021
3751
  var fromAsyncThrowable = ResultAsync.fromThrowable;
3022
3752
  var combineResultList = (resultList) => {
@@ -3641,10 +4371,10 @@ var Mime = class {
3641
4371
  getType(path3) {
3642
4372
  if (typeof path3 !== "string")
3643
4373
  return null;
3644
- const last3 = path3.replace(/^.*[/\\]/s, "").toLowerCase();
3645
- const ext = last3.replace(/^.*\./s, "").toLowerCase();
3646
- const hasPath = last3.length < path3.length;
3647
- const hasDot = ext.length < last3.length - 1;
4374
+ const last4 = path3.replace(/^.*[/\\]/s, "").toLowerCase();
4375
+ const ext = last4.replace(/^.*\./s, "").toLowerCase();
4376
+ const hasPath = last4.length < path3.length;
4377
+ const hasDot = ext.length < last4.length - 1;
3648
4378
  if (!hasDot && hasPath)
3649
4379
  return null;
3650
4380
  return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
@@ -4083,50 +4813,6 @@ var PictureGateway = class {
4083
4813
  }
4084
4814
  };
4085
4815
 
4086
- // src/profile/WebIdProfile.ts
4087
- var WebIdProfile = class extends Thing {
4088
- constructor(webId, store, editable = false) {
4089
- super(webId, store, editable);
4090
- this.webId = webId;
4091
- this.store = store;
4092
- this.editable = editable;
4093
- }
4094
- /**
4095
- * Returns te URI of the preferences document
4096
- */
4097
- getPreferencesFile() {
4098
- return this.store.anyValue(
4099
- namedNode(this.webId),
4100
- namedNode("http://www.w3.org/ns/pim/space#preferencesFile"),
4101
- void 0,
4102
- namedNode(this.webId).doc()
4103
- );
4104
- }
4105
- /**
4106
- * Returns the URIs of the private label indexes
4107
- */
4108
- getPrivateLabelIndexes() {
4109
- const profileNodes = this.store.each(
4110
- namedNode(this.webId),
4111
- namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
4112
- void 0,
4113
- namedNode(this.webId).doc()
4114
- );
4115
- const preferences = this.getPreferencesFile();
4116
- if (preferences) {
4117
- const preferencesNodes = this.store.each(
4118
- namedNode(this.webId),
4119
- namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
4120
- void 0,
4121
- namedNode(preferences)
4122
- );
4123
- return [...profileNodes, ...preferencesNodes].map((it) => it.value);
4124
- } else {
4125
- return profileNodes.map((it) => it.value);
4126
- }
4127
- }
4128
- };
4129
-
4130
4816
  // src/search/SearchIndex.ts
4131
4817
  var import_lunr = __toESM(require_lunr(), 1);
4132
4818
  var SearchIndex = class {
@@ -4209,6 +4895,7 @@ var RdfDocument = class extends Thing {
4209
4895
  // src/namespaces/index.ts
4210
4896
  var rdfs = Namespace("http://www.w3.org/2000/01/rdf-schema#");
4211
4897
  var pim = Namespace("http://www.w3.org/ns/pim/space#");
4898
+ var schema = Namespace("https://schema.org/");
4212
4899
 
4213
4900
  // src/search/LabelIndex.ts
4214
4901
  var LabelIndex = class extends RdfDocument {
@@ -4259,6 +4946,54 @@ var solid = Namespace("http://www.w3.org/ns/solid/terms#");
4259
4946
  var pim2 = Namespace("http://www.w3.org/ns/pim/space#");
4260
4947
  var ldp = Namespace("http://www.w3.org/ns/ldp#");
4261
4948
 
4949
+ // node_modules/@solid-data-modules/rdflib-utils/dist/queries/PreferencesQuery.js
4950
+ var PreferencesQuery = class {
4951
+ constructor(store, webIdNode, preferencesDoc) {
4952
+ this.store = store;
4953
+ this.webIdNode = webIdNode;
4954
+ this.preferencesDoc = preferencesDoc;
4955
+ }
4956
+ /**
4957
+ * Look up the private type index. Returns null if none is found or if the predicated does not link to a proper named node
4958
+ */
4959
+ queryPrivateTypeIndex() {
4960
+ const node3 = this.store.any(this.webIdNode, solid("privateTypeIndex"), null, this.preferencesDoc);
4961
+ if (isNamedNode(node3)) {
4962
+ return node3;
4963
+ }
4964
+ return null;
4965
+ }
4966
+ };
4967
+
4968
+ // node_modules/@solid-data-modules/rdflib-utils/dist/queries/ProfileQuery.js
4969
+ var ProfileQuery = class {
4970
+ constructor(webIdNode, store) {
4971
+ this.webIdNode = webIdNode;
4972
+ this.store = store;
4973
+ }
4974
+ /**
4975
+ * Look up the public type index. Returns null if none is found or if the predicated does not link to a proper named node
4976
+ */
4977
+ queryPublicTypeIndex() {
4978
+ const predicate4 = solid("publicTypeIndex");
4979
+ return this.queryNamedNode(predicate4);
4980
+ }
4981
+ /**
4982
+ * Look up the preferences file. Returns null if none is found or if the predicated does not link to a proper named node
4983
+ */
4984
+ queryPreferencesFile() {
4985
+ const predicate4 = pim2("preferencesFile");
4986
+ return this.queryNamedNode(predicate4);
4987
+ }
4988
+ queryNamedNode(predicate4) {
4989
+ const node3 = this.store.any(this.webIdNode, predicate4, null, this.webIdNode.doc());
4990
+ if (isNamedNode(node3)) {
4991
+ return node3;
4992
+ }
4993
+ return null;
4994
+ }
4995
+ };
4996
+
4262
4997
  // node_modules/@solid-data-modules/rdflib-utils/dist/identifier/generate-id.js
4263
4998
  var import_short_unique_id = __toESM(require_short_unique_id(), 1);
4264
4999
  var uid = new import_short_unique_id.default({ length: 10 });
@@ -4523,6 +5258,29 @@ var Store = class {
4523
5258
  updater: this.updater
4524
5259
  });
4525
5260
  }
5261
+ /**
5262
+ * Finds instances of the given class or its sub-classes
5263
+ * @param {string} classUri
5264
+ * @returns {string[]} An array of URIs
5265
+ */
5266
+ findMembers(classUri) {
5267
+ return Object.keys(this.internalStore.findMemberURIs(namedNode(classUri)));
5268
+ }
5269
+ /**
5270
+ * Get an Observable that will push new results from {@link findMembers} when it changes
5271
+ * @param {string} classUri
5272
+ * @returns {Observable<string[]>} Observable that pushes an array of URIs of instances of the given class or its sub-classes
5273
+ */
5274
+ observeFindMembers(classUri) {
5275
+ return merge(this.additions$, this.removals$).pipe(
5276
+ filter(
5277
+ (quad) => quad.predicate.value == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" || quad.predicate.value == "http://www.w3.org/2000/01/rdf-schema#subClassOf"
5278
+ ),
5279
+ map(() => this.findMembers(classUri)),
5280
+ startWith(this.findMembers(classUri)),
5281
+ distinctUntilChanged((prev2, curr) => prev2.length == curr.length)
5282
+ );
5283
+ }
4526
5284
  };
4527
5285
 
4528
5286
  // ../node_modules/rdf-namespaces/dist/index.es.js
@@ -4549,7 +5307,7 @@ __export(index_es_exports, {
4549
5307
  rdf: () => rdf2,
4550
5308
  rdfs: () => rdfs2,
4551
5309
  sched: () => sched,
4552
- schema: () => schema,
5310
+ schema: () => schema2,
4553
5311
  schema_https: () => schema_https,
4554
5312
  sec: () => sec,
4555
5313
  shacl: () => shacl,
@@ -4643,7 +5401,7 @@ var icon = "https://www.w3.org/ns/activitystreams#icon";
4643
5401
  var image = "https://www.w3.org/ns/activitystreams#image";
4644
5402
  var inReplyTo = "https://www.w3.org/ns/activitystreams#inReplyTo";
4645
5403
  var items = "https://www.w3.org/ns/activitystreams#items";
4646
- var last = "https://www.w3.org/ns/activitystreams#last";
5404
+ var last2 = "https://www.w3.org/ns/activitystreams#last";
4647
5405
  var location = "https://www.w3.org/ns/activitystreams#location";
4648
5406
  var next = "https://www.w3.org/ns/activitystreams#next";
4649
5407
  var object = "https://www.w3.org/ns/activitystreams#object";
@@ -4768,7 +5526,7 @@ var asImport = /* @__PURE__ */ Object.freeze({
4768
5526
  image,
4769
5527
  inReplyTo,
4770
5528
  items,
4771
- last,
5529
+ last: last2,
4772
5530
  location,
4773
5531
  next,
4774
5532
  object,
@@ -5348,7 +6106,7 @@ var timing = "http://hl7.org/fhir/timing";
5348
6106
  var appliesToAll = "http://hl7.org/fhir/appliesToAll";
5349
6107
  var _appointmentRequired = "http://hl7.org/fhir/_appointmentRequired";
5350
6108
  var _canFilterBy = "http://hl7.org/fhir/_canFilterBy";
5351
- var filter = "http://hl7.org/fhir/filter";
6109
+ var filter2 = "http://hl7.org/fhir/filter";
5352
6110
  var _targetNumber = "http://hl7.org/fhir/_targetNumber";
5353
6111
  var _additive = "http://hl7.org/fhir/_additive";
5354
6112
  var _management = "http://hl7.org/fhir/_management";
@@ -6381,7 +7139,7 @@ var rule = "http://hl7.org/fhir/rule";
6381
7139
  var Specimen = "http://hl7.org/fhir/Specimen";
6382
7140
  var _MedicinalProductDefinition = "http://hl7.org/fhir/_MedicinalProductDefinition";
6383
7141
  var OperationDefinition = "http://hl7.org/fhir/OperationDefinition";
6384
- var process = "http://hl7.org/fhir/process";
7142
+ var process2 = "http://hl7.org/fhir/process";
6385
7143
  var CitationCitedArtifactContributorshipEntryContributionInstanceComponent = "http://hl7.org/fhir/CitationCitedArtifactContributorshipEntryContributionInstanceComponent";
6386
7144
  var EncounterAdmissionComponent = "http://hl7.org/fhir/EncounterAdmissionComponent";
6387
7145
  var _MedicationDispense = "http://hl7.org/fhir/_MedicationDispense";
@@ -8980,7 +9738,7 @@ var freeToShare = "http://hl7.org/fhir/freeToShare";
8980
9738
  var ElementDefinitionMappingComponent = "http://hl7.org/fhir/ElementDefinitionMappingComponent";
8981
9739
  var copackagedIndicator = "http://hl7.org/fhir/copackagedIndicator";
8982
9740
  var precheckBehavior = "http://hl7.org/fhir/precheckBehavior";
8983
- var map = "http://hl7.org/fhir/map";
9741
+ var map2 = "http://hl7.org/fhir/map";
8984
9742
  var additionalInfo = "http://hl7.org/fhir/additionalInfo";
8985
9743
  var preConditions = "http://hl7.org/fhir/preConditions";
8986
9744
  var numberOfSubunits = "http://hl7.org/fhir/numberOfSubunits";
@@ -9583,7 +10341,7 @@ var fhirImport = /* @__PURE__ */ Object.freeze({
9583
10341
  appliesToAll,
9584
10342
  _appointmentRequired,
9585
10343
  _canFilterBy,
9586
- filter,
10344
+ filter: filter2,
9587
10345
  _targetNumber,
9588
10346
  _additive,
9589
10347
  _management,
@@ -10616,7 +11374,7 @@ var fhirImport = /* @__PURE__ */ Object.freeze({
10616
11374
  Specimen,
10617
11375
  _MedicinalProductDefinition,
10618
11376
  OperationDefinition,
10619
- process,
11377
+ process: process2,
10620
11378
  CitationCitedArtifactContributorshipEntryContributionInstanceComponent,
10621
11379
  EncounterAdmissionComponent,
10622
11380
  _MedicationDispense,
@@ -13215,7 +13973,7 @@ var fhirImport = /* @__PURE__ */ Object.freeze({
13215
13973
  ElementDefinitionMappingComponent,
13216
13974
  copackagedIndicator,
13217
13975
  precheckBehavior,
13218
- map,
13976
+ map: map2,
13219
13977
  additionalInfo,
13220
13978
  preConditions,
13221
13979
  numberOfSubunits,
@@ -13971,7 +14729,7 @@ var extension2 = "http://www.w3.org/ns/hydra/core#extension";
13971
14729
  var first2 = "http://www.w3.org/ns/hydra/core#first";
13972
14730
  var freetextQuery = "http://www.w3.org/ns/hydra/core#freetextQuery";
13973
14731
  var headerName = "http://www.w3.org/ns/hydra/core#headerName";
13974
- var last2 = "http://www.w3.org/ns/hydra/core#last";
14732
+ var last3 = "http://www.w3.org/ns/hydra/core#last";
13975
14733
  var limit2 = "http://www.w3.org/ns/hydra/core#limit";
13976
14734
  var mapping2 = "http://www.w3.org/ns/hydra/core#mapping";
13977
14735
  var member3 = "http://www.w3.org/ns/hydra/core#member";
@@ -14033,7 +14791,7 @@ var hydraImport = /* @__PURE__ */ Object.freeze({
14033
14791
  first: first2,
14034
14792
  freetextQuery,
14035
14793
  headerName,
14036
- last: last2,
14794
+ last: last3,
14037
14795
  limit: limit2,
14038
14796
  mapping: mapping2,
14039
14797
  member: member3,
@@ -16233,7 +16991,7 @@ var lyricist = "http://schema.org/lyricist";
16233
16991
  var lyrics = "http://schema.org/lyrics";
16234
16992
  var maintainer = "http://schema.org/maintainer";
16235
16993
  var manufacturer2 = "http://schema.org/manufacturer";
16236
- var map2 = "http://schema.org/map";
16994
+ var map3 = "http://schema.org/map";
16237
16995
  var mapType = "http://schema.org/mapType";
16238
16996
  var maps = "http://schema.org/maps";
16239
16997
  var marginOfError = "http://schema.org/marginOfError";
@@ -18672,7 +19430,7 @@ var schemaImport = /* @__PURE__ */ Object.freeze({
18672
19430
  lyrics,
18673
19431
  maintainer,
18674
19432
  manufacturer: manufacturer2,
18675
- map: map2,
19433
+ map: map3,
18676
19434
  mapType,
18677
19435
  maps,
18678
19436
  marginOfError,
@@ -21113,7 +21871,7 @@ var lyricist2 = "https://schema.org/lyricist";
21113
21871
  var lyrics2 = "https://schema.org/lyrics";
21114
21872
  var maintainer2 = "https://schema.org/maintainer";
21115
21873
  var manufacturer3 = "https://schema.org/manufacturer";
21116
- var map3 = "https://schema.org/map";
21874
+ var map4 = "https://schema.org/map";
21117
21875
  var mapType2 = "https://schema.org/mapType";
21118
21876
  var maps2 = "https://schema.org/maps";
21119
21877
  var marginOfError2 = "https://schema.org/marginOfError";
@@ -23552,7 +24310,7 @@ var schema_httpsImport = /* @__PURE__ */ Object.freeze({
23552
24310
  lyrics: lyrics2,
23553
24311
  maintainer: maintainer2,
23554
24312
  manufacturer: manufacturer3,
23555
- map: map3,
24313
+ map: map4,
23556
24314
  mapType: mapType2,
23557
24315
  maps: maps2,
23558
24316
  marginOfError: marginOfError2,
@@ -25803,7 +26561,7 @@ var trip3 = tripImport;
25803
26561
  var rdf2 = rdfImport;
25804
26562
  var rdfs2 = rdfsImport;
25805
26563
  var sched = schedImport;
25806
- var schema = schemaImport;
26564
+ var schema2 = schemaImport;
25807
26565
  var schema_https = schema_httpsImport;
25808
26566
  var sec = secImport;
25809
26567
  var shacl = shaclImport;
@@ -25853,6 +26611,86 @@ var UriService = class {
25853
26611
  }
25854
26612
  };
25855
26613
 
26614
+ // src/profile/WebIdProfile.ts
26615
+ var WebIdProfile = class extends Thing {
26616
+ constructor(webId, store, editable = false) {
26617
+ super(webId, store, editable);
26618
+ this.webId = webId;
26619
+ this.store = store;
26620
+ this.editable = editable;
26621
+ this.profileQuery = new ProfileQuery(namedNode(this.webId), this.store);
26622
+ }
26623
+ /**
26624
+ * Returns the URI of the preferences document
26625
+ */
26626
+ getPreferencesFile() {
26627
+ return this.profileQuery.queryPreferencesFile()?.value;
26628
+ }
26629
+ /**
26630
+ * Returns the URI of the public type index document
26631
+ */
26632
+ getPublicTypeIndex() {
26633
+ return this.profileQuery.queryPublicTypeIndex()?.value;
26634
+ }
26635
+ /**
26636
+ * Returns the URI of the private type index document
26637
+ */
26638
+ getPrivateTypeIndex() {
26639
+ const preferences = this.profileQuery.queryPreferencesFile();
26640
+ if (!preferences) return void 0;
26641
+ const query4 = new PreferencesQuery(
26642
+ this.store,
26643
+ namedNode(this.webId),
26644
+ preferences
26645
+ );
26646
+ return query4.queryPrivateTypeIndex()?.value;
26647
+ }
26648
+ /**
26649
+ * Returns the URIs of the private label indexes
26650
+ */
26651
+ getPrivateLabelIndexes() {
26652
+ const profileNodes = this.store.each(
26653
+ namedNode(this.webId),
26654
+ namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
26655
+ void 0,
26656
+ namedNode(this.webId).doc()
26657
+ );
26658
+ const preferences = this.getPreferencesFile();
26659
+ if (preferences) {
26660
+ const preferencesNodes = this.store.each(
26661
+ namedNode(this.webId),
26662
+ namedNode("http://www.w3.org/ns/solid/terms#privateLabelIndex"),
26663
+ void 0,
26664
+ namedNode(preferences)
26665
+ );
26666
+ return [...profileNodes, ...preferencesNodes].map((it) => it.value);
26667
+ } else {
26668
+ return profileNodes.map((it) => it.value);
26669
+ }
26670
+ }
26671
+ };
26672
+
26673
+ // src/profile/ProfileGateway.ts
26674
+ var ProfileGateway = class {
26675
+ constructor(store) {
26676
+ this.store = store;
26677
+ }
26678
+ async fetchProfile(webId) {
26679
+ await this.store.fetch(webId);
26680
+ const profile2 = this.store.get(webId).assume(WebIdProfile);
26681
+ const preferences = profile2.getPreferencesFile();
26682
+ if (preferences) {
26683
+ await this.store.fetch(preferences);
26684
+ }
26685
+ const publicTypeIndex2 = profile2.getPublicTypeIndex();
26686
+ const privateTypeIndex2 = profile2.getPrivateTypeIndex();
26687
+ await this.store.fetchAll(
26688
+ [privateTypeIndex2, publicTypeIndex2].filter((it) => it !== void 0)
26689
+ );
26690
+ return profile2;
26691
+ }
26692
+ };
26693
+
25856
26694
  // src/authentication/index.ts
25857
26695
  var AnonymousSession = class {
25858
26696
  constructor() {
@@ -25896,6 +26734,7 @@ var PodOS = class {
25896
26734
  this.pictureGateway = new PictureGateway(this.store, this.fileFetcher);
25897
26735
  this.flagAuthorizationMetaDataOnSessionChange();
25898
26736
  this.uriService = new UriService(this.store);
26737
+ this.profileGateway = new ProfileGateway(this.store);
25899
26738
  }
25900
26739
  /*
25901
26740
  Flagging authorization metadata is necessary every time the user
@@ -25955,13 +26794,7 @@ var PodOS = class {
25955
26794
  * @param webId
25956
26795
  */
25957
26796
  async fetchProfile(webId) {
25958
- await this.fetch(webId);
25959
- const profile2 = this.store.get(webId).assume(WebIdProfile);
25960
- const preferences = profile2.getPreferencesFile();
25961
- if (preferences) {
25962
- await this.fetch(preferences);
25963
- }
25964
- return profile2;
26797
+ return this.profileGateway.fetchProfile(webId);
25965
26798
  }
25966
26799
  /**
25967
26800
  * Fetch the private label index for the given profile and build a search index from it
@@ -26022,6 +26855,7 @@ export {
26022
26855
  OfflineCapableFetcher,
26023
26856
  PictureGateway,
26024
26857
  PodOS,
26858
+ ProfileGateway,
26025
26859
  RdfDocument,
26026
26860
  SearchGateway,
26027
26861
  SearchIndex,