@valaxyjs/devtools 0.23.6 → 0.24.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/client/assets/{about-CKnJAe7D.js → about-owKsYr3E.js} +1 -1
- package/dist/client/assets/{categories-c6XTc6fg.js → categories-BGG1NAYq.js} +1 -1
- package/dist/client/assets/{index-SkBrsFRK.js → index-BQ28fLxA.js} +55 -1283
- package/dist/client/assets/{index-B0hInhA7.js → index-CuVxz6bX.js} +127 -140
- package/dist/client/assets/{migration-BbA8qycI.js → migration-BBvf-kdp.js} +2 -2
- package/dist/client/assets/{splitpanes.es-BzR2UKwq.js → splitpanes.es-BeYGdDVf.js} +70 -99
- package/dist/client/assets/{tags-BqCHcWyi.js → tags-BZ1s-2OD.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CuVxz6bX.js","./splitpanes.es-BeYGdDVf.js","./index-DKnSvpEK.css","./migration-BBvf-kdp.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
true &&(function polyfill() {
|
|
3
3
|
const relList = document.createElement("link").relList;
|
|
4
4
|
if (relList && relList.supports && relList.supports("modulepreload")) return;
|
|
@@ -30,1253 +30,25 @@ true &&(function polyfill() {
|
|
|
30
30
|
}());
|
|
31
31
|
/* Injected with object hook! */
|
|
32
32
|
|
|
33
|
-
var
|
|
34
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
35
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
36
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
37
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
38
|
-
var __spreadValues$1 = (a, b) => {
|
|
39
|
-
for (var prop in b || (b = {}))
|
|
40
|
-
if (__hasOwnProp$1.call(b, prop))
|
|
41
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
42
|
-
if (__getOwnPropSymbols$1)
|
|
43
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
44
|
-
if (__propIsEnum$1.call(b, prop))
|
|
45
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
46
|
-
}
|
|
47
|
-
return a;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// src/object/methods/isEmpty.ts
|
|
51
|
-
function isEmpty(value) {
|
|
52
|
-
return value === null || value === void 0 || value === "" || Array.isArray(value) && value.length === 0 || !(value instanceof Date) && typeof value === "object" && Object.keys(value).length === 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// src/object/methods/deepEquals.ts
|
|
56
|
-
function _deepEquals(obj1, obj2, visited = /* @__PURE__ */ new WeakSet()) {
|
|
57
|
-
if (obj1 === obj2) return true;
|
|
58
|
-
if (!obj1 || !obj2 || typeof obj1 !== "object" || typeof obj2 !== "object") return false;
|
|
59
|
-
if (visited.has(obj1) || visited.has(obj2)) return false;
|
|
60
|
-
visited.add(obj1).add(obj2);
|
|
61
|
-
const arrObj1 = Array.isArray(obj1);
|
|
62
|
-
const arrObj2 = Array.isArray(obj2);
|
|
63
|
-
let i, length, key;
|
|
64
|
-
if (arrObj1 && arrObj2) {
|
|
65
|
-
length = obj1.length;
|
|
66
|
-
if (length != obj2.length) return false;
|
|
67
|
-
for (i = length; i-- !== 0; ) if (!_deepEquals(obj1[i], obj2[i], visited)) return false;
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
if (arrObj1 != arrObj2) return false;
|
|
71
|
-
const dateObj1 = obj1 instanceof Date, dateObj2 = obj2 instanceof Date;
|
|
72
|
-
if (dateObj1 != dateObj2) return false;
|
|
73
|
-
if (dateObj1 && dateObj2) return obj1.getTime() == obj2.getTime();
|
|
74
|
-
const regexpObj1 = obj1 instanceof RegExp, regexpObj2 = obj2 instanceof RegExp;
|
|
75
|
-
if (regexpObj1 != regexpObj2) return false;
|
|
76
|
-
if (regexpObj1 && regexpObj2) return obj1.toString() == obj2.toString();
|
|
77
|
-
const keys = Object.keys(obj1);
|
|
78
|
-
length = keys.length;
|
|
79
|
-
if (length !== Object.keys(obj2).length) return false;
|
|
80
|
-
for (i = length; i-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(obj2, keys[i])) return false;
|
|
81
|
-
for (i = length; i-- !== 0; ) {
|
|
82
|
-
key = keys[i];
|
|
83
|
-
if (!_deepEquals(obj1[key], obj2[key], visited)) return false;
|
|
84
|
-
}
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
function deepEquals(obj1, obj2) {
|
|
88
|
-
return _deepEquals(obj1, obj2);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// src/object/methods/isFunction.ts
|
|
92
|
-
function isFunction$2(value) {
|
|
93
|
-
return typeof value === "function" && "call" in value && "apply" in value;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// src/object/methods/isNotEmpty.ts
|
|
97
|
-
function isNotEmpty(value) {
|
|
98
|
-
return !isEmpty(value);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// src/object/methods/resolveFieldData.ts
|
|
102
|
-
function resolveFieldData(data, field) {
|
|
103
|
-
if (!data || !field) {
|
|
104
|
-
return null;
|
|
105
|
-
}
|
|
106
|
-
try {
|
|
107
|
-
const value = data[field];
|
|
108
|
-
if (isNotEmpty(value)) return value;
|
|
109
|
-
} catch (e) {
|
|
110
|
-
}
|
|
111
|
-
if (Object.keys(data).length) {
|
|
112
|
-
if (isFunction$2(field)) {
|
|
113
|
-
return field(data);
|
|
114
|
-
} else if (field.indexOf(".") === -1) {
|
|
115
|
-
return data[field];
|
|
116
|
-
} else {
|
|
117
|
-
const fields = field.split(".");
|
|
118
|
-
let value = data;
|
|
119
|
-
for (let i = 0, len = fields.length; i < len; ++i) {
|
|
120
|
-
if (value == null) {
|
|
121
|
-
return null;
|
|
122
|
-
}
|
|
123
|
-
value = value[fields[i]];
|
|
124
|
-
}
|
|
125
|
-
return value;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// src/object/methods/equals.ts
|
|
132
|
-
function equals(obj1, obj2, field) {
|
|
133
|
-
if (field) return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
|
|
134
|
-
else return deepEquals(obj1, obj2);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// src/object/methods/contains.ts
|
|
138
|
-
function contains(value, list) {
|
|
139
|
-
if (value != null && list && list.length) {
|
|
140
|
-
for (const val of list) {
|
|
141
|
-
if (equals(value, val)) return true;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// src/object/methods/isObject.ts
|
|
148
|
-
function isObject$3(value, empty = true) {
|
|
149
|
-
return value instanceof Object && value.constructor === Object && (empty || Object.keys(value).length !== 0);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// src/object/methods/deepMerge.ts
|
|
153
|
-
function _deepMerge(target = {}, source = {}) {
|
|
154
|
-
const mergedObj = __spreadValues$1({}, target);
|
|
155
|
-
Object.keys(source).forEach((key) => {
|
|
156
|
-
const typedKey = key;
|
|
157
|
-
if (isObject$3(source[typedKey]) && typedKey in target && isObject$3(target[typedKey])) {
|
|
158
|
-
mergedObj[typedKey] = _deepMerge(target[typedKey], source[typedKey]);
|
|
159
|
-
} else {
|
|
160
|
-
mergedObj[typedKey] = source[typedKey];
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
return mergedObj;
|
|
164
|
-
}
|
|
165
|
-
function deepMerge(...args) {
|
|
166
|
-
return args.reduce((acc, obj, i) => i === 0 ? obj : _deepMerge(acc, obj), {});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// src/object/methods/resolve.ts
|
|
170
|
-
function resolve$1(obj, ...params) {
|
|
171
|
-
return isFunction$2(obj) ? obj(...params) : obj;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// src/object/methods/isString.ts
|
|
175
|
-
function isString$2(value, empty = true) {
|
|
176
|
-
return typeof value === "string" && (empty || value !== "");
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// src/object/methods/toFlatCase.ts
|
|
180
|
-
function toFlatCase(str) {
|
|
181
|
-
return isString$2(str) ? str.replace(/(-|_)/g, "").toLowerCase() : str;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// src/object/methods/getKeyValue.ts
|
|
185
|
-
function getKeyValue(obj, key = "", params = {}) {
|
|
186
|
-
const fKeys = toFlatCase(key).split(".");
|
|
187
|
-
const fKey = fKeys.shift();
|
|
188
|
-
if (fKey) {
|
|
189
|
-
if (isObject$3(obj)) {
|
|
190
|
-
const matchedKey = Object.keys(obj).find((k) => toFlatCase(k) === fKey) || "";
|
|
191
|
-
return getKeyValue(resolve$1(obj[matchedKey], params), fKeys.join("."), params);
|
|
192
|
-
}
|
|
193
|
-
return void 0;
|
|
194
|
-
}
|
|
195
|
-
return resolve$1(obj, params);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
// src/object/methods/isArray.ts
|
|
199
|
-
function isArray$3(value, empty = true) {
|
|
200
|
-
return Array.isArray(value) && (empty || value.length !== 0);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// src/object/methods/isNumber.ts
|
|
204
|
-
function isNumber$1(value) {
|
|
205
|
-
return isNotEmpty(value) && !isNaN(value);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// src/object/methods/localeComparator.ts
|
|
209
|
-
function localeComparator() {
|
|
210
|
-
return new Intl.Collator(void 0, { numeric: true }).compare;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// src/object/methods/matchRegex.ts
|
|
214
|
-
function matchRegex(str, regex) {
|
|
215
|
-
if (regex) {
|
|
216
|
-
const match = regex.test(str);
|
|
217
|
-
regex.lastIndex = 0;
|
|
218
|
-
return match;
|
|
219
|
-
}
|
|
220
|
-
return false;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
// src/object/methods/mergeKeys.ts
|
|
224
|
-
function mergeKeys(...args) {
|
|
225
|
-
return deepMerge(...args);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// src/object/methods/minifyCSS.ts
|
|
229
|
-
function minifyCSS(css) {
|
|
230
|
-
return css ? css.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/ ([{:}]) /g, "$1").replace(/([;,]) /g, "$1").replace(/ !/g, "!").replace(/: /g, ":").trim() : css;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// src/object/methods/toCapitalCase.ts
|
|
234
|
-
function toCapitalCase(str) {
|
|
235
|
-
return isString$2(str, false) ? str[0].toUpperCase() + str.slice(1) : str;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// src/object/methods/toKebabCase.ts
|
|
239
|
-
function toKebabCase(str) {
|
|
240
|
-
return isString$2(str) ? str.replace(/(_)/g, "-").replace(/[A-Z]/g, (c, i) => i === 0 ? c : "-" + c.toLowerCase()).toLowerCase() : str;
|
|
241
|
-
}
|
|
242
|
-
|
|
33
|
+
var oe$1=Object.defineProperty;var K$1=Object.getOwnPropertySymbols;var ue=Object.prototype.hasOwnProperty,fe$1=Object.prototype.propertyIsEnumerable;var N=(e,t,n)=>t in e?oe$1(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n,d$y=(e,t)=>{for(var n in t||(t={}))ue.call(t,n)&&N(e,n,t[n]);if(K$1)for(var n of K$1(t))fe$1.call(t,n)&&N(e,n,t[n]);return e};function a$F(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0}function R$2(e,t,n=new WeakSet){if(e===t)return true;if(!e||!t||typeof e!="object"||typeof t!="object"||n.has(e)||n.has(t))return false;n.add(e).add(t);let r=Array.isArray(e),o=Array.isArray(t),u,f,h;if(r&&o){if(f=e.length,f!=t.length)return false;for(u=f;u--!==0;)if(!R$2(e[u],t[u],n))return false;return true}if(r!=o)return false;let A=e instanceof Date,S=t instanceof Date;if(A!=S)return false;if(A&&S)return e.getTime()==t.getTime();let I=e instanceof RegExp,L=t instanceof RegExp;if(I!=L)return false;if(I&&L)return e.toString()==t.toString();let O=Object.keys(e);if(f=O.length,f!==Object.keys(t).length)return false;for(u=f;u--!==0;)if(!Object.prototype.hasOwnProperty.call(t,O[u]))return false;for(u=f;u--!==0;)if(h=O[u],!R$2(e[h],t[h],n))return false;return true}function y$1(e,t){return R$2(e,t)}function l$h(e){return typeof e=="function"&&"call"in e&&"apply"in e}function s$b(e){return !a$F(e)}function c$r(e,t){if(!e||!t)return null;try{let n=e[t];if(s$b(n))return n}catch(n){}if(Object.keys(e).length){if(l$h(t))return t(e);if(t.indexOf(".")===-1)return e[t];{let n=t.split("."),r=e;for(let o=0,u=n.length;o<u;++o){if(r==null)return null;r=r[n[o]];}return r}}return null}function k$4(e,t,n){return n?c$r(e,n)===c$r(t,n):y$1(e,t)}function B(e,t){if(e!=null&&t&&t.length){for(let n of t)if(k$4(e,n))return true}return false}function i$r(e,t=true){return e instanceof Object&&e.constructor===Object&&(t||Object.keys(e).length!==0)}function $$1(e={},t={}){let n=d$y({},e);return Object.keys(t).forEach(r=>{let o=r;i$r(t[o])&&o in e&&i$r(e[o])?n[o]=$$1(e[o],t[o]):n[o]=t[o];}),n}function w$1(...e){return e.reduce((t,n,r)=>r===0?n:$$1(t,n),{})}function m$3(e,...t){return l$h(e)?e(...t):e}function p$4(e,t=true){return typeof e=="string"&&(t||e!=="")}function g$6(e){return p$4(e)?e.replace(/(-|_)/g,"").toLowerCase():e}function F$1(e,t="",n={}){let r=g$6(t).split("."),o=r.shift();if(o){if(i$r(e)){let u=Object.keys(e).find(f=>g$6(f)===o)||"";return F$1(m$3(e[u],n),r.join("."),n)}return}return m$3(e,n)}function b$6(e,t=true){return Array.isArray(e)&&(t||e.length!==0)}function _$1(e){return s$b(e)&&!isNaN(e)}function W$1(){return new Intl.Collator(void 0,{numeric:true}).compare}function z$1(e,t){if(t){let n=t.test(e);return t.lastIndex=0,n}return false}function U$1(...e){return w$1(...e)}function G(e){return e&&e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":").trim()}function v$4(e){return p$4(e,false)?e[0].toUpperCase()+e.slice(1):e}function ee(e){return p$4(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,(t,n)=>n===0?t:"-"+t.toLowerCase()).toLowerCase():e}
|
|
243
34
|
/* Injected with object hook! */
|
|
244
35
|
|
|
245
|
-
|
|
246
|
-
function EventBus() {
|
|
247
|
-
const allHandlers = /* @__PURE__ */ new Map();
|
|
248
|
-
return {
|
|
249
|
-
on(type, handler) {
|
|
250
|
-
let handlers = allHandlers.get(type);
|
|
251
|
-
if (!handlers) handlers = [handler];
|
|
252
|
-
else handlers.push(handler);
|
|
253
|
-
allHandlers.set(type, handlers);
|
|
254
|
-
return this;
|
|
255
|
-
},
|
|
256
|
-
off(type, handler) {
|
|
257
|
-
const handlers = allHandlers.get(type);
|
|
258
|
-
if (handlers) {
|
|
259
|
-
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
260
|
-
}
|
|
261
|
-
return this;
|
|
262
|
-
},
|
|
263
|
-
emit(type, evt) {
|
|
264
|
-
const handlers = allHandlers.get(type);
|
|
265
|
-
if (handlers) {
|
|
266
|
-
handlers.forEach((handler) => {
|
|
267
|
-
handler(evt);
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
clear() {
|
|
272
|
-
allHandlers.clear();
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
|
|
36
|
+
function s$a(){let r=new Map;return {on(e,t){let n=r.get(e);return n?n.push(t):n=[t],r.set(e,n),this},off(e,t){let n=r.get(e);return n&&n.splice(n.indexOf(t)>>>0,1),this},emit(e,t){let n=r.get(e);n&&n.forEach(i=>{i(t);});},clear(){r.clear();}}}
|
|
277
37
|
/* Injected with object hook! */
|
|
278
38
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
// src/dom/methods/addClass.ts
|
|
289
|
-
function addClass(element, className) {
|
|
290
|
-
if (element && className) {
|
|
291
|
-
const fn = (_className) => {
|
|
292
|
-
if (!hasClass(element, _className)) {
|
|
293
|
-
if (element.classList) element.classList.add(_className);
|
|
294
|
-
else element.className += " " + _className;
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
[className].flat().filter(Boolean).forEach((_classNames) => _classNames.split(" ").forEach(fn));
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
// src/dom/methods/removeClass.ts
|
|
302
|
-
function removeClass(element, className) {
|
|
303
|
-
if (element && className) {
|
|
304
|
-
const fn = (_className) => {
|
|
305
|
-
if (element.classList) element.classList.remove(_className);
|
|
306
|
-
else element.className = element.className.replace(new RegExp("(^|\\b)" + _className.split(" ").join("|") + "(\\b|$)", "gi"), " ");
|
|
307
|
-
};
|
|
308
|
-
[className].flat().filter(Boolean).forEach((_classNames) => _classNames.split(" ").forEach(fn));
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// src/dom/methods/getCSSVariableByRegex.ts
|
|
313
|
-
function getCSSVariableByRegex(variableRegex) {
|
|
314
|
-
for (const sheet of document == null ? void 0 : document.styleSheets) {
|
|
315
|
-
try {
|
|
316
|
-
for (const rule of sheet == null ? void 0 : sheet.cssRules) {
|
|
317
|
-
for (const property of rule == null ? void 0 : rule.style) {
|
|
318
|
-
if (variableRegex.test(property)) {
|
|
319
|
-
return { name: property, value: rule.style.getPropertyValue(property).trim() };
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
} catch (e) {
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return null;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// src/dom/methods/getHiddenElementDimensions.ts
|
|
330
|
-
function getHiddenElementDimensions(element) {
|
|
331
|
-
const dimensions = { width: 0, height: 0 };
|
|
332
|
-
if (element) {
|
|
333
|
-
element.style.visibility = "hidden";
|
|
334
|
-
element.style.display = "block";
|
|
335
|
-
dimensions.width = element.offsetWidth;
|
|
336
|
-
dimensions.height = element.offsetHeight;
|
|
337
|
-
element.style.display = "none";
|
|
338
|
-
element.style.visibility = "visible";
|
|
339
|
-
}
|
|
340
|
-
return dimensions;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// src/dom/methods/getViewport.ts
|
|
344
|
-
function getViewport() {
|
|
345
|
-
const win = window, d = document, e = d.documentElement, g = d.getElementsByTagName("body")[0], w = win.innerWidth || e.clientWidth || g.clientWidth, h = win.innerHeight || e.clientHeight || g.clientHeight;
|
|
346
|
-
return { width: w, height: h };
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// src/dom/methods/getScrollLeft.ts
|
|
350
|
-
function getScrollLeft(element) {
|
|
351
|
-
return element ? Math.abs(element.scrollLeft) : 0;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// src/dom/methods/getWindowScrollLeft.ts
|
|
355
|
-
function getWindowScrollLeft() {
|
|
356
|
-
const doc = document.documentElement;
|
|
357
|
-
return (window.pageXOffset || getScrollLeft(doc)) - (doc.clientLeft || 0);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// src/dom/methods/getWindowScrollTop.ts
|
|
361
|
-
function getWindowScrollTop() {
|
|
362
|
-
const doc = document.documentElement;
|
|
363
|
-
return (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// src/dom/methods/isRTL.ts
|
|
367
|
-
function isRTL(element) {
|
|
368
|
-
return element ? getComputedStyle(element).direction === "rtl" : false;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// src/dom/methods/absolutePosition.ts
|
|
372
|
-
function absolutePosition(element, target, gutter = true) {
|
|
373
|
-
var _a, _b, _c, _d;
|
|
374
|
-
if (element) {
|
|
375
|
-
const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : getHiddenElementDimensions(element);
|
|
376
|
-
const elementOuterHeight = elementDimensions.height;
|
|
377
|
-
const elementOuterWidth = elementDimensions.width;
|
|
378
|
-
const targetOuterHeight = target.offsetHeight;
|
|
379
|
-
const targetOuterWidth = target.offsetWidth;
|
|
380
|
-
const targetOffset = target.getBoundingClientRect();
|
|
381
|
-
const windowScrollTop = getWindowScrollTop();
|
|
382
|
-
const windowScrollLeft = getWindowScrollLeft();
|
|
383
|
-
const viewport = getViewport();
|
|
384
|
-
let top, left, origin = "top";
|
|
385
|
-
if (targetOffset.top + targetOuterHeight + elementOuterHeight > viewport.height) {
|
|
386
|
-
top = targetOffset.top + windowScrollTop - elementOuterHeight;
|
|
387
|
-
origin = "bottom";
|
|
388
|
-
if (top < 0) {
|
|
389
|
-
top = windowScrollTop;
|
|
390
|
-
}
|
|
391
|
-
} else {
|
|
392
|
-
top = targetOuterHeight + targetOffset.top + windowScrollTop;
|
|
393
|
-
}
|
|
394
|
-
if (targetOffset.left + elementOuterWidth > viewport.width) left = Math.max(0, targetOffset.left + windowScrollLeft + targetOuterWidth - elementOuterWidth);
|
|
395
|
-
else left = targetOffset.left + windowScrollLeft;
|
|
396
|
-
if (isRTL(element)) {
|
|
397
|
-
element.style.insetInlineEnd = left + "px";
|
|
398
|
-
} else {
|
|
399
|
-
element.style.insetInlineStart = left + "px";
|
|
400
|
-
}
|
|
401
|
-
element.style.top = top + "px";
|
|
402
|
-
element.style.transformOrigin = origin;
|
|
403
|
-
if (gutter) element.style.marginTop = origin === "bottom" ? `calc(${(_b = (_a = getCSSVariableByRegex(/-anchor-gutter$/)) == null ? void 0 : _a.value) != null ? _b : "2px"} * -1)` : (_d = (_c = getCSSVariableByRegex(/-anchor-gutter$/)) == null ? void 0 : _c.value) != null ? _d : "";
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
// src/dom/methods/addStyle.ts
|
|
408
|
-
function addStyle(element, style) {
|
|
409
|
-
if (element) {
|
|
410
|
-
if (typeof style === "string") {
|
|
411
|
-
element.style.cssText = style;
|
|
412
|
-
} else {
|
|
413
|
-
Object.entries(style || {}).forEach(([key, value]) => element.style[key] = value);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// src/dom/methods/getOuterWidth.ts
|
|
419
|
-
function getOuterWidth(element, margin) {
|
|
420
|
-
if (element instanceof HTMLElement) {
|
|
421
|
-
let width = element.offsetWidth;
|
|
422
|
-
return width;
|
|
423
|
-
}
|
|
424
|
-
return 0;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
// src/dom/methods/relativePosition.ts
|
|
428
|
-
function relativePosition(element, target, gutter = true) {
|
|
429
|
-
var _a, _b, _c, _d;
|
|
430
|
-
if (element) {
|
|
431
|
-
const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : getHiddenElementDimensions(element);
|
|
432
|
-
const targetHeight = target.offsetHeight;
|
|
433
|
-
const targetOffset = target.getBoundingClientRect();
|
|
434
|
-
const viewport = getViewport();
|
|
435
|
-
let top, left, origin = "top";
|
|
436
|
-
if (targetOffset.top + targetHeight + elementDimensions.height > viewport.height) {
|
|
437
|
-
top = -1 * elementDimensions.height;
|
|
438
|
-
origin = "bottom";
|
|
439
|
-
if (targetOffset.top + top < 0) {
|
|
440
|
-
top = -1 * targetOffset.top;
|
|
441
|
-
}
|
|
442
|
-
} else {
|
|
443
|
-
top = targetHeight;
|
|
444
|
-
}
|
|
445
|
-
if (elementDimensions.width > viewport.width) {
|
|
446
|
-
left = targetOffset.left * -1;
|
|
447
|
-
} else if (targetOffset.left + elementDimensions.width > viewport.width) {
|
|
448
|
-
left = (targetOffset.left + elementDimensions.width - viewport.width) * -1;
|
|
449
|
-
} else {
|
|
450
|
-
left = 0;
|
|
451
|
-
}
|
|
452
|
-
element.style.top = top + "px";
|
|
453
|
-
element.style.insetInlineStart = left + "px";
|
|
454
|
-
element.style.transformOrigin = origin;
|
|
455
|
-
gutter && (element.style.marginTop = origin === "bottom" ? `calc(${(_b = (_a = getCSSVariableByRegex(/-anchor-gutter$/)) == null ? void 0 : _a.value) != null ? _b : "2px"} * -1)` : (_d = (_c = getCSSVariableByRegex(/-anchor-gutter$/)) == null ? void 0 : _c.value) != null ? _d : "");
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
// src/dom/methods/getParentNode.ts
|
|
460
|
-
function getParentNode(element) {
|
|
461
|
-
if (element) {
|
|
462
|
-
let parent = element.parentNode;
|
|
463
|
-
if (parent && parent instanceof ShadowRoot && parent.host) {
|
|
464
|
-
parent = parent.host;
|
|
465
|
-
}
|
|
466
|
-
return parent;
|
|
467
|
-
}
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// src/dom/methods/isExist.ts
|
|
472
|
-
function isExist(element) {
|
|
473
|
-
return !!(element !== null && typeof element !== "undefined" && element.nodeName && getParentNode(element));
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
// src/dom/methods/isElement.ts
|
|
477
|
-
function isElement(element) {
|
|
478
|
-
return typeof Element !== "undefined" ? element instanceof Element : element !== null && typeof element === "object" && element.nodeType === 1 && typeof element.nodeName === "string";
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// src/dom/methods/clearSelection.ts
|
|
482
|
-
function clearSelection() {
|
|
483
|
-
if (window.getSelection) {
|
|
484
|
-
const selection = window.getSelection() || {};
|
|
485
|
-
if (selection.empty) {
|
|
486
|
-
selection.empty();
|
|
487
|
-
} else if (selection.removeAllRanges && selection.rangeCount > 0 && selection.getRangeAt(0).getClientRects().length > 0) {
|
|
488
|
-
selection.removeAllRanges();
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
// src/dom/methods/setAttributes.ts
|
|
494
|
-
function setAttributes(element, attributes = {}) {
|
|
495
|
-
if (isElement(element)) {
|
|
496
|
-
const computedStyles = (rule, value) => {
|
|
497
|
-
var _a, _b;
|
|
498
|
-
const styles = ((_a = element == null ? void 0 : element.$attrs) == null ? void 0 : _a[rule]) ? [(_b = element == null ? void 0 : element.$attrs) == null ? void 0 : _b[rule]] : [];
|
|
499
|
-
return [value].flat().reduce((cv, v) => {
|
|
500
|
-
if (v !== null && v !== void 0) {
|
|
501
|
-
const type = typeof v;
|
|
502
|
-
if (type === "string" || type === "number") {
|
|
503
|
-
cv.push(v);
|
|
504
|
-
} else if (type === "object") {
|
|
505
|
-
const _cv = Array.isArray(v) ? computedStyles(rule, v) : Object.entries(v).map(([_k, _v]) => rule === "style" && (!!_v || _v === 0) ? `${_k.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}:${_v}` : _v ? _k : void 0);
|
|
506
|
-
cv = _cv.length ? cv.concat(_cv.filter((c) => !!c)) : cv;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
return cv;
|
|
510
|
-
}, styles);
|
|
511
|
-
};
|
|
512
|
-
Object.entries(attributes).forEach(([key, value]) => {
|
|
513
|
-
if (value !== void 0 && value !== null) {
|
|
514
|
-
const matchedEvent = key.match(/^on(.+)/);
|
|
515
|
-
if (matchedEvent) {
|
|
516
|
-
element.addEventListener(matchedEvent[1].toLowerCase(), value);
|
|
517
|
-
} else if (key === "p-bind" || key === "pBind") {
|
|
518
|
-
setAttributes(element, value);
|
|
519
|
-
} else {
|
|
520
|
-
value = key === "class" ? [...new Set(computedStyles("class", value))].join(" ").trim() : key === "style" ? computedStyles("style", value).join(";").trim() : value;
|
|
521
|
-
(element.$attrs = element.$attrs || {}) && (element.$attrs[key] = value);
|
|
522
|
-
element.setAttribute(key, value);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
// src/dom/methods/createElement.ts
|
|
530
|
-
function createElement(type, attributes = {}, ...children) {
|
|
531
|
-
{
|
|
532
|
-
const element = document.createElement(type);
|
|
533
|
-
setAttributes(element, attributes);
|
|
534
|
-
element.append(...children);
|
|
535
|
-
return element;
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
// src/dom/methods/find.ts
|
|
540
|
-
function find(element, selector) {
|
|
541
|
-
return isElement(element) ? Array.from(element.querySelectorAll(selector)) : [];
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
// src/dom/methods/findSingle.ts
|
|
545
|
-
function findSingle(element, selector) {
|
|
546
|
-
return isElement(element) ? element.matches(selector) ? element : element.querySelector(selector) : null;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
// src/dom/methods/getAttribute.ts
|
|
550
|
-
function getAttribute(element, name) {
|
|
551
|
-
if (isElement(element)) {
|
|
552
|
-
const value = element.getAttribute(name);
|
|
553
|
-
if (!isNaN(value)) {
|
|
554
|
-
return +value;
|
|
555
|
-
}
|
|
556
|
-
if (value === "true" || value === "false") {
|
|
557
|
-
return value === "true";
|
|
558
|
-
}
|
|
559
|
-
return value;
|
|
560
|
-
}
|
|
561
|
-
return void 0;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
// src/dom/methods/getFocusableElements.ts
|
|
565
|
-
function getFocusableElements(element, selector = "") {
|
|
566
|
-
const focusableElements = find(
|
|
567
|
-
element,
|
|
568
|
-
`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
569
|
-
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
570
|
-
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
571
|
-
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
572
|
-
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
573
|
-
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector},
|
|
574
|
-
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${selector}`
|
|
575
|
-
);
|
|
576
|
-
const visibleFocusableElements = [];
|
|
577
|
-
for (const focusableElement of focusableElements) {
|
|
578
|
-
if (getComputedStyle(focusableElement).display != "none" && getComputedStyle(focusableElement).visibility != "hidden") visibleFocusableElements.push(focusableElement);
|
|
579
|
-
}
|
|
580
|
-
return visibleFocusableElements;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
// src/dom/methods/getHeight.ts
|
|
584
|
-
function getHeight(element) {
|
|
585
|
-
if (element) {
|
|
586
|
-
let height = element.offsetHeight;
|
|
587
|
-
const style = getComputedStyle(element);
|
|
588
|
-
height -= parseFloat(style.paddingTop) + parseFloat(style.paddingBottom) + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
589
|
-
return height;
|
|
590
|
-
}
|
|
591
|
-
return 0;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
// src/dom/methods/getIndex.ts
|
|
595
|
-
function getIndex(element) {
|
|
596
|
-
var _a;
|
|
597
|
-
if (element) {
|
|
598
|
-
const children = (_a = getParentNode(element)) == null ? void 0 : _a.childNodes;
|
|
599
|
-
let num = 0;
|
|
600
|
-
if (children) {
|
|
601
|
-
for (let i = 0; i < children.length; i++) {
|
|
602
|
-
if (children[i] === element) return num;
|
|
603
|
-
if (children[i].nodeType === 1) num++;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
return -1;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
// src/dom/methods/getOffset.ts
|
|
611
|
-
function getOffset(element) {
|
|
612
|
-
if (element) {
|
|
613
|
-
const rect = element.getBoundingClientRect();
|
|
614
|
-
return {
|
|
615
|
-
top: rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),
|
|
616
|
-
left: rect.left + (window.pageXOffset || getScrollLeft(document.documentElement) || getScrollLeft(document.body) || 0)
|
|
617
|
-
};
|
|
618
|
-
}
|
|
619
|
-
return {
|
|
620
|
-
top: "auto",
|
|
621
|
-
left: "auto"
|
|
622
|
-
};
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
// src/dom/methods/getOuterHeight.ts
|
|
626
|
-
function getOuterHeight(element, margin) {
|
|
627
|
-
if (element) {
|
|
628
|
-
let height = element.offsetHeight;
|
|
629
|
-
return height;
|
|
630
|
-
}
|
|
631
|
-
return 0;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
// src/dom/methods/getParents.ts
|
|
635
|
-
function getParents(element, parents = []) {
|
|
636
|
-
const parent = getParentNode(element);
|
|
637
|
-
return parent === null ? parents : getParents(parent, parents.concat([parent]));
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
// src/dom/methods/getScrollableParents.ts
|
|
641
|
-
function getScrollableParents(element) {
|
|
642
|
-
const scrollableParents = [];
|
|
643
|
-
if (element) {
|
|
644
|
-
const parents = getParents(element);
|
|
645
|
-
const overflowRegex = /(auto|scroll)/;
|
|
646
|
-
const overflowCheck = (node) => {
|
|
647
|
-
try {
|
|
648
|
-
const styleDeclaration = window["getComputedStyle"](node, null);
|
|
649
|
-
return overflowRegex.test(styleDeclaration.getPropertyValue("overflow")) || overflowRegex.test(styleDeclaration.getPropertyValue("overflowX")) || overflowRegex.test(styleDeclaration.getPropertyValue("overflowY"));
|
|
650
|
-
} catch (e) {
|
|
651
|
-
return false;
|
|
652
|
-
}
|
|
653
|
-
};
|
|
654
|
-
for (const parent of parents) {
|
|
655
|
-
const scrollSelectors = parent.nodeType === 1 && parent.dataset["scrollselectors"];
|
|
656
|
-
if (scrollSelectors) {
|
|
657
|
-
const selectors = scrollSelectors.split(",");
|
|
658
|
-
for (const selector of selectors) {
|
|
659
|
-
const el = findSingle(parent, selector);
|
|
660
|
-
if (el && overflowCheck(el)) {
|
|
661
|
-
scrollableParents.push(el);
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
|
666
|
-
scrollableParents.push(parent);
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
return scrollableParents;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
// src/dom/methods/getSelection.ts
|
|
674
|
-
function getSelection() {
|
|
675
|
-
if (window.getSelection) return window.getSelection().toString();
|
|
676
|
-
else if (document.getSelection) return document.getSelection().toString();
|
|
677
|
-
return void 0;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
// src/dom/methods/getWidth.ts
|
|
681
|
-
function getWidth(element) {
|
|
682
|
-
if (element) {
|
|
683
|
-
let width = element.offsetWidth;
|
|
684
|
-
const style = getComputedStyle(element);
|
|
685
|
-
width -= parseFloat(style.paddingLeft) + parseFloat(style.paddingRight) + parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth);
|
|
686
|
-
return width;
|
|
687
|
-
}
|
|
688
|
-
return 0;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
// src/dom/methods/isClient.ts
|
|
692
|
-
function isClient$1() {
|
|
693
|
-
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
// src/dom/methods/isTouchDevice.ts
|
|
697
|
-
function isTouchDevice() {
|
|
698
|
-
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
// src/dom/methods/setAttribute.ts
|
|
702
|
-
function setAttribute(element, attribute = "", value) {
|
|
703
|
-
if (isElement(element) && value !== null && value !== void 0) {
|
|
704
|
-
element.setAttribute(attribute, value);
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
|
|
39
|
+
function R$1(t,e){return t?t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className):false}function W(t,e){if(t&&e){let o=n=>{R$1(t,n)||(t.classList?t.classList.add(n):t.className+=" "+n);};[e].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(o));}}function O(t,e){if(t&&e){let o=n=>{t.classList?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ");};[e].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(o));}}function x(t){for(let e of document==null?void 0:document.styleSheets)try{for(let o of e==null?void 0:e.cssRules)for(let n of o==null?void 0:o.style)if(t.test(n))return {name:n,value:o.style.getPropertyValue(n).trim()}}catch(o){}return null}function w(t){let e={width:0,height:0};if(t){let[o,n]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block",e.width=t.offsetWidth,e.height=t.offsetHeight,t.style.display=n,t.style.visibility=o;}return e}function h$5(){let t=window,e=document,o=e.documentElement,n=e.getElementsByTagName("body")[0],r=t.innerWidth||o.clientWidth||n.clientWidth,i=t.innerHeight||o.clientHeight||n.clientHeight;return {width:r,height:i}}function E(t){return t?Math.abs(t.scrollLeft):0}function k$3(){let t=document.documentElement;return (window.pageXOffset||E(t))-(t.clientLeft||0)}function $(){let t=document.documentElement;return (window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function V(t){return t?getComputedStyle(t).direction==="rtl":false}function D(t,e,o=true){var n,r,i,l;if(t){let d=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:w(t),s=d.height,a=d.width,u=e.offsetHeight,p=e.offsetWidth,f=e.getBoundingClientRect(),g=$(),it=k$3(),lt=h$5(),L,N,ot="top";f.top+u+s>lt.height?(L=f.top+g-s,ot="bottom",L<0&&(L=g)):L=u+f.top+g,f.left+a>lt.width?N=Math.max(0,f.left+it+p-a):N=f.left+it,V(t)?t.style.insetInlineEnd=N+"px":t.style.insetInlineStart=N+"px",t.style.top=L+"px",t.style.transformOrigin=ot,o&&(t.style.marginTop=ot==="bottom"?`calc(${(r=(n=x(/-anchor-gutter$/))==null?void 0:n.value)!=null?r:"2px"} * -1)`:(l=(i=x(/-anchor-gutter$/))==null?void 0:i.value)!=null?l:"");}}function S$1(t,e){t&&(typeof e=="string"?t.style.cssText=e:Object.entries(e||{}).forEach(([o,n])=>t.style[o]=n));}function v$3(t,e){if(t instanceof HTMLElement){let o=t.offsetWidth;return o}return 0}function I(t,e,o=true,n=void 0){var r;if(t){let i=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:w(t),l=e.offsetHeight,d=e.getBoundingClientRect(),s=h$5(),a,u,p=n!=null?n:"top";if(!n&&d.top+l+i.height>s.height?(a=-1*i.height,p="bottom",d.top+a<0&&(a=-1*d.top)):a=l,i.width>s.width?u=d.left*-1:d.left+i.width>s.width?u=(d.left+i.width-s.width)*-1:u=0,t.style.top=a+"px",t.style.insetInlineStart=u+"px",t.style.transformOrigin=p,o){let f=(r=x(/-anchor-gutter$/))==null?void 0:r.value;t.style.marginTop=p==="bottom"?`calc(${f!=null?f:"2px"} * -1)`:f!=null?f:"";}}}function y(t){if(t){let e=t.parentNode;return e&&e instanceof ShadowRoot&&e.host&&(e=e.host),e}return null}function T$1(t){return !!(t!==null&&typeof t!="undefined"&&t.nodeName&&y(t))}function c$q(t){return typeof Element!="undefined"?t instanceof Element:t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"}function pt(){if(window.getSelection){let t=window.getSelection()||{};t.empty?t.empty():t.removeAllRanges&&t.rangeCount>0&&t.getRangeAt(0).getClientRects().length>0&&t.removeAllRanges();}}function A(t,e={}){if(c$q(t)){let o=(n,r)=>{var l,d;let i=(l=t==null?void 0:t.$attrs)!=null&&l[n]?[(d=t==null?void 0:t.$attrs)==null?void 0:d[n]]:[];return [r].flat().reduce((s,a)=>{if(a!=null){let u=typeof a;if(u==="string"||u==="number")s.push(a);else if(u==="object"){let p=Array.isArray(a)?o(n,a):Object.entries(a).map(([f,g])=>n==="style"&&(g||g===0)?`${f.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${g}`:g?f:void 0);s=p.length?s.concat(p.filter(f=>!!f)):s;}}return s},i)};Object.entries(e).forEach(([n,r])=>{if(r!=null){let i=n.match(/^on(.+)/);i?t.addEventListener(i[1].toLowerCase(),r):n==="p-bind"||n==="pBind"?A(t,r):(r=n==="class"?[...new Set(o("class",r))].join(" ").trim():n==="style"?o("style",r).join(";").trim():r,(t.$attrs=t.$attrs||{})&&(t.$attrs[n]=r),t.setAttribute(n,r));}});}}function U(t,e={},...o){{let n=document.createElement(t);return A(n,e),n.append(...o),n}}function Y$1(t,e){return c$q(t)?Array.from(t.querySelectorAll(e)):[]}function z(t,e){return c$q(t)?t.matches(e)?t:t.querySelector(e):null}function Q$1(t,e){if(c$q(t)){let o=t.getAttribute(e);return isNaN(o)?o==="true"||o==="false"?o==="true":o:+o}}function b$5(t,e=""){let o=Y$1(t,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
40
|
+
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
41
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
42
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
43
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
44
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e},
|
|
45
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${e}`),n=[];for(let r of o)getComputedStyle(r).display!="none"&&getComputedStyle(r).visibility!="hidden"&&n.push(r);return n}function Tt(t){if(t){let e=t.offsetHeight,o=getComputedStyle(t);return e-=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)+parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),e}return 0}function Ht(t){var e;if(t){let o=(e=y(t))==null?void 0:e.childNodes,n=0;if(o)for(let r=0;r<o.length;r++){if(o[r]===t)return n;o[r].nodeType===1&&n++;}}return -1}function K(t){if(t){let e=t.getBoundingClientRect();return {top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||E(document.documentElement)||E(document.body)||0)}}return {top:"auto",left:"auto"}}function C(t,e){if(t){let o=t.offsetHeight;return o}return 0}function M(t,e=[]){let o=y(t);return o===null?e:M(o,e.concat([o]))}function At(t){let e=[];if(t){let o=M(t),n=/(auto|scroll)/,r=i=>{try{let l=window.getComputedStyle(i,null);return n.test(l.getPropertyValue("overflow"))||n.test(l.getPropertyValue("overflowX"))||n.test(l.getPropertyValue("overflowY"))}catch(l){return false}};for(let i of o){let l=i.nodeType===1&&i.dataset.scrollselectors;if(l){let d=l.split(",");for(let s of d){let a=z(i,s);a&&r(a)&&e.push(a);}}i.nodeType!==9&&r(i)&&e.push(i);}}return e}function Mt(){if(window.getSelection)return window.getSelection().toString();if(document.getSelection)return document.getSelection().toString()}function Rt(t){if(t){let e=t.offsetWidth,o=getComputedStyle(t);return e-=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight)+parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth),e}return 0}function tt$1(){return !!(typeof window!="undefined"&&window.document&&window.document.createElement)}function Yt(){return "ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function Kt(t,e="",o){c$q(t)&&o!==null&&o!==void 0&&t.setAttribute(e,o);}
|
|
708
46
|
/* Injected with object hook! */
|
|
709
47
|
|
|
710
|
-
var __defProp = Object.defineProperty;
|
|
711
|
-
var __defProps = Object.defineProperties;
|
|
712
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
713
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
714
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
715
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
716
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
717
|
-
var __spreadValues = (a, b) => {
|
|
718
|
-
for (var prop in b || (b = {}))
|
|
719
|
-
if (__hasOwnProp.call(b, prop))
|
|
720
|
-
__defNormalProp(a, prop, b[prop]);
|
|
721
|
-
if (__getOwnPropSymbols)
|
|
722
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
723
|
-
if (__propIsEnum.call(b, prop))
|
|
724
|
-
__defNormalProp(a, prop, b[prop]);
|
|
725
|
-
}
|
|
726
|
-
return a;
|
|
727
|
-
};
|
|
728
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
729
|
-
var __objRest = (source, exclude) => {
|
|
730
|
-
var target = {};
|
|
731
|
-
for (var prop in source)
|
|
732
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
733
|
-
target[prop] = source[prop];
|
|
734
|
-
if (source != null && __getOwnPropSymbols)
|
|
735
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
736
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
737
|
-
target[prop] = source[prop];
|
|
738
|
-
}
|
|
739
|
-
return target;
|
|
740
|
-
};
|
|
741
|
-
function definePreset(...presets) {
|
|
742
|
-
return deepMerge(...presets);
|
|
743
|
-
}
|
|
744
|
-
var ThemeService = EventBus();
|
|
745
|
-
var service_default = ThemeService;
|
|
746
|
-
var EXPR_REGEX = /{([^}]*)}/g;
|
|
747
|
-
var CALC_REGEX = /(\d+\s+[\+\-\*\/]\s+\d+)/g;
|
|
748
|
-
var VAR_REGEX = /var\([^)]+\)/g;
|
|
749
|
-
function toValue$1(value) {
|
|
750
|
-
return isObject$3(value) && value.hasOwnProperty("$value") && value.hasOwnProperty("$type") ? value.$value : value;
|
|
751
|
-
}
|
|
752
|
-
function toNormalizePrefix(prefix) {
|
|
753
|
-
return prefix.replaceAll(/ /g, "").replace(/[^\w]/g, "-");
|
|
754
|
-
}
|
|
755
|
-
function toNormalizeVariable(prefix = "", variable = "") {
|
|
756
|
-
return toNormalizePrefix(`${isString$2(prefix, false) && isString$2(variable, false) ? `${prefix}-` : prefix}${variable}`);
|
|
757
|
-
}
|
|
758
|
-
function getVariableName(prefix = "", variable = "") {
|
|
759
|
-
return `--${toNormalizeVariable(prefix, variable)}`;
|
|
760
|
-
}
|
|
761
|
-
function hasOddBraces(str = "") {
|
|
762
|
-
const openBraces = (str.match(/{/g) || []).length;
|
|
763
|
-
const closeBraces = (str.match(/}/g) || []).length;
|
|
764
|
-
return (openBraces + closeBraces) % 2 !== 0;
|
|
765
|
-
}
|
|
766
|
-
function getVariableValue(value, variable = "", prefix = "", excludedKeyRegexes = [], fallback) {
|
|
767
|
-
if (isString$2(value)) {
|
|
768
|
-
const val = value.trim();
|
|
769
|
-
if (hasOddBraces(val)) {
|
|
770
|
-
return void 0;
|
|
771
|
-
} else if (matchRegex(val, EXPR_REGEX)) {
|
|
772
|
-
const _val = val.replaceAll(EXPR_REGEX, (v) => {
|
|
773
|
-
const path = v.replace(/{|}/g, "");
|
|
774
|
-
const keys = path.split(".").filter((_v) => !excludedKeyRegexes.some((_r) => matchRegex(_v, _r)));
|
|
775
|
-
return `var(${getVariableName(prefix, toKebabCase(keys.join("-")))}${isNotEmpty(fallback) ? `, ${fallback}` : ""})`;
|
|
776
|
-
});
|
|
777
|
-
return matchRegex(_val.replace(VAR_REGEX, "0"), CALC_REGEX) ? `calc(${_val})` : _val;
|
|
778
|
-
}
|
|
779
|
-
return val;
|
|
780
|
-
} else if (isNumber$1(value)) {
|
|
781
|
-
return value;
|
|
782
|
-
}
|
|
783
|
-
return void 0;
|
|
784
|
-
}
|
|
785
|
-
function setProperty(properties, key, value) {
|
|
786
|
-
if (isString$2(key, false)) {
|
|
787
|
-
properties.push(`${key}:${value};`);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
function getRule(selector, properties) {
|
|
791
|
-
if (selector) {
|
|
792
|
-
return `${selector}{${properties}}`;
|
|
793
|
-
}
|
|
794
|
-
return "";
|
|
795
|
-
}
|
|
796
|
-
function evaluateDtExpressions(input, fn) {
|
|
797
|
-
if (input.indexOf("dt(") === -1) return input;
|
|
798
|
-
function fastParseArgs(str, fn2) {
|
|
799
|
-
const args = [];
|
|
800
|
-
let i = 0;
|
|
801
|
-
let current = "";
|
|
802
|
-
let quote = null;
|
|
803
|
-
let depth = 0;
|
|
804
|
-
while (i <= str.length) {
|
|
805
|
-
const c = str[i];
|
|
806
|
-
if ((c === '"' || c === "'" || c === "`") && str[i - 1] !== "\\") {
|
|
807
|
-
quote = quote === c ? null : c;
|
|
808
|
-
}
|
|
809
|
-
if (!quote) {
|
|
810
|
-
if (c === "(") depth++;
|
|
811
|
-
if (c === ")") depth--;
|
|
812
|
-
if ((c === "," || i === str.length) && depth === 0) {
|
|
813
|
-
const arg = current.trim();
|
|
814
|
-
if (arg.startsWith("dt(")) {
|
|
815
|
-
args.push(evaluateDtExpressions(arg, fn2));
|
|
816
|
-
} else {
|
|
817
|
-
args.push(parseArg(arg));
|
|
818
|
-
}
|
|
819
|
-
current = "";
|
|
820
|
-
i++;
|
|
821
|
-
continue;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
if (c !== void 0) current += c;
|
|
825
|
-
i++;
|
|
826
|
-
}
|
|
827
|
-
return args;
|
|
828
|
-
}
|
|
829
|
-
function parseArg(arg) {
|
|
830
|
-
const q = arg[0];
|
|
831
|
-
if ((q === '"' || q === "'" || q === "`") && arg[arg.length - 1] === q) {
|
|
832
|
-
return arg.slice(1, -1);
|
|
833
|
-
}
|
|
834
|
-
const num = Number(arg);
|
|
835
|
-
return isNaN(num) ? arg : num;
|
|
836
|
-
}
|
|
837
|
-
const indices = [];
|
|
838
|
-
const stack = [];
|
|
839
|
-
for (let i = 0; i < input.length; i++) {
|
|
840
|
-
if (input[i] === "d" && input.slice(i, i + 3) === "dt(") {
|
|
841
|
-
stack.push(i);
|
|
842
|
-
i += 2;
|
|
843
|
-
} else if (input[i] === ")" && stack.length > 0) {
|
|
844
|
-
const start = stack.pop();
|
|
845
|
-
if (stack.length === 0) {
|
|
846
|
-
indices.push([start, i]);
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
if (!indices.length) return input;
|
|
851
|
-
for (let i = indices.length - 1; i >= 0; i--) {
|
|
852
|
-
const [start, end] = indices[i];
|
|
853
|
-
const inner = input.slice(start + 3, end);
|
|
854
|
-
const args = fastParseArgs(inner, fn);
|
|
855
|
-
const resolved = fn(...args);
|
|
856
|
-
input = input.slice(0, start) + resolved + input.slice(end + 1);
|
|
857
|
-
}
|
|
858
|
-
return input;
|
|
859
|
-
}
|
|
860
|
-
var dt = (...args) => {
|
|
861
|
-
return dtwt(config_default.getTheme(), ...args);
|
|
862
|
-
};
|
|
863
|
-
var dtwt = (theme = {}, tokenPath, fallback, type) => {
|
|
864
|
-
if (tokenPath) {
|
|
865
|
-
const { variable: VARIABLE, options: OPTIONS } = config_default.defaults || {};
|
|
866
|
-
const { prefix, transform } = (theme == null ? void 0 : theme.options) || OPTIONS || {};
|
|
867
|
-
const token = matchRegex(tokenPath, EXPR_REGEX) ? tokenPath : `{${tokenPath}}`;
|
|
868
|
-
const isStrictTransform = type === "value" || isEmpty(type) && transform === "strict";
|
|
869
|
-
return isStrictTransform ? config_default.getTokenValue(tokenPath) : getVariableValue(token, void 0, prefix, [VARIABLE.excludedKeyRegex], fallback);
|
|
870
|
-
}
|
|
871
|
-
return "";
|
|
872
|
-
};
|
|
873
|
-
|
|
874
|
-
// src/helpers/css.ts
|
|
875
|
-
function css$1(strings, ...exprs) {
|
|
876
|
-
if (strings instanceof Array) {
|
|
877
|
-
const raw = strings.reduce((acc, str, i) => {
|
|
878
|
-
var _a;
|
|
879
|
-
return acc + str + ((_a = resolve$1(exprs[i], { dt })) != null ? _a : "");
|
|
880
|
-
}, "");
|
|
881
|
-
return evaluateDtExpressions(raw, dt);
|
|
882
|
-
}
|
|
883
|
-
return resolve$1(strings, { dt });
|
|
884
|
-
}
|
|
885
|
-
function toVariables_default(theme, options = {}) {
|
|
886
|
-
const VARIABLE = config_default.defaults.variable;
|
|
887
|
-
const { prefix = VARIABLE.prefix, selector = VARIABLE.selector, excludedKeyRegex = VARIABLE.excludedKeyRegex } = options;
|
|
888
|
-
const tokens = [];
|
|
889
|
-
const variables = [];
|
|
890
|
-
const stack = [{ node: theme, path: prefix }];
|
|
891
|
-
while (stack.length) {
|
|
892
|
-
const { node, path } = stack.pop();
|
|
893
|
-
for (const key in node) {
|
|
894
|
-
const raw = node[key];
|
|
895
|
-
const val = toValue$1(raw);
|
|
896
|
-
const skipNormalize = matchRegex(key, excludedKeyRegex);
|
|
897
|
-
const variablePath = skipNormalize ? toNormalizeVariable(path) : toNormalizeVariable(path, toKebabCase(key));
|
|
898
|
-
if (isObject$3(val)) {
|
|
899
|
-
stack.push({ node: val, path: variablePath });
|
|
900
|
-
} else {
|
|
901
|
-
const varName = getVariableName(variablePath);
|
|
902
|
-
const varValue = getVariableValue(val, variablePath, prefix, [excludedKeyRegex]);
|
|
903
|
-
setProperty(variables, varName, varValue);
|
|
904
|
-
let token = variablePath;
|
|
905
|
-
if (prefix && token.startsWith(prefix + "-")) {
|
|
906
|
-
token = token.slice(prefix.length + 1);
|
|
907
|
-
}
|
|
908
|
-
tokens.push(token.replace(/-/g, "."));
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
const declarations = variables.join("");
|
|
913
|
-
return {
|
|
914
|
-
value: variables,
|
|
915
|
-
tokens,
|
|
916
|
-
declarations,
|
|
917
|
-
css: getRule(selector, declarations)
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
// src/utils/themeUtils.ts
|
|
922
|
-
var themeUtils_default = {
|
|
923
|
-
regex: {
|
|
924
|
-
rules: {
|
|
925
|
-
class: {
|
|
926
|
-
pattern: /^\.([a-zA-Z][\w-]*)$/,
|
|
927
|
-
resolve(value) {
|
|
928
|
-
return { type: "class", selector: value, matched: this.pattern.test(value.trim()) };
|
|
929
|
-
}
|
|
930
|
-
},
|
|
931
|
-
attr: {
|
|
932
|
-
pattern: /^\[(.*)\]$/,
|
|
933
|
-
resolve(value) {
|
|
934
|
-
return { type: "attr", selector: `:root${value}`, matched: this.pattern.test(value.trim()) };
|
|
935
|
-
}
|
|
936
|
-
},
|
|
937
|
-
media: {
|
|
938
|
-
pattern: /^@media (.*)$/,
|
|
939
|
-
resolve(value) {
|
|
940
|
-
return { type: "media", selector: `${value}{:root{[CSS]}}`, matched: this.pattern.test(value.trim()) };
|
|
941
|
-
}
|
|
942
|
-
},
|
|
943
|
-
system: {
|
|
944
|
-
pattern: /^system$/,
|
|
945
|
-
resolve(value) {
|
|
946
|
-
return { type: "system", selector: "@media (prefers-color-scheme: dark){:root{[CSS]}}", matched: this.pattern.test(value.trim()) };
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
custom: {
|
|
950
|
-
resolve(value) {
|
|
951
|
-
return { type: "custom", selector: value, matched: true };
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
},
|
|
955
|
-
resolve(value) {
|
|
956
|
-
const rules = Object.keys(this.rules).filter((k) => k !== "custom").map((r) => this.rules[r]);
|
|
957
|
-
return [value].flat().map((v) => {
|
|
958
|
-
var _a;
|
|
959
|
-
return (_a = rules.map((r) => r.resolve(v)).find((rr) => rr.matched)) != null ? _a : this.rules.custom.resolve(v);
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
|
-
_toVariables(theme, options) {
|
|
964
|
-
return toVariables_default(theme, { prefix: options == null ? void 0 : options.prefix });
|
|
965
|
-
},
|
|
966
|
-
getCommon({ name = "", theme = {}, params, set, defaults }) {
|
|
967
|
-
var _e, _f, _g, _h, _i, _j, _k;
|
|
968
|
-
const { preset, options } = theme;
|
|
969
|
-
let primitive_css, primitive_tokens, semantic_css, semantic_tokens, global_css, global_tokens, style;
|
|
970
|
-
if (isNotEmpty(preset) && options.transform !== "strict") {
|
|
971
|
-
const { primitive, semantic, extend } = preset;
|
|
972
|
-
const _a = semantic || {}, { colorScheme } = _a, sRest = __objRest(_a, ["colorScheme"]);
|
|
973
|
-
const _b = extend || {}, { colorScheme: eColorScheme } = _b, eRest = __objRest(_b, ["colorScheme"]);
|
|
974
|
-
const _c = colorScheme || {}, { dark } = _c, csRest = __objRest(_c, ["dark"]);
|
|
975
|
-
const _d = eColorScheme || {}, { dark: eDark } = _d, ecsRest = __objRest(_d, ["dark"]);
|
|
976
|
-
const prim_var = isNotEmpty(primitive) ? this._toVariables({ primitive }, options) : {};
|
|
977
|
-
const sRest_var = isNotEmpty(sRest) ? this._toVariables({ semantic: sRest }, options) : {};
|
|
978
|
-
const csRest_var = isNotEmpty(csRest) ? this._toVariables({ light: csRest }, options) : {};
|
|
979
|
-
const csDark_var = isNotEmpty(dark) ? this._toVariables({ dark }, options) : {};
|
|
980
|
-
const eRest_var = isNotEmpty(eRest) ? this._toVariables({ semantic: eRest }, options) : {};
|
|
981
|
-
const ecsRest_var = isNotEmpty(ecsRest) ? this._toVariables({ light: ecsRest }, options) : {};
|
|
982
|
-
const ecsDark_var = isNotEmpty(eDark) ? this._toVariables({ dark: eDark }, options) : {};
|
|
983
|
-
const [prim_css, prim_tokens] = [(_e = prim_var.declarations) != null ? _e : "", prim_var.tokens];
|
|
984
|
-
const [sRest_css, sRest_tokens] = [(_f = sRest_var.declarations) != null ? _f : "", sRest_var.tokens || []];
|
|
985
|
-
const [csRest_css, csRest_tokens] = [(_g = csRest_var.declarations) != null ? _g : "", csRest_var.tokens || []];
|
|
986
|
-
const [csDark_css, csDark_tokens] = [(_h = csDark_var.declarations) != null ? _h : "", csDark_var.tokens || []];
|
|
987
|
-
const [eRest_css, eRest_tokens] = [(_i = eRest_var.declarations) != null ? _i : "", eRest_var.tokens || []];
|
|
988
|
-
const [ecsRest_css, ecsRest_tokens] = [(_j = ecsRest_var.declarations) != null ? _j : "", ecsRest_var.tokens || []];
|
|
989
|
-
const [ecsDark_css, ecsDark_tokens] = [(_k = ecsDark_var.declarations) != null ? _k : "", ecsDark_var.tokens || []];
|
|
990
|
-
primitive_css = this.transformCSS(name, prim_css, "light", "variable", options, set, defaults);
|
|
991
|
-
primitive_tokens = prim_tokens;
|
|
992
|
-
const semantic_light_css = this.transformCSS(name, `${sRest_css}${csRest_css}`, "light", "variable", options, set, defaults);
|
|
993
|
-
const semantic_dark_css = this.transformCSS(name, `${csDark_css}`, "dark", "variable", options, set, defaults);
|
|
994
|
-
semantic_css = `${semantic_light_css}${semantic_dark_css}`;
|
|
995
|
-
semantic_tokens = [.../* @__PURE__ */ new Set([...sRest_tokens, ...csRest_tokens, ...csDark_tokens])];
|
|
996
|
-
const global_light_css = this.transformCSS(name, `${eRest_css}${ecsRest_css}color-scheme:light`, "light", "variable", options, set, defaults);
|
|
997
|
-
const global_dark_css = this.transformCSS(name, `${ecsDark_css}color-scheme:dark`, "dark", "variable", options, set, defaults);
|
|
998
|
-
global_css = `${global_light_css}${global_dark_css}`;
|
|
999
|
-
global_tokens = [.../* @__PURE__ */ new Set([...eRest_tokens, ...ecsRest_tokens, ...ecsDark_tokens])];
|
|
1000
|
-
style = resolve$1(preset.css, { dt });
|
|
1001
|
-
}
|
|
1002
|
-
return {
|
|
1003
|
-
primitive: {
|
|
1004
|
-
css: primitive_css,
|
|
1005
|
-
tokens: primitive_tokens
|
|
1006
|
-
},
|
|
1007
|
-
semantic: {
|
|
1008
|
-
css: semantic_css,
|
|
1009
|
-
tokens: semantic_tokens
|
|
1010
|
-
},
|
|
1011
|
-
global: {
|
|
1012
|
-
css: global_css,
|
|
1013
|
-
tokens: global_tokens
|
|
1014
|
-
},
|
|
1015
|
-
style
|
|
1016
|
-
};
|
|
1017
|
-
},
|
|
1018
|
-
getPreset({ name = "", preset = {}, options, params, set, defaults, selector }) {
|
|
1019
|
-
var _e, _f, _g;
|
|
1020
|
-
let p_css, p_tokens, p_style;
|
|
1021
|
-
if (isNotEmpty(preset) && options.transform !== "strict") {
|
|
1022
|
-
const _name = name.replace("-directive", "");
|
|
1023
|
-
const _a = preset, { colorScheme, extend, css: css2 } = _a, vRest = __objRest(_a, ["colorScheme", "extend", "css"]);
|
|
1024
|
-
const _b = extend || {}, { colorScheme: eColorScheme } = _b, evRest = __objRest(_b, ["colorScheme"]);
|
|
1025
|
-
const _c = colorScheme || {}, { dark } = _c, csRest = __objRest(_c, ["dark"]);
|
|
1026
|
-
const _d = eColorScheme || {}, { dark: ecsDark } = _d, ecsRest = __objRest(_d, ["dark"]);
|
|
1027
|
-
const vRest_var = isNotEmpty(vRest) ? this._toVariables({ [_name]: __spreadValues(__spreadValues({}, vRest), evRest) }, options) : {};
|
|
1028
|
-
const csRest_var = isNotEmpty(csRest) ? this._toVariables({ [_name]: __spreadValues(__spreadValues({}, csRest), ecsRest) }, options) : {};
|
|
1029
|
-
const csDark_var = isNotEmpty(dark) ? this._toVariables({ [_name]: __spreadValues(__spreadValues({}, dark), ecsDark) }, options) : {};
|
|
1030
|
-
const [vRest_css, vRest_tokens] = [(_e = vRest_var.declarations) != null ? _e : "", vRest_var.tokens || []];
|
|
1031
|
-
const [csRest_css, csRest_tokens] = [(_f = csRest_var.declarations) != null ? _f : "", csRest_var.tokens || []];
|
|
1032
|
-
const [csDark_css, csDark_tokens] = [(_g = csDark_var.declarations) != null ? _g : "", csDark_var.tokens || []];
|
|
1033
|
-
const light_variable_css = this.transformCSS(_name, `${vRest_css}${csRest_css}`, "light", "variable", options, set, defaults, selector);
|
|
1034
|
-
const dark_variable_css = this.transformCSS(_name, csDark_css, "dark", "variable", options, set, defaults, selector);
|
|
1035
|
-
p_css = `${light_variable_css}${dark_variable_css}`;
|
|
1036
|
-
p_tokens = [.../* @__PURE__ */ new Set([...vRest_tokens, ...csRest_tokens, ...csDark_tokens])];
|
|
1037
|
-
p_style = resolve$1(css2, { dt });
|
|
1038
|
-
}
|
|
1039
|
-
return {
|
|
1040
|
-
css: p_css,
|
|
1041
|
-
tokens: p_tokens,
|
|
1042
|
-
style: p_style
|
|
1043
|
-
};
|
|
1044
|
-
},
|
|
1045
|
-
getPresetC({ name = "", theme = {}, params, set, defaults }) {
|
|
1046
|
-
var _a;
|
|
1047
|
-
const { preset, options } = theme;
|
|
1048
|
-
const cPreset = (_a = preset == null ? void 0 : preset.components) == null ? void 0 : _a[name];
|
|
1049
|
-
return this.getPreset({ name, preset: cPreset, options, params, set, defaults });
|
|
1050
|
-
},
|
|
1051
|
-
// @deprecated - use getPresetC instead
|
|
1052
|
-
getPresetD({ name = "", theme = {}, params, set, defaults }) {
|
|
1053
|
-
var _a, _b;
|
|
1054
|
-
const dName = name.replace("-directive", "");
|
|
1055
|
-
const { preset, options } = theme;
|
|
1056
|
-
const dPreset = ((_a = preset == null ? void 0 : preset.components) == null ? void 0 : _a[dName]) || ((_b = preset == null ? void 0 : preset.directives) == null ? void 0 : _b[dName]);
|
|
1057
|
-
return this.getPreset({ name: dName, preset: dPreset, options, params, set, defaults });
|
|
1058
|
-
},
|
|
1059
|
-
applyDarkColorScheme(options) {
|
|
1060
|
-
return !(options.darkModeSelector === "none" || options.darkModeSelector === false);
|
|
1061
|
-
},
|
|
1062
|
-
getColorSchemeOption(options, defaults) {
|
|
1063
|
-
var _a;
|
|
1064
|
-
return this.applyDarkColorScheme(options) ? this.regex.resolve(options.darkModeSelector === true ? defaults.options.darkModeSelector : (_a = options.darkModeSelector) != null ? _a : defaults.options.darkModeSelector) : [];
|
|
1065
|
-
},
|
|
1066
|
-
getLayerOrder(name, options = {}, params, defaults) {
|
|
1067
|
-
const { cssLayer } = options;
|
|
1068
|
-
if (cssLayer) {
|
|
1069
|
-
const order = resolve$1(cssLayer.order || "primeui", params);
|
|
1070
|
-
return `@layer ${order}`;
|
|
1071
|
-
}
|
|
1072
|
-
return "";
|
|
1073
|
-
},
|
|
1074
|
-
getCommonStyleSheet({ name = "", theme = {}, params, props = {}, set, defaults }) {
|
|
1075
|
-
const common = this.getCommon({ name, theme, params, set, defaults });
|
|
1076
|
-
const _props = Object.entries(props).reduce((acc, [k, v]) => acc.push(`${k}="${v}"`) && acc, []).join(" ");
|
|
1077
|
-
return Object.entries(common || {}).reduce((acc, [key, value]) => {
|
|
1078
|
-
if (isObject$3(value) && Object.hasOwn(value, "css")) {
|
|
1079
|
-
const _css = minifyCSS(value.css);
|
|
1080
|
-
const id = `${key}-variables`;
|
|
1081
|
-
acc.push(`<style type="text/css" data-primevue-style-id="${id}" ${_props}>${_css}</style>`);
|
|
1082
|
-
}
|
|
1083
|
-
return acc;
|
|
1084
|
-
}, []).join("");
|
|
1085
|
-
},
|
|
1086
|
-
getStyleSheet({ name = "", theme = {}, params, props = {}, set, defaults }) {
|
|
1087
|
-
var _a;
|
|
1088
|
-
const options = { name, theme, params, set, defaults };
|
|
1089
|
-
const preset_css = (_a = name.includes("-directive") ? this.getPresetD(options) : this.getPresetC(options)) == null ? void 0 : _a.css;
|
|
1090
|
-
const _props = Object.entries(props).reduce((acc, [k, v]) => acc.push(`${k}="${v}"`) && acc, []).join(" ");
|
|
1091
|
-
return preset_css ? `<style type="text/css" data-primevue-style-id="${name}-variables" ${_props}>${minifyCSS(preset_css)}</style>` : "";
|
|
1092
|
-
},
|
|
1093
|
-
createTokens(obj = {}, defaults, parentKey = "", parentPath = "", tokens = {}) {
|
|
1094
|
-
return {};
|
|
1095
|
-
},
|
|
1096
|
-
getTokenValue(tokens, path, defaults) {
|
|
1097
|
-
var _a;
|
|
1098
|
-
const normalizePath = (str) => {
|
|
1099
|
-
const strArr = str.split(".");
|
|
1100
|
-
return strArr.filter((s) => !matchRegex(s.toLowerCase(), defaults.variable.excludedKeyRegex)).join(".");
|
|
1101
|
-
};
|
|
1102
|
-
const token = normalizePath(path);
|
|
1103
|
-
const colorScheme = path.includes("colorScheme.light") ? "light" : path.includes("colorScheme.dark") ? "dark" : void 0;
|
|
1104
|
-
const computedValues = [(_a = tokens[token]) == null ? void 0 : _a.computed(colorScheme)].flat().filter((computed) => computed);
|
|
1105
|
-
return computedValues.length === 1 ? computedValues[0].value : computedValues.reduce((acc = {}, computed) => {
|
|
1106
|
-
const _a2 = computed, { colorScheme: cs } = _a2, rest = __objRest(_a2, ["colorScheme"]);
|
|
1107
|
-
acc[cs] = rest;
|
|
1108
|
-
return acc;
|
|
1109
|
-
}, void 0);
|
|
1110
|
-
},
|
|
1111
|
-
getSelectorRule(selector1, selector2, type, css2) {
|
|
1112
|
-
return type === "class" || type === "attr" ? getRule(isNotEmpty(selector2) ? `${selector1}${selector2},${selector1} ${selector2}` : selector1, css2) : getRule(selector1, isNotEmpty(selector2) ? getRule(selector2, css2) : css2);
|
|
1113
|
-
},
|
|
1114
|
-
transformCSS(name, css2, mode, type, options = {}, set, defaults, selector) {
|
|
1115
|
-
if (isNotEmpty(css2)) {
|
|
1116
|
-
const { cssLayer } = options;
|
|
1117
|
-
if (type !== "style") {
|
|
1118
|
-
const colorSchemeOption = this.getColorSchemeOption(options, defaults);
|
|
1119
|
-
css2 = mode === "dark" ? colorSchemeOption.reduce((acc, { type: type2, selector: _selector }) => {
|
|
1120
|
-
if (isNotEmpty(_selector)) {
|
|
1121
|
-
acc += _selector.includes("[CSS]") ? _selector.replace("[CSS]", css2) : this.getSelectorRule(_selector, selector, type2, css2);
|
|
1122
|
-
}
|
|
1123
|
-
return acc;
|
|
1124
|
-
}, "") : getRule(selector != null ? selector : ":root", css2);
|
|
1125
|
-
}
|
|
1126
|
-
if (cssLayer) {
|
|
1127
|
-
const layerOptions = {
|
|
1128
|
-
name: "primeui"};
|
|
1129
|
-
isObject$3(cssLayer) && (layerOptions.name = resolve$1(cssLayer.name, { name, type }));
|
|
1130
|
-
if (isNotEmpty(layerOptions.name)) {
|
|
1131
|
-
css2 = getRule(`@layer ${layerOptions.name}`, css2);
|
|
1132
|
-
set == null ? void 0 : set.layerNames(layerOptions.name);
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
return css2;
|
|
1136
|
-
}
|
|
1137
|
-
return "";
|
|
1138
|
-
}
|
|
1139
|
-
};
|
|
1140
|
-
|
|
1141
|
-
// src/config/index.ts
|
|
1142
|
-
var config_default = {
|
|
1143
|
-
defaults: {
|
|
1144
|
-
variable: {
|
|
1145
|
-
prefix: "p",
|
|
1146
|
-
selector: ":root",
|
|
1147
|
-
excludedKeyRegex: /^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi
|
|
1148
|
-
},
|
|
1149
|
-
options: {
|
|
1150
|
-
prefix: "p",
|
|
1151
|
-
darkModeSelector: "system",
|
|
1152
|
-
cssLayer: false
|
|
1153
|
-
}
|
|
1154
|
-
},
|
|
1155
|
-
_theme: void 0,
|
|
1156
|
-
_layerNames: /* @__PURE__ */ new Set(),
|
|
1157
|
-
_loadedStyleNames: /* @__PURE__ */ new Set(),
|
|
1158
|
-
_loadingStyles: /* @__PURE__ */ new Set(),
|
|
1159
|
-
_tokens: {},
|
|
1160
|
-
update(newValues = {}) {
|
|
1161
|
-
const { theme } = newValues;
|
|
1162
|
-
if (theme) {
|
|
1163
|
-
this._theme = __spreadProps(__spreadValues({}, theme), {
|
|
1164
|
-
options: __spreadValues(__spreadValues({}, this.defaults.options), theme.options)
|
|
1165
|
-
});
|
|
1166
|
-
this._tokens = themeUtils_default.createTokens(this.preset, this.defaults);
|
|
1167
|
-
this.clearLoadedStyleNames();
|
|
1168
|
-
}
|
|
1169
|
-
},
|
|
1170
|
-
get theme() {
|
|
1171
|
-
return this._theme;
|
|
1172
|
-
},
|
|
1173
|
-
get preset() {
|
|
1174
|
-
var _a;
|
|
1175
|
-
return ((_a = this.theme) == null ? void 0 : _a.preset) || {};
|
|
1176
|
-
},
|
|
1177
|
-
get options() {
|
|
1178
|
-
var _a;
|
|
1179
|
-
return ((_a = this.theme) == null ? void 0 : _a.options) || {};
|
|
1180
|
-
},
|
|
1181
|
-
get tokens() {
|
|
1182
|
-
return this._tokens;
|
|
1183
|
-
},
|
|
1184
|
-
getTheme() {
|
|
1185
|
-
return this.theme;
|
|
1186
|
-
},
|
|
1187
|
-
setTheme(newValue) {
|
|
1188
|
-
this.update({ theme: newValue });
|
|
1189
|
-
service_default.emit("theme:change", newValue);
|
|
1190
|
-
},
|
|
1191
|
-
getPreset() {
|
|
1192
|
-
return this.preset;
|
|
1193
|
-
},
|
|
1194
|
-
setPreset(newValue) {
|
|
1195
|
-
this._theme = __spreadProps(__spreadValues({}, this.theme), { preset: newValue });
|
|
1196
|
-
this._tokens = themeUtils_default.createTokens(newValue, this.defaults);
|
|
1197
|
-
this.clearLoadedStyleNames();
|
|
1198
|
-
service_default.emit("preset:change", newValue);
|
|
1199
|
-
service_default.emit("theme:change", this.theme);
|
|
1200
|
-
},
|
|
1201
|
-
getOptions() {
|
|
1202
|
-
return this.options;
|
|
1203
|
-
},
|
|
1204
|
-
setOptions(newValue) {
|
|
1205
|
-
this._theme = __spreadProps(__spreadValues({}, this.theme), { options: newValue });
|
|
1206
|
-
this.clearLoadedStyleNames();
|
|
1207
|
-
service_default.emit("options:change", newValue);
|
|
1208
|
-
service_default.emit("theme:change", this.theme);
|
|
1209
|
-
},
|
|
1210
|
-
getLayerNames() {
|
|
1211
|
-
return [...this._layerNames];
|
|
1212
|
-
},
|
|
1213
|
-
setLayerNames(layerName) {
|
|
1214
|
-
this._layerNames.add(layerName);
|
|
1215
|
-
},
|
|
1216
|
-
getLoadedStyleNames() {
|
|
1217
|
-
return this._loadedStyleNames;
|
|
1218
|
-
},
|
|
1219
|
-
isStyleNameLoaded(name) {
|
|
1220
|
-
return this._loadedStyleNames.has(name);
|
|
1221
|
-
},
|
|
1222
|
-
setLoadedStyleName(name) {
|
|
1223
|
-
this._loadedStyleNames.add(name);
|
|
1224
|
-
},
|
|
1225
|
-
deleteLoadedStyleName(name) {
|
|
1226
|
-
this._loadedStyleNames.delete(name);
|
|
1227
|
-
},
|
|
1228
|
-
clearLoadedStyleNames() {
|
|
1229
|
-
this._loadedStyleNames.clear();
|
|
1230
|
-
},
|
|
1231
|
-
getTokenValue(tokenPath) {
|
|
1232
|
-
return themeUtils_default.getTokenValue(this.tokens, tokenPath, this.defaults);
|
|
1233
|
-
},
|
|
1234
|
-
getCommon(name = "", params) {
|
|
1235
|
-
return themeUtils_default.getCommon({ name, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } });
|
|
1236
|
-
},
|
|
1237
|
-
getComponent(name = "", params) {
|
|
1238
|
-
const options = { name, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } };
|
|
1239
|
-
return themeUtils_default.getPresetC(options);
|
|
1240
|
-
},
|
|
1241
|
-
// @deprecated - use getComponent instead
|
|
1242
|
-
getDirective(name = "", params) {
|
|
1243
|
-
const options = { name, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } };
|
|
1244
|
-
return themeUtils_default.getPresetD(options);
|
|
1245
|
-
},
|
|
1246
|
-
getCustomPreset(name = "", preset, selector, params) {
|
|
1247
|
-
const options = { name, preset, options: this.options, selector, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } };
|
|
1248
|
-
return themeUtils_default.getPreset(options);
|
|
1249
|
-
},
|
|
1250
|
-
getLayerOrderCSS(name = "") {
|
|
1251
|
-
return themeUtils_default.getLayerOrder(name, this.options, { names: this.getLayerNames() }, this.defaults);
|
|
1252
|
-
},
|
|
1253
|
-
transformCSS(name = "", css2, type = "style", mode) {
|
|
1254
|
-
return themeUtils_default.transformCSS(name, css2, mode, type, this.options, { layerNames: this.setLayerNames.bind(this) }, this.defaults);
|
|
1255
|
-
},
|
|
1256
|
-
getCommonStyleSheet(name = "", params, props = {}) {
|
|
1257
|
-
return themeUtils_default.getCommonStyleSheet({ name, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } });
|
|
1258
|
-
},
|
|
1259
|
-
getStyleSheet(name, params, props = {}) {
|
|
1260
|
-
return themeUtils_default.getStyleSheet({ name, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } });
|
|
1261
|
-
},
|
|
1262
|
-
onStyleMounted(name) {
|
|
1263
|
-
this._loadingStyles.add(name);
|
|
1264
|
-
},
|
|
1265
|
-
onStyleUpdated(name) {
|
|
1266
|
-
this._loadingStyles.add(name);
|
|
1267
|
-
},
|
|
1268
|
-
onStyleLoaded(event, { name }) {
|
|
1269
|
-
if (this._loadingStyles.size) {
|
|
1270
|
-
this._loadingStyles.delete(name);
|
|
1271
|
-
service_default.emit(`theme:${name}:load`, event);
|
|
1272
|
-
!this._loadingStyles.size && service_default.emit("theme:load");
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
};
|
|
1276
|
-
|
|
48
|
+
var Qe=Object.defineProperty,Ye=Object.defineProperties;var et=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var fe=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var he=(e,t,r)=>t in e?Qe(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,d$x=(e,t)=>{for(var r in t||(t={}))fe.call(t,r)&&he(e,r,t[r]);if(F)for(var r of F(t))ye.call(t,r)&&he(e,r,t[r]);return e},_=(e,t)=>Ye(e,et(t));var b$4=(e,t)=>{var r={};for(var s in e)fe.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&F)for(var s of F(e))t.indexOf(s)<0&&ye.call(e,s)&&(r[s]=e[s]);return r};function Se(...e){return w$1(...e)}var st=s$a(),R=st;var v$2=/{([^}]*)}/g,lt=/(\d+\s+[\+\-\*\/]\s+\d+)/g,ct=/var\([^)]+\)/g;function ke(e){return i$r(e)&&e.hasOwnProperty("$value")&&e.hasOwnProperty("$type")?e.$value:e}function mt(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function Q(e="",t=""){return mt(`${p$4(e,false)&&p$4(t,false)?`${e}-`:e}${t}`)}function ne(e="",t=""){return `--${Q(e,t)}`}function dt(e=""){let t=(e.match(/{/g)||[]).length,r=(e.match(/}/g)||[]).length;return (t+r)%2!==0}function Y(e,t="",r="",s=[],o){if(p$4(e)){let a=e.trim();if(dt(a))return;if(z$1(a,v$2)){let n=a.replaceAll(v$2,l=>{let c=l.replace(/{|}/g,"").split(".").filter(m=>!s.some(u=>z$1(m,u)));return `var(${ne(r,ee(c.join("-")))}${s$b(o)?`, ${o}`:""})`});return z$1(n.replace(ct,"0"),lt)?`calc(${n})`:n}return a}else if(_$1(e))return e}function _e(e,t,r){p$4(t,false)&&e.push(`${t}:${r};`);}function T(e,t){return e?`${e}{${t}}`:""}function oe(e,t){if(e.indexOf("dt(")===-1)return e;function r(n,l){let i=[],c=0,m="",u=null,p=0;for(;c<=n.length;){let h=n[c];if((h==='"'||h==="'"||h==="`")&&n[c-1]!=="\\"&&(u=u===h?null:h),!u&&(h==="("&&p++,h===")"&&p--,(h===","||c===n.length)&&p===0)){let y=m.trim();y.startsWith("dt(")?i.push(oe(y,l)):i.push(s(y)),m="",c++;continue}h!==void 0&&(m+=h),c++;}return i}function s(n){let l=n[0];if((l==='"'||l==="'"||l==="`")&&n[n.length-1]===l)return n.slice(1,-1);let i=Number(n);return isNaN(i)?n:i}let o=[],a=[];for(let n=0;n<e.length;n++)if(e[n]==="d"&&e.slice(n,n+3)==="dt(")a.push(n),n+=2;else if(e[n]===")"&&a.length>0){let l=a.pop();a.length===0&&o.push([l,n]);}if(!o.length)return e;for(let n=o.length-1;n>=0;n--){let[l,i]=o[n],c=e.slice(l+3,i),m=r(c,t),u=t(...m);e=e.slice(0,l)+u+e.slice(i+1);}return e}var P=(...e)=>le(g$5.getTheme(),...e),le=(e={},t,r,s)=>{if(t){let{variable:o,options:a}=g$5.defaults||{},{prefix:n,transform:l}=(e==null?void 0:e.options)||a||{},i=z$1(t,v$2)?t:`{${t}}`;return s==="value"||a$F(s)&&l==="strict"?g$5.getTokenValue(t):Y(i,void 0,n,[o.excludedKeyRegex],r)}return ""};function ar(e,...t){if(e instanceof Array){let r=e.reduce((s,o,a)=>{var n;return s+o+((n=m$3(t[a],{dt:P}))!=null?n:"")},"");return oe(r,P)}return m$3(e,{dt:P})}function ce(e,t={}){let r=g$5.defaults.variable,{prefix:s=r.prefix,selector:o=r.selector,excludedKeyRegex:a=r.excludedKeyRegex}=t,n=[],l=[],i=[{node:e,path:s}];for(;i.length;){let{node:m,path:u}=i.pop();for(let p in m){let h=m[p],y=ke(h),x=z$1(p,a)?Q(u):Q(u,ee(p));if(i$r(y))i.push({node:y,path:x});else {let k=ne(x),w=Y(y,x,s,[a]);_e(l,k,w);let $=x;s&&$.startsWith(s+"-")&&($=$.slice(s.length+1)),n.push($.replace(/-/g,"."));}}}let c=l.join("");return {value:l,tokens:n,declarations:c,css:T(o,c)}}var S={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return {type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return {type:"attr",selector:`:root${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return {type:"media",selector:e,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return {type:"system",selector:"@media (prefers-color-scheme: dark)",matched:this.pattern.test(e.trim())}}},custom:{resolve(e){return {type:"custom",selector:e,matched:true}}}},resolve(e){let t=Object.keys(this.rules).filter(r=>r!=="custom").map(r=>this.rules[r]);return [e].flat().map(r=>{var s;return (s=t.map(o=>o.resolve(r)).find(o=>o.matched))!=null?s:this.rules.custom.resolve(r)})}},_toVariables(e,t){return ce(e,{prefix:t==null?void 0:t.prefix})},getCommon({name:e="",theme:t={},params:r,set:s,defaults:o}){var w,$,j,V,D,z,E;let{preset:a,options:n}=t,l,i,c,m,u,p,h;if(s$b(a)&&n.transform!=="strict"){let{primitive:L,semantic:te,extend:re}=a,y=te||{},{colorScheme:K}=y,M=b$4(y,["colorScheme"]),N=re||{},{colorScheme:X}=N,B=b$4(N,["colorScheme"]),x=K||{},{dark:G}=x,I=b$4(x,["dark"]),k=X||{},{dark:U}=k,H=b$4(k,["dark"]),W=s$b(L)?this._toVariables({primitive:L},n):{},q=s$b(M)?this._toVariables({semantic:M},n):{},Z=s$b(I)?this._toVariables({light:I},n):{},de=s$b(G)?this._toVariables({dark:G},n):{},ue=s$b(B)?this._toVariables({semantic:B},n):{},pe=s$b(H)?this._toVariables({light:H},n):{},ge=s$b(U)?this._toVariables({dark:U},n):{},[Le,Me]=[(w=W.declarations)!=null?w:"",W.tokens],[Ae,je]=[($=q.declarations)!=null?$:"",q.tokens||[]],[De,ze]=[(j=Z.declarations)!=null?j:"",Z.tokens||[]],[Ke,Xe]=[(V=de.declarations)!=null?V:"",de.tokens||[]],[Be,Ge]=[(D=ue.declarations)!=null?D:"",ue.tokens||[]],[Ie,Ue]=[(z=pe.declarations)!=null?z:"",pe.tokens||[]],[He,We]=[(E=ge.declarations)!=null?E:"",ge.tokens||[]];l=this.transformCSS(e,Le,"light","variable",n,s,o),i=Me;let qe=this.transformCSS(e,`${Ae}${De}`,"light","variable",n,s,o),Ze=this.transformCSS(e,`${Ke}`,"dark","variable",n,s,o);c=`${qe}${Ze}`,m=[...new Set([...je,...ze,...Xe])];let Fe=this.transformCSS(e,`${Be}${Ie}color-scheme:light`,"light","variable",n,s,o),Je=this.transformCSS(e,`${He}color-scheme:dark`,"dark","variable",n,s,o);u=`${Fe}${Je}`,p=[...new Set([...Ge,...Ue,...We])],h=m$3(a.css,{dt:P});}return {primitive:{css:l,tokens:i},semantic:{css:c,tokens:m},global:{css:u,tokens:p},style:h}},getPreset({name:e="",preset:t={},options:r,params:s,set:o,defaults:a,selector:n}){var y,N,x;let l,i,c;if(s$b(t)&&r.transform!=="strict"){let k=e.replace("-directive",""),m=t,{colorScheme:w,extend:$,css:j}=m,V=b$4(m,["colorScheme","extend","css"]),u=$||{},{colorScheme:D}=u,z=b$4(u,["colorScheme"]),p=w||{},{dark:E}=p,L=b$4(p,["dark"]),h=D||{},{dark:te}=h,re=b$4(h,["dark"]),K=s$b(V)?this._toVariables({[k]:d$x(d$x({},V),z)},r):{},M=s$b(L)?this._toVariables({[k]:d$x(d$x({},L),re)},r):{},X=s$b(E)?this._toVariables({[k]:d$x(d$x({},E),te)},r):{},[B,G]=[(y=K.declarations)!=null?y:"",K.tokens||[]],[I,U]=[(N=M.declarations)!=null?N:"",M.tokens||[]],[H,W]=[(x=X.declarations)!=null?x:"",X.tokens||[]],q=this.transformCSS(k,`${B}${I}`,"light","variable",r,o,a,n),Z=this.transformCSS(k,H,"dark","variable",r,o,a,n);l=`${q}${Z}`,i=[...new Set([...G,...U,...W])],c=m$3(j,{dt:P});}return {css:l,tokens:i,style:c}},getPresetC({name:e="",theme:t={},params:r,set:s,defaults:o}){var i;let{preset:a,options:n}=t,l=(i=a==null?void 0:a.components)==null?void 0:i[e];return this.getPreset({name:e,preset:l,options:n,params:r,set:s,defaults:o})},getPresetD({name:e="",theme:t={},params:r,set:s,defaults:o}){var c,m;let a=e.replace("-directive",""),{preset:n,options:l}=t,i=((c=n==null?void 0:n.components)==null?void 0:c[a])||((m=n==null?void 0:n.directives)==null?void 0:m[a]);return this.getPreset({name:a,preset:i,options:l,params:r,set:s,defaults:o})},applyDarkColorScheme(e){return !(e.darkModeSelector==="none"||e.darkModeSelector===false)},getColorSchemeOption(e,t){var r;return this.applyDarkColorScheme(e)?this.regex.resolve(e.darkModeSelector===true?t.options.darkModeSelector:(r=e.darkModeSelector)!=null?r:t.options.darkModeSelector):[]},getLayerOrder(e,t={},r,s){let{cssLayer:o}=t;return o?`@layer ${m$3(o.order||o.name||"primeui",r)}`:""},getCommonStyleSheet({name:e="",theme:t={},params:r,props:s={},set:o,defaults:a}){let n=this.getCommon({name:e,theme:t,params:r,set:o,defaults:a}),l=Object.entries(s).reduce((i,[c,m])=>i.push(`${c}="${m}"`)&&i,[]).join(" ");return Object.entries(n||{}).reduce((i,[c,m])=>{if(i$r(m)&&Object.hasOwn(m,"css")){let u=G(m.css),p=`${c}-variables`;i.push(`<style type="text/css" data-primevue-style-id="${p}" ${l}>${u}</style>`);}return i},[]).join("")},getStyleSheet({name:e="",theme:t={},params:r,props:s={},set:o,defaults:a}){var c;let n={name:e,theme:t,params:r,set:o,defaults:a},l=(c=e.includes("-directive")?this.getPresetD(n):this.getPresetC(n))==null?void 0:c.css,i=Object.entries(s).reduce((m,[u,p])=>m.push(`${u}="${p}"`)&&m,[]).join(" ");return l?`<style type="text/css" data-primevue-style-id="${e}-variables" ${i}>${G(l)}</style>`:""},createTokens(e={},t,r="",s="",o={}){return {}},getTokenValue(e,t,r){var l;let o=(i=>i.split(".").filter(m=>!z$1(m.toLowerCase(),r.variable.excludedKeyRegex)).join("."))(t),a=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,n=[(l=e[o])==null?void 0:l.computed(a)].flat().filter(i=>i);return n.length===1?n[0].value:n.reduce((i={},c)=>{let p=c,{colorScheme:m}=p,u=b$4(p,["colorScheme"]);return i[m]=u,i},void 0)},getSelectorRule(e,t,r,s){return r==="class"||r==="attr"?T(s$b(t)?`${e}${t},${e} ${t}`:e,s):T(e,T(t!=null?t:":root",s))},transformCSS(e,t,r,s,o={},a,n,l){if(s$b(t)){let{cssLayer:i}=o;if(s!=="style"){let c=this.getColorSchemeOption(o,n);t=r==="dark"?c.reduce((m,{type:u,selector:p})=>(s$b(p)&&(m+=p.includes("[CSS]")?p.replace("[CSS]",t):this.getSelectorRule(p,l,u,t)),m),""):T(l!=null?l:":root",t);}if(i){let c={name:"primeui"};i$r(i)&&(c.name=m$3(i.name,{name:e,type:s})),s$b(c.name)&&(t=T(`@layer ${c.name}`,t),a==null||a.layerNames(c.name));}return t}return ""}};var g$5={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:false}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){let{theme:t}=e;t&&(this._theme=_(d$x({},t),{options:d$x(d$x({},this.defaults.options),t.options)}),this._tokens=S.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames());},get theme(){return this._theme},get preset(){var e;return ((e=this.theme)==null?void 0:e.preset)||{}},get options(){var e;return ((e=this.theme)==null?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),R.emit("theme:change",e);},getPreset(){return this.preset},setPreset(e){this._theme=_(d$x({},this.theme),{preset:e}),this._tokens=S.createTokens(e,this.defaults),this.clearLoadedStyleNames(),R.emit("preset:change",e),R.emit("theme:change",this.theme);},getOptions(){return this.options},setOptions(e){this._theme=_(d$x({},this.theme),{options:e}),this.clearLoadedStyleNames(),R.emit("options:change",e),R.emit("theme:change",this.theme);},getLayerNames(){return [...this._layerNames]},setLayerNames(e){this._layerNames.add(e);},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e);},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e);},clearLoadedStyleNames(){this._loadedStyleNames.clear();},getTokenValue(e){return S.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return S.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){let r={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return S.getPresetC(r)},getDirective(e="",t){let r={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return S.getPresetD(r)},getCustomPreset(e="",t,r,s){let o={name:e,preset:t,options:this.options,selector:r,params:s,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return S.getPreset(o)},getLayerOrderCSS(e=""){return S.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,r="style",s){return S.transformCSS(e,t,s,r,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,r={}){return S.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,r={}){return S.getStyleSheet({name:e,theme:this.theme,params:t,props:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e);},onStyleUpdated(e){this._loadingStyles.add(e);},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),R.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&R.emit("theme:load"));}};
|
|
1277
49
|
/* Injected with object hook! */
|
|
1278
50
|
|
|
1279
|
-
var o$1l={transitionDuration:"{transition.duration}"},r$1i={borderWidth:"0 0 1px 0",borderColor:"{content.border.color}"},t$D={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",padding:"1.125rem",fontWeight:"600",borderRadius:"0",borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",hoverBackground:"{content.background}",activeBackground:"{content.background}",activeHoverBackground:"{content.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},toggleIcon:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",activeHoverColor:"{text.color}"},first:{topBorderRadius:"{content.border.radius}",borderWidth:"0"},last:{bottomBorderRadius:"{content.border.radius}",activeBottomBorderRadius:"0"}},e$U={borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",color:"{text.color}",padding:"0 1.125rem 1.125rem 1.125rem"},c$p={root:o$1l,panel:r$1i,header:t$D,content:e$U};/* Injected with object hook! */
|
|
51
|
+
var o$1l={transitionDuration:"{transition.duration}"},r$1i={borderWidth:"0 0 1px 0",borderColor:"{content.border.color}"},t$D={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",activeHoverColor:"{text.color}",padding:"1.125rem",fontWeight:"600",borderRadius:"0",borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",hoverBackground:"{content.background}",activeBackground:"{content.background}",activeHoverBackground:"{content.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},toggleIcon:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",activeHoverColor:"{text.color}"},first:{topBorderRadius:"{content.border.radius}",borderWidth:"0"},last:{bottomBorderRadius:"{content.border.radius}",activeBottomBorderRadius:"0"}},e$U={borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",color:"{text.color}",padding:"0 1.125rem 1.125rem 1.125rem"},c$p={root:o$1l,panel:r$1i,header:t$D,content:e$U};/* Injected with object hook! */
|
|
1280
52
|
|
|
1281
53
|
var o$1k={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},r$1h={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},d$w={padding:"{list.padding}",gap:"{list.gap}"},e$T={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},l$g={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},i$q={width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},c$o={borderRadius:"{border.radius.sm}"},f$9={padding:"{list.option.padding}"},s$9={light:{chip:{focusBackground:"{surface.200}",focusColor:"{surface.800}"},dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",focusColor:"{surface.0}"},dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"}}},a$E={root:o$1k,overlay:r$1h,list:d$w,option:e$T,optionGroup:l$g,dropdown:i$q,chip:c$o,emptyMessage:f$9,colorScheme:s$9};/* Injected with object hook! */
|
|
1282
54
|
|
|
@@ -9390,7 +8162,7 @@ function useStyle(css) {
|
|
|
9390
8162
|
var isLoaded = ref(false);
|
|
9391
8163
|
var cssRef = ref(css);
|
|
9392
8164
|
var styleRef = ref(null);
|
|
9393
|
-
var defaultDocument =
|
|
8165
|
+
var defaultDocument = tt$1() ? window.document : undefined;
|
|
9394
8166
|
var _options$document = options.document,
|
|
9395
8167
|
document = _options$document === void 0 ? defaultDocument : _options$document,
|
|
9396
8168
|
_options$immediate = options.immediate,
|
|
@@ -9428,15 +8200,15 @@ function useStyle(css) {
|
|
|
9428
8200
|
styleRef.value = document.querySelector("style[data-primevue-style-id=\"".concat(_name, "\"]")) || document.getElementById(_id) || document.createElement('style');
|
|
9429
8201
|
if (!styleRef.value.isConnected) {
|
|
9430
8202
|
cssRef.value = _css || css;
|
|
9431
|
-
|
|
8203
|
+
A(styleRef.value, {
|
|
9432
8204
|
type: 'text/css',
|
|
9433
8205
|
id: _id,
|
|
9434
8206
|
media: media,
|
|
9435
8207
|
nonce: _nonce
|
|
9436
8208
|
});
|
|
9437
8209
|
first ? document.head.prepend(styleRef.value) : document.head.appendChild(styleRef.value);
|
|
9438
|
-
|
|
9439
|
-
|
|
8210
|
+
Kt(styleRef.value, 'data-primevue-style-id', _name);
|
|
8211
|
+
A(styleRef.value, _styleProps);
|
|
9440
8212
|
styleRef.value.onload = function (event) {
|
|
9441
8213
|
return onStyleLoaded === null || onStyleLoaded === void 0 ? void 0 : onStyleLoaded(event, {
|
|
9442
8214
|
name: _name
|
|
@@ -9456,7 +8228,7 @@ function useStyle(css) {
|
|
|
9456
8228
|
var unload = function unload() {
|
|
9457
8229
|
if (!document || !isLoaded.value) return;
|
|
9458
8230
|
stop();
|
|
9459
|
-
|
|
8231
|
+
T$1(styleRef.value) && document.head.removeChild(styleRef.value);
|
|
9460
8232
|
isLoaded.value = false;
|
|
9461
8233
|
styleRef.value = null;
|
|
9462
8234
|
};
|
|
@@ -9510,8 +8282,8 @@ var BaseStyle = {
|
|
|
9510
8282
|
var transform = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (cs) {
|
|
9511
8283
|
return cs;
|
|
9512
8284
|
};
|
|
9513
|
-
var computedStyle = transform(
|
|
9514
|
-
return
|
|
8285
|
+
var computedStyle = transform(ar(_templateObject || (_templateObject = _taggedTemplateLiteral(["", ""])), style));
|
|
8286
|
+
return s$b(computedStyle) ? useStyle(G(computedStyle), _objectSpread$1({
|
|
9515
8287
|
name: this.name
|
|
9516
8288
|
}, options)) : {};
|
|
9517
8289
|
},
|
|
@@ -9525,62 +8297,62 @@ var BaseStyle = {
|
|
|
9525
8297
|
var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
9526
8298
|
return this.load(this.style, options, function () {
|
|
9527
8299
|
var computedStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
9528
|
-
return
|
|
8300
|
+
return g$5.transformCSS(options.name || _this.name, "".concat(computedStyle).concat(ar(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["", ""])), style)));
|
|
9529
8301
|
});
|
|
9530
8302
|
},
|
|
9531
8303
|
getCommonTheme: function getCommonTheme(params) {
|
|
9532
|
-
return
|
|
8304
|
+
return g$5.getCommon(this.name, params);
|
|
9533
8305
|
},
|
|
9534
8306
|
getComponentTheme: function getComponentTheme(params) {
|
|
9535
|
-
return
|
|
8307
|
+
return g$5.getComponent(this.name, params);
|
|
9536
8308
|
},
|
|
9537
8309
|
getDirectiveTheme: function getDirectiveTheme(params) {
|
|
9538
|
-
return
|
|
8310
|
+
return g$5.getDirective(this.name, params);
|
|
9539
8311
|
},
|
|
9540
8312
|
getPresetTheme: function getPresetTheme(preset, selector, params) {
|
|
9541
|
-
return
|
|
8313
|
+
return g$5.getCustomPreset(this.name, preset, selector, params);
|
|
9542
8314
|
},
|
|
9543
8315
|
getLayerOrderThemeCSS: function getLayerOrderThemeCSS() {
|
|
9544
|
-
return
|
|
8316
|
+
return g$5.getLayerOrderCSS(this.name);
|
|
9545
8317
|
},
|
|
9546
8318
|
getStyleSheet: function getStyleSheet() {
|
|
9547
8319
|
var extendedCSS = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
9548
8320
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9549
8321
|
if (this.css) {
|
|
9550
|
-
var _css =
|
|
9551
|
-
dt:
|
|
8322
|
+
var _css = m$3(this.css, {
|
|
8323
|
+
dt: P
|
|
9552
8324
|
}) || '';
|
|
9553
|
-
var _style =
|
|
8325
|
+
var _style = G(ar(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["", "", ""])), _css, extendedCSS));
|
|
9554
8326
|
var _props = Object.entries(props).reduce(function (acc, _ref2) {
|
|
9555
8327
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
9556
8328
|
k = _ref3[0],
|
|
9557
8329
|
v = _ref3[1];
|
|
9558
8330
|
return acc.push("".concat(k, "=\"").concat(v, "\"")) && acc;
|
|
9559
8331
|
}, []).join(' ');
|
|
9560
|
-
return
|
|
8332
|
+
return s$b(_style) ? "<style type=\"text/css\" data-primevue-style-id=\"".concat(this.name, "\" ").concat(_props, ">").concat(_style, "</style>") : '';
|
|
9561
8333
|
}
|
|
9562
8334
|
return '';
|
|
9563
8335
|
},
|
|
9564
8336
|
getCommonThemeStyleSheet: function getCommonThemeStyleSheet(params) {
|
|
9565
8337
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9566
|
-
return
|
|
8338
|
+
return g$5.getCommonStyleSheet(this.name, params, props);
|
|
9567
8339
|
},
|
|
9568
8340
|
getThemeStyleSheet: function getThemeStyleSheet(params) {
|
|
9569
8341
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9570
|
-
var css = [
|
|
8342
|
+
var css = [g$5.getStyleSheet(this.name, params, props)];
|
|
9571
8343
|
if (this.style) {
|
|
9572
8344
|
var name = this.name === 'base' ? 'global-style' : "".concat(this.name, "-style");
|
|
9573
|
-
var _css =
|
|
9574
|
-
dt:
|
|
8345
|
+
var _css = ar(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["", ""])), m$3(this.style, {
|
|
8346
|
+
dt: P
|
|
9575
8347
|
}));
|
|
9576
|
-
var _style =
|
|
8348
|
+
var _style = G(g$5.transformCSS(name, _css));
|
|
9577
8349
|
var _props = Object.entries(props).reduce(function (acc, _ref4) {
|
|
9578
8350
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
9579
8351
|
k = _ref5[0],
|
|
9580
8352
|
v = _ref5[1];
|
|
9581
8353
|
return acc.push("".concat(k, "=\"").concat(v, "\"")) && acc;
|
|
9582
8354
|
}, []).join(' ');
|
|
9583
|
-
|
|
8355
|
+
s$b(_style) && css.push("<style type=\"text/css\" data-primevue-style-id=\"".concat(name, "\" ").concat(_props, ">").concat(_style, "</style>"));
|
|
9584
8356
|
}
|
|
9585
8357
|
return css.join('');
|
|
9586
8358
|
},
|
|
@@ -9595,7 +8367,7 @@ var BaseStyle = {
|
|
|
9595
8367
|
|
|
9596
8368
|
/* Injected with object hook! */
|
|
9597
8369
|
|
|
9598
|
-
var PrimeVueService =
|
|
8370
|
+
var PrimeVueService = s$a();
|
|
9599
8371
|
|
|
9600
8372
|
|
|
9601
8373
|
/* Injected with object hook! */
|
|
@@ -9766,7 +8538,7 @@ function setup(app, options) {
|
|
|
9766
8538
|
}
|
|
9767
8539
|
var stopWatchers = [];
|
|
9768
8540
|
function clearConfig() {
|
|
9769
|
-
|
|
8541
|
+
R.clear();
|
|
9770
8542
|
stopWatchers.forEach(function (fn) {
|
|
9771
8543
|
return fn === null || fn === void 0 ? void 0 : fn();
|
|
9772
8544
|
});
|
|
@@ -9781,7 +8553,7 @@ function setupConfig(app, PrimeVue) {
|
|
|
9781
8553
|
if (((_PrimeVue$config = PrimeVue.config) === null || _PrimeVue$config === void 0 ? void 0 : _PrimeVue$config.theme) === 'none') return;
|
|
9782
8554
|
|
|
9783
8555
|
// common
|
|
9784
|
-
if (!
|
|
8556
|
+
if (!g$5.isStyleNameLoaded('common')) {
|
|
9785
8557
|
var _BaseStyle$getCommonT, _PrimeVue$config2;
|
|
9786
8558
|
var _ref = ((_BaseStyle$getCommonT = BaseStyle.getCommonTheme) === null || _BaseStyle$getCommonT === void 0 ? void 0 : _BaseStyle$getCommonT.call(BaseStyle)) || {},
|
|
9787
8559
|
primitive = _ref.primitive,
|
|
@@ -9803,10 +8575,10 @@ function setupConfig(app, PrimeVue) {
|
|
|
9803
8575
|
BaseStyle.loadStyle(_objectSpread({
|
|
9804
8576
|
name: 'global-style'
|
|
9805
8577
|
}, styleOptions), style);
|
|
9806
|
-
|
|
8578
|
+
g$5.setLoadedStyleName('common');
|
|
9807
8579
|
}
|
|
9808
8580
|
};
|
|
9809
|
-
|
|
8581
|
+
R.on('theme:change', function (newTheme) {
|
|
9810
8582
|
if (!isThemeChanged.value) {
|
|
9811
8583
|
app.config.globalProperties.$primevue.config.theme = newTheme;
|
|
9812
8584
|
isThemeChanged.value = true;
|
|
@@ -9838,7 +8610,7 @@ function setupConfig(app, PrimeVue) {
|
|
|
9838
8610
|
return PrimeVue.config.theme;
|
|
9839
8611
|
}, function (newValue, oldValue) {
|
|
9840
8612
|
if (!isThemeChanged.value) {
|
|
9841
|
-
|
|
8613
|
+
g$5.setTheme(newValue);
|
|
9842
8614
|
}
|
|
9843
8615
|
if (!PrimeVue.config.unstyled) {
|
|
9844
8616
|
loadCommonTheme();
|
|
@@ -9873,7 +8645,7 @@ function setupConfig(app, PrimeVue) {
|
|
|
9873
8645
|
}
|
|
9874
8646
|
var PrimeVue = {
|
|
9875
8647
|
install: function install(app, options) {
|
|
9876
|
-
var configOptions =
|
|
8648
|
+
var configOptions = U$1(defaultOptions, options);
|
|
9877
8649
|
setup(app, configOptions);
|
|
9878
8650
|
}
|
|
9879
8651
|
};
|
|
@@ -11809,31 +10581,31 @@ const routes = [
|
|
|
11809
10581
|
{
|
|
11810
10582
|
path: "/",
|
|
11811
10583
|
name: "/",
|
|
11812
|
-
component: () => __vitePreload(() => import('./index-
|
|
10584
|
+
component: () => __vitePreload(() => import('./index-CuVxz6bX.js'),true ?__vite__mapDeps([0,1,2]):void 0,import.meta.url)
|
|
11813
10585
|
/* no children */
|
|
11814
10586
|
},
|
|
11815
10587
|
{
|
|
11816
10588
|
path: "/about",
|
|
11817
10589
|
name: "/about",
|
|
11818
|
-
component: () => __vitePreload(() => import('./about-
|
|
10590
|
+
component: () => __vitePreload(() => import('./about-owKsYr3E.js'),true ?[]:void 0,import.meta.url)
|
|
11819
10591
|
/* no children */
|
|
11820
10592
|
},
|
|
11821
10593
|
{
|
|
11822
10594
|
path: "/categories",
|
|
11823
10595
|
name: "/categories",
|
|
11824
|
-
component: () => __vitePreload(() => import('./categories-
|
|
10596
|
+
component: () => __vitePreload(() => import('./categories-BGG1NAYq.js'),true ?[]:void 0,import.meta.url)
|
|
11825
10597
|
/* no children */
|
|
11826
10598
|
},
|
|
11827
10599
|
{
|
|
11828
10600
|
path: "/migration",
|
|
11829
10601
|
name: "/migration",
|
|
11830
|
-
component: () => __vitePreload(() => import('./migration-
|
|
10602
|
+
component: () => __vitePreload(() => import('./migration-BBvf-kdp.js'),true ?__vite__mapDeps([3,1]):void 0,import.meta.url)
|
|
11831
10603
|
/* no children */
|
|
11832
10604
|
},
|
|
11833
10605
|
{
|
|
11834
10606
|
path: "/tags",
|
|
11835
10607
|
name: "/tags",
|
|
11836
|
-
component: () => __vitePreload(() => import('./tags-
|
|
10608
|
+
component: () => __vitePreload(() => import('./tags-BZ1s-2OD.js'),true ?[]:void 0,import.meta.url)
|
|
11837
10609
|
/* no children */
|
|
11838
10610
|
}
|
|
11839
10611
|
];
|
|
@@ -11860,7 +10632,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
11860
10632
|
/* Injected with object hook! */
|
|
11861
10633
|
|
|
11862
10634
|
/*!
|
|
11863
|
-
* shared v11.1.
|
|
10635
|
+
* shared v11.1.9
|
|
11864
10636
|
* (c) 2025 kazuya kawaguchi
|
|
11865
10637
|
* Released under the MIT License.
|
|
11866
10638
|
*/
|
|
@@ -11938,7 +10710,7 @@ function deepCopy(src, des) {
|
|
|
11938
10710
|
/* Injected with object hook! */
|
|
11939
10711
|
|
|
11940
10712
|
/*!
|
|
11941
|
-
* message-compiler v11.1.
|
|
10713
|
+
* message-compiler v11.1.9
|
|
11942
10714
|
* (c) 2025 kazuya kawaguchi
|
|
11943
10715
|
* Released under the MIT License.
|
|
11944
10716
|
*/
|
|
@@ -13361,7 +12133,7 @@ function baseCompile$1(source, options = {}) {
|
|
|
13361
12133
|
/* Injected with object hook! */
|
|
13362
12134
|
|
|
13363
12135
|
/*!
|
|
13364
|
-
* core-base v11.1.
|
|
12136
|
+
* core-base v11.1.9
|
|
13365
12137
|
* (c) 2025 kazuya kawaguchi
|
|
13366
12138
|
* Released under the MIT License.
|
|
13367
12139
|
*/
|
|
@@ -14128,7 +12900,7 @@ function resolveValue(obj, path) {
|
|
|
14128
12900
|
}
|
|
14129
12901
|
return last;
|
|
14130
12902
|
}
|
|
14131
|
-
const VERSION$1 = "11.1.
|
|
12903
|
+
const VERSION$1 = "11.1.9";
|
|
14132
12904
|
const NOT_REOSLVED = -1;
|
|
14133
12905
|
const DEFAULT_LOCALE = "en-US";
|
|
14134
12906
|
const MISSING_RESOLVE_VALUE = "";
|
|
@@ -14819,11 +13591,11 @@ function getMessageContextOptions(context, locale, message, options) {
|
|
|
14819
13591
|
/* Injected with object hook! */
|
|
14820
13592
|
|
|
14821
13593
|
/*!
|
|
14822
|
-
* vue-i18n v11.1.
|
|
13594
|
+
* vue-i18n v11.1.9
|
|
14823
13595
|
* (c) 2025 kazuya kawaguchi
|
|
14824
13596
|
* Released under the MIT License.
|
|
14825
13597
|
*/
|
|
14826
|
-
const VERSION = "11.1.
|
|
13598
|
+
const VERSION = "11.1.9";
|
|
14827
13599
|
function initFeatureFlags() {
|
|
14828
13600
|
if (typeof __INTLIFY_PROD_DEVTOOLS__ !== "boolean") {
|
|
14829
13601
|
getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;
|
|
@@ -17213,7 +15985,7 @@ const router = createRouter({
|
|
|
17213
15985
|
const pinia = createPinia();
|
|
17214
15986
|
app.use(pinia);
|
|
17215
15987
|
app.use(router);
|
|
17216
|
-
const customPreset =
|
|
15988
|
+
const customPreset = Se(index, {
|
|
17217
15989
|
semantic: {
|
|
17218
15990
|
primary: {
|
|
17219
15991
|
50: "{indigo.50}",
|
|
@@ -17245,4 +16017,4 @@ app.mount("#app");
|
|
|
17245
16017
|
|
|
17246
16018
|
/* Injected with object hook! */
|
|
17247
16019
|
|
|
17248
|
-
export { toHandlers as $,
|
|
16020
|
+
export { toHandlers as $, B as A, BaseStyle as B, At as C, s$a as D, tt$1 as E, Fragment as F, b$5 as G, z as H, Ht as I, I as J, Kt as K, v$3 as L, D as M, Yt as N, normalizeStyle as O, resolveDynamicComponent as P, Q$1 as Q, Transition as R, S$1 as S, Teleport as T, vShow as U, withKeys as V, W$1 as W, pt as X, Y$1 as Y, Mt as Z, _export_sfc as _, createBaseVNode as a, useI18n as a0, dayjs as a1, clientPageData as a2, toRaw as a3, pageData as a4, activePath as a5, onMounted as a6, rpc as a7, getDefaultExportFromCjs as a8, computed as a9, c$q as aA, useSlots as aB, onBeforeUnmount as aC, provide as aD, inject as aE, getCurrentInstance as aF, h as aG, nextTick as aH, devtoolsRouter as aa, useScroll as ab, postList as ac, isStaticMode as ad, vModelCheckbox as ae, vModelText as af, F$1 as ag, l$h as ah, v$4 as ai, R as aj, g$5 as ak, p$4 as al, g$6 as am, m$3 as an, i$r as ao, a$F as ap, PrimeVueService as aq, b$6 as ar, O as as, Tt as at, Rt as au, C as av, K as aw, W as ax, U as ay, useId as az, renderSlot as b, createElementBlock as c, createCommentVNode as d, c$r as e, resolveComponent as f, getAppWindow as g, renderList as h, createBlock as i, createSlots as j, k$4 as k, withCtx as l, mergeProps as m, normalizeClass as n, openBlock as o, defineComponent as p, ref as q, resolveDirective as r, s$b as s, toDisplayString$1 as t, useModel as u, watch as v, withDirectives as w, createVNode as x, unref as y, createTextVNode as z };
|