@myparcel-dev/pdk-admin-js 2.2.7 → 2.4.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/{OrderModeOrderListItem-lkgBZYlb.js → OrderModeOrderListItem-1xm2eVpp.js} +1 -1
- package/dist/{PrintOptionsModalForm-BIGhMvHF.js → PrintOptionsModalForm-Bq0S_IxK.js} +1 -1
- package/dist/{ShipmentModeOrderListItem-C0gSveq1.js → ShipmentModeOrderListItem-BCdV7uLr.js} +1 -1
- package/dist/{ShipmentOptionsModalForm-Eq6TGCE1.js → ShipmentOptionsModalForm-DeG4dNx8.js} +1 -1
- package/dist/{ShipmentTableBox-BLkFhAGr.js → ShipmentTableBox-DaQDpXTa.js} +1 -1
- package/dist/index.js +60 -32
- package/dist/{shared-IXbJs3EW.js → shared-Cgo8b2fo.js} +2194 -2056
- package/package.json +2 -2
|
@@ -9049,6 +9049,7 @@ var BackendEndpoint = /* @__PURE__ */ function(BackendEndpoint) {
|
|
|
9049
9049
|
BackendEndpoint["PrintOrders"] = "printOrders";
|
|
9050
9050
|
BackendEndpoint["DeleteShipments"] = "deleteShipments";
|
|
9051
9051
|
BackendEndpoint["PrintShipments"] = "printShipments";
|
|
9052
|
+
BackendEndpoint["FetchLabelPdf"] = "fetchLabelPdf";
|
|
9052
9053
|
BackendEndpoint["UpdateShipments"] = "updateShipments";
|
|
9053
9054
|
BackendEndpoint["FetchShipments"] = "fetchShipments";
|
|
9054
9055
|
BackendEndpoint["ExportReturn"] = "exportReturn";
|
|
@@ -9326,55 +9327,55 @@ var toArray = (itemOrItems, separator) => {
|
|
|
9326
9327
|
};
|
|
9327
9328
|
//#endregion
|
|
9328
9329
|
//#region ../../node_modules/@myparcel-dev/constants/dist/index.js
|
|
9329
|
-
var CarrierId = /* @__PURE__ */ ((
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
return
|
|
9330
|
+
var CarrierId = /* @__PURE__ */ ((CarrierId2) => {
|
|
9331
|
+
CarrierId2[CarrierId2["PostNl"] = 1] = "PostNl";
|
|
9332
|
+
CarrierId2[CarrierId2["Bpost"] = 2] = "Bpost";
|
|
9333
|
+
CarrierId2[CarrierId2["CheapCargo"] = 3] = "CheapCargo";
|
|
9334
|
+
CarrierId2[CarrierId2["Dpd"] = 4] = "Dpd";
|
|
9335
|
+
CarrierId2[CarrierId2["Instabox"] = 5] = "Instabox";
|
|
9336
|
+
CarrierId2[CarrierId2["Dhl"] = 6] = "Dhl";
|
|
9337
|
+
CarrierId2[CarrierId2["Bol"] = 7] = "Bol";
|
|
9338
|
+
CarrierId2[CarrierId2["BolCom"] = 7] = "BolCom";
|
|
9339
|
+
CarrierId2[CarrierId2["Ups"] = 8] = "Ups";
|
|
9340
|
+
CarrierId2[CarrierId2["DhlForYou"] = 9] = "DhlForYou";
|
|
9341
|
+
CarrierId2[CarrierId2["DhlParcelConnect"] = 10] = "DhlParcelConnect";
|
|
9342
|
+
CarrierId2[CarrierId2["DhlEuroPlus"] = 11] = "DhlEuroPlus";
|
|
9343
|
+
CarrierId2[CarrierId2["UpsStandard"] = 12] = "UpsStandard";
|
|
9344
|
+
CarrierId2[CarrierId2["UpsExpressSaver"] = 13] = "UpsExpressSaver";
|
|
9345
|
+
CarrierId2[CarrierId2["Gls"] = 14] = "Gls";
|
|
9346
|
+
CarrierId2[CarrierId2["Brt"] = 15] = "Brt";
|
|
9347
|
+
CarrierId2[CarrierId2["Trunkrs"] = 16] = "Trunkrs";
|
|
9348
|
+
CarrierId2[CarrierId2["InPost"] = 17] = "InPost";
|
|
9349
|
+
return CarrierId2;
|
|
9349
9350
|
})(CarrierId || {});
|
|
9350
|
-
var CarrierName = /* @__PURE__ */ ((
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
return
|
|
9351
|
+
var CarrierName = /* @__PURE__ */ ((CarrierName2) => {
|
|
9352
|
+
CarrierName2["PostNl"] = "postnl";
|
|
9353
|
+
CarrierName2["Bpost"] = "bpost";
|
|
9354
|
+
CarrierName2["CheapCargo"] = "cheapcargo";
|
|
9355
|
+
CarrierName2["Dpd"] = "dpd";
|
|
9356
|
+
CarrierName2["Instabox"] = "instabox";
|
|
9357
|
+
CarrierName2["Dhl"] = "dhl";
|
|
9358
|
+
CarrierName2["Bol"] = "bol.com";
|
|
9359
|
+
CarrierName2["BolCom"] = "bol.com";
|
|
9360
|
+
CarrierName2["Ups"] = "ups";
|
|
9361
|
+
CarrierName2["DhlForYou"] = "dhlforyou";
|
|
9362
|
+
CarrierName2["DhlParcelConnect"] = "dhlparcelconnect";
|
|
9363
|
+
CarrierName2["DhlEuroPlus"] = "dhleuroplus";
|
|
9364
|
+
CarrierName2["UpsStandard"] = "upsstandard";
|
|
9365
|
+
CarrierName2["UpsExpressSaver"] = "upsexpresssaver";
|
|
9366
|
+
CarrierName2["Gls"] = "gls";
|
|
9367
|
+
CarrierName2["Brt"] = "brt";
|
|
9368
|
+
CarrierName2["Trunkrs"] = "trunkrs";
|
|
9369
|
+
CarrierName2["InPost"] = "inpost";
|
|
9370
|
+
return CarrierName2;
|
|
9370
9371
|
})(CarrierName || {});
|
|
9371
|
-
var DeliveryTypeName = /* @__PURE__ */ ((
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
return
|
|
9372
|
+
var DeliveryTypeName = /* @__PURE__ */ ((DeliveryTypeName2) => {
|
|
9373
|
+
DeliveryTypeName2["Morning"] = "morning";
|
|
9374
|
+
DeliveryTypeName2["Standard"] = "standard";
|
|
9375
|
+
DeliveryTypeName2["Evening"] = "evening";
|
|
9376
|
+
DeliveryTypeName2["Pickup"] = "pickup";
|
|
9377
|
+
DeliveryTypeName2["Express"] = "express";
|
|
9378
|
+
return DeliveryTypeName2;
|
|
9378
9379
|
})(DeliveryTypeName || {});
|
|
9379
9380
|
var PackageTypeName = /* @__PURE__ */ ((PackageTypeName2) => {
|
|
9380
9381
|
PackageTypeName2["Package"] = "package";
|
|
@@ -10310,2037 +10311,2037 @@ var je = { install(s, t) {
|
|
|
10310
10311
|
s._context.config.globalProperties.$formBuilder = e, t && e.setDefaults(t);
|
|
10311
10312
|
} };
|
|
10312
10313
|
//#endregion
|
|
10313
|
-
//#region
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
var LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
10320
|
-
LogLevel[LogLevel["Debug"] = 1] = "Debug";
|
|
10321
|
-
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
10322
|
-
LogLevel[LogLevel["Warn"] = 3] = "Warn";
|
|
10323
|
-
LogLevel[LogLevel["Error"] = 4] = "Error";
|
|
10324
|
-
LogLevel[LogLevel["Off"] = 5] = "Off";
|
|
10325
|
-
return LogLevel;
|
|
10326
|
-
}({});
|
|
10327
|
-
var logLevelNameMap = {
|
|
10328
|
-
[4]: "error",
|
|
10329
|
-
[3]: "warn",
|
|
10330
|
-
[2]: "info",
|
|
10331
|
-
[1]: "debug"
|
|
10332
|
-
};
|
|
10333
|
-
var backgroundColors = {
|
|
10334
|
-
[1]: "#9E9E9E",
|
|
10335
|
-
[2]: "#2196F3",
|
|
10336
|
-
[3]: "#FFB562",
|
|
10337
|
-
[4]: "#F87474"
|
|
10338
|
-
};
|
|
10339
|
-
var globalLogger = {
|
|
10340
|
-
level: 1,
|
|
10341
|
-
scope: null,
|
|
10342
|
-
log(level, ...messages) {
|
|
10343
|
-
if (level < this.level) return;
|
|
10344
|
-
const scope = this.scope ?? "PDK";
|
|
10345
|
-
if (process.env.NODE_ENV === "production") console.log(`[${scope}] ${level}`, ...messages);
|
|
10346
|
-
else {
|
|
10347
|
-
const background = this.scope ? "#002621" : "#0F5C47";
|
|
10348
|
-
const levelName = logLevelNameMap[level];
|
|
10349
|
-
let method;
|
|
10350
|
-
switch (level) {
|
|
10351
|
-
case 4:
|
|
10352
|
-
method = console.error;
|
|
10353
|
-
break;
|
|
10354
|
-
case 3:
|
|
10355
|
-
method = console.warn;
|
|
10356
|
-
break;
|
|
10357
|
-
default: method = console.log;
|
|
10358
|
-
}
|
|
10359
|
-
method(...[
|
|
10360
|
-
`%c${scope}%c${levelName?.toUpperCase()}`,
|
|
10361
|
-
[
|
|
10362
|
-
`background: ${background}`,
|
|
10363
|
-
"border-radius: 3px 0 0 3px",
|
|
10364
|
-
"padding: 2px 4px",
|
|
10365
|
-
"color: #ccc"
|
|
10366
|
-
].join(";"),
|
|
10367
|
-
[
|
|
10368
|
-
`background: ${backgroundColors[level]}`,
|
|
10369
|
-
"border-radius: 0 3px 3px 0",
|
|
10370
|
-
"padding: 2px 4px",
|
|
10371
|
-
"color: #222"
|
|
10372
|
-
].join(";"),
|
|
10373
|
-
...messages
|
|
10374
|
-
]);
|
|
10375
|
-
}
|
|
10376
|
-
},
|
|
10377
|
-
debug(...messages) {
|
|
10378
|
-
this.log(1, ...messages);
|
|
10379
|
-
},
|
|
10380
|
-
info(...messages) {
|
|
10381
|
-
this.log(2, ...messages);
|
|
10382
|
-
},
|
|
10383
|
-
warn(...messages) {
|
|
10384
|
-
this.log(3, ...messages);
|
|
10385
|
-
},
|
|
10386
|
-
error(...messages) {
|
|
10387
|
-
this.log(4, ...messages);
|
|
10388
|
-
},
|
|
10389
|
-
setScope(scope) {
|
|
10390
|
-
this.scope = scope;
|
|
10391
|
-
}
|
|
10392
|
-
};
|
|
10393
|
-
var createLogger = (scope = null, logLevel = null) => {
|
|
10394
|
-
const loggerInstance = { ...globalLogger };
|
|
10395
|
-
loggerInstance.setScope(scope);
|
|
10396
|
-
loggerInstance.level = logLevel ?? globalLogger.level;
|
|
10397
|
-
return loggerInstance;
|
|
10398
|
-
};
|
|
10399
|
-
//#endregion
|
|
10400
|
-
//#region ../../node_modules/lodash-es/_freeGlobal.js
|
|
10401
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
10402
|
-
//#endregion
|
|
10403
|
-
//#region ../../node_modules/lodash-es/_root.js
|
|
10404
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
10405
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
10406
|
-
//#endregion
|
|
10407
|
-
//#region ../../node_modules/lodash-es/_Symbol.js
|
|
10408
|
-
var Symbol$1 = root.Symbol;
|
|
10409
|
-
//#endregion
|
|
10410
|
-
//#region ../../node_modules/lodash-es/_getRawTag.js
|
|
10411
|
-
var objectProto$1 = Object.prototype;
|
|
10412
|
-
var hasOwnProperty$4 = objectProto$1.hasOwnProperty;
|
|
10413
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
10414
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
10415
|
-
function getRawTag(value) {
|
|
10416
|
-
var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
10417
|
-
try {
|
|
10418
|
-
value[symToStringTag$1] = void 0;
|
|
10419
|
-
var unmasked = true;
|
|
10420
|
-
} catch (e) {}
|
|
10421
|
-
var result = nativeObjectToString$1.call(value);
|
|
10422
|
-
if (unmasked) {
|
|
10423
|
-
if (isOwn) value[symToStringTag$1] = tag;
|
|
10424
|
-
else delete value[symToStringTag$1];
|
|
10314
|
+
//#region ../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs
|
|
10315
|
+
function set$1(target, key, val) {
|
|
10316
|
+
if (Array.isArray(target)) {
|
|
10317
|
+
target.length = Math.max(target.length, key);
|
|
10318
|
+
target.splice(key, 1, val);
|
|
10319
|
+
return val;
|
|
10425
10320
|
}
|
|
10426
|
-
|
|
10321
|
+
target[key] = val;
|
|
10322
|
+
return val;
|
|
10427
10323
|
}
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10324
|
+
function del(target, key) {
|
|
10325
|
+
if (Array.isArray(target)) {
|
|
10326
|
+
target.splice(key, 1);
|
|
10327
|
+
return;
|
|
10328
|
+
}
|
|
10329
|
+
delete target[key];
|
|
10433
10330
|
}
|
|
10434
10331
|
//#endregion
|
|
10435
|
-
//#region ../../node_modules/
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10332
|
+
//#region ../../node_modules/pinia/dist/pinia.mjs
|
|
10333
|
+
/*!
|
|
10334
|
+
* pinia v2.1.7
|
|
10335
|
+
* (c) 2023 Eduardo San Martin Morote
|
|
10336
|
+
* @license MIT
|
|
10337
|
+
*/
|
|
10338
|
+
var activePinia;
|
|
10339
|
+
var setActivePinia = (pinia) => activePinia = pinia;
|
|
10340
|
+
var piniaSymbol = process.env.NODE_ENV !== "production" ? Symbol("pinia") : /* istanbul ignore next */ Symbol();
|
|
10341
|
+
function isPlainObject(o) {
|
|
10342
|
+
return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
|
|
10442
10343
|
}
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10344
|
+
var MutationType;
|
|
10345
|
+
(function(MutationType) {
|
|
10346
|
+
MutationType["direct"] = "direct";
|
|
10347
|
+
MutationType["patchObject"] = "patch object";
|
|
10348
|
+
MutationType["patchFunction"] = "patch function";
|
|
10349
|
+
})(MutationType || (MutationType = {}));
|
|
10350
|
+
var IS_CLIENT = typeof window !== "undefined";
|
|
10351
|
+
var USE_DEVTOOLS = (process.env.NODE_ENV !== "production" || false) && !(process.env.NODE_ENV === "test") && IS_CLIENT;
|
|
10352
|
+
var _global = /*#__PURE__*/ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })();
|
|
10353
|
+
function bom(blob, { autoBom = false } = {}) {
|
|
10354
|
+
if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
|
|
10355
|
+
return blob;
|
|
10447
10356
|
}
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10357
|
+
function download(url, name, opts) {
|
|
10358
|
+
const xhr = new XMLHttpRequest();
|
|
10359
|
+
xhr.open("GET", url);
|
|
10360
|
+
xhr.responseType = "blob";
|
|
10361
|
+
xhr.onload = function() {
|
|
10362
|
+
saveAs(xhr.response, name, opts);
|
|
10363
|
+
};
|
|
10364
|
+
xhr.onerror = function() {
|
|
10365
|
+
console.error("could not download file");
|
|
10366
|
+
};
|
|
10367
|
+
xhr.send();
|
|
10453
10368
|
}
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10369
|
+
function corsEnabled(url) {
|
|
10370
|
+
const xhr = new XMLHttpRequest();
|
|
10371
|
+
xhr.open("HEAD", url, false);
|
|
10372
|
+
try {
|
|
10373
|
+
xhr.send();
|
|
10374
|
+
} catch (e) {}
|
|
10375
|
+
return xhr.status >= 200 && xhr.status <= 299;
|
|
10460
10376
|
}
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
function baseToString(value) {
|
|
10470
|
-
if (typeof value == "string") return value;
|
|
10471
|
-
if (isArray(value)) return arrayMap(value, baseToString) + "";
|
|
10472
|
-
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
10473
|
-
var result = value + "";
|
|
10474
|
-
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
10377
|
+
function click(node) {
|
|
10378
|
+
try {
|
|
10379
|
+
node.dispatchEvent(new MouseEvent("click"));
|
|
10380
|
+
} catch (e) {
|
|
10381
|
+
const evt = document.createEvent("MouseEvents");
|
|
10382
|
+
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
|
|
10383
|
+
node.dispatchEvent(evt);
|
|
10384
|
+
}
|
|
10475
10385
|
}
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10386
|
+
var _navigator = typeof navigator === "object" ? navigator : { userAgent: "" };
|
|
10387
|
+
var isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();
|
|
10388
|
+
var saveAs = !IS_CLIENT ? () => {} : typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : "msSaveOrOpenBlob" in _navigator ? msSaveAs : fileSaverSaveAs;
|
|
10389
|
+
function downloadSaveAs(blob, name = "download", opts) {
|
|
10390
|
+
const a = document.createElement("a");
|
|
10391
|
+
a.download = name;
|
|
10392
|
+
a.rel = "noopener";
|
|
10393
|
+
if (typeof blob === "string") {
|
|
10394
|
+
a.href = blob;
|
|
10395
|
+
if (a.origin !== location.origin) {
|
|
10396
|
+
if (corsEnabled(a.href)) download(blob, name, opts);
|
|
10397
|
+
else {
|
|
10398
|
+
a.target = "_blank";
|
|
10399
|
+
click(a);
|
|
10400
|
+
}
|
|
10401
|
+
} else click(a);
|
|
10402
|
+
} else {
|
|
10403
|
+
a.href = URL.createObjectURL(blob);
|
|
10404
|
+
setTimeout(function() {
|
|
10405
|
+
URL.revokeObjectURL(a.href);
|
|
10406
|
+
}, 4e4);
|
|
10407
|
+
setTimeout(function() {
|
|
10408
|
+
click(a);
|
|
10409
|
+
}, 0);
|
|
10410
|
+
}
|
|
10481
10411
|
}
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
}
|
|
10493
|
-
|
|
10494
|
-
//#region ../../node_modules/lodash-es/_coreJsData.js
|
|
10495
|
-
var coreJsData = root["__core-js_shared__"];
|
|
10496
|
-
//#endregion
|
|
10497
|
-
//#region ../../node_modules/lodash-es/_isMasked.js
|
|
10498
|
-
var maskSrcKey = function() {
|
|
10499
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
10500
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
10501
|
-
}();
|
|
10502
|
-
function isMasked(func) {
|
|
10503
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
10412
|
+
function msSaveAs(blob, name = "download", opts) {
|
|
10413
|
+
if (typeof blob === "string") {
|
|
10414
|
+
if (corsEnabled(blob)) download(blob, name, opts);
|
|
10415
|
+
else {
|
|
10416
|
+
const a = document.createElement("a");
|
|
10417
|
+
a.href = blob;
|
|
10418
|
+
a.target = "_blank";
|
|
10419
|
+
setTimeout(function() {
|
|
10420
|
+
click(a);
|
|
10421
|
+
});
|
|
10422
|
+
}
|
|
10423
|
+
} else navigator.msSaveOrOpenBlob(bom(blob, opts), name);
|
|
10504
10424
|
}
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10425
|
+
function fileSaverSaveAs(blob, name, opts, popup) {
|
|
10426
|
+
popup = popup || open("", "_blank");
|
|
10427
|
+
if (popup) popup.document.title = popup.document.body.innerText = "downloading...";
|
|
10428
|
+
if (typeof blob === "string") return download(blob, name, opts);
|
|
10429
|
+
const force = blob.type === "application/octet-stream";
|
|
10430
|
+
const isSafari = /constructor/i.test(String(_global.HTMLElement)) || "safari" in _global;
|
|
10431
|
+
const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
10432
|
+
if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
|
|
10433
|
+
const reader = new FileReader();
|
|
10434
|
+
reader.onloadend = function() {
|
|
10435
|
+
let url = reader.result;
|
|
10436
|
+
if (typeof url !== "string") {
|
|
10437
|
+
popup = null;
|
|
10438
|
+
throw new Error("Wrong reader.result type");
|
|
10439
|
+
}
|
|
10440
|
+
url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;");
|
|
10441
|
+
if (popup) popup.location.href = url;
|
|
10442
|
+
else location.assign(url);
|
|
10443
|
+
popup = null;
|
|
10444
|
+
};
|
|
10445
|
+
reader.readAsDataURL(blob);
|
|
10446
|
+
} else {
|
|
10447
|
+
const url = URL.createObjectURL(blob);
|
|
10448
|
+
if (popup) popup.location.assign(url);
|
|
10449
|
+
else location.href = url;
|
|
10450
|
+
popup = null;
|
|
10451
|
+
setTimeout(function() {
|
|
10452
|
+
URL.revokeObjectURL(url);
|
|
10453
|
+
}, 4e4);
|
|
10516
10454
|
}
|
|
10517
|
-
return "";
|
|
10518
|
-
}
|
|
10519
|
-
//#endregion
|
|
10520
|
-
//#region ../../node_modules/lodash-es/_baseIsNative.js
|
|
10521
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
10522
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
10523
|
-
var funcProto = Function.prototype;
|
|
10524
|
-
var objectProto = Object.prototype;
|
|
10525
|
-
var funcToString = funcProto.toString;
|
|
10526
|
-
var hasOwnProperty$3 = objectProto.hasOwnProperty;
|
|
10527
|
-
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
10528
|
-
function baseIsNative(value) {
|
|
10529
|
-
if (!isObject(value) || isMasked(value)) return false;
|
|
10530
|
-
return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
|
|
10531
10455
|
}
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
function
|
|
10535
|
-
|
|
10456
|
+
function toastMessage(message, type) {
|
|
10457
|
+
const piniaMessage = "🍍 " + message;
|
|
10458
|
+
if (typeof __VUE_DEVTOOLS_TOAST__ === "function") __VUE_DEVTOOLS_TOAST__(piniaMessage, type);
|
|
10459
|
+
else if (type === "error") console.error(piniaMessage);
|
|
10460
|
+
else if (type === "warn") console.warn(piniaMessage);
|
|
10461
|
+
else console.log(piniaMessage);
|
|
10536
10462
|
}
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
function getNative(object, key) {
|
|
10540
|
-
var value = getValue(object, key);
|
|
10541
|
-
return baseIsNative(value) ? value : void 0;
|
|
10463
|
+
function isPinia(o) {
|
|
10464
|
+
return "_a" in o && "install" in o;
|
|
10542
10465
|
}
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
func({}, "", {});
|
|
10549
|
-
return func;
|
|
10550
|
-
} catch (e) {}
|
|
10551
|
-
}();
|
|
10552
|
-
//#endregion
|
|
10553
|
-
//#region ../../node_modules/lodash-es/_isIndex.js
|
|
10554
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
10555
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
10556
|
-
function isIndex(value, length) {
|
|
10557
|
-
var type = typeof value;
|
|
10558
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
10559
|
-
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
10466
|
+
function checkClipboardAccess() {
|
|
10467
|
+
if (!("clipboard" in navigator)) {
|
|
10468
|
+
toastMessage(`Your browser doesn't support the Clipboard API`, "error");
|
|
10469
|
+
return true;
|
|
10470
|
+
}
|
|
10560
10471
|
}
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
"value": value,
|
|
10568
|
-
"writable": true
|
|
10569
|
-
});
|
|
10570
|
-
else object[key] = value;
|
|
10472
|
+
function checkNotFocusedError(error) {
|
|
10473
|
+
if (error instanceof Error && error.message.toLowerCase().includes("document is not focused")) {
|
|
10474
|
+
toastMessage("You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.", "warn");
|
|
10475
|
+
return true;
|
|
10476
|
+
}
|
|
10477
|
+
return false;
|
|
10571
10478
|
}
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10479
|
+
async function actionGlobalCopyState(pinia) {
|
|
10480
|
+
if (checkClipboardAccess()) return;
|
|
10481
|
+
try {
|
|
10482
|
+
await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));
|
|
10483
|
+
toastMessage("Global state copied to clipboard.");
|
|
10484
|
+
} catch (error) {
|
|
10485
|
+
if (checkNotFocusedError(error)) return;
|
|
10486
|
+
toastMessage(`Failed to serialize the state. Check the console for more details.`, "error");
|
|
10487
|
+
console.error(error);
|
|
10488
|
+
}
|
|
10576
10489
|
}
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10490
|
+
async function actionGlobalPasteState(pinia) {
|
|
10491
|
+
if (checkClipboardAccess()) return;
|
|
10492
|
+
try {
|
|
10493
|
+
loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));
|
|
10494
|
+
toastMessage("Global state pasted from clipboard.");
|
|
10495
|
+
} catch (error) {
|
|
10496
|
+
if (checkNotFocusedError(error)) return;
|
|
10497
|
+
toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, "error");
|
|
10498
|
+
console.error(error);
|
|
10499
|
+
}
|
|
10583
10500
|
}
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
|
|
10592
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
10501
|
+
async function actionGlobalSaveState(pinia) {
|
|
10502
|
+
try {
|
|
10503
|
+
saveAs(new Blob([JSON.stringify(pinia.state.value)], { type: "text/plain;charset=utf-8" }), "pinia-state.json");
|
|
10504
|
+
} catch (error) {
|
|
10505
|
+
toastMessage(`Failed to export the state as JSON. Check the console for more details.`, "error");
|
|
10506
|
+
console.error(error);
|
|
10507
|
+
}
|
|
10593
10508
|
}
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10509
|
+
var fileInput;
|
|
10510
|
+
function getFileOpener() {
|
|
10511
|
+
if (!fileInput) {
|
|
10512
|
+
fileInput = document.createElement("input");
|
|
10513
|
+
fileInput.type = "file";
|
|
10514
|
+
fileInput.accept = ".json";
|
|
10515
|
+
}
|
|
10516
|
+
function openFile() {
|
|
10517
|
+
return new Promise((resolve, reject) => {
|
|
10518
|
+
fileInput.onchange = async () => {
|
|
10519
|
+
const files = fileInput.files;
|
|
10520
|
+
if (!files) return resolve(null);
|
|
10521
|
+
const file = files.item(0);
|
|
10522
|
+
if (!file) return resolve(null);
|
|
10523
|
+
return resolve({
|
|
10524
|
+
text: await file.text(),
|
|
10525
|
+
file
|
|
10526
|
+
});
|
|
10527
|
+
};
|
|
10528
|
+
fileInput.oncancel = () => resolve(null);
|
|
10529
|
+
fileInput.onerror = reject;
|
|
10530
|
+
fileInput.click();
|
|
10531
|
+
});
|
|
10532
|
+
}
|
|
10533
|
+
return openFile;
|
|
10602
10534
|
}
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10535
|
+
async function actionGlobalOpenStateFile(pinia) {
|
|
10536
|
+
try {
|
|
10537
|
+
const result = await getFileOpener()();
|
|
10538
|
+
if (!result) return;
|
|
10539
|
+
const { text, file } = result;
|
|
10540
|
+
loadStoresState(pinia, JSON.parse(text));
|
|
10541
|
+
toastMessage(`Global state imported from "${file.name}".`);
|
|
10542
|
+
} catch (error) {
|
|
10543
|
+
toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
|
|
10544
|
+
console.error(error);
|
|
10545
|
+
}
|
|
10609
10546
|
}
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
var data = this.__data__;
|
|
10616
|
-
if (nativeCreate) {
|
|
10617
|
-
var result = data[key];
|
|
10618
|
-
return result === HASH_UNDEFINED$1 ? void 0 : result;
|
|
10547
|
+
function loadStoresState(pinia, state) {
|
|
10548
|
+
for (const key in state) {
|
|
10549
|
+
const storeState = pinia.state.value[key];
|
|
10550
|
+
if (storeState) Object.assign(storeState, state[key]);
|
|
10551
|
+
else pinia.state.value[key] = state[key];
|
|
10619
10552
|
}
|
|
10620
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
10621
10553
|
}
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
10625
|
-
function hashHas(key) {
|
|
10626
|
-
var data = this.__data__;
|
|
10627
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
10554
|
+
function formatDisplay(display) {
|
|
10555
|
+
return { _custom: { display } };
|
|
10628
10556
|
}
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
//#endregion
|
|
10639
|
-
//#region ../../node_modules/lodash-es/_Hash.js
|
|
10640
|
-
function Hash(entries) {
|
|
10641
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
10642
|
-
this.clear();
|
|
10643
|
-
while (++index < length) {
|
|
10644
|
-
var entry = entries[index];
|
|
10645
|
-
this.set(entry[0], entry[1]);
|
|
10646
|
-
}
|
|
10647
|
-
}
|
|
10648
|
-
Hash.prototype.clear = hashClear;
|
|
10649
|
-
Hash.prototype["delete"] = hashDelete;
|
|
10650
|
-
Hash.prototype.get = hashGet;
|
|
10651
|
-
Hash.prototype.has = hashHas;
|
|
10652
|
-
Hash.prototype.set = hashSet;
|
|
10653
|
-
//#endregion
|
|
10654
|
-
//#region ../../node_modules/lodash-es/_listCacheClear.js
|
|
10655
|
-
function listCacheClear() {
|
|
10656
|
-
this.__data__ = [];
|
|
10657
|
-
this.size = 0;
|
|
10658
|
-
}
|
|
10659
|
-
//#endregion
|
|
10660
|
-
//#region ../../node_modules/lodash-es/_assocIndexOf.js
|
|
10661
|
-
function assocIndexOf(array, key) {
|
|
10662
|
-
var length = array.length;
|
|
10663
|
-
while (length--) if (eq(array[length][0], key)) return length;
|
|
10664
|
-
return -1;
|
|
10665
|
-
}
|
|
10666
|
-
//#endregion
|
|
10667
|
-
//#region ../../node_modules/lodash-es/_listCacheDelete.js
|
|
10668
|
-
var splice = Array.prototype.splice;
|
|
10669
|
-
function listCacheDelete(key) {
|
|
10670
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10671
|
-
if (index < 0) return false;
|
|
10672
|
-
if (index == data.length - 1) data.pop();
|
|
10673
|
-
else splice.call(data, index, 1);
|
|
10674
|
-
--this.size;
|
|
10675
|
-
return true;
|
|
10676
|
-
}
|
|
10677
|
-
//#endregion
|
|
10678
|
-
//#region ../../node_modules/lodash-es/_listCacheGet.js
|
|
10679
|
-
function listCacheGet(key) {
|
|
10680
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10681
|
-
return index < 0 ? void 0 : data[index][1];
|
|
10682
|
-
}
|
|
10683
|
-
//#endregion
|
|
10684
|
-
//#region ../../node_modules/lodash-es/_listCacheHas.js
|
|
10685
|
-
function listCacheHas(key) {
|
|
10686
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
10687
|
-
}
|
|
10688
|
-
//#endregion
|
|
10689
|
-
//#region ../../node_modules/lodash-es/_listCacheSet.js
|
|
10690
|
-
function listCacheSet(key, value) {
|
|
10691
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10692
|
-
if (index < 0) {
|
|
10693
|
-
++this.size;
|
|
10694
|
-
data.push([key, value]);
|
|
10695
|
-
} else data[index][1] = value;
|
|
10696
|
-
return this;
|
|
10697
|
-
}
|
|
10698
|
-
//#endregion
|
|
10699
|
-
//#region ../../node_modules/lodash-es/_ListCache.js
|
|
10700
|
-
function ListCache(entries) {
|
|
10701
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
10702
|
-
this.clear();
|
|
10703
|
-
while (++index < length) {
|
|
10704
|
-
var entry = entries[index];
|
|
10705
|
-
this.set(entry[0], entry[1]);
|
|
10706
|
-
}
|
|
10707
|
-
}
|
|
10708
|
-
ListCache.prototype.clear = listCacheClear;
|
|
10709
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
10710
|
-
ListCache.prototype.get = listCacheGet;
|
|
10711
|
-
ListCache.prototype.has = listCacheHas;
|
|
10712
|
-
ListCache.prototype.set = listCacheSet;
|
|
10713
|
-
//#endregion
|
|
10714
|
-
//#region ../../node_modules/lodash-es/_Map.js
|
|
10715
|
-
var Map$1 = getNative(root, "Map");
|
|
10716
|
-
//#endregion
|
|
10717
|
-
//#region ../../node_modules/lodash-es/_mapCacheClear.js
|
|
10718
|
-
function mapCacheClear() {
|
|
10719
|
-
this.size = 0;
|
|
10720
|
-
this.__data__ = {
|
|
10721
|
-
"hash": new Hash(),
|
|
10722
|
-
"map": new (Map$1 || ListCache)(),
|
|
10723
|
-
"string": new Hash()
|
|
10557
|
+
var PINIA_ROOT_LABEL = "🍍 Pinia (root)";
|
|
10558
|
+
var PINIA_ROOT_ID = "_root";
|
|
10559
|
+
function formatStoreForInspectorTree(store) {
|
|
10560
|
+
return isPinia(store) ? {
|
|
10561
|
+
id: PINIA_ROOT_ID,
|
|
10562
|
+
label: PINIA_ROOT_LABEL
|
|
10563
|
+
} : {
|
|
10564
|
+
id: store.$id,
|
|
10565
|
+
label: store.$id
|
|
10724
10566
|
};
|
|
10725
10567
|
}
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
}
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
return getMapData(this, key).get(key);
|
|
10749
|
-
}
|
|
10750
|
-
//#endregion
|
|
10751
|
-
//#region ../../node_modules/lodash-es/_mapCacheHas.js
|
|
10752
|
-
function mapCacheHas(key) {
|
|
10753
|
-
return getMapData(this, key).has(key);
|
|
10754
|
-
}
|
|
10755
|
-
//#endregion
|
|
10756
|
-
//#region ../../node_modules/lodash-es/_mapCacheSet.js
|
|
10757
|
-
function mapCacheSet(key, value) {
|
|
10758
|
-
var data = getMapData(this, key), size = data.size;
|
|
10759
|
-
data.set(key, value);
|
|
10760
|
-
this.size += data.size == size ? 0 : 1;
|
|
10761
|
-
return this;
|
|
10762
|
-
}
|
|
10763
|
-
//#endregion
|
|
10764
|
-
//#region ../../node_modules/lodash-es/_MapCache.js
|
|
10765
|
-
function MapCache(entries) {
|
|
10766
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
10767
|
-
this.clear();
|
|
10768
|
-
while (++index < length) {
|
|
10769
|
-
var entry = entries[index];
|
|
10770
|
-
this.set(entry[0], entry[1]);
|
|
10568
|
+
function formatStoreForInspectorState(store) {
|
|
10569
|
+
if (isPinia(store)) {
|
|
10570
|
+
const storeNames = Array.from(store._s.keys());
|
|
10571
|
+
const storeMap = store._s;
|
|
10572
|
+
return {
|
|
10573
|
+
state: storeNames.map((storeId) => ({
|
|
10574
|
+
editable: true,
|
|
10575
|
+
key: storeId,
|
|
10576
|
+
value: store.state.value[storeId]
|
|
10577
|
+
})),
|
|
10578
|
+
getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {
|
|
10579
|
+
const store = storeMap.get(id);
|
|
10580
|
+
return {
|
|
10581
|
+
editable: false,
|
|
10582
|
+
key: id,
|
|
10583
|
+
value: store._getters.reduce((getters, key) => {
|
|
10584
|
+
getters[key] = store[key];
|
|
10585
|
+
return getters;
|
|
10586
|
+
}, {})
|
|
10587
|
+
};
|
|
10588
|
+
})
|
|
10589
|
+
};
|
|
10771
10590
|
}
|
|
10591
|
+
const state = { state: Object.keys(store.$state).map((key) => ({
|
|
10592
|
+
editable: true,
|
|
10593
|
+
key,
|
|
10594
|
+
value: store.$state[key]
|
|
10595
|
+
})) };
|
|
10596
|
+
if (store._getters && store._getters.length) state.getters = store._getters.map((getterName) => ({
|
|
10597
|
+
editable: false,
|
|
10598
|
+
key: getterName,
|
|
10599
|
+
value: store[getterName]
|
|
10600
|
+
}));
|
|
10601
|
+
if (store._customProperties.size) state.customProperties = Array.from(store._customProperties).map((key) => ({
|
|
10602
|
+
editable: true,
|
|
10603
|
+
key,
|
|
10604
|
+
value: store[key]
|
|
10605
|
+
}));
|
|
10606
|
+
return state;
|
|
10772
10607
|
}
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
var result = func.apply(this, args);
|
|
10787
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
10788
|
-
return result;
|
|
10789
|
-
};
|
|
10790
|
-
memoized.cache = new (memoize.Cache || MapCache)();
|
|
10791
|
-
return memoized;
|
|
10792
|
-
}
|
|
10793
|
-
memoize.Cache = MapCache;
|
|
10794
|
-
//#endregion
|
|
10795
|
-
//#region ../../node_modules/lodash-es/_memoizeCapped.js
|
|
10796
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
10797
|
-
function memoizeCapped(func) {
|
|
10798
|
-
var result = memoize(func, function(key) {
|
|
10799
|
-
if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
|
|
10800
|
-
return key;
|
|
10608
|
+
function formatEventData(events) {
|
|
10609
|
+
if (!events) return {};
|
|
10610
|
+
if (Array.isArray(events)) return events.reduce((data, event) => {
|
|
10611
|
+
data.keys.push(event.key);
|
|
10612
|
+
data.operations.push(event.type);
|
|
10613
|
+
data.oldValue[event.key] = event.oldValue;
|
|
10614
|
+
data.newValue[event.key] = event.newValue;
|
|
10615
|
+
return data;
|
|
10616
|
+
}, {
|
|
10617
|
+
oldValue: {},
|
|
10618
|
+
keys: [],
|
|
10619
|
+
operations: [],
|
|
10620
|
+
newValue: {}
|
|
10801
10621
|
});
|
|
10802
|
-
|
|
10803
|
-
|
|
10622
|
+
else return {
|
|
10623
|
+
operation: formatDisplay(events.type),
|
|
10624
|
+
key: formatDisplay(events.key),
|
|
10625
|
+
oldValue: events.oldValue,
|
|
10626
|
+
newValue: events.newValue
|
|
10627
|
+
};
|
|
10804
10628
|
}
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
10813
|
-
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
10814
|
-
});
|
|
10815
|
-
return result;
|
|
10816
|
-
});
|
|
10817
|
-
//#endregion
|
|
10818
|
-
//#region ../../node_modules/lodash-es/toString.js
|
|
10819
|
-
function toString(value) {
|
|
10820
|
-
return value == null ? "" : baseToString(value);
|
|
10629
|
+
function formatMutationType(type) {
|
|
10630
|
+
switch (type) {
|
|
10631
|
+
case MutationType.direct: return "mutation";
|
|
10632
|
+
case MutationType.patchFunction: return "$patch";
|
|
10633
|
+
case MutationType.patchObject: return "$patch";
|
|
10634
|
+
default: return "unknown";
|
|
10635
|
+
}
|
|
10821
10636
|
}
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
function
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
}
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
}
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10637
|
+
var isTimelineActive = true;
|
|
10638
|
+
var componentStateTypes = [];
|
|
10639
|
+
var MUTATIONS_LAYER_ID = "pinia:mutations";
|
|
10640
|
+
var INSPECTOR_ID = "pinia";
|
|
10641
|
+
var { assign: assign$1 } = Object;
|
|
10642
|
+
var getStoreType = (id) => "🍍 " + id;
|
|
10643
|
+
function registerPiniaDevtools(app, pinia) {
|
|
10644
|
+
setupDevtoolsPlugin({
|
|
10645
|
+
id: "dev.esm.pinia",
|
|
10646
|
+
label: "Pinia 🍍",
|
|
10647
|
+
logo: "https://pinia.vuejs.org/logo.svg",
|
|
10648
|
+
packageName: "pinia",
|
|
10649
|
+
homepage: "https://pinia.vuejs.org",
|
|
10650
|
+
componentStateTypes,
|
|
10651
|
+
app
|
|
10652
|
+
}, (api) => {
|
|
10653
|
+
if (typeof api.now !== "function") toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.");
|
|
10654
|
+
api.addTimelineLayer({
|
|
10655
|
+
id: MUTATIONS_LAYER_ID,
|
|
10656
|
+
label: `Pinia 🍍`,
|
|
10657
|
+
color: 15064968
|
|
10658
|
+
});
|
|
10659
|
+
api.addInspector({
|
|
10660
|
+
id: INSPECTOR_ID,
|
|
10661
|
+
label: "Pinia 🍍",
|
|
10662
|
+
icon: "storage",
|
|
10663
|
+
treeFilterPlaceholder: "Search stores",
|
|
10664
|
+
actions: [
|
|
10665
|
+
{
|
|
10666
|
+
icon: "content_copy",
|
|
10667
|
+
action: () => {
|
|
10668
|
+
actionGlobalCopyState(pinia);
|
|
10669
|
+
},
|
|
10670
|
+
tooltip: "Serialize and copy the state"
|
|
10671
|
+
},
|
|
10672
|
+
{
|
|
10673
|
+
icon: "content_paste",
|
|
10674
|
+
action: async () => {
|
|
10675
|
+
await actionGlobalPasteState(pinia);
|
|
10676
|
+
api.sendInspectorTree(INSPECTOR_ID);
|
|
10677
|
+
api.sendInspectorState(INSPECTOR_ID);
|
|
10678
|
+
},
|
|
10679
|
+
tooltip: "Replace the state with the content of your clipboard"
|
|
10680
|
+
},
|
|
10681
|
+
{
|
|
10682
|
+
icon: "save",
|
|
10683
|
+
action: () => {
|
|
10684
|
+
actionGlobalSaveState(pinia);
|
|
10685
|
+
},
|
|
10686
|
+
tooltip: "Save the state as a JSON file"
|
|
10687
|
+
},
|
|
10688
|
+
{
|
|
10689
|
+
icon: "folder_open",
|
|
10690
|
+
action: async () => {
|
|
10691
|
+
await actionGlobalOpenStateFile(pinia);
|
|
10692
|
+
api.sendInspectorTree(INSPECTOR_ID);
|
|
10693
|
+
api.sendInspectorState(INSPECTOR_ID);
|
|
10694
|
+
},
|
|
10695
|
+
tooltip: "Import the state from a JSON file"
|
|
10696
|
+
}
|
|
10697
|
+
],
|
|
10698
|
+
nodeActions: [{
|
|
10699
|
+
icon: "restore",
|
|
10700
|
+
tooltip: "Reset the state (with \"$reset\")",
|
|
10701
|
+
action: (nodeId) => {
|
|
10702
|
+
const store = pinia._s.get(nodeId);
|
|
10703
|
+
if (!store) toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
|
|
10704
|
+
else if (typeof store.$reset !== "function") toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
|
|
10705
|
+
else {
|
|
10706
|
+
store.$reset();
|
|
10707
|
+
toastMessage(`Store "${nodeId}" reset.`);
|
|
10708
|
+
}
|
|
10709
|
+
}
|
|
10710
|
+
}]
|
|
10711
|
+
});
|
|
10712
|
+
api.on.inspectComponent((payload, ctx) => {
|
|
10713
|
+
const proxy = payload.componentInstance && payload.componentInstance.proxy;
|
|
10714
|
+
if (proxy && proxy._pStores) {
|
|
10715
|
+
const piniaStores = payload.componentInstance.proxy._pStores;
|
|
10716
|
+
Object.values(piniaStores).forEach((store) => {
|
|
10717
|
+
payload.instanceData.state.push({
|
|
10718
|
+
type: getStoreType(store.$id),
|
|
10719
|
+
key: "state",
|
|
10720
|
+
editable: true,
|
|
10721
|
+
value: store._isOptionsAPI ? { _custom: {
|
|
10722
|
+
value: toRaw(store.$state),
|
|
10723
|
+
actions: [{
|
|
10724
|
+
icon: "restore",
|
|
10725
|
+
tooltip: "Reset the state of this store",
|
|
10726
|
+
action: () => store.$reset()
|
|
10727
|
+
}]
|
|
10728
|
+
} } : Object.keys(store.$state).reduce((state, key) => {
|
|
10729
|
+
state[key] = store.$state[key];
|
|
10730
|
+
return state;
|
|
10731
|
+
}, {})
|
|
10732
|
+
});
|
|
10733
|
+
if (store._getters && store._getters.length) payload.instanceData.state.push({
|
|
10734
|
+
type: getStoreType(store.$id),
|
|
10735
|
+
key: "getters",
|
|
10736
|
+
editable: false,
|
|
10737
|
+
value: store._getters.reduce((getters, key) => {
|
|
10738
|
+
try {
|
|
10739
|
+
getters[key] = store[key];
|
|
10740
|
+
} catch (error) {
|
|
10741
|
+
getters[key] = error;
|
|
10742
|
+
}
|
|
10743
|
+
return getters;
|
|
10744
|
+
}, {})
|
|
10745
|
+
});
|
|
10746
|
+
});
|
|
10747
|
+
}
|
|
10748
|
+
});
|
|
10749
|
+
api.on.getInspectorTree((payload) => {
|
|
10750
|
+
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
10751
|
+
let stores = [pinia];
|
|
10752
|
+
stores = stores.concat(Array.from(pinia._s.values()));
|
|
10753
|
+
payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);
|
|
10754
|
+
}
|
|
10755
|
+
});
|
|
10756
|
+
api.on.getInspectorState((payload) => {
|
|
10757
|
+
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
10758
|
+
const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
|
|
10759
|
+
if (!inspectedStore) return;
|
|
10760
|
+
if (inspectedStore) payload.state = formatStoreForInspectorState(inspectedStore);
|
|
10761
|
+
}
|
|
10762
|
+
});
|
|
10763
|
+
api.on.editInspectorState((payload, ctx) => {
|
|
10764
|
+
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
10765
|
+
const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
|
|
10766
|
+
if (!inspectedStore) return toastMessage(`store "${payload.nodeId}" not found`, "error");
|
|
10767
|
+
const { path } = payload;
|
|
10768
|
+
if (!isPinia(inspectedStore)) {
|
|
10769
|
+
if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) path.unshift("$state");
|
|
10770
|
+
} else path.unshift("state");
|
|
10771
|
+
isTimelineActive = false;
|
|
10772
|
+
payload.set(inspectedStore, path, payload.state.value);
|
|
10773
|
+
isTimelineActive = true;
|
|
10774
|
+
}
|
|
10775
|
+
});
|
|
10776
|
+
api.on.editComponentState((payload) => {
|
|
10777
|
+
if (payload.type.startsWith("🍍")) {
|
|
10778
|
+
const storeId = payload.type.replace(/^🍍\s*/, "");
|
|
10779
|
+
const store = pinia._s.get(storeId);
|
|
10780
|
+
if (!store) return toastMessage(`store "${storeId}" not found`, "error");
|
|
10781
|
+
const { path } = payload;
|
|
10782
|
+
if (path[0] !== "state") return toastMessage(`Invalid path for store "${storeId}":\n${path}\nOnly state can be modified.`);
|
|
10783
|
+
path[0] = "$state";
|
|
10784
|
+
isTimelineActive = false;
|
|
10785
|
+
payload.set(store, path, payload.state.value);
|
|
10786
|
+
isTimelineActive = true;
|
|
10787
|
+
}
|
|
10788
|
+
});
|
|
10789
|
+
});
|
|
10917
10790
|
}
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10791
|
+
function addStoreToDevtools(app, store) {
|
|
10792
|
+
if (!componentStateTypes.includes(getStoreType(store.$id))) componentStateTypes.push(getStoreType(store.$id));
|
|
10793
|
+
setupDevtoolsPlugin({
|
|
10794
|
+
id: "dev.esm.pinia",
|
|
10795
|
+
label: "Pinia 🍍",
|
|
10796
|
+
logo: "https://pinia.vuejs.org/logo.svg",
|
|
10797
|
+
packageName: "pinia",
|
|
10798
|
+
homepage: "https://pinia.vuejs.org",
|
|
10799
|
+
componentStateTypes,
|
|
10800
|
+
app,
|
|
10801
|
+
settings: { logStoreChanges: {
|
|
10802
|
+
label: "Notify about new/deleted stores",
|
|
10803
|
+
type: "boolean",
|
|
10804
|
+
defaultValue: true
|
|
10805
|
+
} }
|
|
10806
|
+
}, (api) => {
|
|
10807
|
+
const now = typeof api.now === "function" ? api.now.bind(api) : Date.now;
|
|
10808
|
+
store.$onAction(({ after, onError, name, args }) => {
|
|
10809
|
+
const groupId = runningActionId++;
|
|
10810
|
+
api.addTimelineEvent({
|
|
10811
|
+
layerId: MUTATIONS_LAYER_ID,
|
|
10812
|
+
event: {
|
|
10813
|
+
time: now(),
|
|
10814
|
+
title: "🛫 " + name,
|
|
10815
|
+
subtitle: "start",
|
|
10816
|
+
data: {
|
|
10817
|
+
store: formatDisplay(store.$id),
|
|
10818
|
+
action: formatDisplay(name),
|
|
10819
|
+
args
|
|
10820
|
+
},
|
|
10821
|
+
groupId
|
|
10822
|
+
}
|
|
10823
|
+
});
|
|
10824
|
+
after((result) => {
|
|
10825
|
+
activeAction = void 0;
|
|
10826
|
+
api.addTimelineEvent({
|
|
10827
|
+
layerId: MUTATIONS_LAYER_ID,
|
|
10828
|
+
event: {
|
|
10829
|
+
time: now(),
|
|
10830
|
+
title: "🛬 " + name,
|
|
10831
|
+
subtitle: "end",
|
|
10832
|
+
data: {
|
|
10833
|
+
store: formatDisplay(store.$id),
|
|
10834
|
+
action: formatDisplay(name),
|
|
10835
|
+
args,
|
|
10836
|
+
result
|
|
10837
|
+
},
|
|
10838
|
+
groupId
|
|
10839
|
+
}
|
|
10840
|
+
});
|
|
10841
|
+
});
|
|
10842
|
+
onError((error) => {
|
|
10843
|
+
activeAction = void 0;
|
|
10844
|
+
api.addTimelineEvent({
|
|
10845
|
+
layerId: MUTATIONS_LAYER_ID,
|
|
10846
|
+
event: {
|
|
10847
|
+
time: now(),
|
|
10848
|
+
logType: "error",
|
|
10849
|
+
title: "💥 " + name,
|
|
10850
|
+
subtitle: "end",
|
|
10851
|
+
data: {
|
|
10852
|
+
store: formatDisplay(store.$id),
|
|
10853
|
+
action: formatDisplay(name),
|
|
10854
|
+
args,
|
|
10855
|
+
error
|
|
10856
|
+
},
|
|
10857
|
+
groupId
|
|
10858
|
+
}
|
|
10859
|
+
});
|
|
10860
|
+
});
|
|
10861
|
+
}, true);
|
|
10862
|
+
store._customProperties.forEach((name) => {
|
|
10863
|
+
watch(() => unref(store[name]), (newValue, oldValue) => {
|
|
10864
|
+
api.notifyComponentUpdate();
|
|
10865
|
+
api.sendInspectorState(INSPECTOR_ID);
|
|
10866
|
+
if (isTimelineActive) api.addTimelineEvent({
|
|
10867
|
+
layerId: MUTATIONS_LAYER_ID,
|
|
10868
|
+
event: {
|
|
10869
|
+
time: now(),
|
|
10870
|
+
title: "Change",
|
|
10871
|
+
subtitle: name,
|
|
10872
|
+
data: {
|
|
10873
|
+
newValue,
|
|
10874
|
+
oldValue
|
|
10875
|
+
},
|
|
10876
|
+
groupId: activeAction
|
|
10877
|
+
}
|
|
10878
|
+
});
|
|
10879
|
+
}, { deep: true });
|
|
10880
|
+
});
|
|
10881
|
+
store.$subscribe(({ events, type }, state) => {
|
|
10882
|
+
api.notifyComponentUpdate();
|
|
10883
|
+
api.sendInspectorState(INSPECTOR_ID);
|
|
10884
|
+
if (!isTimelineActive) return;
|
|
10885
|
+
const eventData = {
|
|
10886
|
+
time: now(),
|
|
10887
|
+
title: formatMutationType(type),
|
|
10888
|
+
data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),
|
|
10889
|
+
groupId: activeAction
|
|
10890
|
+
};
|
|
10891
|
+
if (type === MutationType.patchFunction) eventData.subtitle = "⤵️";
|
|
10892
|
+
else if (type === MutationType.patchObject) eventData.subtitle = "🧩";
|
|
10893
|
+
else if (events && !Array.isArray(events)) eventData.subtitle = events.type;
|
|
10894
|
+
if (events) eventData.data["rawEvent(s)"] = { _custom: {
|
|
10895
|
+
display: "DebuggerEvent",
|
|
10896
|
+
type: "object",
|
|
10897
|
+
tooltip: "raw DebuggerEvent[]",
|
|
10898
|
+
value: events
|
|
10899
|
+
} };
|
|
10900
|
+
api.addTimelineEvent({
|
|
10901
|
+
layerId: MUTATIONS_LAYER_ID,
|
|
10902
|
+
event: eventData
|
|
10903
|
+
});
|
|
10904
|
+
}, {
|
|
10905
|
+
detached: true,
|
|
10906
|
+
flush: "sync"
|
|
10907
|
+
});
|
|
10908
|
+
const hotUpdate = store._hotUpdate;
|
|
10909
|
+
store._hotUpdate = markRaw((newStore) => {
|
|
10910
|
+
hotUpdate(newStore);
|
|
10911
|
+
api.addTimelineEvent({
|
|
10912
|
+
layerId: MUTATIONS_LAYER_ID,
|
|
10913
|
+
event: {
|
|
10914
|
+
time: now(),
|
|
10915
|
+
title: "🔥 " + store.$id,
|
|
10916
|
+
subtitle: "HMR update",
|
|
10917
|
+
data: {
|
|
10918
|
+
store: formatDisplay(store.$id),
|
|
10919
|
+
info: formatDisplay(`HMR update`)
|
|
10920
|
+
}
|
|
10921
|
+
}
|
|
10922
|
+
});
|
|
10923
|
+
api.notifyComponentUpdate();
|
|
10924
|
+
api.sendInspectorTree(INSPECTOR_ID);
|
|
10925
|
+
api.sendInspectorState(INSPECTOR_ID);
|
|
10926
|
+
});
|
|
10927
|
+
const { $dispose } = store;
|
|
10928
|
+
store.$dispose = () => {
|
|
10929
|
+
$dispose();
|
|
10930
|
+
api.notifyComponentUpdate();
|
|
10931
|
+
api.sendInspectorTree(INSPECTOR_ID);
|
|
10932
|
+
api.sendInspectorState(INSPECTOR_ID);
|
|
10933
|
+
api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`);
|
|
10934
|
+
};
|
|
10935
|
+
api.notifyComponentUpdate();
|
|
10936
|
+
api.sendInspectorTree(INSPECTOR_ID);
|
|
10937
|
+
api.sendInspectorState(INSPECTOR_ID);
|
|
10938
|
+
api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`);
|
|
10939
|
+
});
|
|
10940
|
+
}
|
|
10941
|
+
var runningActionId = 0;
|
|
10942
|
+
var activeAction;
|
|
10943
|
+
function patchActionForGrouping(store, actionNames, wrapWithProxy) {
|
|
10944
|
+
const actions = actionNames.reduce((storeActions, actionName) => {
|
|
10945
|
+
storeActions[actionName] = toRaw(store)[actionName];
|
|
10946
|
+
return storeActions;
|
|
10947
|
+
}, {});
|
|
10948
|
+
for (const actionName in actions) store[actionName] = function() {
|
|
10949
|
+
const _actionId = runningActionId;
|
|
10950
|
+
const trackedStore = wrapWithProxy ? new Proxy(store, {
|
|
10951
|
+
get(...args) {
|
|
10952
|
+
activeAction = _actionId;
|
|
10953
|
+
return Reflect.get(...args);
|
|
10954
|
+
},
|
|
10955
|
+
set(...args) {
|
|
10956
|
+
activeAction = _actionId;
|
|
10957
|
+
return Reflect.set(...args);
|
|
10958
|
+
}
|
|
10959
|
+
}) : store;
|
|
10960
|
+
activeAction = _actionId;
|
|
10961
|
+
const retValue = actions[actionName].apply(trackedStore, arguments);
|
|
10962
|
+
activeAction = void 0;
|
|
10963
|
+
return retValue;
|
|
10927
10964
|
};
|
|
10928
10965
|
}
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10966
|
+
function devtoolsPlugin({ app, store, options }) {
|
|
10967
|
+
if (store.$id.startsWith("__hot:")) return;
|
|
10968
|
+
store._isOptionsAPI = !!options.state;
|
|
10969
|
+
patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);
|
|
10970
|
+
const originalHotUpdate = store._hotUpdate;
|
|
10971
|
+
toRaw(store)._hotUpdate = function(newStore) {
|
|
10972
|
+
originalHotUpdate.apply(this, arguments);
|
|
10973
|
+
patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);
|
|
10974
|
+
};
|
|
10975
|
+
addStoreToDevtools(app, store);
|
|
10939
10976
|
}
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10977
|
+
function createPinia() {
|
|
10978
|
+
const scope = effectScope(true);
|
|
10979
|
+
const state = scope.run(() => ref({}));
|
|
10980
|
+
let _p = [];
|
|
10981
|
+
let toBeInstalled = [];
|
|
10982
|
+
const pinia = markRaw({
|
|
10983
|
+
install(app) {
|
|
10984
|
+
setActivePinia(pinia);
|
|
10985
|
+
pinia._a = app;
|
|
10986
|
+
app.provide(piniaSymbol, pinia);
|
|
10987
|
+
app.config.globalProperties.$pinia = pinia;
|
|
10988
|
+
/* istanbul ignore else */
|
|
10989
|
+
if (USE_DEVTOOLS) registerPiniaDevtools(app, pinia);
|
|
10990
|
+
toBeInstalled.forEach((plugin) => _p.push(plugin));
|
|
10991
|
+
toBeInstalled = [];
|
|
10992
|
+
},
|
|
10993
|
+
use(plugin) {
|
|
10994
|
+
if (!this._a && true) toBeInstalled.push(plugin);
|
|
10995
|
+
else _p.push(plugin);
|
|
10996
|
+
return this;
|
|
10997
|
+
},
|
|
10998
|
+
_p,
|
|
10999
|
+
_a: null,
|
|
11000
|
+
_e: scope,
|
|
11001
|
+
_s: /* @__PURE__ */ new Map(),
|
|
11002
|
+
state
|
|
11003
|
+
});
|
|
11004
|
+
if (USE_DEVTOOLS && typeof Proxy !== "undefined") pinia.use(devtoolsPlugin);
|
|
11005
|
+
return pinia;
|
|
11006
|
+
}
|
|
11007
|
+
function patchObject(newState, oldState) {
|
|
11008
|
+
for (const key in oldState) {
|
|
11009
|
+
const subPatch = oldState[key];
|
|
11010
|
+
if (!(key in newState)) continue;
|
|
11011
|
+
const targetValue = newState[key];
|
|
11012
|
+
if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) newState[key] = patchObject(targetValue, subPatch);
|
|
11013
|
+
else newState[key] = subPatch;
|
|
11014
|
+
}
|
|
11015
|
+
return newState;
|
|
11016
|
+
}
|
|
11017
|
+
var noop = () => {};
|
|
11018
|
+
function addSubscription(subscriptions, callback, detached, onCleanup = noop) {
|
|
11019
|
+
subscriptions.push(callback);
|
|
11020
|
+
const removeSubscription = () => {
|
|
11021
|
+
const idx = subscriptions.indexOf(callback);
|
|
11022
|
+
if (idx > -1) {
|
|
11023
|
+
subscriptions.splice(idx, 1);
|
|
11024
|
+
onCleanup();
|
|
11025
|
+
}
|
|
10945
11026
|
};
|
|
11027
|
+
if (!detached && getCurrentScope()) onScopeDispose(removeSubscription);
|
|
11028
|
+
return removeSubscription;
|
|
10946
11029
|
}
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
"Á": "A",
|
|
10952
|
-
"Â": "A",
|
|
10953
|
-
"Ã": "A",
|
|
10954
|
-
"Ä": "A",
|
|
10955
|
-
"Å": "A",
|
|
10956
|
-
"à": "a",
|
|
10957
|
-
"á": "a",
|
|
10958
|
-
"â": "a",
|
|
10959
|
-
"ã": "a",
|
|
10960
|
-
"ä": "a",
|
|
10961
|
-
"å": "a",
|
|
10962
|
-
"Ç": "C",
|
|
10963
|
-
"ç": "c",
|
|
10964
|
-
"Ð": "D",
|
|
10965
|
-
"ð": "d",
|
|
10966
|
-
"È": "E",
|
|
10967
|
-
"É": "E",
|
|
10968
|
-
"Ê": "E",
|
|
10969
|
-
"Ë": "E",
|
|
10970
|
-
"è": "e",
|
|
10971
|
-
"é": "e",
|
|
10972
|
-
"ê": "e",
|
|
10973
|
-
"ë": "e",
|
|
10974
|
-
"Ì": "I",
|
|
10975
|
-
"Í": "I",
|
|
10976
|
-
"Î": "I",
|
|
10977
|
-
"Ï": "I",
|
|
10978
|
-
"ì": "i",
|
|
10979
|
-
"í": "i",
|
|
10980
|
-
"î": "i",
|
|
10981
|
-
"ï": "i",
|
|
10982
|
-
"Ñ": "N",
|
|
10983
|
-
"ñ": "n",
|
|
10984
|
-
"Ò": "O",
|
|
10985
|
-
"Ó": "O",
|
|
10986
|
-
"Ô": "O",
|
|
10987
|
-
"Õ": "O",
|
|
10988
|
-
"Ö": "O",
|
|
10989
|
-
"Ø": "O",
|
|
10990
|
-
"ò": "o",
|
|
10991
|
-
"ó": "o",
|
|
10992
|
-
"ô": "o",
|
|
10993
|
-
"õ": "o",
|
|
10994
|
-
"ö": "o",
|
|
10995
|
-
"ø": "o",
|
|
10996
|
-
"Ù": "U",
|
|
10997
|
-
"Ú": "U",
|
|
10998
|
-
"Û": "U",
|
|
10999
|
-
"Ü": "U",
|
|
11000
|
-
"ù": "u",
|
|
11001
|
-
"ú": "u",
|
|
11002
|
-
"û": "u",
|
|
11003
|
-
"ü": "u",
|
|
11004
|
-
"Ý": "Y",
|
|
11005
|
-
"ý": "y",
|
|
11006
|
-
"ÿ": "y",
|
|
11007
|
-
"Æ": "Ae",
|
|
11008
|
-
"æ": "ae",
|
|
11009
|
-
"Þ": "Th",
|
|
11010
|
-
"þ": "th",
|
|
11011
|
-
"ß": "ss",
|
|
11012
|
-
"Ā": "A",
|
|
11013
|
-
"Ă": "A",
|
|
11014
|
-
"Ą": "A",
|
|
11015
|
-
"ā": "a",
|
|
11016
|
-
"ă": "a",
|
|
11017
|
-
"ą": "a",
|
|
11018
|
-
"Ć": "C",
|
|
11019
|
-
"Ĉ": "C",
|
|
11020
|
-
"Ċ": "C",
|
|
11021
|
-
"Č": "C",
|
|
11022
|
-
"ć": "c",
|
|
11023
|
-
"ĉ": "c",
|
|
11024
|
-
"ċ": "c",
|
|
11025
|
-
"č": "c",
|
|
11026
|
-
"Ď": "D",
|
|
11027
|
-
"Đ": "D",
|
|
11028
|
-
"ď": "d",
|
|
11029
|
-
"đ": "d",
|
|
11030
|
-
"Ē": "E",
|
|
11031
|
-
"Ĕ": "E",
|
|
11032
|
-
"Ė": "E",
|
|
11033
|
-
"Ę": "E",
|
|
11034
|
-
"Ě": "E",
|
|
11035
|
-
"ē": "e",
|
|
11036
|
-
"ĕ": "e",
|
|
11037
|
-
"ė": "e",
|
|
11038
|
-
"ę": "e",
|
|
11039
|
-
"ě": "e",
|
|
11040
|
-
"Ĝ": "G",
|
|
11041
|
-
"Ğ": "G",
|
|
11042
|
-
"Ġ": "G",
|
|
11043
|
-
"Ģ": "G",
|
|
11044
|
-
"ĝ": "g",
|
|
11045
|
-
"ğ": "g",
|
|
11046
|
-
"ġ": "g",
|
|
11047
|
-
"ģ": "g",
|
|
11048
|
-
"Ĥ": "H",
|
|
11049
|
-
"Ħ": "H",
|
|
11050
|
-
"ĥ": "h",
|
|
11051
|
-
"ħ": "h",
|
|
11052
|
-
"Ĩ": "I",
|
|
11053
|
-
"Ī": "I",
|
|
11054
|
-
"Ĭ": "I",
|
|
11055
|
-
"Į": "I",
|
|
11056
|
-
"İ": "I",
|
|
11057
|
-
"ĩ": "i",
|
|
11058
|
-
"ī": "i",
|
|
11059
|
-
"ĭ": "i",
|
|
11060
|
-
"į": "i",
|
|
11061
|
-
"ı": "i",
|
|
11062
|
-
"Ĵ": "J",
|
|
11063
|
-
"ĵ": "j",
|
|
11064
|
-
"Ķ": "K",
|
|
11065
|
-
"ķ": "k",
|
|
11066
|
-
"ĸ": "k",
|
|
11067
|
-
"Ĺ": "L",
|
|
11068
|
-
"Ļ": "L",
|
|
11069
|
-
"Ľ": "L",
|
|
11070
|
-
"Ŀ": "L",
|
|
11071
|
-
"Ł": "L",
|
|
11072
|
-
"ĺ": "l",
|
|
11073
|
-
"ļ": "l",
|
|
11074
|
-
"ľ": "l",
|
|
11075
|
-
"ŀ": "l",
|
|
11076
|
-
"ł": "l",
|
|
11077
|
-
"Ń": "N",
|
|
11078
|
-
"Ņ": "N",
|
|
11079
|
-
"Ň": "N",
|
|
11080
|
-
"Ŋ": "N",
|
|
11081
|
-
"ń": "n",
|
|
11082
|
-
"ņ": "n",
|
|
11083
|
-
"ň": "n",
|
|
11084
|
-
"ŋ": "n",
|
|
11085
|
-
"Ō": "O",
|
|
11086
|
-
"Ŏ": "O",
|
|
11087
|
-
"Ő": "O",
|
|
11088
|
-
"ō": "o",
|
|
11089
|
-
"ŏ": "o",
|
|
11090
|
-
"ő": "o",
|
|
11091
|
-
"Ŕ": "R",
|
|
11092
|
-
"Ŗ": "R",
|
|
11093
|
-
"Ř": "R",
|
|
11094
|
-
"ŕ": "r",
|
|
11095
|
-
"ŗ": "r",
|
|
11096
|
-
"ř": "r",
|
|
11097
|
-
"Ś": "S",
|
|
11098
|
-
"Ŝ": "S",
|
|
11099
|
-
"Ş": "S",
|
|
11100
|
-
"Š": "S",
|
|
11101
|
-
"ś": "s",
|
|
11102
|
-
"ŝ": "s",
|
|
11103
|
-
"ş": "s",
|
|
11104
|
-
"š": "s",
|
|
11105
|
-
"Ţ": "T",
|
|
11106
|
-
"Ť": "T",
|
|
11107
|
-
"Ŧ": "T",
|
|
11108
|
-
"ţ": "t",
|
|
11109
|
-
"ť": "t",
|
|
11110
|
-
"ŧ": "t",
|
|
11111
|
-
"Ũ": "U",
|
|
11112
|
-
"Ū": "U",
|
|
11113
|
-
"Ŭ": "U",
|
|
11114
|
-
"Ů": "U",
|
|
11115
|
-
"Ű": "U",
|
|
11116
|
-
"Ų": "U",
|
|
11117
|
-
"ũ": "u",
|
|
11118
|
-
"ū": "u",
|
|
11119
|
-
"ŭ": "u",
|
|
11120
|
-
"ů": "u",
|
|
11121
|
-
"ű": "u",
|
|
11122
|
-
"ų": "u",
|
|
11123
|
-
"Ŵ": "W",
|
|
11124
|
-
"ŵ": "w",
|
|
11125
|
-
"Ŷ": "Y",
|
|
11126
|
-
"ŷ": "y",
|
|
11127
|
-
"Ÿ": "Y",
|
|
11128
|
-
"Ź": "Z",
|
|
11129
|
-
"Ż": "Z",
|
|
11130
|
-
"Ž": "Z",
|
|
11131
|
-
"ź": "z",
|
|
11132
|
-
"ż": "z",
|
|
11133
|
-
"ž": "z",
|
|
11134
|
-
"IJ": "IJ",
|
|
11135
|
-
"ij": "ij",
|
|
11136
|
-
"Œ": "Oe",
|
|
11137
|
-
"œ": "oe",
|
|
11138
|
-
"ʼn": "'n",
|
|
11139
|
-
"ſ": "s"
|
|
11140
|
-
});
|
|
11141
|
-
//#endregion
|
|
11142
|
-
//#region ../../node_modules/lodash-es/deburr.js
|
|
11143
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
11144
|
-
var reComboMark = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
11145
|
-
function deburr(string) {
|
|
11146
|
-
string = toString(string);
|
|
11147
|
-
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
11030
|
+
function triggerSubscriptions(subscriptions, ...args) {
|
|
11031
|
+
subscriptions.slice().forEach((callback) => {
|
|
11032
|
+
callback(...args);
|
|
11033
|
+
});
|
|
11148
11034
|
}
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11035
|
+
var fallbackRunWithContext = (fn) => fn();
|
|
11036
|
+
function mergeReactiveObjects(target, patchToApply) {
|
|
11037
|
+
if (target instanceof Map && patchToApply instanceof Map) patchToApply.forEach((value, key) => target.set(key, value));
|
|
11038
|
+
if (target instanceof Set && patchToApply instanceof Set) patchToApply.forEach(target.add, target);
|
|
11039
|
+
for (const key in patchToApply) {
|
|
11040
|
+
if (!patchToApply.hasOwnProperty(key)) continue;
|
|
11041
|
+
const subPatch = patchToApply[key];
|
|
11042
|
+
const targetValue = target[key];
|
|
11043
|
+
if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) target[key] = mergeReactiveObjects(targetValue, subPatch);
|
|
11044
|
+
else target[key] = subPatch;
|
|
11045
|
+
}
|
|
11046
|
+
return target;
|
|
11154
11047
|
}
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
function hasUnicodeWord(string) {
|
|
11159
|
-
return reHasUnicodeWord.test(string);
|
|
11048
|
+
var skipHydrateSymbol = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : /* istanbul ignore next */ Symbol();
|
|
11049
|
+
function shouldHydrate(obj) {
|
|
11050
|
+
return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
|
|
11160
11051
|
}
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
var rsComboRange = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff";
|
|
11165
|
-
var rsDingbatRange = "\\u2700-\\u27bf";
|
|
11166
|
-
var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
|
|
11167
|
-
var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
|
|
11168
|
-
var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
|
|
11169
|
-
var rsPunctuationRange = "\\u2000-\\u206f";
|
|
11170
|
-
var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
|
|
11171
|
-
var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
|
|
11172
|
-
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
11173
|
-
var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
11174
|
-
var rsApos = "['’]";
|
|
11175
|
-
var rsBreak = "[" + rsBreakRange + "]";
|
|
11176
|
-
var rsCombo = "[" + rsComboRange + "]";
|
|
11177
|
-
var rsDigits = "\\d+";
|
|
11178
|
-
var rsDingbat = "[" + rsDingbatRange + "]";
|
|
11179
|
-
var rsLower = "[" + rsLowerRange + "]";
|
|
11180
|
-
var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
|
|
11181
|
-
var rsModifier = "(?:" + rsCombo + "|\\ud83c[\\udffb-\\udfff])";
|
|
11182
|
-
var rsNonAstral = "[^" + rsAstralRange + "]";
|
|
11183
|
-
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
11184
|
-
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
11185
|
-
var rsUpper = "[" + rsUpperRange + "]";
|
|
11186
|
-
var rsZWJ = "\\u200d";
|
|
11187
|
-
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
11188
|
-
var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
11189
|
-
var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
11190
|
-
var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
11191
|
-
var reOptMod = rsModifier + "?";
|
|
11192
|
-
var rsOptVar = "[" + rsVarRange + "]?";
|
|
11193
|
-
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [
|
|
11194
|
-
rsNonAstral,
|
|
11195
|
-
rsRegional,
|
|
11196
|
-
rsSurrPair
|
|
11197
|
-
].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
11198
|
-
var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
|
|
11199
|
-
var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
|
|
11200
|
-
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
11201
|
-
var rsEmoji = "(?:" + [
|
|
11202
|
-
rsDingbat,
|
|
11203
|
-
rsRegional,
|
|
11204
|
-
rsSurrPair
|
|
11205
|
-
].join("|") + ")" + rsSeq;
|
|
11206
|
-
var reUnicodeWord = RegExp([
|
|
11207
|
-
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [
|
|
11208
|
-
rsBreak,
|
|
11209
|
-
rsUpper,
|
|
11210
|
-
"$"
|
|
11211
|
-
].join("|") + ")",
|
|
11212
|
-
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [
|
|
11213
|
-
rsBreak,
|
|
11214
|
-
rsUpper + rsMiscLower,
|
|
11215
|
-
"$"
|
|
11216
|
-
].join("|") + ")",
|
|
11217
|
-
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
|
11218
|
-
rsUpper + "+" + rsOptContrUpper,
|
|
11219
|
-
rsOrdUpper,
|
|
11220
|
-
rsOrdLower,
|
|
11221
|
-
rsDigits,
|
|
11222
|
-
rsEmoji
|
|
11223
|
-
].join("|"), "g");
|
|
11224
|
-
function unicodeWords(string) {
|
|
11225
|
-
return string.match(reUnicodeWord) || [];
|
|
11052
|
+
var { assign } = Object;
|
|
11053
|
+
function isComputed(o) {
|
|
11054
|
+
return !!(isRef(o) && o.effect);
|
|
11226
11055
|
}
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11056
|
+
function createOptionsStore(id, options, pinia, hot) {
|
|
11057
|
+
const { state, actions, getters } = options;
|
|
11058
|
+
const initialState = pinia.state.value[id];
|
|
11059
|
+
let store;
|
|
11060
|
+
function setup() {
|
|
11061
|
+
if (!initialState && (!(process.env.NODE_ENV !== "production") || !hot)) pinia.state.value[id] = state ? state() : {};
|
|
11062
|
+
const localState = process.env.NODE_ENV !== "production" && hot ? toRefs(ref(state ? state() : {}).value) : toRefs(pinia.state.value[id]);
|
|
11063
|
+
return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
|
|
11064
|
+
if (process.env.NODE_ENV !== "production" && name in localState) console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
|
|
11065
|
+
computedGetters[name] = markRaw(computed(() => {
|
|
11066
|
+
setActivePinia(pinia);
|
|
11067
|
+
const store = pinia._s.get(id);
|
|
11068
|
+
return getters[name].call(store, store);
|
|
11069
|
+
}));
|
|
11070
|
+
return computedGetters;
|
|
11071
|
+
}, {}));
|
|
11072
|
+
}
|
|
11073
|
+
store = createSetupStore(id, setup, options, pinia, hot, true);
|
|
11074
|
+
return store;
|
|
11234
11075
|
}
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11076
|
+
function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
|
|
11077
|
+
let scope;
|
|
11078
|
+
const optionsForPlugin = assign({ actions: {} }, options);
|
|
11079
|
+
/* istanbul ignore if */
|
|
11080
|
+
if (process.env.NODE_ENV !== "production" && !pinia._e.active) throw new Error("Pinia destroyed");
|
|
11081
|
+
const $subscribeOptions = { deep: true };
|
|
11082
|
+
/* istanbul ignore else */
|
|
11083
|
+
if (process.env.NODE_ENV !== "production" && true) $subscribeOptions.onTrigger = (event) => {
|
|
11084
|
+
/* istanbul ignore else */
|
|
11085
|
+
if (isListening) debuggerEvents = event;
|
|
11086
|
+
else if (isListening == false && !store._hotUpdating) {
|
|
11087
|
+
/* istanbul ignore else */
|
|
11088
|
+
if (Array.isArray(debuggerEvents)) debuggerEvents.push(event);
|
|
11089
|
+
else console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.");
|
|
11090
|
+
}
|
|
11241
11091
|
};
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11092
|
+
let isListening;
|
|
11093
|
+
let isSyncListening;
|
|
11094
|
+
let subscriptions = [];
|
|
11095
|
+
let actionSubscriptions = [];
|
|
11096
|
+
let debuggerEvents;
|
|
11097
|
+
const initialState = pinia.state.value[$id];
|
|
11098
|
+
if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== "production") || !hot)) pinia.state.value[$id] = {};
|
|
11099
|
+
const hotState = ref({});
|
|
11100
|
+
let activeListener;
|
|
11101
|
+
function $patch(partialStateOrMutator) {
|
|
11102
|
+
let subscriptionMutation;
|
|
11103
|
+
isListening = isSyncListening = false;
|
|
11104
|
+
/* istanbul ignore else */
|
|
11105
|
+
if (process.env.NODE_ENV !== "production") debuggerEvents = [];
|
|
11106
|
+
if (typeof partialStateOrMutator === "function") {
|
|
11107
|
+
partialStateOrMutator(pinia.state.value[$id]);
|
|
11108
|
+
subscriptionMutation = {
|
|
11109
|
+
type: MutationType.patchFunction,
|
|
11110
|
+
storeId: $id,
|
|
11111
|
+
events: debuggerEvents
|
|
11112
|
+
};
|
|
11113
|
+
} else {
|
|
11114
|
+
mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
|
|
11115
|
+
subscriptionMutation = {
|
|
11116
|
+
type: MutationType.patchObject,
|
|
11117
|
+
payload: partialStateOrMutator,
|
|
11118
|
+
storeId: $id,
|
|
11119
|
+
events: debuggerEvents
|
|
11120
|
+
};
|
|
11256
11121
|
}
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
//#region ../../node_modules/lodash-es/set.js
|
|
11264
|
-
function set$1(object, path, value) {
|
|
11265
|
-
return object == null ? object : baseSet(object, path, value);
|
|
11266
|
-
}
|
|
11267
|
-
//#endregion
|
|
11268
|
-
//#region ../../node_modules/lodash-es/snakeCase.js
|
|
11269
|
-
var snakeCase = createCompounder(function(result, word, index) {
|
|
11270
|
-
return result + (index ? "_" : "") + word.toLowerCase();
|
|
11271
|
-
});
|
|
11272
|
-
//#endregion
|
|
11273
|
-
//#region ../admin/src/stores/createQueryCacheKey.ts
|
|
11274
|
-
var createQueryCacheKey = (endpoint, modifier) => {
|
|
11275
|
-
return modifier ? `${endpoint}.${modifier}` : endpoint;
|
|
11276
|
-
};
|
|
11277
|
-
//#endregion
|
|
11278
|
-
//#region ../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs
|
|
11279
|
-
function set(target, key, val) {
|
|
11280
|
-
if (Array.isArray(target)) {
|
|
11281
|
-
target.length = Math.max(target.length, key);
|
|
11282
|
-
target.splice(key, 1, val);
|
|
11283
|
-
return val;
|
|
11284
|
-
}
|
|
11285
|
-
target[key] = val;
|
|
11286
|
-
return val;
|
|
11287
|
-
}
|
|
11288
|
-
function del(target, key) {
|
|
11289
|
-
if (Array.isArray(target)) {
|
|
11290
|
-
target.splice(key, 1);
|
|
11291
|
-
return;
|
|
11122
|
+
const myListenerId = activeListener = Symbol();
|
|
11123
|
+
nextTick().then(() => {
|
|
11124
|
+
if (activeListener === myListenerId) isListening = true;
|
|
11125
|
+
});
|
|
11126
|
+
isSyncListening = true;
|
|
11127
|
+
triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
|
|
11292
11128
|
}
|
|
11293
|
-
|
|
11294
|
-
}
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
}
|
|
11308
|
-
var MutationType;
|
|
11309
|
-
(function(MutationType) {
|
|
11310
|
-
MutationType["direct"] = "direct";
|
|
11311
|
-
MutationType["patchObject"] = "patch object";
|
|
11312
|
-
MutationType["patchFunction"] = "patch function";
|
|
11313
|
-
})(MutationType || (MutationType = {}));
|
|
11314
|
-
var IS_CLIENT = typeof window !== "undefined";
|
|
11315
|
-
var USE_DEVTOOLS = (process.env.NODE_ENV !== "production" || false) && !(process.env.NODE_ENV === "test") && IS_CLIENT;
|
|
11316
|
-
var _global = /*#__PURE__*/ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })();
|
|
11317
|
-
function bom(blob, { autoBom = false } = {}) {
|
|
11318
|
-
if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
|
|
11319
|
-
return blob;
|
|
11320
|
-
}
|
|
11321
|
-
function download(url, name, opts) {
|
|
11322
|
-
const xhr = new XMLHttpRequest();
|
|
11323
|
-
xhr.open("GET", url);
|
|
11324
|
-
xhr.responseType = "blob";
|
|
11325
|
-
xhr.onload = function() {
|
|
11326
|
-
saveAs(xhr.response, name, opts);
|
|
11327
|
-
};
|
|
11328
|
-
xhr.onerror = function() {
|
|
11329
|
-
console.error("could not download file");
|
|
11330
|
-
};
|
|
11331
|
-
xhr.send();
|
|
11332
|
-
}
|
|
11333
|
-
function corsEnabled(url) {
|
|
11334
|
-
const xhr = new XMLHttpRequest();
|
|
11335
|
-
xhr.open("HEAD", url, false);
|
|
11336
|
-
try {
|
|
11337
|
-
xhr.send();
|
|
11338
|
-
} catch (e) {}
|
|
11339
|
-
return xhr.status >= 200 && xhr.status <= 299;
|
|
11340
|
-
}
|
|
11341
|
-
function click(node) {
|
|
11342
|
-
try {
|
|
11343
|
-
node.dispatchEvent(new MouseEvent("click"));
|
|
11344
|
-
} catch (e) {
|
|
11345
|
-
const evt = document.createEvent("MouseEvents");
|
|
11346
|
-
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
|
|
11347
|
-
node.dispatchEvent(evt);
|
|
11129
|
+
const $reset = isOptionsStore ? function $reset() {
|
|
11130
|
+
const { state } = options;
|
|
11131
|
+
const newState = state ? state() : {};
|
|
11132
|
+
this.$patch(($state) => {
|
|
11133
|
+
assign($state, newState);
|
|
11134
|
+
});
|
|
11135
|
+
} : process.env.NODE_ENV !== "production" ? () => {
|
|
11136
|
+
throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
|
|
11137
|
+
} : noop;
|
|
11138
|
+
function $dispose() {
|
|
11139
|
+
scope.stop();
|
|
11140
|
+
subscriptions = [];
|
|
11141
|
+
actionSubscriptions = [];
|
|
11142
|
+
pinia._s.delete($id);
|
|
11348
11143
|
}
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
if (typeof blob === "string") {
|
|
11358
|
-
a.href = blob;
|
|
11359
|
-
if (a.origin !== location.origin) {
|
|
11360
|
-
if (corsEnabled(a.href)) download(blob, name, opts);
|
|
11361
|
-
else {
|
|
11362
|
-
a.target = "_blank";
|
|
11363
|
-
click(a);
|
|
11144
|
+
function wrapAction(name, action) {
|
|
11145
|
+
return function() {
|
|
11146
|
+
setActivePinia(pinia);
|
|
11147
|
+
const args = Array.from(arguments);
|
|
11148
|
+
const afterCallbackList = [];
|
|
11149
|
+
const onErrorCallbackList = [];
|
|
11150
|
+
function after(callback) {
|
|
11151
|
+
afterCallbackList.push(callback);
|
|
11364
11152
|
}
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11153
|
+
function onError(callback) {
|
|
11154
|
+
onErrorCallbackList.push(callback);
|
|
11155
|
+
}
|
|
11156
|
+
triggerSubscriptions(actionSubscriptions, {
|
|
11157
|
+
args,
|
|
11158
|
+
name,
|
|
11159
|
+
store,
|
|
11160
|
+
after,
|
|
11161
|
+
onError
|
|
11162
|
+
});
|
|
11163
|
+
let ret;
|
|
11164
|
+
try {
|
|
11165
|
+
ret = action.apply(this && this.$id === $id ? this : store, args);
|
|
11166
|
+
} catch (error) {
|
|
11167
|
+
triggerSubscriptions(onErrorCallbackList, error);
|
|
11168
|
+
throw error;
|
|
11169
|
+
}
|
|
11170
|
+
if (ret instanceof Promise) return ret.then((value) => {
|
|
11171
|
+
triggerSubscriptions(afterCallbackList, value);
|
|
11172
|
+
return value;
|
|
11173
|
+
}).catch((error) => {
|
|
11174
|
+
triggerSubscriptions(onErrorCallbackList, error);
|
|
11175
|
+
return Promise.reject(error);
|
|
11176
|
+
});
|
|
11177
|
+
triggerSubscriptions(afterCallbackList, ret);
|
|
11178
|
+
return ret;
|
|
11179
|
+
};
|
|
11374
11180
|
}
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11181
|
+
const _hmrPayload = /*#__PURE__*/ markRaw({
|
|
11182
|
+
actions: {},
|
|
11183
|
+
getters: {},
|
|
11184
|
+
state: [],
|
|
11185
|
+
hotState
|
|
11186
|
+
});
|
|
11187
|
+
const partialStore = {
|
|
11188
|
+
_p: pinia,
|
|
11189
|
+
$id,
|
|
11190
|
+
$onAction: addSubscription.bind(null, actionSubscriptions),
|
|
11191
|
+
$patch,
|
|
11192
|
+
$reset,
|
|
11193
|
+
$subscribe(callback, options = {}) {
|
|
11194
|
+
const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());
|
|
11195
|
+
const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
|
|
11196
|
+
if (options.flush === "sync" ? isSyncListening : isListening) callback({
|
|
11197
|
+
storeId: $id,
|
|
11198
|
+
type: MutationType.direct,
|
|
11199
|
+
events: debuggerEvents
|
|
11200
|
+
}, state);
|
|
11201
|
+
}, assign({}, $subscribeOptions, options)));
|
|
11202
|
+
return removeSubscription;
|
|
11203
|
+
},
|
|
11204
|
+
$dispose
|
|
11205
|
+
};
|
|
11206
|
+
const store = reactive(process.env.NODE_ENV !== "production" || USE_DEVTOOLS ? assign({
|
|
11207
|
+
_hmrPayload,
|
|
11208
|
+
_customProperties: markRaw(/* @__PURE__ */ new Set())
|
|
11209
|
+
}, partialStore) : partialStore);
|
|
11210
|
+
pinia._s.set($id, store);
|
|
11211
|
+
const setupStore = (pinia._a && pinia._a.runWithContext || fallbackRunWithContext)(() => pinia._e.run(() => (scope = effectScope()).run(setup)));
|
|
11212
|
+
for (const key in setupStore) {
|
|
11213
|
+
const prop = setupStore[key];
|
|
11214
|
+
if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
|
|
11215
|
+
if (process.env.NODE_ENV !== "production" && hot) set$1(hotState.value, key, toRef(setupStore, key));
|
|
11216
|
+
else if (!isOptionsStore) {
|
|
11217
|
+
if (initialState && shouldHydrate(prop)) {
|
|
11218
|
+
if (isRef(prop)) prop.value = initialState[key];
|
|
11219
|
+
else mergeReactiveObjects(prop, initialState[key]);
|
|
11220
|
+
}
|
|
11221
|
+
pinia.state.value[$id][key] = prop;
|
|
11222
|
+
}
|
|
11223
|
+
/* istanbul ignore else */
|
|
11224
|
+
if (process.env.NODE_ENV !== "production") _hmrPayload.state.push(key);
|
|
11225
|
+
} else if (typeof prop === "function") {
|
|
11226
|
+
setupStore[key] = process.env.NODE_ENV !== "production" && hot ? prop : wrapAction(key, prop);
|
|
11227
|
+
/* istanbul ignore else */
|
|
11228
|
+
if (process.env.NODE_ENV !== "production") _hmrPayload.actions[key] = prop;
|
|
11229
|
+
optionsForPlugin.actions[key] = prop;
|
|
11230
|
+
} else if (process.env.NODE_ENV !== "production") {
|
|
11231
|
+
if (isComputed(prop)) {
|
|
11232
|
+
_hmrPayload.getters[key] = isOptionsStore ? options.getters[key] : prop;
|
|
11233
|
+
if (IS_CLIENT) (setupStore._getters || (setupStore._getters = markRaw([]))).push(key);
|
|
11234
|
+
}
|
|
11235
|
+
}
|
|
11236
|
+
}
|
|
11237
|
+
assign(store, setupStore);
|
|
11238
|
+
assign(toRaw(store), setupStore);
|
|
11239
|
+
Object.defineProperty(store, "$state", {
|
|
11240
|
+
get: () => process.env.NODE_ENV !== "production" && hot ? hotState.value : pinia.state.value[$id],
|
|
11241
|
+
set: (state) => {
|
|
11242
|
+
/* istanbul ignore if */
|
|
11243
|
+
if (process.env.NODE_ENV !== "production" && hot) throw new Error("cannot set hotState");
|
|
11244
|
+
$patch(($state) => {
|
|
11245
|
+
assign($state, state);
|
|
11385
11246
|
});
|
|
11386
11247
|
}
|
|
11387
|
-
}
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
const reader = new FileReader();
|
|
11398
|
-
reader.onloadend = function() {
|
|
11399
|
-
let url = reader.result;
|
|
11400
|
-
if (typeof url !== "string") {
|
|
11401
|
-
popup = null;
|
|
11402
|
-
throw new Error("Wrong reader.result type");
|
|
11248
|
+
});
|
|
11249
|
+
/* istanbul ignore else */
|
|
11250
|
+
if (process.env.NODE_ENV !== "production") store._hotUpdate = markRaw((newStore) => {
|
|
11251
|
+
store._hotUpdating = true;
|
|
11252
|
+
newStore._hmrPayload.state.forEach((stateKey) => {
|
|
11253
|
+
if (stateKey in store.$state) {
|
|
11254
|
+
const newStateTarget = newStore.$state[stateKey];
|
|
11255
|
+
const oldStateSource = store.$state[stateKey];
|
|
11256
|
+
if (typeof newStateTarget === "object" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) patchObject(newStateTarget, oldStateSource);
|
|
11257
|
+
else newStore.$state[stateKey] = oldStateSource;
|
|
11403
11258
|
}
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11259
|
+
set$1(store, stateKey, toRef(newStore.$state, stateKey));
|
|
11260
|
+
});
|
|
11261
|
+
Object.keys(store.$state).forEach((stateKey) => {
|
|
11262
|
+
if (!(stateKey in newStore.$state)) del(store, stateKey);
|
|
11263
|
+
});
|
|
11264
|
+
isListening = false;
|
|
11265
|
+
isSyncListening = false;
|
|
11266
|
+
pinia.state.value[$id] = toRef(newStore._hmrPayload, "hotState");
|
|
11267
|
+
isSyncListening = true;
|
|
11268
|
+
nextTick().then(() => {
|
|
11269
|
+
isListening = true;
|
|
11270
|
+
});
|
|
11271
|
+
for (const actionName in newStore._hmrPayload.actions) {
|
|
11272
|
+
const action = newStore[actionName];
|
|
11273
|
+
set$1(store, actionName, wrapAction(actionName, action));
|
|
11274
|
+
}
|
|
11275
|
+
for (const getterName in newStore._hmrPayload.getters) {
|
|
11276
|
+
const getter = newStore._hmrPayload.getters[getterName];
|
|
11277
|
+
const getterValue = isOptionsStore ? computed(() => {
|
|
11278
|
+
setActivePinia(pinia);
|
|
11279
|
+
return getter.call(store, store);
|
|
11280
|
+
}) : getter;
|
|
11281
|
+
set$1(store, getterName, getterValue);
|
|
11282
|
+
}
|
|
11283
|
+
Object.keys(store._hmrPayload.getters).forEach((key) => {
|
|
11284
|
+
if (!(key in newStore._hmrPayload.getters)) del(store, key);
|
|
11285
|
+
});
|
|
11286
|
+
Object.keys(store._hmrPayload.actions).forEach((key) => {
|
|
11287
|
+
if (!(key in newStore._hmrPayload.actions)) del(store, key);
|
|
11288
|
+
});
|
|
11289
|
+
store._hmrPayload = newStore._hmrPayload;
|
|
11290
|
+
store._getters = newStore._getters;
|
|
11291
|
+
store._hotUpdating = false;
|
|
11292
|
+
});
|
|
11293
|
+
if (USE_DEVTOOLS) {
|
|
11294
|
+
const nonEnumerable = {
|
|
11295
|
+
writable: true,
|
|
11296
|
+
configurable: true,
|
|
11297
|
+
enumerable: false
|
|
11408
11298
|
};
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
}, 4e4);
|
|
11418
|
-
}
|
|
11419
|
-
}
|
|
11420
|
-
function toastMessage(message, type) {
|
|
11421
|
-
const piniaMessage = "🍍 " + message;
|
|
11422
|
-
if (typeof __VUE_DEVTOOLS_TOAST__ === "function") __VUE_DEVTOOLS_TOAST__(piniaMessage, type);
|
|
11423
|
-
else if (type === "error") console.error(piniaMessage);
|
|
11424
|
-
else if (type === "warn") console.warn(piniaMessage);
|
|
11425
|
-
else console.log(piniaMessage);
|
|
11426
|
-
}
|
|
11427
|
-
function isPinia(o) {
|
|
11428
|
-
return "_a" in o && "install" in o;
|
|
11429
|
-
}
|
|
11430
|
-
function checkClipboardAccess() {
|
|
11431
|
-
if (!("clipboard" in navigator)) {
|
|
11432
|
-
toastMessage(`Your browser doesn't support the Clipboard API`, "error");
|
|
11433
|
-
return true;
|
|
11299
|
+
[
|
|
11300
|
+
"_p",
|
|
11301
|
+
"_hmrPayload",
|
|
11302
|
+
"_getters",
|
|
11303
|
+
"_customProperties"
|
|
11304
|
+
].forEach((p) => {
|
|
11305
|
+
Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));
|
|
11306
|
+
});
|
|
11434
11307
|
}
|
|
11308
|
+
pinia._p.forEach((extender) => {
|
|
11309
|
+
/* istanbul ignore else */
|
|
11310
|
+
if (USE_DEVTOOLS) {
|
|
11311
|
+
const extensions = scope.run(() => extender({
|
|
11312
|
+
store,
|
|
11313
|
+
app: pinia._a,
|
|
11314
|
+
pinia,
|
|
11315
|
+
options: optionsForPlugin
|
|
11316
|
+
}));
|
|
11317
|
+
Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));
|
|
11318
|
+
assign(store, extensions);
|
|
11319
|
+
} else assign(store, scope.run(() => extender({
|
|
11320
|
+
store,
|
|
11321
|
+
app: pinia._a,
|
|
11322
|
+
pinia,
|
|
11323
|
+
options: optionsForPlugin
|
|
11324
|
+
})));
|
|
11325
|
+
});
|
|
11326
|
+
if (process.env.NODE_ENV !== "production" && store.$state && typeof store.$state === "object" && typeof store.$state.constructor === "function" && !store.$state.constructor.toString().includes("[native code]")) console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
11327
|
+
state: () => new MyClass()
|
|
11328
|
+
Found in store "${store.$id}".`);
|
|
11329
|
+
if (initialState && isOptionsStore && options.hydrate) options.hydrate(store.$state, initialState);
|
|
11330
|
+
isListening = true;
|
|
11331
|
+
isSyncListening = true;
|
|
11332
|
+
return store;
|
|
11435
11333
|
}
|
|
11436
|
-
function
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
|
|
11334
|
+
function defineStore(idOrOptions, setup, setupOptions) {
|
|
11335
|
+
let id;
|
|
11336
|
+
let options;
|
|
11337
|
+
const isSetupStore = typeof setup === "function";
|
|
11338
|
+
if (typeof idOrOptions === "string") {
|
|
11339
|
+
id = idOrOptions;
|
|
11340
|
+
options = isSetupStore ? setupOptions : setup;
|
|
11341
|
+
} else {
|
|
11342
|
+
options = idOrOptions;
|
|
11343
|
+
id = idOrOptions.id;
|
|
11344
|
+
if (process.env.NODE_ENV !== "production" && typeof id !== "string") throw new Error(`[🍍]: "defineStore()" must be passed a store id as its first argument.`);
|
|
11440
11345
|
}
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11346
|
+
function useStore(pinia, hot) {
|
|
11347
|
+
const hasContext = hasInjectionContext();
|
|
11348
|
+
pinia = (process.env.NODE_ENV === "test" && activePinia && activePinia._testing ? null : pinia) || (hasContext ? inject(piniaSymbol, null) : null);
|
|
11349
|
+
if (pinia) setActivePinia(pinia);
|
|
11350
|
+
if (process.env.NODE_ENV !== "production" && !activePinia) throw new Error("[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\nSee https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\nThis will fail in production.");
|
|
11351
|
+
pinia = activePinia;
|
|
11352
|
+
if (!pinia._s.has(id)) {
|
|
11353
|
+
if (isSetupStore) createSetupStore(id, setup, options, pinia);
|
|
11354
|
+
else createOptionsStore(id, options, pinia);
|
|
11355
|
+
/* istanbul ignore else */
|
|
11356
|
+
if (process.env.NODE_ENV !== "production") useStore._pinia = pinia;
|
|
11357
|
+
}
|
|
11358
|
+
const store = pinia._s.get(id);
|
|
11359
|
+
if (process.env.NODE_ENV !== "production" && hot) {
|
|
11360
|
+
const hotId = "__hot:" + id;
|
|
11361
|
+
const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia, true) : createOptionsStore(hotId, assign({}, options), pinia, true);
|
|
11362
|
+
hot._hotUpdate(newStore);
|
|
11363
|
+
delete pinia.state.value[hotId];
|
|
11364
|
+
pinia._s.delete(hotId);
|
|
11365
|
+
}
|
|
11366
|
+
if (process.env.NODE_ENV !== "production" && IS_CLIENT) {
|
|
11367
|
+
const currentInstance = getCurrentInstance();
|
|
11368
|
+
if (currentInstance && currentInstance.proxy && !hot) {
|
|
11369
|
+
const vm = currentInstance.proxy;
|
|
11370
|
+
const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
|
|
11371
|
+
cache[id] = store;
|
|
11372
|
+
}
|
|
11373
|
+
}
|
|
11374
|
+
return store;
|
|
11452
11375
|
}
|
|
11376
|
+
useStore.$id = id;
|
|
11377
|
+
return useStore;
|
|
11453
11378
|
}
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11379
|
+
//#endregion
|
|
11380
|
+
//#region ../admin/src/services/actions/getActionIdentifier.ts
|
|
11381
|
+
var getActionIdentifier = (action) => {
|
|
11382
|
+
return isOfType$1(action, "name") ? action.name : action.id;
|
|
11383
|
+
};
|
|
11384
|
+
//#endregion
|
|
11385
|
+
//#region ../admin/src/services/logger.ts
|
|
11386
|
+
var LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
11387
|
+
LogLevel[LogLevel["Debug"] = 1] = "Debug";
|
|
11388
|
+
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
11389
|
+
LogLevel[LogLevel["Warn"] = 3] = "Warn";
|
|
11390
|
+
LogLevel[LogLevel["Error"] = 4] = "Error";
|
|
11391
|
+
LogLevel[LogLevel["Off"] = 5] = "Off";
|
|
11392
|
+
return LogLevel;
|
|
11393
|
+
}({});
|
|
11394
|
+
var logLevelNameMap = {
|
|
11395
|
+
[4]: "error",
|
|
11396
|
+
[3]: "warn",
|
|
11397
|
+
[2]: "info",
|
|
11398
|
+
[1]: "debug"
|
|
11399
|
+
};
|
|
11400
|
+
var backgroundColors = {
|
|
11401
|
+
[1]: "#9E9E9E",
|
|
11402
|
+
[2]: "#2196F3",
|
|
11403
|
+
[3]: "#FFB562",
|
|
11404
|
+
[4]: "#F87474"
|
|
11405
|
+
};
|
|
11406
|
+
var globalLogger = {
|
|
11407
|
+
level: 1,
|
|
11408
|
+
scope: null,
|
|
11409
|
+
log(level, ...messages) {
|
|
11410
|
+
if (level < this.level) return;
|
|
11411
|
+
const scope = this.scope ?? "PDK";
|
|
11412
|
+
if (process.env.NODE_ENV === "production") console.log(`[${scope}] ${level}`, ...messages);
|
|
11413
|
+
else {
|
|
11414
|
+
const background = this.scope ? "#002621" : "#0F5C47";
|
|
11415
|
+
const levelName = logLevelNameMap[level];
|
|
11416
|
+
let method;
|
|
11417
|
+
switch (level) {
|
|
11418
|
+
case 4:
|
|
11419
|
+
method = console.error;
|
|
11420
|
+
break;
|
|
11421
|
+
case 3:
|
|
11422
|
+
method = console.warn;
|
|
11423
|
+
break;
|
|
11424
|
+
default: method = console.log;
|
|
11425
|
+
}
|
|
11426
|
+
method(...[
|
|
11427
|
+
`%c${scope}%c${levelName?.toUpperCase()}`,
|
|
11428
|
+
[
|
|
11429
|
+
`background: ${background}`,
|
|
11430
|
+
"border-radius: 3px 0 0 3px",
|
|
11431
|
+
"padding: 2px 4px",
|
|
11432
|
+
"color: #ccc"
|
|
11433
|
+
].join(";"),
|
|
11434
|
+
[
|
|
11435
|
+
`background: ${backgroundColors[level]}`,
|
|
11436
|
+
"border-radius: 0 3px 3px 0",
|
|
11437
|
+
"padding: 2px 4px",
|
|
11438
|
+
"color: #222"
|
|
11439
|
+
].join(";"),
|
|
11440
|
+
...messages
|
|
11441
|
+
]);
|
|
11442
|
+
}
|
|
11443
|
+
},
|
|
11444
|
+
debug(...messages) {
|
|
11445
|
+
this.log(1, ...messages);
|
|
11446
|
+
},
|
|
11447
|
+
info(...messages) {
|
|
11448
|
+
this.log(2, ...messages);
|
|
11449
|
+
},
|
|
11450
|
+
warn(...messages) {
|
|
11451
|
+
this.log(3, ...messages);
|
|
11452
|
+
},
|
|
11453
|
+
error(...messages) {
|
|
11454
|
+
this.log(4, ...messages);
|
|
11455
|
+
},
|
|
11456
|
+
setScope(scope) {
|
|
11457
|
+
this.scope = scope;
|
|
11463
11458
|
}
|
|
11464
|
-
}
|
|
11465
|
-
|
|
11459
|
+
};
|
|
11460
|
+
var createLogger = (scope = null, logLevel = null) => {
|
|
11461
|
+
const loggerInstance = { ...globalLogger };
|
|
11462
|
+
loggerInstance.setScope(scope);
|
|
11463
|
+
loggerInstance.level = logLevel ?? globalLogger.level;
|
|
11464
|
+
return loggerInstance;
|
|
11465
|
+
};
|
|
11466
|
+
//#endregion
|
|
11467
|
+
//#region ../../node_modules/lodash-es/_freeGlobal.js
|
|
11468
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
11469
|
+
//#endregion
|
|
11470
|
+
//#region ../../node_modules/lodash-es/_root.js
|
|
11471
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
11472
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
11473
|
+
//#endregion
|
|
11474
|
+
//#region ../../node_modules/lodash-es/_Symbol.js
|
|
11475
|
+
var Symbol$1 = root.Symbol;
|
|
11476
|
+
//#endregion
|
|
11477
|
+
//#region ../../node_modules/lodash-es/_getRawTag.js
|
|
11478
|
+
var objectProto$1 = Object.prototype;
|
|
11479
|
+
var hasOwnProperty$4 = objectProto$1.hasOwnProperty;
|
|
11480
|
+
var nativeObjectToString$1 = objectProto$1.toString;
|
|
11481
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
11482
|
+
function getRawTag(value) {
|
|
11483
|
+
var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
11466
11484
|
try {
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11485
|
+
value[symToStringTag$1] = void 0;
|
|
11486
|
+
var unmasked = true;
|
|
11487
|
+
} catch (e) {}
|
|
11488
|
+
var result = nativeObjectToString$1.call(value);
|
|
11489
|
+
if (unmasked) {
|
|
11490
|
+
if (isOwn) value[symToStringTag$1] = tag;
|
|
11491
|
+
else delete value[symToStringTag$1];
|
|
11471
11492
|
}
|
|
11493
|
+
return result;
|
|
11472
11494
|
}
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
fileInput.accept = ".json";
|
|
11479
|
-
}
|
|
11480
|
-
function openFile() {
|
|
11481
|
-
return new Promise((resolve, reject) => {
|
|
11482
|
-
fileInput.onchange = async () => {
|
|
11483
|
-
const files = fileInput.files;
|
|
11484
|
-
if (!files) return resolve(null);
|
|
11485
|
-
const file = files.item(0);
|
|
11486
|
-
if (!file) return resolve(null);
|
|
11487
|
-
return resolve({
|
|
11488
|
-
text: await file.text(),
|
|
11489
|
-
file
|
|
11490
|
-
});
|
|
11491
|
-
};
|
|
11492
|
-
fileInput.oncancel = () => resolve(null);
|
|
11493
|
-
fileInput.onerror = reject;
|
|
11494
|
-
fileInput.click();
|
|
11495
|
-
});
|
|
11496
|
-
}
|
|
11497
|
-
return openFile;
|
|
11495
|
+
//#endregion
|
|
11496
|
+
//#region ../../node_modules/lodash-es/_objectToString.js
|
|
11497
|
+
var nativeObjectToString = Object.prototype.toString;
|
|
11498
|
+
function objectToString(value) {
|
|
11499
|
+
return nativeObjectToString.call(value);
|
|
11498
11500
|
}
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
|
|
11508
|
-
console.error(error);
|
|
11509
|
-
}
|
|
11501
|
+
//#endregion
|
|
11502
|
+
//#region ../../node_modules/lodash-es/_baseGetTag.js
|
|
11503
|
+
var nullTag = "[object Null]";
|
|
11504
|
+
var undefinedTag = "[object Undefined]";
|
|
11505
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
11506
|
+
function baseGetTag(value) {
|
|
11507
|
+
if (value == null) return value === void 0 ? undefinedTag : nullTag;
|
|
11508
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
11510
11509
|
}
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
else pinia.state.value[key] = state[key];
|
|
11516
|
-
}
|
|
11510
|
+
//#endregion
|
|
11511
|
+
//#region ../../node_modules/lodash-es/isObjectLike.js
|
|
11512
|
+
function isObjectLike(value) {
|
|
11513
|
+
return value != null && typeof value == "object";
|
|
11517
11514
|
}
|
|
11518
|
-
|
|
11519
|
-
|
|
11515
|
+
//#endregion
|
|
11516
|
+
//#region ../../node_modules/lodash-es/isSymbol.js
|
|
11517
|
+
var symbolTag = "[object Symbol]";
|
|
11518
|
+
function isSymbol(value) {
|
|
11519
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
11520
11520
|
}
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
function
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
} : {
|
|
11528
|
-
id: store.$id,
|
|
11529
|
-
label: store.$id
|
|
11530
|
-
};
|
|
11521
|
+
//#endregion
|
|
11522
|
+
//#region ../../node_modules/lodash-es/_arrayMap.js
|
|
11523
|
+
function arrayMap(array, iteratee) {
|
|
11524
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
11525
|
+
while (++index < length) result[index] = iteratee(array[index], index, array);
|
|
11526
|
+
return result;
|
|
11531
11527
|
}
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11528
|
+
//#endregion
|
|
11529
|
+
//#region ../../node_modules/lodash-es/isArray.js
|
|
11530
|
+
var isArray = Array.isArray;
|
|
11531
|
+
//#endregion
|
|
11532
|
+
//#region ../../node_modules/lodash-es/_baseToString.js
|
|
11533
|
+
var INFINITY$1 = 1 / 0;
|
|
11534
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0;
|
|
11535
|
+
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
11536
|
+
function baseToString(value) {
|
|
11537
|
+
if (typeof value == "string") return value;
|
|
11538
|
+
if (isArray(value)) return arrayMap(value, baseToString) + "";
|
|
11539
|
+
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
11540
|
+
var result = value + "";
|
|
11541
|
+
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
11542
|
+
}
|
|
11543
|
+
//#endregion
|
|
11544
|
+
//#region ../../node_modules/lodash-es/isObject.js
|
|
11545
|
+
function isObject(value) {
|
|
11546
|
+
var type = typeof value;
|
|
11547
|
+
return value != null && (type == "object" || type == "function");
|
|
11548
|
+
}
|
|
11549
|
+
//#endregion
|
|
11550
|
+
//#region ../../node_modules/lodash-es/isFunction.js
|
|
11551
|
+
var asyncTag = "[object AsyncFunction]";
|
|
11552
|
+
var funcTag = "[object Function]";
|
|
11553
|
+
var genTag = "[object GeneratorFunction]";
|
|
11554
|
+
var proxyTag = "[object Proxy]";
|
|
11555
|
+
function isFunction(value) {
|
|
11556
|
+
if (!isObject(value)) return false;
|
|
11557
|
+
var tag = baseGetTag(value);
|
|
11558
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
11559
|
+
}
|
|
11560
|
+
//#endregion
|
|
11561
|
+
//#region ../../node_modules/lodash-es/_coreJsData.js
|
|
11562
|
+
var coreJsData = root["__core-js_shared__"];
|
|
11563
|
+
//#endregion
|
|
11564
|
+
//#region ../../node_modules/lodash-es/_isMasked.js
|
|
11565
|
+
var maskSrcKey = function() {
|
|
11566
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
11567
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
11568
|
+
}();
|
|
11569
|
+
function isMasked(func) {
|
|
11570
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
11571
|
+
}
|
|
11572
|
+
//#endregion
|
|
11573
|
+
//#region ../../node_modules/lodash-es/_toSource.js
|
|
11574
|
+
var funcToString$1 = Function.prototype.toString;
|
|
11575
|
+
function toSource(func) {
|
|
11576
|
+
if (func != null) {
|
|
11577
|
+
try {
|
|
11578
|
+
return funcToString$1.call(func);
|
|
11579
|
+
} catch (e) {}
|
|
11580
|
+
try {
|
|
11581
|
+
return func + "";
|
|
11582
|
+
} catch (e) {}
|
|
11554
11583
|
}
|
|
11555
|
-
|
|
11556
|
-
editable: true,
|
|
11557
|
-
key,
|
|
11558
|
-
value: store.$state[key]
|
|
11559
|
-
})) };
|
|
11560
|
-
if (store._getters && store._getters.length) state.getters = store._getters.map((getterName) => ({
|
|
11561
|
-
editable: false,
|
|
11562
|
-
key: getterName,
|
|
11563
|
-
value: store[getterName]
|
|
11564
|
-
}));
|
|
11565
|
-
if (store._customProperties.size) state.customProperties = Array.from(store._customProperties).map((key) => ({
|
|
11566
|
-
editable: true,
|
|
11567
|
-
key,
|
|
11568
|
-
value: store[key]
|
|
11569
|
-
}));
|
|
11570
|
-
return state;
|
|
11584
|
+
return "";
|
|
11571
11585
|
}
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11586
|
+
//#endregion
|
|
11587
|
+
//#region ../../node_modules/lodash-es/_baseIsNative.js
|
|
11588
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
11589
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
11590
|
+
var funcProto = Function.prototype;
|
|
11591
|
+
var objectProto = Object.prototype;
|
|
11592
|
+
var funcToString = funcProto.toString;
|
|
11593
|
+
var hasOwnProperty$3 = objectProto.hasOwnProperty;
|
|
11594
|
+
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
11595
|
+
function baseIsNative(value) {
|
|
11596
|
+
if (!isObject(value) || isMasked(value)) return false;
|
|
11597
|
+
return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
|
|
11598
|
+
}
|
|
11599
|
+
//#endregion
|
|
11600
|
+
//#region ../../node_modules/lodash-es/_getValue.js
|
|
11601
|
+
function getValue(object, key) {
|
|
11602
|
+
return object == null ? void 0 : object[key];
|
|
11603
|
+
}
|
|
11604
|
+
//#endregion
|
|
11605
|
+
//#region ../../node_modules/lodash-es/_getNative.js
|
|
11606
|
+
function getNative(object, key) {
|
|
11607
|
+
var value = getValue(object, key);
|
|
11608
|
+
return baseIsNative(value) ? value : void 0;
|
|
11609
|
+
}
|
|
11610
|
+
//#endregion
|
|
11611
|
+
//#region ../../node_modules/lodash-es/_defineProperty.js
|
|
11612
|
+
var defineProperty = function() {
|
|
11613
|
+
try {
|
|
11614
|
+
var func = getNative(Object, "defineProperty");
|
|
11615
|
+
func({}, "", {});
|
|
11616
|
+
return func;
|
|
11617
|
+
} catch (e) {}
|
|
11618
|
+
}();
|
|
11619
|
+
//#endregion
|
|
11620
|
+
//#region ../../node_modules/lodash-es/_isIndex.js
|
|
11621
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
11622
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
11623
|
+
function isIndex(value, length) {
|
|
11624
|
+
var type = typeof value;
|
|
11625
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
11626
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
11627
|
+
}
|
|
11628
|
+
//#endregion
|
|
11629
|
+
//#region ../../node_modules/lodash-es/_baseAssignValue.js
|
|
11630
|
+
function baseAssignValue(object, key, value) {
|
|
11631
|
+
if (key == "__proto__" && defineProperty) defineProperty(object, key, {
|
|
11632
|
+
"configurable": true,
|
|
11633
|
+
"enumerable": true,
|
|
11634
|
+
"value": value,
|
|
11635
|
+
"writable": true
|
|
11585
11636
|
});
|
|
11586
|
-
else
|
|
11587
|
-
operation: formatDisplay(events.type),
|
|
11588
|
-
key: formatDisplay(events.key),
|
|
11589
|
-
oldValue: events.oldValue,
|
|
11590
|
-
newValue: events.newValue
|
|
11591
|
-
};
|
|
11637
|
+
else object[key] = value;
|
|
11592
11638
|
}
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11639
|
+
//#endregion
|
|
11640
|
+
//#region ../../node_modules/lodash-es/eq.js
|
|
11641
|
+
function eq(value, other) {
|
|
11642
|
+
return value === other || value !== value && other !== other;
|
|
11643
|
+
}
|
|
11644
|
+
//#endregion
|
|
11645
|
+
//#region ../../node_modules/lodash-es/_assignValue.js
|
|
11646
|
+
var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
11647
|
+
function assignValue(object, key, value) {
|
|
11648
|
+
var objValue = object[key];
|
|
11649
|
+
if (!(hasOwnProperty$2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) baseAssignValue(object, key, value);
|
|
11650
|
+
}
|
|
11651
|
+
//#endregion
|
|
11652
|
+
//#region ../../node_modules/lodash-es/_isKey.js
|
|
11653
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
11654
|
+
var reIsPlainProp = /^\w*$/;
|
|
11655
|
+
function isKey(value, object) {
|
|
11656
|
+
if (isArray(value)) return false;
|
|
11657
|
+
var type = typeof value;
|
|
11658
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
|
|
11659
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
11660
|
+
}
|
|
11661
|
+
//#endregion
|
|
11662
|
+
//#region ../../node_modules/lodash-es/_nativeCreate.js
|
|
11663
|
+
var nativeCreate = getNative(Object, "create");
|
|
11664
|
+
//#endregion
|
|
11665
|
+
//#region ../../node_modules/lodash-es/_hashClear.js
|
|
11666
|
+
function hashClear() {
|
|
11667
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
11668
|
+
this.size = 0;
|
|
11669
|
+
}
|
|
11670
|
+
//#endregion
|
|
11671
|
+
//#region ../../node_modules/lodash-es/_hashDelete.js
|
|
11672
|
+
function hashDelete(key) {
|
|
11673
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
11674
|
+
this.size -= result ? 1 : 0;
|
|
11675
|
+
return result;
|
|
11676
|
+
}
|
|
11677
|
+
//#endregion
|
|
11678
|
+
//#region ../../node_modules/lodash-es/_hashGet.js
|
|
11679
|
+
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
11680
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
11681
|
+
function hashGet(key) {
|
|
11682
|
+
var data = this.__data__;
|
|
11683
|
+
if (nativeCreate) {
|
|
11684
|
+
var result = data[key];
|
|
11685
|
+
return result === HASH_UNDEFINED$1 ? void 0 : result;
|
|
11599
11686
|
}
|
|
11687
|
+
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
11600
11688
|
}
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
var
|
|
11604
|
-
|
|
11605
|
-
var
|
|
11606
|
-
|
|
11607
|
-
function registerPiniaDevtools(app, pinia) {
|
|
11608
|
-
setupDevtoolsPlugin({
|
|
11609
|
-
id: "dev.esm.pinia",
|
|
11610
|
-
label: "Pinia 🍍",
|
|
11611
|
-
logo: "https://pinia.vuejs.org/logo.svg",
|
|
11612
|
-
packageName: "pinia",
|
|
11613
|
-
homepage: "https://pinia.vuejs.org",
|
|
11614
|
-
componentStateTypes,
|
|
11615
|
-
app
|
|
11616
|
-
}, (api) => {
|
|
11617
|
-
if (typeof api.now !== "function") toastMessage("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.");
|
|
11618
|
-
api.addTimelineLayer({
|
|
11619
|
-
id: MUTATIONS_LAYER_ID,
|
|
11620
|
-
label: `Pinia 🍍`,
|
|
11621
|
-
color: 15064968
|
|
11622
|
-
});
|
|
11623
|
-
api.addInspector({
|
|
11624
|
-
id: INSPECTOR_ID,
|
|
11625
|
-
label: "Pinia 🍍",
|
|
11626
|
-
icon: "storage",
|
|
11627
|
-
treeFilterPlaceholder: "Search stores",
|
|
11628
|
-
actions: [
|
|
11629
|
-
{
|
|
11630
|
-
icon: "content_copy",
|
|
11631
|
-
action: () => {
|
|
11632
|
-
actionGlobalCopyState(pinia);
|
|
11633
|
-
},
|
|
11634
|
-
tooltip: "Serialize and copy the state"
|
|
11635
|
-
},
|
|
11636
|
-
{
|
|
11637
|
-
icon: "content_paste",
|
|
11638
|
-
action: async () => {
|
|
11639
|
-
await actionGlobalPasteState(pinia);
|
|
11640
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11641
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11642
|
-
},
|
|
11643
|
-
tooltip: "Replace the state with the content of your clipboard"
|
|
11644
|
-
},
|
|
11645
|
-
{
|
|
11646
|
-
icon: "save",
|
|
11647
|
-
action: () => {
|
|
11648
|
-
actionGlobalSaveState(pinia);
|
|
11649
|
-
},
|
|
11650
|
-
tooltip: "Save the state as a JSON file"
|
|
11651
|
-
},
|
|
11652
|
-
{
|
|
11653
|
-
icon: "folder_open",
|
|
11654
|
-
action: async () => {
|
|
11655
|
-
await actionGlobalOpenStateFile(pinia);
|
|
11656
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11657
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11658
|
-
},
|
|
11659
|
-
tooltip: "Import the state from a JSON file"
|
|
11660
|
-
}
|
|
11661
|
-
],
|
|
11662
|
-
nodeActions: [{
|
|
11663
|
-
icon: "restore",
|
|
11664
|
-
tooltip: "Reset the state (with \"$reset\")",
|
|
11665
|
-
action: (nodeId) => {
|
|
11666
|
-
const store = pinia._s.get(nodeId);
|
|
11667
|
-
if (!store) toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
|
|
11668
|
-
else if (typeof store.$reset !== "function") toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
|
|
11669
|
-
else {
|
|
11670
|
-
store.$reset();
|
|
11671
|
-
toastMessage(`Store "${nodeId}" reset.`);
|
|
11672
|
-
}
|
|
11673
|
-
}
|
|
11674
|
-
}]
|
|
11675
|
-
});
|
|
11676
|
-
api.on.inspectComponent((payload, ctx) => {
|
|
11677
|
-
const proxy = payload.componentInstance && payload.componentInstance.proxy;
|
|
11678
|
-
if (proxy && proxy._pStores) {
|
|
11679
|
-
const piniaStores = payload.componentInstance.proxy._pStores;
|
|
11680
|
-
Object.values(piniaStores).forEach((store) => {
|
|
11681
|
-
payload.instanceData.state.push({
|
|
11682
|
-
type: getStoreType(store.$id),
|
|
11683
|
-
key: "state",
|
|
11684
|
-
editable: true,
|
|
11685
|
-
value: store._isOptionsAPI ? { _custom: {
|
|
11686
|
-
value: toRaw(store.$state),
|
|
11687
|
-
actions: [{
|
|
11688
|
-
icon: "restore",
|
|
11689
|
-
tooltip: "Reset the state of this store",
|
|
11690
|
-
action: () => store.$reset()
|
|
11691
|
-
}]
|
|
11692
|
-
} } : Object.keys(store.$state).reduce((state, key) => {
|
|
11693
|
-
state[key] = store.$state[key];
|
|
11694
|
-
return state;
|
|
11695
|
-
}, {})
|
|
11696
|
-
});
|
|
11697
|
-
if (store._getters && store._getters.length) payload.instanceData.state.push({
|
|
11698
|
-
type: getStoreType(store.$id),
|
|
11699
|
-
key: "getters",
|
|
11700
|
-
editable: false,
|
|
11701
|
-
value: store._getters.reduce((getters, key) => {
|
|
11702
|
-
try {
|
|
11703
|
-
getters[key] = store[key];
|
|
11704
|
-
} catch (error) {
|
|
11705
|
-
getters[key] = error;
|
|
11706
|
-
}
|
|
11707
|
-
return getters;
|
|
11708
|
-
}, {})
|
|
11709
|
-
});
|
|
11710
|
-
});
|
|
11711
|
-
}
|
|
11712
|
-
});
|
|
11713
|
-
api.on.getInspectorTree((payload) => {
|
|
11714
|
-
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
11715
|
-
let stores = [pinia];
|
|
11716
|
-
stores = stores.concat(Array.from(pinia._s.values()));
|
|
11717
|
-
payload.rootNodes = (payload.filter ? stores.filter((store) => "$id" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);
|
|
11718
|
-
}
|
|
11719
|
-
});
|
|
11720
|
-
api.on.getInspectorState((payload) => {
|
|
11721
|
-
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
11722
|
-
const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
|
|
11723
|
-
if (!inspectedStore) return;
|
|
11724
|
-
if (inspectedStore) payload.state = formatStoreForInspectorState(inspectedStore);
|
|
11725
|
-
}
|
|
11726
|
-
});
|
|
11727
|
-
api.on.editInspectorState((payload, ctx) => {
|
|
11728
|
-
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
11729
|
-
const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
|
|
11730
|
-
if (!inspectedStore) return toastMessage(`store "${payload.nodeId}" not found`, "error");
|
|
11731
|
-
const { path } = payload;
|
|
11732
|
-
if (!isPinia(inspectedStore)) {
|
|
11733
|
-
if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) path.unshift("$state");
|
|
11734
|
-
} else path.unshift("state");
|
|
11735
|
-
isTimelineActive = false;
|
|
11736
|
-
payload.set(inspectedStore, path, payload.state.value);
|
|
11737
|
-
isTimelineActive = true;
|
|
11738
|
-
}
|
|
11739
|
-
});
|
|
11740
|
-
api.on.editComponentState((payload) => {
|
|
11741
|
-
if (payload.type.startsWith("🍍")) {
|
|
11742
|
-
const storeId = payload.type.replace(/^🍍\s*/, "");
|
|
11743
|
-
const store = pinia._s.get(storeId);
|
|
11744
|
-
if (!store) return toastMessage(`store "${storeId}" not found`, "error");
|
|
11745
|
-
const { path } = payload;
|
|
11746
|
-
if (path[0] !== "state") return toastMessage(`Invalid path for store "${storeId}":\n${path}\nOnly state can be modified.`);
|
|
11747
|
-
path[0] = "$state";
|
|
11748
|
-
isTimelineActive = false;
|
|
11749
|
-
payload.set(store, path, payload.state.value);
|
|
11750
|
-
isTimelineActive = true;
|
|
11751
|
-
}
|
|
11752
|
-
});
|
|
11753
|
-
});
|
|
11689
|
+
//#endregion
|
|
11690
|
+
//#region ../../node_modules/lodash-es/_hashHas.js
|
|
11691
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
11692
|
+
function hashHas(key) {
|
|
11693
|
+
var data = this.__data__;
|
|
11694
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
11754
11695
|
}
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
componentStateTypes,
|
|
11764
|
-
app,
|
|
11765
|
-
settings: { logStoreChanges: {
|
|
11766
|
-
label: "Notify about new/deleted stores",
|
|
11767
|
-
type: "boolean",
|
|
11768
|
-
defaultValue: true
|
|
11769
|
-
} }
|
|
11770
|
-
}, (api) => {
|
|
11771
|
-
const now = typeof api.now === "function" ? api.now.bind(api) : Date.now;
|
|
11772
|
-
store.$onAction(({ after, onError, name, args }) => {
|
|
11773
|
-
const groupId = runningActionId++;
|
|
11774
|
-
api.addTimelineEvent({
|
|
11775
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11776
|
-
event: {
|
|
11777
|
-
time: now(),
|
|
11778
|
-
title: "🛫 " + name,
|
|
11779
|
-
subtitle: "start",
|
|
11780
|
-
data: {
|
|
11781
|
-
store: formatDisplay(store.$id),
|
|
11782
|
-
action: formatDisplay(name),
|
|
11783
|
-
args
|
|
11784
|
-
},
|
|
11785
|
-
groupId
|
|
11786
|
-
}
|
|
11787
|
-
});
|
|
11788
|
-
after((result) => {
|
|
11789
|
-
activeAction = void 0;
|
|
11790
|
-
api.addTimelineEvent({
|
|
11791
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11792
|
-
event: {
|
|
11793
|
-
time: now(),
|
|
11794
|
-
title: "🛬 " + name,
|
|
11795
|
-
subtitle: "end",
|
|
11796
|
-
data: {
|
|
11797
|
-
store: formatDisplay(store.$id),
|
|
11798
|
-
action: formatDisplay(name),
|
|
11799
|
-
args,
|
|
11800
|
-
result
|
|
11801
|
-
},
|
|
11802
|
-
groupId
|
|
11803
|
-
}
|
|
11804
|
-
});
|
|
11805
|
-
});
|
|
11806
|
-
onError((error) => {
|
|
11807
|
-
activeAction = void 0;
|
|
11808
|
-
api.addTimelineEvent({
|
|
11809
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11810
|
-
event: {
|
|
11811
|
-
time: now(),
|
|
11812
|
-
logType: "error",
|
|
11813
|
-
title: "💥 " + name,
|
|
11814
|
-
subtitle: "end",
|
|
11815
|
-
data: {
|
|
11816
|
-
store: formatDisplay(store.$id),
|
|
11817
|
-
action: formatDisplay(name),
|
|
11818
|
-
args,
|
|
11819
|
-
error
|
|
11820
|
-
},
|
|
11821
|
-
groupId
|
|
11822
|
-
}
|
|
11823
|
-
});
|
|
11824
|
-
});
|
|
11825
|
-
}, true);
|
|
11826
|
-
store._customProperties.forEach((name) => {
|
|
11827
|
-
watch(() => unref(store[name]), (newValue, oldValue) => {
|
|
11828
|
-
api.notifyComponentUpdate();
|
|
11829
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11830
|
-
if (isTimelineActive) api.addTimelineEvent({
|
|
11831
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11832
|
-
event: {
|
|
11833
|
-
time: now(),
|
|
11834
|
-
title: "Change",
|
|
11835
|
-
subtitle: name,
|
|
11836
|
-
data: {
|
|
11837
|
-
newValue,
|
|
11838
|
-
oldValue
|
|
11839
|
-
},
|
|
11840
|
-
groupId: activeAction
|
|
11841
|
-
}
|
|
11842
|
-
});
|
|
11843
|
-
}, { deep: true });
|
|
11844
|
-
});
|
|
11845
|
-
store.$subscribe(({ events, type }, state) => {
|
|
11846
|
-
api.notifyComponentUpdate();
|
|
11847
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11848
|
-
if (!isTimelineActive) return;
|
|
11849
|
-
const eventData = {
|
|
11850
|
-
time: now(),
|
|
11851
|
-
title: formatMutationType(type),
|
|
11852
|
-
data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),
|
|
11853
|
-
groupId: activeAction
|
|
11854
|
-
};
|
|
11855
|
-
if (type === MutationType.patchFunction) eventData.subtitle = "⤵️";
|
|
11856
|
-
else if (type === MutationType.patchObject) eventData.subtitle = "🧩";
|
|
11857
|
-
else if (events && !Array.isArray(events)) eventData.subtitle = events.type;
|
|
11858
|
-
if (events) eventData.data["rawEvent(s)"] = { _custom: {
|
|
11859
|
-
display: "DebuggerEvent",
|
|
11860
|
-
type: "object",
|
|
11861
|
-
tooltip: "raw DebuggerEvent[]",
|
|
11862
|
-
value: events
|
|
11863
|
-
} };
|
|
11864
|
-
api.addTimelineEvent({
|
|
11865
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11866
|
-
event: eventData
|
|
11867
|
-
});
|
|
11868
|
-
}, {
|
|
11869
|
-
detached: true,
|
|
11870
|
-
flush: "sync"
|
|
11871
|
-
});
|
|
11872
|
-
const hotUpdate = store._hotUpdate;
|
|
11873
|
-
store._hotUpdate = markRaw((newStore) => {
|
|
11874
|
-
hotUpdate(newStore);
|
|
11875
|
-
api.addTimelineEvent({
|
|
11876
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11877
|
-
event: {
|
|
11878
|
-
time: now(),
|
|
11879
|
-
title: "🔥 " + store.$id,
|
|
11880
|
-
subtitle: "HMR update",
|
|
11881
|
-
data: {
|
|
11882
|
-
store: formatDisplay(store.$id),
|
|
11883
|
-
info: formatDisplay(`HMR update`)
|
|
11884
|
-
}
|
|
11885
|
-
}
|
|
11886
|
-
});
|
|
11887
|
-
api.notifyComponentUpdate();
|
|
11888
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11889
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11890
|
-
});
|
|
11891
|
-
const { $dispose } = store;
|
|
11892
|
-
store.$dispose = () => {
|
|
11893
|
-
$dispose();
|
|
11894
|
-
api.notifyComponentUpdate();
|
|
11895
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11896
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11897
|
-
api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`);
|
|
11898
|
-
};
|
|
11899
|
-
api.notifyComponentUpdate();
|
|
11900
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11901
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11902
|
-
api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`);
|
|
11903
|
-
});
|
|
11696
|
+
//#endregion
|
|
11697
|
+
//#region ../../node_modules/lodash-es/_hashSet.js
|
|
11698
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
11699
|
+
function hashSet(key, value) {
|
|
11700
|
+
var data = this.__data__;
|
|
11701
|
+
this.size += this.has(key) ? 0 : 1;
|
|
11702
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
11703
|
+
return this;
|
|
11904
11704
|
}
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
function
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
const trackedStore = wrapWithProxy ? new Proxy(store, {
|
|
11915
|
-
get(...args) {
|
|
11916
|
-
activeAction = _actionId;
|
|
11917
|
-
return Reflect.get(...args);
|
|
11918
|
-
},
|
|
11919
|
-
set(...args) {
|
|
11920
|
-
activeAction = _actionId;
|
|
11921
|
-
return Reflect.set(...args);
|
|
11922
|
-
}
|
|
11923
|
-
}) : store;
|
|
11924
|
-
activeAction = _actionId;
|
|
11925
|
-
const retValue = actions[actionName].apply(trackedStore, arguments);
|
|
11926
|
-
activeAction = void 0;
|
|
11927
|
-
return retValue;
|
|
11928
|
-
};
|
|
11705
|
+
//#endregion
|
|
11706
|
+
//#region ../../node_modules/lodash-es/_Hash.js
|
|
11707
|
+
function Hash(entries) {
|
|
11708
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
11709
|
+
this.clear();
|
|
11710
|
+
while (++index < length) {
|
|
11711
|
+
var entry = entries[index];
|
|
11712
|
+
this.set(entry[0], entry[1]);
|
|
11713
|
+
}
|
|
11929
11714
|
}
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11715
|
+
Hash.prototype.clear = hashClear;
|
|
11716
|
+
Hash.prototype["delete"] = hashDelete;
|
|
11717
|
+
Hash.prototype.get = hashGet;
|
|
11718
|
+
Hash.prototype.has = hashHas;
|
|
11719
|
+
Hash.prototype.set = hashSet;
|
|
11720
|
+
//#endregion
|
|
11721
|
+
//#region ../../node_modules/lodash-es/_listCacheClear.js
|
|
11722
|
+
function listCacheClear() {
|
|
11723
|
+
this.__data__ = [];
|
|
11724
|
+
this.size = 0;
|
|
11940
11725
|
}
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
install(app) {
|
|
11948
|
-
setActivePinia(pinia);
|
|
11949
|
-
pinia._a = app;
|
|
11950
|
-
app.provide(piniaSymbol, pinia);
|
|
11951
|
-
app.config.globalProperties.$pinia = pinia;
|
|
11952
|
-
/* istanbul ignore else */
|
|
11953
|
-
if (USE_DEVTOOLS) registerPiniaDevtools(app, pinia);
|
|
11954
|
-
toBeInstalled.forEach((plugin) => _p.push(plugin));
|
|
11955
|
-
toBeInstalled = [];
|
|
11956
|
-
},
|
|
11957
|
-
use(plugin) {
|
|
11958
|
-
if (!this._a && true) toBeInstalled.push(plugin);
|
|
11959
|
-
else _p.push(plugin);
|
|
11960
|
-
return this;
|
|
11961
|
-
},
|
|
11962
|
-
_p,
|
|
11963
|
-
_a: null,
|
|
11964
|
-
_e: scope,
|
|
11965
|
-
_s: /* @__PURE__ */ new Map(),
|
|
11966
|
-
state
|
|
11967
|
-
});
|
|
11968
|
-
if (USE_DEVTOOLS && typeof Proxy !== "undefined") pinia.use(devtoolsPlugin);
|
|
11969
|
-
return pinia;
|
|
11726
|
+
//#endregion
|
|
11727
|
+
//#region ../../node_modules/lodash-es/_assocIndexOf.js
|
|
11728
|
+
function assocIndexOf(array, key) {
|
|
11729
|
+
var length = array.length;
|
|
11730
|
+
while (length--) if (eq(array[length][0], key)) return length;
|
|
11731
|
+
return -1;
|
|
11970
11732
|
}
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11733
|
+
//#endregion
|
|
11734
|
+
//#region ../../node_modules/lodash-es/_listCacheDelete.js
|
|
11735
|
+
var splice = Array.prototype.splice;
|
|
11736
|
+
function listCacheDelete(key) {
|
|
11737
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
11738
|
+
if (index < 0) return false;
|
|
11739
|
+
if (index == data.length - 1) data.pop();
|
|
11740
|
+
else splice.call(data, index, 1);
|
|
11741
|
+
--this.size;
|
|
11742
|
+
return true;
|
|
11743
|
+
}
|
|
11744
|
+
//#endregion
|
|
11745
|
+
//#region ../../node_modules/lodash-es/_listCacheGet.js
|
|
11746
|
+
function listCacheGet(key) {
|
|
11747
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
11748
|
+
return index < 0 ? void 0 : data[index][1];
|
|
11749
|
+
}
|
|
11750
|
+
//#endregion
|
|
11751
|
+
//#region ../../node_modules/lodash-es/_listCacheHas.js
|
|
11752
|
+
function listCacheHas(key) {
|
|
11753
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
11754
|
+
}
|
|
11755
|
+
//#endregion
|
|
11756
|
+
//#region ../../node_modules/lodash-es/_listCacheSet.js
|
|
11757
|
+
function listCacheSet(key, value) {
|
|
11758
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
11759
|
+
if (index < 0) {
|
|
11760
|
+
++this.size;
|
|
11761
|
+
data.push([key, value]);
|
|
11762
|
+
} else data[index][1] = value;
|
|
11763
|
+
return this;
|
|
11764
|
+
}
|
|
11765
|
+
//#endregion
|
|
11766
|
+
//#region ../../node_modules/lodash-es/_ListCache.js
|
|
11767
|
+
function ListCache(entries) {
|
|
11768
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
11769
|
+
this.clear();
|
|
11770
|
+
while (++index < length) {
|
|
11771
|
+
var entry = entries[index];
|
|
11772
|
+
this.set(entry[0], entry[1]);
|
|
11978
11773
|
}
|
|
11979
|
-
return newState;
|
|
11980
11774
|
}
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11775
|
+
ListCache.prototype.clear = listCacheClear;
|
|
11776
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
11777
|
+
ListCache.prototype.get = listCacheGet;
|
|
11778
|
+
ListCache.prototype.has = listCacheHas;
|
|
11779
|
+
ListCache.prototype.set = listCacheSet;
|
|
11780
|
+
//#endregion
|
|
11781
|
+
//#region ../../node_modules/lodash-es/_Map.js
|
|
11782
|
+
var Map$1 = getNative(root, "Map");
|
|
11783
|
+
//#endregion
|
|
11784
|
+
//#region ../../node_modules/lodash-es/_mapCacheClear.js
|
|
11785
|
+
function mapCacheClear() {
|
|
11786
|
+
this.size = 0;
|
|
11787
|
+
this.__data__ = {
|
|
11788
|
+
"hash": new Hash(),
|
|
11789
|
+
"map": new (Map$1 || ListCache)(),
|
|
11790
|
+
"string": new Hash()
|
|
11990
11791
|
};
|
|
11991
|
-
if (!detached && getCurrentScope()) onScopeDispose(removeSubscription);
|
|
11992
|
-
return removeSubscription;
|
|
11993
11792
|
}
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11793
|
+
//#endregion
|
|
11794
|
+
//#region ../../node_modules/lodash-es/_isKeyable.js
|
|
11795
|
+
function isKeyable(value) {
|
|
11796
|
+
var type = typeof value;
|
|
11797
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
11998
11798
|
}
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
if (!patchToApply.hasOwnProperty(key)) continue;
|
|
12005
|
-
const subPatch = patchToApply[key];
|
|
12006
|
-
const targetValue = target[key];
|
|
12007
|
-
if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) target[key] = mergeReactiveObjects(targetValue, subPatch);
|
|
12008
|
-
else target[key] = subPatch;
|
|
12009
|
-
}
|
|
12010
|
-
return target;
|
|
11799
|
+
//#endregion
|
|
11800
|
+
//#region ../../node_modules/lodash-es/_getMapData.js
|
|
11801
|
+
function getMapData(map, key) {
|
|
11802
|
+
var data = map.__data__;
|
|
11803
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
12011
11804
|
}
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
11805
|
+
//#endregion
|
|
11806
|
+
//#region ../../node_modules/lodash-es/_mapCacheDelete.js
|
|
11807
|
+
function mapCacheDelete(key) {
|
|
11808
|
+
var result = getMapData(this, key)["delete"](key);
|
|
11809
|
+
this.size -= result ? 1 : 0;
|
|
11810
|
+
return result;
|
|
12015
11811
|
}
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
11812
|
+
//#endregion
|
|
11813
|
+
//#region ../../node_modules/lodash-es/_mapCacheGet.js
|
|
11814
|
+
function mapCacheGet(key) {
|
|
11815
|
+
return getMapData(this, key).get(key);
|
|
12019
11816
|
}
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
11817
|
+
//#endregion
|
|
11818
|
+
//#region ../../node_modules/lodash-es/_mapCacheHas.js
|
|
11819
|
+
function mapCacheHas(key) {
|
|
11820
|
+
return getMapData(this, key).has(key);
|
|
11821
|
+
}
|
|
11822
|
+
//#endregion
|
|
11823
|
+
//#region ../../node_modules/lodash-es/_mapCacheSet.js
|
|
11824
|
+
function mapCacheSet(key, value) {
|
|
11825
|
+
var data = getMapData(this, key), size = data.size;
|
|
11826
|
+
data.set(key, value);
|
|
11827
|
+
this.size += data.size == size ? 0 : 1;
|
|
11828
|
+
return this;
|
|
11829
|
+
}
|
|
11830
|
+
//#endregion
|
|
11831
|
+
//#region ../../node_modules/lodash-es/_MapCache.js
|
|
11832
|
+
function MapCache(entries) {
|
|
11833
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
11834
|
+
this.clear();
|
|
11835
|
+
while (++index < length) {
|
|
11836
|
+
var entry = entries[index];
|
|
11837
|
+
this.set(entry[0], entry[1]);
|
|
12036
11838
|
}
|
|
12037
|
-
store = createSetupStore(id, setup, options, pinia, hot, true);
|
|
12038
|
-
return store;
|
|
12039
11839
|
}
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
let isListening;
|
|
12057
|
-
let isSyncListening;
|
|
12058
|
-
let subscriptions = [];
|
|
12059
|
-
let actionSubscriptions = [];
|
|
12060
|
-
let debuggerEvents;
|
|
12061
|
-
const initialState = pinia.state.value[$id];
|
|
12062
|
-
if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== "production") || !hot)) pinia.state.value[$id] = {};
|
|
12063
|
-
const hotState = ref({});
|
|
12064
|
-
let activeListener;
|
|
12065
|
-
function $patch(partialStateOrMutator) {
|
|
12066
|
-
let subscriptionMutation;
|
|
12067
|
-
isListening = isSyncListening = false;
|
|
12068
|
-
/* istanbul ignore else */
|
|
12069
|
-
if (process.env.NODE_ENV !== "production") debuggerEvents = [];
|
|
12070
|
-
if (typeof partialStateOrMutator === "function") {
|
|
12071
|
-
partialStateOrMutator(pinia.state.value[$id]);
|
|
12072
|
-
subscriptionMutation = {
|
|
12073
|
-
type: MutationType.patchFunction,
|
|
12074
|
-
storeId: $id,
|
|
12075
|
-
events: debuggerEvents
|
|
12076
|
-
};
|
|
12077
|
-
} else {
|
|
12078
|
-
mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
|
|
12079
|
-
subscriptionMutation = {
|
|
12080
|
-
type: MutationType.patchObject,
|
|
12081
|
-
payload: partialStateOrMutator,
|
|
12082
|
-
storeId: $id,
|
|
12083
|
-
events: debuggerEvents
|
|
12084
|
-
};
|
|
12085
|
-
}
|
|
12086
|
-
const myListenerId = activeListener = Symbol();
|
|
12087
|
-
nextTick().then(() => {
|
|
12088
|
-
if (activeListener === myListenerId) isListening = true;
|
|
12089
|
-
});
|
|
12090
|
-
isSyncListening = true;
|
|
12091
|
-
triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
|
|
12092
|
-
}
|
|
12093
|
-
const $reset = isOptionsStore ? function $reset() {
|
|
12094
|
-
const { state } = options;
|
|
12095
|
-
const newState = state ? state() : {};
|
|
12096
|
-
this.$patch(($state) => {
|
|
12097
|
-
assign($state, newState);
|
|
12098
|
-
});
|
|
12099
|
-
} : process.env.NODE_ENV !== "production" ? () => {
|
|
12100
|
-
throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
|
|
12101
|
-
} : noop;
|
|
12102
|
-
function $dispose() {
|
|
12103
|
-
scope.stop();
|
|
12104
|
-
subscriptions = [];
|
|
12105
|
-
actionSubscriptions = [];
|
|
12106
|
-
pinia._s.delete($id);
|
|
12107
|
-
}
|
|
12108
|
-
function wrapAction(name, action) {
|
|
12109
|
-
return function() {
|
|
12110
|
-
setActivePinia(pinia);
|
|
12111
|
-
const args = Array.from(arguments);
|
|
12112
|
-
const afterCallbackList = [];
|
|
12113
|
-
const onErrorCallbackList = [];
|
|
12114
|
-
function after(callback) {
|
|
12115
|
-
afterCallbackList.push(callback);
|
|
12116
|
-
}
|
|
12117
|
-
function onError(callback) {
|
|
12118
|
-
onErrorCallbackList.push(callback);
|
|
12119
|
-
}
|
|
12120
|
-
triggerSubscriptions(actionSubscriptions, {
|
|
12121
|
-
args,
|
|
12122
|
-
name,
|
|
12123
|
-
store,
|
|
12124
|
-
after,
|
|
12125
|
-
onError
|
|
12126
|
-
});
|
|
12127
|
-
let ret;
|
|
12128
|
-
try {
|
|
12129
|
-
ret = action.apply(this && this.$id === $id ? this : store, args);
|
|
12130
|
-
} catch (error) {
|
|
12131
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
12132
|
-
throw error;
|
|
12133
|
-
}
|
|
12134
|
-
if (ret instanceof Promise) return ret.then((value) => {
|
|
12135
|
-
triggerSubscriptions(afterCallbackList, value);
|
|
12136
|
-
return value;
|
|
12137
|
-
}).catch((error) => {
|
|
12138
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
12139
|
-
return Promise.reject(error);
|
|
12140
|
-
});
|
|
12141
|
-
triggerSubscriptions(afterCallbackList, ret);
|
|
12142
|
-
return ret;
|
|
12143
|
-
};
|
|
12144
|
-
}
|
|
12145
|
-
const _hmrPayload = /*#__PURE__*/ markRaw({
|
|
12146
|
-
actions: {},
|
|
12147
|
-
getters: {},
|
|
12148
|
-
state: [],
|
|
12149
|
-
hotState
|
|
12150
|
-
});
|
|
12151
|
-
const partialStore = {
|
|
12152
|
-
_p: pinia,
|
|
12153
|
-
$id,
|
|
12154
|
-
$onAction: addSubscription.bind(null, actionSubscriptions),
|
|
12155
|
-
$patch,
|
|
12156
|
-
$reset,
|
|
12157
|
-
$subscribe(callback, options = {}) {
|
|
12158
|
-
const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());
|
|
12159
|
-
const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
|
|
12160
|
-
if (options.flush === "sync" ? isSyncListening : isListening) callback({
|
|
12161
|
-
storeId: $id,
|
|
12162
|
-
type: MutationType.direct,
|
|
12163
|
-
events: debuggerEvents
|
|
12164
|
-
}, state);
|
|
12165
|
-
}, assign({}, $subscribeOptions, options)));
|
|
12166
|
-
return removeSubscription;
|
|
12167
|
-
},
|
|
12168
|
-
$dispose
|
|
11840
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
11841
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
11842
|
+
MapCache.prototype.get = mapCacheGet;
|
|
11843
|
+
MapCache.prototype.has = mapCacheHas;
|
|
11844
|
+
MapCache.prototype.set = mapCacheSet;
|
|
11845
|
+
//#endregion
|
|
11846
|
+
//#region ../../node_modules/lodash-es/memoize.js
|
|
11847
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
11848
|
+
function memoize(func, resolver) {
|
|
11849
|
+
if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT);
|
|
11850
|
+
var memoized = function() {
|
|
11851
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
11852
|
+
if (cache.has(key)) return cache.get(key);
|
|
11853
|
+
var result = func.apply(this, args);
|
|
11854
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
11855
|
+
return result;
|
|
12169
11856
|
};
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
if (initialState && shouldHydrate(prop)) {
|
|
12182
|
-
if (isRef(prop)) prop.value = initialState[key];
|
|
12183
|
-
else mergeReactiveObjects(prop, initialState[key]);
|
|
12184
|
-
}
|
|
12185
|
-
pinia.state.value[$id][key] = prop;
|
|
12186
|
-
}
|
|
12187
|
-
/* istanbul ignore else */
|
|
12188
|
-
if (process.env.NODE_ENV !== "production") _hmrPayload.state.push(key);
|
|
12189
|
-
} else if (typeof prop === "function") {
|
|
12190
|
-
setupStore[key] = process.env.NODE_ENV !== "production" && hot ? prop : wrapAction(key, prop);
|
|
12191
|
-
/* istanbul ignore else */
|
|
12192
|
-
if (process.env.NODE_ENV !== "production") _hmrPayload.actions[key] = prop;
|
|
12193
|
-
optionsForPlugin.actions[key] = prop;
|
|
12194
|
-
} else if (process.env.NODE_ENV !== "production") {
|
|
12195
|
-
if (isComputed(prop)) {
|
|
12196
|
-
_hmrPayload.getters[key] = isOptionsStore ? options.getters[key] : prop;
|
|
12197
|
-
if (IS_CLIENT) (setupStore._getters || (setupStore._getters = markRaw([]))).push(key);
|
|
12198
|
-
}
|
|
12199
|
-
}
|
|
12200
|
-
}
|
|
12201
|
-
assign(store, setupStore);
|
|
12202
|
-
assign(toRaw(store), setupStore);
|
|
12203
|
-
Object.defineProperty(store, "$state", {
|
|
12204
|
-
get: () => process.env.NODE_ENV !== "production" && hot ? hotState.value : pinia.state.value[$id],
|
|
12205
|
-
set: (state) => {
|
|
12206
|
-
/* istanbul ignore if */
|
|
12207
|
-
if (process.env.NODE_ENV !== "production" && hot) throw new Error("cannot set hotState");
|
|
12208
|
-
$patch(($state) => {
|
|
12209
|
-
assign($state, state);
|
|
12210
|
-
});
|
|
12211
|
-
}
|
|
11857
|
+
memoized.cache = new (memoize.Cache || MapCache)();
|
|
11858
|
+
return memoized;
|
|
11859
|
+
}
|
|
11860
|
+
memoize.Cache = MapCache;
|
|
11861
|
+
//#endregion
|
|
11862
|
+
//#region ../../node_modules/lodash-es/_memoizeCapped.js
|
|
11863
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
11864
|
+
function memoizeCapped(func) {
|
|
11865
|
+
var result = memoize(func, function(key) {
|
|
11866
|
+
if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
|
|
11867
|
+
return key;
|
|
12212
11868
|
});
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
Object.keys(store.$state).forEach((stateKey) => {
|
|
12226
|
-
if (!(stateKey in newStore.$state)) del(store, stateKey);
|
|
12227
|
-
});
|
|
12228
|
-
isListening = false;
|
|
12229
|
-
isSyncListening = false;
|
|
12230
|
-
pinia.state.value[$id] = toRef(newStore._hmrPayload, "hotState");
|
|
12231
|
-
isSyncListening = true;
|
|
12232
|
-
nextTick().then(() => {
|
|
12233
|
-
isListening = true;
|
|
12234
|
-
});
|
|
12235
|
-
for (const actionName in newStore._hmrPayload.actions) {
|
|
12236
|
-
const action = newStore[actionName];
|
|
12237
|
-
set(store, actionName, wrapAction(actionName, action));
|
|
12238
|
-
}
|
|
12239
|
-
for (const getterName in newStore._hmrPayload.getters) {
|
|
12240
|
-
const getter = newStore._hmrPayload.getters[getterName];
|
|
12241
|
-
const getterValue = isOptionsStore ? computed(() => {
|
|
12242
|
-
setActivePinia(pinia);
|
|
12243
|
-
return getter.call(store, store);
|
|
12244
|
-
}) : getter;
|
|
12245
|
-
set(store, getterName, getterValue);
|
|
12246
|
-
}
|
|
12247
|
-
Object.keys(store._hmrPayload.getters).forEach((key) => {
|
|
12248
|
-
if (!(key in newStore._hmrPayload.getters)) del(store, key);
|
|
12249
|
-
});
|
|
12250
|
-
Object.keys(store._hmrPayload.actions).forEach((key) => {
|
|
12251
|
-
if (!(key in newStore._hmrPayload.actions)) del(store, key);
|
|
12252
|
-
});
|
|
12253
|
-
store._hmrPayload = newStore._hmrPayload;
|
|
12254
|
-
store._getters = newStore._getters;
|
|
12255
|
-
store._hotUpdating = false;
|
|
11869
|
+
var cache = result.cache;
|
|
11870
|
+
return result;
|
|
11871
|
+
}
|
|
11872
|
+
//#endregion
|
|
11873
|
+
//#region ../../node_modules/lodash-es/_stringToPath.js
|
|
11874
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
11875
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
11876
|
+
var stringToPath = memoizeCapped(function(string) {
|
|
11877
|
+
var result = [];
|
|
11878
|
+
if (string.charCodeAt(0) === 46) result.push("");
|
|
11879
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
11880
|
+
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
12256
11881
|
});
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
|
|
11882
|
+
return result;
|
|
11883
|
+
});
|
|
11884
|
+
//#endregion
|
|
11885
|
+
//#region ../../node_modules/lodash-es/toString.js
|
|
11886
|
+
function toString(value) {
|
|
11887
|
+
return value == null ? "" : baseToString(value);
|
|
11888
|
+
}
|
|
11889
|
+
//#endregion
|
|
11890
|
+
//#region ../../node_modules/lodash-es/_castPath.js
|
|
11891
|
+
function castPath(value, object) {
|
|
11892
|
+
if (isArray(value)) return value;
|
|
11893
|
+
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
11894
|
+
}
|
|
11895
|
+
//#endregion
|
|
11896
|
+
//#region ../../node_modules/lodash-es/_toKey.js
|
|
11897
|
+
var INFINITY = 1 / 0;
|
|
11898
|
+
function toKey(value) {
|
|
11899
|
+
if (typeof value == "string" || isSymbol(value)) return value;
|
|
11900
|
+
var result = value + "";
|
|
11901
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
11902
|
+
}
|
|
11903
|
+
//#endregion
|
|
11904
|
+
//#region ../../node_modules/lodash-es/_baseGet.js
|
|
11905
|
+
function baseGet(object, path) {
|
|
11906
|
+
path = castPath(path, object);
|
|
11907
|
+
var index = 0, length = path.length;
|
|
11908
|
+
while (object != null && index < length) object = object[toKey(path[index++])];
|
|
11909
|
+
return index && index == length ? object : void 0;
|
|
11910
|
+
}
|
|
11911
|
+
//#endregion
|
|
11912
|
+
//#region ../../node_modules/lodash-es/get.js
|
|
11913
|
+
function get(object, path, defaultValue) {
|
|
11914
|
+
var result = object == null ? void 0 : baseGet(object, path);
|
|
11915
|
+
return result === void 0 ? defaultValue : result;
|
|
11916
|
+
}
|
|
11917
|
+
//#endregion
|
|
11918
|
+
//#region ../../node_modules/lodash-es/_baseSlice.js
|
|
11919
|
+
function baseSlice(array, start, end) {
|
|
11920
|
+
var index = -1, length = array.length;
|
|
11921
|
+
if (start < 0) start = -start > length ? 0 : length + start;
|
|
11922
|
+
end = end > length ? length : end;
|
|
11923
|
+
if (end < 0) end += length;
|
|
11924
|
+
length = start > end ? 0 : end - start >>> 0;
|
|
11925
|
+
start >>>= 0;
|
|
11926
|
+
var result = Array(length);
|
|
11927
|
+
while (++index < length) result[index] = array[index + start];
|
|
11928
|
+
return result;
|
|
11929
|
+
}
|
|
11930
|
+
//#endregion
|
|
11931
|
+
//#region ../../node_modules/lodash-es/_castSlice.js
|
|
11932
|
+
function castSlice(array, start, end) {
|
|
11933
|
+
var length = array.length;
|
|
11934
|
+
end = end === void 0 ? length : end;
|
|
11935
|
+
return !start && end >= length ? array : baseSlice(array, start, end);
|
|
11936
|
+
}
|
|
11937
|
+
//#endregion
|
|
11938
|
+
//#region ../../node_modules/lodash-es/_hasUnicode.js
|
|
11939
|
+
var reHasUnicode = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");
|
|
11940
|
+
function hasUnicode(string) {
|
|
11941
|
+
return reHasUnicode.test(string);
|
|
11942
|
+
}
|
|
11943
|
+
//#endregion
|
|
11944
|
+
//#region ../../node_modules/lodash-es/_asciiToArray.js
|
|
11945
|
+
function asciiToArray(string) {
|
|
11946
|
+
return string.split("");
|
|
11947
|
+
}
|
|
11948
|
+
//#endregion
|
|
11949
|
+
//#region ../../node_modules/lodash-es/_unicodeToArray.js
|
|
11950
|
+
var rsAstralRange$1 = "\\ud800-\\udfff";
|
|
11951
|
+
var rsComboRange$1 = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff";
|
|
11952
|
+
var rsVarRange$1 = "\\ufe0e\\ufe0f";
|
|
11953
|
+
var rsAstral = "[" + rsAstralRange$1 + "]";
|
|
11954
|
+
var rsCombo$1 = "[" + rsComboRange$1 + "]";
|
|
11955
|
+
var rsFitz = "\\ud83c[\\udffb-\\udfff]";
|
|
11956
|
+
var rsModifier$1 = "(?:" + rsCombo$1 + "|" + rsFitz + ")";
|
|
11957
|
+
var rsNonAstral$1 = "[^" + rsAstralRange$1 + "]";
|
|
11958
|
+
var rsRegional$1 = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
11959
|
+
var rsSurrPair$1 = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
11960
|
+
var rsZWJ$1 = "\\u200d";
|
|
11961
|
+
var reOptMod$1 = rsModifier$1 + "?";
|
|
11962
|
+
var rsOptVar$1 = "[" + rsVarRange$1 + "]?";
|
|
11963
|
+
var rsOptJoin$1 = "(?:" + rsZWJ$1 + "(?:" + [
|
|
11964
|
+
rsNonAstral$1,
|
|
11965
|
+
rsRegional$1,
|
|
11966
|
+
rsSurrPair$1
|
|
11967
|
+
].join("|") + ")" + rsOptVar$1 + reOptMod$1 + ")*";
|
|
11968
|
+
var rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1;
|
|
11969
|
+
var rsSymbol = "(?:" + [
|
|
11970
|
+
rsNonAstral$1 + rsCombo$1 + "?",
|
|
11971
|
+
rsCombo$1,
|
|
11972
|
+
rsRegional$1,
|
|
11973
|
+
rsSurrPair$1,
|
|
11974
|
+
rsAstral
|
|
11975
|
+
].join("|") + ")";
|
|
11976
|
+
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq$1, "g");
|
|
11977
|
+
function unicodeToArray(string) {
|
|
11978
|
+
return string.match(reUnicode) || [];
|
|
11979
|
+
}
|
|
11980
|
+
//#endregion
|
|
11981
|
+
//#region ../../node_modules/lodash-es/_stringToArray.js
|
|
11982
|
+
function stringToArray(string) {
|
|
11983
|
+
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
|
11984
|
+
}
|
|
11985
|
+
//#endregion
|
|
11986
|
+
//#region ../../node_modules/lodash-es/_createCaseFirst.js
|
|
11987
|
+
function createCaseFirst(methodName) {
|
|
11988
|
+
return function(string) {
|
|
11989
|
+
string = toString(string);
|
|
11990
|
+
var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
|
|
11991
|
+
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
|
11992
|
+
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
|
11993
|
+
return chr[methodName]() + trailing;
|
|
11994
|
+
};
|
|
11995
|
+
}
|
|
11996
|
+
//#endregion
|
|
11997
|
+
//#region ../../node_modules/lodash-es/upperFirst.js
|
|
11998
|
+
var upperFirst = createCaseFirst("toUpperCase");
|
|
11999
|
+
//#endregion
|
|
12000
|
+
//#region ../../node_modules/lodash-es/_arrayReduce.js
|
|
12001
|
+
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
12002
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
12003
|
+
if (initAccum && length) accumulator = array[++index];
|
|
12004
|
+
while (++index < length) accumulator = iteratee(accumulator, array[index], index, array);
|
|
12005
|
+
return accumulator;
|
|
12006
|
+
}
|
|
12007
|
+
//#endregion
|
|
12008
|
+
//#region ../../node_modules/lodash-es/_basePropertyOf.js
|
|
12009
|
+
function basePropertyOf(object) {
|
|
12010
|
+
return function(key) {
|
|
12011
|
+
return object == null ? void 0 : object[key];
|
|
12012
|
+
};
|
|
12013
|
+
}
|
|
12014
|
+
//#endregion
|
|
12015
|
+
//#region ../../node_modules/lodash-es/_deburrLetter.js
|
|
12016
|
+
var deburrLetter = basePropertyOf({
|
|
12017
|
+
"À": "A",
|
|
12018
|
+
"Á": "A",
|
|
12019
|
+
"Â": "A",
|
|
12020
|
+
"Ã": "A",
|
|
12021
|
+
"Ä": "A",
|
|
12022
|
+
"Å": "A",
|
|
12023
|
+
"à": "a",
|
|
12024
|
+
"á": "a",
|
|
12025
|
+
"â": "a",
|
|
12026
|
+
"ã": "a",
|
|
12027
|
+
"ä": "a",
|
|
12028
|
+
"å": "a",
|
|
12029
|
+
"Ç": "C",
|
|
12030
|
+
"ç": "c",
|
|
12031
|
+
"Ð": "D",
|
|
12032
|
+
"ð": "d",
|
|
12033
|
+
"È": "E",
|
|
12034
|
+
"É": "E",
|
|
12035
|
+
"Ê": "E",
|
|
12036
|
+
"Ë": "E",
|
|
12037
|
+
"è": "e",
|
|
12038
|
+
"é": "e",
|
|
12039
|
+
"ê": "e",
|
|
12040
|
+
"ë": "e",
|
|
12041
|
+
"Ì": "I",
|
|
12042
|
+
"Í": "I",
|
|
12043
|
+
"Î": "I",
|
|
12044
|
+
"Ï": "I",
|
|
12045
|
+
"ì": "i",
|
|
12046
|
+
"í": "i",
|
|
12047
|
+
"î": "i",
|
|
12048
|
+
"ï": "i",
|
|
12049
|
+
"Ñ": "N",
|
|
12050
|
+
"ñ": "n",
|
|
12051
|
+
"Ò": "O",
|
|
12052
|
+
"Ó": "O",
|
|
12053
|
+
"Ô": "O",
|
|
12054
|
+
"Õ": "O",
|
|
12055
|
+
"Ö": "O",
|
|
12056
|
+
"Ø": "O",
|
|
12057
|
+
"ò": "o",
|
|
12058
|
+
"ó": "o",
|
|
12059
|
+
"ô": "o",
|
|
12060
|
+
"õ": "o",
|
|
12061
|
+
"ö": "o",
|
|
12062
|
+
"ø": "o",
|
|
12063
|
+
"Ù": "U",
|
|
12064
|
+
"Ú": "U",
|
|
12065
|
+
"Û": "U",
|
|
12066
|
+
"Ü": "U",
|
|
12067
|
+
"ù": "u",
|
|
12068
|
+
"ú": "u",
|
|
12069
|
+
"û": "u",
|
|
12070
|
+
"ü": "u",
|
|
12071
|
+
"Ý": "Y",
|
|
12072
|
+
"ý": "y",
|
|
12073
|
+
"ÿ": "y",
|
|
12074
|
+
"Æ": "Ae",
|
|
12075
|
+
"æ": "ae",
|
|
12076
|
+
"Þ": "Th",
|
|
12077
|
+
"þ": "th",
|
|
12078
|
+
"ß": "ss",
|
|
12079
|
+
"Ā": "A",
|
|
12080
|
+
"Ă": "A",
|
|
12081
|
+
"Ą": "A",
|
|
12082
|
+
"ā": "a",
|
|
12083
|
+
"ă": "a",
|
|
12084
|
+
"ą": "a",
|
|
12085
|
+
"Ć": "C",
|
|
12086
|
+
"Ĉ": "C",
|
|
12087
|
+
"Ċ": "C",
|
|
12088
|
+
"Č": "C",
|
|
12089
|
+
"ć": "c",
|
|
12090
|
+
"ĉ": "c",
|
|
12091
|
+
"ċ": "c",
|
|
12092
|
+
"č": "c",
|
|
12093
|
+
"Ď": "D",
|
|
12094
|
+
"Đ": "D",
|
|
12095
|
+
"ď": "d",
|
|
12096
|
+
"đ": "d",
|
|
12097
|
+
"Ē": "E",
|
|
12098
|
+
"Ĕ": "E",
|
|
12099
|
+
"Ė": "E",
|
|
12100
|
+
"Ę": "E",
|
|
12101
|
+
"Ě": "E",
|
|
12102
|
+
"ē": "e",
|
|
12103
|
+
"ĕ": "e",
|
|
12104
|
+
"ė": "e",
|
|
12105
|
+
"ę": "e",
|
|
12106
|
+
"ě": "e",
|
|
12107
|
+
"Ĝ": "G",
|
|
12108
|
+
"Ğ": "G",
|
|
12109
|
+
"Ġ": "G",
|
|
12110
|
+
"Ģ": "G",
|
|
12111
|
+
"ĝ": "g",
|
|
12112
|
+
"ğ": "g",
|
|
12113
|
+
"ġ": "g",
|
|
12114
|
+
"ģ": "g",
|
|
12115
|
+
"Ĥ": "H",
|
|
12116
|
+
"Ħ": "H",
|
|
12117
|
+
"ĥ": "h",
|
|
12118
|
+
"ħ": "h",
|
|
12119
|
+
"Ĩ": "I",
|
|
12120
|
+
"Ī": "I",
|
|
12121
|
+
"Ĭ": "I",
|
|
12122
|
+
"Į": "I",
|
|
12123
|
+
"İ": "I",
|
|
12124
|
+
"ĩ": "i",
|
|
12125
|
+
"ī": "i",
|
|
12126
|
+
"ĭ": "i",
|
|
12127
|
+
"į": "i",
|
|
12128
|
+
"ı": "i",
|
|
12129
|
+
"Ĵ": "J",
|
|
12130
|
+
"ĵ": "j",
|
|
12131
|
+
"Ķ": "K",
|
|
12132
|
+
"ķ": "k",
|
|
12133
|
+
"ĸ": "k",
|
|
12134
|
+
"Ĺ": "L",
|
|
12135
|
+
"Ļ": "L",
|
|
12136
|
+
"Ľ": "L",
|
|
12137
|
+
"Ŀ": "L",
|
|
12138
|
+
"Ł": "L",
|
|
12139
|
+
"ĺ": "l",
|
|
12140
|
+
"ļ": "l",
|
|
12141
|
+
"ľ": "l",
|
|
12142
|
+
"ŀ": "l",
|
|
12143
|
+
"ł": "l",
|
|
12144
|
+
"Ń": "N",
|
|
12145
|
+
"Ņ": "N",
|
|
12146
|
+
"Ň": "N",
|
|
12147
|
+
"Ŋ": "N",
|
|
12148
|
+
"ń": "n",
|
|
12149
|
+
"ņ": "n",
|
|
12150
|
+
"ň": "n",
|
|
12151
|
+
"ŋ": "n",
|
|
12152
|
+
"Ō": "O",
|
|
12153
|
+
"Ŏ": "O",
|
|
12154
|
+
"Ő": "O",
|
|
12155
|
+
"ō": "o",
|
|
12156
|
+
"ŏ": "o",
|
|
12157
|
+
"ő": "o",
|
|
12158
|
+
"Ŕ": "R",
|
|
12159
|
+
"Ŗ": "R",
|
|
12160
|
+
"Ř": "R",
|
|
12161
|
+
"ŕ": "r",
|
|
12162
|
+
"ŗ": "r",
|
|
12163
|
+
"ř": "r",
|
|
12164
|
+
"Ś": "S",
|
|
12165
|
+
"Ŝ": "S",
|
|
12166
|
+
"Ş": "S",
|
|
12167
|
+
"Š": "S",
|
|
12168
|
+
"ś": "s",
|
|
12169
|
+
"ŝ": "s",
|
|
12170
|
+
"ş": "s",
|
|
12171
|
+
"š": "s",
|
|
12172
|
+
"Ţ": "T",
|
|
12173
|
+
"Ť": "T",
|
|
12174
|
+
"Ŧ": "T",
|
|
12175
|
+
"ţ": "t",
|
|
12176
|
+
"ť": "t",
|
|
12177
|
+
"ŧ": "t",
|
|
12178
|
+
"Ũ": "U",
|
|
12179
|
+
"Ū": "U",
|
|
12180
|
+
"Ŭ": "U",
|
|
12181
|
+
"Ů": "U",
|
|
12182
|
+
"Ű": "U",
|
|
12183
|
+
"Ų": "U",
|
|
12184
|
+
"ũ": "u",
|
|
12185
|
+
"ū": "u",
|
|
12186
|
+
"ŭ": "u",
|
|
12187
|
+
"ů": "u",
|
|
12188
|
+
"ű": "u",
|
|
12189
|
+
"ų": "u",
|
|
12190
|
+
"Ŵ": "W",
|
|
12191
|
+
"ŵ": "w",
|
|
12192
|
+
"Ŷ": "Y",
|
|
12193
|
+
"ŷ": "y",
|
|
12194
|
+
"Ÿ": "Y",
|
|
12195
|
+
"Ź": "Z",
|
|
12196
|
+
"Ż": "Z",
|
|
12197
|
+
"Ž": "Z",
|
|
12198
|
+
"ź": "z",
|
|
12199
|
+
"ż": "z",
|
|
12200
|
+
"ž": "z",
|
|
12201
|
+
"IJ": "IJ",
|
|
12202
|
+
"ij": "ij",
|
|
12203
|
+
"Œ": "Oe",
|
|
12204
|
+
"œ": "oe",
|
|
12205
|
+
"ʼn": "'n",
|
|
12206
|
+
"ſ": "s"
|
|
12207
|
+
});
|
|
12208
|
+
//#endregion
|
|
12209
|
+
//#region ../../node_modules/lodash-es/deburr.js
|
|
12210
|
+
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
12211
|
+
var reComboMark = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
12212
|
+
function deburr(string) {
|
|
12213
|
+
string = toString(string);
|
|
12214
|
+
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
12215
|
+
}
|
|
12216
|
+
//#endregion
|
|
12217
|
+
//#region ../../node_modules/lodash-es/_asciiWords.js
|
|
12218
|
+
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
12219
|
+
function asciiWords(string) {
|
|
12220
|
+
return string.match(reAsciiWord) || [];
|
|
12221
|
+
}
|
|
12222
|
+
//#endregion
|
|
12223
|
+
//#region ../../node_modules/lodash-es/_hasUnicodeWord.js
|
|
12224
|
+
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
12225
|
+
function hasUnicodeWord(string) {
|
|
12226
|
+
return reHasUnicodeWord.test(string);
|
|
12227
|
+
}
|
|
12228
|
+
//#endregion
|
|
12229
|
+
//#region ../../node_modules/lodash-es/_unicodeWords.js
|
|
12230
|
+
var rsAstralRange = "\\ud800-\\udfff";
|
|
12231
|
+
var rsComboRange = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff";
|
|
12232
|
+
var rsDingbatRange = "\\u2700-\\u27bf";
|
|
12233
|
+
var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
|
|
12234
|
+
var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
|
|
12235
|
+
var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
|
|
12236
|
+
var rsPunctuationRange = "\\u2000-\\u206f";
|
|
12237
|
+
var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
|
|
12238
|
+
var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
|
|
12239
|
+
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
12240
|
+
var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
12241
|
+
var rsApos = "['’]";
|
|
12242
|
+
var rsBreak = "[" + rsBreakRange + "]";
|
|
12243
|
+
var rsCombo = "[" + rsComboRange + "]";
|
|
12244
|
+
var rsDigits = "\\d+";
|
|
12245
|
+
var rsDingbat = "[" + rsDingbatRange + "]";
|
|
12246
|
+
var rsLower = "[" + rsLowerRange + "]";
|
|
12247
|
+
var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
|
|
12248
|
+
var rsModifier = "(?:" + rsCombo + "|\\ud83c[\\udffb-\\udfff])";
|
|
12249
|
+
var rsNonAstral = "[^" + rsAstralRange + "]";
|
|
12250
|
+
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
12251
|
+
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
12252
|
+
var rsUpper = "[" + rsUpperRange + "]";
|
|
12253
|
+
var rsZWJ = "\\u200d";
|
|
12254
|
+
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
12255
|
+
var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
12256
|
+
var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
12257
|
+
var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
12258
|
+
var reOptMod = rsModifier + "?";
|
|
12259
|
+
var rsOptVar = "[" + rsVarRange + "]?";
|
|
12260
|
+
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [
|
|
12261
|
+
rsNonAstral,
|
|
12262
|
+
rsRegional,
|
|
12263
|
+
rsSurrPair
|
|
12264
|
+
].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
12265
|
+
var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
|
|
12266
|
+
var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
|
|
12267
|
+
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
12268
|
+
var rsEmoji = "(?:" + [
|
|
12269
|
+
rsDingbat,
|
|
12270
|
+
rsRegional,
|
|
12271
|
+
rsSurrPair
|
|
12272
|
+
].join("|") + ")" + rsSeq;
|
|
12273
|
+
var reUnicodeWord = RegExp([
|
|
12274
|
+
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [
|
|
12275
|
+
rsBreak,
|
|
12276
|
+
rsUpper,
|
|
12277
|
+
"$"
|
|
12278
|
+
].join("|") + ")",
|
|
12279
|
+
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [
|
|
12280
|
+
rsBreak,
|
|
12281
|
+
rsUpper + rsMiscLower,
|
|
12282
|
+
"$"
|
|
12283
|
+
].join("|") + ")",
|
|
12284
|
+
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
|
12285
|
+
rsUpper + "+" + rsOptContrUpper,
|
|
12286
|
+
rsOrdUpper,
|
|
12287
|
+
rsOrdLower,
|
|
12288
|
+
rsDigits,
|
|
12289
|
+
rsEmoji
|
|
12290
|
+
].join("|"), "g");
|
|
12291
|
+
function unicodeWords(string) {
|
|
12292
|
+
return string.match(reUnicodeWord) || [];
|
|
12297
12293
|
}
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
function
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
if (
|
|
12324
|
-
|
|
12325
|
-
|
|
12326
|
-
|
|
12327
|
-
delete pinia.state.value[hotId];
|
|
12328
|
-
pinia._s.delete(hotId);
|
|
12329
|
-
}
|
|
12330
|
-
if (process.env.NODE_ENV !== "production" && IS_CLIENT) {
|
|
12331
|
-
const currentInstance = getCurrentInstance();
|
|
12332
|
-
if (currentInstance && currentInstance.proxy && !hot) {
|
|
12333
|
-
const vm = currentInstance.proxy;
|
|
12334
|
-
const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
|
|
12335
|
-
cache[id] = store;
|
|
12336
|
-
}
|
|
12294
|
+
//#endregion
|
|
12295
|
+
//#region ../../node_modules/lodash-es/words.js
|
|
12296
|
+
function words(string, pattern, guard) {
|
|
12297
|
+
string = toString(string);
|
|
12298
|
+
pattern = guard ? void 0 : pattern;
|
|
12299
|
+
if (pattern === void 0) return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
|
12300
|
+
return string.match(pattern) || [];
|
|
12301
|
+
}
|
|
12302
|
+
//#endregion
|
|
12303
|
+
//#region ../../node_modules/lodash-es/_createCompounder.js
|
|
12304
|
+
var reApos = RegExp("['’]", "g");
|
|
12305
|
+
function createCompounder(callback) {
|
|
12306
|
+
return function(string) {
|
|
12307
|
+
return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
|
|
12308
|
+
};
|
|
12309
|
+
}
|
|
12310
|
+
//#endregion
|
|
12311
|
+
//#region ../../node_modules/lodash-es/_baseSet.js
|
|
12312
|
+
function baseSet(object, path, value, customizer) {
|
|
12313
|
+
if (!isObject(object)) return object;
|
|
12314
|
+
path = castPath(path, object);
|
|
12315
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
12316
|
+
while (nested != null && ++index < length) {
|
|
12317
|
+
var key = toKey(path[index]), newValue = value;
|
|
12318
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") return object;
|
|
12319
|
+
if (index != lastIndex) {
|
|
12320
|
+
var objValue = nested[key];
|
|
12321
|
+
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
12322
|
+
if (newValue === void 0) newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
12337
12323
|
}
|
|
12338
|
-
|
|
12324
|
+
assignValue(nested, key, newValue);
|
|
12325
|
+
nested = nested[key];
|
|
12339
12326
|
}
|
|
12340
|
-
|
|
12341
|
-
|
|
12327
|
+
return object;
|
|
12328
|
+
}
|
|
12329
|
+
//#endregion
|
|
12330
|
+
//#region ../../node_modules/lodash-es/set.js
|
|
12331
|
+
function set(object, path, value) {
|
|
12332
|
+
return object == null ? object : baseSet(object, path, value);
|
|
12342
12333
|
}
|
|
12343
12334
|
//#endregion
|
|
12335
|
+
//#region ../../node_modules/lodash-es/snakeCase.js
|
|
12336
|
+
var snakeCase = createCompounder(function(result, word, index) {
|
|
12337
|
+
return result + (index ? "_" : "") + word.toLowerCase();
|
|
12338
|
+
});
|
|
12339
|
+
//#endregion
|
|
12340
|
+
//#region ../admin/src/stores/createQueryCacheKey.ts
|
|
12341
|
+
var createQueryCacheKey = (endpoint, modifier) => {
|
|
12342
|
+
return modifier ? `${endpoint}.${modifier}` : endpoint;
|
|
12343
|
+
};
|
|
12344
|
+
//#endregion
|
|
12344
12345
|
//#region ../admin/src/stores/useActionStore.ts
|
|
12345
12346
|
var useActionStore = defineStore("actions", () => {
|
|
12346
12347
|
const actions = ref([]);
|
|
@@ -12386,7 +12387,7 @@ var useActionStore = defineStore("actions", () => {
|
|
|
12386
12387
|
//#endregion
|
|
12387
12388
|
//#region ../admin/src/stores/useNotificationStore.ts
|
|
12388
12389
|
var autoId = 0;
|
|
12389
|
-
var DEFAULT_TIMEOUT = 5e3;
|
|
12390
|
+
var DEFAULT_TIMEOUT$1 = 5e3;
|
|
12390
12391
|
var useNotificationStore = defineStore("notifications", () => {
|
|
12391
12392
|
const notifications = ref([]);
|
|
12392
12393
|
return {
|
|
@@ -12405,7 +12406,7 @@ var useNotificationStore = defineStore("notifications", () => {
|
|
|
12405
12406
|
const { id } = resolvedNotification;
|
|
12406
12407
|
if (notifications.value.some((notification) => notification.id === id)) return;
|
|
12407
12408
|
if (notification.timeout !== false) {
|
|
12408
|
-
const timeout = typeof resolvedNotification.timeout === "number" ? resolvedNotification.timeout : DEFAULT_TIMEOUT;
|
|
12409
|
+
const timeout = typeof resolvedNotification.timeout === "number" ? resolvedNotification.timeout : DEFAULT_TIMEOUT$1;
|
|
12409
12410
|
setTimeout(() => {
|
|
12410
12411
|
this.remove(id);
|
|
12411
12412
|
}, timeout);
|
|
@@ -12414,7 +12415,7 @@ var useNotificationStore = defineStore("notifications", () => {
|
|
|
12414
12415
|
},
|
|
12415
12416
|
remove(input) {
|
|
12416
12417
|
let filter;
|
|
12417
|
-
if (isEnumValue(input, NotificationSource)) filter = (notification) => notification.tags?.source
|
|
12418
|
+
if (isEnumValue(input, NotificationSource)) filter = (notification) => notification.tags?.source !== input;
|
|
12418
12419
|
else filter = (notification) => notification.id !== input;
|
|
12419
12420
|
notifications.value = notifications.value.filter(filter);
|
|
12420
12421
|
}
|
|
@@ -12426,12 +12427,14 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12426
12427
|
const { loading } = useLoading();
|
|
12427
12428
|
const opened = ref(null);
|
|
12428
12429
|
const context = ref(null);
|
|
12430
|
+
const token = shallowRef(null);
|
|
12429
12431
|
const openHooks = ref([]);
|
|
12430
12432
|
const closeHooks = ref([]);
|
|
12431
12433
|
return {
|
|
12432
12434
|
loading,
|
|
12433
12435
|
opened,
|
|
12434
12436
|
context,
|
|
12437
|
+
token,
|
|
12435
12438
|
onOpen(callback) {
|
|
12436
12439
|
openHooks.value.push(callback);
|
|
12437
12440
|
},
|
|
@@ -12441,6 +12444,7 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12441
12444
|
open(modal, newContext) {
|
|
12442
12445
|
context.value = newContext;
|
|
12443
12446
|
opened.value = modal;
|
|
12447
|
+
token.value = { modal };
|
|
12444
12448
|
openHooks.value.forEach((hook) => hook(modal, newContext));
|
|
12445
12449
|
},
|
|
12446
12450
|
close() {
|
|
@@ -12448,6 +12452,7 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12448
12452
|
const modal = opened.value;
|
|
12449
12453
|
opened.value = null;
|
|
12450
12454
|
context.value = null;
|
|
12455
|
+
token.value = null;
|
|
12451
12456
|
closeHooks.value.forEach((hook) => hook(modal));
|
|
12452
12457
|
}
|
|
12453
12458
|
};
|
|
@@ -12457,7 +12462,7 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12457
12462
|
var convertDotNotationToObject = (object, valueCallback = (value) => value) => {
|
|
12458
12463
|
const result = {};
|
|
12459
12464
|
Object.entries(object).forEach(([key, value]) => {
|
|
12460
|
-
set
|
|
12465
|
+
set(result, key, valueCallback(value, key));
|
|
12461
12466
|
});
|
|
12462
12467
|
return result;
|
|
12463
12468
|
};
|
|
@@ -12478,7 +12483,28 @@ function decodeHtmlEntities(string) {
|
|
|
12478
12483
|
//#endregion
|
|
12479
12484
|
//#region ../admin/src/utils/encodeArrayParameter.ts
|
|
12480
12485
|
var encodeArrayParameter = (parameter) => {
|
|
12481
|
-
return toArray(parameter).filter(isDef).join(";");
|
|
12486
|
+
return encodeURIComponent(toArray(parameter).filter(isDef).join(";"));
|
|
12487
|
+
};
|
|
12488
|
+
//#endregion
|
|
12489
|
+
//#region ../admin/src/sdk/requestHeaders.ts
|
|
12490
|
+
var provider;
|
|
12491
|
+
var setRequestHeadersProvider = (newProvider) => {
|
|
12492
|
+
provider = newProvider;
|
|
12493
|
+
};
|
|
12494
|
+
var mergeHeaders = (headers, extraHeaders) => {
|
|
12495
|
+
const extraNames = Object.keys(extraHeaders).map((name) => name.toLowerCase());
|
|
12496
|
+
const kept = Object.entries(headers).filter(([name]) => !extraNames.includes(name.toLowerCase()));
|
|
12497
|
+
return {
|
|
12498
|
+
...Object.fromEntries(kept),
|
|
12499
|
+
...extraHeaders
|
|
12500
|
+
};
|
|
12501
|
+
};
|
|
12502
|
+
var addRequestHeaders = async (options) => {
|
|
12503
|
+
if (!provider) return options;
|
|
12504
|
+
return {
|
|
12505
|
+
...options,
|
|
12506
|
+
headers: mergeHeaders(options.headers ?? {}, await provider())
|
|
12507
|
+
};
|
|
12482
12508
|
};
|
|
12483
12509
|
//#endregion
|
|
12484
12510
|
//#region ../admin/src/components/common/ActionButton.vue
|
|
@@ -12764,7 +12790,9 @@ var AbstractPdkEndpoint = class extends x$1 {};
|
|
|
12764
12790
|
//#region ../admin/src/sdk/composables/usePdkAdminApi.ts
|
|
12765
12791
|
var usePdkAdminApi = createGlobalState(() => {
|
|
12766
12792
|
const globalContext = useGlobalContext();
|
|
12767
|
-
|
|
12793
|
+
const client = new PdkFetchClient({ baseUrl: globalContext.baseUrl });
|
|
12794
|
+
client.interceptors.request.use(addRequestHeaders);
|
|
12795
|
+
return f(client, Object.entries(globalContext.endpoints).map(([endpointName, options]) => {
|
|
12768
12796
|
const property = typeof options.property === "string" ? options.property : void 0;
|
|
12769
12797
|
const responseProperty = typeof options.responseProperty === "string" ? options.responseProperty : void 0;
|
|
12770
12798
|
class PdkEndpoint extends AbstractPdkEndpoint {
|
|
@@ -12885,7 +12913,7 @@ var createPropSetter = (instance, prefix) => {
|
|
|
12885
12913
|
let field;
|
|
12886
12914
|
if (target) field = instance.form.getField(`${prefix}${target}`);
|
|
12887
12915
|
else field = instance;
|
|
12888
|
-
set
|
|
12916
|
+
set(field.props, prop, value);
|
|
12889
12917
|
};
|
|
12890
12918
|
};
|
|
12891
12919
|
//#endregion
|
|
@@ -13910,6 +13938,63 @@ var fillShipmentsQueryData = (queryClient, shipments, order) => {
|
|
|
13910
13938
|
});
|
|
13911
13939
|
};
|
|
13912
13940
|
//#endregion
|
|
13941
|
+
//#region ../admin/src/composables/language/resolveTranslationKey.ts
|
|
13942
|
+
var resolveTranslationKey = (translation) => {
|
|
13943
|
+
return typeof translation === "string" ? translation : translation.key;
|
|
13944
|
+
};
|
|
13945
|
+
//#endregion
|
|
13946
|
+
//#region ../admin/src/composables/language/useLanguage.ts
|
|
13947
|
+
var useCache = createGlobalState(() => /* @__PURE__ */ new Map());
|
|
13948
|
+
var useMissingKeys = createGlobalState(() => ref([]));
|
|
13949
|
+
var all = () => {
|
|
13950
|
+
const { translations } = useGlobalContext();
|
|
13951
|
+
if (!translations) globalLogger.warn("Translations not found.");
|
|
13952
|
+
return translations;
|
|
13953
|
+
};
|
|
13954
|
+
var has = (translation) => {
|
|
13955
|
+
if (!translation) return false;
|
|
13956
|
+
if (isOfType$1(translation, "text")) return true;
|
|
13957
|
+
const translations = memoizedAll();
|
|
13958
|
+
return Boolean(translation && translations && resolveTranslationKey(translation) in translations);
|
|
13959
|
+
};
|
|
13960
|
+
var translate = (translation, replacers) => {
|
|
13961
|
+
if (!translation) return "";
|
|
13962
|
+
if (isOfType$1(translation, "text")) return translation.text;
|
|
13963
|
+
const translationKey = resolveTranslationKey(translation);
|
|
13964
|
+
const cache = useCache();
|
|
13965
|
+
const cacheKey = [translationKey, isOfType$1(translation, "args") ? translation.args : void 0].filter(Boolean).join("|");
|
|
13966
|
+
if (memoizedHas(translation)) {
|
|
13967
|
+
if (!cache.has(cacheKey)) {
|
|
13968
|
+
const translated = decodeHtmlEntities(memoizedAll()[translationKey]);
|
|
13969
|
+
cache.set(cacheKey, resolveTranslatedString(translated, replacers, translation));
|
|
13970
|
+
}
|
|
13971
|
+
} else {
|
|
13972
|
+
const missingKeys = useMissingKeys();
|
|
13973
|
+
globalLogger.warn(`Missing translation: ${translationKey}`);
|
|
13974
|
+
missingKeys.value.push(translationKey);
|
|
13975
|
+
cache.set(cacheKey, translationKey);
|
|
13976
|
+
}
|
|
13977
|
+
return cache.get(cacheKey);
|
|
13978
|
+
};
|
|
13979
|
+
var memoizedAll = useMemoize(all);
|
|
13980
|
+
var memoizedHas = useMemoize(has);
|
|
13981
|
+
var memoizedTranslate = useMemoize(translate);
|
|
13982
|
+
var resetLanguageCache = () => {
|
|
13983
|
+
memoizedAll.clear();
|
|
13984
|
+
memoizedHas.clear();
|
|
13985
|
+
memoizedTranslate.clear();
|
|
13986
|
+
useCache().clear();
|
|
13987
|
+
useMissingKeys().value = [];
|
|
13988
|
+
};
|
|
13989
|
+
var useLanguage = () => {
|
|
13990
|
+
return {
|
|
13991
|
+
missingKeys: useMissingKeys(),
|
|
13992
|
+
all: memoizedAll,
|
|
13993
|
+
has: memoizedHas,
|
|
13994
|
+
translate: memoizedTranslate
|
|
13995
|
+
};
|
|
13996
|
+
};
|
|
13997
|
+
//#endregion
|
|
13913
13998
|
//#region ../admin/src/symbols.ts
|
|
13914
13999
|
var INJECT_ADMIN_INSTANCE = Symbol("instance");
|
|
13915
14000
|
var INJECT_GLOBAL_PDK_ADMIN = Symbol("admin");
|
|
@@ -14224,56 +14309,6 @@ var resolveTranslatedString = (translated, replacers, translation) => {
|
|
|
14224
14309
|
}, translated);
|
|
14225
14310
|
};
|
|
14226
14311
|
//#endregion
|
|
14227
|
-
//#region ../admin/src/composables/language/resolveTranslationKey.ts
|
|
14228
|
-
var resolveTranslationKey = (translation) => {
|
|
14229
|
-
return typeof translation === "string" ? translation : translation.key;
|
|
14230
|
-
};
|
|
14231
|
-
//#endregion
|
|
14232
|
-
//#region ../admin/src/composables/language/useLanguage.ts
|
|
14233
|
-
var useCache = createGlobalState(() => /* @__PURE__ */ new Map());
|
|
14234
|
-
var useMissingKeys = createGlobalState(() => ref([]));
|
|
14235
|
-
var all = () => {
|
|
14236
|
-
const { translations } = useGlobalContext();
|
|
14237
|
-
if (!translations) globalLogger.warn("Translations not found.");
|
|
14238
|
-
return translations;
|
|
14239
|
-
};
|
|
14240
|
-
var has = (translation) => {
|
|
14241
|
-
if (!translation) return false;
|
|
14242
|
-
if (isOfType$1(translation, "text")) return true;
|
|
14243
|
-
const translations = memoizedAll();
|
|
14244
|
-
return Boolean(translation && translations && resolveTranslationKey(translation) in translations);
|
|
14245
|
-
};
|
|
14246
|
-
var translate = (translation, replacers) => {
|
|
14247
|
-
if (!translation) return "";
|
|
14248
|
-
if (isOfType$1(translation, "text")) return translation.text;
|
|
14249
|
-
const translationKey = resolveTranslationKey(translation);
|
|
14250
|
-
const cache = useCache();
|
|
14251
|
-
const cacheKey = [translationKey, isOfType$1(translation, "args") ? translation.args : void 0].filter(Boolean).join("|");
|
|
14252
|
-
if (memoizedHas(translation)) {
|
|
14253
|
-
if (!cache.has(cacheKey)) {
|
|
14254
|
-
const translated = decodeHtmlEntities(memoizedAll()[translationKey]);
|
|
14255
|
-
cache.set(cacheKey, resolveTranslatedString(translated, replacers, translation));
|
|
14256
|
-
}
|
|
14257
|
-
} else {
|
|
14258
|
-
const missingKeys = useMissingKeys();
|
|
14259
|
-
globalLogger.warn(`Missing translation: ${translationKey}`);
|
|
14260
|
-
missingKeys.value.push(translationKey);
|
|
14261
|
-
cache.set(cacheKey, translationKey);
|
|
14262
|
-
}
|
|
14263
|
-
return cache.get(cacheKey);
|
|
14264
|
-
};
|
|
14265
|
-
var memoizedAll = useMemoize(all);
|
|
14266
|
-
var memoizedHas = useMemoize(has);
|
|
14267
|
-
var memoizedTranslate = useMemoize(translate);
|
|
14268
|
-
var useLanguage = () => {
|
|
14269
|
-
return {
|
|
14270
|
-
missingKeys: useMissingKeys(),
|
|
14271
|
-
all: memoizedAll,
|
|
14272
|
-
has: memoizedHas,
|
|
14273
|
-
translate: memoizedTranslate
|
|
14274
|
-
};
|
|
14275
|
-
};
|
|
14276
|
-
//#endregion
|
|
14277
14312
|
//#region ../admin/src/composables/formatter/default/createCurrencyFormat.ts
|
|
14278
14313
|
var createCurrencyFormat = (locale) => {
|
|
14279
14314
|
return new Intl.NumberFormat(locale, {
|
|
@@ -14621,19 +14656,79 @@ var getCallbackForMutationMode = (mode) => {
|
|
|
14621
14656
|
}
|
|
14622
14657
|
};
|
|
14623
14658
|
//#endregion
|
|
14659
|
+
//#region ../admin/src/services/mutations/modalMutationToken.ts
|
|
14660
|
+
var keepModalToken = (onMutate) => (variables) => {
|
|
14661
|
+
onMutate?.(variables);
|
|
14662
|
+
return { modalToken: useModalStore().token };
|
|
14663
|
+
};
|
|
14664
|
+
var isSameModal = (context) => {
|
|
14665
|
+
const modalToken = context?.modalToken;
|
|
14666
|
+
return Boolean(modalToken) && modalToken === useModalStore().token;
|
|
14667
|
+
};
|
|
14668
|
+
//#endregion
|
|
14624
14669
|
//#region ../admin/src/services/mutations/getModalMutationOptions.ts
|
|
14625
|
-
var getModalMutationOptions = () => {
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14670
|
+
var getModalMutationOptions = (defaultOptions = {}) => ({
|
|
14671
|
+
onMutate: keepModalToken(defaultOptions.onMutate),
|
|
14672
|
+
onSuccess(data, variables, context) {
|
|
14673
|
+
if (isSameModal(context)) useModalStore().close();
|
|
14674
|
+
},
|
|
14675
|
+
onSettled(data, error, variables, context) {
|
|
14676
|
+
if (isSameModal(context)) useModalStore().loading = false;
|
|
14677
|
+
},
|
|
14678
|
+
onError(error, variables, context) {
|
|
14679
|
+
if (isSameModal(context)) addErrorToNotifications(error, NotificationCategory.Modal);
|
|
14680
|
+
}
|
|
14681
|
+
});
|
|
14682
|
+
//#endregion
|
|
14683
|
+
//#region ../admin/src/services/print/createPdfObjectUrl.ts
|
|
14684
|
+
var createPdfObjectUrl = (pdf) => {
|
|
14685
|
+
const bytes = Uint8Array.from(atob(pdf), (char) => char.charCodeAt(0));
|
|
14686
|
+
return URL.createObjectURL(new Blob([bytes], { type: "application/pdf" }));
|
|
14687
|
+
};
|
|
14688
|
+
//#endregion
|
|
14689
|
+
//#region ../admin/src/services/print/labelsNotification.ts
|
|
14690
|
+
var LABELS_NOTIFICATION_ID = "print-labels";
|
|
14691
|
+
var replace = (notification) => {
|
|
14692
|
+
const store = useNotificationStore();
|
|
14693
|
+
store.remove(LABELS_NOTIFICATION_ID);
|
|
14694
|
+
store.add({
|
|
14695
|
+
...notification,
|
|
14696
|
+
id: LABELS_NOTIFICATION_ID,
|
|
14697
|
+
category: NotificationCategory.General
|
|
14698
|
+
});
|
|
14699
|
+
};
|
|
14700
|
+
var showLabelsLoading = () => {
|
|
14701
|
+
replace({
|
|
14702
|
+
variant: Variant.Info,
|
|
14703
|
+
content: useLanguage().translate("notification_labels_loading"),
|
|
14704
|
+
loading: true,
|
|
14705
|
+
timeout: false
|
|
14706
|
+
});
|
|
14707
|
+
};
|
|
14708
|
+
var showLabelsReady = (open) => {
|
|
14709
|
+
const { translate } = useLanguage();
|
|
14710
|
+
replace({
|
|
14711
|
+
variant: Variant.Success,
|
|
14712
|
+
content: translate("notification_labels_ready"),
|
|
14713
|
+
timeout: false,
|
|
14714
|
+
action: {
|
|
14715
|
+
label: translate("action_open_labels"),
|
|
14716
|
+
onClick() {
|
|
14717
|
+
open();
|
|
14718
|
+
hideLabelsNotification();
|
|
14719
|
+
}
|
|
14635
14720
|
}
|
|
14636
|
-
};
|
|
14721
|
+
});
|
|
14722
|
+
};
|
|
14723
|
+
var showLabelsFailed = () => {
|
|
14724
|
+
replace({
|
|
14725
|
+
variant: Variant.Error,
|
|
14726
|
+
content: useLanguage().translate("notification_labels_failed"),
|
|
14727
|
+
timeout: false
|
|
14728
|
+
});
|
|
14729
|
+
};
|
|
14730
|
+
var hideLabelsNotification = () => {
|
|
14731
|
+
useNotificationStore().remove(LABELS_NOTIFICATION_ID);
|
|
14637
14732
|
};
|
|
14638
14733
|
//#endregion
|
|
14639
14734
|
//#region ../admin/src/services/print/openPdfInNewWindow.ts
|
|
@@ -14642,6 +14737,23 @@ var openPdfInNewWindow = async (pdf) => {
|
|
|
14642
14737
|
openUrlInNewTab(URL.createObjectURL(blob));
|
|
14643
14738
|
};
|
|
14644
14739
|
//#endregion
|
|
14740
|
+
//#region ../admin/src/services/print/pollLabelPdf.ts
|
|
14741
|
+
var DEFAULT_INTERVAL = 3e3;
|
|
14742
|
+
var DEFAULT_TIMEOUT = 6e5;
|
|
14743
|
+
var pollLabelPdf = async (labelId, { interval = DEFAULT_INTERVAL, timeout = DEFAULT_TIMEOUT } = {}) => {
|
|
14744
|
+
const pdk = usePdkAdminApi();
|
|
14745
|
+
const start = Date.now();
|
|
14746
|
+
for (;;) {
|
|
14747
|
+
const response = await pdk.fetchLabelPdf({ parameters: { labelId } });
|
|
14748
|
+
if (isOfType$1(response, "data")) return response.data;
|
|
14749
|
+
if (!isOfType$1(response, "pending")) throw new Error(`Unexpected response while polling for label pdf ${labelId}`);
|
|
14750
|
+
if (Date.now() - start >= timeout) throw new Error(`Polling for label pdf ${labelId} timed out`);
|
|
14751
|
+
await new Promise((resolve) => {
|
|
14752
|
+
setTimeout(resolve, interval);
|
|
14753
|
+
});
|
|
14754
|
+
}
|
|
14755
|
+
};
|
|
14756
|
+
//#endregion
|
|
14645
14757
|
//#region ../admin/src/actions/composables/mutations/usePdkMutation.ts
|
|
14646
14758
|
var usePdkMutation = (endpoint, mutationFn, options) => {
|
|
14647
14759
|
return useMutation([endpoint], mutationFn, options);
|
|
@@ -14650,6 +14762,7 @@ var usePdkMutation = (endpoint, mutationFn, options) => {
|
|
|
14650
14762
|
//#region ../admin/src/actions/composables/mutations/orders/useExportOrdersMutation.ts
|
|
14651
14763
|
var useExportOrdersMutation = (orderIds, mode = MutationMode.Default) => {
|
|
14652
14764
|
const queryClient = useQueryClient();
|
|
14765
|
+
const defaultMutationOptions = queryClient.defaultMutationOptions();
|
|
14653
14766
|
return usePdkMutation(BackendEndpoint.ExportOrders, async (input) => {
|
|
14654
14767
|
const pdk = usePdkAdminApi();
|
|
14655
14768
|
getCallbackForMutationMode(mode)?.();
|
|
@@ -14659,10 +14772,11 @@ var useExportOrdersMutation = (orderIds, mode = MutationMode.Default) => {
|
|
|
14659
14772
|
};
|
|
14660
14773
|
return pdk.exportOrders(options);
|
|
14661
14774
|
}, {
|
|
14662
|
-
...
|
|
14663
|
-
...mode === MutationMode.Modal ? getModalMutationOptions() : {},
|
|
14664
|
-
|
|
14665
|
-
|
|
14775
|
+
...defaultMutationOptions,
|
|
14776
|
+
...mode === MutationMode.Modal ? getModalMutationOptions(defaultMutationOptions) : {},
|
|
14777
|
+
onMutate: keepModalToken(defaultMutationOptions.onMutate),
|
|
14778
|
+
async onSuccess(data, input, context) {
|
|
14779
|
+
if (isSameModal(context)) useModalStore().close();
|
|
14666
14780
|
toArray(data).forEach((order) => {
|
|
14667
14781
|
fillShipmentsQueryData(queryClient, order.shipments?.slice(-1) ?? [], order);
|
|
14668
14782
|
});
|
|
@@ -15082,7 +15196,26 @@ var modalSubmitFormAction = defineAction({
|
|
|
15082
15196
|
});
|
|
15083
15197
|
//#endregion
|
|
15084
15198
|
//#region ../admin/src/actions/print/openOrPrintPdf.ts
|
|
15199
|
+
var openPreparedPdf = async (labelId, parameters) => {
|
|
15200
|
+
let url;
|
|
15201
|
+
try {
|
|
15202
|
+
url = createPdfObjectUrl(await pollLabelPdf(labelId));
|
|
15203
|
+
} catch (error) {
|
|
15204
|
+
showLabelsFailed();
|
|
15205
|
+
return;
|
|
15206
|
+
}
|
|
15207
|
+
if (parameters?.output === "download") {
|
|
15208
|
+
hideLabelsNotification();
|
|
15209
|
+
downloadFileFromUrl(url, generateLabelFilename(parameters));
|
|
15210
|
+
URL.revokeObjectURL(url);
|
|
15211
|
+
return;
|
|
15212
|
+
}
|
|
15213
|
+
showLabelsReady(() => openUrlInNewTab(url));
|
|
15214
|
+
};
|
|
15085
15215
|
var openOrPrintPdf = async ({ response, parameters }) => {
|
|
15216
|
+
if (isOfType$1(response, "labelId") && response.labelId) return openPreparedPdf(response.labelId, parameters);
|
|
15217
|
+
hideLabelsNotification();
|
|
15218
|
+
if (!response) return;
|
|
15086
15219
|
if (isOfType$1(response, "data")) return openPdfInNewWindow(response.data);
|
|
15087
15220
|
await downloadFile(response.url, generateLabelFilename(parameters));
|
|
15088
15221
|
};
|
|
@@ -15116,7 +15249,7 @@ var waitForLabelPrompt = ({ parameters }) => {
|
|
|
15116
15249
|
};
|
|
15117
15250
|
//#endregion
|
|
15118
15251
|
//#region ../admin/src/actions/print/resolvePrintParameters.ts
|
|
15119
|
-
var
|
|
15252
|
+
var resolveParameters = (context) => {
|
|
15120
15253
|
const pluginSettings = usePluginSettings();
|
|
15121
15254
|
if (!pluginSettings.label.prompt) {
|
|
15122
15255
|
const { output, position, format } = pluginSettings.label;
|
|
@@ -15129,6 +15262,11 @@ var resolvePrintParameters = (context) => {
|
|
|
15129
15262
|
}
|
|
15130
15263
|
return waitForLabelPrompt(context);
|
|
15131
15264
|
};
|
|
15265
|
+
var resolvePrintParameters = async (context) => {
|
|
15266
|
+
const parameters = await resolveParameters(context);
|
|
15267
|
+
showLabelsLoading();
|
|
15268
|
+
return parameters;
|
|
15269
|
+
};
|
|
15132
15270
|
//#endregion
|
|
15133
15271
|
//#region ../admin/src/actions/definitions/shipments.ts
|
|
15134
15272
|
var shipmentsExportReturnAction = defineAction({
|
|
@@ -15402,4 +15540,4 @@ var ShipmentLabel_default = /* @__PURE__ */ defineComponent({
|
|
|
15402
15540
|
}
|
|
15403
15541
|
});
|
|
15404
15542
|
//#endregion
|
|
15405
|
-
export { useFetchProductsQuery as $,
|
|
15543
|
+
export { useFetchProductsQuery as $, isDef as $n, unref as $r, FORM_KEY_PRODUCT_SETTINGS as $t, resolveOrderParameters as A, createPinia as An, defineAsyncComponent as Ar, downloadFileFromUrl as At, createMutationHandler as B, OrderMode as Bn, renderSlot as Br, ShipmentOptionsForm_default as Bt, shipmentsPrintAction as C, timeUntilStale as Ci, baseGetTag as Cn, computed as Cr, useLoading as Ct, openOrPrintPdf as D, createLogger as Dn, createElementBlock as Dr, useStoreContextQuery as Dt, waitForLabelPrompt as E, LogLevel as En, createCommentVNode as Er, useContext as Et, executeHandler as F, c as Fn, onMounted as Fr, INJECT_GLOBAL_PDK_ADMIN as Ft, useDeleteWebhooksMutation as G, NotificationCategory as Gn, withDirectives as Gr, FORM_KEYS as Gt, doMutate as H, AdminIcon as Hn, resolveDynamicComponent as Hr, generateFormFields as Ht, StopActionHandler as I, je as In, onUnmounted as Ir, resetLanguageCache as It, usePrintShipmentsMutation as J, optionalAdminActionContainerComponentNames as Jn, reactive as Jr, FORM_KEY_MODAL as Jt, useCreateWebhooksMutation as K, AdminComponent as Kn, isRef as Kr, FORM_KEY_ACCOUNT_SETTINGS as Kt, createShipmentsMutationHandler as L, ne as Ln, openBlock as Lr, useLanguage as Lt, executeAction as M, M as Mn, h$1 as Mr, formToBody as Mt, executeAfterHandle as N, Ne as Nn, inject as Nr, createFormElement as Nt, modalCloseAction as O, globalLogger as On, createTextVNode as Or, useStoreQuery as Ot, executeBeforeHandle as P, Xe as Pn, mergeProps as Pr, INJECT_ADMIN_INSTANCE as Pt, useFetchShipmentsQuery as Q, useVModel as Qn, toValue$1 as Qr, FORM_KEY_PLUGIN_SETTINGS as Qt, createQueryHandler as R, xe as Rn, provide as Rr, fillShipmentsQueryData as Rt, shipmentsExportReturnAction as S, replaceData as Si, isObjectLike as Sn, KeepAlive as Sr, useOrderMode as St, resolvePrintParameters as T, freeGlobal as Tn, createBlock as Tr, useGlobalContext as Tt, resolveQuerySuffix as U, AdminInstanceContextKey as Un, watch as Ur, resolveFormComponent as Ut, createHandlerWithParameters as V, AdminAction as Vn, resolveComponent as Vr, ShipmentBarcode_default as Vt, defineAction as W, AdminModalKey as Wn, withCtx as Wr, defineFormField as Wt, useDeleteShipmentsMutation as X, optionalAdminPlainWrapperComponentNames as Xn, toRaw as Xr, FORM_KEY_MODAL_RETURN_OPTIONS as Xt, useExportReturnMutation as Y, optionalAdminComponentNames as Yn, ref as Yr, FORM_KEY_MODAL_PRINT_OPTIONS as Yt, useFetchWebhooksQuery as Z, requiredAdminComponentNames as Zn, toRefs as Zr, FORM_KEY_MODAL_SHIPMENT_OPTIONS as Zt, ordersFetchAction as _, matchQuery as _i, isIndex as _n, Transition as _r, useFormatter as _t, LIST_ITEM_MODE_ACTIONS as a, defaultLogger as ai, ActionButton_default as an, FrontendEndpoint as ar, useUpdateOrdersMutation as at, shipmentActions as b, parseQueryArgs$1 as bi, isObject as bn, vShow as br, Format as bt, webhooksCreateAction as c, isCancelledError as ci, useNotificationStore as cn, TriState as cr, usePdkMutation as ct, ORDER_VIEW_IN_BACKOFFICE_ID as d, functionalUpdate as di, MapCache as dn, Variant as dr, createActionContext as dt, normalizeClass as ei, NotificationContainer_default as en, PackageTypeName as er, useFetchOrdersQuery as et, orderExportAction as f, getAbortController as fi, Map$1 as fn, setupDevtoolsPlugin as fr, useShipmentData as ft, ordersExportPrintShipmentsAction as g, matchMutation as gi, baseAssignValue as gn, isQueryKey as gr, useLocalizedFormatter as gt, ordersEditAction as h, isServer as hi, eq as hn, getClientKey as hr, useOrderData as ht, BOX_MODE_ACTIONS as i, notifyManager as ii, BulkSelectCheckbox_default as in, BackendEndpoint as ir, useUpdateProductSettingsMutation as it, executeNextAction as j, Je as jn, defineComponent as jr, prefixComponent as jt, modalSubmitFormAction as k, getActionIdentifier as kn, createVNode as kr, useQueryStore as kt, webhooksDeleteAction as l, onlineManager as li, useActionStore as ln, Size as lr, instantiateActions as lt, orderViewInBackofficeAction as m, hashQueryKeyByOptions as mi, assignValue as mn, cloneDeepUnref as mr, useOrdersData as mt, ProductSettings_default as n, Mutation as ni, usePdkAdminApi as nn, partitionArray as nr, QUERY_KEY_SHIPMENT as nt, MODAL_MODE_ACTIONS as o, canFetch as oi, setRequestHeadersProvider as on, AdminContextKey as or, usePrintOrdersMutation as ot, orderExportToShipmentsAction as p, hashQueryKey as pi, ListCache as pn, useQueryClient as pr, useProductData as pt, useUpdateShipmentsMutation as q, allAdminComponentNames as qn, markRaw as qr, FORM_KEY_CHILD_PRODUCT_SETTINGS as qt, ProductSettings_exports as r, Removable as ri, PackageType_default as rn, toArray as rr, useFetchContextQuery as rt, STORE_MODE_ACTIONS as s, createRetryer as si, useModalStore as sn, SortType as sr, useExportOrdersMutation as st, ShipmentLabel_default as t, toDisplayString as ti, DeliveryOptionsExcerpt_default as tn, isOfType$1 as tr, QUERY_KEY_ORDER as tt, webhooksFetchAction as u, focusManager as ui, get as un, Status as ur, instantiateAction as ut, ordersPrintAction as v, noop$2 as vi, defineProperty as vn, TransitionGroup as vr, useAdminConfig as vt, shipmentsUpdateAction as w, Subscribable as wi, root as wn, createBaseVNode as wr, useInstanceContext as wt, shipmentsDeleteAction as x, partialMatchKey as xi, isArray as xn, Fragment as xr, usePluginSettings as xt, ordersUpdateAction as y, parseFilterArgs as yi, isFunction as yn, createApp as yr, useAdminInstance as yt, createOrdersMutationHandler as z, AdminView as zn, renderList as zr, ShipmentStatus_default as zt };
|