@powerhousedao/connect 1.0.0-dev.244 → 1.0.0-dev.245
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/assets/{app-D3TxLTK-.css → app-76Vr3j5e.css} +19 -1
- package/dist/assets/{app-DR3WlBLu.js → app-BH-6rUAk.js} +337 -337
- package/dist/assets/{app-loader-CjrEwupY.css → app-loader-Bnp0H-wa.css} +16 -0
- package/dist/assets/{app-loader-CXe8k3Z6.js → app-loader-CQdXsdrs.js} +188 -194
- package/dist/assets/{ccip-DqQzZGts.js → ccip-DzlgrM-Q.js} +3 -3
- package/dist/assets/{content-C4uS9aKJ.js → content-CGSfY9bJ.js} +3 -3
- package/dist/assets/{index-Ka_SdIs9.js → index-BR7pEetO.js} +3 -3
- package/dist/assets/{index-BSwHlrXw.js → index-Boh2tg26.js} +4 -4
- package/dist/assets/{index-DXnKAS5B.js → index-Ck0OHqQ0.js} +3 -3
- package/dist/assets/{main.CwbMf_Nf.js → main.PwF6jbJu.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-YOX3ZAET.js → chunk-4AV4NYOH.js} +145 -159
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-P46ZMPJ3.js → chunk-GZM7UEXF.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-POMUCSTC.js → chunk-K62SYQYI.js} +22 -16
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-6AXML2S3.js → chunk-QVHWUIBE.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-4LZZ55AN.js → chunk-UIXXJKR2.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/index.js +5 -5
- package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
- package/dist/vite-envs.sh +1 -1
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-DzlgrM-Q.js","assets/main.PwF6jbJu.js","assets/app-loader-CQdXsdrs.js","assets/app-loader-Bnp0H-wa.css","assets/index-BR7pEetO.js","assets/style-D4JhTt_m.css","assets/index-Boh2tg26.js","assets/content-CGSfY9bJ.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __typeError = (msg) => {
|
|
4
4
|
throw TypeError(msg);
|
|
@@ -19,9 +19,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
var _focused, _cleanup, _setup, _a, _online, _cleanup2, _setup2, _b, _gcTimeout, _c, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _Query_instances, dispatch_fn, _d, _queries, _e2, _observers, _mutationCache, _retryer2, _Mutation_instances, dispatch_fn2, _f, _mutations, _scopes, _mutationId, _g, _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _h, _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _i;
|
|
22
|
-
import { _ as __vitePreload } from "./main.
|
|
22
|
+
import { _ as __vitePreload } from "./main.PwF6jbJu.js";
|
|
23
23
|
import { jsx as jsx$1, Fragment, jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as Icon, $ as getDefaultExportFromCjs, a0 as LOCAL, a1 as commonjsGlobal, a2 as PUBLIC, a3 as SWITCHBOARD, a4 as locationInfoByLocation, a5 as sharingTypeOptions, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as createZip, ac as logger$1, ad as LZString, ae as buildSignedOperation, af as getI18n, ag as getDefaults, ah as connectConfig, ai as hashDocumentStateForScope, aj as setErrorHandler, ak as driveDocumentModelModule, al as createBrowserDocumentDriveServer, am as hashKey$1, an as childLogger, ao as reducer$8, ap as isDocumentDrive, aq as generateAddNodeAction, ar as isFileNode, as as uploadDocumentOperations, at as updateFile, au as addFolder, av as isFolderNode, aw as deleteNode, ax as updateNode, ay as FILE, az as moveNode, aA as generateNodesCopy, aB as copyNode, aC as createState$1, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as generateUUID, aJ as PullResponderTransmitter, aK as addTrigger, aL as ReadDriveNotFoundError, aM as openUrl, aN as getNodeOptions, aO as DRIVE, aP as FOLDER, aQ as requestPublicDrive, aR as serviceWorkerManager, aS as packageJson, aT as t$1, aU as gql, aV as request } from "./app-loader-
|
|
24
|
+
import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as Icon, $ as getDefaultExportFromCjs, a0 as LOCAL, a1 as commonjsGlobal, a2 as PUBLIC, a3 as SWITCHBOARD, a4 as locationInfoByLocation, a5 as sharingTypeOptions, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as createZip, ac as logger$1, ad as LZString, ae as buildSignedOperation, af as getI18n, ag as getDefaults, ah as connectConfig, ai as hashDocumentStateForScope, aj as setErrorHandler, ak as driveDocumentModelModule, al as createBrowserDocumentDriveServer, am as hashKey$1, an as childLogger, ao as reducer$8, ap as isDocumentDrive, aq as generateAddNodeAction, ar as isFileNode, as as uploadDocumentOperations, at as updateFile, au as addFolder, av as isFolderNode, aw as deleteNode, ax as updateNode, ay as FILE, az as moveNode, aA as generateNodesCopy, aB as copyNode, aC as createState$1, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as generateUUID, aJ as PullResponderTransmitter, aK as addTrigger, aL as ReadDriveNotFoundError, aM as openUrl, aN as getNodeOptions, aO as DRIVE, aP as FOLDER, aQ as requestPublicDrive, aR as serviceWorkerManager, aS as packageJson, aT as t$1, aU as gql, aV as request } from "./app-loader-CQdXsdrs.js";
|
|
25
25
|
import * as React from "react";
|
|
26
26
|
import React__default, { useLayoutEffect, useEffect, useState, forwardRef, useRef, useCallback, useContext, useMemo, createContext, Component, Fragment as Fragment$1, createElement, useSyncExternalStore, useId as useId$1, isValidElement, cloneElement, Children, useReducer, useDebugValue, Suspense } from "react";
|
|
27
27
|
import "@powerhousedao/reactor-browser";
|
|
@@ -20571,7 +20571,7 @@ async function call(client2, args) {
|
|
|
20571
20571
|
} catch (err) {
|
|
20572
20572
|
const data2 = getRevertErrorData(err);
|
|
20573
20573
|
const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => {
|
|
20574
|
-
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-
|
|
20574
|
+
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-DzlgrM-Q.js");
|
|
20575
20575
|
return { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 };
|
|
20576
20576
|
}, true ? __vite__mapDeps([0,1,2,3]) : void 0);
|
|
20577
20577
|
if (client2.ccipRead !== false && (data2 == null ? void 0 : data2.slice(0, 10)) === offchainLookupSignature && to)
|
|
@@ -33784,334 +33784,6 @@ function About$1(props) {
|
|
|
33784
33784
|
const { packageJson: packageJson2, phCliVersion } = props;
|
|
33785
33785
|
return jsxs("div", { className: "bg-white p-3", children: [jsx$1("h2", { className: "font-semibold", children: "About" }), jsx$1("p", { className: "text-sm font-normal text-gray-600", children: "Connect is the hub for your most important documents and processes translated into software. Easily capture data in a structured way with Connect." }), jsx$1("div", { className: "my-4", children: jsx$1(DependencyVersions, { packageJson: packageJson2, phCliVersion }) })] });
|
|
33786
33786
|
}
|
|
33787
|
-
var U = 1, Y$1 = 0.9, H$1 = 0.8, J = 0.17, p$1 = 0.1, u$1 = 0.999, $$1 = 0.9999;
|
|
33788
|
-
var k$2 = 0.99, m$1 = /[\\\/_+.#"@\[\(\{&]/, B$2 = /[\\\/_+.#"@\[\(\{&]/g, K$1 = /[\s-]/, X = /[\s-]/g;
|
|
33789
|
-
function G(_2, C2, h2, P2, A2, f2, O2) {
|
|
33790
|
-
if (f2 === C2.length) return A2 === _2.length ? U : k$2;
|
|
33791
|
-
var T2 = `${A2},${f2}`;
|
|
33792
|
-
if (O2[T2] !== void 0) return O2[T2];
|
|
33793
|
-
for (var L2 = P2.charAt(f2), c2 = h2.indexOf(L2, A2), S2 = 0, E2, N2, R2, M2; c2 >= 0; ) E2 = G(_2, C2, h2, P2, c2 + 1, f2 + 1, O2), E2 > S2 && (c2 === A2 ? E2 *= U : m$1.test(_2.charAt(c2 - 1)) ? (E2 *= H$1, R2 = _2.slice(A2, c2 - 1).match(B$2), R2 && A2 > 0 && (E2 *= Math.pow(u$1, R2.length))) : K$1.test(_2.charAt(c2 - 1)) ? (E2 *= Y$1, M2 = _2.slice(A2, c2 - 1).match(X), M2 && A2 > 0 && (E2 *= Math.pow(u$1, M2.length))) : (E2 *= J, A2 > 0 && (E2 *= Math.pow(u$1, c2 - A2))), _2.charAt(c2) !== C2.charAt(f2) && (E2 *= $$1)), (E2 < p$1 && h2.charAt(c2 - 1) === P2.charAt(f2 + 1) || P2.charAt(f2 + 1) === P2.charAt(f2) && h2.charAt(c2 - 1) !== P2.charAt(f2)) && (N2 = G(_2, C2, h2, P2, c2 + 1, f2 + 2, O2), N2 * p$1 > E2 && (E2 = N2 * p$1)), E2 > S2 && (S2 = E2), c2 = h2.indexOf(L2, c2 + 1);
|
|
33794
|
-
return O2[T2] = S2, S2;
|
|
33795
|
-
}
|
|
33796
|
-
function D$1(_2) {
|
|
33797
|
-
return _2.toLowerCase().replace(X, " ");
|
|
33798
|
-
}
|
|
33799
|
-
function W(_2, C2, h2) {
|
|
33800
|
-
return _2 = h2 && h2.length > 0 ? `${_2 + " " + h2.join(" ")}` : _2, G(_2, C2, D$1(_2), D$1(C2), 0, 0, {});
|
|
33801
|
-
}
|
|
33802
|
-
var N$1 = '[cmdk-group=""]', Y = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T$1 = "data-value", Re = (r2, o, n2) => W(r2, o, n2), ue = React.createContext(void 0), K = () => React.useContext(ue), de = React.createContext(void 0), ee = () => React.useContext(de), fe = React.createContext(void 0), me = React.forwardRef((r2, o) => {
|
|
33803
|
-
let n2 = L$1(() => {
|
|
33804
|
-
var e2, a2;
|
|
33805
|
-
return { search: "", value: (a2 = (e2 = r2.value) != null ? e2 : r2.defaultValue) != null ? a2 : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
33806
|
-
}), u2 = L$1(() => /* @__PURE__ */ new Set()), c2 = L$1(() => /* @__PURE__ */ new Map()), d2 = L$1(() => /* @__PURE__ */ new Map()), f2 = L$1(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b2, children: m2, value: R2, onValueChange: x2, filter: C2, shouldFilter: S2, loop: A2, disablePointerSelection: ge = false, vimBindings: j = true, ...O2 } = r2, $2 = useId(), q2 = useId(), _2 = useId(), I2 = React.useRef(null), v2 = ke();
|
|
33807
|
-
k$1(() => {
|
|
33808
|
-
if (R2 !== void 0) {
|
|
33809
|
-
let e2 = R2.trim();
|
|
33810
|
-
n2.current.value = e2, E2.emit();
|
|
33811
|
-
}
|
|
33812
|
-
}, [R2]), k$1(() => {
|
|
33813
|
-
v2(6, ne);
|
|
33814
|
-
}, []);
|
|
33815
|
-
let E2 = React.useMemo(() => ({ subscribe: (e2) => (f2.current.add(e2), () => f2.current.delete(e2)), snapshot: () => n2.current, setState: (e2, a2, s2) => {
|
|
33816
|
-
var i2, l, g2, y2;
|
|
33817
|
-
if (!Object.is(n2.current[e2], a2)) {
|
|
33818
|
-
if (n2.current[e2] = a2, e2 === "search") J2(), z2(), v2(1, W2);
|
|
33819
|
-
else if (e2 === "value") {
|
|
33820
|
-
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
33821
|
-
let h2 = document.getElementById(_2);
|
|
33822
|
-
h2 ? h2.focus() : (i2 = document.getElementById($2)) == null || i2.focus();
|
|
33823
|
-
}
|
|
33824
|
-
if (v2(7, () => {
|
|
33825
|
-
var h2;
|
|
33826
|
-
n2.current.selectedItemId = (h2 = M2()) == null ? void 0 : h2.id, E2.emit();
|
|
33827
|
-
}), s2 || v2(5, ne), ((l = p2.current) == null ? void 0 : l.value) !== void 0) {
|
|
33828
|
-
let h2 = a2 != null ? a2 : "";
|
|
33829
|
-
(y2 = (g2 = p2.current).onValueChange) == null || y2.call(g2, h2);
|
|
33830
|
-
return;
|
|
33831
|
-
}
|
|
33832
|
-
}
|
|
33833
|
-
E2.emit();
|
|
33834
|
-
}
|
|
33835
|
-
}, emit: () => {
|
|
33836
|
-
f2.current.forEach((e2) => e2());
|
|
33837
|
-
} }), []), U2 = React.useMemo(() => ({ value: (e2, a2, s2) => {
|
|
33838
|
-
var i2;
|
|
33839
|
-
a2 !== ((i2 = d2.current.get(e2)) == null ? void 0 : i2.value) && (d2.current.set(e2, { value: a2, keywords: s2 }), n2.current.filtered.items.set(e2, te(a2, s2)), v2(2, () => {
|
|
33840
|
-
z2(), E2.emit();
|
|
33841
|
-
}));
|
|
33842
|
-
}, item: (e2, a2) => (u2.current.add(e2), a2 && (c2.current.has(a2) ? c2.current.get(a2).add(e2) : c2.current.set(a2, /* @__PURE__ */ new Set([e2]))), v2(3, () => {
|
|
33843
|
-
J2(), z2(), n2.current.value || W2(), E2.emit();
|
|
33844
|
-
}), () => {
|
|
33845
|
-
d2.current.delete(e2), u2.current.delete(e2), n2.current.filtered.items.delete(e2);
|
|
33846
|
-
let s2 = M2();
|
|
33847
|
-
v2(4, () => {
|
|
33848
|
-
J2(), (s2 == null ? void 0 : s2.getAttribute("id")) === e2 && W2(), E2.emit();
|
|
33849
|
-
});
|
|
33850
|
-
}), group: (e2) => (c2.current.has(e2) || c2.current.set(e2, /* @__PURE__ */ new Set()), () => {
|
|
33851
|
-
d2.current.delete(e2), c2.current.delete(e2);
|
|
33852
|
-
}), filter: () => p2.current.shouldFilter, label: b2 || r2["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _2, labelId: q2, listInnerRef: I2 }), []);
|
|
33853
|
-
function te(e2, a2) {
|
|
33854
|
-
var i2, l;
|
|
33855
|
-
let s2 = (l = (i2 = p2.current) == null ? void 0 : i2.filter) != null ? l : Re;
|
|
33856
|
-
return e2 ? s2(e2, n2.current.search, a2) : 0;
|
|
33857
|
-
}
|
|
33858
|
-
function z2() {
|
|
33859
|
-
if (!n2.current.search || p2.current.shouldFilter === false) return;
|
|
33860
|
-
let e2 = n2.current.filtered.items, a2 = [];
|
|
33861
|
-
n2.current.filtered.groups.forEach((i2) => {
|
|
33862
|
-
let l = c2.current.get(i2), g2 = 0;
|
|
33863
|
-
l.forEach((y2) => {
|
|
33864
|
-
let h2 = e2.get(y2);
|
|
33865
|
-
g2 = Math.max(h2, g2);
|
|
33866
|
-
}), a2.push([i2, g2]);
|
|
33867
|
-
});
|
|
33868
|
-
let s2 = I2.current;
|
|
33869
|
-
V().sort((i2, l) => {
|
|
33870
|
-
var h2, F;
|
|
33871
|
-
let g2 = i2.getAttribute("id"), y2 = l.getAttribute("id");
|
|
33872
|
-
return ((h2 = e2.get(y2)) != null ? h2 : 0) - ((F = e2.get(g2)) != null ? F : 0);
|
|
33873
|
-
}).forEach((i2) => {
|
|
33874
|
-
let l = i2.closest(Y);
|
|
33875
|
-
l ? l.appendChild(i2.parentElement === l ? i2 : i2.closest(`${Y} > *`)) : s2.appendChild(i2.parentElement === s2 ? i2 : i2.closest(`${Y} > *`));
|
|
33876
|
-
}), a2.sort((i2, l) => l[1] - i2[1]).forEach((i2) => {
|
|
33877
|
-
var g2;
|
|
33878
|
-
let l = (g2 = I2.current) == null ? void 0 : g2.querySelector(`${N$1}[${T$1}="${encodeURIComponent(i2[0])}"]`);
|
|
33879
|
-
l == null || l.parentElement.appendChild(l);
|
|
33880
|
-
});
|
|
33881
|
-
}
|
|
33882
|
-
function W2() {
|
|
33883
|
-
let e2 = V().find((s2) => s2.getAttribute("aria-disabled") !== "true"), a2 = e2 == null ? void 0 : e2.getAttribute(T$1);
|
|
33884
|
-
E2.setState("value", a2 || void 0);
|
|
33885
|
-
}
|
|
33886
|
-
function J2() {
|
|
33887
|
-
var a2, s2, i2, l;
|
|
33888
|
-
if (!n2.current.search || p2.current.shouldFilter === false) {
|
|
33889
|
-
n2.current.filtered.count = u2.current.size;
|
|
33890
|
-
return;
|
|
33891
|
-
}
|
|
33892
|
-
n2.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
33893
|
-
let e2 = 0;
|
|
33894
|
-
for (let g2 of u2.current) {
|
|
33895
|
-
let y2 = (s2 = (a2 = d2.current.get(g2)) == null ? void 0 : a2.value) != null ? s2 : "", h2 = (l = (i2 = d2.current.get(g2)) == null ? void 0 : i2.keywords) != null ? l : [], F = te(y2, h2);
|
|
33896
|
-
n2.current.filtered.items.set(g2, F), F > 0 && e2++;
|
|
33897
|
-
}
|
|
33898
|
-
for (let [g2, y2] of c2.current) for (let h2 of y2) if (n2.current.filtered.items.get(h2) > 0) {
|
|
33899
|
-
n2.current.filtered.groups.add(g2);
|
|
33900
|
-
break;
|
|
33901
|
-
}
|
|
33902
|
-
n2.current.filtered.count = e2;
|
|
33903
|
-
}
|
|
33904
|
-
function ne() {
|
|
33905
|
-
var a2, s2, i2;
|
|
33906
|
-
let e2 = M2();
|
|
33907
|
-
e2 && (((a2 = e2.parentElement) == null ? void 0 : a2.firstChild) === e2 && ((i2 = (s2 = e2.closest(N$1)) == null ? void 0 : s2.querySelector(be)) == null || i2.scrollIntoView({ block: "nearest" })), e2.scrollIntoView({ block: "nearest" }));
|
|
33908
|
-
}
|
|
33909
|
-
function M2() {
|
|
33910
|
-
var e2;
|
|
33911
|
-
return (e2 = I2.current) == null ? void 0 : e2.querySelector(`${le}[aria-selected="true"]`);
|
|
33912
|
-
}
|
|
33913
|
-
function V() {
|
|
33914
|
-
var e2;
|
|
33915
|
-
return Array.from(((e2 = I2.current) == null ? void 0 : e2.querySelectorAll(ce)) || []);
|
|
33916
|
-
}
|
|
33917
|
-
function X2(e2) {
|
|
33918
|
-
let s2 = V()[e2];
|
|
33919
|
-
s2 && E2.setState("value", s2.getAttribute(T$1));
|
|
33920
|
-
}
|
|
33921
|
-
function Q2(e2) {
|
|
33922
|
-
var g2;
|
|
33923
|
-
let a2 = M2(), s2 = V(), i2 = s2.findIndex((y2) => y2 === a2), l = s2[i2 + e2];
|
|
33924
|
-
(g2 = p2.current) != null && g2.loop && (l = i2 + e2 < 0 ? s2[s2.length - 1] : i2 + e2 === s2.length ? s2[0] : s2[i2 + e2]), l && E2.setState("value", l.getAttribute(T$1));
|
|
33925
|
-
}
|
|
33926
|
-
function re(e2) {
|
|
33927
|
-
let a2 = M2(), s2 = a2 == null ? void 0 : a2.closest(N$1), i2;
|
|
33928
|
-
for (; s2 && !i2; ) s2 = e2 > 0 ? we(s2, N$1) : De(s2, N$1), i2 = s2 == null ? void 0 : s2.querySelector(ce);
|
|
33929
|
-
i2 ? E2.setState("value", i2.getAttribute(T$1)) : Q2(e2);
|
|
33930
|
-
}
|
|
33931
|
-
let oe = () => X2(V().length - 1), ie = (e2) => {
|
|
33932
|
-
e2.preventDefault(), e2.metaKey ? oe() : e2.altKey ? re(1) : Q2(1);
|
|
33933
|
-
}, se = (e2) => {
|
|
33934
|
-
e2.preventDefault(), e2.metaKey ? X2(0) : e2.altKey ? re(-1) : Q2(-1);
|
|
33935
|
-
};
|
|
33936
|
-
return React.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O2, "cmdk-root": "", onKeyDown: (e2) => {
|
|
33937
|
-
var s2;
|
|
33938
|
-
(s2 = O2.onKeyDown) == null || s2.call(O2, e2);
|
|
33939
|
-
let a2 = e2.nativeEvent.isComposing || e2.keyCode === 229;
|
|
33940
|
-
if (!(e2.defaultPrevented || a2)) switch (e2.key) {
|
|
33941
|
-
case "n":
|
|
33942
|
-
case "j": {
|
|
33943
|
-
j && e2.ctrlKey && ie(e2);
|
|
33944
|
-
break;
|
|
33945
|
-
}
|
|
33946
|
-
case "ArrowDown": {
|
|
33947
|
-
ie(e2);
|
|
33948
|
-
break;
|
|
33949
|
-
}
|
|
33950
|
-
case "p":
|
|
33951
|
-
case "k": {
|
|
33952
|
-
j && e2.ctrlKey && se(e2);
|
|
33953
|
-
break;
|
|
33954
|
-
}
|
|
33955
|
-
case "ArrowUp": {
|
|
33956
|
-
se(e2);
|
|
33957
|
-
break;
|
|
33958
|
-
}
|
|
33959
|
-
case "Home": {
|
|
33960
|
-
e2.preventDefault(), X2(0);
|
|
33961
|
-
break;
|
|
33962
|
-
}
|
|
33963
|
-
case "End": {
|
|
33964
|
-
e2.preventDefault(), oe();
|
|
33965
|
-
break;
|
|
33966
|
-
}
|
|
33967
|
-
case "Enter": {
|
|
33968
|
-
e2.preventDefault();
|
|
33969
|
-
let i2 = M2();
|
|
33970
|
-
if (i2) {
|
|
33971
|
-
let l = new Event(Z);
|
|
33972
|
-
i2.dispatchEvent(l);
|
|
33973
|
-
}
|
|
33974
|
-
}
|
|
33975
|
-
}
|
|
33976
|
-
} }, React.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b2), B$1(r2, (e2) => React.createElement(de.Provider, { value: E2 }, React.createElement(ue.Provider, { value: U2 }, e2))));
|
|
33977
|
-
}), he = React.forwardRef((r2, o) => {
|
|
33978
|
-
var _2, I2;
|
|
33979
|
-
let n2 = useId(), u2 = React.useRef(null), c2 = React.useContext(fe), d2 = K(), f2 = pe(r2), p2 = (I2 = (_2 = f2.current) == null ? void 0 : _2.forceMount) != null ? I2 : c2 == null ? void 0 : c2.forceMount;
|
|
33980
|
-
k$1(() => {
|
|
33981
|
-
if (!p2) return d2.item(n2, c2 == null ? void 0 : c2.id);
|
|
33982
|
-
}, [p2]);
|
|
33983
|
-
let b2 = ve(n2, u2, [r2.value, r2.children, u2], r2.keywords), m2 = ee(), R2 = P$1((v2) => v2.value && v2.value === b2.current), x2 = P$1((v2) => p2 || d2.filter() === false ? true : v2.search ? v2.filtered.items.get(n2) > 0 : true);
|
|
33984
|
-
React.useEffect(() => {
|
|
33985
|
-
let v2 = u2.current;
|
|
33986
|
-
if (!(!v2 || r2.disabled)) return v2.addEventListener(Z, C2), () => v2.removeEventListener(Z, C2);
|
|
33987
|
-
}, [x2, r2.onSelect, r2.disabled]);
|
|
33988
|
-
function C2() {
|
|
33989
|
-
var v2, E2;
|
|
33990
|
-
S2(), (E2 = (v2 = f2.current).onSelect) == null || E2.call(v2, b2.current);
|
|
33991
|
-
}
|
|
33992
|
-
function S2() {
|
|
33993
|
-
m2.setState("value", b2.current, true);
|
|
33994
|
-
}
|
|
33995
|
-
if (!x2) return null;
|
|
33996
|
-
let { disabled: A2, value: ge, onSelect: j, forceMount: O2, keywords: $2, ...q2 } = r2;
|
|
33997
|
-
return React.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q2, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A2, "aria-selected": !!R2, "data-disabled": !!A2, "data-selected": !!R2, onPointerMove: A2 || d2.getDisablePointerSelection() ? void 0 : S2, onClick: A2 ? void 0 : C2 }, r2.children);
|
|
33998
|
-
}), Ee = React.forwardRef((r2, o) => {
|
|
33999
|
-
let { heading: n2, children: u2, forceMount: c2, ...d2 } = r2, f2 = useId(), p2 = React.useRef(null), b2 = React.useRef(null), m2 = useId(), R2 = K(), x2 = P$1((S2) => c2 || R2.filter() === false ? true : S2.search ? S2.filtered.groups.has(f2) : true);
|
|
34000
|
-
k$1(() => R2.group(f2), []), ve(f2, p2, [r2.value, r2.heading, b2]);
|
|
34001
|
-
let C2 = React.useMemo(() => ({ id: f2, forceMount: c2 }), [c2]);
|
|
34002
|
-
return React.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d2, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B$1(r2, (S2) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C2 }, S2))));
|
|
34003
|
-
}), ye = React.forwardRef((r2, o) => {
|
|
34004
|
-
let { alwaysRender: n2, ...u2 } = r2, c2 = React.useRef(null), d2 = P$1((f2) => !f2.search);
|
|
34005
|
-
return !n2 && !d2 ? null : React.createElement(Primitive.div, { ref: composeRefs(c2, o), ...u2, "cmdk-separator": "", role: "separator" });
|
|
34006
|
-
}), Se = React.forwardRef((r2, o) => {
|
|
34007
|
-
let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d2 = ee(), f2 = P$1((m2) => m2.search), p2 = P$1((m2) => m2.selectedItemId), b2 = K();
|
|
34008
|
-
return React.useEffect(() => {
|
|
34009
|
-
r2.value != null && d2.setState("search", r2.value);
|
|
34010
|
-
}, [r2.value]), React.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b2.listId, "aria-labelledby": b2.labelId, "aria-activedescendant": p2, id: b2.inputId, type: "text", value: c2 ? r2.value : f2, onChange: (m2) => {
|
|
34011
|
-
c2 || d2.setState("search", m2.target.value), n2 == null || n2(m2.target.value);
|
|
34012
|
-
} });
|
|
34013
|
-
}), Ce = React.forwardRef((r2, o) => {
|
|
34014
|
-
let { children: n2, label: u2 = "Suggestions", ...c2 } = r2, d2 = React.useRef(null), f2 = React.useRef(null), p2 = P$1((m2) => m2.selectedItemId), b2 = K();
|
|
34015
|
-
return React.useEffect(() => {
|
|
34016
|
-
if (f2.current && d2.current) {
|
|
34017
|
-
let m2 = f2.current, R2 = d2.current, x2, C2 = new ResizeObserver(() => {
|
|
34018
|
-
x2 = requestAnimationFrame(() => {
|
|
34019
|
-
let S2 = m2.offsetHeight;
|
|
34020
|
-
R2.style.setProperty("--cmdk-list-height", S2.toFixed(1) + "px");
|
|
34021
|
-
});
|
|
34022
|
-
});
|
|
34023
|
-
return C2.observe(m2), () => {
|
|
34024
|
-
cancelAnimationFrame(x2), C2.unobserve(m2);
|
|
34025
|
-
};
|
|
34026
|
-
}
|
|
34027
|
-
}, []), React.createElement(Primitive.div, { ref: composeRefs(d2, o), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B$1(r2, (m2) => React.createElement("div", { ref: composeRefs(f2, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
34028
|
-
}), xe = React.forwardRef((r2, o) => {
|
|
34029
|
-
let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d2, container: f2, ...p2 } = r2;
|
|
34030
|
-
return React.createElement(Root$2, { open: n2, onOpenChange: u2 }, React.createElement(Portal$1, { container: f2 }, React.createElement(Overlay, { "cmdk-overlay": "", className: c2 }), React.createElement(Content$3, { "aria-label": r2.label, "cmdk-dialog": "", className: d2 }, React.createElement(me, { ref: o, ...p2 }))));
|
|
34031
|
-
}), Ie = React.forwardRef((r2, o) => P$1((u2) => u2.filtered.count === 0) ? React.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null), Pe = React.forwardRef((r2, o) => {
|
|
34032
|
-
let { progress: n2, children: u2, label: c2 = "Loading...", ...d2 } = r2;
|
|
34033
|
-
return React.createElement(Primitive.div, { ref: o, ...d2, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n2, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c2 }, B$1(r2, (f2) => React.createElement("div", { "aria-hidden": true }, f2)));
|
|
34034
|
-
}), _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
|
|
34035
|
-
function we(r2, o) {
|
|
34036
|
-
let n2 = r2.nextElementSibling;
|
|
34037
|
-
for (; n2; ) {
|
|
34038
|
-
if (n2.matches(o)) return n2;
|
|
34039
|
-
n2 = n2.nextElementSibling;
|
|
34040
|
-
}
|
|
34041
|
-
}
|
|
34042
|
-
function De(r2, o) {
|
|
34043
|
-
let n2 = r2.previousElementSibling;
|
|
34044
|
-
for (; n2; ) {
|
|
34045
|
-
if (n2.matches(o)) return n2;
|
|
34046
|
-
n2 = n2.previousElementSibling;
|
|
34047
|
-
}
|
|
34048
|
-
}
|
|
34049
|
-
function pe(r2) {
|
|
34050
|
-
let o = React.useRef(r2);
|
|
34051
|
-
return k$1(() => {
|
|
34052
|
-
o.current = r2;
|
|
34053
|
-
}), o;
|
|
34054
|
-
}
|
|
34055
|
-
var k$1 = typeof window == "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
34056
|
-
function L$1(r2) {
|
|
34057
|
-
let o = React.useRef();
|
|
34058
|
-
return o.current === void 0 && (o.current = r2()), o;
|
|
34059
|
-
}
|
|
34060
|
-
function P$1(r2) {
|
|
34061
|
-
let o = ee(), n2 = () => r2(o.snapshot());
|
|
34062
|
-
return React.useSyncExternalStore(o.subscribe, n2, n2);
|
|
34063
|
-
}
|
|
34064
|
-
function ve(r2, o, n2, u2 = []) {
|
|
34065
|
-
let c2 = React.useRef(), d2 = K();
|
|
34066
|
-
return k$1(() => {
|
|
34067
|
-
var b2;
|
|
34068
|
-
let f2 = (() => {
|
|
34069
|
-
var m2;
|
|
34070
|
-
for (let R2 of n2) {
|
|
34071
|
-
if (typeof R2 == "string") return R2.trim();
|
|
34072
|
-
if (typeof R2 == "object" && "current" in R2) return R2.current ? (m2 = R2.current.textContent) == null ? void 0 : m2.trim() : c2.current;
|
|
34073
|
-
}
|
|
34074
|
-
})(), p2 = u2.map((m2) => m2.trim());
|
|
34075
|
-
d2.value(r2, f2, p2), (b2 = o.current) == null || b2.setAttribute(T$1, f2), c2.current = f2;
|
|
34076
|
-
}), c2;
|
|
34077
|
-
}
|
|
34078
|
-
var ke = () => {
|
|
34079
|
-
let [r2, o] = React.useState(), n2 = L$1(() => /* @__PURE__ */ new Map());
|
|
34080
|
-
return k$1(() => {
|
|
34081
|
-
n2.current.forEach((u2) => u2()), n2.current = /* @__PURE__ */ new Map();
|
|
34082
|
-
}, [r2]), (u2, c2) => {
|
|
34083
|
-
n2.current.set(u2, c2), o({});
|
|
34084
|
-
};
|
|
34085
|
-
};
|
|
34086
|
-
function Me(r2) {
|
|
34087
|
-
let o = r2.type;
|
|
34088
|
-
return typeof o == "function" ? o(r2.props) : "render" in o ? o.render(r2.props) : r2;
|
|
34089
|
-
}
|
|
34090
|
-
function B$1({ asChild: r2, children: o }, n2) {
|
|
34091
|
-
return r2 && React.isValidElement(o) ? React.cloneElement(Me(o), { ref: o.ref }, n2(o.props.children)) : n2(o);
|
|
34092
|
-
}
|
|
34093
|
-
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
34094
|
-
const Command = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e, { ref, className: cn("flex size-full flex-col rounded-md [&_[cmdk-label]]:hidden", className), ...props }));
|
|
34095
|
-
Command.displayName = _e.displayName;
|
|
34096
|
-
const CommandInput = React__default.forwardRef(({ wrapperClassName, className, ...props }, ref) => jsxs("div", { className: cn("group relative flex items-center border-b", "border-b-gray-300 dark:border-b-gray-900", "hover:border-b-gray-300 dark:hover:border-b-gray-800", "hover:bg-gray-100 dark:hover:bg-gray-900", "focus-within:border-b-gray-300 dark:focus-within:border-b-gray-800", "focus-within:bg-gray-100 dark:focus-within:bg-gray-900", wrapperClassName), "cmdk-input-wrapper": "", children: [jsx$1(Icon, { name: "Search", size: 16, className: cn("pointer-events-none absolute left-2 top-3.5 text-gray-500 dark:text-gray-700", "group-hover:text-gray-700 dark:group-hover:text-gray-500", "group-focus-within:!text-gray-900 dark:group-focus-within:!text-gray-50") }), jsx$1(_e.Input, { ref, className: cn("flex w-full bg-transparent pb-2 pl-8 pr-3 pt-3 text-[14px] font-normal leading-5 outline-none", "placeholder:text-gray-500 dark:placeholder:text-gray-700", "group-hover:placeholder:text-gray-700 dark:group-hover:placeholder:text-gray-500", "group-focus-within:placeholder:!text-gray-700 dark:group-focus-within:placeholder:!text-gray-300", "disabled:cursor-not-allowed", className), ...props })] }));
|
|
34097
|
-
CommandInput.displayName = _e.Input.displayName;
|
|
34098
|
-
const CommandList = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e.List, { ref, className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", "focus:outline-none", "scrollbar-thin scrollbar-gutter-stable", "scrollbar-track-transparent", "scrollbar-thumb-gray-300 hover:scrollbar-thumb-gray-300", "dark:scrollbar-thumb-charcoal-700 dark:hover:scrollbar-thumb-charcoal-700", "scrollbar-thumb-rounded-md", className), ...props }));
|
|
34099
|
-
CommandList.displayName = _e.List.displayName;
|
|
34100
|
-
const CommandLoading = React__default.forwardRef((props, ref) => jsx$1(_e.Loading, { ref, ...props }));
|
|
34101
|
-
CommandLoading.displayName = _e.Loading.displayName;
|
|
34102
|
-
const CommandEmpty = React__default.forwardRef((props, ref) => jsx$1(_e.Empty, { ref, ...props }));
|
|
34103
|
-
CommandEmpty.displayName = _e.Empty.displayName;
|
|
34104
|
-
const CommandGroup = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e.Group, { ref, className: cn("overflow-hidden px-0.5 py-1", "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className), ...props }));
|
|
34105
|
-
CommandGroup.displayName = _e.Group.displayName;
|
|
34106
|
-
const CommandItem = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e.Item, { ref, className: cn("relative flex select-none items-center justify-between", "h-8 gap-2 rounded-md py-1.5 pl-1.5 pr-2.5", "text-[14px] leading-4 outline-none", "border-y-2 border-white dark:border-slate-600", "data-[disabled=true]:pointer-events-none", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props }));
|
|
34107
|
-
CommandItem.displayName = _e.Item.displayName;
|
|
34108
|
-
const FormDescription = ({ children, as, className }) => {
|
|
34109
|
-
const Component2 = as ?? "p";
|
|
34110
|
-
return jsx$1(Component2, { className: cn("font-sans text-sm font-normal leading-5 text-gray-600 dark:text-gray-500", className), children });
|
|
34111
|
-
};
|
|
34112
|
-
const FormGroup = ({ children }) => {
|
|
34113
|
-
return jsx$1("div", { className: "flex flex-col gap-2", children });
|
|
34114
|
-
};
|
|
34115
33787
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
34116
33788
|
createPopperScope
|
|
34117
33789
|
]);
|
|
@@ -34663,6 +34335,334 @@ const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
|
34663
34335
|
return jsx$1("input", { type, className: cn(inputBaseStyles, className), ref, ...props });
|
|
34664
34336
|
});
|
|
34665
34337
|
Input.displayName = "Input";
|
|
34338
|
+
const FormDescription = ({ children, as, className }) => {
|
|
34339
|
+
const Component2 = as ?? "p";
|
|
34340
|
+
return jsx$1(Component2, { className: cn("font-sans text-sm font-normal leading-5 text-gray-600 dark:text-gray-500", className), children });
|
|
34341
|
+
};
|
|
34342
|
+
const FormGroup = ({ children }) => {
|
|
34343
|
+
return jsx$1("div", { className: "flex flex-col gap-2", children });
|
|
34344
|
+
};
|
|
34345
|
+
var U = 1, Y$1 = 0.9, H$1 = 0.8, J = 0.17, p$1 = 0.1, u$1 = 0.999, $$1 = 0.9999;
|
|
34346
|
+
var k$2 = 0.99, m$1 = /[\\\/_+.#"@\[\(\{&]/, B$2 = /[\\\/_+.#"@\[\(\{&]/g, K$1 = /[\s-]/, X = /[\s-]/g;
|
|
34347
|
+
function G(_2, C2, h2, P2, A2, f2, O2) {
|
|
34348
|
+
if (f2 === C2.length) return A2 === _2.length ? U : k$2;
|
|
34349
|
+
var T2 = `${A2},${f2}`;
|
|
34350
|
+
if (O2[T2] !== void 0) return O2[T2];
|
|
34351
|
+
for (var L2 = P2.charAt(f2), c2 = h2.indexOf(L2, A2), S2 = 0, E2, N2, R2, M2; c2 >= 0; ) E2 = G(_2, C2, h2, P2, c2 + 1, f2 + 1, O2), E2 > S2 && (c2 === A2 ? E2 *= U : m$1.test(_2.charAt(c2 - 1)) ? (E2 *= H$1, R2 = _2.slice(A2, c2 - 1).match(B$2), R2 && A2 > 0 && (E2 *= Math.pow(u$1, R2.length))) : K$1.test(_2.charAt(c2 - 1)) ? (E2 *= Y$1, M2 = _2.slice(A2, c2 - 1).match(X), M2 && A2 > 0 && (E2 *= Math.pow(u$1, M2.length))) : (E2 *= J, A2 > 0 && (E2 *= Math.pow(u$1, c2 - A2))), _2.charAt(c2) !== C2.charAt(f2) && (E2 *= $$1)), (E2 < p$1 && h2.charAt(c2 - 1) === P2.charAt(f2 + 1) || P2.charAt(f2 + 1) === P2.charAt(f2) && h2.charAt(c2 - 1) !== P2.charAt(f2)) && (N2 = G(_2, C2, h2, P2, c2 + 1, f2 + 2, O2), N2 * p$1 > E2 && (E2 = N2 * p$1)), E2 > S2 && (S2 = E2), c2 = h2.indexOf(L2, c2 + 1);
|
|
34352
|
+
return O2[T2] = S2, S2;
|
|
34353
|
+
}
|
|
34354
|
+
function D$1(_2) {
|
|
34355
|
+
return _2.toLowerCase().replace(X, " ");
|
|
34356
|
+
}
|
|
34357
|
+
function W(_2, C2, h2) {
|
|
34358
|
+
return _2 = h2 && h2.length > 0 ? `${_2 + " " + h2.join(" ")}` : _2, G(_2, C2, D$1(_2), D$1(C2), 0, 0, {});
|
|
34359
|
+
}
|
|
34360
|
+
var N$1 = '[cmdk-group=""]', Y = '[cmdk-group-items=""]', be = '[cmdk-group-heading=""]', le = '[cmdk-item=""]', ce = `${le}:not([aria-disabled="true"])`, Z = "cmdk-item-select", T$1 = "data-value", Re = (r2, o, n2) => W(r2, o, n2), ue = React.createContext(void 0), K = () => React.useContext(ue), de = React.createContext(void 0), ee = () => React.useContext(de), fe = React.createContext(void 0), me = React.forwardRef((r2, o) => {
|
|
34361
|
+
let n2 = L$1(() => {
|
|
34362
|
+
var e2, a2;
|
|
34363
|
+
return { search: "", value: (a2 = (e2 = r2.value) != null ? e2 : r2.defaultValue) != null ? a2 : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
34364
|
+
}), u2 = L$1(() => /* @__PURE__ */ new Set()), c2 = L$1(() => /* @__PURE__ */ new Map()), d2 = L$1(() => /* @__PURE__ */ new Map()), f2 = L$1(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b2, children: m2, value: R2, onValueChange: x2, filter: C2, shouldFilter: S2, loop: A2, disablePointerSelection: ge = false, vimBindings: j = true, ...O2 } = r2, $2 = useId(), q2 = useId(), _2 = useId(), I2 = React.useRef(null), v2 = ke();
|
|
34365
|
+
k$1(() => {
|
|
34366
|
+
if (R2 !== void 0) {
|
|
34367
|
+
let e2 = R2.trim();
|
|
34368
|
+
n2.current.value = e2, E2.emit();
|
|
34369
|
+
}
|
|
34370
|
+
}, [R2]), k$1(() => {
|
|
34371
|
+
v2(6, ne);
|
|
34372
|
+
}, []);
|
|
34373
|
+
let E2 = React.useMemo(() => ({ subscribe: (e2) => (f2.current.add(e2), () => f2.current.delete(e2)), snapshot: () => n2.current, setState: (e2, a2, s2) => {
|
|
34374
|
+
var i2, l, g2, y2;
|
|
34375
|
+
if (!Object.is(n2.current[e2], a2)) {
|
|
34376
|
+
if (n2.current[e2] = a2, e2 === "search") J2(), z2(), v2(1, W2);
|
|
34377
|
+
else if (e2 === "value") {
|
|
34378
|
+
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
34379
|
+
let h2 = document.getElementById(_2);
|
|
34380
|
+
h2 ? h2.focus() : (i2 = document.getElementById($2)) == null || i2.focus();
|
|
34381
|
+
}
|
|
34382
|
+
if (v2(7, () => {
|
|
34383
|
+
var h2;
|
|
34384
|
+
n2.current.selectedItemId = (h2 = M2()) == null ? void 0 : h2.id, E2.emit();
|
|
34385
|
+
}), s2 || v2(5, ne), ((l = p2.current) == null ? void 0 : l.value) !== void 0) {
|
|
34386
|
+
let h2 = a2 != null ? a2 : "";
|
|
34387
|
+
(y2 = (g2 = p2.current).onValueChange) == null || y2.call(g2, h2);
|
|
34388
|
+
return;
|
|
34389
|
+
}
|
|
34390
|
+
}
|
|
34391
|
+
E2.emit();
|
|
34392
|
+
}
|
|
34393
|
+
}, emit: () => {
|
|
34394
|
+
f2.current.forEach((e2) => e2());
|
|
34395
|
+
} }), []), U2 = React.useMemo(() => ({ value: (e2, a2, s2) => {
|
|
34396
|
+
var i2;
|
|
34397
|
+
a2 !== ((i2 = d2.current.get(e2)) == null ? void 0 : i2.value) && (d2.current.set(e2, { value: a2, keywords: s2 }), n2.current.filtered.items.set(e2, te(a2, s2)), v2(2, () => {
|
|
34398
|
+
z2(), E2.emit();
|
|
34399
|
+
}));
|
|
34400
|
+
}, item: (e2, a2) => (u2.current.add(e2), a2 && (c2.current.has(a2) ? c2.current.get(a2).add(e2) : c2.current.set(a2, /* @__PURE__ */ new Set([e2]))), v2(3, () => {
|
|
34401
|
+
J2(), z2(), n2.current.value || W2(), E2.emit();
|
|
34402
|
+
}), () => {
|
|
34403
|
+
d2.current.delete(e2), u2.current.delete(e2), n2.current.filtered.items.delete(e2);
|
|
34404
|
+
let s2 = M2();
|
|
34405
|
+
v2(4, () => {
|
|
34406
|
+
J2(), (s2 == null ? void 0 : s2.getAttribute("id")) === e2 && W2(), E2.emit();
|
|
34407
|
+
});
|
|
34408
|
+
}), group: (e2) => (c2.current.has(e2) || c2.current.set(e2, /* @__PURE__ */ new Set()), () => {
|
|
34409
|
+
d2.current.delete(e2), c2.current.delete(e2);
|
|
34410
|
+
}), filter: () => p2.current.shouldFilter, label: b2 || r2["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _2, labelId: q2, listInnerRef: I2 }), []);
|
|
34411
|
+
function te(e2, a2) {
|
|
34412
|
+
var i2, l;
|
|
34413
|
+
let s2 = (l = (i2 = p2.current) == null ? void 0 : i2.filter) != null ? l : Re;
|
|
34414
|
+
return e2 ? s2(e2, n2.current.search, a2) : 0;
|
|
34415
|
+
}
|
|
34416
|
+
function z2() {
|
|
34417
|
+
if (!n2.current.search || p2.current.shouldFilter === false) return;
|
|
34418
|
+
let e2 = n2.current.filtered.items, a2 = [];
|
|
34419
|
+
n2.current.filtered.groups.forEach((i2) => {
|
|
34420
|
+
let l = c2.current.get(i2), g2 = 0;
|
|
34421
|
+
l.forEach((y2) => {
|
|
34422
|
+
let h2 = e2.get(y2);
|
|
34423
|
+
g2 = Math.max(h2, g2);
|
|
34424
|
+
}), a2.push([i2, g2]);
|
|
34425
|
+
});
|
|
34426
|
+
let s2 = I2.current;
|
|
34427
|
+
V().sort((i2, l) => {
|
|
34428
|
+
var h2, F;
|
|
34429
|
+
let g2 = i2.getAttribute("id"), y2 = l.getAttribute("id");
|
|
34430
|
+
return ((h2 = e2.get(y2)) != null ? h2 : 0) - ((F = e2.get(g2)) != null ? F : 0);
|
|
34431
|
+
}).forEach((i2) => {
|
|
34432
|
+
let l = i2.closest(Y);
|
|
34433
|
+
l ? l.appendChild(i2.parentElement === l ? i2 : i2.closest(`${Y} > *`)) : s2.appendChild(i2.parentElement === s2 ? i2 : i2.closest(`${Y} > *`));
|
|
34434
|
+
}), a2.sort((i2, l) => l[1] - i2[1]).forEach((i2) => {
|
|
34435
|
+
var g2;
|
|
34436
|
+
let l = (g2 = I2.current) == null ? void 0 : g2.querySelector(`${N$1}[${T$1}="${encodeURIComponent(i2[0])}"]`);
|
|
34437
|
+
l == null || l.parentElement.appendChild(l);
|
|
34438
|
+
});
|
|
34439
|
+
}
|
|
34440
|
+
function W2() {
|
|
34441
|
+
let e2 = V().find((s2) => s2.getAttribute("aria-disabled") !== "true"), a2 = e2 == null ? void 0 : e2.getAttribute(T$1);
|
|
34442
|
+
E2.setState("value", a2 || void 0);
|
|
34443
|
+
}
|
|
34444
|
+
function J2() {
|
|
34445
|
+
var a2, s2, i2, l;
|
|
34446
|
+
if (!n2.current.search || p2.current.shouldFilter === false) {
|
|
34447
|
+
n2.current.filtered.count = u2.current.size;
|
|
34448
|
+
return;
|
|
34449
|
+
}
|
|
34450
|
+
n2.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
34451
|
+
let e2 = 0;
|
|
34452
|
+
for (let g2 of u2.current) {
|
|
34453
|
+
let y2 = (s2 = (a2 = d2.current.get(g2)) == null ? void 0 : a2.value) != null ? s2 : "", h2 = (l = (i2 = d2.current.get(g2)) == null ? void 0 : i2.keywords) != null ? l : [], F = te(y2, h2);
|
|
34454
|
+
n2.current.filtered.items.set(g2, F), F > 0 && e2++;
|
|
34455
|
+
}
|
|
34456
|
+
for (let [g2, y2] of c2.current) for (let h2 of y2) if (n2.current.filtered.items.get(h2) > 0) {
|
|
34457
|
+
n2.current.filtered.groups.add(g2);
|
|
34458
|
+
break;
|
|
34459
|
+
}
|
|
34460
|
+
n2.current.filtered.count = e2;
|
|
34461
|
+
}
|
|
34462
|
+
function ne() {
|
|
34463
|
+
var a2, s2, i2;
|
|
34464
|
+
let e2 = M2();
|
|
34465
|
+
e2 && (((a2 = e2.parentElement) == null ? void 0 : a2.firstChild) === e2 && ((i2 = (s2 = e2.closest(N$1)) == null ? void 0 : s2.querySelector(be)) == null || i2.scrollIntoView({ block: "nearest" })), e2.scrollIntoView({ block: "nearest" }));
|
|
34466
|
+
}
|
|
34467
|
+
function M2() {
|
|
34468
|
+
var e2;
|
|
34469
|
+
return (e2 = I2.current) == null ? void 0 : e2.querySelector(`${le}[aria-selected="true"]`);
|
|
34470
|
+
}
|
|
34471
|
+
function V() {
|
|
34472
|
+
var e2;
|
|
34473
|
+
return Array.from(((e2 = I2.current) == null ? void 0 : e2.querySelectorAll(ce)) || []);
|
|
34474
|
+
}
|
|
34475
|
+
function X2(e2) {
|
|
34476
|
+
let s2 = V()[e2];
|
|
34477
|
+
s2 && E2.setState("value", s2.getAttribute(T$1));
|
|
34478
|
+
}
|
|
34479
|
+
function Q2(e2) {
|
|
34480
|
+
var g2;
|
|
34481
|
+
let a2 = M2(), s2 = V(), i2 = s2.findIndex((y2) => y2 === a2), l = s2[i2 + e2];
|
|
34482
|
+
(g2 = p2.current) != null && g2.loop && (l = i2 + e2 < 0 ? s2[s2.length - 1] : i2 + e2 === s2.length ? s2[0] : s2[i2 + e2]), l && E2.setState("value", l.getAttribute(T$1));
|
|
34483
|
+
}
|
|
34484
|
+
function re(e2) {
|
|
34485
|
+
let a2 = M2(), s2 = a2 == null ? void 0 : a2.closest(N$1), i2;
|
|
34486
|
+
for (; s2 && !i2; ) s2 = e2 > 0 ? we(s2, N$1) : De(s2, N$1), i2 = s2 == null ? void 0 : s2.querySelector(ce);
|
|
34487
|
+
i2 ? E2.setState("value", i2.getAttribute(T$1)) : Q2(e2);
|
|
34488
|
+
}
|
|
34489
|
+
let oe = () => X2(V().length - 1), ie = (e2) => {
|
|
34490
|
+
e2.preventDefault(), e2.metaKey ? oe() : e2.altKey ? re(1) : Q2(1);
|
|
34491
|
+
}, se = (e2) => {
|
|
34492
|
+
e2.preventDefault(), e2.metaKey ? X2(0) : e2.altKey ? re(-1) : Q2(-1);
|
|
34493
|
+
};
|
|
34494
|
+
return React.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O2, "cmdk-root": "", onKeyDown: (e2) => {
|
|
34495
|
+
var s2;
|
|
34496
|
+
(s2 = O2.onKeyDown) == null || s2.call(O2, e2);
|
|
34497
|
+
let a2 = e2.nativeEvent.isComposing || e2.keyCode === 229;
|
|
34498
|
+
if (!(e2.defaultPrevented || a2)) switch (e2.key) {
|
|
34499
|
+
case "n":
|
|
34500
|
+
case "j": {
|
|
34501
|
+
j && e2.ctrlKey && ie(e2);
|
|
34502
|
+
break;
|
|
34503
|
+
}
|
|
34504
|
+
case "ArrowDown": {
|
|
34505
|
+
ie(e2);
|
|
34506
|
+
break;
|
|
34507
|
+
}
|
|
34508
|
+
case "p":
|
|
34509
|
+
case "k": {
|
|
34510
|
+
j && e2.ctrlKey && se(e2);
|
|
34511
|
+
break;
|
|
34512
|
+
}
|
|
34513
|
+
case "ArrowUp": {
|
|
34514
|
+
se(e2);
|
|
34515
|
+
break;
|
|
34516
|
+
}
|
|
34517
|
+
case "Home": {
|
|
34518
|
+
e2.preventDefault(), X2(0);
|
|
34519
|
+
break;
|
|
34520
|
+
}
|
|
34521
|
+
case "End": {
|
|
34522
|
+
e2.preventDefault(), oe();
|
|
34523
|
+
break;
|
|
34524
|
+
}
|
|
34525
|
+
case "Enter": {
|
|
34526
|
+
e2.preventDefault();
|
|
34527
|
+
let i2 = M2();
|
|
34528
|
+
if (i2) {
|
|
34529
|
+
let l = new Event(Z);
|
|
34530
|
+
i2.dispatchEvent(l);
|
|
34531
|
+
}
|
|
34532
|
+
}
|
|
34533
|
+
}
|
|
34534
|
+
} }, React.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b2), B$1(r2, (e2) => React.createElement(de.Provider, { value: E2 }, React.createElement(ue.Provider, { value: U2 }, e2))));
|
|
34535
|
+
}), he = React.forwardRef((r2, o) => {
|
|
34536
|
+
var _2, I2;
|
|
34537
|
+
let n2 = useId(), u2 = React.useRef(null), c2 = React.useContext(fe), d2 = K(), f2 = pe(r2), p2 = (I2 = (_2 = f2.current) == null ? void 0 : _2.forceMount) != null ? I2 : c2 == null ? void 0 : c2.forceMount;
|
|
34538
|
+
k$1(() => {
|
|
34539
|
+
if (!p2) return d2.item(n2, c2 == null ? void 0 : c2.id);
|
|
34540
|
+
}, [p2]);
|
|
34541
|
+
let b2 = ve(n2, u2, [r2.value, r2.children, u2], r2.keywords), m2 = ee(), R2 = P$1((v2) => v2.value && v2.value === b2.current), x2 = P$1((v2) => p2 || d2.filter() === false ? true : v2.search ? v2.filtered.items.get(n2) > 0 : true);
|
|
34542
|
+
React.useEffect(() => {
|
|
34543
|
+
let v2 = u2.current;
|
|
34544
|
+
if (!(!v2 || r2.disabled)) return v2.addEventListener(Z, C2), () => v2.removeEventListener(Z, C2);
|
|
34545
|
+
}, [x2, r2.onSelect, r2.disabled]);
|
|
34546
|
+
function C2() {
|
|
34547
|
+
var v2, E2;
|
|
34548
|
+
S2(), (E2 = (v2 = f2.current).onSelect) == null || E2.call(v2, b2.current);
|
|
34549
|
+
}
|
|
34550
|
+
function S2() {
|
|
34551
|
+
m2.setState("value", b2.current, true);
|
|
34552
|
+
}
|
|
34553
|
+
if (!x2) return null;
|
|
34554
|
+
let { disabled: A2, value: ge, onSelect: j, forceMount: O2, keywords: $2, ...q2 } = r2;
|
|
34555
|
+
return React.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q2, id: n2, "cmdk-item": "", role: "option", "aria-disabled": !!A2, "aria-selected": !!R2, "data-disabled": !!A2, "data-selected": !!R2, onPointerMove: A2 || d2.getDisablePointerSelection() ? void 0 : S2, onClick: A2 ? void 0 : C2 }, r2.children);
|
|
34556
|
+
}), Ee = React.forwardRef((r2, o) => {
|
|
34557
|
+
let { heading: n2, children: u2, forceMount: c2, ...d2 } = r2, f2 = useId(), p2 = React.useRef(null), b2 = React.useRef(null), m2 = useId(), R2 = K(), x2 = P$1((S2) => c2 || R2.filter() === false ? true : S2.search ? S2.filtered.groups.has(f2) : true);
|
|
34558
|
+
k$1(() => R2.group(f2), []), ve(f2, p2, [r2.value, r2.heading, b2]);
|
|
34559
|
+
let C2 = React.useMemo(() => ({ id: f2, forceMount: c2 }), [c2]);
|
|
34560
|
+
return React.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d2, "cmdk-group": "", role: "presentation", hidden: x2 ? void 0 : true }, n2 && React.createElement("div", { ref: b2, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n2), B$1(r2, (S2) => React.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n2 ? m2 : void 0 }, React.createElement(fe.Provider, { value: C2 }, S2))));
|
|
34561
|
+
}), ye = React.forwardRef((r2, o) => {
|
|
34562
|
+
let { alwaysRender: n2, ...u2 } = r2, c2 = React.useRef(null), d2 = P$1((f2) => !f2.search);
|
|
34563
|
+
return !n2 && !d2 ? null : React.createElement(Primitive.div, { ref: composeRefs(c2, o), ...u2, "cmdk-separator": "", role: "separator" });
|
|
34564
|
+
}), Se = React.forwardRef((r2, o) => {
|
|
34565
|
+
let { onValueChange: n2, ...u2 } = r2, c2 = r2.value != null, d2 = ee(), f2 = P$1((m2) => m2.search), p2 = P$1((m2) => m2.selectedItemId), b2 = K();
|
|
34566
|
+
return React.useEffect(() => {
|
|
34567
|
+
r2.value != null && d2.setState("search", r2.value);
|
|
34568
|
+
}, [r2.value]), React.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b2.listId, "aria-labelledby": b2.labelId, "aria-activedescendant": p2, id: b2.inputId, type: "text", value: c2 ? r2.value : f2, onChange: (m2) => {
|
|
34569
|
+
c2 || d2.setState("search", m2.target.value), n2 == null || n2(m2.target.value);
|
|
34570
|
+
} });
|
|
34571
|
+
}), Ce = React.forwardRef((r2, o) => {
|
|
34572
|
+
let { children: n2, label: u2 = "Suggestions", ...c2 } = r2, d2 = React.useRef(null), f2 = React.useRef(null), p2 = P$1((m2) => m2.selectedItemId), b2 = K();
|
|
34573
|
+
return React.useEffect(() => {
|
|
34574
|
+
if (f2.current && d2.current) {
|
|
34575
|
+
let m2 = f2.current, R2 = d2.current, x2, C2 = new ResizeObserver(() => {
|
|
34576
|
+
x2 = requestAnimationFrame(() => {
|
|
34577
|
+
let S2 = m2.offsetHeight;
|
|
34578
|
+
R2.style.setProperty("--cmdk-list-height", S2.toFixed(1) + "px");
|
|
34579
|
+
});
|
|
34580
|
+
});
|
|
34581
|
+
return C2.observe(m2), () => {
|
|
34582
|
+
cancelAnimationFrame(x2), C2.unobserve(m2);
|
|
34583
|
+
};
|
|
34584
|
+
}
|
|
34585
|
+
}, []), React.createElement(Primitive.div, { ref: composeRefs(d2, o), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B$1(r2, (m2) => React.createElement("div", { ref: composeRefs(f2, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
34586
|
+
}), xe = React.forwardRef((r2, o) => {
|
|
34587
|
+
let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d2, container: f2, ...p2 } = r2;
|
|
34588
|
+
return React.createElement(Root$2, { open: n2, onOpenChange: u2 }, React.createElement(Portal$1, { container: f2 }, React.createElement(Overlay, { "cmdk-overlay": "", className: c2 }), React.createElement(Content$3, { "aria-label": r2.label, "cmdk-dialog": "", className: d2 }, React.createElement(me, { ref: o, ...p2 }))));
|
|
34589
|
+
}), Ie = React.forwardRef((r2, o) => P$1((u2) => u2.filtered.count === 0) ? React.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null), Pe = React.forwardRef((r2, o) => {
|
|
34590
|
+
let { progress: n2, children: u2, label: c2 = "Loading...", ...d2 } = r2;
|
|
34591
|
+
return React.createElement(Primitive.div, { ref: o, ...d2, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n2, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c2 }, B$1(r2, (f2) => React.createElement("div", { "aria-hidden": true }, f2)));
|
|
34592
|
+
}), _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
|
|
34593
|
+
function we(r2, o) {
|
|
34594
|
+
let n2 = r2.nextElementSibling;
|
|
34595
|
+
for (; n2; ) {
|
|
34596
|
+
if (n2.matches(o)) return n2;
|
|
34597
|
+
n2 = n2.nextElementSibling;
|
|
34598
|
+
}
|
|
34599
|
+
}
|
|
34600
|
+
function De(r2, o) {
|
|
34601
|
+
let n2 = r2.previousElementSibling;
|
|
34602
|
+
for (; n2; ) {
|
|
34603
|
+
if (n2.matches(o)) return n2;
|
|
34604
|
+
n2 = n2.previousElementSibling;
|
|
34605
|
+
}
|
|
34606
|
+
}
|
|
34607
|
+
function pe(r2) {
|
|
34608
|
+
let o = React.useRef(r2);
|
|
34609
|
+
return k$1(() => {
|
|
34610
|
+
o.current = r2;
|
|
34611
|
+
}), o;
|
|
34612
|
+
}
|
|
34613
|
+
var k$1 = typeof window == "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
34614
|
+
function L$1(r2) {
|
|
34615
|
+
let o = React.useRef();
|
|
34616
|
+
return o.current === void 0 && (o.current = r2()), o;
|
|
34617
|
+
}
|
|
34618
|
+
function P$1(r2) {
|
|
34619
|
+
let o = ee(), n2 = () => r2(o.snapshot());
|
|
34620
|
+
return React.useSyncExternalStore(o.subscribe, n2, n2);
|
|
34621
|
+
}
|
|
34622
|
+
function ve(r2, o, n2, u2 = []) {
|
|
34623
|
+
let c2 = React.useRef(), d2 = K();
|
|
34624
|
+
return k$1(() => {
|
|
34625
|
+
var b2;
|
|
34626
|
+
let f2 = (() => {
|
|
34627
|
+
var m2;
|
|
34628
|
+
for (let R2 of n2) {
|
|
34629
|
+
if (typeof R2 == "string") return R2.trim();
|
|
34630
|
+
if (typeof R2 == "object" && "current" in R2) return R2.current ? (m2 = R2.current.textContent) == null ? void 0 : m2.trim() : c2.current;
|
|
34631
|
+
}
|
|
34632
|
+
})(), p2 = u2.map((m2) => m2.trim());
|
|
34633
|
+
d2.value(r2, f2, p2), (b2 = o.current) == null || b2.setAttribute(T$1, f2), c2.current = f2;
|
|
34634
|
+
}), c2;
|
|
34635
|
+
}
|
|
34636
|
+
var ke = () => {
|
|
34637
|
+
let [r2, o] = React.useState(), n2 = L$1(() => /* @__PURE__ */ new Map());
|
|
34638
|
+
return k$1(() => {
|
|
34639
|
+
n2.current.forEach((u2) => u2()), n2.current = /* @__PURE__ */ new Map();
|
|
34640
|
+
}, [r2]), (u2, c2) => {
|
|
34641
|
+
n2.current.set(u2, c2), o({});
|
|
34642
|
+
};
|
|
34643
|
+
};
|
|
34644
|
+
function Me(r2) {
|
|
34645
|
+
let o = r2.type;
|
|
34646
|
+
return typeof o == "function" ? o(r2.props) : "render" in o ? o.render(r2.props) : r2;
|
|
34647
|
+
}
|
|
34648
|
+
function B$1({ asChild: r2, children: o }, n2) {
|
|
34649
|
+
return r2 && React.isValidElement(o) ? React.cloneElement(Me(o), { ref: o.ref }, n2(o.props.children)) : n2(o);
|
|
34650
|
+
}
|
|
34651
|
+
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
34652
|
+
const Command = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e, { ref, className: cn("flex size-full flex-col rounded-md [&_[cmdk-label]]:hidden", className), ...props }));
|
|
34653
|
+
Command.displayName = _e.displayName;
|
|
34654
|
+
const CommandInput = React__default.forwardRef(({ wrapperClassName, className, ...props }, ref) => jsxs("div", { className: cn("group relative flex items-center border-b", "border-b-gray-300 dark:border-b-gray-900", "hover:border-b-gray-300 dark:hover:border-b-gray-800", "hover:bg-gray-100 dark:hover:bg-gray-900", "focus-within:border-b-gray-300 dark:focus-within:border-b-gray-800", "focus-within:bg-gray-100 dark:focus-within:bg-gray-900", wrapperClassName), "cmdk-input-wrapper": "", children: [jsx$1(Icon, { name: "Search", size: 16, className: cn("pointer-events-none absolute left-2 top-3.5 text-gray-500 dark:text-gray-700", "group-hover:text-gray-700 dark:group-hover:text-gray-500", "group-focus-within:!text-gray-900 dark:group-focus-within:!text-gray-50") }), jsx$1(_e.Input, { ref, className: cn("flex w-full bg-transparent pb-2 pl-8 pr-3 pt-3 text-[14px] font-normal leading-5 outline-none", "placeholder:text-gray-500 dark:placeholder:text-gray-700", "group-hover:placeholder:text-gray-700 dark:group-hover:placeholder:text-gray-500", "group-focus-within:placeholder:!text-gray-700 dark:group-focus-within:placeholder:!text-gray-300", "disabled:cursor-not-allowed", className), ...props })] }));
|
|
34655
|
+
CommandInput.displayName = _e.Input.displayName;
|
|
34656
|
+
const CommandList = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e.List, { ref, className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", "focus:outline-none", "scrollbar-thin scrollbar-gutter-stable", "scrollbar-track-transparent", "scrollbar-thumb-gray-300 hover:scrollbar-thumb-gray-300", "dark:scrollbar-thumb-charcoal-700 dark:hover:scrollbar-thumb-charcoal-700", "scrollbar-thumb-rounded-md", className), ...props }));
|
|
34657
|
+
CommandList.displayName = _e.List.displayName;
|
|
34658
|
+
const CommandLoading = React__default.forwardRef((props, ref) => jsx$1(_e.Loading, { ref, ...props }));
|
|
34659
|
+
CommandLoading.displayName = _e.Loading.displayName;
|
|
34660
|
+
const CommandEmpty = React__default.forwardRef((props, ref) => jsx$1(_e.Empty, { ref, ...props }));
|
|
34661
|
+
CommandEmpty.displayName = _e.Empty.displayName;
|
|
34662
|
+
const CommandGroup = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e.Group, { ref, className: cn("overflow-hidden px-0.5 py-1", "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className), ...props }));
|
|
34663
|
+
CommandGroup.displayName = _e.Group.displayName;
|
|
34664
|
+
const CommandItem = React__default.forwardRef(({ className, ...props }, ref) => jsx$1(_e.Item, { ref, className: cn("relative flex select-none items-center justify-between", "h-8 gap-2 rounded-md py-1.5 pl-1.5 pr-2.5", "text-[14px] leading-4 outline-none", "border-y-2 border-white dark:border-slate-600", "data-[disabled=true]:pointer-events-none", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props }));
|
|
34665
|
+
CommandItem.displayName = _e.Item.displayName;
|
|
34666
34666
|
const withFieldValidation = (Component2, options2) => {
|
|
34667
34667
|
return React__default.forwardRef(({ value, name, showErrorOnBlur, showErrorOnChange, validators: customValidators, ...props }, ref) => {
|
|
34668
34668
|
var _a2;
|
|
@@ -70623,7 +70623,7 @@ const useFilteredDocumentModels = () => {
|
|
|
70623
70623
|
};
|
|
70624
70624
|
const LOCAL_DOCUMENT_EDITORS = window.__VITE_ENVS.LOCAL_DOCUMENT_EDITORS;
|
|
70625
70625
|
async function loadBaseEditors() {
|
|
70626
|
-
const documentModelEditor = await __vitePreload(() => import("./index-
|
|
70626
|
+
const documentModelEditor = await __vitePreload(() => import("./index-BR7pEetO.js"), true ? __vite__mapDeps([4,2,1,3]) : void 0);
|
|
70627
70627
|
await __vitePreload(() => Promise.resolve({}), true ? __vite__mapDeps([5]) : void 0);
|
|
70628
70628
|
const module = documentModelEditor.documentModelEditorModule;
|
|
70629
70629
|
return [module];
|
|
@@ -70789,11 +70789,11 @@ const connectCrypto = (async () => {
|
|
|
70789
70789
|
return window.connectCrypto;
|
|
70790
70790
|
}
|
|
70791
70791
|
const { ConnectCrypto } = await __vitePreload(async () => {
|
|
70792
|
-
const { ConnectCrypto: ConnectCrypto2 } = await import("./index-
|
|
70792
|
+
const { ConnectCrypto: ConnectCrypto2 } = await import("./index-Boh2tg26.js");
|
|
70793
70793
|
return { ConnectCrypto: ConnectCrypto2 };
|
|
70794
70794
|
}, true ? __vite__mapDeps([6,1,2,3]) : void 0);
|
|
70795
70795
|
const { BrowserKeyStorage } = await __vitePreload(async () => {
|
|
70796
|
-
const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-
|
|
70796
|
+
const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-Boh2tg26.js");
|
|
70797
70797
|
return { BrowserKeyStorage: BrowserKeyStorage2 };
|
|
70798
70798
|
}, true ? __vite__mapDeps([6,1,2,3]) : void 0);
|
|
70799
70799
|
const connectCrypto2 = new ConnectCrypto(new BrowserKeyStorage());
|
|
@@ -70842,7 +70842,7 @@ function useRenown() {
|
|
|
70842
70842
|
return;
|
|
70843
70843
|
}
|
|
70844
70844
|
const { initRenownBrowser } = await __vitePreload(async () => {
|
|
70845
|
-
const { initRenownBrowser: initRenownBrowser2 } = await import("./index-
|
|
70845
|
+
const { initRenownBrowser: initRenownBrowser2 } = await import("./index-Boh2tg26.js");
|
|
70846
70846
|
return { initRenownBrowser: initRenownBrowser2 };
|
|
70847
70847
|
}, true ? __vite__mapDeps([6,1,2,3]) : void 0);
|
|
70848
70848
|
const renownBrowser = initRenownBrowser(did2);
|
|
@@ -79163,7 +79163,7 @@ function Home() {
|
|
|
79163
79163
|
/* @__PURE__ */ jsx$1(HomeScreenAddDriveItem, { onClick: onAddDriveClick })
|
|
79164
79164
|
] });
|
|
79165
79165
|
}
|
|
79166
|
-
const Content = React__default.lazy(() => __vitePreload(() => import("./content-
|
|
79166
|
+
const Content = React__default.lazy(() => __vitePreload(() => import("./content-CGSfY9bJ.js"), true ? __vite__mapDeps([7,2,1,3]) : void 0));
|
|
79167
79167
|
async function createRouter(routes) {
|
|
79168
79168
|
var _a2;
|
|
79169
79169
|
const isPackaged = await ((_a2 = window.electronAPI) == null ? void 0 : _a2.isPackaged());
|