graphwise-reactodia 0.0.1-TR16 → 0.0.1-TR17
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/README.md +35 -0
- package/dist/cjs/error-code-NpXlqCEN.js +28 -0
- package/dist/cjs/graphwise-reactodia.cjs.entry.js +232 -37
- package/dist/cjs/graphwise-reactodia.cjs.js +1 -1
- package/dist/cjs/{index-CII9aUQC.js → index-DtzCybH4.js} +16 -0
- package/dist/cjs/index.cjs.js +10 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/graphwise-reactodia/graphwise-reactodia.js +44 -4
- package/dist/collection/components/graphwise-reactodia/menu/graphwise-menu.js +4 -1
- package/dist/collection/components/graphwise-reactodia/models/error/error-callback.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/error/error-cause.js +1 -0
- package/dist/collection/components/graphwise-reactodia/models/error/error-code.js +18 -0
- package/dist/collection/components/graphwise-reactodia/models/error/error-report.js +4 -0
- package/dist/collection/components/graphwise-reactodia/reactodia-app.js +53 -19
- package/dist/collection/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.js +20 -4
- package/dist/collection/components/graphwise-reactodia/services/error/error.service.js +89 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/pages/graphwise-reactodia/main.js +37 -0
- package/dist/esm/error-code-7lGYbTwb.js +26 -0
- package/dist/esm/graphwise-reactodia.entry.js +228 -33
- package/dist/esm/graphwise-reactodia.js +2 -2
- package/dist/esm/{index-Cypw7ydc.js → index-DpCR6zMg.js} +16 -1
- package/dist/esm/index.js +5 -4
- package/dist/esm/loader.js +2 -2
- package/dist/graphwise-reactodia/graphwise-reactodia.esm.js +1 -1
- package/dist/graphwise-reactodia/index.esm.js +1 -1
- package/dist/graphwise-reactodia/p-7lGYbTwb.js +1 -0
- package/dist/graphwise-reactodia/p-DpCR6zMg.js +2 -0
- package/dist/graphwise-reactodia/p-ec30185a.entry.js +1 -0
- package/dist/types/components/graphwise-reactodia/graphwise-reactodia.d.ts +9 -0
- package/dist/types/components/graphwise-reactodia/models/error/error-callback.d.ts +5 -0
- package/dist/types/components/graphwise-reactodia/models/error/error-cause.d.ts +10 -0
- package/dist/types/components/graphwise-reactodia/models/error/error-code.d.ts +17 -0
- package/dist/types/components/graphwise-reactodia/models/error/error-report.d.ts +17 -0
- package/dist/types/components/graphwise-reactodia/reactodia-app.d.ts +1 -1
- package/dist/types/components/graphwise-reactodia/services/diagram-storage/diagram-storage.service.d.ts +1 -0
- package/dist/types/components/graphwise-reactodia/services/error/error.service.d.ts +50 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
- package/dist/graphwise-reactodia/p-20637a6f.entry.js +0 -1
- package/dist/graphwise-reactodia/p-Cypw7ydc.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { CLEAR_DIAGRAM_STORAGE_EVENT } from './
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-DpCR6zMg.js';
|
|
2
|
+
import { E as ErrorCode, C as CLEAR_DIAGRAM_STORAGE_EVENT } from './error-code-7lGYbTwb.js';
|
|
3
3
|
|
|
4
4
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
5
5
|
|
|
@@ -6329,6 +6329,57 @@ var DefaultColorVariants = [
|
|
|
6329
6329
|
"danger"
|
|
6330
6330
|
];
|
|
6331
6331
|
//#endregion
|
|
6332
|
+
//#region src/data/decorated/decoratedDataProvider.ts
|
|
6333
|
+
/**
|
|
6334
|
+
* Utility graph data provider to wrap over another provider to modify
|
|
6335
|
+
* how the requests are made or alter the results.
|
|
6336
|
+
*
|
|
6337
|
+
* @category Data
|
|
6338
|
+
*/
|
|
6339
|
+
var DecoratedDataProvider = class {
|
|
6340
|
+
baseProvider;
|
|
6341
|
+
decorator;
|
|
6342
|
+
constructor(options) {
|
|
6343
|
+
this.baseProvider = options.baseProvider;
|
|
6344
|
+
this.decorator = options.decorator;
|
|
6345
|
+
}
|
|
6346
|
+
get factory() {
|
|
6347
|
+
return this.baseProvider.factory;
|
|
6348
|
+
}
|
|
6349
|
+
decorate(method, params) {
|
|
6350
|
+
const bound = this.baseProvider[method].bind(this.baseProvider);
|
|
6351
|
+
const { decorator } = this;
|
|
6352
|
+
return decorator(method, params[0], bound);
|
|
6353
|
+
}
|
|
6354
|
+
knownElementTypes(params) {
|
|
6355
|
+
return this.decorate("knownElementTypes", [params]);
|
|
6356
|
+
}
|
|
6357
|
+
knownLinkTypes(params) {
|
|
6358
|
+
return this.decorate("knownLinkTypes", [params]);
|
|
6359
|
+
}
|
|
6360
|
+
elementTypes(params) {
|
|
6361
|
+
return this.decorate("elementTypes", [params]);
|
|
6362
|
+
}
|
|
6363
|
+
propertyTypes(params) {
|
|
6364
|
+
return this.decorate("propertyTypes", [params]);
|
|
6365
|
+
}
|
|
6366
|
+
linkTypes(params) {
|
|
6367
|
+
return this.decorate("linkTypes", [params]);
|
|
6368
|
+
}
|
|
6369
|
+
elements(params) {
|
|
6370
|
+
return this.decorate("elements", [params]);
|
|
6371
|
+
}
|
|
6372
|
+
links(params) {
|
|
6373
|
+
return this.decorate("links", [params]);
|
|
6374
|
+
}
|
|
6375
|
+
connectedLinkStats(params) {
|
|
6376
|
+
return this.decorate("connectedLinkStats", [params]);
|
|
6377
|
+
}
|
|
6378
|
+
lookup(params) {
|
|
6379
|
+
return this.decorate("lookup", [params]);
|
|
6380
|
+
}
|
|
6381
|
+
};
|
|
6382
|
+
//#endregion
|
|
6332
6383
|
//#region src/data/decorated/emptyDataProvider.ts
|
|
6333
6384
|
/**
|
|
6334
6385
|
* Empty graph data provider, which always return nothing.
|
|
@@ -31331,7 +31382,7 @@ function Service(_serviceClass) {
|
|
|
31331
31382
|
// no implementation needed. We only use the type checking of the parameter
|
|
31332
31383
|
}
|
|
31333
31384
|
|
|
31334
|
-
var __decorate$
|
|
31385
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31335
31386
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31336
31387
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31337
31388
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -31393,11 +31444,11 @@ let DiagramService = DiagramService_1 = class DiagramService {
|
|
|
31393
31444
|
DiagramService.ID = 'DiagramService';
|
|
31394
31445
|
DiagramService.NOTIFY_DEBOUNCE_MS = 300;
|
|
31395
31446
|
DiagramService.HISTORY_CHANGED_EVENT = 'historyChanged';
|
|
31396
|
-
DiagramService = DiagramService_1 = __decorate$
|
|
31447
|
+
DiagramService = DiagramService_1 = __decorate$5([
|
|
31397
31448
|
Service
|
|
31398
31449
|
], DiagramService);
|
|
31399
31450
|
|
|
31400
|
-
var __decorate$
|
|
31451
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31401
31452
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31402
31453
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31403
31454
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -31412,10 +31463,94 @@ let WindowService = class WindowService {
|
|
|
31412
31463
|
}
|
|
31413
31464
|
};
|
|
31414
31465
|
WindowService.ID = 'WindowService';
|
|
31415
|
-
WindowService = __decorate$
|
|
31466
|
+
WindowService = __decorate$4([
|
|
31416
31467
|
Service
|
|
31417
31468
|
], WindowService);
|
|
31418
31469
|
|
|
31470
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31471
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31472
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
31473
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
31474
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31475
|
+
};
|
|
31476
|
+
var ErrorService_1;
|
|
31477
|
+
/**
|
|
31478
|
+
* Service that collects the failures of the wrapper and the fork, so they can be announced to the host.
|
|
31479
|
+
*/
|
|
31480
|
+
let ErrorService = ErrorService_1 = class ErrorService {
|
|
31481
|
+
constructor() {
|
|
31482
|
+
this.reported = new WeakSet();
|
|
31483
|
+
}
|
|
31484
|
+
/**
|
|
31485
|
+
* Reports a failure to the host, unless it's an abort, or this exact error object is already reported
|
|
31486
|
+
* from another place.
|
|
31487
|
+
*
|
|
31488
|
+
* The same error object may be reported from different places. E.g. a query that fails while a diagram loads is
|
|
31489
|
+
* reported by the data provider decorator as `data-fetch`, and then reaches the `catch` around the load, which
|
|
31490
|
+
* reports it as `diagram-load`. Only the first one is announced.
|
|
31491
|
+
*
|
|
31492
|
+
* The `cause` is checked because the fork wraps whatever fails during a diagram import in a new error:
|
|
31493
|
+
*
|
|
31494
|
+
* ```ts
|
|
31495
|
+
* // reactodia-workspace/src/editor/dataDiagramModel.ts, importLayout
|
|
31496
|
+
* } catch (error) {
|
|
31497
|
+
* throw new Error('Reactodia: failed to import a layout', {cause: error});
|
|
31498
|
+
* }
|
|
31499
|
+
* ```
|
|
31500
|
+
*
|
|
31501
|
+
* We need to check the cause to make sure we don't report the same error/abort more than once.
|
|
31502
|
+
*
|
|
31503
|
+
* @param code The category of the failure.
|
|
31504
|
+
* @param thrown The thrown value.
|
|
31505
|
+
*/
|
|
31506
|
+
report(code, thrown) {
|
|
31507
|
+
var _a;
|
|
31508
|
+
const causes = this.causeChain(thrown);
|
|
31509
|
+
if (this.isAbortedOrAlreadyReported(causes)) {
|
|
31510
|
+
return;
|
|
31511
|
+
}
|
|
31512
|
+
causes.forEach((cause) => this.reported.add(cause));
|
|
31513
|
+
(_a = this.callback) === null || _a === void 0 ? void 0 : _a.call(this, { code, error: thrown });
|
|
31514
|
+
}
|
|
31515
|
+
/**
|
|
31516
|
+
* Subscribes to the reported errors, replacing the previous subscriber.
|
|
31517
|
+
*
|
|
31518
|
+
* @param callback Called with every reported error.
|
|
31519
|
+
* @returns A {@link Subscription} that, when called, removes the callback, unless it has already been replaced.
|
|
31520
|
+
*/
|
|
31521
|
+
subscribe(callback) {
|
|
31522
|
+
this.callback = callback;
|
|
31523
|
+
return () => {
|
|
31524
|
+
if (this.callback === callback) {
|
|
31525
|
+
this.callback = undefined;
|
|
31526
|
+
}
|
|
31527
|
+
};
|
|
31528
|
+
}
|
|
31529
|
+
/**
|
|
31530
|
+
* Whether any link of the given cause chain is an abort or is already reported.
|
|
31531
|
+
*/
|
|
31532
|
+
isAbortedOrAlreadyReported(causes) {
|
|
31533
|
+
return causes.some((cause) => cause.name === ErrorService_1.ABORT_ERROR_NAME || this.reported.has(cause));
|
|
31534
|
+
}
|
|
31535
|
+
/**
|
|
31536
|
+
* The thrown value followed by its `cause`, the cause of that, and so on, for as long as they are objects.
|
|
31537
|
+
*/
|
|
31538
|
+
causeChain(thrown) {
|
|
31539
|
+
const causes = [];
|
|
31540
|
+
let current = thrown;
|
|
31541
|
+
while (typeof current === 'object' && current !== null && !causes.includes(current)) {
|
|
31542
|
+
causes.push(current);
|
|
31543
|
+
current = current.cause;
|
|
31544
|
+
}
|
|
31545
|
+
return causes;
|
|
31546
|
+
}
|
|
31547
|
+
};
|
|
31548
|
+
ErrorService.ID = 'ErrorService';
|
|
31549
|
+
ErrorService.ABORT_ERROR_NAME = 'AbortError';
|
|
31550
|
+
ErrorService = ErrorService_1 = __decorate$3([
|
|
31551
|
+
Service
|
|
31552
|
+
], ErrorService);
|
|
31553
|
+
|
|
31419
31554
|
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
31420
31555
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
31421
31556
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -31427,22 +31562,36 @@ var DiagramStorageService_1;
|
|
|
31427
31562
|
* Service for local store-related diagram operations
|
|
31428
31563
|
*/
|
|
31429
31564
|
let DiagramStorageService = DiagramStorageService_1 = class DiagramStorageService {
|
|
31565
|
+
constructor() {
|
|
31566
|
+
this.errorService = service(ErrorService);
|
|
31567
|
+
}
|
|
31430
31568
|
/**
|
|
31431
31569
|
* Load the persisted diagram from the local store, or `undefined` when nothing is stored (or the stored value
|
|
31432
31570
|
* is unreadable).
|
|
31433
31571
|
*/
|
|
31434
31572
|
load() {
|
|
31435
|
-
|
|
31436
|
-
|
|
31573
|
+
try {
|
|
31574
|
+
const raw = this.storage.getItem(DiagramStorageService_1.STORAGE_KEY);
|
|
31575
|
+
if (!raw) {
|
|
31576
|
+
return undefined;
|
|
31577
|
+
}
|
|
31578
|
+
return JSON.parse(raw);
|
|
31579
|
+
}
|
|
31580
|
+
catch (error) {
|
|
31581
|
+
this.errorService.report(ErrorCode.LOCAL_DIAGRAM_READ, error);
|
|
31437
31582
|
return undefined;
|
|
31438
31583
|
}
|
|
31439
|
-
return JSON.parse(raw);
|
|
31440
31584
|
}
|
|
31441
31585
|
/**
|
|
31442
31586
|
* Persists the given diagram serialization.
|
|
31443
31587
|
*/
|
|
31444
31588
|
save(diagram) {
|
|
31445
|
-
|
|
31589
|
+
try {
|
|
31590
|
+
this.storage.setItem(DiagramStorageService_1.STORAGE_KEY, JSON.stringify(diagram));
|
|
31591
|
+
}
|
|
31592
|
+
catch (error) {
|
|
31593
|
+
this.errorService.report(ErrorCode.LOCAL_DIAGRAM_SAVE, error);
|
|
31594
|
+
}
|
|
31446
31595
|
}
|
|
31447
31596
|
/**
|
|
31448
31597
|
* Removes the persisted diagram. Used when a new view (a seed) should take precedence over
|
|
@@ -31652,6 +31801,7 @@ function GraphwiseMenu() {
|
|
|
31652
31801
|
const t = useTranslation();
|
|
31653
31802
|
const diagramFileService = service(DiagramFileService);
|
|
31654
31803
|
const diagramService = service(DiagramService);
|
|
31804
|
+
const errorService = service(ErrorService);
|
|
31655
31805
|
const downloadDiagram = () => {
|
|
31656
31806
|
const timestamp = new Date().toISOString().replace(/[-:]|\.\d+Z$/g, '');
|
|
31657
31807
|
diagramFileService.download(model.exportLayout(), `diagram-${timestamp}${DiagramFileService.FILE_EXTENSION}`);
|
|
@@ -31662,7 +31812,7 @@ function GraphwiseMenu() {
|
|
|
31662
31812
|
await diagramService.importDiagram(model, model.dataProvider, diagram);
|
|
31663
31813
|
}
|
|
31664
31814
|
catch (error) {
|
|
31665
|
-
|
|
31815
|
+
errorService.report(ErrorCode.DIAGRAM_IMPORT, error);
|
|
31666
31816
|
}
|
|
31667
31817
|
};
|
|
31668
31818
|
return reactExports.createElement(reactExports.Fragment, null, reactExports.createElement(ToolbarActionClearAll, {}), reactExports.createElement(ToolbarActionExport, { kind: 'exportRaster' }), reactExports.createElement(ToolbarActionExport, { kind: 'exportSvg' }), reactExports.createElement(ToolbarActionExport, { kind: 'print' }), reactExports.createElement(ToolbarAction,
|
|
@@ -31701,17 +31851,35 @@ let diagramStorageSubscription;
|
|
|
31701
31851
|
const diagramService = service(DiagramService);
|
|
31702
31852
|
const diagramStorageService = service(DiagramStorageService);
|
|
31703
31853
|
const eventService = service(EventService);
|
|
31854
|
+
const errorService$1 = service(ErrorService);
|
|
31855
|
+
/**
|
|
31856
|
+
* Reports every failed data provider call, unless the call was aborted, and passes the failure on to the caller.
|
|
31857
|
+
*/
|
|
31858
|
+
const reportDataFetchError = async (_method, params, body) => {
|
|
31859
|
+
var _a;
|
|
31860
|
+
try {
|
|
31861
|
+
return await body(params);
|
|
31862
|
+
}
|
|
31863
|
+
catch (error) {
|
|
31864
|
+
if (!((_a = params.signal) === null || _a === void 0 ? void 0 : _a.aborted)) {
|
|
31865
|
+
errorService$1.report(ErrorCode.DATA_FETCH, error);
|
|
31866
|
+
}
|
|
31867
|
+
throw error;
|
|
31868
|
+
}
|
|
31869
|
+
};
|
|
31704
31870
|
/**
|
|
31705
31871
|
* Builds a Reactodia {@link SparqlDataProvider} for the given endpoint using the supplied
|
|
31706
31872
|
* query preset. The host owns the query configuration and always passes it in via props.
|
|
31873
|
+
* The provider is decorated, so its failed calls are reported.
|
|
31707
31874
|
*/
|
|
31708
31875
|
function createDataProvider(props) {
|
|
31709
31876
|
const { currentRepository, config, providerSettings } = props;
|
|
31710
|
-
|
|
31877
|
+
const baseProvider = new SparqlDataProvider({
|
|
31711
31878
|
endpointUrl: currentRepository,
|
|
31712
31879
|
queryMethod: 'POST',
|
|
31713
31880
|
queryFunction: config.queryFunction
|
|
31714
31881
|
}, providerSettings);
|
|
31882
|
+
return new DecoratedDataProvider({ baseProvider, decorator: reportDataFetchError });
|
|
31715
31883
|
}
|
|
31716
31884
|
/**
|
|
31717
31885
|
* Places the seed entities on the canvas. Each IRI is added as a placeholder element, and data is then loaded for the
|
|
@@ -31806,22 +31974,31 @@ function ReactodiaApp(props) {
|
|
|
31806
31974
|
const dataProvider = createDataProvider(props);
|
|
31807
31975
|
const isReload = props.isReload;
|
|
31808
31976
|
const savedDiagram = diagramStorageService.load();
|
|
31809
|
-
|
|
31810
|
-
|
|
31811
|
-
|
|
31812
|
-
|
|
31813
|
-
|
|
31814
|
-
|
|
31815
|
-
|
|
31816
|
-
|
|
31817
|
-
|
|
31818
|
-
|
|
31819
|
-
|
|
31977
|
+
try {
|
|
31978
|
+
if (isReload) {
|
|
31979
|
+
// Reload the diagram that is currently on the canvas. This may happen when the host changes the provider
|
|
31980
|
+
// settings, or when the user switches the language at runtime, since there is no existing mechanism to
|
|
31981
|
+
// re-translate the UI at runtime (not for the UI labels at least)
|
|
31982
|
+
await diagramService.importDiagram(model, dataProvider, currentDiagram, signal);
|
|
31983
|
+
}
|
|
31984
|
+
else if ((_a = config.seedIris) === null || _a === void 0 ? void 0 : _a.length) {
|
|
31985
|
+
await seedIrisToCanvas(context, dataProvider, config.seedIris, signal);
|
|
31986
|
+
}
|
|
31987
|
+
else if ((_b = config.seedGraph) === null || _b === void 0 ? void 0 : _b.length) {
|
|
31988
|
+
await seedGraphToCanvas(context, dataProvider, config.seedGraph, signal);
|
|
31989
|
+
}
|
|
31990
|
+
else {
|
|
31991
|
+
// Restore the previously saved layout when present, otherwise start empty. Either way this binds the
|
|
31992
|
+
// data provider (savedDiagram is undefined -> empty diagram), so the unified search/lookup works.
|
|
31993
|
+
await diagramService.importDiagram(model, dataProvider, savedDiagram, signal);
|
|
31994
|
+
}
|
|
31820
31995
|
}
|
|
31821
|
-
|
|
31822
|
-
|
|
31823
|
-
|
|
31824
|
-
|
|
31996
|
+
catch (error) {
|
|
31997
|
+
if (!signal.aborted) {
|
|
31998
|
+
errorService$1.report(ErrorCode.DIAGRAM_LOAD, error);
|
|
31999
|
+
}
|
|
32000
|
+
// rethrow, so the workspace shows the failure on its loading spinner
|
|
32001
|
+
throw error;
|
|
31825
32002
|
}
|
|
31826
32003
|
}, [language]);
|
|
31827
32004
|
/**
|
|
@@ -31858,7 +32035,7 @@ function mountReactodia(container, props) {
|
|
|
31858
32035
|
/**
|
|
31859
32036
|
* Re-points the diagram at a new SPARQL endpoint by recreating it with a fresh data provider.
|
|
31860
32037
|
* The canvas is reset to empty, matching the initial mount, since the data of another repository
|
|
31861
|
-
* has nothing to do with the current graph.
|
|
32038
|
+
* has nothing to do with the current graph. A failure is reported, not thrown.
|
|
31862
32039
|
*/
|
|
31863
32040
|
async function updateReactodia(props) {
|
|
31864
32041
|
if (!workspaceContext) {
|
|
@@ -31866,7 +32043,12 @@ async function updateReactodia(props) {
|
|
|
31866
32043
|
}
|
|
31867
32044
|
const { model } = workspaceContext;
|
|
31868
32045
|
const dataProvider = createDataProvider(props);
|
|
31869
|
-
|
|
32046
|
+
try {
|
|
32047
|
+
await model.createNewDiagram({ dataProvider });
|
|
32048
|
+
}
|
|
32049
|
+
catch (error) {
|
|
32050
|
+
errorService$1.report(ErrorCode.DIAGRAM_LOAD, error);
|
|
32051
|
+
}
|
|
31870
32052
|
}
|
|
31871
32053
|
/**
|
|
31872
32054
|
* Serializes the current diagram so it can be restored after a remount (e.g. when a
|
|
@@ -31885,9 +32067,12 @@ function unmountReactodia(root) {
|
|
|
31885
32067
|
|
|
31886
32068
|
const graphwiseReactodiaCss = "graphwise-reactodia{--_graphwise-reactodia-type-color-01:var(--graphwise-reactodia-type-color-01);--_graphwise-reactodia-type-color-02:var(--graphwise-reactodia-type-color-02);--_graphwise-reactodia-type-color-03:var(--graphwise-reactodia-type-color-03);--_graphwise-reactodia-type-color-04:var(--graphwise-reactodia-type-color-04);--_graphwise-reactodia-type-color-05:var(--graphwise-reactodia-type-color-05);--_graphwise-reactodia-type-color-06:var(--graphwise-reactodia-type-color-06);--_graphwise-reactodia-type-color-07:var(--graphwise-reactodia-type-color-07);--_graphwise-reactodia-type-color-08:var(--graphwise-reactodia-type-color-08);--_graphwise-reactodia-type-color-09:var(--graphwise-reactodia-type-color-09);--_graphwise-reactodia-type-color-10:var(--graphwise-reactodia-type-color-10);--_graphwise-reactodia-type-color-11:var(--graphwise-reactodia-type-color-11);--_graphwise-reactodia-type-color-12:var(--graphwise-reactodia-type-color-12);--_graphwise-reactodia-type-color-13:var(--graphwise-reactodia-type-color-13);--_graphwise-reactodia-type-color-14:var(--graphwise-reactodia-type-color-14);--_graphwise-reactodia-type-color-15:var(--graphwise-reactodia-type-color-15);--_graphwise-reactodia-type-color-16:var(--graphwise-reactodia-type-color-16);--_graphwise-reactodia-type-color-17:var(--graphwise-reactodia-type-color-17);--_graphwise-reactodia-type-color-18:var(--graphwise-reactodia-type-color-18);--_graphwise-reactodia-type-color-19:var(--graphwise-reactodia-type-color-19);--_graphwise-reactodia-type-color-20:var(--graphwise-reactodia-type-color-20);--_graphwise-reactodia-type-color-contrast:var(--graphwise-reactodia-type-color-contrast, #fff)}graphwise-reactodia{display:block;width:100%;height:100%}graphwise-reactodia .reactodia-container{position:relative;width:100%;height:100%}graphwise-reactodia .reactodia-selection-action__link{display:none}graphwise-reactodia .reactodia-standard-element__thumbnail:not(:has(img)){background:var(--reactodia-element-style-color);border-radius:50%;color:var(--_graphwise-reactodia-type-color-contrast)}";
|
|
31887
32069
|
|
|
32070
|
+
const errorService = service(ErrorService);
|
|
31888
32071
|
const GraphwiseReactodia = class {
|
|
31889
32072
|
constructor(hostRef) {
|
|
31890
32073
|
registerInstance(this, hostRef);
|
|
32074
|
+
this.errorEmitter = createEvent(this, "graphwiseReactodiaError");
|
|
32075
|
+
this.subscriptions = new SubscriptionList();
|
|
31891
32076
|
/**
|
|
31892
32077
|
* UI language code (e.g. `en`, `fr`) for the Reactodia interface. Defaults to English.
|
|
31893
32078
|
*/
|
|
@@ -31915,6 +32100,7 @@ const GraphwiseReactodia = class {
|
|
|
31915
32100
|
this.renderGraph(true);
|
|
31916
32101
|
}
|
|
31917
32102
|
connectedCallback() {
|
|
32103
|
+
this.subscribeToErrors();
|
|
31918
32104
|
this.renderGraph();
|
|
31919
32105
|
}
|
|
31920
32106
|
componentDidLoad() {
|
|
@@ -31922,13 +32108,17 @@ const GraphwiseReactodia = class {
|
|
|
31922
32108
|
this.renderGraph();
|
|
31923
32109
|
}
|
|
31924
32110
|
disconnectedCallback() {
|
|
32111
|
+
this.subscriptions.unsubscribeAll();
|
|
31925
32112
|
if (this.reactRoot) {
|
|
31926
32113
|
unmountReactodia(this.reactRoot);
|
|
31927
32114
|
this.reactRoot = undefined;
|
|
31928
32115
|
}
|
|
31929
32116
|
}
|
|
31930
32117
|
render() {
|
|
31931
|
-
return (h(Host, { key: '
|
|
32118
|
+
return (h(Host, { key: 'a96eea05561061bbed34b5134abc44f07402211f' }));
|
|
32119
|
+
}
|
|
32120
|
+
subscribeToErrors() {
|
|
32121
|
+
this.subscriptions.add(errorService.subscribe((error) => this.errorEmitter.emit(error)));
|
|
31932
32122
|
}
|
|
31933
32123
|
renderGraph(isReloading) {
|
|
31934
32124
|
var _a;
|
|
@@ -31936,13 +32126,13 @@ const GraphwiseReactodia = class {
|
|
|
31936
32126
|
return;
|
|
31937
32127
|
}
|
|
31938
32128
|
if (!this.currentRepository) {
|
|
31939
|
-
throw
|
|
32129
|
+
throw this.reportMissingPropError('currentRepository is required');
|
|
31940
32130
|
}
|
|
31941
32131
|
if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.queryFunction)) {
|
|
31942
|
-
throw
|
|
32132
|
+
throw this.reportMissingPropError('config.queryFunction is required');
|
|
31943
32133
|
}
|
|
31944
32134
|
if (!this.providerSettings) {
|
|
31945
|
-
throw
|
|
32135
|
+
throw this.reportMissingPropError('providerSettings is required');
|
|
31946
32136
|
}
|
|
31947
32137
|
if (!this.hostElement) {
|
|
31948
32138
|
return;
|
|
@@ -31962,6 +32152,11 @@ const GraphwiseReactodia = class {
|
|
|
31962
32152
|
this.reactRoot = mountReactodia(this.hostElement, props);
|
|
31963
32153
|
}
|
|
31964
32154
|
}
|
|
32155
|
+
reportMissingPropError(message) {
|
|
32156
|
+
const error = new Error(message);
|
|
32157
|
+
errorService.report(ErrorCode.MISSING_REQUIRED_PROP, error);
|
|
32158
|
+
return error;
|
|
32159
|
+
}
|
|
31965
32160
|
get hostElement() { return getElement(this); }
|
|
31966
32161
|
static get watchers() { return {
|
|
31967
32162
|
"currentRepository": ["onCurrentRepositoryChange"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-DpCR6zMg.js';
|
|
2
|
+
export { s as setNonce } from './index-DpCR6zMg.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-CalY52z6.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -287,6 +287,21 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
|
287
287
|
return propValue;
|
|
288
288
|
};
|
|
289
289
|
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
290
|
+
|
|
291
|
+
// src/runtime/event-emitter.ts
|
|
292
|
+
var createEvent = (ref, name, flags) => {
|
|
293
|
+
const elm = getElement(ref);
|
|
294
|
+
return {
|
|
295
|
+
emit: (detail) => {
|
|
296
|
+
return emitEvent(elm, name, {
|
|
297
|
+
bubbles: true,
|
|
298
|
+
composed: true,
|
|
299
|
+
cancelable: true,
|
|
300
|
+
detail
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
};
|
|
290
305
|
var emitEvent = (elm, name, opts) => {
|
|
291
306
|
const ev = plt.ce(name, opts);
|
|
292
307
|
elm.dispatchEvent(ev);
|
|
@@ -1201,4 +1216,4 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1201
1216
|
// src/runtime/nonce.ts
|
|
1202
1217
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1203
1218
|
|
|
1204
|
-
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1219
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export { C as CLEAR_DIAGRAM_STORAGE_EVENT, E as ErrorCode } from './error-code-7lGYbTwb.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
* will clear the local store state, whenever this event is fired.
|
|
4
|
+
* Name of the DOM event the `graphwise-reactodia` element dispatches for every reported error.
|
|
4
5
|
*/
|
|
5
|
-
const
|
|
6
|
+
const GRAPHWISE_REACTODIA_ERROR_EVENT = 'graphwiseReactodiaError';
|
|
6
7
|
|
|
7
|
-
export {
|
|
8
|
+
export { GRAPHWISE_REACTODIA_ERROR_EVENT };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-DpCR6zMg.js';
|
|
2
|
+
export { s as setNonce } from './index-DpCR6zMg.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-CalY52z6.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as r}from"./p-
|
|
1
|
+
import{p as e,b as r}from"./p-DpCR6zMg.js";export{s as setNonce}from"./p-DpCR6zMg.js";import{g as t}from"./p-CalY52z6.js";(()=>{const r=import.meta.url,t={};return""!==r&&(t.resourcesUrl=new URL(".",r).href),e(t)})().then((async e=>(await t(),r([["p-ec30185a",[[0,"graphwise-reactodia",{currentRepository:[1,"current-repository"],config:[16],language:[1],providerSettings:[16,"provider-settings"],theme:[1]},null,{currentRepository:["onCurrentRepositoryChange"],language:["onLanguageOrSettingsChange"],providerSettings:["onLanguageOrSettingsChange"],theme:["onThemeChange"]}]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
export{C as CLEAR_DIAGRAM_STORAGE_EVENT,E as ErrorCode}from"./p-7lGYbTwb.js";const r="graphwiseReactodiaError";export{r as GRAPHWISE_REACTODIA_ERROR_EVENT}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a="graphwise-reactodia:clear-diagram-storage";var r;!function(a){a.MISSING_REQUIRED_PROP="missing-required-prop",a.DATA_FETCH="data-fetch",a.DIAGRAM_LOAD="diagram-load",a.DIAGRAM_IMPORT="diagram-import",a.LOCAL_DIAGRAM_READ="local-diagram-read",a.LOCAL_DIAGRAM_SAVE="local-diagram-save"}(r||(r={}));export{a as C,r as E}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},n=(e,t)=>{e.__stencil__getHostRef=()=>t,t.t=e},o=(e,t)=>(0,console.error)(e,t),l=new Map,i=new Map,s="slot-fb{display:contents}slot-fb[hidden]{display:none}",r="undefined"!=typeof window?window:{},c={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},u=e=>Promise.resolve(e),a=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),f=!1,d=[],h=[],p=(e,t)=>n=>{e.push(n),f||(f=!0,t&&4&c.o?y(v):c.raf(v))},m=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){o(e)}e.length=0},v=()=>{m(d),m(h),(f=d.length>0)&&c.raf(v)},y=e=>u().then(e),b=p(h,!0),$=e=>"object"==(e=typeof e)||"function"===e;function w(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>S,map:()=>j,ok:()=>g,unwrap:()=>k,unwrapErr:()=>O});var g=e=>({isOk:!0,isErr:!1,value:e}),S=e=>({isOk:!1,isErr:!0,value:e});function j(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>g(e))):g(n)}if(e.isErr)return S(e.value);throw"should never get here"}var k=e=>{if(e.isOk)return e.value;throw e.value},O=e=>{if(e.isErr)return e.value;throw e.value},E=(e,t,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof e&&!$(o))&&(o+=""),i&&s?r[r.length-1].i+=o:r.push(i?C(null,o):o),s=i)};c(n),t&&t.key&&(l=t.key);const u=C(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=l,u},C=(e,t)=>({o:0,m:e,i:t,v:null,h:null,u:null,p:null}),M={},P=e=>{const t=(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(e);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};P("::slotted"),P(":host"),P(":host-context");var x,D=(e,t)=>null==e||$(e)?e:1&t?e+"":e,R=e=>t(e).$hostElement$,W=(e,t)=>{const n=R(e);return{emit:e=>A(n,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},A=(e,t,n)=>{const o=c.ce(t,n);return e.dispatchEvent(o),o},N=new WeakMap,U=e=>"sc-"+e.$,H=(e,t,n,o)=>{n!==o&&t.toLowerCase()},L=(e,t)=>{const n=e&&e.u||{},o=t.u||{};for(const e of T(Object.keys(n)))e in o||H(0,e,n[e],void 0);for(const e of T(Object.keys(o)))H(0,e,n[e],o[e])};function T(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=(e,t,n)=>{const o=t.h[n];let l,i,s=0;if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(l=o.v=r.document.createElement(o.m),L(null,o),o.h)for(s=0;s<o.h.length;++s)i=z(e,o,s),i&&l.appendChild(i);return l["s-hn"]=x,l},F=(e,t,n,o,l,i)=>{let s,r=e;for(;l<=i;++l)o[l]&&(s=z(null,n,l),s&&(o[l].v=s,V(r,s,t)))},q=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.v;e&&e.remove()}}},G=(e,t,n=!1)=>e.m===t.m&&(n?(n&&!e.p&&t.p&&(e.p=t.p),!0):e.p===t.p),I=(e,t,n=!1)=>{const o=t.v=e.v,l=e.h,i=t.h;L(e,t),null!==l&&null!==i?((e,t,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=t.length-1,d=t[0],h=t[f],p=o.length-1,m=o[0],v=o[p];for(;r<=f&&c<=p;)if(null==d)d=t[++r];else if(null==h)h=t[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(G(d,m,l))I(d,m,l),d=t[++r],m=o[++c];else if(G(h,v,l))I(h,v,l),h=t[--f],v=o[--p];else if(G(d,v,l))I(d,v,l),V(e,d.v,h.v.nextSibling),d=t[++r],v=o[--p];else if(G(h,m,l))I(h,m,l),V(e,h.v,d.v),h=t[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(s=t[u],s.m!==m.m?i=z(t&&t[c],n,u):(I(s,m,l),t[u]=void 0,i=s.v),m=o[++c]):(i=z(t&&t[c],n,c),m=o[++c]),i&&V(d.v.parentNode,i,d.v)}r>f?F(e,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&q(t,r,f)})(o,l,t,i,n):null!==i?F(o,null,t,i,0,i.length-1):!n&&null!==l&&q(l,0,l.length-1)},V=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{if(t&&!e.S&&t["s-p"]){const n=t["s-p"].push(new Promise((o=>e.S=()=>{t["s-p"].splice(n-1,1),o()})))}},_=(e,t)=>{if(e.o|=16,!(4&e.o))return Y(e,e.j),b((()=>B(e,t)));e.o|=512},B=(e,t)=>{const n=e.$hostElement$,o=e.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=te(o,t?"componentWillLoad":"componentWillUpdate",void 0,n),l=J(l,(()=>te(o,"componentWillRender",void 0,n))),J(l,(()=>Q(e,o,t)))},J=(e,t)=>K(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),K=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,Q=async(e,t,n)=>{var o;const l=e.$hostElement$,u=l["s-rc"];n&&(e=>{const t=e.k;((e,t)=>{var n;const o=U(t),l=i.get(o);if(!r.document)return o;if(e=11===e.nodeType?e:r.document,l)if("string"==typeof l){let i,u=N.get(e=e.head||e);if(u||N.set(e,u=new Set),!u.has(o)){{i=r.document.createElement("style"),i.innerHTML=l;const o=null!=(n=c.O)?n:w(r.document);if(null!=o&&i.setAttribute("nonce",o),!(1&t.o))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(null==n?void 0:n.parentNode)===e?n:null)}else if("host"in e)if(a){const t=new CSSStyleSheet;t.replaceSync(l),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=l+t.innerHTML:e.prepend(i)}else e.append(i);1&t.o&&e.insertBefore(i,null)}4&t.o&&(i.innerHTML+=s),u&&u.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l])})(e.$hostElement$.getRootNode(),t)})(e);X(e,t,l,n),u&&(u.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>Z(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},X=(e,t,n,l)=>{try{t=t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{const o=e.$hostElement$,l=e.C||C(null,null),i=(e=>e&&e.m===M)(t)?t:E(null,null,t);if(x=o.tagName,n&&i.u)for(const e of Object.keys(i.u))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=o[e]);i.m=null,i.o|=4,e.C=i,i.v=l.v=o,I(l,i,n)})(e,t,l)}catch(t){o(t,e.$hostElement$)}return null},Z=e=>{const t=e.$hostElement$,n=e.t,o=e.j;te(n,"componentDidRender",void 0,t),64&e.o?te(n,"componentDidUpdate",void 0,t):(e.o|=64,ne(t),te(n,"componentDidLoad",void 0,t),e.M(t),o||ee()),e.S&&(e.S(),e.S=void 0),512&e.o&&y((()=>_(e,!1))),e.o&=-517},ee=()=>{y((()=>A(r,"appload",{detail:{namespace:"graphwise-reactodia"}})))},te=(e,t,n,l)=>{if(e&&e[t])try{return e[t](n)}catch(e){o(e,l)}},ne=e=>e.classList.add("hydrated"),oe=(e,n,l,i)=>{const s=t(e);if(!s)throw Error(`Couldn't find host element for "${i.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.P.get(n),u=s.o,a=s.t;if(l=D(l,i.D[n][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(s.P.set(n,l),a)){if(i.R&&128&u){const e=i.R[n];e&&e.map((e=>{try{a[e](l,c,n)}catch(e){o(e,r)}}))}if(2==(18&u)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(l,c,n))return;_(s,!1)}}},le=(e,n,o)=>{var l,i;const s=e.prototype;if(n.D||n.R||e.watchers){e.watchers&&!n.R&&(n.R=e.watchers);const r=Object.entries(null!=(l=n.D)?l:{});if(r.map((([e,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,e)||{};i&&(n.D[e][0]|=2048),r&&(n.D[e][0]|=4096),(1&o||!i)&&Object.defineProperty(s,e,{get(){{if(!(2048&n.D[e][0]))return((e,n)=>t(this).P.get(n))(0,e);const o=t(this),l=o?o.t:s;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,e,{set(i){const s=t(this);if(r){const t=32&l?this[e]:s.$hostElement$[e];return void 0===t&&s.P.get(e)?i=s.P.get(e):!s.P.get(e)&&t&&s.P.set(e,t),r.call(this,D(i,l)),void oe(this,e,i=32&l?this[e]:s.$hostElement$[e],n)}{if(!(1&o&&4096&n.D[e][0]))return oe(this,e,i,n),void(1&o&&!s.t&&s.W.then((()=>{4096&n.D[e][0]&&s.t[e]!==s.P.get(e)&&(s.t[e]=i)})));const t=()=>{const t=s.t[e];!s.P.get(e)&&t&&s.P.set(e,t),s.t[e]=D(i,l),oe(this,e,s.t[e],n)};s.t?t():s.W.then((()=>t()))}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(e,l,i){c.jmp((()=>{var r;const c=o.get(e);if(this.hasOwnProperty(c))i=this[c],delete this[c];else{if(s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const o=t(this),s=null==o?void 0:o.o;if(s&&!(8&s)&&128&s&&i!==l){const t=o.t,s=null==(r=n.R)?void 0:r[e];null==s||s.forEach((n=>{null!=t[n]&&t[n].call(t,i,l,e)}))}return}}const u=Object.getOwnPropertyDescriptor(s,c);(i=(null!==i||"boolean"!=typeof this[c])&&i)===this[c]||u.get&&!u.set||(this[c]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=n.R)?i:{}),...r.filter((([e,t])=>15&t[0])).map((([e,t])=>{const n=t[1]||e;return o.set(n,e),n}))]))}}return e},ie=(e,t)=>{te(e,"connectedCallback",void 0,t)},se=(e,t)=>{te(e,"disconnectedCallback",void 0,t||e)},re=(e,n={})=>{var u;if(!r.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const f=[],d=n.exclude||[],h=r.customElements,p=r.document.head,m=p.querySelector("meta[charset]"),v=r.document.createElement("style"),y=[];let b,$=!0;Object.assign(c,n),c.l=new URL(n.resourcesUrl||"./",r.document.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((n=>{var s;const r={o:n[0],$:n[1],D:n[2],A:n[3]};4&r.o&&(g=!0),r.D=n[2],r.R=null!=(s=n[4])?s:{};const u=r.$,p=class extends HTMLElement{constructor(e){super(e),this.hasRegisteredEventListeners=!1,((e,t)=>{const n={o:0,$hostElement$:e,k:t,P:new Map};n.W=new Promise((e=>n.M=e)),e["s-p"]=[],e["s-rc"]=[];const o=n;e.__stencil__getHostRef=()=>o})(e=this,r)}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),$?y.push(this):c.jmp((()=>(e=>{if(!(1&c.o)){const n=t(e),s=n.k,r=()=>{};if(1&n.o)(null==n?void 0:n.t)?ie(n.t,e):(null==n?void 0:n.W)&&n.W.then((()=>ie(n.t,e)));else{n.o|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){Y(n,n.j=t);break}}s.D&&Object.entries(s.D).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let s;if(!(32&t.o)){if(t.o|=32,n.N){const i=((e,t)=>{const n=e.$.replace(/-/g,"_"),i=e.N;if(!i)return;const s=l.get(i);return s?s[n]:import(`./${i}.entry.js`).then((e=>(l.set(i,e),e[n])),(e=>{o(e,t.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,t);if(i&&"then"in i){const e=()=>{};s=await i,e()}else s=i;if(!s)throw Error(`Constructor for "${n.$}#${t.U}" was not found`);s.isProxied||(n.R=s.watchers,le(s,n,2),s.isProxied=!0);const r=()=>{};t.o|=8;try{new s(t)}catch(t){o(t,e)}t.o&=-9,t.o|=128,r(),ie(t.t,e)}else s=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(s&&s.style){let e;"string"==typeof s.style&&(e=s.style);const t=U(n);if(!i.has(t)){const o=()=>{};((e,t,n)=>{let o=i.get(e);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,i.set(e,o)})(t,e,!!(1&n.o)),o()}}}const r=t.j,c=()=>_(t,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(e,n,s)}r()}})(this)))}disconnectedCallback(){c.jmp((()=>(async e=>{if(!(1&c.o)){const n=t(e);(null==n?void 0:n.t)?se(n.t,e):(null==n?void 0:n.W)&&n.W.then((()=>se(n.t,e)))}N.has(e)&&N.delete(e),e.shadowRoot&&N.has(e.shadowRoot)&&N.delete(e.shadowRoot)})(this))),c.raf((()=>{var e;const n=t(this),o=y.findIndex((e=>e===this));o>-1&&y.splice(o,1),(null==(e=null==n?void 0:n.C)?void 0:e.v)instanceof Node&&!n.C.v.isConnected&&delete n.C.v}))}componentOnReady(){return t(this).W}};r.N=e[0],d.includes(u)||h.get(u)||(f.push(u),h.define(u,le(p,r,1)))}))})),f.length>0&&(g&&(v.textContent+=s),v.textContent+=f.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(u=c.O)?u:w(r.document);null!=e&&v.setAttribute("nonce",e),p.insertBefore(v,m?m.nextSibling:p.firstChild)}$=!1,y.length?y.map((e=>e.connectedCallback())):c.jmp((()=>b=setTimeout(ee,30)))},ce=e=>c.O=e;export{M as H,re as b,W as c,R as g,E as h,u as p,n as r,ce as s}
|