@myparcel-dev/pdk-admin-js 2.3.0 → 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-D6B0x3fl.js → OrderModeOrderListItem-1xm2eVpp.js} +1 -1
- package/dist/{PrintOptionsModalForm-DifM86VT.js → PrintOptionsModalForm-Bq0S_IxK.js} +1 -1
- package/dist/{ShipmentModeOrderListItem-I2feIbpR.js → ShipmentModeOrderListItem-BCdV7uLr.js} +1 -1
- package/dist/{ShipmentOptionsModalForm-Cy4hNbMS.js → ShipmentOptionsModalForm-DeG4dNx8.js} +1 -1
- package/dist/{ShipmentTableBox-DAH1rj8G.js → ShipmentTableBox-DaQDpXTa.js} +1 -1
- package/dist/index.js +60 -32
- package/dist/{shared-CRw_j-iO.js → shared-Cgo8b2fo.js} +2051 -2006
- package/package.json +2 -2
|
@@ -10311,2037 +10311,2037 @@ var je = { install(s, t) {
|
|
|
10311
10311
|
s._context.config.globalProperties.$formBuilder = e, t && e.setDefaults(t);
|
|
10312
10312
|
} };
|
|
10313
10313
|
//#endregion
|
|
10314
|
-
//#region
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
var LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
10321
|
-
LogLevel[LogLevel["Debug"] = 1] = "Debug";
|
|
10322
|
-
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
10323
|
-
LogLevel[LogLevel["Warn"] = 3] = "Warn";
|
|
10324
|
-
LogLevel[LogLevel["Error"] = 4] = "Error";
|
|
10325
|
-
LogLevel[LogLevel["Off"] = 5] = "Off";
|
|
10326
|
-
return LogLevel;
|
|
10327
|
-
}({});
|
|
10328
|
-
var logLevelNameMap = {
|
|
10329
|
-
[4]: "error",
|
|
10330
|
-
[3]: "warn",
|
|
10331
|
-
[2]: "info",
|
|
10332
|
-
[1]: "debug"
|
|
10333
|
-
};
|
|
10334
|
-
var backgroundColors = {
|
|
10335
|
-
[1]: "#9E9E9E",
|
|
10336
|
-
[2]: "#2196F3",
|
|
10337
|
-
[3]: "#FFB562",
|
|
10338
|
-
[4]: "#F87474"
|
|
10339
|
-
};
|
|
10340
|
-
var globalLogger = {
|
|
10341
|
-
level: 1,
|
|
10342
|
-
scope: null,
|
|
10343
|
-
log(level, ...messages) {
|
|
10344
|
-
if (level < this.level) return;
|
|
10345
|
-
const scope = this.scope ?? "PDK";
|
|
10346
|
-
if (process.env.NODE_ENV === "production") console.log(`[${scope}] ${level}`, ...messages);
|
|
10347
|
-
else {
|
|
10348
|
-
const background = this.scope ? "#002621" : "#0F5C47";
|
|
10349
|
-
const levelName = logLevelNameMap[level];
|
|
10350
|
-
let method;
|
|
10351
|
-
switch (level) {
|
|
10352
|
-
case 4:
|
|
10353
|
-
method = console.error;
|
|
10354
|
-
break;
|
|
10355
|
-
case 3:
|
|
10356
|
-
method = console.warn;
|
|
10357
|
-
break;
|
|
10358
|
-
default: method = console.log;
|
|
10359
|
-
}
|
|
10360
|
-
method(...[
|
|
10361
|
-
`%c${scope}%c${levelName?.toUpperCase()}`,
|
|
10362
|
-
[
|
|
10363
|
-
`background: ${background}`,
|
|
10364
|
-
"border-radius: 3px 0 0 3px",
|
|
10365
|
-
"padding: 2px 4px",
|
|
10366
|
-
"color: #ccc"
|
|
10367
|
-
].join(";"),
|
|
10368
|
-
[
|
|
10369
|
-
`background: ${backgroundColors[level]}`,
|
|
10370
|
-
"border-radius: 0 3px 3px 0",
|
|
10371
|
-
"padding: 2px 4px",
|
|
10372
|
-
"color: #222"
|
|
10373
|
-
].join(";"),
|
|
10374
|
-
...messages
|
|
10375
|
-
]);
|
|
10376
|
-
}
|
|
10377
|
-
},
|
|
10378
|
-
debug(...messages) {
|
|
10379
|
-
this.log(1, ...messages);
|
|
10380
|
-
},
|
|
10381
|
-
info(...messages) {
|
|
10382
|
-
this.log(2, ...messages);
|
|
10383
|
-
},
|
|
10384
|
-
warn(...messages) {
|
|
10385
|
-
this.log(3, ...messages);
|
|
10386
|
-
},
|
|
10387
|
-
error(...messages) {
|
|
10388
|
-
this.log(4, ...messages);
|
|
10389
|
-
},
|
|
10390
|
-
setScope(scope) {
|
|
10391
|
-
this.scope = scope;
|
|
10392
|
-
}
|
|
10393
|
-
};
|
|
10394
|
-
var createLogger = (scope = null, logLevel = null) => {
|
|
10395
|
-
const loggerInstance = { ...globalLogger };
|
|
10396
|
-
loggerInstance.setScope(scope);
|
|
10397
|
-
loggerInstance.level = logLevel ?? globalLogger.level;
|
|
10398
|
-
return loggerInstance;
|
|
10399
|
-
};
|
|
10400
|
-
//#endregion
|
|
10401
|
-
//#region ../../node_modules/lodash-es/_freeGlobal.js
|
|
10402
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
10403
|
-
//#endregion
|
|
10404
|
-
//#region ../../node_modules/lodash-es/_root.js
|
|
10405
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
10406
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
10407
|
-
//#endregion
|
|
10408
|
-
//#region ../../node_modules/lodash-es/_Symbol.js
|
|
10409
|
-
var Symbol$1 = root.Symbol;
|
|
10410
|
-
//#endregion
|
|
10411
|
-
//#region ../../node_modules/lodash-es/_getRawTag.js
|
|
10412
|
-
var objectProto$1 = Object.prototype;
|
|
10413
|
-
var hasOwnProperty$4 = objectProto$1.hasOwnProperty;
|
|
10414
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
10415
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
10416
|
-
function getRawTag(value) {
|
|
10417
|
-
var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
10418
|
-
try {
|
|
10419
|
-
value[symToStringTag$1] = void 0;
|
|
10420
|
-
var unmasked = true;
|
|
10421
|
-
} catch (e) {}
|
|
10422
|
-
var result = nativeObjectToString$1.call(value);
|
|
10423
|
-
if (unmasked) {
|
|
10424
|
-
if (isOwn) value[symToStringTag$1] = tag;
|
|
10425
|
-
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;
|
|
10426
10320
|
}
|
|
10427
|
-
|
|
10321
|
+
target[key] = val;
|
|
10322
|
+
return val;
|
|
10428
10323
|
}
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10324
|
+
function del(target, key) {
|
|
10325
|
+
if (Array.isArray(target)) {
|
|
10326
|
+
target.splice(key, 1);
|
|
10327
|
+
return;
|
|
10328
|
+
}
|
|
10329
|
+
delete target[key];
|
|
10434
10330
|
}
|
|
10435
10331
|
//#endregion
|
|
10436
|
-
//#region ../../node_modules/
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
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";
|
|
10443
10343
|
}
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
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;
|
|
10448
10356
|
}
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
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();
|
|
10454
10368
|
}
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
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;
|
|
10461
10376
|
}
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
function baseToString(value) {
|
|
10471
|
-
if (typeof value == "string") return value;
|
|
10472
|
-
if (isArray(value)) return arrayMap(value, baseToString) + "";
|
|
10473
|
-
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : "";
|
|
10474
|
-
var result = value + "";
|
|
10475
|
-
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
|
+
}
|
|
10476
10385
|
}
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
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
|
+
}
|
|
10482
10411
|
}
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
}
|
|
10494
|
-
|
|
10495
|
-
//#region ../../node_modules/lodash-es/_coreJsData.js
|
|
10496
|
-
var coreJsData = root["__core-js_shared__"];
|
|
10497
|
-
//#endregion
|
|
10498
|
-
//#region ../../node_modules/lodash-es/_isMasked.js
|
|
10499
|
-
var maskSrcKey = function() {
|
|
10500
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
10501
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
10502
|
-
}();
|
|
10503
|
-
function isMasked(func) {
|
|
10504
|
-
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);
|
|
10505
10424
|
}
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
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);
|
|
10517
10454
|
}
|
|
10518
|
-
return "";
|
|
10519
|
-
}
|
|
10520
|
-
//#endregion
|
|
10521
|
-
//#region ../../node_modules/lodash-es/_baseIsNative.js
|
|
10522
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
10523
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
10524
|
-
var funcProto = Function.prototype;
|
|
10525
|
-
var objectProto = Object.prototype;
|
|
10526
|
-
var funcToString = funcProto.toString;
|
|
10527
|
-
var hasOwnProperty$3 = objectProto.hasOwnProperty;
|
|
10528
|
-
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
10529
|
-
function baseIsNative(value) {
|
|
10530
|
-
if (!isObject(value) || isMasked(value)) return false;
|
|
10531
|
-
return (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
|
|
10532
10455
|
}
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
function
|
|
10536
|
-
|
|
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);
|
|
10537
10462
|
}
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
function getNative(object, key) {
|
|
10541
|
-
var value = getValue(object, key);
|
|
10542
|
-
return baseIsNative(value) ? value : void 0;
|
|
10463
|
+
function isPinia(o) {
|
|
10464
|
+
return "_a" in o && "install" in o;
|
|
10543
10465
|
}
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
func({}, "", {});
|
|
10550
|
-
return func;
|
|
10551
|
-
} catch (e) {}
|
|
10552
|
-
}();
|
|
10553
|
-
//#endregion
|
|
10554
|
-
//#region ../../node_modules/lodash-es/_isIndex.js
|
|
10555
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
10556
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
10557
|
-
function isIndex(value, length) {
|
|
10558
|
-
var type = typeof value;
|
|
10559
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
10560
|
-
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
|
+
}
|
|
10561
10471
|
}
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
"value": value,
|
|
10569
|
-
"writable": true
|
|
10570
|
-
});
|
|
10571
|
-
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;
|
|
10572
10478
|
}
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
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
|
+
}
|
|
10577
10489
|
}
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
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
|
+
}
|
|
10584
10500
|
}
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) return true;
|
|
10593
|
-
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
|
+
}
|
|
10594
10508
|
}
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
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;
|
|
10603
10534
|
}
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
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
|
+
}
|
|
10610
10546
|
}
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
var data = this.__data__;
|
|
10617
|
-
if (nativeCreate) {
|
|
10618
|
-
var result = data[key];
|
|
10619
|
-
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];
|
|
10620
10552
|
}
|
|
10621
|
-
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
10622
10553
|
}
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
10626
|
-
function hashHas(key) {
|
|
10627
|
-
var data = this.__data__;
|
|
10628
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
10554
|
+
function formatDisplay(display) {
|
|
10555
|
+
return { _custom: { display } };
|
|
10629
10556
|
}
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
//#endregion
|
|
10640
|
-
//#region ../../node_modules/lodash-es/_Hash.js
|
|
10641
|
-
function Hash(entries) {
|
|
10642
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
10643
|
-
this.clear();
|
|
10644
|
-
while (++index < length) {
|
|
10645
|
-
var entry = entries[index];
|
|
10646
|
-
this.set(entry[0], entry[1]);
|
|
10647
|
-
}
|
|
10648
|
-
}
|
|
10649
|
-
Hash.prototype.clear = hashClear;
|
|
10650
|
-
Hash.prototype["delete"] = hashDelete;
|
|
10651
|
-
Hash.prototype.get = hashGet;
|
|
10652
|
-
Hash.prototype.has = hashHas;
|
|
10653
|
-
Hash.prototype.set = hashSet;
|
|
10654
|
-
//#endregion
|
|
10655
|
-
//#region ../../node_modules/lodash-es/_listCacheClear.js
|
|
10656
|
-
function listCacheClear() {
|
|
10657
|
-
this.__data__ = [];
|
|
10658
|
-
this.size = 0;
|
|
10659
|
-
}
|
|
10660
|
-
//#endregion
|
|
10661
|
-
//#region ../../node_modules/lodash-es/_assocIndexOf.js
|
|
10662
|
-
function assocIndexOf(array, key) {
|
|
10663
|
-
var length = array.length;
|
|
10664
|
-
while (length--) if (eq(array[length][0], key)) return length;
|
|
10665
|
-
return -1;
|
|
10666
|
-
}
|
|
10667
|
-
//#endregion
|
|
10668
|
-
//#region ../../node_modules/lodash-es/_listCacheDelete.js
|
|
10669
|
-
var splice = Array.prototype.splice;
|
|
10670
|
-
function listCacheDelete(key) {
|
|
10671
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10672
|
-
if (index < 0) return false;
|
|
10673
|
-
if (index == data.length - 1) data.pop();
|
|
10674
|
-
else splice.call(data, index, 1);
|
|
10675
|
-
--this.size;
|
|
10676
|
-
return true;
|
|
10677
|
-
}
|
|
10678
|
-
//#endregion
|
|
10679
|
-
//#region ../../node_modules/lodash-es/_listCacheGet.js
|
|
10680
|
-
function listCacheGet(key) {
|
|
10681
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10682
|
-
return index < 0 ? void 0 : data[index][1];
|
|
10683
|
-
}
|
|
10684
|
-
//#endregion
|
|
10685
|
-
//#region ../../node_modules/lodash-es/_listCacheHas.js
|
|
10686
|
-
function listCacheHas(key) {
|
|
10687
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
10688
|
-
}
|
|
10689
|
-
//#endregion
|
|
10690
|
-
//#region ../../node_modules/lodash-es/_listCacheSet.js
|
|
10691
|
-
function listCacheSet(key, value) {
|
|
10692
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
10693
|
-
if (index < 0) {
|
|
10694
|
-
++this.size;
|
|
10695
|
-
data.push([key, value]);
|
|
10696
|
-
} else data[index][1] = value;
|
|
10697
|
-
return this;
|
|
10698
|
-
}
|
|
10699
|
-
//#endregion
|
|
10700
|
-
//#region ../../node_modules/lodash-es/_ListCache.js
|
|
10701
|
-
function ListCache(entries) {
|
|
10702
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
10703
|
-
this.clear();
|
|
10704
|
-
while (++index < length) {
|
|
10705
|
-
var entry = entries[index];
|
|
10706
|
-
this.set(entry[0], entry[1]);
|
|
10707
|
-
}
|
|
10708
|
-
}
|
|
10709
|
-
ListCache.prototype.clear = listCacheClear;
|
|
10710
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
10711
|
-
ListCache.prototype.get = listCacheGet;
|
|
10712
|
-
ListCache.prototype.has = listCacheHas;
|
|
10713
|
-
ListCache.prototype.set = listCacheSet;
|
|
10714
|
-
//#endregion
|
|
10715
|
-
//#region ../../node_modules/lodash-es/_Map.js
|
|
10716
|
-
var Map$1 = getNative(root, "Map");
|
|
10717
|
-
//#endregion
|
|
10718
|
-
//#region ../../node_modules/lodash-es/_mapCacheClear.js
|
|
10719
|
-
function mapCacheClear() {
|
|
10720
|
-
this.size = 0;
|
|
10721
|
-
this.__data__ = {
|
|
10722
|
-
"hash": new Hash(),
|
|
10723
|
-
"map": new (Map$1 || ListCache)(),
|
|
10724
|
-
"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
|
|
10725
10566
|
};
|
|
10726
10567
|
}
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
}
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
return getMapData(this, key).get(key);
|
|
10750
|
-
}
|
|
10751
|
-
//#endregion
|
|
10752
|
-
//#region ../../node_modules/lodash-es/_mapCacheHas.js
|
|
10753
|
-
function mapCacheHas(key) {
|
|
10754
|
-
return getMapData(this, key).has(key);
|
|
10755
|
-
}
|
|
10756
|
-
//#endregion
|
|
10757
|
-
//#region ../../node_modules/lodash-es/_mapCacheSet.js
|
|
10758
|
-
function mapCacheSet(key, value) {
|
|
10759
|
-
var data = getMapData(this, key), size = data.size;
|
|
10760
|
-
data.set(key, value);
|
|
10761
|
-
this.size += data.size == size ? 0 : 1;
|
|
10762
|
-
return this;
|
|
10763
|
-
}
|
|
10764
|
-
//#endregion
|
|
10765
|
-
//#region ../../node_modules/lodash-es/_MapCache.js
|
|
10766
|
-
function MapCache(entries) {
|
|
10767
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
10768
|
-
this.clear();
|
|
10769
|
-
while (++index < length) {
|
|
10770
|
-
var entry = entries[index];
|
|
10771
|
-
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
|
+
};
|
|
10772
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;
|
|
10773
10607
|
}
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
var result = func.apply(this, args);
|
|
10788
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
10789
|
-
return result;
|
|
10790
|
-
};
|
|
10791
|
-
memoized.cache = new (memoize.Cache || MapCache)();
|
|
10792
|
-
return memoized;
|
|
10793
|
-
}
|
|
10794
|
-
memoize.Cache = MapCache;
|
|
10795
|
-
//#endregion
|
|
10796
|
-
//#region ../../node_modules/lodash-es/_memoizeCapped.js
|
|
10797
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
10798
|
-
function memoizeCapped(func) {
|
|
10799
|
-
var result = memoize(func, function(key) {
|
|
10800
|
-
if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
|
|
10801
|
-
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: {}
|
|
10802
10621
|
});
|
|
10803
|
-
|
|
10804
|
-
|
|
10622
|
+
else return {
|
|
10623
|
+
operation: formatDisplay(events.type),
|
|
10624
|
+
key: formatDisplay(events.key),
|
|
10625
|
+
oldValue: events.oldValue,
|
|
10626
|
+
newValue: events.newValue
|
|
10627
|
+
};
|
|
10805
10628
|
}
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
10814
|
-
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
10815
|
-
});
|
|
10816
|
-
return result;
|
|
10817
|
-
});
|
|
10818
|
-
//#endregion
|
|
10819
|
-
//#region ../../node_modules/lodash-es/toString.js
|
|
10820
|
-
function toString(value) {
|
|
10821
|
-
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
|
+
}
|
|
10822
10636
|
}
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
function
|
|
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
|
-
|
|
10917
|
-
|
|
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
|
+
});
|
|
10918
10790
|
}
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
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;
|
|
10928
10964
|
};
|
|
10929
10965
|
}
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
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);
|
|
10940
10976
|
}
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
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
|
+
}
|
|
10946
11026
|
};
|
|
11027
|
+
if (!detached && getCurrentScope()) onScopeDispose(removeSubscription);
|
|
11028
|
+
return removeSubscription;
|
|
10947
11029
|
}
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
"Á": "A",
|
|
10953
|
-
"Â": "A",
|
|
10954
|
-
"Ã": "A",
|
|
10955
|
-
"Ä": "A",
|
|
10956
|
-
"Å": "A",
|
|
10957
|
-
"à": "a",
|
|
10958
|
-
"á": "a",
|
|
10959
|
-
"â": "a",
|
|
10960
|
-
"ã": "a",
|
|
10961
|
-
"ä": "a",
|
|
10962
|
-
"å": "a",
|
|
10963
|
-
"Ç": "C",
|
|
10964
|
-
"ç": "c",
|
|
10965
|
-
"Ð": "D",
|
|
10966
|
-
"ð": "d",
|
|
10967
|
-
"È": "E",
|
|
10968
|
-
"É": "E",
|
|
10969
|
-
"Ê": "E",
|
|
10970
|
-
"Ë": "E",
|
|
10971
|
-
"è": "e",
|
|
10972
|
-
"é": "e",
|
|
10973
|
-
"ê": "e",
|
|
10974
|
-
"ë": "e",
|
|
10975
|
-
"Ì": "I",
|
|
10976
|
-
"Í": "I",
|
|
10977
|
-
"Î": "I",
|
|
10978
|
-
"Ï": "I",
|
|
10979
|
-
"ì": "i",
|
|
10980
|
-
"í": "i",
|
|
10981
|
-
"î": "i",
|
|
10982
|
-
"ï": "i",
|
|
10983
|
-
"Ñ": "N",
|
|
10984
|
-
"ñ": "n",
|
|
10985
|
-
"Ò": "O",
|
|
10986
|
-
"Ó": "O",
|
|
10987
|
-
"Ô": "O",
|
|
10988
|
-
"Õ": "O",
|
|
10989
|
-
"Ö": "O",
|
|
10990
|
-
"Ø": "O",
|
|
10991
|
-
"ò": "o",
|
|
10992
|
-
"ó": "o",
|
|
10993
|
-
"ô": "o",
|
|
10994
|
-
"õ": "o",
|
|
10995
|
-
"ö": "o",
|
|
10996
|
-
"ø": "o",
|
|
10997
|
-
"Ù": "U",
|
|
10998
|
-
"Ú": "U",
|
|
10999
|
-
"Û": "U",
|
|
11000
|
-
"Ü": "U",
|
|
11001
|
-
"ù": "u",
|
|
11002
|
-
"ú": "u",
|
|
11003
|
-
"û": "u",
|
|
11004
|
-
"ü": "u",
|
|
11005
|
-
"Ý": "Y",
|
|
11006
|
-
"ý": "y",
|
|
11007
|
-
"ÿ": "y",
|
|
11008
|
-
"Æ": "Ae",
|
|
11009
|
-
"æ": "ae",
|
|
11010
|
-
"Þ": "Th",
|
|
11011
|
-
"þ": "th",
|
|
11012
|
-
"ß": "ss",
|
|
11013
|
-
"Ā": "A",
|
|
11014
|
-
"Ă": "A",
|
|
11015
|
-
"Ą": "A",
|
|
11016
|
-
"ā": "a",
|
|
11017
|
-
"ă": "a",
|
|
11018
|
-
"ą": "a",
|
|
11019
|
-
"Ć": "C",
|
|
11020
|
-
"Ĉ": "C",
|
|
11021
|
-
"Ċ": "C",
|
|
11022
|
-
"Č": "C",
|
|
11023
|
-
"ć": "c",
|
|
11024
|
-
"ĉ": "c",
|
|
11025
|
-
"ċ": "c",
|
|
11026
|
-
"č": "c",
|
|
11027
|
-
"Ď": "D",
|
|
11028
|
-
"Đ": "D",
|
|
11029
|
-
"ď": "d",
|
|
11030
|
-
"đ": "d",
|
|
11031
|
-
"Ē": "E",
|
|
11032
|
-
"Ĕ": "E",
|
|
11033
|
-
"Ė": "E",
|
|
11034
|
-
"Ę": "E",
|
|
11035
|
-
"Ě": "E",
|
|
11036
|
-
"ē": "e",
|
|
11037
|
-
"ĕ": "e",
|
|
11038
|
-
"ė": "e",
|
|
11039
|
-
"ę": "e",
|
|
11040
|
-
"ě": "e",
|
|
11041
|
-
"Ĝ": "G",
|
|
11042
|
-
"Ğ": "G",
|
|
11043
|
-
"Ġ": "G",
|
|
11044
|
-
"Ģ": "G",
|
|
11045
|
-
"ĝ": "g",
|
|
11046
|
-
"ğ": "g",
|
|
11047
|
-
"ġ": "g",
|
|
11048
|
-
"ģ": "g",
|
|
11049
|
-
"Ĥ": "H",
|
|
11050
|
-
"Ħ": "H",
|
|
11051
|
-
"ĥ": "h",
|
|
11052
|
-
"ħ": "h",
|
|
11053
|
-
"Ĩ": "I",
|
|
11054
|
-
"Ī": "I",
|
|
11055
|
-
"Ĭ": "I",
|
|
11056
|
-
"Į": "I",
|
|
11057
|
-
"İ": "I",
|
|
11058
|
-
"ĩ": "i",
|
|
11059
|
-
"ī": "i",
|
|
11060
|
-
"ĭ": "i",
|
|
11061
|
-
"į": "i",
|
|
11062
|
-
"ı": "i",
|
|
11063
|
-
"Ĵ": "J",
|
|
11064
|
-
"ĵ": "j",
|
|
11065
|
-
"Ķ": "K",
|
|
11066
|
-
"ķ": "k",
|
|
11067
|
-
"ĸ": "k",
|
|
11068
|
-
"Ĺ": "L",
|
|
11069
|
-
"Ļ": "L",
|
|
11070
|
-
"Ľ": "L",
|
|
11071
|
-
"Ŀ": "L",
|
|
11072
|
-
"Ł": "L",
|
|
11073
|
-
"ĺ": "l",
|
|
11074
|
-
"ļ": "l",
|
|
11075
|
-
"ľ": "l",
|
|
11076
|
-
"ŀ": "l",
|
|
11077
|
-
"ł": "l",
|
|
11078
|
-
"Ń": "N",
|
|
11079
|
-
"Ņ": "N",
|
|
11080
|
-
"Ň": "N",
|
|
11081
|
-
"Ŋ": "N",
|
|
11082
|
-
"ń": "n",
|
|
11083
|
-
"ņ": "n",
|
|
11084
|
-
"ň": "n",
|
|
11085
|
-
"ŋ": "n",
|
|
11086
|
-
"Ō": "O",
|
|
11087
|
-
"Ŏ": "O",
|
|
11088
|
-
"Ő": "O",
|
|
11089
|
-
"ō": "o",
|
|
11090
|
-
"ŏ": "o",
|
|
11091
|
-
"ő": "o",
|
|
11092
|
-
"Ŕ": "R",
|
|
11093
|
-
"Ŗ": "R",
|
|
11094
|
-
"Ř": "R",
|
|
11095
|
-
"ŕ": "r",
|
|
11096
|
-
"ŗ": "r",
|
|
11097
|
-
"ř": "r",
|
|
11098
|
-
"Ś": "S",
|
|
11099
|
-
"Ŝ": "S",
|
|
11100
|
-
"Ş": "S",
|
|
11101
|
-
"Š": "S",
|
|
11102
|
-
"ś": "s",
|
|
11103
|
-
"ŝ": "s",
|
|
11104
|
-
"ş": "s",
|
|
11105
|
-
"š": "s",
|
|
11106
|
-
"Ţ": "T",
|
|
11107
|
-
"Ť": "T",
|
|
11108
|
-
"Ŧ": "T",
|
|
11109
|
-
"ţ": "t",
|
|
11110
|
-
"ť": "t",
|
|
11111
|
-
"ŧ": "t",
|
|
11112
|
-
"Ũ": "U",
|
|
11113
|
-
"Ū": "U",
|
|
11114
|
-
"Ŭ": "U",
|
|
11115
|
-
"Ů": "U",
|
|
11116
|
-
"Ű": "U",
|
|
11117
|
-
"Ų": "U",
|
|
11118
|
-
"ũ": "u",
|
|
11119
|
-
"ū": "u",
|
|
11120
|
-
"ŭ": "u",
|
|
11121
|
-
"ů": "u",
|
|
11122
|
-
"ű": "u",
|
|
11123
|
-
"ų": "u",
|
|
11124
|
-
"Ŵ": "W",
|
|
11125
|
-
"ŵ": "w",
|
|
11126
|
-
"Ŷ": "Y",
|
|
11127
|
-
"ŷ": "y",
|
|
11128
|
-
"Ÿ": "Y",
|
|
11129
|
-
"Ź": "Z",
|
|
11130
|
-
"Ż": "Z",
|
|
11131
|
-
"Ž": "Z",
|
|
11132
|
-
"ź": "z",
|
|
11133
|
-
"ż": "z",
|
|
11134
|
-
"ž": "z",
|
|
11135
|
-
"IJ": "IJ",
|
|
11136
|
-
"ij": "ij",
|
|
11137
|
-
"Œ": "Oe",
|
|
11138
|
-
"œ": "oe",
|
|
11139
|
-
"ʼn": "'n",
|
|
11140
|
-
"ſ": "s"
|
|
11141
|
-
});
|
|
11142
|
-
//#endregion
|
|
11143
|
-
//#region ../../node_modules/lodash-es/deburr.js
|
|
11144
|
-
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
11145
|
-
var reComboMark = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
11146
|
-
function deburr(string) {
|
|
11147
|
-
string = toString(string);
|
|
11148
|
-
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
11030
|
+
function triggerSubscriptions(subscriptions, ...args) {
|
|
11031
|
+
subscriptions.slice().forEach((callback) => {
|
|
11032
|
+
callback(...args);
|
|
11033
|
+
});
|
|
11149
11034
|
}
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
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;
|
|
11155
11047
|
}
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
function hasUnicodeWord(string) {
|
|
11160
|
-
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);
|
|
11161
11051
|
}
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
var rsComboRange = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff";
|
|
11166
|
-
var rsDingbatRange = "\\u2700-\\u27bf";
|
|
11167
|
-
var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
|
|
11168
|
-
var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
|
|
11169
|
-
var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
|
|
11170
|
-
var rsPunctuationRange = "\\u2000-\\u206f";
|
|
11171
|
-
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";
|
|
11172
|
-
var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
|
|
11173
|
-
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
11174
|
-
var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
11175
|
-
var rsApos = "['’]";
|
|
11176
|
-
var rsBreak = "[" + rsBreakRange + "]";
|
|
11177
|
-
var rsCombo = "[" + rsComboRange + "]";
|
|
11178
|
-
var rsDigits = "\\d+";
|
|
11179
|
-
var rsDingbat = "[" + rsDingbatRange + "]";
|
|
11180
|
-
var rsLower = "[" + rsLowerRange + "]";
|
|
11181
|
-
var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
|
|
11182
|
-
var rsModifier = "(?:" + rsCombo + "|\\ud83c[\\udffb-\\udfff])";
|
|
11183
|
-
var rsNonAstral = "[^" + rsAstralRange + "]";
|
|
11184
|
-
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
11185
|
-
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
11186
|
-
var rsUpper = "[" + rsUpperRange + "]";
|
|
11187
|
-
var rsZWJ = "\\u200d";
|
|
11188
|
-
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
11189
|
-
var rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
11190
|
-
var rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
11191
|
-
var rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
11192
|
-
var reOptMod = rsModifier + "?";
|
|
11193
|
-
var rsOptVar = "[" + rsVarRange + "]?";
|
|
11194
|
-
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [
|
|
11195
|
-
rsNonAstral,
|
|
11196
|
-
rsRegional,
|
|
11197
|
-
rsSurrPair
|
|
11198
|
-
].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
11199
|
-
var rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])";
|
|
11200
|
-
var rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])";
|
|
11201
|
-
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
11202
|
-
var rsEmoji = "(?:" + [
|
|
11203
|
-
rsDingbat,
|
|
11204
|
-
rsRegional,
|
|
11205
|
-
rsSurrPair
|
|
11206
|
-
].join("|") + ")" + rsSeq;
|
|
11207
|
-
var reUnicodeWord = RegExp([
|
|
11208
|
-
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [
|
|
11209
|
-
rsBreak,
|
|
11210
|
-
rsUpper,
|
|
11211
|
-
"$"
|
|
11212
|
-
].join("|") + ")",
|
|
11213
|
-
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [
|
|
11214
|
-
rsBreak,
|
|
11215
|
-
rsUpper + rsMiscLower,
|
|
11216
|
-
"$"
|
|
11217
|
-
].join("|") + ")",
|
|
11218
|
-
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
|
11219
|
-
rsUpper + "+" + rsOptContrUpper,
|
|
11220
|
-
rsOrdUpper,
|
|
11221
|
-
rsOrdLower,
|
|
11222
|
-
rsDigits,
|
|
11223
|
-
rsEmoji
|
|
11224
|
-
].join("|"), "g");
|
|
11225
|
-
function unicodeWords(string) {
|
|
11226
|
-
return string.match(reUnicodeWord) || [];
|
|
11052
|
+
var { assign } = Object;
|
|
11053
|
+
function isComputed(o) {
|
|
11054
|
+
return !!(isRef(o) && o.effect);
|
|
11227
11055
|
}
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
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;
|
|
11235
11075
|
}
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
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
|
+
}
|
|
11242
11091
|
};
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
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
|
+
};
|
|
11257
11121
|
}
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
//#region ../../node_modules/lodash-es/set.js
|
|
11265
|
-
function set$1(object, path, value) {
|
|
11266
|
-
return object == null ? object : baseSet(object, path, value);
|
|
11267
|
-
}
|
|
11268
|
-
//#endregion
|
|
11269
|
-
//#region ../../node_modules/lodash-es/snakeCase.js
|
|
11270
|
-
var snakeCase = createCompounder(function(result, word, index) {
|
|
11271
|
-
return result + (index ? "_" : "") + word.toLowerCase();
|
|
11272
|
-
});
|
|
11273
|
-
//#endregion
|
|
11274
|
-
//#region ../admin/src/stores/createQueryCacheKey.ts
|
|
11275
|
-
var createQueryCacheKey = (endpoint, modifier) => {
|
|
11276
|
-
return modifier ? `${endpoint}.${modifier}` : endpoint;
|
|
11277
|
-
};
|
|
11278
|
-
//#endregion
|
|
11279
|
-
//#region ../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs
|
|
11280
|
-
function set(target, key, val) {
|
|
11281
|
-
if (Array.isArray(target)) {
|
|
11282
|
-
target.length = Math.max(target.length, key);
|
|
11283
|
-
target.splice(key, 1, val);
|
|
11284
|
-
return val;
|
|
11285
|
-
}
|
|
11286
|
-
target[key] = val;
|
|
11287
|
-
return val;
|
|
11288
|
-
}
|
|
11289
|
-
function del(target, key) {
|
|
11290
|
-
if (Array.isArray(target)) {
|
|
11291
|
-
target.splice(key, 1);
|
|
11292
|
-
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]);
|
|
11293
11128
|
}
|
|
11294
|
-
|
|
11295
|
-
}
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
}
|
|
11309
|
-
var MutationType;
|
|
11310
|
-
(function(MutationType) {
|
|
11311
|
-
MutationType["direct"] = "direct";
|
|
11312
|
-
MutationType["patchObject"] = "patch object";
|
|
11313
|
-
MutationType["patchFunction"] = "patch function";
|
|
11314
|
-
})(MutationType || (MutationType = {}));
|
|
11315
|
-
var IS_CLIENT = typeof window !== "undefined";
|
|
11316
|
-
var USE_DEVTOOLS = (process.env.NODE_ENV !== "production" || false) && !(process.env.NODE_ENV === "test") && IS_CLIENT;
|
|
11317
|
-
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 })();
|
|
11318
|
-
function bom(blob, { autoBom = false } = {}) {
|
|
11319
|
-
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 });
|
|
11320
|
-
return blob;
|
|
11321
|
-
}
|
|
11322
|
-
function download(url, name, opts) {
|
|
11323
|
-
const xhr = new XMLHttpRequest();
|
|
11324
|
-
xhr.open("GET", url);
|
|
11325
|
-
xhr.responseType = "blob";
|
|
11326
|
-
xhr.onload = function() {
|
|
11327
|
-
saveAs(xhr.response, name, opts);
|
|
11328
|
-
};
|
|
11329
|
-
xhr.onerror = function() {
|
|
11330
|
-
console.error("could not download file");
|
|
11331
|
-
};
|
|
11332
|
-
xhr.send();
|
|
11333
|
-
}
|
|
11334
|
-
function corsEnabled(url) {
|
|
11335
|
-
const xhr = new XMLHttpRequest();
|
|
11336
|
-
xhr.open("HEAD", url, false);
|
|
11337
|
-
try {
|
|
11338
|
-
xhr.send();
|
|
11339
|
-
} catch (e) {}
|
|
11340
|
-
return xhr.status >= 200 && xhr.status <= 299;
|
|
11341
|
-
}
|
|
11342
|
-
function click(node) {
|
|
11343
|
-
try {
|
|
11344
|
-
node.dispatchEvent(new MouseEvent("click"));
|
|
11345
|
-
} catch (e) {
|
|
11346
|
-
const evt = document.createEvent("MouseEvents");
|
|
11347
|
-
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
|
|
11348
|
-
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);
|
|
11349
11143
|
}
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
if (typeof blob === "string") {
|
|
11359
|
-
a.href = blob;
|
|
11360
|
-
if (a.origin !== location.origin) {
|
|
11361
|
-
if (corsEnabled(a.href)) download(blob, name, opts);
|
|
11362
|
-
else {
|
|
11363
|
-
a.target = "_blank";
|
|
11364
|
-
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);
|
|
11365
11152
|
}
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
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
|
+
};
|
|
11375
11180
|
}
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
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);
|
|
11386
11246
|
});
|
|
11387
11247
|
}
|
|
11388
|
-
}
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
const reader = new FileReader();
|
|
11399
|
-
reader.onloadend = function() {
|
|
11400
|
-
let url = reader.result;
|
|
11401
|
-
if (typeof url !== "string") {
|
|
11402
|
-
popup = null;
|
|
11403
|
-
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;
|
|
11404
11258
|
}
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
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
|
|
11409
11298
|
};
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
11418
|
-
}, 4e4);
|
|
11419
|
-
}
|
|
11420
|
-
}
|
|
11421
|
-
function toastMessage(message, type) {
|
|
11422
|
-
const piniaMessage = "🍍 " + message;
|
|
11423
|
-
if (typeof __VUE_DEVTOOLS_TOAST__ === "function") __VUE_DEVTOOLS_TOAST__(piniaMessage, type);
|
|
11424
|
-
else if (type === "error") console.error(piniaMessage);
|
|
11425
|
-
else if (type === "warn") console.warn(piniaMessage);
|
|
11426
|
-
else console.log(piniaMessage);
|
|
11427
|
-
}
|
|
11428
|
-
function isPinia(o) {
|
|
11429
|
-
return "_a" in o && "install" in o;
|
|
11430
|
-
}
|
|
11431
|
-
function checkClipboardAccess() {
|
|
11432
|
-
if (!("clipboard" in navigator)) {
|
|
11433
|
-
toastMessage(`Your browser doesn't support the Clipboard API`, "error");
|
|
11434
|
-
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
|
+
});
|
|
11435
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;
|
|
11436
11333
|
}
|
|
11437
|
-
function
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
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.`);
|
|
11441
11345
|
}
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
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;
|
|
11453
11375
|
}
|
|
11376
|
+
useStore.$id = id;
|
|
11377
|
+
return useStore;
|
|
11454
11378
|
}
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
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;
|
|
11464
11458
|
}
|
|
11465
|
-
}
|
|
11466
|
-
|
|
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];
|
|
11467
11484
|
try {
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
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];
|
|
11472
11492
|
}
|
|
11493
|
+
return result;
|
|
11473
11494
|
}
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
fileInput.accept = ".json";
|
|
11480
|
-
}
|
|
11481
|
-
function openFile() {
|
|
11482
|
-
return new Promise((resolve, reject) => {
|
|
11483
|
-
fileInput.onchange = async () => {
|
|
11484
|
-
const files = fileInput.files;
|
|
11485
|
-
if (!files) return resolve(null);
|
|
11486
|
-
const file = files.item(0);
|
|
11487
|
-
if (!file) return resolve(null);
|
|
11488
|
-
return resolve({
|
|
11489
|
-
text: await file.text(),
|
|
11490
|
-
file
|
|
11491
|
-
});
|
|
11492
|
-
};
|
|
11493
|
-
fileInput.oncancel = () => resolve(null);
|
|
11494
|
-
fileInput.onerror = reject;
|
|
11495
|
-
fileInput.click();
|
|
11496
|
-
});
|
|
11497
|
-
}
|
|
11498
|
-
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);
|
|
11499
11500
|
}
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
toastMessage(`Failed to import the state from JSON. Check the console for more details.`, "error");
|
|
11509
|
-
console.error(error);
|
|
11510
|
-
}
|
|
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);
|
|
11511
11509
|
}
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
else pinia.state.value[key] = state[key];
|
|
11517
|
-
}
|
|
11510
|
+
//#endregion
|
|
11511
|
+
//#region ../../node_modules/lodash-es/isObjectLike.js
|
|
11512
|
+
function isObjectLike(value) {
|
|
11513
|
+
return value != null && typeof value == "object";
|
|
11518
11514
|
}
|
|
11519
|
-
|
|
11520
|
-
|
|
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;
|
|
11521
11520
|
}
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
function
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
} : {
|
|
11529
|
-
id: store.$id,
|
|
11530
|
-
label: store.$id
|
|
11531
|
-
};
|
|
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;
|
|
11532
11527
|
}
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
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) {}
|
|
11555
11583
|
}
|
|
11556
|
-
|
|
11557
|
-
editable: true,
|
|
11558
|
-
key,
|
|
11559
|
-
value: store.$state[key]
|
|
11560
|
-
})) };
|
|
11561
|
-
if (store._getters && store._getters.length) state.getters = store._getters.map((getterName) => ({
|
|
11562
|
-
editable: false,
|
|
11563
|
-
key: getterName,
|
|
11564
|
-
value: store[getterName]
|
|
11565
|
-
}));
|
|
11566
|
-
if (store._customProperties.size) state.customProperties = Array.from(store._customProperties).map((key) => ({
|
|
11567
|
-
editable: true,
|
|
11568
|
-
key,
|
|
11569
|
-
value: store[key]
|
|
11570
|
-
}));
|
|
11571
|
-
return state;
|
|
11584
|
+
return "";
|
|
11572
11585
|
}
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
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
|
|
11586
11636
|
});
|
|
11587
|
-
else
|
|
11588
|
-
operation: formatDisplay(events.type),
|
|
11589
|
-
key: formatDisplay(events.key),
|
|
11590
|
-
oldValue: events.oldValue,
|
|
11591
|
-
newValue: events.newValue
|
|
11592
|
-
};
|
|
11637
|
+
else object[key] = value;
|
|
11593
11638
|
}
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
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;
|
|
11600
11686
|
}
|
|
11687
|
+
return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
|
|
11601
11688
|
}
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
var
|
|
11605
|
-
|
|
11606
|
-
var
|
|
11607
|
-
|
|
11608
|
-
function registerPiniaDevtools(app, pinia) {
|
|
11609
|
-
setupDevtoolsPlugin({
|
|
11610
|
-
id: "dev.esm.pinia",
|
|
11611
|
-
label: "Pinia 🍍",
|
|
11612
|
-
logo: "https://pinia.vuejs.org/logo.svg",
|
|
11613
|
-
packageName: "pinia",
|
|
11614
|
-
homepage: "https://pinia.vuejs.org",
|
|
11615
|
-
componentStateTypes,
|
|
11616
|
-
app
|
|
11617
|
-
}, (api) => {
|
|
11618
|
-
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.");
|
|
11619
|
-
api.addTimelineLayer({
|
|
11620
|
-
id: MUTATIONS_LAYER_ID,
|
|
11621
|
-
label: `Pinia 🍍`,
|
|
11622
|
-
color: 15064968
|
|
11623
|
-
});
|
|
11624
|
-
api.addInspector({
|
|
11625
|
-
id: INSPECTOR_ID,
|
|
11626
|
-
label: "Pinia 🍍",
|
|
11627
|
-
icon: "storage",
|
|
11628
|
-
treeFilterPlaceholder: "Search stores",
|
|
11629
|
-
actions: [
|
|
11630
|
-
{
|
|
11631
|
-
icon: "content_copy",
|
|
11632
|
-
action: () => {
|
|
11633
|
-
actionGlobalCopyState(pinia);
|
|
11634
|
-
},
|
|
11635
|
-
tooltip: "Serialize and copy the state"
|
|
11636
|
-
},
|
|
11637
|
-
{
|
|
11638
|
-
icon: "content_paste",
|
|
11639
|
-
action: async () => {
|
|
11640
|
-
await actionGlobalPasteState(pinia);
|
|
11641
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11642
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11643
|
-
},
|
|
11644
|
-
tooltip: "Replace the state with the content of your clipboard"
|
|
11645
|
-
},
|
|
11646
|
-
{
|
|
11647
|
-
icon: "save",
|
|
11648
|
-
action: () => {
|
|
11649
|
-
actionGlobalSaveState(pinia);
|
|
11650
|
-
},
|
|
11651
|
-
tooltip: "Save the state as a JSON file"
|
|
11652
|
-
},
|
|
11653
|
-
{
|
|
11654
|
-
icon: "folder_open",
|
|
11655
|
-
action: async () => {
|
|
11656
|
-
await actionGlobalOpenStateFile(pinia);
|
|
11657
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11658
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11659
|
-
},
|
|
11660
|
-
tooltip: "Import the state from a JSON file"
|
|
11661
|
-
}
|
|
11662
|
-
],
|
|
11663
|
-
nodeActions: [{
|
|
11664
|
-
icon: "restore",
|
|
11665
|
-
tooltip: "Reset the state (with \"$reset\")",
|
|
11666
|
-
action: (nodeId) => {
|
|
11667
|
-
const store = pinia._s.get(nodeId);
|
|
11668
|
-
if (!store) toastMessage(`Cannot reset "${nodeId}" store because it wasn't found.`, "warn");
|
|
11669
|
-
else if (typeof store.$reset !== "function") toastMessage(`Cannot reset "${nodeId}" store because it doesn't have a "$reset" method implemented.`, "warn");
|
|
11670
|
-
else {
|
|
11671
|
-
store.$reset();
|
|
11672
|
-
toastMessage(`Store "${nodeId}" reset.`);
|
|
11673
|
-
}
|
|
11674
|
-
}
|
|
11675
|
-
}]
|
|
11676
|
-
});
|
|
11677
|
-
api.on.inspectComponent((payload, ctx) => {
|
|
11678
|
-
const proxy = payload.componentInstance && payload.componentInstance.proxy;
|
|
11679
|
-
if (proxy && proxy._pStores) {
|
|
11680
|
-
const piniaStores = payload.componentInstance.proxy._pStores;
|
|
11681
|
-
Object.values(piniaStores).forEach((store) => {
|
|
11682
|
-
payload.instanceData.state.push({
|
|
11683
|
-
type: getStoreType(store.$id),
|
|
11684
|
-
key: "state",
|
|
11685
|
-
editable: true,
|
|
11686
|
-
value: store._isOptionsAPI ? { _custom: {
|
|
11687
|
-
value: toRaw(store.$state),
|
|
11688
|
-
actions: [{
|
|
11689
|
-
icon: "restore",
|
|
11690
|
-
tooltip: "Reset the state of this store",
|
|
11691
|
-
action: () => store.$reset()
|
|
11692
|
-
}]
|
|
11693
|
-
} } : Object.keys(store.$state).reduce((state, key) => {
|
|
11694
|
-
state[key] = store.$state[key];
|
|
11695
|
-
return state;
|
|
11696
|
-
}, {})
|
|
11697
|
-
});
|
|
11698
|
-
if (store._getters && store._getters.length) payload.instanceData.state.push({
|
|
11699
|
-
type: getStoreType(store.$id),
|
|
11700
|
-
key: "getters",
|
|
11701
|
-
editable: false,
|
|
11702
|
-
value: store._getters.reduce((getters, key) => {
|
|
11703
|
-
try {
|
|
11704
|
-
getters[key] = store[key];
|
|
11705
|
-
} catch (error) {
|
|
11706
|
-
getters[key] = error;
|
|
11707
|
-
}
|
|
11708
|
-
return getters;
|
|
11709
|
-
}, {})
|
|
11710
|
-
});
|
|
11711
|
-
});
|
|
11712
|
-
}
|
|
11713
|
-
});
|
|
11714
|
-
api.on.getInspectorTree((payload) => {
|
|
11715
|
-
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
11716
|
-
let stores = [pinia];
|
|
11717
|
-
stores = stores.concat(Array.from(pinia._s.values()));
|
|
11718
|
-
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);
|
|
11719
|
-
}
|
|
11720
|
-
});
|
|
11721
|
-
api.on.getInspectorState((payload) => {
|
|
11722
|
-
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
11723
|
-
const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
|
|
11724
|
-
if (!inspectedStore) return;
|
|
11725
|
-
if (inspectedStore) payload.state = formatStoreForInspectorState(inspectedStore);
|
|
11726
|
-
}
|
|
11727
|
-
});
|
|
11728
|
-
api.on.editInspectorState((payload, ctx) => {
|
|
11729
|
-
if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
|
|
11730
|
-
const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia : pinia._s.get(payload.nodeId);
|
|
11731
|
-
if (!inspectedStore) return toastMessage(`store "${payload.nodeId}" not found`, "error");
|
|
11732
|
-
const { path } = payload;
|
|
11733
|
-
if (!isPinia(inspectedStore)) {
|
|
11734
|
-
if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) path.unshift("$state");
|
|
11735
|
-
} else path.unshift("state");
|
|
11736
|
-
isTimelineActive = false;
|
|
11737
|
-
payload.set(inspectedStore, path, payload.state.value);
|
|
11738
|
-
isTimelineActive = true;
|
|
11739
|
-
}
|
|
11740
|
-
});
|
|
11741
|
-
api.on.editComponentState((payload) => {
|
|
11742
|
-
if (payload.type.startsWith("🍍")) {
|
|
11743
|
-
const storeId = payload.type.replace(/^🍍\s*/, "");
|
|
11744
|
-
const store = pinia._s.get(storeId);
|
|
11745
|
-
if (!store) return toastMessage(`store "${storeId}" not found`, "error");
|
|
11746
|
-
const { path } = payload;
|
|
11747
|
-
if (path[0] !== "state") return toastMessage(`Invalid path for store "${storeId}":\n${path}\nOnly state can be modified.`);
|
|
11748
|
-
path[0] = "$state";
|
|
11749
|
-
isTimelineActive = false;
|
|
11750
|
-
payload.set(store, path, payload.state.value);
|
|
11751
|
-
isTimelineActive = true;
|
|
11752
|
-
}
|
|
11753
|
-
});
|
|
11754
|
-
});
|
|
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);
|
|
11755
11695
|
}
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
componentStateTypes,
|
|
11765
|
-
app,
|
|
11766
|
-
settings: { logStoreChanges: {
|
|
11767
|
-
label: "Notify about new/deleted stores",
|
|
11768
|
-
type: "boolean",
|
|
11769
|
-
defaultValue: true
|
|
11770
|
-
} }
|
|
11771
|
-
}, (api) => {
|
|
11772
|
-
const now = typeof api.now === "function" ? api.now.bind(api) : Date.now;
|
|
11773
|
-
store.$onAction(({ after, onError, name, args }) => {
|
|
11774
|
-
const groupId = runningActionId++;
|
|
11775
|
-
api.addTimelineEvent({
|
|
11776
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11777
|
-
event: {
|
|
11778
|
-
time: now(),
|
|
11779
|
-
title: "🛫 " + name,
|
|
11780
|
-
subtitle: "start",
|
|
11781
|
-
data: {
|
|
11782
|
-
store: formatDisplay(store.$id),
|
|
11783
|
-
action: formatDisplay(name),
|
|
11784
|
-
args
|
|
11785
|
-
},
|
|
11786
|
-
groupId
|
|
11787
|
-
}
|
|
11788
|
-
});
|
|
11789
|
-
after((result) => {
|
|
11790
|
-
activeAction = void 0;
|
|
11791
|
-
api.addTimelineEvent({
|
|
11792
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11793
|
-
event: {
|
|
11794
|
-
time: now(),
|
|
11795
|
-
title: "🛬 " + name,
|
|
11796
|
-
subtitle: "end",
|
|
11797
|
-
data: {
|
|
11798
|
-
store: formatDisplay(store.$id),
|
|
11799
|
-
action: formatDisplay(name),
|
|
11800
|
-
args,
|
|
11801
|
-
result
|
|
11802
|
-
},
|
|
11803
|
-
groupId
|
|
11804
|
-
}
|
|
11805
|
-
});
|
|
11806
|
-
});
|
|
11807
|
-
onError((error) => {
|
|
11808
|
-
activeAction = void 0;
|
|
11809
|
-
api.addTimelineEvent({
|
|
11810
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11811
|
-
event: {
|
|
11812
|
-
time: now(),
|
|
11813
|
-
logType: "error",
|
|
11814
|
-
title: "💥 " + name,
|
|
11815
|
-
subtitle: "end",
|
|
11816
|
-
data: {
|
|
11817
|
-
store: formatDisplay(store.$id),
|
|
11818
|
-
action: formatDisplay(name),
|
|
11819
|
-
args,
|
|
11820
|
-
error
|
|
11821
|
-
},
|
|
11822
|
-
groupId
|
|
11823
|
-
}
|
|
11824
|
-
});
|
|
11825
|
-
});
|
|
11826
|
-
}, true);
|
|
11827
|
-
store._customProperties.forEach((name) => {
|
|
11828
|
-
watch(() => unref(store[name]), (newValue, oldValue) => {
|
|
11829
|
-
api.notifyComponentUpdate();
|
|
11830
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11831
|
-
if (isTimelineActive) api.addTimelineEvent({
|
|
11832
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11833
|
-
event: {
|
|
11834
|
-
time: now(),
|
|
11835
|
-
title: "Change",
|
|
11836
|
-
subtitle: name,
|
|
11837
|
-
data: {
|
|
11838
|
-
newValue,
|
|
11839
|
-
oldValue
|
|
11840
|
-
},
|
|
11841
|
-
groupId: activeAction
|
|
11842
|
-
}
|
|
11843
|
-
});
|
|
11844
|
-
}, { deep: true });
|
|
11845
|
-
});
|
|
11846
|
-
store.$subscribe(({ events, type }, state) => {
|
|
11847
|
-
api.notifyComponentUpdate();
|
|
11848
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11849
|
-
if (!isTimelineActive) return;
|
|
11850
|
-
const eventData = {
|
|
11851
|
-
time: now(),
|
|
11852
|
-
title: formatMutationType(type),
|
|
11853
|
-
data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),
|
|
11854
|
-
groupId: activeAction
|
|
11855
|
-
};
|
|
11856
|
-
if (type === MutationType.patchFunction) eventData.subtitle = "⤵️";
|
|
11857
|
-
else if (type === MutationType.patchObject) eventData.subtitle = "🧩";
|
|
11858
|
-
else if (events && !Array.isArray(events)) eventData.subtitle = events.type;
|
|
11859
|
-
if (events) eventData.data["rawEvent(s)"] = { _custom: {
|
|
11860
|
-
display: "DebuggerEvent",
|
|
11861
|
-
type: "object",
|
|
11862
|
-
tooltip: "raw DebuggerEvent[]",
|
|
11863
|
-
value: events
|
|
11864
|
-
} };
|
|
11865
|
-
api.addTimelineEvent({
|
|
11866
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11867
|
-
event: eventData
|
|
11868
|
-
});
|
|
11869
|
-
}, {
|
|
11870
|
-
detached: true,
|
|
11871
|
-
flush: "sync"
|
|
11872
|
-
});
|
|
11873
|
-
const hotUpdate = store._hotUpdate;
|
|
11874
|
-
store._hotUpdate = markRaw((newStore) => {
|
|
11875
|
-
hotUpdate(newStore);
|
|
11876
|
-
api.addTimelineEvent({
|
|
11877
|
-
layerId: MUTATIONS_LAYER_ID,
|
|
11878
|
-
event: {
|
|
11879
|
-
time: now(),
|
|
11880
|
-
title: "🔥 " + store.$id,
|
|
11881
|
-
subtitle: "HMR update",
|
|
11882
|
-
data: {
|
|
11883
|
-
store: formatDisplay(store.$id),
|
|
11884
|
-
info: formatDisplay(`HMR update`)
|
|
11885
|
-
}
|
|
11886
|
-
}
|
|
11887
|
-
});
|
|
11888
|
-
api.notifyComponentUpdate();
|
|
11889
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11890
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11891
|
-
});
|
|
11892
|
-
const { $dispose } = store;
|
|
11893
|
-
store.$dispose = () => {
|
|
11894
|
-
$dispose();
|
|
11895
|
-
api.notifyComponentUpdate();
|
|
11896
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11897
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11898
|
-
api.getSettings().logStoreChanges && toastMessage(`Disposed "${store.$id}" store 🗑`);
|
|
11899
|
-
};
|
|
11900
|
-
api.notifyComponentUpdate();
|
|
11901
|
-
api.sendInspectorTree(INSPECTOR_ID);
|
|
11902
|
-
api.sendInspectorState(INSPECTOR_ID);
|
|
11903
|
-
api.getSettings().logStoreChanges && toastMessage(`"${store.$id}" store installed 🆕`);
|
|
11904
|
-
});
|
|
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;
|
|
11905
11704
|
}
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
function
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
const trackedStore = wrapWithProxy ? new Proxy(store, {
|
|
11916
|
-
get(...args) {
|
|
11917
|
-
activeAction = _actionId;
|
|
11918
|
-
return Reflect.get(...args);
|
|
11919
|
-
},
|
|
11920
|
-
set(...args) {
|
|
11921
|
-
activeAction = _actionId;
|
|
11922
|
-
return Reflect.set(...args);
|
|
11923
|
-
}
|
|
11924
|
-
}) : store;
|
|
11925
|
-
activeAction = _actionId;
|
|
11926
|
-
const retValue = actions[actionName].apply(trackedStore, arguments);
|
|
11927
|
-
activeAction = void 0;
|
|
11928
|
-
return retValue;
|
|
11929
|
-
};
|
|
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
|
+
}
|
|
11930
11714
|
}
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
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;
|
|
11941
11725
|
}
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
install(app) {
|
|
11949
|
-
setActivePinia(pinia);
|
|
11950
|
-
pinia._a = app;
|
|
11951
|
-
app.provide(piniaSymbol, pinia);
|
|
11952
|
-
app.config.globalProperties.$pinia = pinia;
|
|
11953
|
-
/* istanbul ignore else */
|
|
11954
|
-
if (USE_DEVTOOLS) registerPiniaDevtools(app, pinia);
|
|
11955
|
-
toBeInstalled.forEach((plugin) => _p.push(plugin));
|
|
11956
|
-
toBeInstalled = [];
|
|
11957
|
-
},
|
|
11958
|
-
use(plugin) {
|
|
11959
|
-
if (!this._a && true) toBeInstalled.push(plugin);
|
|
11960
|
-
else _p.push(plugin);
|
|
11961
|
-
return this;
|
|
11962
|
-
},
|
|
11963
|
-
_p,
|
|
11964
|
-
_a: null,
|
|
11965
|
-
_e: scope,
|
|
11966
|
-
_s: /* @__PURE__ */ new Map(),
|
|
11967
|
-
state
|
|
11968
|
-
});
|
|
11969
|
-
if (USE_DEVTOOLS && typeof Proxy !== "undefined") pinia.use(devtoolsPlugin);
|
|
11970
|
-
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;
|
|
11971
11732
|
}
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
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]);
|
|
11979
11773
|
}
|
|
11980
|
-
return newState;
|
|
11981
11774
|
}
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
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()
|
|
11991
11791
|
};
|
|
11992
|
-
if (!detached && getCurrentScope()) onScopeDispose(removeSubscription);
|
|
11993
|
-
return removeSubscription;
|
|
11994
11792
|
}
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
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;
|
|
11999
11798
|
}
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
if (!patchToApply.hasOwnProperty(key)) continue;
|
|
12006
|
-
const subPatch = patchToApply[key];
|
|
12007
|
-
const targetValue = target[key];
|
|
12008
|
-
if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) target[key] = mergeReactiveObjects(targetValue, subPatch);
|
|
12009
|
-
else target[key] = subPatch;
|
|
12010
|
-
}
|
|
12011
|
-
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;
|
|
12012
11804
|
}
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
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;
|
|
12016
11811
|
}
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
11812
|
+
//#endregion
|
|
11813
|
+
//#region ../../node_modules/lodash-es/_mapCacheGet.js
|
|
11814
|
+
function mapCacheGet(key) {
|
|
11815
|
+
return getMapData(this, key).get(key);
|
|
12020
11816
|
}
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
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]);
|
|
12037
11838
|
}
|
|
12038
|
-
store = createSetupStore(id, setup, options, pinia, hot, true);
|
|
12039
|
-
return store;
|
|
12040
11839
|
}
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
let isListening;
|
|
12058
|
-
let isSyncListening;
|
|
12059
|
-
let subscriptions = [];
|
|
12060
|
-
let actionSubscriptions = [];
|
|
12061
|
-
let debuggerEvents;
|
|
12062
|
-
const initialState = pinia.state.value[$id];
|
|
12063
|
-
if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== "production") || !hot)) pinia.state.value[$id] = {};
|
|
12064
|
-
const hotState = ref({});
|
|
12065
|
-
let activeListener;
|
|
12066
|
-
function $patch(partialStateOrMutator) {
|
|
12067
|
-
let subscriptionMutation;
|
|
12068
|
-
isListening = isSyncListening = false;
|
|
12069
|
-
/* istanbul ignore else */
|
|
12070
|
-
if (process.env.NODE_ENV !== "production") debuggerEvents = [];
|
|
12071
|
-
if (typeof partialStateOrMutator === "function") {
|
|
12072
|
-
partialStateOrMutator(pinia.state.value[$id]);
|
|
12073
|
-
subscriptionMutation = {
|
|
12074
|
-
type: MutationType.patchFunction,
|
|
12075
|
-
storeId: $id,
|
|
12076
|
-
events: debuggerEvents
|
|
12077
|
-
};
|
|
12078
|
-
} else {
|
|
12079
|
-
mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
|
|
12080
|
-
subscriptionMutation = {
|
|
12081
|
-
type: MutationType.patchObject,
|
|
12082
|
-
payload: partialStateOrMutator,
|
|
12083
|
-
storeId: $id,
|
|
12084
|
-
events: debuggerEvents
|
|
12085
|
-
};
|
|
12086
|
-
}
|
|
12087
|
-
const myListenerId = activeListener = Symbol();
|
|
12088
|
-
nextTick().then(() => {
|
|
12089
|
-
if (activeListener === myListenerId) isListening = true;
|
|
12090
|
-
});
|
|
12091
|
-
isSyncListening = true;
|
|
12092
|
-
triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
|
|
12093
|
-
}
|
|
12094
|
-
const $reset = isOptionsStore ? function $reset() {
|
|
12095
|
-
const { state } = options;
|
|
12096
|
-
const newState = state ? state() : {};
|
|
12097
|
-
this.$patch(($state) => {
|
|
12098
|
-
assign($state, newState);
|
|
12099
|
-
});
|
|
12100
|
-
} : process.env.NODE_ENV !== "production" ? () => {
|
|
12101
|
-
throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
|
|
12102
|
-
} : noop;
|
|
12103
|
-
function $dispose() {
|
|
12104
|
-
scope.stop();
|
|
12105
|
-
subscriptions = [];
|
|
12106
|
-
actionSubscriptions = [];
|
|
12107
|
-
pinia._s.delete($id);
|
|
12108
|
-
}
|
|
12109
|
-
function wrapAction(name, action) {
|
|
12110
|
-
return function() {
|
|
12111
|
-
setActivePinia(pinia);
|
|
12112
|
-
const args = Array.from(arguments);
|
|
12113
|
-
const afterCallbackList = [];
|
|
12114
|
-
const onErrorCallbackList = [];
|
|
12115
|
-
function after(callback) {
|
|
12116
|
-
afterCallbackList.push(callback);
|
|
12117
|
-
}
|
|
12118
|
-
function onError(callback) {
|
|
12119
|
-
onErrorCallbackList.push(callback);
|
|
12120
|
-
}
|
|
12121
|
-
triggerSubscriptions(actionSubscriptions, {
|
|
12122
|
-
args,
|
|
12123
|
-
name,
|
|
12124
|
-
store,
|
|
12125
|
-
after,
|
|
12126
|
-
onError
|
|
12127
|
-
});
|
|
12128
|
-
let ret;
|
|
12129
|
-
try {
|
|
12130
|
-
ret = action.apply(this && this.$id === $id ? this : store, args);
|
|
12131
|
-
} catch (error) {
|
|
12132
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
12133
|
-
throw error;
|
|
12134
|
-
}
|
|
12135
|
-
if (ret instanceof Promise) return ret.then((value) => {
|
|
12136
|
-
triggerSubscriptions(afterCallbackList, value);
|
|
12137
|
-
return value;
|
|
12138
|
-
}).catch((error) => {
|
|
12139
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
12140
|
-
return Promise.reject(error);
|
|
12141
|
-
});
|
|
12142
|
-
triggerSubscriptions(afterCallbackList, ret);
|
|
12143
|
-
return ret;
|
|
12144
|
-
};
|
|
12145
|
-
}
|
|
12146
|
-
const _hmrPayload = /*#__PURE__*/ markRaw({
|
|
12147
|
-
actions: {},
|
|
12148
|
-
getters: {},
|
|
12149
|
-
state: [],
|
|
12150
|
-
hotState
|
|
12151
|
-
});
|
|
12152
|
-
const partialStore = {
|
|
12153
|
-
_p: pinia,
|
|
12154
|
-
$id,
|
|
12155
|
-
$onAction: addSubscription.bind(null, actionSubscriptions),
|
|
12156
|
-
$patch,
|
|
12157
|
-
$reset,
|
|
12158
|
-
$subscribe(callback, options = {}) {
|
|
12159
|
-
const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());
|
|
12160
|
-
const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
|
|
12161
|
-
if (options.flush === "sync" ? isSyncListening : isListening) callback({
|
|
12162
|
-
storeId: $id,
|
|
12163
|
-
type: MutationType.direct,
|
|
12164
|
-
events: debuggerEvents
|
|
12165
|
-
}, state);
|
|
12166
|
-
}, assign({}, $subscribeOptions, options)));
|
|
12167
|
-
return removeSubscription;
|
|
12168
|
-
},
|
|
12169
|
-
$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;
|
|
12170
11856
|
};
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
12181
|
-
|
|
12182
|
-
if (initialState && shouldHydrate(prop)) {
|
|
12183
|
-
if (isRef(prop)) prop.value = initialState[key];
|
|
12184
|
-
else mergeReactiveObjects(prop, initialState[key]);
|
|
12185
|
-
}
|
|
12186
|
-
pinia.state.value[$id][key] = prop;
|
|
12187
|
-
}
|
|
12188
|
-
/* istanbul ignore else */
|
|
12189
|
-
if (process.env.NODE_ENV !== "production") _hmrPayload.state.push(key);
|
|
12190
|
-
} else if (typeof prop === "function") {
|
|
12191
|
-
setupStore[key] = process.env.NODE_ENV !== "production" && hot ? prop : wrapAction(key, prop);
|
|
12192
|
-
/* istanbul ignore else */
|
|
12193
|
-
if (process.env.NODE_ENV !== "production") _hmrPayload.actions[key] = prop;
|
|
12194
|
-
optionsForPlugin.actions[key] = prop;
|
|
12195
|
-
} else if (process.env.NODE_ENV !== "production") {
|
|
12196
|
-
if (isComputed(prop)) {
|
|
12197
|
-
_hmrPayload.getters[key] = isOptionsStore ? options.getters[key] : prop;
|
|
12198
|
-
if (IS_CLIENT) (setupStore._getters || (setupStore._getters = markRaw([]))).push(key);
|
|
12199
|
-
}
|
|
12200
|
-
}
|
|
12201
|
-
}
|
|
12202
|
-
assign(store, setupStore);
|
|
12203
|
-
assign(toRaw(store), setupStore);
|
|
12204
|
-
Object.defineProperty(store, "$state", {
|
|
12205
|
-
get: () => process.env.NODE_ENV !== "production" && hot ? hotState.value : pinia.state.value[$id],
|
|
12206
|
-
set: (state) => {
|
|
12207
|
-
/* istanbul ignore if */
|
|
12208
|
-
if (process.env.NODE_ENV !== "production" && hot) throw new Error("cannot set hotState");
|
|
12209
|
-
$patch(($state) => {
|
|
12210
|
-
assign($state, state);
|
|
12211
|
-
});
|
|
12212
|
-
}
|
|
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;
|
|
12213
11868
|
});
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
Object.keys(store.$state).forEach((stateKey) => {
|
|
12227
|
-
if (!(stateKey in newStore.$state)) del(store, stateKey);
|
|
12228
|
-
});
|
|
12229
|
-
isListening = false;
|
|
12230
|
-
isSyncListening = false;
|
|
12231
|
-
pinia.state.value[$id] = toRef(newStore._hmrPayload, "hotState");
|
|
12232
|
-
isSyncListening = true;
|
|
12233
|
-
nextTick().then(() => {
|
|
12234
|
-
isListening = true;
|
|
12235
|
-
});
|
|
12236
|
-
for (const actionName in newStore._hmrPayload.actions) {
|
|
12237
|
-
const action = newStore[actionName];
|
|
12238
|
-
set(store, actionName, wrapAction(actionName, action));
|
|
12239
|
-
}
|
|
12240
|
-
for (const getterName in newStore._hmrPayload.getters) {
|
|
12241
|
-
const getter = newStore._hmrPayload.getters[getterName];
|
|
12242
|
-
const getterValue = isOptionsStore ? computed(() => {
|
|
12243
|
-
setActivePinia(pinia);
|
|
12244
|
-
return getter.call(store, store);
|
|
12245
|
-
}) : getter;
|
|
12246
|
-
set(store, getterName, getterValue);
|
|
12247
|
-
}
|
|
12248
|
-
Object.keys(store._hmrPayload.getters).forEach((key) => {
|
|
12249
|
-
if (!(key in newStore._hmrPayload.getters)) del(store, key);
|
|
12250
|
-
});
|
|
12251
|
-
Object.keys(store._hmrPayload.actions).forEach((key) => {
|
|
12252
|
-
if (!(key in newStore._hmrPayload.actions)) del(store, key);
|
|
12253
|
-
});
|
|
12254
|
-
store._hmrPayload = newStore._hmrPayload;
|
|
12255
|
-
store._getters = newStore._getters;
|
|
12256
|
-
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);
|
|
12257
11881
|
});
|
|
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
|
-
|
|
12297
|
-
|
|
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) || [];
|
|
12298
12293
|
}
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
function
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
|
|
12324
|
-
if (
|
|
12325
|
-
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
delete pinia.state.value[hotId];
|
|
12329
|
-
pinia._s.delete(hotId);
|
|
12330
|
-
}
|
|
12331
|
-
if (process.env.NODE_ENV !== "production" && IS_CLIENT) {
|
|
12332
|
-
const currentInstance = getCurrentInstance();
|
|
12333
|
-
if (currentInstance && currentInstance.proxy && !hot) {
|
|
12334
|
-
const vm = currentInstance.proxy;
|
|
12335
|
-
const cache = "_pStores" in vm ? vm._pStores : vm._pStores = {};
|
|
12336
|
-
cache[id] = store;
|
|
12337
|
-
}
|
|
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]) ? [] : {};
|
|
12338
12323
|
}
|
|
12339
|
-
|
|
12324
|
+
assignValue(nested, key, newValue);
|
|
12325
|
+
nested = nested[key];
|
|
12340
12326
|
}
|
|
12341
|
-
|
|
12342
|
-
|
|
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);
|
|
12343
12333
|
}
|
|
12344
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
|
|
12345
12345
|
//#region ../admin/src/stores/useActionStore.ts
|
|
12346
12346
|
var useActionStore = defineStore("actions", () => {
|
|
12347
12347
|
const actions = ref([]);
|
|
@@ -12427,12 +12427,14 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12427
12427
|
const { loading } = useLoading();
|
|
12428
12428
|
const opened = ref(null);
|
|
12429
12429
|
const context = ref(null);
|
|
12430
|
+
const token = shallowRef(null);
|
|
12430
12431
|
const openHooks = ref([]);
|
|
12431
12432
|
const closeHooks = ref([]);
|
|
12432
12433
|
return {
|
|
12433
12434
|
loading,
|
|
12434
12435
|
opened,
|
|
12435
12436
|
context,
|
|
12437
|
+
token,
|
|
12436
12438
|
onOpen(callback) {
|
|
12437
12439
|
openHooks.value.push(callback);
|
|
12438
12440
|
},
|
|
@@ -12442,6 +12444,7 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12442
12444
|
open(modal, newContext) {
|
|
12443
12445
|
context.value = newContext;
|
|
12444
12446
|
opened.value = modal;
|
|
12447
|
+
token.value = { modal };
|
|
12445
12448
|
openHooks.value.forEach((hook) => hook(modal, newContext));
|
|
12446
12449
|
},
|
|
12447
12450
|
close() {
|
|
@@ -12449,6 +12452,7 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12449
12452
|
const modal = opened.value;
|
|
12450
12453
|
opened.value = null;
|
|
12451
12454
|
context.value = null;
|
|
12455
|
+
token.value = null;
|
|
12452
12456
|
closeHooks.value.forEach((hook) => hook(modal));
|
|
12453
12457
|
}
|
|
12454
12458
|
};
|
|
@@ -12458,7 +12462,7 @@ var useModalStore = defineStore("modal", () => {
|
|
|
12458
12462
|
var convertDotNotationToObject = (object, valueCallback = (value) => value) => {
|
|
12459
12463
|
const result = {};
|
|
12460
12464
|
Object.entries(object).forEach(([key, value]) => {
|
|
12461
|
-
set
|
|
12465
|
+
set(result, key, valueCallback(value, key));
|
|
12462
12466
|
});
|
|
12463
12467
|
return result;
|
|
12464
12468
|
};
|
|
@@ -12482,6 +12486,27 @@ var encodeArrayParameter = (parameter) => {
|
|
|
12482
12486
|
return encodeURIComponent(toArray(parameter).filter(isDef).join(";"));
|
|
12483
12487
|
};
|
|
12484
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
|
+
};
|
|
12508
|
+
};
|
|
12509
|
+
//#endregion
|
|
12485
12510
|
//#region ../admin/src/components/common/ActionButton.vue
|
|
12486
12511
|
var ActionButton_default = /* @__PURE__ */ defineComponent({
|
|
12487
12512
|
__name: "ActionButton",
|
|
@@ -12765,7 +12790,9 @@ var AbstractPdkEndpoint = class extends x$1 {};
|
|
|
12765
12790
|
//#region ../admin/src/sdk/composables/usePdkAdminApi.ts
|
|
12766
12791
|
var usePdkAdminApi = createGlobalState(() => {
|
|
12767
12792
|
const globalContext = useGlobalContext();
|
|
12768
|
-
|
|
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]) => {
|
|
12769
12796
|
const property = typeof options.property === "string" ? options.property : void 0;
|
|
12770
12797
|
const responseProperty = typeof options.responseProperty === "string" ? options.responseProperty : void 0;
|
|
12771
12798
|
class PdkEndpoint extends AbstractPdkEndpoint {
|
|
@@ -12886,7 +12913,7 @@ var createPropSetter = (instance, prefix) => {
|
|
|
12886
12913
|
let field;
|
|
12887
12914
|
if (target) field = instance.form.getField(`${prefix}${target}`);
|
|
12888
12915
|
else field = instance;
|
|
12889
|
-
set
|
|
12916
|
+
set(field.props, prop, value);
|
|
12890
12917
|
};
|
|
12891
12918
|
};
|
|
12892
12919
|
//#endregion
|
|
@@ -13911,6 +13938,63 @@ var fillShipmentsQueryData = (queryClient, shipments, order) => {
|
|
|
13911
13938
|
});
|
|
13912
13939
|
};
|
|
13913
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
|
|
13914
13998
|
//#region ../admin/src/symbols.ts
|
|
13915
13999
|
var INJECT_ADMIN_INSTANCE = Symbol("instance");
|
|
13916
14000
|
var INJECT_GLOBAL_PDK_ADMIN = Symbol("admin");
|
|
@@ -14225,56 +14309,6 @@ var resolveTranslatedString = (translated, replacers, translation) => {
|
|
|
14225
14309
|
}, translated);
|
|
14226
14310
|
};
|
|
14227
14311
|
//#endregion
|
|
14228
|
-
//#region ../admin/src/composables/language/resolveTranslationKey.ts
|
|
14229
|
-
var resolveTranslationKey = (translation) => {
|
|
14230
|
-
return typeof translation === "string" ? translation : translation.key;
|
|
14231
|
-
};
|
|
14232
|
-
//#endregion
|
|
14233
|
-
//#region ../admin/src/composables/language/useLanguage.ts
|
|
14234
|
-
var useCache = createGlobalState(() => /* @__PURE__ */ new Map());
|
|
14235
|
-
var useMissingKeys = createGlobalState(() => ref([]));
|
|
14236
|
-
var all = () => {
|
|
14237
|
-
const { translations } = useGlobalContext();
|
|
14238
|
-
if (!translations) globalLogger.warn("Translations not found.");
|
|
14239
|
-
return translations;
|
|
14240
|
-
};
|
|
14241
|
-
var has = (translation) => {
|
|
14242
|
-
if (!translation) return false;
|
|
14243
|
-
if (isOfType$1(translation, "text")) return true;
|
|
14244
|
-
const translations = memoizedAll();
|
|
14245
|
-
return Boolean(translation && translations && resolveTranslationKey(translation) in translations);
|
|
14246
|
-
};
|
|
14247
|
-
var translate = (translation, replacers) => {
|
|
14248
|
-
if (!translation) return "";
|
|
14249
|
-
if (isOfType$1(translation, "text")) return translation.text;
|
|
14250
|
-
const translationKey = resolveTranslationKey(translation);
|
|
14251
|
-
const cache = useCache();
|
|
14252
|
-
const cacheKey = [translationKey, isOfType$1(translation, "args") ? translation.args : void 0].filter(Boolean).join("|");
|
|
14253
|
-
if (memoizedHas(translation)) {
|
|
14254
|
-
if (!cache.has(cacheKey)) {
|
|
14255
|
-
const translated = decodeHtmlEntities(memoizedAll()[translationKey]);
|
|
14256
|
-
cache.set(cacheKey, resolveTranslatedString(translated, replacers, translation));
|
|
14257
|
-
}
|
|
14258
|
-
} else {
|
|
14259
|
-
const missingKeys = useMissingKeys();
|
|
14260
|
-
globalLogger.warn(`Missing translation: ${translationKey}`);
|
|
14261
|
-
missingKeys.value.push(translationKey);
|
|
14262
|
-
cache.set(cacheKey, translationKey);
|
|
14263
|
-
}
|
|
14264
|
-
return cache.get(cacheKey);
|
|
14265
|
-
};
|
|
14266
|
-
var memoizedAll = useMemoize(all);
|
|
14267
|
-
var memoizedHas = useMemoize(has);
|
|
14268
|
-
var memoizedTranslate = useMemoize(translate);
|
|
14269
|
-
var useLanguage = () => {
|
|
14270
|
-
return {
|
|
14271
|
-
missingKeys: useMissingKeys(),
|
|
14272
|
-
all: memoizedAll,
|
|
14273
|
-
has: memoizedHas,
|
|
14274
|
-
translate: memoizedTranslate
|
|
14275
|
-
};
|
|
14276
|
-
};
|
|
14277
|
-
//#endregion
|
|
14278
14312
|
//#region ../admin/src/composables/formatter/default/createCurrencyFormat.ts
|
|
14279
14313
|
var createCurrencyFormat = (locale) => {
|
|
14280
14314
|
return new Intl.NumberFormat(locale, {
|
|
@@ -14622,20 +14656,29 @@ var getCallbackForMutationMode = (mode) => {
|
|
|
14622
14656
|
}
|
|
14623
14657
|
};
|
|
14624
14658
|
//#endregion
|
|
14625
|
-
//#region ../admin/src/services/mutations/
|
|
14626
|
-
var
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
useModalStore().close();
|
|
14630
|
-
},
|
|
14631
|
-
onSettled() {
|
|
14632
|
-
useModalStore().loading = false;
|
|
14633
|
-
},
|
|
14634
|
-
onError(error) {
|
|
14635
|
-
addErrorToNotifications(error, NotificationCategory.Modal);
|
|
14636
|
-
}
|
|
14637
|
-
};
|
|
14659
|
+
//#region ../admin/src/services/mutations/modalMutationToken.ts
|
|
14660
|
+
var keepModalToken = (onMutate) => (variables) => {
|
|
14661
|
+
onMutate?.(variables);
|
|
14662
|
+
return { modalToken: useModalStore().token };
|
|
14638
14663
|
};
|
|
14664
|
+
var isSameModal = (context) => {
|
|
14665
|
+
const modalToken = context?.modalToken;
|
|
14666
|
+
return Boolean(modalToken) && modalToken === useModalStore().token;
|
|
14667
|
+
};
|
|
14668
|
+
//#endregion
|
|
14669
|
+
//#region ../admin/src/services/mutations/getModalMutationOptions.ts
|
|
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
|
+
});
|
|
14639
14682
|
//#endregion
|
|
14640
14683
|
//#region ../admin/src/services/print/createPdfObjectUrl.ts
|
|
14641
14684
|
var createPdfObjectUrl = (pdf) => {
|
|
@@ -14719,6 +14762,7 @@ var usePdkMutation = (endpoint, mutationFn, options) => {
|
|
|
14719
14762
|
//#region ../admin/src/actions/composables/mutations/orders/useExportOrdersMutation.ts
|
|
14720
14763
|
var useExportOrdersMutation = (orderIds, mode = MutationMode.Default) => {
|
|
14721
14764
|
const queryClient = useQueryClient();
|
|
14765
|
+
const defaultMutationOptions = queryClient.defaultMutationOptions();
|
|
14722
14766
|
return usePdkMutation(BackendEndpoint.ExportOrders, async (input) => {
|
|
14723
14767
|
const pdk = usePdkAdminApi();
|
|
14724
14768
|
getCallbackForMutationMode(mode)?.();
|
|
@@ -14728,10 +14772,11 @@ var useExportOrdersMutation = (orderIds, mode = MutationMode.Default) => {
|
|
|
14728
14772
|
};
|
|
14729
14773
|
return pdk.exportOrders(options);
|
|
14730
14774
|
}, {
|
|
14731
|
-
...
|
|
14732
|
-
...mode === MutationMode.Modal ? getModalMutationOptions() : {},
|
|
14733
|
-
|
|
14734
|
-
|
|
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();
|
|
14735
14780
|
toArray(data).forEach((order) => {
|
|
14736
14781
|
fillShipmentsQueryData(queryClient, order.shipments?.slice(-1) ?? [], order);
|
|
14737
14782
|
});
|
|
@@ -15495,4 +15540,4 @@ var ShipmentLabel_default = /* @__PURE__ */ defineComponent({
|
|
|
15495
15540
|
}
|
|
15496
15541
|
});
|
|
15497
15542
|
//#endregion
|
|
15498
|
-
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 };
|