// ==UserScript==
// @name Userjs digger
// @namespace userjs-digger
// @version 0.0.3
// @author enpitsulin <[email protected]>
// @description Show all userjs available in current site
// @license MIT
// @include *
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js
// @require https://cdn.bootcdn.net/ajax/libs/psl/1.9.0/psl.min.js
// @connect greasyfork.org
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @noframes
// ==/UserScript==
(e=>{const d=document.createElement("style");d.dataset.source="vite-plugin-monkey",d.textContent=e,document.head.append(d)})(" userjs-digger{--ud-text: #262626;--ud-text-secondary: #31313188;--ud-bg: #f5f5f5;--ud-bg-secondary: #d0d0d0;--ud-bg-hover: #d4d4d4;--ud-border: #e5e7eb;--ud-border-secondary: #d1d5db}.dark userjs-digger,[data-color-mode=dark] userjs-digger,[data-theme=dark] userjs-digger{--ud-text: #f5f5f5;--ud-text-secondary: #d5d5d588;--ud-bg: #262626;--ud-bg-secondary: #525252;--ud-bg-hover: #737373;--ud-border: #374151;--ud-border-secondary: #4b5563} ");
(function (vue, psl) {
'use strict';
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var _a;
const isClient = typeof window !== "undefined";
const isFunction = (val) => typeof val === "function";
const isString = (val) => typeof val === "string";
const noop = () => {
};
const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function resolveUnref(r) {
return typeof r === "function" ? r() : vue.unref(r);
}
function createFilterWrapper(filter, fn) {
function wrapper(...args) {
return new Promise((resolve, reject) => {
Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
});
}
return wrapper;
}
const bypassFilter = (invoke) => {
return invoke();
};
function pausableFilter(extendFilter = bypassFilter) {
const isActive = vue.ref(true);
function pause() {
isActive.value = false;
}
function resume() {
isActive.value = true;
}
const eventFilter = (...args) => {
if (isActive.value)
extendFilter(...args);
};
return { isActive: vue.readonly(isActive), pause, resume, eventFilter };
}
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
return new Promise((resolve, reject) => {
if (throwOnTimeout)
setTimeout(() => reject(reason), ms);
else
setTimeout(resolve, ms);
});
}
function containsProp(obj, ...props) {
return props.some((k) => k in obj);
}
function tryOnScopeDispose(fn) {
if (vue.getCurrentScope()) {
vue.onScopeDispose(fn);
return true;
}
return false;
}
function createEventHook() {
const fns = /* @__PURE__ */ new Set();
const off = (fn) => {
fns.delete(fn);
};
const on = (fn) => {
fns.add(fn);
const offFn = () => off(fn);
tryOnScopeDispose(offFn);
return {
off: offFn
};
};
const trigger = (param) => {
return Promise.all(Array.from(fns).map((fn) => fn(param)));
};
return {
on,
off,
trigger
};
}
function resolveRef(r) {
return typeof r === "function" ? vue.computed(r) : vue.ref(r);
}
function createUntil(r, isNot = false) {
function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
let stop = null;
const watcher = new Promise((resolve) => {
stop = vue.watch(r, (v) => {
if (condition(v) !== isNot) {
stop == null ? void 0 : stop();
resolve(v);
}
}, {
flush,
deep,
immediate: true
});
});
const promises = [watcher];
if (timeout != null) {
promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => stop == null ? void 0 : stop()));
}
return Promise.race(promises);
}
function toBe(value, options) {
if (!vue.isRef(value))
return toMatch((v) => v === value, options);
const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
let stop = null;
const watcher = new Promise((resolve) => {
stop = vue.watch([r, value], ([v1, v2]) => {
if (isNot !== (v1 === v2)) {
stop == null ? void 0 : stop();
resolve(v1);
}
}, {
flush,
deep,
immediate: true
});
});
const promises = [watcher];
if (timeout != null) {
promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => resolveUnref(r)).finally(() => {
stop == null ? void 0 : stop();
return resolveUnref(r);
}));
}
return Promise.race(promises);
}
function toBeTruthy(options) {
return toMatch((v) => Boolean(v), options);
}
function toBeNull(options) {
return toBe(null, options);
}
function toBeUndefined(options) {
return toBe(void 0, options);
}
function toBeNaN(options) {
return toMatch(Number.isNaN, options);
}
function toContains(value, options) {
return toMatch((v) => {
const array = Array.from(v);
return array.includes(value) || array.includes(resolveUnref(value));
}, options);
}
function changed(options) {
return changedTimes(1, options);
}
function changedTimes(n = 1, options) {
let count = -1;
return toMatch(() => {
count += 1;
return count >= n;
}, options);
}
if (Array.isArray(resolveUnref(r))) {
const instance = {
toMatch,
toContains,
changed,
changedTimes,
get not() {
return createUntil(r, !isNot);
}
};
return instance;
} else {
const instance = {
toMatch,
toBe,
toBeTruthy,
toBeNull,
toBeNaN,
toBeUndefined,
changed,
changedTimes,
get not() {
return createUntil(r, !isNot);
}
};
return instance;
}
}
function until(r) {
return createUntil(r);
}
function useTimeoutFn(cb, interval, options = {}) {
const {
immediate = true
} = options;
const isPending = vue.ref(false);
let timer = null;
function clear() {
if (timer) {
clearTimeout(timer);
timer = null;
}
}
function stop() {
isPending.value = false;
clear();
}
function start(...args) {
clear();
isPending.value = true;
timer = setTimeout(() => {
isPending.value = false;
timer = null;
cb(...args);
}, resolveUnref(interval));
}
if (immediate) {
isPending.value = true;
if (isClient)
start();
}
tryOnScopeDispose(stop);
return {
isPending: vue.readonly(isPending),
start,
stop
};
}
function useToggle(initialValue = false, options = {}) {
const {
truthyValue = true,
falsyValue = false
} = options;
const valueIsRef = vue.isRef(initialValue);
const _value = vue.ref(initialValue);
function toggle(value) {
if (arguments.length) {
_value.value = value;
return _value.value;
} else {
const truthy = resolveUnref(truthyValue);
_value.value = _value.value === truthy ? resolveUnref(falsyValue) : truthy;
return _value.value;
}
}
if (valueIsRef)
return toggle;
else
return [_value, toggle];
}
function watchArray(source, cb, options) {
let oldList = (options == null ? void 0 : options.immediate) ? [] : [
...source instanceof Function ? source() : Array.isArray(source) ? source : vue.unref(source)
];
return vue.watch(source, (newList, _, onCleanup) => {
const oldListRemains = new Array(oldList.length);
const added = [];
for (const obj of newList) {
let found = false;
for (let i = 0; i < oldList.length; i++) {
if (!oldListRemains[i] && obj === oldList[i]) {
oldListRemains[i] = true;
found = true;
break;
}
}
if (!found)
added.push(obj);
}
const removed = oldList.filter((_2, i) => !oldListRemains[i]);
cb(newList, oldList, added, removed, onCleanup);
oldList = [...newList];
}, options);
}
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
var __objRest$5 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$8)
for (var prop of __getOwnPropSymbols$8(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function watchWithFilter(source, cb, options = {}) {
const _a2 = options, {
eventFilter = bypassFilter
} = _a2, watchOptions = __objRest$5(_a2, [
"eventFilter"
]);
return vue.watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
}
var __defProp$2 = Object.defineProperty;
var __defProps$2 = Object.defineProperties;
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$2 = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$2.call(b, prop))
__defNormalProp$2(a, prop, b[prop]);
if (__getOwnPropSymbols$2)
for (var prop of __getOwnPropSymbols$2(b)) {
if (__propIsEnum$2.call(b, prop))
__defNormalProp$2(a, prop, b[prop]);
}
return a;
};
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
var __objRest$1 = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols$2)
for (var prop of __getOwnPropSymbols$2(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
target[prop] = source[prop];
}
return target;
};
function watchPausable(source, cb, options = {}) {
const _a2 = options, {
eventFilter: filter
} = _a2, watchOptions = __objRest$1(_a2, [
"eventFilter"
]);
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
const stop = watchWithFilter(source, cb, __spreadProps$2(__spreadValues$2({}, watchOptions), {
eventFilter
}));
return { stop, pause, resume, isActive };
}
function unrefElement(elRef) {
var _a2;
const plain = resolveUnref(elRef);
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
}
const defaultWindow = isClient ? window : void 0;
function useEventListener(...args) {
let target;
let events;
let listeners;
let options;
if (isString(args[0]) || Array.isArray(args[0])) {
[events, listeners, options] = args;
target = defaultWindow;
} else {
[target, events, listeners, options] = args;
}
if (!target)
return noop;
if (!Array.isArray(events))
events = [events];
if (!Array.isArray(listeners))
listeners = [listeners];
const cleanups = [];
const cleanup = () => {
cleanups.forEach((fn) => fn());
cleanups.length = 0;
};
const register = (el, event, listener, options2) => {
el.addEventListener(event, listener, options2);
return () => el.removeEventListener(event, listener, options2);
};
const stopWatch = vue.watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
cleanup();
if (!el)
return;
cleanups.push(...events.flatMap((event) => {
return listeners.map((listener) => register(el, event, listener, options2));
}));
}, { immediate: true, flush: "post" });
const stop = () => {
stopWatch();
cleanup();
};
tryOnScopeDispose(stop);
return stop;
}
let _iOSWorkaround = false;
function onClickOutside(target, handler, options = {}) {
const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
if (!window2)
return;
if (isIOS && !_iOSWorkaround) {
_iOSWorkaround = true;
Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop));
}
let shouldListen = true;
const shouldIgnore = (event) => {
return ignore.some((target2) => {
if (typeof target2 === "string") {
return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
} else {
const el = unrefElement(target2);
return el && (event.target === el || event.composedPath().includes(el));
}
});
};
const listener = (event) => {
const el = unrefElement(target);
if (!el || el === event.target || event.composedPath().includes(el))
return;
if (event.detail === 0)
shouldListen = !shouldIgnore(event);
if (!shouldListen) {
shouldListen = true;
return;
}
handler(event);
};
const cleanup = [
useEventListener(window2, "click", listener, { passive: true, capture }),
useEventListener(window2, "pointerdown", (e) => {
const el = unrefElement(target);
if (el)
shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);
}, { passive: true }),
detectIframe && useEventListener(window2, "blur", (event) => {
var _a2;
const el = unrefElement(target);
if (((_a2 = window2.document.activeElement) == null ? void 0 : _a2.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement)))
handler(event);
})
].filter(Boolean);
const stop = () => cleanup.forEach((fn) => fn());
return stop;
}
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
const globalKey = "__vueuse_ssr_handlers__";
_global[globalKey] = _global[globalKey] || {};
const handlers = _global[globalKey];
function getSSRHandler(key, fallback) {
return handlers[key] || fallback;
}
function guessSerializerType(rawInit) {
return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
}
var __defProp$k = Object.defineProperty;
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$k = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$n.call(b, prop))
__defNormalProp$k(a, prop, b[prop]);
if (__getOwnPropSymbols$n)
for (var prop of __getOwnPropSymbols$n(b)) {
if (__propIsEnum$n.call(b, prop))
__defNormalProp$k(a, prop, b[prop]);
}
return a;
};
const StorageSerializers = {
boolean: {
read: (v) => v === "true",
write: (v) => String(v)
},
object: {
read: (v) => JSON.parse(v),
write: (v) => JSON.stringify(v)
},
number: {
read: (v) => Number.parseFloat(v),
write: (v) => String(v)
},
any: {
read: (v) => v,
write: (v) => String(v)
},
string: {
read: (v) => v,
write: (v) => String(v)
},
map: {
read: (v) => new Map(JSON.parse(v)),
write: (v) => JSON.stringify(Array.from(v.entries()))
},
set: {
read: (v) => new Set(JSON.parse(v)),
write: (v) => JSON.stringify(Array.from(v))
},
date: {
read: (v) => new Date(v),
write: (v) => v.toISOString()
}
};
const customStorageEventName = "vueuse-storage";
function useStorage(key, defaults, storage, options = {}) {
var _a2;
const {
flush = "pre",
deep = true,
listenToStorageChanges = true,
writeDefaults = true,
mergeDefaults = false,
shallow,
window: window2 = defaultWindow,
eventFilter,
onError = (e) => {
console.error(e);
}
} = options;
const data = (shallow ? vue.shallowRef : vue.ref)(defaults);
if (!storage) {
try {
storage = getSSRHandler("getDefaultStorage", () => {
var _a22;
return (_a22 = defaultWindow) == null ? void 0 : _a22.localStorage;
})();
} catch (e) {
onError(e);
}
}
if (!storage)
return data;
const rawInit = resolveUnref(defaults);
const type = guessSerializerType(rawInit);
const serializer = (_a2 = options.serializer) != null ? _a2 : StorageSerializers[type];
const { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, () => write(data.value), { flush, deep, eventFilter });
if (window2 && listenToStorageChanges) {
useEventListener(window2, "storage", update);
useEventListener(window2, customStorageEventName, updateFromCustomEvent);
}
update();
return data;
function write(v) {
try {
if (v == null) {
storage.removeItem(key);
} else {
const serialized = serializer.write(v);
const oldValue = storage.getItem(key);
if (oldValue !== serialized) {
storage.setItem(key, serialized);
if (window2) {
window2.dispatchEvent(new CustomEvent(customStorageEventName, {
detail: {
key,
oldValue,
newValue: serialized,
storageArea: storage
}
}));
}
}
}
} catch (e) {
onError(e);
}
}
function read(event) {
const rawValue = event ? event.newValue : storage.getItem(key);
if (rawValue == null) {
if (writeDefaults && rawInit !== null)
storage.setItem(key, serializer.write(rawInit));
return rawInit;
} else if (!event && mergeDefaults) {
const value = serializer.read(rawValue);
if (isFunction(mergeDefaults))
return mergeDefaults(value, rawInit);
else if (type === "object" && !Array.isArray(value))
return __spreadValues$k(__spreadValues$k({}, rawInit), value);
return value;
} else if (typeof rawValue !== "string") {
return rawValue;
} else {
return serializer.read(rawValue);
}
}
function updateFromCustomEvent(event) {
update(event.detail);
}
function update(event) {
if (event && event.storageArea !== storage)
return;
if (event && event.key == null) {
data.value = rawInit;
return;
}
if (event && event.key !== key)
return;
pauseWatch();
try {
data.value = read(event);
} catch (e) {
onError(e);
} finally {
if (event)
vue.nextTick(resumeWatch);
else
resumeWatch();
}
}
}
var __defProp$d = Object.defineProperty;
var __defProps$4 = Object.defineProperties;
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues$d = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp$f.call(b, prop))
__defNormalProp$d(a, prop, b[prop]);
if (__getOwnPropSymbols$f)
for (var prop of __getOwnPropSymbols$f(b)) {
if (__propIsEnum$f.call(b, prop))
__defNormalProp$d(a, prop, b[prop]);
}
return a;
};
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
const payloadMapping = {
json: "application/json",
text: "text/plain"
};
function isFetchOptions(obj) {
return obj && containsProp(obj, "immediate", "refetch", "initialData", "timeout", "beforeFetch", "afterFetch", "onFetchError", "fetch");
}
function headersToObject(headers) {
if (typeof Headers !== "undefined" && headers instanceof Headers)
return Object.fromEntries([...headers.entries()]);
return headers;
}
function useFetch(url, ...args) {
var _a2;
const supportsAbort = typeof AbortController === "function";
let fetchOptions = {};
let options = { immediate: true, refetch: false, timeout: 0 };
const config = {
method: "GET",
type: "text",
payload: void 0
};
if (args.length > 0) {
if (isFetchOptions(args[0]))
options = __spreadValues$d(__spreadValues$d({}, options), args[0]);
else
fetchOptions = args[0];
}
if (args.length > 1) {
if (isFetchOptions(args[1]))
options = __spreadValues$d(__spreadValues$d({}, options), args[1]);
}
const {
fetch = (_a2 = defaultWindow) == null ? void 0 : _a2.fetch,
initialData,
timeout
} = options;
const responseEvent = createEventHook();
const errorEvent = createEventHook();
const finallyEvent = createEventHook();
const isFinished = vue.ref(false);
const isFetching = vue.ref(false);
const aborted = vue.ref(false);
const statusCode = vue.ref(null);
const response = vue.shallowRef(null);
const error = vue.shallowRef(null);
const data = vue.shallowRef(initialData || null);
const canAbort = vue.computed(() => supportsAbort && isFetching.value);
let controller;
let timer;
const abort = () => {
if (supportsAbort) {
controller == null ? void 0 : controller.abort();
controller = new AbortController();
controller.signal.onabort = () => aborted.value = true;
fetchOptions = __spreadProps$4(__spreadValues$d({}, fetchOptions), {
signal: controller.signal
});
}
};
const loading = (isLoading) => {
isFetching.value = isLoading;
isFinished.value = !isLoading;
};
if (timeout)
timer = useTimeoutFn(abort, timeout, { immediate: false });
const execute = async (throwOnFailed = false) => {
var _a22;
abort();
loading(true);
error.value = null;
statusCode.value = null;
aborted.value = false;
const defaultFetchOptions = {
method: config.method,
headers: {}
};
if (config.payload) {
const headers = headersToObject(defaultFetchOptions.headers);
if (config.payloadType)
headers["Content-Type"] = (_a22 = payloadMapping[config.payloadType]) != null ? _a22 : config.payloadType;
const payload = resolveUnref(config.payload);
defaultFetchOptions.body = config.payloadType === "json" ? JSON.stringify(payload) : payload;
}
let isCanceled = false;
const context = {
url: resolveUnref(url),
options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),
cancel: () => {
isCanceled = true;
}
};
if (options.beforeFetch)
Object.assign(context, await options.beforeFetch(context));
if (isCanceled || !fetch) {
loading(false);
return Promise.resolve(null);
}
let responseData = null;
if (timer)
timer.start();
return new Promise((resolve, reject) => {
var _a3;
fetch(context.url, __spreadProps$4(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {
headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))
})).then(async (fetchResponse) => {
response.value = fetchResponse;
statusCode.value = fetchResponse.status;
responseData = await fetchResponse[config.type]();
if (!fetchResponse.ok) {
data.value = initialData || null;
throw new Error(fetchResponse.statusText);
}
if (options.afterFetch)
({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));
data.value = responseData;
responseEvent.trigger(fetchResponse);
return resolve(fetchResponse);
}).catch(async (fetchError) => {
let errorData = fetchError.message || fetchError.name;
if (options.onFetchError)
({ error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));
error.value = errorData;
errorEvent.trigger(fetchError);
if (throwOnFailed)
return reject(fetchError);
return resolve(null);
}).finally(() => {
loading(false);
if (timer)
timer.stop();
finallyEvent.trigger(null);
});
});
};
const refetch = resolveRef(options.refetch);
vue.watch([
refetch,
resolveRef(url)
], ([refetch2]) => refetch2 && execute(), { deep: true });
const shell = {
isFinished,
statusCode,
response,
error,
data,
isFetching,
canAbort,
aborted,
abort,
execute,
onFetchResponse: responseEvent.on,
onFetchError: errorEvent.on,
onFetchFinally: finallyEvent.on,
get: setMethod("GET"),
put: setMethod("PUT"),
post: setMethod("POST"),
delete: setMethod("DELETE"),
patch: setMethod("PATCH"),
head: setMethod("HEAD"),
options: setMethod("OPTIONS"),
json: setType("json"),
text: setType("text"),
blob: setType("blob"),
arrayBuffer: setType("arrayBuffer"),
formData: setType("formData")
};
function setMethod(method) {
return (payload, payloadType) => {
if (!isFetching.value) {
config.method = method;
config.payload = payload;
config.payloadType = payloadType;
if (vue.isRef(config.payload)) {
vue.watch([
refetch,
resolveRef(config.payload)
], ([refetch2]) => refetch2 && execute(), { deep: true });
}
const rawPayload = resolveUnref(config.payload);
if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))
config.payloadType = "json";
return __spreadProps$4(__spreadValues$d({}, shell), {
then(onFulfilled, onRejected) {
return waitUntilFinished().then(onFulfilled, onRejected);
}
});
}
return void 0;
};
}
function waitUntilFinished() {
return new Promise((resolve, reject) => {
until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));
});
}
function setType(type) {
return () => {
if (!isFetching.value) {
config.type = type;
return __spreadProps$4(__spreadValues$d({}, shell), {
then(onFulfilled, onRejected) {
return waitUntilFinished().then(onFulfilled, onRejected);
}
});
}
return void 0;
};
}
if (options.immediate)
setTimeout(execute, 0);
return __spreadProps$4(__spreadValues$d({}, shell), {
then(onFulfilled, onRejected) {
return waitUntilFinished().then(onFulfilled, onRejected);
}
});
}
function useMouse(options = {}) {
const {
type = "page",
touch = true,
resetOnTouchEnds = false,
initialValue = { x: 0, y: 0 },
window: window2 = defaultWindow,
eventFilter
} = options;
const x = vue.ref(initialValue.x);
const y = vue.ref(initialValue.y);
const sourceType = vue.ref(null);
const mouseHandler = (event) => {
if (type === "page") {
x.value = event.pageX;
y.value = event.pageY;
} else if (type === "client") {
x.value = event.clientX;
y.value = event.clientY;
} else if (type === "movement") {
x.value = event.movementX;
y.value = event.movementY;
}
sourceType.value = "mouse";
};
const reset2 = () => {
x.value = initialValue.x;
y.value = initialValue.y;
};
const touchHandler = (event) => {
if (event.touches.length > 0) {
const touch2 = event.touches[0];
if (type === "page") {
x.value = touch2.pageX;
y.value = touch2.pageY;
} else if (type === "client") {
x.value = touch2.clientX;
y.value = touch2.clientY;
}
sourceType.value = "touch";
}
};
const mouseHandlerWrapper = (event) => {
return eventFilter === void 0 ? mouseHandler(event) : eventFilter(() => mouseHandler(event), {});
};
const touchHandlerWrapper = (event) => {
return eventFilter === void 0 ? touchHandler(event) : eventFilter(() => touchHandler(event), {});
};
if (window2) {
useEventListener(window2, "mousemove", mouseHandlerWrapper, { passive: true });
useEventListener(window2, "dragover", mouseHandlerWrapper, { passive: true });
if (touch && type !== "movement") {
useEventListener(window2, "touchstart", touchHandlerWrapper, { passive: true });
useEventListener(window2, "touchmove", touchHandlerWrapper, { passive: true });
if (resetOnTouchEnds)
useEventListener(window2, "touchend", reset2, { passive: true });
}
}
return {
x,
y,
sourceType
};
}
function useMouseInElement(target, options = {}) {
const {
handleOutside = true,
window: window2 = defaultWindow
} = options;
const { x, y, sourceType } = useMouse(options);
const targetRef = vue.ref(target != null ? target : window2 == null ? void 0 : window2.document.body);
const elementX = vue.ref(0);
const elementY = vue.ref(0);
const elementPositionX = vue.ref(0);
const elementPositionY = vue.ref(0);
const elementHeight = vue.ref(0);
const elementWidth = vue.ref(0);
const isOutside = vue.ref(true);
let stop = () => {
};
if (window2) {
stop = vue.watch([targetRef, x, y], () => {
const el = unrefElement(targetRef);
if (!el)
return;
const {
left,
top,
width,
height
} = el.getBoundingClientRect();
elementPositionX.value = left + window2.pageXOffset;
elementPositionY.value = top + window2.pageYOffset;
elementHeight.value = height;
elementWidth.value = width;
const elX = x.value - elementPositionX.value;
const elY = y.value - elementPositionY.value;
isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;
if (handleOutside || !isOutside.value) {
elementX.value = elX;
elementY.value = elY;
}
}, { immediate: true });
useEventListener(document, "mouseleave", () => {
isOutside.value = true;
});
}
return {
x,
y,
sourceType,
elementX,
elementY,
elementPositionX,
elementPositionY,
elementHeight,
elementWidth,
isOutside,
stop
};
}
function useSessionStorage(key, initialValue, options = {}) {
const { window: window2 = defaultWindow } = options;
return useStorage(key, initialValue, window2 == null ? void 0 : window2.sessionStorage, options);
}
const DEFAULT_UNITS = [
{ max: 6e4, value: 1e3, name: "second" },
{ max: 276e4, value: 6e4, name: "minute" },
{ max: 72e6, value: 36e5, name: "hour" },
{ max: 5184e5, value: 864e5, name: "day" },
{ max: 24192e5, value: 6048e5, name: "week" },
{ max: 28512e6, value: 2592e6, name: "month" },
{ max: Infinity, value: 31536e6, name: "year" }
];
const DEFAULT_MESSAGES = {
justNow: "just now",
past: (n) => n.match(/\d/) ? `${n} ago` : n,
future: (n) => n.match(/\d/) ? `in ${n}` : n,
month: (n, past) => n === 1 ? past ? "last month" : "next month" : `${n} month${n > 1 ? "s" : ""}`,
year: (n, past) => n === 1 ? past ? "last year" : "next year" : `${n} year${n > 1 ? "s" : ""}`,
day: (n, past) => n === 1 ? past ? "yesterday" : "tomorrow" : `${n} day${n > 1 ? "s" : ""}`,
week: (n, past) => n === 1 ? past ? "last week" : "next week" : `${n} week${n > 1 ? "s" : ""}`,
hour: (n) => `${n} hour${n > 1 ? "s" : ""}`,
minute: (n) => `${n} minute${n > 1 ? "s" : ""}`,
second: (n) => `${n} second${n > 1 ? "s" : ""}`,
invalid: ""
};
const DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);
function formatTimeAgo(from, options = {}, now = Date.now()) {
var _a2;
const {
max,
messages = DEFAULT_MESSAGES,
fullDateFormatter = DEFAULT_FORMATTER,
units = DEFAULT_UNITS,
showSecond = false,
rounding = "round"
} = options;
const roundFn = typeof rounding === "number" ? (n) => +n.toFixed(rounding) : Math[rounding];
const diff = +now - +from;
const absDiff = Math.abs(diff);
function getValue(diff2, unit) {
return roundFn(Math.abs(diff2) / unit.value);
}
function format(diff2, unit) {
const val = getValue(diff2, unit);
const past = diff2 > 0;
const str = applyFormat(unit.name, val, past);
return applyFormat(past ? "past" : "future", str, past);
}
function applyFormat(name, val, isPast) {
const formatter = messages[name];
if (typeof formatter === "function")
return formatter(val, isPast);
return formatter.replace("{0}", val.toString());
}
if (absDiff < 6e4 && !showSecond)
return messages.justNow;
if (typeof max === "number" && absDiff > max)
return fullDateFormatter(new Date(from));
if (typeof max === "string") {
const unitMax = (_a2 = units.find((i) => i.name === max)) == null ? void 0 : _a2.max;
if (unitMax && absDiff > unitMax)
return fullDateFormatter(new Date(from));
}
for (const [idx, unit] of units.entries()) {
const val = getValue(diff, unit);
if (val <= 0 && units[idx - 1])
return format(diff, units[idx - 1]);
if (absDiff < unit.max)
return format(diff, unit);
}
return messages.invalid;
}
const _hoisted_1$4 = { class: "inline-block min-w-full align-middle" };
const _hoisted_2$3 = { class: "overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5" };
const _hoisted_3$2 = { class: "min-w-full divide-y divide-$ud-border-secondary" };
const _hoisted_4$2 = /* @__PURE__ */ vue.createElementVNode("thead", { class: "bg-$ud-bg-secondary sticky" }, [
/* @__PURE__ */ vue.createElementVNode("tr", null, [
/* @__PURE__ */ vue.createElementVNode("th", {
scope: "col",
class: "relative p-2"
}, [
/* @__PURE__ */ vue.createElementVNode("span", { class: "sr-only" }, "Toggle expand")
]),
/* @__PURE__ */ vue.createElementVNode("th", {
scope: "col",
class: "w-60 py-2 pl-4 pr-3 text-left text-xs font-semibold"
}, " Title "),
/* @__PURE__ */ vue.createElementVNode("th", {
scope: "col",
class: "w-16 px-3 py-2 text-left text-xs font-semibold"
}, " Daily "),
/* @__PURE__ */ vue.createElementVNode("th", {
scope: "col",
class: "w-20 px-3 py-2 text-left text-xs font-semibold"
}, " Update "),
/* @__PURE__ */ vue.createElementVNode("th", {
scope: "col",
class: "relative py-2 pl-3 pr-4"
}, [
/* @__PURE__ */ vue.createElementVNode("span", { class: "sr-only" }, "Install")
])
])
], -1);
const _hoisted_5$2 = { class: "divide-y divide-$ud-border bg-$ud-bg" };
const _hoisted_6$2 = ["onClick"];
const _hoisted_7$2 = ["title"];
const _hoisted_8 = { class: "whitespace-nowrap text-ellipsis break-all overflow-hidden px-3 py-2 text-xs text-$ud-text-secondary" };
const _hoisted_9 = { class: "whitespace-nowrap text-ellipsis break-all overflow-hidden px-3 py-2 text-xs text-$ud-text-secondary" };
const _hoisted_10 = { class: "relative whitespace-nowrap py-2 pl-3 pr-4 text-right text-xs font-medium" };
const _hoisted_11 = ["href"];
const _hoisted_12 = { class: "sr-only" };
const _hoisted_13 = { key: 0 };
const _hoisted_14 = {
colspan: "5",
class: "py-2"
};
const _hoisted_15 = { class: "mx-2" };
const _hoisted_16 = { class: "text-xs grid grid-cols-6 gap-y-2" };
const _hoisted_17 = /* @__PURE__ */ vue.createElementVNode("dt", { class: "font-semibold" }, "Version", -1);
const _hoisted_18 = { class: "text-$ud-text" };
const _hoisted_19 = /* @__PURE__ */ vue.createElementVNode("dt", { class: "font-semibold" }, "Score", -1);
const _hoisted_20 = { class: "text-$ud-text" };
const _hoisted_21 = /* @__PURE__ */ vue.createElementVNode("dt", { class: "font-semibold" }, "Total instals", -1);
const _hoisted_22 = { class: "text-$ud-text" };
const _hoisted_23 = /* @__PURE__ */ vue.createElementVNode("dt", { class: "font-semibold" }, "Author(s)", -1);
const _hoisted_24 = { class: "col-span-5 text-$ud-text" };
const _hoisted_25 = ["href"];
const _hoisted_26 = /* @__PURE__ */ vue.createElementVNode("dt", { class: "font-semibold" }, "Description", -1);
const _hoisted_27 = { class: "col-span-5 text-$ud-text" };
const _hoisted_28 = {
key: 0,
class: "p-3 text-center text-sm"
};
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
__name: "DataTable",
props: {
data: null
},
setup(__props) {
const props = __props;
const expanded = vue.ref([]);
watchArray(
() => props.data,
() => {
expanded.value = Array.from({ length: props.data.length }, () => false);
}
);
const toggleExpand = (i) => {
expanded.value[i] = !expanded.value[i];
};
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
vue.createElementVNode("div", _hoisted_2$3, [
vue.createElementVNode("table", _hoisted_3$2, [
_hoisted_4$2,
vue.createElementVNode("tbody", _hoisted_5$2, [
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.data, (item, i) => {
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
key: item.id
}, [
vue.createElementVNode("tr", null, [
vue.createElementVNode("td", {
class: "relative whitespace-nowrap p-2 text-right text-xs font-medium cursor-pointer",
onClick: ($event) => toggleExpand(i)
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(["i-carbon-chevron-right", vue.unref(expanded)[i] && "rotate-90"])
}, null, 2)
], 8, _hoisted_6$2),
vue.createElementVNode("td", {
title: item.name,
class: "whitespace-nowrap text-ellipsis break-all overflow-hidden py-2 pl-4 pr-3 text-xs font-medium max-w-60"
}, vue.toDisplayString(item.name), 9, _hoisted_7$2),
vue.createElementVNode("td", _hoisted_8, vue.toDisplayString(item.daily_installs), 1),
vue.createElementVNode("td", _hoisted_9, vue.toDisplayString(vue.unref(formatTimeAgo)(new Date(item.code_updated_at))), 1),
vue.createElementVNode("td", _hoisted_10, [
vue.createElementVNode("a", {
href: item.code_url,
target: "_blank",
class: "text-indigo-600 hover:text-indigo-900"
}, [
vue.createTextVNode(" Install "),
vue.createElementVNode("span", _hoisted_12, ", " + vue.toDisplayString(item.name), 1)
], 8, _hoisted_11)
])
]),
vue.unref(expanded)[i] ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_13, [
vue.createElementVNode("td", _hoisted_14, [
vue.createElementVNode("div", _hoisted_15, [
vue.createElementVNode("dl", _hoisted_16, [
_hoisted_17,
vue.createElementVNode("dd", _hoisted_18, vue.toDisplayString(item.version), 1),
_hoisted_19,
vue.createElementVNode("dd", _hoisted_20, vue.toDisplayString(item.fan_score), 1),
_hoisted_21,
vue.createElementVNode("dd", _hoisted_22, vue.toDisplayString(item.total_installs.toLocaleString()), 1),
_hoisted_23,
vue.createElementVNode("dd", _hoisted_24, [
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.users, (user) => {
return vue.openBlock(), vue.createElementBlock("a", {
key: user.id,
href: user.url,
target: "_blank",
class: "underline underline-2 underline-$ud-bg"
}, vue.toDisplayString(user.name), 9, _hoisted_25);
}), 128))
]),
_hoisted_26,
vue.createElementVNode("dd", _hoisted_27, vue.toDisplayString(item.description), 1)
])
])
])
])) : vue.createCommentVNode("", true)
], 64);
}), 128))
])
]),
__props.data.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, " There has no Userjs for this site ")) : vue.createCommentVNode("", true)
])
]);
};
}
});
const _hoisted_1$3 = /* @__PURE__ */ vue.createElementVNode("div", { class: "i-carbon-settings w-4 h-4" }, null, -1);
const _hoisted_2$2 = [
_hoisted_1$3
];
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
__name: "FloatActionButton",
props: {
modelValue: { type: Boolean }
},
emits: ["update:modelValue"],
setup(__props) {
const fab = vue.ref(null);
const { isOutside } = useMouseInElement(fab);
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("div", {
ref_key: "fab",
ref: fab,
class: vue.normalizeClass(["fixed right-3 bottom-4 transition-transform ease-out", vue.unref(isOutside) ? "translate-x-full" : "translate-x-0"])
}, [
vue.createElementVNode("div", {
class: vue.normalizeClass(["bg-$ud-bg text-$ud-text transition-all shadow-md overflow-hidden rounded-md cursor-pointer flex", __props.modelValue ? "translate-x-[calc(100%_+_1rem)]" : "translate-x-0"])
}, [
vue.createElementVNode("div", {
class: "p-2",
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", !__props.modelValue))
}, _hoisted_2$2)
], 2)
], 2);
};
}
});
const _hoisted_1$2 = ["aria-checked"];
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
__name: "Toggle",
props: {
modelValue: { type: Boolean }
},
emits: ["update:modelValue"],
setup(__props) {
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("button", {
type: "button",
class: vue.normalizeClass(["relative inline-flex flex-shrink-0 h-4 w-9 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", __props.modelValue ? "bg-indigo-600" : "bg-gray-200"]),
role: "switch",
"aria-checked": __props.modelValue,
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", !__props.modelValue))
}, [
vue.createElementVNode("span", {
"aria-hidden": "true",
class: vue.normalizeClass(["pointer-events-none inline-block h-3 w-3 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200", __props.modelValue ? "translate-x-5" : "translate-x-0"])
}, null, 2)
], 10, _hoisted_1$2);
};
}
});
const _hoisted_1$1 = { class: "border-b border-b-$ud-border p-4 flex items-center" };
const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("div", null, "Settings", -1);
const _hoisted_3$1 = /* @__PURE__ */ vue.createElementVNode("div", { class: "i-carbon-close" }, null, -1);
const _hoisted_4$1 = [
_hoisted_3$1
];
const _hoisted_5$1 = { class: "divide-y divide-$ud-border px-4 py-2" };
const _hoisted_6$1 = { class: "py-2 flex items-center justify-between space-x-4" };
const _hoisted_7$1 = /* @__PURE__ */ vue.createElementVNode("div", { class: "flex flex-col w-4/5 overflow-hidden" }, [
/* @__PURE__ */ vue.createElementVNode("p", { class: "text-sm font-medium" }, "Enable on this page"),
/* @__PURE__ */ vue.createElementVNode("p", { class: "text-sm text-$ud-text-secondary text-xs" }, " To enable this plugin on this page or not (Session) ")
], -1);
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
__name: "SettingsPanel",
props: {
show: { type: Boolean }
},
emits: ["update:show"],
setup(__props, { emit }) {
const dialog = vue.ref(null);
onClickOutside(dialog, () => {
emit("update:show", false);
});
const enable = useSessionStorage("ud_show", true);
return (_ctx, _cache) => {
const _component_Toggle = _sfc_main$2;
return __props.show ? (vue.openBlock(), vue.createElementBlock("div", {
key: 0,
ref_key: "dialog",
ref: dialog,
class: "fixed left-1/2 -translate-x-1/2 top-1/3 w-100 shadow-md rounded bg-$ud-bg text-$ud-text"
}, [
vue.createElementVNode("div", _hoisted_1$1, [
_hoisted_2$1,
vue.createElementVNode("div", {
class: "ml-auto p-1 hover:bg-$ud-bg-hover rounded",
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:show", false))
}, _hoisted_4$1)
]),
vue.createElementVNode("ul", _hoisted_5$1, [
vue.createElementVNode("li", _hoisted_6$1, [
_hoisted_7$1,
vue.createVNode(_component_Toggle, {
modelValue: vue.unref(enable),
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(enable) ? enable.value = $event : null)
}, null, 8, ["modelValue"])
])
])
], 512)) : vue.createCommentVNode("", true);
};
}
});
var _unsafeWindow = /* @__PURE__ */ (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)();
function useGreasyfork(site = "https://greasyfork.org") {
const host = psl.get(window.location.hostname);
const apiEndpoint = `${site}/en/scripts/by-site/${host}.json`;
return useFetch(apiEndpoint, { fetch: _unsafeWindow.fetch }).json();
}
const _hoisted_1 = { class: "p-2 text-sm" };
const _hoisted_2 = { class: "rounded-full px-2 py-0.25 text-xs bg-indigo-500 text-white" };
const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("div", { class: "i-carbon:settings-adjust" }, null, -1);
const _hoisted_4 = [
_hoisted_3
];
const _hoisted_5 = /* @__PURE__ */ vue.createElementVNode("div", { class: "i-carbon-close" }, null, -1);
const _hoisted_6 = [
_hoisted_5
];
const _hoisted_7 = {
key: 0,
class: "h-60 overflow-y-auto"
};
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "App",
setup(__props) {
const target = vue.ref(null);
const [collapse, toggleCollapse] = useToggle(false);
onClickOutside(target, (val) => {
if (val) {
toggleCollapse(false);
toggleShowTable(false);
}
});
const [showTable, toggleShowTable] = useToggle(false);
const { isFetching, error, data } = useGreasyfork();
const pagePsl = vue.computed(() => {
return psl.get(window.location.hostname);
});
const enable = useSessionStorage("ud_show", true);
const [settingShow, toggleSettingShow] = useToggle(false);
return (_ctx, _cache) => {
var _a2;
const _component_SettingsPanel = _sfc_main$1;
const _component_FloatActionButton = _sfc_main$3;
const _component_DataTable = _sfc_main$4;
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
vue.createVNode(_component_SettingsPanel, {
show: vue.unref(settingShow),
"onUpdate:show": _cache[0] || (_cache[0] = ($event) => vue.isRef(settingShow) ? settingShow.value = $event : null)
}, null, 8, ["show"]),
vue.unref(enable) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
vue.createVNode(_component_FloatActionButton, {
modelValue: vue.unref(collapse),
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(collapse) ? collapse.value = $event : null)
}, null, 8, ["modelValue"]),
vue.createElementVNode("div", {
ref_key: "target",
ref: target,
class: vue.normalizeClass([[vue.unref(collapse) ? "translate-x-0" : "translate-x-[calc(100%_+_1rem)]"], "fixed rounded-lg bg-$ud-bg text-$ud-text right-4 bottom-4 w-130 transition-all shadow-md divide-y divide-$ud-border-secondary"])
}, [
vue.createElementVNode("header", {
class: "w-full flex px-3 items-center select-none cursor-pointer",
onClick: _cache[4] || (_cache[4] = ($event) => vue.unref(toggleShowTable)())
}, [
vue.createElementVNode("div", null, [
vue.createElementVNode("div", {
class: vue.normalizeClass(["i-carbon-chevron-left", vue.unref(showTable) ? "-rotate-90" : "rotate-90"])
}, null, 2)
]),
vue.createElementVNode("span", _hoisted_1, [
vue.createTextVNode(" Found "),
vue.createElementVNode("span", _hoisted_2, vue.toDisplayString((_a2 = vue.unref(data)) == null ? void 0 : _a2.length), 1),
vue.createTextVNode(" user scripts for the " + vue.toDisplayString(vue.unref(pagePsl)), 1)
]),
vue.createElementVNode("div", {
class: "ml-auto hover:bg-$ud-bg-hover rounded p-1",
onClick: _cache[2] || (_cache[2] = vue.withModifiers(($event) => vue.unref(toggleSettingShow)(true), ["stop"]))
}, _hoisted_4),
vue.createElementVNode("div", {
class: "hover:bg-$ud-bg-hover rounded p-1",
onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => vue.unref(toggleCollapse)(false), ["stop"]))
}, _hoisted_6)
]),
vue.unref(showTable) ? (vue.openBlock(), vue.createElementBlock("section", _hoisted_7, [
vue.createVNode(_component_DataTable, {
data: vue.unref(data) ?? []
}, null, 8, ["data"])
])) : vue.createCommentVNode("", true)
], 2)
], 64)) : vue.createCommentVNode("", true)
], 64);
};
}
});
const unocss = `/* layer: preflights */*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgba(0,0,0,0);--un-ring-shadow:0 0 rgba(0,0,0,0);--un-shadow-inset: ;--un-shadow:0 0 rgba(0,0,0,0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}[data-v-app]{font-size:16px}:host{z-index:999999;position:relative}/* layer: icons */.i-carbon-chevron-left{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10 16L20 6l1.4 1.4l-8.6 8.6l8.6 8.6L20 26z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}.i-carbon-chevron-right{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M22 16L12 26l-1.4-1.4l8.6-8.6l-8.6-8.6L12 6z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}.i-carbon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}.i-carbon-settings{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M27 16.76v-1.53l1.92-1.68A2 2 0 0 0 29.3 11l-2.36-4a2 2 0 0 0-1.73-1a2 2 0 0 0-.64.1l-2.43.82a11.35 11.35 0 0 0-1.31-.75l-.51-2.52a2 2 0 0 0-2-1.61h-4.68a2 2 0 0 0-2 1.61l-.51 2.52a11.48 11.48 0 0 0-1.32.75l-2.38-.86A2 2 0 0 0 6.79 6a2 2 0 0 0-1.73 1L2.7 11a2 2 0 0 0 .41 2.51L5 15.24v1.53l-1.89 1.68A2 2 0 0 0 2.7 21l2.36 4a2 2 0 0 0 1.73 1a2 2 0 0 0 .64-.1l2.43-.82a11.35 11.35 0 0 0 1.31.75l.51 2.52a2 2 0 0 0 2 1.61h4.72a2 2 0 0 0 2-1.61l.51-2.52a11.48 11.48 0 0 0 1.32-.75l2.42.82a2 2 0 0 0 .64.1a2 2 0 0 0 1.73-1l2.28-4a2 2 0 0 0-.41-2.51ZM25.21 24l-3.43-1.16a8.86 8.86 0 0 1-2.71 1.57L18.36 28h-4.72l-.71-3.55a9.36 9.36 0 0 1-2.7-1.57L6.79 24l-2.36-4l2.72-2.4a8.9 8.9 0 0 1 0-3.13L4.43 12l2.36-4l3.43 1.16a8.86 8.86 0 0 1 2.71-1.57L13.64 4h4.72l.71 3.55a9.36 9.36 0 0 1 2.7 1.57L25.21 8l2.36 4l-2.72 2.4a8.9 8.9 0 0 1 0 3.13L27.57 20Z'/%3E%3Cpath fill='currentColor' d='M16 22a6 6 0 1 1 6-6a5.94 5.94 0 0 1-6 6Zm0-10a3.91 3.91 0 0 0-4 4a3.91 3.91 0 0 0 4 4a3.91 3.91 0 0 0 4-4a3.91 3.91 0 0 0-4-4Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}.i-carbon\\:settings-adjust{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30V8zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3s3 1.3 3 3s-1.3 3-3 3zM2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3s-3-1.3-3-3s1.3-3 3-3z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}/* layer: default */.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;}.pointer-events-none{pointer-events:none;}.fixed{position:fixed;}.relative{position:relative;}.sticky{position:sticky;}.bottom-4{bottom:16px;}.left-1\\/2{left:50%;}.right-3{right:12px;}.right-4{right:16px;}.top-1\\/3{top:33.3333333333%;}.grid{display:grid;}.col-span-5{grid-column:span 5/span 5;}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr));}.mx-2{margin-left:8px;margin-right:8px;}.ml-auto{margin-left:auto;}.inline-block{display:inline-block;}.h-3{height:12px;}.h-4{height:16px;}.h-60{height:240px;}.max-w-60{max-width:240px;}.min-w-full{min-width:100%;}.w-100{width:400px;}.w-130{width:520px;}.w-16{width:64px;}.w-20{width:80px;}.w-3{width:12px;}.w-4{width:16px;}.w-4\\/5{width:80%;}.w-60{width:240px;}.w-9{width:36px;}.w-full{width:100%;}.flex{display:flex;}.inline-flex{display:inline-flex;}.flex-shrink-0{flex-shrink:0;}.flex-col{flex-direction:column;}.-translate-x-1\\/2{--un-translate-x:-50%;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.translate-x-\\[calc\\(100\\%_\\+_1rem\\)\\]{--un-translate-x:calc(100% + 16px);transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.translate-x-0{--un-translate-x:0;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.translate-x-5{--un-translate-x:20px;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.translate-x-full{--un-translate-x:100%;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.-rotate-90{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:-90deg;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.rotate-90{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:90deg;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.items-center{align-items:center;}.justify-between{justify-content:space-between;}.gap-y-2{grid-row-gap:8px;row-gap:8px;}.space-x-4>:not([hidden])~:not([hidden]){--un-space-x-reverse:0;margin-left:calc(16px * calc(1 - var(--un-space-x-reverse)));margin-right:calc(16px * var(--un-space-x-reverse));}.divide-y>:not([hidden])~:not([hidden]){--un-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--un-divide-y-reverse)));border-bottom-width:calc(1px * var(--un-divide-y-reverse));border-top-style:solid;border-bottom-style:solid;}.divide-\\$ud-border-secondary>:not([hidden])~:not([hidden]){border-color:var(--ud-border-secondary);}.divide-\\$ud-border>:not([hidden])~:not([hidden]){border-color:var(--ud-border);}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.text-ellipsis{text-overflow:ellipsis;}.whitespace-nowrap{white-space:nowrap;}.break-all{word-break:break-all;}.border-2{border-width:2px;}.border-b{border-bottom-width:1px;}.border-transparent{border-color:transparent;}.border-b-\\$ud-border{border-bottom-color:var(--ud-border);}.rounded{border-radius:4px;}.rounded-full{border-radius:9999px;}.rounded-lg{border-radius:8px;}.rounded-md{border-radius:6px;}.bg-\\$ud-bg{background-color:var(--ud-bg);}.bg-\\$ud-bg-secondary{background-color:var(--ud-bg-secondary);}.bg-gray-200{--un-bg-opacity:1;background-color:rgba(229,231,235,var(--un-bg-opacity));}.bg-indigo-500{--un-bg-opacity:1;background-color:rgba(99,102,241,var(--un-bg-opacity));}.bg-indigo-600{--un-bg-opacity:1;background-color:rgba(79,70,229,var(--un-bg-opacity));}.bg-white{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.hover\\:bg-\\$ud-bg-hover:hover{background-color:var(--ud-bg-hover);}.p-1{padding:4px;}.p-2{padding:8px;}.p-3{padding:12px;}.p-4{padding:16px;}.px-2{padding-left:8px;padding-right:8px;}.px-3{padding-left:12px;padding-right:12px;}.px-4{padding-left:16px;padding-right:16px;}.py-0\\.25{padding-top:1px;padding-bottom:1px;}.py-2{padding-top:8px;padding-bottom:8px;}.pl-3{padding-left:12px;}.pl-4{padding-left:16px;}.pr-3{padding-right:12px;}.pr-4{padding-right:16px;}.text-center{text-align:center;}.text-left{text-align:left;}.text-right{text-align:right;}.align-middle{vertical-align:middle;}.text-sm{font-size:14px;line-height:20px;}.text-xs{font-size:12px;line-height:16px;}.font-medium{font-weight:500;}.font-semibold{font-weight:600;}.hover\\:text-indigo-900:hover{--un-text-opacity:1;color:rgba(49,46,129,var(--un-text-opacity));}.text-\\$ud-text{color:var(--ud-text);}.text-\\$ud-text-secondary{color:var(--ud-text-secondary);}.text-indigo-600{--un-text-opacity:1;color:rgba(79,70,229,var(--un-text-opacity));}.text-white{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}.underline{text-decoration-line:underline;}.underline-2{text-decoration-thickness:2px;}.underline-\\$ud-bg{-webkit-text-decoration-color:var(--ud-bg);text-decoration-color:var(--ud-bg);}.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.shadow-md{--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.shadow-sm{--un-shadow:var(--un-shadow-inset) 0 1px 2px 0 var(--un-shadow-color, rgba(0,0,0,0.05));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px;}.focus\\:ring-2:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.ring-0{--un-ring-width:0;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.ring-1{--un-ring-width:1px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);}.focus\\:ring-offset-2:focus{--un-ring-offset-width:2px;}.focus\\:ring-indigo-500:focus{--un-ring-opacity:1;--un-ring-color:rgba(99,102,241,var(--un-ring-opacity));}.ring-black{--un-ring-opacity:1;--un-ring-color:rgba(0,0,0,var(--un-ring-opacity));}.ring-opacity-5{--un-ring-opacity:0.05;}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}.duration-200{transition-duration:200ms;}.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);}.ease-out{transition-timing-function:cubic-bezier(0, 0, 0.2, 1);}`;
const reset = '/*\nPlease read: https://github.com/antfu/unocss/blob/main/packages/reset/tailwind-compat.md\n*/\n\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type=\'button\'],\n[type=\'reset\'],\n[type=\'submit\'] {\n -webkit-appearance: button; /* 1 */\n /*will affect the button style of most component libraries, so disable it*/\n /*https://github.com/unocss/unocss/issues/2127*/\n /*background-color: transparent; !* 2 *!*/\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n';
customElements.define(
"userjs-digger",
class extends HTMLElement {
constructor() {
super();
__publicField(this, "app");
const app = document.createElement("div");
const style2 = document.createElement("style");
style2.innerHTML = `${reset}${unocss}`;
const shadow = this.attachShadow({ mode: "open" });
shadow.appendChild(style2);
shadow.appendChild(app);
this.app = vue.createApp(_sfc_main);
this.app.provide("container", app);
this.app.mount(app);
}
}
);
const userDigger = document.createElement("userjs-digger");
document.body.append(userDigger);
})(Vue, psl);