diff --git a/main.js b/main.js index 752714b..c8c6b6b 100644 --- a/main.js +++ b/main.js @@ -14027,7 +14027,8 @@ var T4 = class { deleteFiles: "Delete Files", createFolderSpace: "Create Space from Folder", folder: "Folder", - syncToContext: "Add Property to Context" + syncToContext: "Add Property to Context", + setIcon: "Set Icon" }, buttons: { moreOptions: "More Options", @@ -14119,8 +14120,8 @@ var T4 = class { link: { label: "Link" }, - tag: { - label: "Tag" + tags: { + label: "Tags" }, object: { label: "Object" @@ -14448,7 +14449,7 @@ var T4 = class { var i18n_default = new T4().texts; // src/codemirror/extensions/flowEditor/flowEditor.tsx -var import_obsidian50 = require("obsidian"); +var import_obsidian52 = require("obsidian"); // src/utils/array.ts var insert = (arr, index, newItem) => !index || index <= 0 ? [ @@ -14507,6 +14508,9 @@ function ensureArray(value) { if (Array.isArray(value)) { return value; } + if (typeof value === "string") { + return [value]; + } return []; } function ensureStringValueFromSet(value, values, defaultValue2) { @@ -14561,7 +14565,7 @@ var spaceNameFromSpacePath = (contextPath, plugin) => { return (_b2 = (_a2 = plugin.index.spacesIndex.get(contextPath)) == null ? void 0 : _a2.name) != null ? _b2 : contextPath; }; var spacePathFromName = (spaceName) => "spaces://" + encodeSpaceName(spaceName); -var encodeSpaceName = (spaceName) => spaceName.replace(/\//g, "+"); +var encodeSpaceName = (spaceName) => spaceName == null ? void 0 : spaceName.replace(/\//g, "+"); var tagSpacePathFromTag = (tag) => "spaces://" + tag; var wrapQuotes = (s5) => `"${s5}"`; var removeQuotes = (s5) => { @@ -14659,7 +14663,7 @@ var serializeSQLStatements = (value) => value.join("; "); var serializeSQLFieldNames = (value) => value.join(","); // src/midd/obsidian/utils/file.ts -var import_obsidian49 = require("obsidian"); +var import_obsidian51 = require("obsidian"); // src/react/components/RemoteMarkdownView/FileView.tsx var import_obsidian2 = require("obsidian"); @@ -14750,7 +14754,7 @@ var FileLinkView = class extends import_obsidian2.ItemView { }; // src/react/components/SpaceView/Contexts/SpaceView.tsx -var import_obsidian48 = require("obsidian"); +var import_obsidian50 = require("obsidian"); // src/react/context/FramesMDBContext.tsx var import_obsidian5 = require("obsidian"); @@ -21846,7 +21850,11 @@ var parsePropString = (str) => { // src/schemas/mdb.ts var parseFieldValue = (value, type) => { + var _a2; let valueProp = safelyParseJSON(value); + if (valueProp) { + return ((_a2 = fieldTypeForType(type).configKeys) != null ? _a2 : []).reduce((p3, c4) => ({ ...p3, [c4]: valueProp[c4] }), {}); + } if (!type) return {}; if (!valueProp) { @@ -21891,9 +21899,9 @@ var parseFieldValue = (value, type) => { }; var stickerForField = (f4) => { var _a2, _b2, _c2, _d2, _e2; - return ((_a2 = f4.attrs) == null ? void 0 : _a2.length) > 0 ? (_d2 = (_b2 = safelyParseJSON(f4.attrs)) == null ? void 0 : _b2.icon) != null ? _d2 : (_c2 = fieldTypeForType(f4.type)) == null ? void 0 : _c2.icon : (_e2 = fieldTypeForType(f4.type)) == null ? void 0 : _e2.icon; + return ((_a2 = f4.attrs) == null ? void 0 : _a2.length) > 0 ? (_d2 = (_b2 = safelyParseJSON(f4.attrs)) == null ? void 0 : _b2.icon) != null ? _d2 : (_c2 = fieldTypeForType(f4.type, f4.name)) == null ? void 0 : _c2.icon : (_e2 = fieldTypeForType(f4.type, f4.name)) == null ? void 0 : _e2.icon; }; -var fieldTypeForType = (type) => fieldTypes.find((t4) => type == t4.type) || fieldTypes.find((t4) => type == t4.multiType); +var fieldTypeForType = (type, name) => name == FilePropertyName ? fieldTypes.find((t4) => t4.type == "file") : name == "tags" ? fieldTypes.find((t4) => t4.type == "tags") : name == "aliases" ? fieldTypes.find((t4) => t4.type == "option-multi") : name == "sticker" ? fieldTypes.find((t4) => type == "icon") : fieldTypes.find((t4) => type == t4.type) || fieldTypes.find((t4) => type == t4.multiType); var fieldTypes = [ { type: "unknown", @@ -21911,7 +21919,8 @@ var fieldTypes = [ type: "number", label: i18n_default.properties.number.label, metadata: true, - icon: "lucide//binary" + icon: "lucide//binary", + configKeys: ["unit"] }, { type: "boolean", @@ -21923,14 +21932,21 @@ var fieldTypes = [ type: "date", label: i18n_default.properties.date.label, metadata: true, - icon: "lucide//calendar" + icon: "lucide//calendar", + configKeys: ["format"] }, { type: "option", label: i18n_default.properties.option.label, multi: true, multiType: "option-multi", - icon: "lucide//list" + icon: "lucide//list", + configKeys: ["options"] + }, + { + type: "tags", + label: i18n_default.properties.tags.label, + icon: "lucide//tags" }, { type: "file", @@ -21941,7 +21957,8 @@ var fieldTypes = [ { type: "fileprop", label: i18n_default.properties.fileProperty.label, - icon: "lucide//list" + icon: "lucide//list", + configKeys: ["field", "value"] }, { type: "link", @@ -21956,7 +21973,8 @@ var fieldTypes = [ label: i18n_default.properties.context.label, icon: "ui//mk-make-note", multi: true, - multiType: "context-multi" + multiType: "context-multi", + configKeys: ["space"] }, { type: "object", @@ -30035,6 +30053,17 @@ var deleteFrontmatterValue = (plugin, path, key2) => { }); } }; +var updatePrimaryAlias = (plugin, path, aliases, value) => { + const newValue = serializeMultiString([value, ...ensureArray(aliases).filter((f4) => f4 == value)]); + saveFrontmatterValue( + plugin, + path, + plugin.settings.fmKeyAlias, + newValue, + "option-multi", + true + ); +}; var saveFrontmatterValue = (plugin, path, key2, value, type, forceSave) => { let afile = getAbstractFileAtPath(plugin, path); const fileCache = plugin.index.filesIndex.get(path); @@ -32177,15 +32206,15 @@ var defaultProps = { var findMatchIndex = (options, query) => { return options.findIndex((option) => matchExact(query).test(option.name)); }; -var pressDelimiter = (props2, query, index, options, addTag, modifiers) => { +var pressDelimiter = (props2, query, index, options, addTag2, modifiers) => { if (query.length >= props2.minQueryLength) { const match2 = findMatchIndex(options, query); const _index = index === -1 ? match2 : index; const tag = _index > -1 ? options[_index] : null; if (tag) { - addTag(tag, modifiers); + addTag2(tag, modifiers); } else { - addTag({ name: query, value: query }, modifiers); + addTag2({ name: query, value: query }, modifiers); } } }; @@ -32286,7 +32315,7 @@ var SelectMenuComponent = Cn.forwardRef( props2.onInput(_query); } if (_query.length === query.length + 1 && props2.delimiters.indexOf(query.slice(-1)) > -1) { - pressDelimiter(props2, query, index, options, addTag, {}); + pressDelimiter(props2, query, index, options, addTag2, {}); } else if (_query !== query) { setQuery(_query); } @@ -32296,7 +32325,7 @@ var SelectMenuComponent = Cn.forwardRef( if (query || index > -1) { e4.preventDefault(); } - pressDelimiter(props2, query, index, options, addTag, { + pressDelimiter(props2, query, index, options, addTag2, { ctrlKey: e4.ctrlKey, metaKey: e4.metaKey, altKey: e4.altKey, @@ -32334,7 +32363,7 @@ var SelectMenuComponent = Cn.forwardRef( } deleteTag(index2); }; - const addTag = (tag, modifiers) => { + const addTag2 = (tag, modifiers) => { if (tag.disabled) { return; } @@ -32445,7 +32474,7 @@ var SelectMenuComponent = Cn.forwardRef( id: props2.id, classNames: classNames9, expanded, - addTag, + addTag: addTag2, allowNew: props2.allowNew, deleteOption: props2.onDeleteOption }) : null, props2.previewComponent); @@ -38276,7 +38305,7 @@ var PropertyMenuComponent = (props2) => { setField(newField); props2.saveField(newField); }; - const fieldType = (_a2 = fieldTypeForType(field.type)) != null ? _a2 : fieldTypes[0]; + const fieldType = (_a2 = fieldTypeForType(field.type, field.name)) != null ? _a2 : fieldTypes[0]; const getNewValueForType = (f4, value) => { if (value[0].startsWith("option")) { return JSON.stringify({ @@ -38364,12 +38393,12 @@ var showPropertyMenu = (props2) => { menu.addSeparator(); menu.addItem((menuItem) => { menuItem.setIcon("gem"); - menuItem.setTitle("Set Icon"); + menuItem.setTitle(i18n_default.menu.setIcon); menuItem.onClick(() => { const vaultChangeModal = new stickerModal( props2.plugin.app, props2.plugin, - (emoji) => saveField({ ...field, attrs: emoji }) + (emoji) => saveField({ ...field, attrs: JSON.stringify({ icon: emoji }) }) ); vaultChangeModal.open(); }); @@ -38786,22 +38815,28 @@ var ContextMDBProvider = (props2) => { } } }; - const refreshFile = T2(async (file) => { - var _a3; - if (file.path == props2.file && dbSchema) { - const fCache = (_a3 = props2.plugin.app.metadataCache.getCache( - file.path - )) == null ? void 0 : _a3.frontmatter; - if ((0, import_lodash4.isEqual)(fCache, metadataCache)) - return; - setMetadataCache(fCache); - if (dbSchema.primary) { + const refreshFile = T2( + async (file) => { + var _a3; + if (file.path == props2.file && dbSchema) { + const fCache = (_a3 = props2.plugin.app.metadataCache.getCache( + file.path + )) == null ? void 0 : _a3.frontmatter; + if ((0, import_lodash4.isEqual)(fCache, metadataCache)) + return; + setMetadataCache(fCache); + if (dbSchema.primary == "true") { + runDef(); + } else { + getMDBData(); + } + } else if ((dbSchema == null ? void 0 : dbSchema.primary) == "true" && (tableData == null ? void 0 : tableData.rows.some((f4) => f4.File == file.path))) { + console.log("yoo", file); runDef(); - } else { - getMDBData(); } - } - }, []); + }, + [dbSchema, props2.file, tableData, metadataCache] + ); const loadContextFields = T2(async (tag) => { getMDBTable( props2.plugin, @@ -39654,7 +39689,6 @@ var filePropTypes = [ } ]; var ColumnHeader = (props2) => { - var _a2, _b2; const [field, setField] = h2(props2.column); const menuRef = _2(null); const { spaceInfo, spaceCache } = q2(SpaceContext); @@ -39698,12 +39732,12 @@ var ColumnHeader = (props2) => { } }; const showNewMenu = (e4) => { - var _a3; + var _a2; const offset2 = ref2.current.getBoundingClientRect(); showNewPropertyMenu( props2.plugin, { x: offset2.left, y: offset2.top + 30 }, - (_a3 = spaceCache == null ? void 0 : spaceCache.contexts) != null ? _a3 : [], + (_a2 = spaceCache == null ? void 0 : spaceCache.contexts) != null ? _a2 : [], cols, (source, field2) => newColumn({ ...field2, table: source }), tableData.schema.id, @@ -39749,13 +39783,16 @@ var ColumnHeader = (props2) => { }, /* @__PURE__ */ Cn.createElement("div", { ref: ref2 }, props2.column.name.length > 0 ? /* @__PURE__ */ Cn.createElement(Cn.Fragment, null, /* @__PURE__ */ Cn.createElement("div", { + className: "mk-file-context-field-icon", dangerouslySetInnerHTML: { __html: stickerFromString( - ((_a2 = props2.column.attrs) == null ? void 0 : _a2.length) > 0 ? props2.column.attrs : (_b2 = fieldTypeForType(props2.column.type)) == null ? void 0 : _b2.icon, + stickerForField(props2.column), props2.plugin ) } - }), field.name) : "+", /* @__PURE__ */ Cn.createElement("span", { + }), /* @__PURE__ */ Cn.createElement("div", { + className: "mk-file-context-field-key" + }, field.name)) : "+", /* @__PURE__ */ Cn.createElement("span", { className: "mk-col-header-context", "aria-label": props2.column.table.length > 0 ? props2.column.table : "" }, props2.column.table.length > 0 ? "#" : ""))); @@ -39975,9 +40012,9 @@ var NewPropertyMenuComponent = (props2) => { const type = F2( () => { var _a2; - return (_a2 = fieldTypeForType(fieldType)) != null ? _a2 : fieldTypes[0]; + return (_a2 = fieldTypeForType(fieldType, fieldName)) != null ? _a2 : fieldTypes[0]; }, - [fieldType] + [fieldType, fieldName] ); const selectSource = (e4) => { showSelectMenu(e4.target.getBoundingClientRect(), { @@ -40198,13 +40235,13 @@ var NoteSpacesBar = (props2) => { }; // src/react/components/UI/Menus/fileMenu.tsx -var import_obsidian44 = require("obsidian"); +var import_obsidian46 = require("obsidian"); // src/react/components/UI/Modals/editSpaceModal.tsx -var import_obsidian42 = require("obsidian"); +var import_obsidian43 = require("obsidian"); // src/react/components/Navigator/SpaceEditor.tsx -var import_obsidian41 = require("obsidian"); +var import_obsidian42 = require("obsidian"); // src/react/components/UI/Menus/linkMenu.tsx var showLinkMenu = (e4, plugin, saveLink, placeholder) => { @@ -40461,12 +40498,15 @@ var fileMetadataToVaultItem = (cache) => { var import_obsidian19 = require("obsidian"); var tagKeys = ["tag", "tags", "Tag", "Tags"]; var tagToTagPath = (tag) => { + return encodeSpaceName(ensureTag(tag)); +}; +var ensureTag = (tag) => { if (!tag) return null; let string = tag; if (string.charAt(0) != "#") string = "#" + string; - return encodeSpaceName(string); + return string; }; var tagPathToTag = (string) => { return filePathToString(string).replace(/\+/g, "/"); @@ -40536,6 +40576,10 @@ var removeTagFromFile = (plugin, tag, file) => { var validateName = (tag) => { return tag.trim(); }; +var addTag = async (plugin, tag) => { + const context = spaceFromTag(plugin, tag); + plugin.index.reloadSpace(context); +}; var renameTag = async (plugin, tag, toTag) => { const tags = getAllSubtags(plugin, tag); const newTag = validateName(toTag); @@ -40617,7 +40661,7 @@ var editTagInFrontmatter = async (plugin, oldTag, newTag, file) => { if (plugin.app.metadataCache.getFileCache(file) !== null) { fm = (_a2 = plugin.app.metadataCache.getFileCache(file)) == null ? void 0 : _a2.frontmatter; } - const addTag = (plugin2, value) => { + const addTag2 = (plugin2, value) => { if (Array.isArray(value)) { return uniq([...value, stringFromTag(newTag)]).filter((f4) => (f4 == null ? void 0 : f4.length) > 0); } else if (typeof value === "string") { @@ -40665,7 +40709,7 @@ var editTagInFrontmatter = async (plugin, oldTag, newTag, file) => { }); } else { plugin.metadata.processFrontMatter(file.path, (frontmatter) => { - frontmatter["tags"] = addTag(plugin, fm["tags"]); + frontmatter["tags"] = addTag2(plugin, fm["tags"]); }); } } else { @@ -40938,6 +40982,8 @@ var saveSpaceSticker = async (plugin, path, sticker) => { plugin.index.broadcast("space"); }; var updateFileRank = async (plugin, path, rank, space) => { + if (space.type == "default") + return; const fixedRank = rank; if (!await plugin.files.fileExists(space.space.dbPath)) { await createContextMDB(plugin, space.space); @@ -41052,6 +41098,10 @@ var insertSpaceAtIndex = async (plugin, path, newSpace) => { plugin.saveSettings(); return newSpaceCache; }; +var saveSpacePrimaryAlias = (plugin, space, alias, aliases) => { + const newAliases = [alias, ...ensureArray(aliases).filter((f4) => f4 == alias)]; + saveSpaceMetadataValue(plugin, space, plugin.settings.fmKeyAlias, newAliases); +}; var saveSpaceMetadataValue = async (plugin, space, key2, value) => { const spaceCache = plugin.index.spacesIndex.get(space); let file = getAbstractFileAtPath(plugin, spaceCache.space.defPath); @@ -41413,7 +41463,7 @@ var FileStickerContainer = (props2) => { }; // src/react/components/Navigator/SpaceQuery.tsx -var import_obsidian40 = require("obsidian"); +var import_obsidian41 = require("obsidian"); // src/react/components/SpaceView/Contexts/ContextBuilder/BuilderMetadataFields.tsx var import_obsidian23 = require("obsidian"); @@ -43183,10 +43233,10 @@ var filterFnLabels = { }; // src/react/components/SpaceView/Contexts/FilterBar/FilterBar.tsx -var import_obsidian39 = require("obsidian"); +var import_obsidian40 = require("obsidian"); // src/react/components/UI/Modals/contextEditorModal.tsx -var import_obsidian38 = require("obsidian"); +var import_obsidian39 = require("obsidian"); // src/react/components/SpaceView/Frames/EditorNodes/FrameNodeView.tsx var import_classnames4 = __toESM(require_classnames()); @@ -45592,7 +45642,7 @@ var RowPlaceholder = (props2) => { }; // src/react/components/SpaceView/Editor/FlowView.tsx -var import_obsidian35 = require("obsidian"); +var import_obsidian36 = require("obsidian"); // src/utils/flow/flowEditor.ts var import_state5 = require("@codemirror/state"); @@ -45864,10 +45914,10 @@ var atomicSelect = import_state4.EditorState.transactionFilter.of( ); // src/utils/flow/flowEditor.ts -var import_obsidian34 = require("obsidian"); +var import_obsidian35 = require("obsidian"); // src/react/components/SpaceView/Editor/EmbedView/EmbedContextView.tsx -var import_obsidian32 = require("obsidian"); +var import_obsidian33 = require("obsidian"); // src/react/components/SpaceView/Frames/ViewNodes/FrameRoot.tsx var import_lodash9 = __toESM(require_lodash()); @@ -49015,10 +49065,13 @@ var OptionCell = (props2) => { () => parseFieldValue(props2.options, "option"), [props2.options] ); - const serializeValue = (newOptions, value2) => JSON.stringify({ - ...value2, - options: newOptions.map((f4) => ({ name: f4.name, value: f4.value })) - }); + const serializeValue = (newOptions, value2) => { + console.log(newOptions, value2); + return JSON.stringify({ + ...value2, + options: newOptions.map((f4) => ({ name: f4.name, value: f4.value })) + }); + }; const initialValue = (props2.multi ? (_a2 = parseMultiString(props2.initialValue)) != null ? _a2 : [] : [props2.initialValue]).filter((f4) => f4); const initialOptions = [ ...(_c2 = ((_b2 = parsedValue.options) != null ? _b2 : []).filter((f4) => f4.value).map((t4) => ({ name: t4.name, value: t4.value, removeable: true }))) != null ? _c2 : [], @@ -49653,7 +49706,7 @@ var TextCell = (props2) => { // src/react/components/SpaceView/Contexts/TableView/TableView.tsx var import_lodash11 = __toESM(require_lodash()); -var import_obsidian29 = require("obsidian"); +var import_obsidian30 = require("obsidian"); // src/react/components/SpaceView/Contexts/DataTypeView/ImageCell.tsx var ImageCell = (props2) => { @@ -49999,46 +50052,34 @@ var SuperCell = (props2) => { }; // src/react/components/SpaceView/Contexts/DataTypeView/TagCell.tsx +var import_obsidian29 = require("obsidian"); var TagCell = (props2) => { - var _a2; - const initialValue = ((_a2 = parseMultiString(props2.initialValue)) != null ? _a2 : []).filter( - (f4) => (f4 == null ? void 0 : f4.length) > 0 + const value = F2( + () => parseMultiString(props2.initialValue), + [props2.initialValue] ); - const [value, setValue] = h2(initialValue); - p2(() => { - var _a3; - setValue((_a3 = parseMultiString(props2.initialValue)) != null ? _a3 : []); - }, [props2.initialValue]); const removeValue = (v3) => { - const newValues = value.filter((f4) => f4 != v3); - setValue(newValues); - props2.saveValue(serializeMultiString(newValues)); + const file = getAbstractFileAtPath(props2.plugin, props2.row["File"]); + if (file instanceof import_obsidian29.TFile) + removeTagFromFile(props2.plugin, v3, file); }; const saveOptions = (_options, _value) => { - if (!props2.multi) { - setValue(_value); - props2.saveValue(serializeMultiString(_value)); - } else { - const newValue = _value[0]; - if (newValue) { - const newValues = uniq([...value, newValue]); - setValue(newValues); - props2.saveValue(serializeMultiString(newValues)); - } - } + const newValue = _value[0]; + const file = getAbstractFileAtPath(props2.plugin, props2.row["File"]); + if (file instanceof import_obsidian29.TFile) + addTagToNote(props2.plugin, newValue, file); }; const menuProps = () => { const options = loadTags(props2.plugin).map((f4) => ({ name: f4, value: f4 })); - const _options = !props2.multi ? [{ name: i18n_default.menu.none, value: "" }, ...options] : options; return { plugin: props2.plugin, multi: false, editable: true, value, - options: _options, + options, saveOptions, placeholder: i18n_default.labels.tagItemSelectPlaceholder, searchable: true, @@ -50047,10 +50088,10 @@ var TagCell = (props2) => { }; }; return /* @__PURE__ */ Cn.createElement(OptionCellBase, { - baseClass: "mk-cell-tag", + baseClass: "mk-cell-tags", menuProps, value, - multi: props2.multi, + multi: true, editMode: props2.editMode, removeValue }); @@ -50306,7 +50347,7 @@ var TableView = (props2) => { propertyValue: f4.value }; const value = parseFieldValue(f4.value, f4.type); - const fieldType = fieldTypeForType(f4.type); + const fieldType = fieldTypeForType(f4.type, f4.name); if (!fieldType) { return /* @__PURE__ */ Cn.createElement(Cn.Fragment, null, initialValue); } @@ -50348,10 +50389,10 @@ var TableView = (props2) => { ...cellProps, file: data2[index][FilePropertyName] }); - } else if (fieldType.type == "tag") { + } else if (fieldType.type == "tags") { return /* @__PURE__ */ Cn.createElement(TagCell, { ...cellProps, - multi: fieldType.multiType == f4.type + row: data2[index] }); } else if (fieldType.type == "number") { return /* @__PURE__ */ Cn.createElement(NumberCell, { @@ -50486,7 +50527,7 @@ var TableView = (props2) => { }; const showContextMenu = (e4, index) => { e4.preventDefault(); - const menu = new import_obsidian29.Menu(); + const menu = new import_obsidian30.Menu(); menu.addItem((item) => { item.setIcon("trash"); item.setTitle(i18n_default.menu.deleteRow); @@ -50540,12 +50581,13 @@ var TableView = (props2) => { }, /* @__PURE__ */ Cn.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ Cn.createElement("tr", { key: headerGroup.id }, /* @__PURE__ */ Cn.createElement("th", null), headerGroup.headers.map((header) => { - var _a2; + var _a2, _b2; return /* @__PURE__ */ Cn.createElement("th", { className: "mk-th", key: header.id, style: { - minWidth: header.column.getIsGrouped() ? "0px" : (_a2 = colsSize[header.column.columnDef.accessorKey]) != null ? _a2 : "150px" + minWidth: header.column.getIsGrouped() ? "0px" : (_a2 = colsSize[header.column.columnDef.accessorKey]) != null ? _a2 : "150px", + maxWidth: header.column.getIsGrouped() ? "0px" : (_b2 = colsSize[header.column.columnDef.accessorKey]) != null ? _b2 : "150px" } }, header.isPlaceholder ? null : header.column.columnDef.header != "+" ? header.column.getIsGrouped() ? /* @__PURE__ */ Cn.createElement(Cn.Fragment, null) : /* @__PURE__ */ Cn.createElement(ColumnHeader, { plugin: props2.plugin, @@ -50683,7 +50725,7 @@ var BooleanCell = (props2) => { }; // src/react/components/UI/Menus/colorPickerMenu.tsx -var import_obsidian30 = require("obsidian"); +var import_obsidian31 = require("obsidian"); // src/utils/color.ts var colors = [ @@ -50713,7 +50755,7 @@ var ColorPicker = (props2) => { }))); }; var showColorPickerMenu = (point, value, setValue) => { - const menu = new import_obsidian30.Menu(); + const menu = new import_obsidian31.Menu(); menu.dom.toggleClass("mk-menu", true); menu.setUseNativeMenu(false); const frag = document.createDocumentFragment(); @@ -50871,6 +50913,7 @@ var DataTypeView = (props2) => { props2.updateValue(value2); }; const saveFieldValue = (fieldValue, value2) => { + console.log(fieldValue, value2); props2.updateFieldValue(fieldValue, value2); }; const viewProps = { @@ -50882,7 +50925,7 @@ var DataTypeView = (props2) => { plugin: props2.plugin, propertyValue: column.value }; - const fieldType = fieldTypeForType(column.type); + const fieldType = fieldTypeForType(column.type, column.name); const value = parseFieldValue(column.value, column.type); if (!fieldType) { return /* @__PURE__ */ Cn.createElement(Cn.Fragment, null); @@ -50938,10 +50981,10 @@ var DataTypeView = (props2) => { multi: fieldType.multiType == column.type, file: row == null ? void 0 : row["File"] }); - } else if (fieldType.type == "tag") { + } else if (fieldType.type == "tags") { return /* @__PURE__ */ Cn.createElement(TagCell, { ...viewProps, - multi: fieldType.multiType == column.type + row }); } else if (fieldType.type == "image") { return /* @__PURE__ */ Cn.createElement(ImageCell, { @@ -50961,8 +51004,7 @@ var DataTypeView = (props2) => { return /* @__PURE__ */ Cn.createElement(SpaceCell, { ...viewProps }); - } - if (fieldType.type == "super") { + } else if (fieldType.type == "super") { return /* @__PURE__ */ Cn.createElement(SuperCell, { ...viewProps, row @@ -51807,17 +51849,22 @@ function useMountStatus() { } // src/react/components/SpaceView/Contexts/FlowListView/FlowListView.tsx -var import_obsidian31 = require("obsidian"); +var import_obsidian32 = require("obsidian"); var FlowListView = (props2) => { const { filteredData: data2 } = q2(ContextEditorContext); const flowItems = F2(() => { - return data2.map((f4) => getAbstractFileAtPath(props2.plugin, f4.File)).filter((f4) => f4 instanceof import_obsidian31.TFile && f4.extension == "md"); + return data2.map((f4) => getAbstractFileAtPath(props2.plugin, f4.File)).filter((f4) => f4 instanceof import_obsidian32.TFile && f4.extension == "md"); }, [data2]); return /* @__PURE__ */ Cn.createElement("div", { className: "mk-flow-container" }, flowItems.map((f4, i4) => /* @__PURE__ */ Cn.createElement("div", { key: i4 - }, /* @__PURE__ */ Cn.createElement("span", null, fileNameToString(f4.name)), /* @__PURE__ */ Cn.createElement(FlowView, { + }, /* @__PURE__ */ Cn.createElement("span", { + onClick: () => openAFile(f4, props2.plugin, false) + }, /* @__PURE__ */ Cn.createElement(FileStickerContainer, { + plugin: props2.plugin, + path: uriByString(props2.plugin, f4.path) + }), fileNameToString(f4.name)), /* @__PURE__ */ Cn.createElement(FlowView, { leaf: props2.leaf, plugin: props2.plugin, path: f4.path, @@ -51919,7 +51966,7 @@ var EmbedViewComponent = (props2) => { // src/react/components/SpaceView/Editor/EmbedView/EmbedContextView.tsx var EMBED_CONTEXT_VIEW_TYPE = "make-inline-context"; -var EmbedContextView2 = class extends import_obsidian32.ItemView { +var EmbedContextView2 = class extends import_obsidian33.ItemView { constructor(leaf, plugin) { super(leaf); this.navigation = true; @@ -51979,27 +52026,27 @@ var EmbedContextView2 = class extends import_obsidian32.ItemView { }; // src/react/components/SpaceView/Editor/FlowEditor.tsx -var import_obsidian33 = require("obsidian"); +var import_obsidian34 = require("obsidian"); var popovers = /* @__PURE__ */ new WeakMap(); var mouseCoords = { x: 0, y: 0 }; function nosuper(base2) { const derived = function() { - return Object.setPrototypeOf(new import_obsidian33.Component(), new.target.prototype); + return Object.setPrototypeOf(new import_obsidian34.Component(), new.target.prototype); }; derived.prototype = base2.prototype; return Object.setPrototypeOf(derived, base2); } var _a, _b, _c, _d, _e; -var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { +var FlowEditor = class extends nosuper(import_obsidian34.HoverPopover) { constructor(parent, targetEl, plugin, waitTime, onShowCallback) { super(); this.targetEl = targetEl; this.plugin = plugin; this.onShowCallback = onShowCallback; - this.abortController = this.addChild(new import_obsidian33.Component()); + this.abortController = this.addChild(new import_obsidian34.Component()); this.detaching = false; this.opening = false; - this.rootSplit = new import_obsidian33.WorkspaceSplit( + this.rootSplit = new import_obsidian34.WorkspaceSplit( this.plugin.app.workspace, "vertical" ); @@ -52017,7 +52064,7 @@ var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { this.onTarget = true; this.parent = parent; this.waitTime = waitTime; - this.state = import_obsidian33.PopoverState.Showing; + this.state = import_obsidian34.PopoverState.Showing; const { hoverEl } = this; this.abortController.load(); this.timer = window.setTimeout(this.show.bind(this), waitTime); @@ -52115,7 +52162,7 @@ var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { this.registerEvent( app.workspace.on("layout-change", () => { this.rootSplit.children.forEach((item, index) => { - if (item instanceof import_obsidian33.WorkspaceTabs) { + if (item instanceof import_obsidian34.WorkspaceTabs) { this.rootSplit.replaceChild(index, item.children[0]); } }); @@ -52159,16 +52206,16 @@ var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { } transition() { if (this.shouldShow()) { - if (this.state === import_obsidian33.PopoverState.Hiding) { - this.state = import_obsidian33.PopoverState.Shown; + if (this.state === import_obsidian34.PopoverState.Hiding) { + this.state = import_obsidian34.PopoverState.Shown; clearTimeout(this.timer); } } else { - if (this.state === import_obsidian33.PopoverState.Showing) { + if (this.state === import_obsidian34.PopoverState.Showing) { this.hide(); } else { - if (this.state === import_obsidian33.PopoverState.Shown) { - this.state = import_obsidian33.PopoverState.Hiding; + if (this.state === import_obsidian34.PopoverState.Shown) { + this.state = import_obsidian34.PopoverState.Hiding; this.timer = window.setTimeout(() => { if (this.shouldShow()) { this.transition(); @@ -52192,13 +52239,13 @@ var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { }); } shouldShowSelf() { - return !this.detaching && !!(this.onTarget || this.state == import_obsidian33.PopoverState.Shown || this.document.querySelector( + return !this.detaching && !!(this.onTarget || this.state == import_obsidian34.PopoverState.Shown || this.document.querySelector( `body>.modal-container, body > #he${this.id} ~ .menu, body > #he${this.id} ~ .suggestion-container` )); } show() { if (!this.targetEl || this.document.body.contains(this.targetEl)) { - this.state = import_obsidian33.PopoverState.Shown; + this.state = import_obsidian34.PopoverState.Shown; this.timer = 0; this.shownPos = mouseCoords; this.targetEl.replaceChildren(this.hoverEl); @@ -52242,7 +52289,7 @@ var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { nativeHide() { var _a2; const { hoverEl, targetEl } = this; - this.state = import_obsidian33.PopoverState.Hidden; + this.state = import_obsidian34.PopoverState.Hidden; hoverEl.detach(); if (targetEl) { const parent = targetEl.matchParent(".mk-hover-popover"); @@ -52253,7 +52300,7 @@ var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { this.unload(); } resolveLink(linkText, sourcePath) { - const link = (0, import_obsidian33.parseLinktext)(linkText); + const link = (0, import_obsidian34.parseLinktext)(linkText); const tFile = link ? this.plugin.app.metadataCache.getFirstLinkpathDest( link.path, sourcePath != null ? sourcePath : "" @@ -52301,7 +52348,7 @@ var FlowEditor = class extends nosuper(import_obsidian33.HoverPopover) { } buildEphemeralState(file, link) { const cache = this.plugin.app.metadataCache.getFileCache(file); - const subpath = cache ? (0, import_obsidian33.resolveSubpath)(cache, (link == null ? void 0 : link.subpath) || "") : void 0; + const subpath = cache ? (0, import_obsidian34.resolveSubpath)(cache, (link == null ? void 0 : link.subpath) || "") : void 0; const eState = { subpath: link == null ? void 0 : link.subpath }; if (subpath) { eState.line = subpath.start.line; @@ -52451,7 +52498,7 @@ var loadFlowEditor = (leaf, cm, flowEditorInfo2, source, plugin) => { ); } } else { - if (aFile instanceof import_obsidian34.TFolder) { + if (aFile instanceof import_obsidian35.TFolder) { if (!dom.hasAttribute("ready")) { dom.setAttribute("ready", ""); createFlowEditorInElement( @@ -52664,7 +52711,7 @@ var FlowView = k3((props2, ref2) => { triggerMenu(e4) { var _a3, _b2; if (((_b2 = (_a3 = leafRef.current) == null ? void 0 : _a3.view) == null ? void 0 : _b2.editor) && fileRef.current) { - const menu = new import_obsidian35.Menu(); + const menu = new import_obsidian36.Menu(); leafRef.current.view.onPaneMenu(menu, "more-options"); if (isMouseEvent(e4)) { menu.showAtPosition({ x: e4.pageX, y: e4.pageY }); @@ -53110,7 +53157,7 @@ var SelectableFrameNode = (props2) => { }; // src/react/components/SpaceView/Frames/FrameEditorView.tsx -var import_obsidian36 = require("obsidian"); +var import_obsidian37 = require("obsidian"); // src/react/components/SpaceView/Frames/Setters/CodeEditorSetter.tsx var CodeEditorSetter = (props2) => { @@ -53182,14 +53229,14 @@ var PropsPanel = (props2) => { editable: true, value: [], options: f4.map((m5) => ({ name: m5, value: m5 })), - saveOptions: (_12, value) => addTag(value[0]), + saveOptions: (_12, value) => addTag2(value[0]), placeholder: i18n_default.labels.contextItemSelectPlaceholder, searchable: true, showAll: true } ); }; - const addTag = (tag) => { + const addTag2 = (tag) => { saveContexts({ ...props2.contexts, [tag]: "" }, root.node); }; const [newProp, setNewProp] = h2(""); @@ -53333,7 +53380,7 @@ var openFrameEditor = async (plugin, path, schema) => { window.dispatchEvent(evt); } }; -var FrameEditorView = class extends import_obsidian36.ItemView { +var FrameEditorView = class extends import_obsidian37.ItemView { constructor(leaf, plugin, viewType) { super(leaf); this.navigation = true; @@ -53405,8 +53452,8 @@ var FrameEditorView = class extends import_obsidian36.ItemView { }; // src/react/components/UI/Modals/saveViewModal.ts -var import_obsidian37 = require("obsidian"); -var SaveViewModal = class extends import_obsidian37.Modal { +var import_obsidian38 = require("obsidian"); +var SaveViewModal = class extends import_obsidian38.Modal { constructor(schema, saveSchema, action) { super(app); this.schema = schema; @@ -53872,8 +53919,8 @@ var SpacePropertyEditor = (props2) => { const newContexts = (e4) => { const offset2 = e4.target.getBoundingClientRect(); const f4 = loadTags(props2.plugin); - const addTag = async (tag) => { - const newTag = tagToTagPath(tag); + const addTag2 = async (tag) => { + const newTag = ensureTag(tag); props2.saveContexts([ ...props2.contexts.filter((f5) => f5 != newTag), newTag @@ -53887,7 +53934,7 @@ var SpacePropertyEditor = (props2) => { editable: true, value: [], options: f4.map((m5) => ({ name: m5, value: m5 })), - saveOptions: (_12, value) => addTag(value[0]), + saveOptions: (_12, value) => addTag2(value[0]), placeholder: i18n_default.labels.contextItemSelectPlaceholder, searchable: true, showAll: true @@ -54006,7 +54053,6 @@ var SpacePropertyEditor = (props2) => { )); }; function SortableItem2(props2) { - var _a2, _b2; const { spaceInfo } = q2(SpaceContext); const { field } = props2; const saveField = (field2, oldField) => { @@ -54021,7 +54067,7 @@ function SortableItem2(props2) { transform: CSS.Transform.toString(transform), transition }; - const icon = ((_a2 = props2.field.attrs) == null ? void 0 : _a2.length) > 0 ? props2.field.attrs : (_b2 = fieldTypeForType(props2.field.type)) == null ? void 0 : _b2.icon; + const icon = stickerForField(props2.field); const selectedType = (_12, value) => { const newField = { ...props2.field, @@ -54068,7 +54114,7 @@ function SortableItem2(props2) { } // src/react/components/UI/Modals/contextEditorModal.tsx -var ContextEditorModal = class extends import_obsidian38.Modal { +var ContextEditorModal = class extends import_obsidian39.Modal { constructor(plugin, space, db, view, type) { super(plugin.app); this.space = space; @@ -54109,7 +54155,7 @@ var ContextEditorModal = class extends import_obsidian38.Modal { } }; var SpacePropertyEditorContext = (props2) => { - var _a2, _b2; + var _a2; const { spaceCache } = q2(SpaceContext); const { predicate, @@ -54120,6 +54166,12 @@ var SpacePropertyEditorContext = (props2) => { saveColumn } = q2(ContextEditorContext); const { tableData } = q2(ContextMDBContext); + const columns = F2(() => { + var _a3; + return ((_a3 = tableData == null ? void 0 : tableData.cols) != null ? _a3 : []).sort( + (a5, b4) => predicate.colsOrder.findIndex((x5) => x5 == a5.name) - predicate.colsOrder.findIndex((x5) => x5 == b4.name) + ); + }, [tableData, predicate]); const saveContexts = (contexts) => { saveSpaceMetadataValue( props2.plugin, @@ -54133,8 +54185,8 @@ var SpacePropertyEditorContext = (props2) => { colsOrder: predicate.colsOrder, setColumnOrder: (cols) => savePredicate({ ...predicate, colsOrder: cols }), colsHidden: predicate.colsHidden, - columns: (_a2 = sortedColumns.filter((f4) => f4.table == "")) != null ? _a2 : [], - contexts: (_b2 = spaceCache == null ? void 0 : spaceCache.contexts) != null ? _b2 : [], + columns, + contexts: (_a2 = spaceCache == null ? void 0 : spaceCache.contexts) != null ? _a2 : [], saveContexts, hideColumn, delColumn, @@ -54232,7 +54284,7 @@ var FilterBar = (props2) => { }); }; const viewContextMenu = (e4, _schema) => { - const fileMenu = new import_obsidian39.Menu(); + const fileMenu = new import_obsidian40.Menu(); fileMenu.addSeparator(); fileMenu.addItem((menuItem) => { menuItem.setTitle("Copy Embed Link"); @@ -54269,7 +54321,7 @@ var FilterBar = (props2) => { } }; const showFilterMenu = (e4) => { - const menu = new import_obsidian39.Menu(); + const menu = new import_obsidian40.Menu(); menu.addItem((item) => { item.setTitle(i18n_default.menu.tableView); item.setIcon("table-2"); @@ -54601,7 +54653,7 @@ var FilterBar = (props2) => { case "text": case "number": { - const menu = new import_obsidian39.Menu(); + const menu = new import_obsidian40.Menu(); menu.setUseNativeMenu(false); const saveFilterValue = (value) => { const newFilter = { @@ -54807,7 +54859,7 @@ var SpaceQuery = (props2) => { case "text": case "number": { - const menu = new import_obsidian40.Menu(); + const menu = new import_obsidian41.Menu(); menu.setUseNativeMenu(false); menu.addItem((menuItem) => { inputMenuItem( @@ -55086,7 +55138,7 @@ var SpaceQuery = (props2) => { ); const frontmatter = allMetadataForFiles( props2.plugin, - allFiles.map((f5) => getAbstractFileAtPath(props2.plugin, f5.path)).filter((f5) => f5 instanceof import_obsidian40.TFile) + allFiles.map((f5) => getAbstractFileAtPath(props2.plugin, f5.path)).filter((f5) => f5 instanceof import_obsidian41.TFile) ); const fmTypes = guestimateTypes( allFiles.map((f5) => f5.path), @@ -55252,16 +55304,15 @@ var SpaceEditor = (props2) => { ); const saveSpace = async () => { var _a3, _b3; - console.log("save space"); const newName = name.replace(/\//g, ""); const parentPath = ((_a3 = props2.space) == null ? void 0 : _a3.parent) ? props2.space.parent : ((_b3 = props2.parent) == null ? void 0 : _b3.type) == "folder" ? props2.parent.path : "/"; const newPath = !parentPath || parentPath == "/" ? newName : parentPath + "/" + newName; if (newName.length == 0) { - new import_obsidian41.Notice(i18n_default.notice.newSpaceName); + new import_obsidian42.Notice(i18n_default.notice.newSpaceName); return; } if (props2.plugin.index.spacesIndex.has(newPath) && (!props2.space || newPath != props2.space.path)) { - new import_obsidian41.Notice(i18n_default.notice.duplicateSpaceName); + new import_obsidian42.Notice(i18n_default.notice.duplicateSpaceName); return; } if (props2.space) { @@ -55407,7 +55458,7 @@ var SpaceEditor = (props2) => { var SpaceEditor_default = SpaceEditor; // src/react/components/UI/Modals/editSpaceModal.tsx -var EditSpaceModal = class extends import_obsidian42.Modal { +var EditSpaceModal = class extends import_obsidian43.Modal { constructor(plugin, space, action, metadata, parent, dontOpen) { super(plugin.app); this.space = space; @@ -55449,8 +55500,8 @@ var EditSpaceModal = class extends import_obsidian42.Modal { }; // src/react/components/UI/Modals/deleteModal.tsx -var import_obsidian43 = require("obsidian"); -var DeleteModal = class extends import_obsidian43.Modal { +var import_obsidian44 = require("obsidian"); +var DeleteModal = class extends import_obsidian44.Modal { constructor(plugin, confirmAction, title, message) { super(plugin.app); this.confirmAction = confirmAction; @@ -55487,9 +55538,73 @@ var DeleteModal = class extends import_obsidian43.Modal { } }; +// src/react/components/UI/Modals/tagChangeModal.tsx +var import_obsidian45 = require("obsidian"); +var TagChangeModal = class extends import_obsidian45.Modal { + constructor(plugin, action, tag) { + super(plugin.app); + this.action = action; + this.plugin = plugin; + this.tag = tag; + } + onOpen() { + const { contentEl } = this; + let headerText; + if (this.action === "rename") { + headerText = "Rename Tag"; + } else if (this.action === "create tag") { + headerText = "New Tag"; + } + const headerEl = contentEl.createEl("div", { text: headerText }); + headerEl.addClass("modal-title"); + const inputEl = contentEl.createEl("input"); + inputEl.style.cssText = "width: 100%; height: 2.5em; margin-bottom: 15px;"; + if (this.action === "rename") { + inputEl.value = this.tag; + } + inputEl.focus(); + let changeButtonText; + if (this.action === "rename") { + changeButtonText = "Rename Tag"; + } else if (this.action === "create tag") { + changeButtonText = "Create Tag"; + } + const changeButton = contentEl.createEl("button", { + text: changeButtonText + }); + const cancelButton = contentEl.createEl("button", { + text: i18n_default.buttons.cancel + }); + cancelButton.style.cssText = "float: right;"; + cancelButton.addEventListener("click", () => { + this.close(); + }); + const onClickAction = async () => { + const newName = inputEl.value; + if (this.action === "rename") { + renameTag(this.plugin, this.tag, newName); + } else if (this.action === "create tag") { + addTag(this.plugin, newName); + } + this.close(); + }; + changeButton.addEventListener("click", onClickAction); + inputEl.addEventListener("keydown", (e4) => { + if (e4.key === "Enter") { + e4.preventDefault(); + onClickAction(); + } + }); + } + onClose() { + const { contentEl } = this; + contentEl.empty(); + } +}; + // src/react/components/UI/Menus/fileMenu.tsx var showSpaceAddMenu = (plugin, e4, space, dontOpen) => { - const fileMenu = new import_obsidian44.Menu(); + const fileMenu = new import_obsidian46.Menu(); fileMenu.addItem((menuItem) => { menuItem.setIcon("edit"); menuItem.setTitle(i18n_default.buttons.createNote); @@ -55505,7 +55620,7 @@ var showSpaceAddMenu = (plugin, e4, space, dontOpen) => { }); }); fileMenu.addItem((menuItem) => { - menuItem.setIcon("plus"); + menuItem.setIcon("folder-plus"); menuItem.setTitle(i18n_default.buttons.createFolder); menuItem.onClick((ev) => { const vaultChangeModal = new EditSpaceModal( @@ -55541,16 +55656,46 @@ var showSpaceAddMenu = (plugin, e4, space, dontOpen) => { var triggerSpaceMenu = (plugin, space, e4, activeFile, parentSpace) => { if (!space) return; - const spaceMenu = new import_obsidian44.Menu(); - if (space.type != "default") { - spaceMenu.addItem((menuItem) => { - menuItem.setIcon("arrow-up-right"); - menuItem.setTitle(i18n_default.menu.openSpace); - menuItem.onClick((ev) => { - openSpace(space.path, plugin, false); + const spaceMenu = new import_obsidian46.Menu(); + spaceMenu.addItem((menuItem) => { + menuItem.setIcon("edit"); + menuItem.setTitle(i18n_default.buttons.createNote); + menuItem.onClick((ev) => { + newFileInSpace(plugin, space, activeFile); + }); + }); + spaceMenu.addItem((menuItem) => { + menuItem.setIcon("layout-dashboard"); + menuItem.setTitle(i18n_default.buttons.createCanvas); + menuItem.onClick((ev) => { + newFileInSpace(plugin, space, activeFile, true); + }); + }); + spaceMenu.addItem((menuItem) => { + menuItem.setIcon("folder-plus"); + menuItem.setTitle(i18n_default.buttons.createFolder); + menuItem.onClick((ev) => { + const vaultChangeModal = new EditSpaceModal( + plugin, + null, + "create", + null, + space + ); + vaultChangeModal.open(); + }); + }); + spaceMenu.addItem((menuItem) => { + menuItem.setIcon("pin"); + menuItem.setTitle(i18n_default.buttons.addIntoSpace); + menuItem.onClick((ev) => { + showLinkMenu(e4, plugin, (link) => { + insertSpaceItemAtIndex(plugin, space, link); }); }); - spaceMenu.addSeparator(); + }); + spaceMenu.addSeparator(); + if (space.type != "default") { spaceMenu.addItem((menuItem) => { menuItem.setIcon("arrow-up-right"); menuItem.setTitle(i18n_default.menu.revealInDefault); @@ -55559,7 +55704,7 @@ var triggerSpaceMenu = (plugin, space, e4, activeFile, parentSpace) => { plugin, space.type == "folder" ? space.path : `${plugin.settings.spacesFolder}/${space.name}` ); - if (file instanceof import_obsidian44.TFolder) { + if (file instanceof import_obsidian46.TFolder) { const leaf = plugin.app.workspace.getLeaf(false); app.workspace.setActiveLeaf(leaf, { focus: true }); leaf.openFile(file, { eState: { focus: true } }); @@ -55588,35 +55733,6 @@ var triggerSpaceMenu = (plugin, space, e4, activeFile, parentSpace) => { }); }); spaceMenu.addSeparator(); - spaceMenu.addItem((menuItem) => { - menuItem.setIcon("edit"); - menuItem.setTitle(i18n_default.buttons.createNote); - menuItem.onClick((ev) => { - newFileInSpace(plugin, space, activeFile); - }); - }); - spaceMenu.addItem((menuItem) => { - menuItem.setIcon("layout-dashboard"); - menuItem.setTitle(i18n_default.buttons.createCanvas); - menuItem.onClick((ev) => { - newFileInSpace(plugin, space, activeFile, true); - }); - }); - spaceMenu.addItem((menuItem) => { - menuItem.setIcon("folder-plus"); - menuItem.setTitle(i18n_default.buttons.createFolder); - menuItem.onClick((ev) => { - const vaultChangeModal = new EditSpaceModal( - plugin, - null, - "create", - null, - space - ); - vaultChangeModal.open(); - }); - }); - spaceMenu.addSeparator(); if (plugin.settings.spacesStickers) { spaceMenu.addSeparator(); spaceMenu.addItem((menuItem) => { @@ -55662,7 +55778,7 @@ var triggerSpaceMenu = (plugin, space, e4, activeFile, parentSpace) => { menuItem.setTitle(i18n_default.menu.sortBy); menuItem.setIcon("sort-desc"); menuItem.onClick((ev) => { - const sortMenu = new import_obsidian44.Menu(); + const sortMenu = new import_obsidian46.Menu(); sortMenu.addItem((menuItem2) => { menuItem2.setIcon("arrow-up-down"); menuItem2.setTitle(i18n_default.menu.groupSpaces); @@ -55761,7 +55877,7 @@ var triggerSpaceMenu = (plugin, space, e4, activeFile, parentSpace) => { }); }); spaceMenu.addSeparator(); - if (space.type == "folder") + if (space.type == "folder") { spaceMenu.addItem((menuItem) => { menuItem.setTitle(i18n_default.menu.edit); menuItem.setIcon("pencil"); @@ -55775,6 +55891,20 @@ var triggerSpaceMenu = (plugin, space, e4, activeFile, parentSpace) => { vaultChangeModal.open(); }); }); + } else if (space.type == "tag") { + spaceMenu.addItem((menuItem) => { + menuItem.setTitle(i18n_default.menu.rename); + menuItem.setIcon("pencil"); + menuItem.onClick((ev) => { + const vaultChangeModal = new TagChangeModal( + plugin, + "rename", + space.name + ); + vaultChangeModal.open(); + }); + }); + } } if (parentSpace && parentSpace != space.parent) { const spaceCache = plugin.index.spacesIndex.get(parentSpace); @@ -55813,7 +55943,7 @@ var triggerSpaceMenu = (plugin, space, e4, activeFile, parentSpace) => { }; var triggerMultiFileMenu = (plugin, selectedFiles, e4) => { const files = selectedFiles.map((s5) => s5.item.path); - const fileMenu = new import_obsidian44.Menu(); + const fileMenu = new import_obsidian46.Menu(); fileMenu.addSeparator(); fileMenu.addItem((menuItem) => { menuItem.setIcon("pin"); @@ -55920,7 +56050,7 @@ var triggerMultiFileMenu = (plugin, selectedFiles, e4) => { }; var triggerFileMenu = (plugin, file, isFolder, e4, space) => { const cache = plugin.index.filesIndex.get(file.path); - const fileMenu = new import_obsidian44.Menu(); + const fileMenu = new import_obsidian46.Menu(); fileMenu.addSeparator(); fileMenu.addItem((menuItem) => { menuItem.setIcon("pin"); @@ -55942,12 +56072,12 @@ var triggerFileMenu = (plugin, file, isFolder, e4, space) => { ); }); }); - if (file instanceof import_obsidian44.TFile && file.extension == "md") + if (file instanceof import_obsidian46.TFile && file.extension == "md") fileMenu.addItem((menuItem) => { menuItem.setTitle(i18n_default.menu.changeToFolderNote); menuItem.setIcon("file-plus-2"); menuItem.onClick((ev) => { - if (file instanceof import_obsidian44.TFile) + if (file instanceof import_obsidian46.TFile) noteToFolderNote(plugin, file, true); }); }); @@ -56055,9 +56185,9 @@ var triggerFileMenu = (plugin, file, isFolder, e4, space) => { }; // src/react/components/UI/Menus/fmMenu.tsx -var import_obsidian45 = require("obsidian"); +var import_obsidian47 = require("obsidian"); var showFMMenu = (plugin, position, property, deleteProperty, syncProperty, renameProperty, changeType) => { - const menu = new import_obsidian45.Menu(); + const menu = new import_obsidian47.Menu(); menu.setUseNativeMenu(false); menu.addItem((menuItem) => { var _a2; @@ -56388,15 +56518,12 @@ var FileContextList = (props2) => { } }), /* @__PURE__ */ Cn.createElement("div", { className: "mk-file-context-field-key" - }, f4.name, /* @__PURE__ */ Cn.createElement("div", { + }, f4.name), /* @__PURE__ */ Cn.createElement("div", { className: "mk-file-context-field-space mk-icon-xsmall", dangerouslySetInnerHTML: { - __html: stickerFromString( - spaceCache.sticker, - props2.plugin - ) + __html: stickerFromString(spaceCache.sticker, props2.plugin) } - }))), !f4.type.startsWith("object") && /* @__PURE__ */ Cn.createElement("div", { + })), !f4.type.startsWith("object") && /* @__PURE__ */ Cn.createElement("div", { className: "mk-file-context-value" }, /* @__PURE__ */ Cn.createElement(DataTypeView, { plugin: props2.plugin, @@ -56461,7 +56588,7 @@ var FileContextList = (props2) => { }; // src/react/components/MarkdownEditor/ReadingViewHeader.tsx -var import_obsidian47 = require("obsidian"); +var import_obsidian49 = require("obsidian"); var NoteBannerView = (props2) => { var _a2; const [banner, setBanner] = h2(null); @@ -56479,7 +56606,7 @@ var NoteBannerView = (props2) => { if (!props2.path || props2.path.type == "file") return; e4.preventDefault(); - const fileMenu = new import_obsidian47.Menu(); + const fileMenu = new import_obsidian49.Menu(); fileMenu.addSeparator(); fileMenu.addItem((menuItem) => { menuItem.setTitle(i18n_default.buttons.changeBanner); @@ -56631,7 +56758,7 @@ var InlineFileContextView = (props2) => { }; const fileName = F2(() => { var _a2; - return (_a2 = cache == null ? void 0 : cache.name) != null ? _a2 : ""; + return (_a2 = cache == null ? void 0 : cache.displayName) != null ? _a2 : ""; }, [cache]); const newProperty = (e4) => { const offset2 = e4.target.getBoundingClientRect(); @@ -56651,13 +56778,11 @@ var InlineFileContextView = (props2) => { const newValue = import_he.default.decode(e4.target.innerHTML); if (newValue != fileName) { if (props2.plugin.settings.spacesUseAlias) { - saveFrontmatterValue( + updatePrimaryAlias( props2.plugin, cache.path, - props2.plugin.settings.fmKeyAlias, - newValue.trim(), - "text", - true + cache.aliases, + newValue.trim() ); } else { renameFile(props2.plugin, file, newValue.trim()); @@ -56871,10 +56996,10 @@ var InlineFileContextView = (props2) => { }; // src/types/space.ts -var FMMetadataKeys = (plugin) => [plugin.settings.fmKeyBanner, plugin.settings.fmKeySticker, plugin.settings.fmKeyColor]; +var FMMetadataKeys = (plugin) => [plugin.settings.fmKeyAlias, plugin.settings.fmKeyBanner, plugin.settings.fmKeySticker, plugin.settings.fmKeyColor]; var waypointsSpace = { name: "Waypoints", - alias: "Waypoints", + displayName: "Waypoints", path: "spaces://$waypoints", metadata: { contexts: [] @@ -56887,7 +57012,7 @@ var waypointsSpace = { }; var tagsSpace = { name: "Tags", - alias: "Tags", + displayName: "Tags", path: "spaces://$tags", metadata: { contexts: [] @@ -57120,12 +57245,21 @@ var SpaceBodyView = (props2) => { // src/react/components/SpaceView/TitleComponent.tsx var TitleComponent = (props2) => { const fileNameRef = _2(null); - const name = pathDisplayName(props2.space.space.uri, props2.plugin); + const name = props2.plugin.settings.spacesUseAlias ? props2.space.displayName : pathDisplayName(props2.space.space.uri, props2.plugin); const contentEditable = !(props2.space.space.readOnly || props2.space.type == "vault"); const onBlur = (e4) => { const newValue = e4.target.innerHTML; if (newValue != name) { - renamePath(props2.plugin, props2.space.space.uri, newValue); + if (props2.plugin.settings.spacesUseAlias) { + saveSpacePrimaryAlias( + props2.plugin, + props2.space.path, + newValue, + props2.space.aliases + ); + } else { + renamePath(props2.plugin, props2.space.space.uri, newValue); + } } }; const onKeyPress = (e4) => { @@ -57334,7 +57468,7 @@ var SpaceOuter = (props2) => { // src/react/components/SpaceView/Contexts/SpaceView.tsx var SPACE_VIEW_TYPE = "mk-space"; -var SpaceView = class extends import_obsidian48.ItemView { +var SpaceView = class extends import_obsidian50.ItemView { constructor(leaf, plugin, viewType) { super(leaf); this.navigation = true; @@ -57424,7 +57558,7 @@ var tFileToAFile = (file) => { var _a2, _b2, _c2; if (!file) return null; - if (file instanceof import_obsidian49.TFile && file.stat) { + if (file instanceof import_obsidian51.TFile && file.stat) { return { isFolder: false, name: file.basename, @@ -57449,7 +57583,7 @@ var defaultNoteFolder = (plugin, activeFile) => { }; var defaultConfigFile = async (plugin) => { return await plugin.app.vault.adapter.read( - (0, import_obsidian49.normalizePath)(plugin.app.vault.configDir + "/app.json") + (0, import_obsidian51.normalizePath)(plugin.app.vault.configDir + "/app.json") ); }; var appendFilesMetaData = (plugin, propType, filesString) => { @@ -57542,7 +57676,7 @@ function getAllAbstractFilesInVault(plugin) { const rootFolder = plugin.app.vault.getRoot(); function recursiveFx(folder) { for (const child of folderChildren(plugin, folder)) { - if (child instanceof import_obsidian49.TFolder) { + if (child instanceof import_obsidian51.TFolder) { const childFolder = child; if (childFolder.children) recursiveFx(childFolder); @@ -57560,7 +57694,7 @@ var getFolderFromPath = (plugin, path) => { const afile = getAbstractFileAtPath(plugin, removeTrailingSlashFromFolder(path)); if (!afile) return null; - return afile instanceof import_obsidian49.TFolder ? afile : afile.parent; + return afile instanceof import_obsidian51.TFolder ? afile : afile.parent; }; var getFolderPathFromString = (plugin, file) => { var _a2; @@ -57660,7 +57794,7 @@ function getAllFoldersInVault(plugin) { folders.push(rootFolder); function recursiveFx(folder) { for (const child of folder.children) { - if (child instanceof import_obsidian49.TFolder) { + if (child instanceof import_obsidian51.TFolder) { const childFolder = child; folders.push(childFolder); if (childFolder.children) @@ -57672,9 +57806,9 @@ function getAllFoldersInVault(plugin) { return folders; } var openAFile = async (file, plugin, newLeaf) => { - if (file instanceof import_obsidian49.TFolder) { + if (file instanceof import_obsidian51.TFolder) { openTFolder(file, plugin, newLeaf); - } else if (file instanceof import_obsidian49.TFile) { + } else if (file instanceof import_obsidian51.TFile) { openTFile(file, plugin, newLeaf); } else { return; @@ -57783,12 +57917,12 @@ var createNewMarkdownFile = async (plugin, folder, newFileName, content, dontOpe return newFile; }; var platformIsMobile = () => { - return import_obsidian49.Platform.isMobile; + return import_obsidian51.Platform.isMobile; }; var noteToFolderNote = async (plugin, file, open) => { const folderPath = fileNameToString(file.path); const folder = getAbstractFileAtPath(plugin, folderPath); - if (folder && folder instanceof import_obsidian49.TFolder) { + if (folder && folder instanceof import_obsidian51.TFolder) { if (open) { openTFolder(folder, plugin, false); } @@ -57818,7 +57952,7 @@ var folderNoteCache = (plugin, file) => { if (!folderPath) return null; const folder = getAbstractFileAtPath(plugin, folderPath); - if (folder instanceof import_obsidian49.TFolder && folder.name == file.name) { + if (folder instanceof import_obsidian51.TFolder && folder.name == file.name) { return { folderNotePath: file.path, folderPath: folder.path @@ -57939,7 +58073,11 @@ var spaceFromFolder = (plugin, folder, readOnly) => { var linkContextRow = (plugin, row, fields) => { return { ...row, - ...fields.filter((f4) => f4.type == "fileprop").reduce((p3, c4) => { + ...fields.filter((f4) => f4.type == "fileprop" || f4.name == "tags").reduce((p3, c4) => { + var _a2; + if (c4.name == "tags") { + return { ...p3, "tags": serializeMultiString([...(_a2 = plugin.index.tagsMap.get(row["File"])) != null ? _a2 : []]) }; + } const { field, property } = parsePropString(c4.value); const col = fields.find((f4) => f4.name == field); if (!col || !property) { @@ -58304,8 +58442,8 @@ var FlowEditorSelector = class extends import_view4.WidgetType { const div = document.createElement("div"); div.toggleClass("mk-floweditor-selector", true); const reactEl = createRoot(div); - if (this.info.link && view.state.field(import_obsidian50.editorInfoField, false)) { - const infoField = view.state.field(import_obsidian50.editorInfoField, false); + if (this.info.link && view.state.field(import_obsidian52.editorInfoField, false)) { + const infoField = view.state.field(import_obsidian52.editorInfoField, false); const file = infoField.file; const path = uriByString(this.plugin, this.info.link, file.path); reactEl.render( @@ -58889,7 +59027,7 @@ var placeholderExtension = (plugin) => import_state9.StateField.define({ // src/codemirror/extensions/inlineContext/inlineContext.tsx var import_state10 = require("@codemirror/state"); -var import_obsidian51 = require("obsidian"); +var import_obsidian53 = require("obsidian"); var frontmatterHider = (plugin) => import_state10.EditorState.transactionFilter.of((tr) => { const newTrans = []; const isFM = (typeString) => { @@ -58907,7 +59045,7 @@ var frontmatterHider = (plugin) => import_state10.EditorState.transactionFilter. } } }); - const livePreview = tr.state.field(import_obsidian51.editorLivePreviewField, false); + const livePreview = tr.state.field(import_obsidian53.editorLivePreviewField, false); if (fmStart > 1 && fmStart <= tr.state.doc.lines && plugin.settings.hideFrontmatter && livePreview) { newTrans.push({ annotations: [contentRange.of([fmStart, fmEnd])] @@ -58954,10 +59092,10 @@ var cmExtensions = (plugin, mobile) => { }; // src/main.ts -var import_obsidian68 = require("obsidian"); +var import_obsidian70 = require("obsidian"); // src/react/components/SpaceView/Editor/MakeMenu/MakeMenu.tsx -var import_obsidian53 = require("obsidian"); +var import_obsidian55 = require("obsidian"); // src/react/components/SpaceView/Editor/MakeMenu/commands/default.ts var default_default2 = [ @@ -59073,7 +59211,7 @@ function resolveCommands(plugin) { } // src/react/components/SpaceView/Editor/MakeMenu/MakeMenu.tsx -var MakeMenu = class extends import_obsidian53.EditorSuggest { +var MakeMenu = class extends import_obsidian55.EditorSuggest { constructor(app2, plugin) { super(app2); this.inCmd = false; @@ -59167,8 +59305,8 @@ var MakeMenu = class extends import_obsidian53.EditorSuggest { }; // src/react/components/SpaceView/Editor/StickerMenu/StickerMenu.tsx -var import_obsidian54 = require("obsidian"); -var StickerMenu = class extends import_obsidian54.EditorSuggest { +var import_obsidian56 = require("obsidian"); +var StickerMenu = class extends import_obsidian56.EditorSuggest { constructor(app2, plugin) { super(app2); this.inCmd = false; @@ -59332,7 +59470,7 @@ var replaceAllEmbed = (el, ctx, plugin) => { }; // src/react/components/Navigator/FileTreeView.tsx -var import_obsidian57 = require("obsidian"); +var import_obsidian59 = require("obsidian"); // src/react/context/SidebarContext.tsx var import_lodash12 = __toESM(require_lodash()); @@ -60913,7 +61051,7 @@ var TreeItem = k3( fileCache }), /* @__PURE__ */ Cn.createElement("div", { className: `mk-tree-text ${isFolder ? "nav-folder-title-content" : "nav-file-title-content"}` - }, plugin.settings.spacesUseAlias ? fileCache.alias : fileCache.name, isLink && plugin.settings.showSpacePinIcon && /* @__PURE__ */ Cn.createElement("span", { + }, fileCache.displayName, isLink && plugin.settings.showSpacePinIcon && /* @__PURE__ */ Cn.createElement("span", { className: "mk-file-link", dangerouslySetInnerHTML: { __html: stickerFromString("lucide//pin", plugin) @@ -62321,11 +62459,11 @@ var FileExplorerComponent = (props2) => { // src/react/components/Navigator/MainMenu.tsx var import_classnames7 = __toESM(require_classnames()); -var import_obsidian56 = require("obsidian"); +var import_obsidian58 = require("obsidian"); // src/react/components/UI/Modals/hiddenFilesModal.tsx -var import_obsidian55 = require("obsidian"); -var HiddenItemsModal = class extends import_obsidian55.Modal { +var import_obsidian57 = require("obsidian"); +var HiddenItemsModal = class extends import_obsidian57.Modal { constructor(plugin) { super(plugin.app); this.plugin = plugin; @@ -62558,7 +62696,7 @@ var MainMenu = (props2) => { }; const showMenu = () => { const { spaceActive, leafs } = refreshLeafs(); - const menu = new import_obsidian56.Menu(); + const menu = new import_obsidian58.Menu(); !spaceActive && menu.addItem((menuItem) => { menuItem.setIcon("lucide-arrow-left"); menuItem.setTitle(i18n_default.menu.backToSpace); @@ -62757,7 +62895,7 @@ var MainMenu = (props2) => { }, draggable: true, onDragStart: () => setDragPaths([activeViewSpace.path]) - }), activeViewSpace.alias) : /* @__PURE__ */ Cn.createElement(Cn.Fragment, null), /* @__PURE__ */ Cn.createElement("div", { + }), activeViewSpace.displayName) : /* @__PURE__ */ Cn.createElement(Cn.Fragment, null), /* @__PURE__ */ Cn.createElement("div", { className: "mk-icon-xsmall", dangerouslySetInnerHTML: { __html: uiIconSet["mk-ui-collapse"] } })), /* @__PURE__ */ Cn.createElement("div", { @@ -63248,14 +63386,14 @@ var MainList = (props2) => { var FILE_TREE_VIEW_TYPE = "mk-file-view"; var VIEW_DISPLAY_TEXT = "Spaces"; var ICON = "layout-grid"; -var FileTreeView = class extends import_obsidian57.ItemView { +var FileTreeView = class extends import_obsidian59.ItemView { constructor(leaf, plugin) { super(leaf); this.navigation = false; this.plugin = plugin; } revealInFolder(file) { - if (file instanceof import_obsidian57.TFolder) { + if (file instanceof import_obsidian59.TFolder) { this.plugin.app.workspace.activeLeaf.setViewState({ type: SPACE_VIEW_TYPE, state: { path: file.path } @@ -63309,7 +63447,7 @@ var FileTreeView = class extends import_obsidian57.ItemView { }; // src/settings/settings.ts -var import_obsidian58 = require("obsidian"); +var import_obsidian60 = require("obsidian"); var DEFAULT_SETTINGS = { defaultInitialization: false, filePreviewOnHover: false, @@ -63328,7 +63466,7 @@ var DEFAULT_SETTINGS = { saveAllContextToFrontmatter: true, editorFlowStyle: "seamless", autoOpenFileContext: false, - activeView: "/", + activeView: "Spaces/Home", hideFrontmatter: true, activeSpace: "", defaultDateFormat: "MMM dd yyyy", @@ -63387,7 +63525,7 @@ var DEFAULT_SETTINGS = { enableHomeSpace: true, showSpacePinIcon: true }; -var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { +var MakeMDPluginSettingsTab = class extends import_obsidian60.PluginSettingTab { constructor(app2, plugin) { super(app2, plugin); this.plugin = plugin; @@ -63399,7 +63537,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { const { containerEl } = this; containerEl.empty(); containerEl.createEl("h1", { text: i18n_default.settings.sectionSidebar }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.spaces.name).setDesc(i18n_default.settings.spaces.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.spaces.name).setDesc(i18n_default.settings.spaces.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.spacesEnabled).onChange((value) => { this.plugin.settings.spacesEnabled = value; this.plugin.saveSettings(); @@ -63414,20 +63552,20 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { if (this.plugin.settings.spacesEnabled) { containerEl.createEl("h3", { text: i18n_default.settings.sectionDefault }); const defaultSpaces = containerEl.createEl("div"); - new import_obsidian58.Setting(defaultSpaces).setName(i18n_default.settings.defaultSpaces.name).setDesc(i18n_default.settings.defaultSpaces.desc).addToggle( + new import_obsidian60.Setting(defaultSpaces).setName(i18n_default.settings.defaultSpaces.name).setDesc(i18n_default.settings.defaultSpaces.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.enableDefaultSpaces).onChange((value) => { this.plugin.settings.enableDefaultSpaces = value; this.plugin.saveSettings(); }) ); if (this.plugin.settings.enableDefaultSpaces) { - new import_obsidian58.Setting(defaultSpaces).setName(i18n_default.settings.homeSpace.name).setDesc(i18n_default.settings.homeSpace.desc).addToggle( + new import_obsidian60.Setting(defaultSpaces).setName(i18n_default.settings.homeSpace.name).setDesc(i18n_default.settings.homeSpace.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.enableHomeSpace).onChange((value) => { this.plugin.settings.enableHomeSpace = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(defaultSpaces).setName(i18n_default.settings.tagSpaces.name).setDesc(i18n_default.settings.tagSpaces.desc).addToggle( + new import_obsidian60.Setting(defaultSpaces).setName(i18n_default.settings.tagSpaces.name).setDesc(i18n_default.settings.tagSpaces.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.enableTagSpaces).onChange((value) => { this.plugin.settings.enableTagSpaces = value; this.plugin.saveSettings(); @@ -63436,54 +63574,54 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { } containerEl.createEl("h3", { text: i18n_default.settings.sectionAppearance }); const spaceAppearances = containerEl.createEl("div"); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.sidebarTabs.name).setDesc(i18n_default.settings.sidebarTabs.desc).addToggle( + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.sidebarTabs.name).setDesc(i18n_default.settings.sidebarTabs.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.sidebarTabs).onChange((value) => { this.plugin.settings.sidebarTabs = value; this.plugin.saveSettings(); document.body.classList.toggle("mk-hide-tabs", !value); }) ); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.hideRibbon.name).setDesc(i18n_default.settings.hideRibbon.desc).addToggle( + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.hideRibbon.name).setDesc(i18n_default.settings.hideRibbon.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.showRibbon).onChange((value) => { this.plugin.settings.showRibbon = value; this.plugin.saveSettings(); document.body.classList.toggle("mk-hide-ribbon", !value); }) ); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.folderIndentationLines.name).setDesc(i18n_default.settings.folderIndentationLines.desc).addToggle( + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.folderIndentationLines.name).setDesc(i18n_default.settings.folderIndentationLines.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.folderIndentationLines).onChange((value) => { this.plugin.settings.folderIndentationLines = value; this.plugin.saveSettings(); document.body.classList.toggle("mk-folder-lines", value); }) ); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.spacesStickers.name).setDesc(i18n_default.settings.spacesStickers.desc).addToggle( + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.spacesStickers.name).setDesc(i18n_default.settings.spacesStickers.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.spacesStickers).onChange((value) => { this.plugin.settings.spacesStickers = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.spacesAlias.name).setDesc(i18n_default.settings.spacesAlias.desc).addToggle( + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.spacesAlias.name).setDesc(i18n_default.settings.spacesAlias.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.spacesUseAlias).onChange((value) => { this.plugin.settings.spacesUseAlias = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.readableLineWidth.name).setDesc(i18n_default.settings.readableLineWidth.desc).addToggle( + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.readableLineWidth.name).setDesc(i18n_default.settings.readableLineWidth.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.readableLineWidth).onChange((value) => { this.plugin.settings.readableLineWidth = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.openSpacesOnLaunch.name).setDesc(i18n_default.settings.openSpacesOnLaunch.desc).addToggle( + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.openSpacesOnLaunch.name).setDesc(i18n_default.settings.openSpacesOnLaunch.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.openSpacesOnLaunch).onChange((value) => { this.plugin.settings.openSpacesOnLaunch = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(spaceAppearances).setName(i18n_default.settings.spaceRowHeight.name).setDesc(i18n_default.settings.spaceRowHeight.desc).addText((text2) => { + new import_obsidian60.Setting(spaceAppearances).setName(i18n_default.settings.spaceRowHeight.name).setDesc(i18n_default.settings.spaceRowHeight.desc).addText((text2) => { text2.setValue(this.plugin.settings.spaceRowHeight.toString()).onChange(async (value) => { text2.setValue(parseInt(value).toString()); this.plugin.settings.spaceRowHeight = parseInt(value); @@ -63491,43 +63629,43 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }); }); containerEl.createEl("h3", { text: "Advanced" }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.expandFolder.name).setDesc(i18n_default.settings.expandFolder.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.expandFolder.name).setDesc(i18n_default.settings.expandFolder.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.expandFolderOnClick).onChange((value) => { this.plugin.settings.expandFolderOnClick = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.hoverPreview.name).setDesc(i18n_default.settings.hoverPreview.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.hoverPreview.name).setDesc(i18n_default.settings.hoverPreview.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.filePreviewOnHover).onChange((value) => { this.plugin.settings.filePreviewOnHover = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.activeFile.name).setDesc(i18n_default.settings.activeFile.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.activeFile.name).setDesc(i18n_default.settings.activeFile.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.revealActiveFile).onChange((value) => { this.plugin.settings.revealActiveFile = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.spacesFileExplorerDual.name).setDesc(i18n_default.settings.spacesFileExplorerDual.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.spacesFileExplorerDual.name).setDesc(i18n_default.settings.spacesFileExplorerDual.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.spacesDisablePatch).onChange((value) => { this.plugin.settings.spacesDisablePatch = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.spacesPerformance.name).setDesc(i18n_default.settings.spacesPerformance.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.spacesPerformance.name).setDesc(i18n_default.settings.spacesPerformance.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.spacesPerformance).onChange((value) => { this.plugin.settings.spacesPerformance = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.indexSVG.name).setDesc(i18n_default.settings.indexSVG.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.indexSVG.name).setDesc(i18n_default.settings.indexSVG.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.indexSVG).onChange((value) => { this.plugin.settings.indexSVG = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.spacesDeleteOption.name).setDesc(i18n_default.settings.spacesDeleteOption.desc).addDropdown((dropdown) => { + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.spacesDeleteOption.name).setDesc(i18n_default.settings.spacesDeleteOption.desc).addDropdown((dropdown) => { dropdown.addOption( "permanent", i18n_default.settings.spacesDeleteOptions.permanant @@ -63545,7 +63683,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }); } containerEl.createEl("h1", { text: "Context" }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.contexts.name).setDesc(i18n_default.settings.contexts.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.contexts.name).setDesc(i18n_default.settings.contexts.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.contextEnabled).onChange((value) => { this.plugin.settings.contextEnabled = value; this.plugin.saveSettings(); @@ -63553,27 +63691,27 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }) ); containerEl.createEl("h3", { text: i18n_default.settings.sectionAppearance }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.defaultDateFormat.name).setDesc(i18n_default.settings.defaultDateFormat.desc).addText((text2) => { + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.defaultDateFormat.name).setDesc(i18n_default.settings.defaultDateFormat.desc).addText((text2) => { text2.setValue(this.plugin.settings.defaultDateFormat).onChange(async (value) => { this.plugin.settings.defaultDateFormat = value; await this.plugin.saveSettings(); }); }); containerEl.createEl("h3", { text: i18n_default.settings.sectionAdvanced }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.openFileContext.name).setDesc(i18n_default.settings.openFileContext.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.openFileContext.name).setDesc(i18n_default.settings.openFileContext.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.autoOpenFileContext).onChange((value) => { this.plugin.settings.autoOpenFileContext = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.syncContextToFrontmatter.name).setDesc(i18n_default.settings.syncContextToFrontmatter.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.syncContextToFrontmatter.name).setDesc(i18n_default.settings.syncContextToFrontmatter.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.saveAllContextToFrontmatter).onChange((value) => { this.plugin.settings.saveAllContextToFrontmatter = value; this.plugin.saveSettings(); }) ); containerEl.createEl("h1", { text: "Blink" }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.blink.name).setDesc(i18n_default.settings.blink.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.blink.name).setDesc(i18n_default.settings.blink.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.blinkEnabled).onChange(async (value) => { this.plugin.settings.blinkEnabled = value; await this.plugin.saveSettings(); @@ -63581,7 +63719,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }) ); containerEl.createEl("h1", { text: i18n_default.settings.sectionFlow }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.editorMakerMode.name).setDesc(i18n_default.settings.editorMakerMode.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.editorMakerMode.name).setDesc(i18n_default.settings.editorMakerMode.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.makerMode).onChange((value) => { this.plugin.settings.makerMode = value; this.plugin.saveSettings(); @@ -63590,27 +63728,27 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { ); if (this.plugin.settings.makerMode) { containerEl.createEl("h3", { text: "Inline Context" }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.inlineContextExplorer.name).setDesc(i18n_default.settings.inlineContextExplorer.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.inlineContextExplorer.name).setDesc(i18n_default.settings.inlineContextExplorer.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.inlineContext).onChange((value) => { this.plugin.settings.inlineContext = value; this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.lineNumbers.name).setDesc(i18n_default.settings.lineNumbers.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.lineNumbers.name).setDesc(i18n_default.settings.lineNumbers.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.lineNumbers).onChange(async (value) => { this.plugin.settings.lineNumbers = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.inlineContextExpanded.name).setDesc(i18n_default.settings.inlineContextExpanded.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.inlineContextExpanded.name).setDesc(i18n_default.settings.inlineContextExpanded.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.inlineContextSectionsExpanded).onChange((value) => { this.plugin.settings.inlineContextSectionsExpanded = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.inlineContextHorizontal.name).setDesc(i18n_default.settings.inlineContextHorizontal.desc).addDropdown((dropdown) => { + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.inlineContextHorizontal.name).setDesc(i18n_default.settings.inlineContextHorizontal.desc).addDropdown((dropdown) => { dropdown.addOption("vertical", i18n_default.settings.layoutVertical); dropdown.addOption("horizontal", i18n_default.settings.layoutHorizontal); dropdown.setValue(this.plugin.settings.inlineContextNameLayout); @@ -63619,20 +63757,20 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { this.plugin.saveSettings(); }); }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.hideFrontmatter.name).setDesc(i18n_default.settings.hideFrontmatter.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.hideFrontmatter.name).setDesc(i18n_default.settings.hideFrontmatter.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.hideFrontmatter).onChange(async (value) => { this.plugin.settings.hideFrontmatter = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.dataviewInlineContext.name).setDesc(i18n_default.settings.dataviewInlineContext.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.dataviewInlineContext.name).setDesc(i18n_default.settings.dataviewInlineContext.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.dataviewInlineContext).onChange((value) => { this.plugin.settings.dataviewInlineContext = value; this.plugin.saveSettings(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.inlineBacklinks.name).setDesc(i18n_default.settings.inlineBacklinks.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.inlineBacklinks.name).setDesc(i18n_default.settings.inlineBacklinks.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.inlineBacklinks).onChange(async (value) => { this.plugin.settings.inlineBacklinks = value; await this.plugin.saveSettings(); @@ -63640,21 +63778,21 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }) ); containerEl.createEl("h3", { text: "Flow Block" }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.editorFlowReplace.name).setDesc(i18n_default.settings.editorFlowReplace.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.editorFlowReplace.name).setDesc(i18n_default.settings.editorFlowReplace.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.editorFlow).onChange((value) => { this.plugin.settings.editorFlow = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.internalLinkFlowEditor.name).setDesc(i18n_default.settings.internalLinkFlowEditor.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.internalLinkFlowEditor.name).setDesc(i18n_default.settings.internalLinkFlowEditor.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.internalLinkClickFlow).onChange(async (value) => { this.plugin.settings.internalLinkClickFlow = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.editorFlowStyle.name).setDesc(i18n_default.settings.editorFlowStyle.desc).addDropdown((dropdown) => { + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.editorFlowStyle.name).setDesc(i18n_default.settings.editorFlowStyle.desc).addDropdown((dropdown) => { dropdown.addOption("classic", i18n_default.settings.editorFlowStyle.classic); dropdown.addOption("seamless", i18n_default.settings.editorFlowStyle.seamless); dropdown.addOption("minimal", i18n_default.settings.editorFlowStyle.minimal); @@ -63672,14 +63810,14 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }); }); containerEl.createEl("h3", { text: "Flow Menu" }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.editorMakeMenu.name).setDesc(i18n_default.settings.editorMakeMenu.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.editorMakeMenu.name).setDesc(i18n_default.settings.editorMakeMenu.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.flowMenuEnabled).onChange(async (value) => { this.plugin.settings.flowMenuEnabled = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.makeChar.name).setDesc(i18n_default.settings.makeChar.desc).addText((text2) => { + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.makeChar.name).setDesc(i18n_default.settings.makeChar.desc).addText((text2) => { text2.setValue(this.plugin.settings.menuTriggerChar).onChange(async (value) => { if (value.length < 1) { text2.setValue(this.plugin.settings.menuTriggerChar); @@ -63694,7 +63832,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { await this.plugin.saveSettings(); }); }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.editorMakePlacholder.name).setDesc(i18n_default.settings.editorMakePlacholder.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.editorMakePlacholder.name).setDesc(i18n_default.settings.editorMakePlacholder.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.makeMenuPlaceholder).onChange(async (value) => { this.plugin.settings.makeMenuPlaceholder = value; await this.plugin.saveSettings(); @@ -63702,28 +63840,28 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }) ); containerEl.createEl("h3", { text: "Flow Styler" }); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.inlineStyler.name).setDesc(i18n_default.settings.inlineStyler.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.inlineStyler.name).setDesc(i18n_default.settings.inlineStyler.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.inlineStyler).onChange(async (value) => { this.plugin.settings.inlineStyler = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.inlineStickerMenu.name).setDesc(i18n_default.settings.inlineStickerMenu.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.inlineStickerMenu.name).setDesc(i18n_default.settings.inlineStickerMenu.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.inlineStickerMenu).onChange(async (value) => { this.plugin.settings.inlineStickerMenu = value; await this.plugin.saveSettings(); this.plugin.reloadExtensions(false); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.inlineStylerColor.name).setDesc(i18n_default.settings.inlineStylerColor.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.inlineStylerColor.name).setDesc(i18n_default.settings.inlineStylerColor.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.inlineStylerColors).onChange((value) => { this.plugin.settings.inlineStylerColors = value; this.plugin.saveSettings(); this.refreshView(); }) ); - new import_obsidian58.Setting(containerEl).setName(i18n_default.settings.mobileMakeBar.name).setDesc(i18n_default.settings.mobileMakeBar.desc).addToggle( + new import_obsidian60.Setting(containerEl).setName(i18n_default.settings.mobileMakeBar.name).setDesc(i18n_default.settings.mobileMakeBar.desc).addToggle( (toggle) => toggle.setValue(this.plugin.settings.mobileMakeBar).onChange((value) => { this.plugin.settings.mobileMakeBar = value; this.plugin.saveSettings(); @@ -63735,7 +63873,7 @@ var MakeMDPluginSettingsTab = class extends import_obsidian58.PluginSettingTab { }; // src/react/components/Blink/Blink.tsx -var import_obsidian59 = require("obsidian"); +var import_obsidian61 = require("obsidian"); // src/react/components/Blink/BlinkComponent.tsx var BlinkComponent = Cn.forwardRef( @@ -63811,7 +63949,7 @@ BlinkComponent.displayName = "BlinkComponent"; var BlinkComponent_default = BlinkComponent; // src/react/components/Blink/Blink.tsx -var Blink = class extends import_obsidian59.Modal { +var Blink = class extends import_obsidian61.Modal { constructor(app2, plugin) { super(app2); this.ref = Cn.createRef(); @@ -63844,11 +63982,11 @@ var Blink = class extends import_obsidian59.Modal { }; // src/react/components/Explorer/Explorer.tsx -var import_obsidian60 = require("obsidian"); +var import_obsidian62 = require("obsidian"); var FILE_CONTEXT_VIEW_TYPE = "make-context-view"; var ICON2 = "component"; var VIEW_DISPLAY_TEXT2 = "Explorer"; -var ContextExplorerLeafView = class extends import_obsidian60.ItemView { +var ContextExplorerLeafView = class extends import_obsidian62.ItemView { constructor(leaf, plugin) { super(leaf); this.navigation = false; @@ -64189,9 +64327,9 @@ var ExplorerContextRow = (props2) => { }; // src/react/components/SpaceView/Contexts/MDBFileViewer.tsx -var import_obsidian61 = require("obsidian"); +var import_obsidian63 = require("obsidian"); var MDB_FILE_VIEWER_TYPE = "make-mdb-viewer"; -var MDBFileViewer = class extends import_obsidian61.FileView { +var MDBFileViewer = class extends import_obsidian63.FileView { constructor(leaf, plugin) { super(leaf); this.navigation = true; @@ -64327,7 +64465,7 @@ var import_obsidian_dataview = __toESM(require_lib()); // src/superstate/superstate.ts var import_lodash13 = __toESM(require_lodash()); -var import_obsidian63 = require("obsidian"); +var import_obsidian65 = require("obsidian"); // src/types/indexMap.ts var _IndexMap = class { @@ -64558,7 +64696,7 @@ var LocalStorageCache = class { }; // src/superstate/workers/manager.ts -var import_obsidian62 = require("obsidian"); +var import_obsidian64 = require("obsidian"); // inline-worker:__inline-worker function inlineWorker(scriptText) { @@ -64571,11 +64709,11 @@ function inlineWorker(scriptText) { // src/superstate/workers/entry.worker.ts function Worker2() { - return inlineWorker('var qd=Object.create;var ru=Object.defineProperty,kd=Object.defineProperties,$d=Object.getOwnPropertyDescriptor,Hd=Object.getOwnPropertyDescriptors,Kd=Object.getOwnPropertyNames,Uo=Object.getOwnPropertySymbols,zd=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty,Yd=Object.prototype.propertyIsEnumerable;var No=(i,l,m)=>l in i?ru(i,l,{enumerable:!0,configurable:!0,writable:!0,value:m}):i[l]=m,Rt=(i,l)=>{for(var m in l||(l={}))Go.call(l,m)&&No(i,m,l[m]);if(Uo)for(var m of Uo(l))Yd.call(l,m)&&No(i,m,l[m]);return i},Lt=(i,l)=>kd(i,Hd(l));var Zd=(i,l)=>()=>(l||i((l={exports:{}}).exports,l),l.exports);var Xd=(i,l,m,w)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of Kd(l))!Go.call(i,y)&&y!==m&&ru(i,y,{get:()=>l[y],enumerable:!(w=$d(l,y))||w.enumerable});return i};var Jd=(i,l,m)=>(m=i!=null?qd(zd(i)):{},Xd(l||!i||!i.__esModule?ru(m,"default",{value:i,enumerable:!0}):m,i));var qo=Zd((oe,Me)=>{(function(){var i,l="4.17.21",m=200,w="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",O="Invalid `variable` option passed into `_.template`",J="__lodash_hash_undefined__",V=500,Y="__lodash_placeholder__",P=1,an=2,j=4,fn=1,Pn=2,nn=1,q=2,vt=4,hn=8,Bn=16,pn=32,gn=64,yn=128,W=256,dn=512,_n=30,Kn="...",Kt=800,Et=16,zn=1,Le=2,Ee=3,nt=1/0,Yn=9007199254740991,Oe=17976931348623157e292,Ot=0/0,Mn=4294967295,De=Mn-1,Pe=Mn>>>1,Be=[["ary",yn],["bind",nn],["bindKey",q],["curry",hn],["curryRight",Bn],["flip",dn],["partial",pn],["partialRight",gn],["rearg",W]],ft="[object Arguments]",Dt="[object Array]",We="[object AsyncFunction]",mt="[object Boolean]",xt="[object Date]",Ue="[object DOMException]",$="[object Error]",tn="[object Function]",un="[object GeneratorFunction]",K="[object Map]",tt="[object Number]",Ne="[object Null]",Zn="[object Object]",Ge="[object Promise]",zt="[object Proxy]",ae="[object RegExp]",Xn="[object Set]",le="[object String]",qe="[object Symbol]",fs="[object Undefined]",ce="[object WeakMap]",os="[object WeakSet]",he="[object ArrayBuffer]",Yt="[object DataView]",Br="[object Float32Array]",Wr="[object Float64Array]",Ur="[object Int8Array]",Nr="[object Int16Array]",Gr="[object Int32Array]",qr="[object Uint8Array]",kr="[object Uint8ClampedArray]",$r="[object Uint16Array]",Hr="[object Uint32Array]",ss=/\\b__p \\+= \'\';/g,as=/\\b(__p \\+=) \'\' \\+/g,ls=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,ou=/&(?:amp|lt|gt|quot|#39);/g,su=/[&<>"\']/g,cs=RegExp(ou.source),hs=RegExp(su.source),ps=/<%-([\\s\\S]+?)%>/g,gs=/<%([\\s\\S]+?)%>/g,au=/<%=([\\s\\S]+?)%>/g,ds=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,_s=/^\\w*$/,vs=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Kr=/[\\\\^$.*+?()[\\]{}|]/g,ms=RegExp(Kr.source),zr=/^\\s+/,xs=/\\s/,ys=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,ws=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,As=/,? & /,Ss=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,Ts=/[()=,{}\\[\\]\\/\\s]/,Fs=/\\\\(\\\\)?/g,Cs=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,lu=/\\w*$/,Is=/^[-+]0x[0-9a-f]+$/i,Ms=/^0b[01]+$/i,bs=/^\\[object .+?Constructor\\]$/,Rs=/^0o[0-7]+$/i,Ls=/^(?:0|[1-9]\\d*)$/,Es=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,ke=/($^)/,Os=/[\'\\n\\r\\u2028\\u2029\\\\]/g,$e="\\\\ud800-\\\\udfff",Ds="\\\\u0300-\\\\u036f",Ps="\\\\ufe20-\\\\ufe2f",Bs="\\\\u20d0-\\\\u20ff",cu=Ds+Ps+Bs,hu="\\\\u2700-\\\\u27bf",pu="a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff",Ws="\\\\xac\\\\xb1\\\\xd7\\\\xf7",Us="\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf",Ns="\\\\u2000-\\\\u206f",Gs=" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",gu="A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde",du="\\\\ufe0e\\\\ufe0f",_u=Ws+Us+Ns+Gs,Yr="[\'\\u2019]",qs="["+$e+"]",vu="["+_u+"]",He="["+cu+"]",mu="\\\\d+",ks="["+hu+"]",xu="["+pu+"]",yu="[^"+$e+_u+mu+hu+pu+gu+"]",Zr="\\\\ud83c[\\\\udffb-\\\\udfff]",$s="(?:"+He+"|"+Zr+")",wu="[^"+$e+"]",Xr="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",Jr="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",Zt="["+gu+"]",Au="\\\\u200d",Su="(?:"+xu+"|"+yu+")",Hs="(?:"+Zt+"|"+yu+")",Tu="(?:"+Yr+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+Yr+"(?:D|LL|M|RE|S|T|VE))?",Cu=$s+"?",Iu="["+du+"]?",Ks="(?:"+Au+"(?:"+[wu,Xr,Jr].join("|")+")"+Iu+Cu+")*",zs="\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",Ys="\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])",Mu=Iu+Cu+Ks,Zs="(?:"+[ks,Xr,Jr].join("|")+")"+Mu,Xs="(?:"+[wu+He+"?",He,Xr,Jr,qs].join("|")+")",Js=RegExp(Yr,"g"),Qs=RegExp(He,"g"),Qr=RegExp(Zr+"(?="+Zr+")|"+Xs+Mu,"g"),Vs=RegExp([Zt+"?"+xu+"+"+Tu+"(?="+[vu,Zt,"$"].join("|")+")",Hs+"+"+Fu+"(?="+[vu,Zt+Su,"$"].join("|")+")",Zt+"?"+Su+"+"+Tu,Zt+"+"+Fu,Ys,zs,mu,Zs].join("|"),"g"),js=RegExp("["+Au+$e+cu+du+"]"),na=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ta=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ea=-1,z={};z[Br]=z[Wr]=z[Ur]=z[Nr]=z[Gr]=z[qr]=z[kr]=z[$r]=z[Hr]=!0,z[ft]=z[Dt]=z[he]=z[mt]=z[Yt]=z[xt]=z[$]=z[tn]=z[K]=z[tt]=z[Zn]=z[ae]=z[Xn]=z[le]=z[ce]=!1;var H={};H[ft]=H[Dt]=H[he]=H[Yt]=H[mt]=H[xt]=H[Br]=H[Wr]=H[Ur]=H[Nr]=H[Gr]=H[K]=H[tt]=H[Zn]=H[ae]=H[Xn]=H[le]=H[qe]=H[qr]=H[kr]=H[$r]=H[Hr]=!0,H[$]=H[tn]=H[ce]=!1;var ra={\\u00C0:"A",\\u00C1:"A",\\u00C2:"A",\\u00C3:"A",\\u00C4:"A",\\u00C5:"A",\\u00E0:"a",\\u00E1:"a",\\u00E2:"a",\\u00E3:"a",\\u00E4:"a",\\u00E5:"a",\\u00C7:"C",\\u00E7:"c",\\u00D0:"D",\\u00F0:"d",\\u00C8:"E",\\u00C9:"E",\\u00CA:"E",\\u00CB:"E",\\u00E8:"e",\\u00E9:"e",\\u00EA:"e",\\u00EB:"e",\\u00CC:"I",\\u00CD:"I",\\u00CE:"I",\\u00CF:"I",\\u00EC:"i",\\u00ED:"i",\\u00EE:"i",\\u00EF:"i",\\u00D1:"N",\\u00F1:"n",\\u00D2:"O",\\u00D3:"O",\\u00D4:"O",\\u00D5:"O",\\u00D6:"O",\\u00D8:"O",\\u00F2:"o",\\u00F3:"o",\\u00F4:"o",\\u00F5:"o",\\u00F6:"o",\\u00F8:"o",\\u00D9:"U",\\u00DA:"U",\\u00DB:"U",\\u00DC:"U",\\u00F9:"u",\\u00FA:"u",\\u00FB:"u",\\u00FC:"u",\\u00DD:"Y",\\u00FD:"y",\\u00FF:"y",\\u00C6:"Ae",\\u00E6:"ae",\\u00DE:"Th",\\u00FE:"th",\\u00DF:"ss",\\u0100:"A",\\u0102:"A",\\u0104:"A",\\u0101:"a",\\u0103:"a",\\u0105:"a",\\u0106:"C",\\u0108:"C",\\u010A:"C",\\u010C:"C",\\u0107:"c",\\u0109:"c",\\u010B:"c",\\u010D:"c",\\u010E:"D",\\u0110:"D",\\u010F:"d",\\u0111:"d",\\u0112:"E",\\u0114:"E",\\u0116:"E",\\u0118:"E",\\u011A:"E",\\u0113:"e",\\u0115:"e",\\u0117:"e",\\u0119:"e",\\u011B:"e",\\u011C:"G",\\u011E:"G",\\u0120:"G",\\u0122:"G",\\u011D:"g",\\u011F:"g",\\u0121:"g",\\u0123:"g",\\u0124:"H",\\u0126:"H",\\u0125:"h",\\u0127:"h",\\u0128:"I",\\u012A:"I",\\u012C:"I",\\u012E:"I",\\u0130:"I",\\u0129:"i",\\u012B:"i",\\u012D:"i",\\u012F:"i",\\u0131:"i",\\u0134:"J",\\u0135:"j",\\u0136:"K",\\u0137:"k",\\u0138:"k",\\u0139:"L",\\u013B:"L",\\u013D:"L",\\u013F:"L",\\u0141:"L",\\u013A:"l",\\u013C:"l",\\u013E:"l",\\u0140:"l",\\u0142:"l",\\u0143:"N",\\u0145:"N",\\u0147:"N",\\u014A:"N",\\u0144:"n",\\u0146:"n",\\u0148:"n",\\u014B:"n",\\u014C:"O",\\u014E:"O",\\u0150:"O",\\u014D:"o",\\u014F:"o",\\u0151:"o",\\u0154:"R",\\u0156:"R",\\u0158:"R",\\u0155:"r",\\u0157:"r",\\u0159:"r",\\u015A:"S",\\u015C:"S",\\u015E:"S",\\u0160:"S",\\u015B:"s",\\u015D:"s",\\u015F:"s",\\u0161:"s",\\u0162:"T",\\u0164:"T",\\u0166:"T",\\u0163:"t",\\u0165:"t",\\u0167:"t",\\u0168:"U",\\u016A:"U",\\u016C:"U",\\u016E:"U",\\u0170:"U",\\u0172:"U",\\u0169:"u",\\u016B:"u",\\u016D:"u",\\u016F:"u",\\u0171:"u",\\u0173:"u",\\u0174:"W",\\u0175:"w",\\u0176:"Y",\\u0177:"y",\\u0178:"Y",\\u0179:"Z",\\u017B:"Z",\\u017D:"Z",\\u017A:"z",\\u017C:"z",\\u017E:"z",\\u0132:"IJ",\\u0133:"ij",\\u0152:"Oe",\\u0153:"oe",\\u0149:"\'n",\\u017F:"s"},ia={"&":"&","<":"<",">":">",\'"\':""","\'":"'"},ua={"&":"&","<":"<",">":">",""":\'"\',"'":"\'"},fa={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},oa=parseFloat,sa=parseInt,bu=typeof global=="object"&&global&&global.Object===Object&&global,aa=typeof self=="object"&&self&&self.Object===Object&&self,ln=bu||aa||Function("return this")(),Vr=typeof oe=="object"&&oe&&!oe.nodeType&&oe,Pt=Vr&&typeof Me=="object"&&Me&&!Me.nodeType&&Me,Ru=Pt&&Pt.exports===Vr,jr=Ru&&bu.process,Wn=function(){try{var c=Pt&&Pt.require&&Pt.require("util").types;return c||jr&&jr.binding&&jr.binding("util")}catch(g){}}(),Lu=Wn&&Wn.isArrayBuffer,Eu=Wn&&Wn.isDate,Ou=Wn&&Wn.isMap,Du=Wn&&Wn.isRegExp,Pu=Wn&&Wn.isSet,Bu=Wn&&Wn.isTypedArray;function bn(c,g,p){switch(p.length){case 0:return c.call(g);case 1:return c.call(g,p[0]);case 2:return c.call(g,p[0],p[1]);case 3:return c.call(g,p[0],p[1],p[2])}return c.apply(g,p)}function la(c,g,p,A){for(var I=-1,U=c==null?0:c.length;++I-1}function ni(c,g,p){for(var A=-1,I=c==null?0:c.length;++A-1;);return p}function Hu(c,g){for(var p=c.length;p--&&Xt(g,c[p],0)>-1;);return p}function xa(c,g){for(var p=c.length,A=0;p--;)c[p]===g&&++A;return A}var ya=ii(ra),wa=ii(ia);function Aa(c){return"\\\\"+fa[c]}function Sa(c,g){return c==null?i:c[g]}function Jt(c){return js.test(c)}function Ta(c){return na.test(c)}function Fa(c){for(var g,p=[];!(g=c.next()).done;)p.push(g.value);return p}function si(c){var g=-1,p=Array(c.size);return c.forEach(function(A,I){p[++g]=[I,A]}),p}function Ku(c,g){return function(p){return c(g(p))}}function At(c,g){for(var p=-1,A=c.length,I=0,U=[];++p-1}function hl(n,t){var e=this.__data__,r=sr(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}ot.prototype.clear=sl,ot.prototype.delete=al,ot.prototype.get=ll,ot.prototype.has=cl,ot.prototype.set=hl;function st(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t=t?n:t)),n}function qn(n,t,e,r,u,o){var s,a=t&P,h=t&an,d=t&j;if(e&&(s=u?e(n,r,u,o):e(n)),s!==i)return s;if(!X(n))return n;var _=M(n);if(_){if(s=_c(n),!a)return Tn(n,s)}else{var v=xn(n),x=v==tn||v==un;if(bt(n))return Mf(n,a);if(v==Zn||v==ft||x&&!u){if(s=h||x?{}:Yf(n),!a)return h?uc(n,Ml(s,n)):ic(n,rf(s,n))}else{if(!H[v])return u?n:{};s=vc(n,v,a)}}o||(o=new Qn);var S=o.get(n);if(S)return S;o.set(n,s),So(n)?n.forEach(function(C){s.add(qn(C,t,e,C,n,o))}):wo(n)&&n.forEach(function(C,E){s.set(E,qn(C,t,e,E,n,o))});var F=d?h?Di:Oi:h?Cn:cn,R=_?i:F(n);return Un(R||n,function(C,E){R&&(E=C,C=n[E]),xe(s,E,qn(C,t,e,E,n,o))}),s}function bl(n){var t=cn(n);return function(e){return uf(e,n,t)}}function uf(n,t,e){var r=e.length;if(n==null)return!r;for(n=k(n);r--;){var u=e[r],o=t[u],s=n[u];if(s===i&&!(u in n)||!o(s))return!1}return!0}function ff(n,t,e){if(typeof n!="function")throw new Nn(y);return Ce(function(){n.apply(i,e)},t)}function ye(n,t,e,r){var u=-1,o=Ke,s=!0,a=n.length,h=[],d=t.length;if(!a)return h;e&&(t=Z(t,Rn(e))),r?(o=ni,s=!1):t.length>=m&&(o=pe,s=!1,t=new Ut(t));n:for(;++uu?0:u+e),r=r===i||r>u?u:b(r),r<0&&(r+=u),r=e>r?0:Fo(r);e0&&e(a)?t>1?vn(a,t-1,e,r,u):wt(u,a):r||(u[u.length]=a)}return u}var di=Df(),af=Df(!0);function et(n,t){return n&&di(n,t,cn)}function _i(n,t){return n&&af(n,t,cn)}function lr(n,t){return yt(t,function(e){return pt(n[e])})}function Gt(n,t){t=It(t,n);for(var e=0,r=t.length;n!=null&&et}function El(n,t){return n!=null&&G.call(n,t)}function Ol(n,t){return n!=null&&t in k(n)}function Dl(n,t,e){return n>=mn(t,e)&&n=120&&_.length>=120)?new Ut(s&&_):i}_=n[0];var v=-1,x=a[0];n:for(;++v-1;)a!==n&&tr.call(a,h,1),tr.call(n,h,1);return n}function yf(n,t){for(var e=n?t.length:0,r=e-1;e--;){var u=t[e];if(e==r||u!==o){var o=u;ht(u)?tr.call(n,u,1):Ci(n,u)}}return n}function Si(n,t){return n+ir(ju()*(t-n+1))}function Yl(n,t,e,r){for(var u=-1,o=sn(rr((t-n)/(e||1)),0),s=p(o);o--;)s[r?o:++u]=n,n+=e;return s}function Ti(n,t){var e="";if(!n||t<1||t>Yn)return e;do t%2&&(e+=n),t=ir(t/2),t&&(n+=n);while(t);return e}function L(n,t){return qi(Jf(n,t,In),n+"")}function Zl(n){return ef(fe(n))}function Xl(n,t){var e=fe(n);return wr(e,Nt(t,0,e.length))}function Se(n,t,e,r){if(!X(n))return n;t=It(t,n);for(var u=-1,o=t.length,s=o-1,a=n;a!=null&&++uu?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=p(u);++r>>1,s=n[o];s!==null&&!En(s)&&(e?s<=t:s=m){var d=t?null:ac(n);if(d)return Ye(d);s=!1,u=pe,h=new Ut}else h=t?[]:a;n:for(;++r=r?n:kn(n,t,e)}var If=Ga||function(n){return ln.clearTimeout(n)};function Mf(n,t){if(t)return n.slice();var e=n.length,r=Zu?Zu(e):new n.constructor(e);return n.copy(r),r}function Ri(n){var t=new n.constructor(n.byteLength);return new je(t).set(new je(n)),t}function nc(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function tc(n){var t=new n.constructor(n.source,lu.exec(n));return t.lastIndex=n.lastIndex,t}function ec(n){return me?k(me.call(n)):{}}function bf(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Rf(n,t){if(n!==t){var e=n!==i,r=n===null,u=n===n,o=En(n),s=t!==i,a=t===null,h=t===t,d=En(t);if(!a&&!d&&!o&&n>t||o&&s&&h&&!a&&!d||r&&s&&h||!e&&h||!u)return 1;if(!r&&!o&&!d&&n=a)return h;var d=e[r];return h*(d=="desc"?-1:1)}}return n.index-t.index}function Lf(n,t,e,r){for(var u=-1,o=n.length,s=e.length,a=-1,h=t.length,d=sn(o-s,0),_=p(h+d),v=!r;++a1?e[u-1]:i,s=u>2?e[2]:i;for(o=n.length>3&&typeof o=="function"?(u--,o):i,s&&An(e[0],e[1],s)&&(o=u<3?i:o,u=1),t=k(t);++r-1?u[o?t[s]:s]:i}}function Wf(n){return ct(function(t){var e=t.length,r=e,u=Gn.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if(typeof o!="function")throw new Nn(y);if(u&&!s&&xr(o)=="wrapper")var s=new Gn([],!0)}for(r=s?r:e;++r1&&B.reverse(),_&&ha))return!1;var d=o.get(n),_=o.get(t);if(d&&_)return d==t&&_==n;var v=-1,x=!0,S=e&Pn?new Ut:i;for(o.set(n,t),o.set(t,n);++v1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(ys,`{\n/* [wrapped with `+t+`] */\n`)}function xc(n){return M(n)||$t(n)||!!(Qu&&n&&n[Qu])}function ht(n,t){var e=typeof n;return t=t==null?Yn:t,!!t&&(e=="number"||e!="symbol"&&Ls.test(n))&&n>-1&&n%1==0&&n0){if(++t>=Kt)return arguments[0]}else t=0;return n.apply(i,arguments)}}function wr(n,t){var e=-1,r=n.length,u=r-1;for(t=t===i?r:t;++e1?n[t-1]:i;return e=typeof e=="function"?(n.pop(),e):i,so(n,e)});function ao(n){var t=f(n);return t.__chain__=!0,t}function Rh(n,t){return t(n),n}function Ar(n,t){return t(n)}var Lh=ct(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,u=function(o){return gi(o,n)};return t>1||this.__actions__.length||!(r instanceof D)||!ht(e)?this.thru(u):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:Ar,args:[u],thisArg:i}),new Gn(r,this.__chain__).thru(function(o){return t&&!o.length&&o.push(i),o}))});function Eh(){return ao(this)}function Oh(){return new Gn(this.value(),this.__chain__)}function Dh(){this.__values__===i&&(this.__values__=To(this.value()));var n=this.__index__>=this.__values__.length,t=n?i:this.__values__[this.__index__++];return{done:n,value:t}}function Ph(){return this}function Bh(n){for(var t,e=this;e instanceof or;){var r=eo(e);r.__index__=0,r.__values__=i,t?u.__wrapped__=r:t=r;var u=r;e=e.__wrapped__}return u.__wrapped__=n,t}function Wh(){var n=this.__wrapped__;if(n instanceof D){var t=n;return this.__actions__.length&&(t=new D(this)),t=t.reverse(),t.__actions__.push({func:Ar,args:[ki],thisArg:i}),new Gn(t,this.__chain__)}return this.thru(ki)}function Uh(){return Ff(this.__wrapped__,this.__actions__)}var Nh=gr(function(n,t,e){G.call(n,e)?++n[e]:at(n,e,1)});function Gh(n,t,e){var r=M(n)?Wu:Rl;return e&&An(n,t,e)&&(t=i),r(n,T(t,3))}function qh(n,t){var e=M(n)?yt:sf;return e(n,T(t,3))}var kh=Bf(ro),$h=Bf(io);function Hh(n,t){return vn(Sr(n,t),1)}function Kh(n,t){return vn(Sr(n,t),nt)}function zh(n,t,e){return e=e===i?1:b(e),vn(Sr(n,t),e)}function lo(n,t){var e=M(n)?Un:Ft;return e(n,T(t,3))}function co(n,t){var e=M(n)?ca:of;return e(n,T(t,3))}var Yh=gr(function(n,t,e){G.call(n,e)?n[e].push(t):at(n,e,[t])});function Zh(n,t,e,r){n=Fn(n)?n:fe(n),e=e&&!r?b(e):0;var u=n.length;return e<0&&(e=sn(u+e,0)),Mr(n)?e<=u&&n.indexOf(t,e)>-1:!!u&&Xt(n,t,e)>-1}var Xh=L(function(n,t,e){var r=-1,u=typeof t=="function",o=Fn(n)?p(n.length):[];return Ft(n,function(s){o[++r]=u?bn(t,s,e):we(s,t,e)}),o}),Jh=gr(function(n,t,e){at(n,e,t)});function Sr(n,t){var e=M(n)?Z:gf;return e(n,T(t,3))}function Qh(n,t,e,r){return n==null?[]:(M(t)||(t=t==null?[]:[t]),e=r?i:e,M(e)||(e=e==null?[]:[e]),mf(n,t,e))}var Vh=gr(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function jh(n,t,e){var r=M(n)?ti:qu,u=arguments.length<3;return r(n,T(t,4),e,u,Ft)}function np(n,t,e){var r=M(n)?ha:qu,u=arguments.length<3;return r(n,T(t,4),e,u,of)}function tp(n,t){var e=M(n)?yt:sf;return e(n,Cr(T(t,3)))}function ep(n){var t=M(n)?ef:Zl;return t(n)}function rp(n,t,e){(e?An(n,t,e):t===i)?t=1:t=b(t);var r=M(n)?Fl:Xl;return r(n,t)}function ip(n){var t=M(n)?Cl:Ql;return t(n)}function up(n){if(n==null)return 0;if(Fn(n))return Mr(n)?Qt(n):n.length;var t=xn(n);return t==K||t==Xn?n.size:yi(n).length}function fp(n,t,e){var r=M(n)?ei:Vl;return e&&An(n,t,e)&&(t=i),r(n,T(t,3))}var op=L(function(n,t){if(n==null)return[];var e=t.length;return e>1&&An(n,t[0],t[1])?t=[]:e>2&&An(t[0],t[1],t[2])&&(t=[t[0]]),mf(n,vn(t,1),[])}),Tr=qa||function(){return ln.Date.now()};function sp(n,t){if(typeof t!="function")throw new Nn(y);return n=b(n),function(){if(--n<1)return t.apply(this,arguments)}}function ho(n,t,e){return t=e?i:t,t=n&&t==null?n.length:t,lt(n,yn,i,i,i,i,t)}function po(n,t){var e;if(typeof t!="function")throw new Nn(y);return n=b(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var Hi=L(function(n,t,e){var r=nn;if(e.length){var u=At(e,ie(Hi));r|=pn}return lt(n,r,t,e,u)}),go=L(function(n,t,e){var r=nn|q;if(e.length){var u=At(e,ie(go));r|=pn}return lt(t,r,n,e,u)});function _o(n,t,e){t=e?i:t;var r=lt(n,hn,i,i,i,i,i,t);return r.placeholder=_o.placeholder,r}function vo(n,t,e){t=e?i:t;var r=lt(n,Bn,i,i,i,i,i,t);return r.placeholder=vo.placeholder,r}function mo(n,t,e){var r,u,o,s,a,h,d=0,_=!1,v=!1,x=!0;if(typeof n!="function")throw new Nn(y);t=Hn(t)||0,X(e)&&(_=!!e.leading,v="maxWait"in e,o=v?sn(Hn(e.maxWait)||0,t):o,x="trailing"in e?!!e.trailing:x);function S(rn){var jn=r,dt=u;return r=u=i,d=rn,s=n.apply(dt,jn),s}function F(rn){return d=rn,a=Ce(E,t),_?S(rn):s}function R(rn){var jn=rn-h,dt=rn-d,Wo=t-jn;return v?mn(Wo,o-dt):Wo}function C(rn){var jn=rn-h,dt=rn-d;return h===i||jn>=t||jn<0||v&&dt>=o}function E(){var rn=Tr();if(C(rn))return B(rn);a=Ce(E,R(rn))}function B(rn){return a=i,x&&r?S(rn):(r=u=i,s)}function On(){a!==i&&If(a),d=0,r=h=u=a=i}function Sn(){return a===i?s:B(Tr())}function Dn(){var rn=Tr(),jn=C(rn);if(r=arguments,u=this,h=rn,jn){if(a===i)return F(h);if(v)return If(a),a=Ce(E,t),S(h)}return a===i&&(a=Ce(E,t)),s}return Dn.cancel=On,Dn.flush=Sn,Dn}var ap=L(function(n,t){return ff(n,1,t)}),lp=L(function(n,t,e){return ff(n,Hn(t)||0,e)});function cp(n){return lt(n,dn)}function Fr(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new Nn(y);var e=function(){var r=arguments,u=t?t.apply(this,r):r[0],o=e.cache;if(o.has(u))return o.get(u);var s=n.apply(this,r);return e.cache=o.set(u,s)||o,s};return e.cache=new(Fr.Cache||st),e}Fr.Cache=st;function Cr(n){if(typeof n!="function")throw new Nn(y);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hp(n){return po(2,n)}var pp=jl(function(n,t){t=t.length==1&&M(t[0])?Z(t[0],Rn(T())):Z(vn(t,1),Rn(T()));var e=t.length;return L(function(r){for(var u=-1,o=mn(r.length,e);++u=t}),$t=cf(function(){return arguments}())?cf:function(n){return Q(n)&&G.call(n,"callee")&&!Ju.call(n,"callee")},M=p.isArray,Mp=Lu?Rn(Lu):Bl;function Fn(n){return n!=null&&Ir(n.length)&&!pt(n)}function en(n){return Q(n)&&Fn(n)}function bp(n){return n===!0||n===!1||Q(n)&&wn(n)==mt}var bt=$a||eu,Rp=Eu?Rn(Eu):Wl;function Lp(n){return Q(n)&&n.nodeType===1&&!Ie(n)}function Ep(n){if(n==null)return!0;if(Fn(n)&&(M(n)||typeof n=="string"||typeof n.splice=="function"||bt(n)||ue(n)||$t(n)))return!n.length;var t=xn(n);if(t==K||t==Xn)return!n.size;if(Fe(n))return!yi(n).length;for(var e in n)if(G.call(n,e))return!1;return!0}function Op(n,t){return Ae(n,t)}function Dp(n,t,e){e=typeof e=="function"?e:i;var r=e?e(n,t):i;return r===i?Ae(n,t,i,e):!!r}function zi(n){if(!Q(n))return!1;var t=wn(n);return t==$||t==Ue||typeof n.message=="string"&&typeof n.name=="string"&&!Ie(n)}function Pp(n){return typeof n=="number"&&Vu(n)}function pt(n){if(!X(n))return!1;var t=wn(n);return t==tn||t==un||t==We||t==zt}function yo(n){return typeof n=="number"&&n==b(n)}function Ir(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Yn}function X(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function Q(n){return n!=null&&typeof n=="object"}var wo=Ou?Rn(Ou):Nl;function Bp(n,t){return n===t||xi(n,t,Bi(t))}function Wp(n,t,e){return e=typeof e=="function"?e:i,xi(n,t,Bi(t),e)}function Up(n){return Ao(n)&&n!=+n}function Np(n){if(Ac(n))throw new I(w);return hf(n)}function Gp(n){return n===null}function qp(n){return n==null}function Ao(n){return typeof n=="number"||Q(n)&&wn(n)==tt}function Ie(n){if(!Q(n)||wn(n)!=Zn)return!1;var t=nr(n);if(t===null)return!0;var e=G.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Je.call(e)==Wa}var Yi=Du?Rn(Du):Gl;function kp(n){return yo(n)&&n>=-Yn&&n<=Yn}var So=Pu?Rn(Pu):ql;function Mr(n){return typeof n=="string"||!M(n)&&Q(n)&&wn(n)==le}function En(n){return typeof n=="symbol"||Q(n)&&wn(n)==qe}var ue=Bu?Rn(Bu):kl;function $p(n){return n===i}function Hp(n){return Q(n)&&xn(n)==ce}function Kp(n){return Q(n)&&wn(n)==os}var zp=mr(wi),Yp=mr(function(n,t){return n<=t});function To(n){if(!n)return[];if(Fn(n))return Mr(n)?Jn(n):Tn(n);if(ge&&n[ge])return Fa(n[ge]());var t=xn(n),e=t==K?si:t==Xn?Ye:fe;return e(n)}function gt(n){if(!n)return n===0?n:0;if(n=Hn(n),n===nt||n===-nt){var t=n<0?-1:1;return t*Oe}return n===n?n:0}function b(n){var t=gt(n),e=t%1;return t===t?e?t-e:t:0}function Fo(n){return n?Nt(b(n),0,Mn):0}function Hn(n){if(typeof n=="number")return n;if(En(n))return Ot;if(X(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=X(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=ku(n);var e=Ms.test(n);return e||Rs.test(n)?sa(n.slice(2),e?2:8):Is.test(n)?Ot:+n}function Co(n){return rt(n,Cn(n))}function Zp(n){return n?Nt(b(n),-Yn,Yn):n===0?n:0}function N(n){return n==null?"":Ln(n)}var Xp=ee(function(n,t){if(Fe(t)||Fn(t)){rt(t,cn(t),n);return}for(var e in t)G.call(t,e)&&xe(n,e,t[e])}),Io=ee(function(n,t){rt(t,Cn(t),n)}),br=ee(function(n,t,e,r){rt(t,Cn(t),n,r)}),Jp=ee(function(n,t,e,r){rt(t,cn(t),n,r)}),Qp=ct(gi);function Vp(n,t){var e=te(n);return t==null?e:rf(e,t)}var jp=L(function(n,t){n=k(n);var e=-1,r=t.length,u=r>2?t[2]:i;for(u&&An(t[0],t[1],u)&&(r=1);++e1),o}),rt(n,Di(n),e),r&&(e=qn(e,P|an|j,lc));for(var u=t.length;u--;)Ci(e,t[u]);return e});function vg(n,t){return bo(n,Cr(T(t)))}var mg=ct(function(n,t){return n==null?{}:Kl(n,t)});function bo(n,t){if(n==null)return{};var e=Z(Di(n),function(r){return[r]});return t=T(t),xf(n,e,function(r,u){return t(r,u[0])})}function xg(n,t,e){t=It(t,n);var r=-1,u=t.length;for(u||(u=1,n=i);++rt){var r=n;n=t,t=r}if(e||n%1||t%1){var u=ju();return mn(n+u*(t-n+oa("1e-"+((u+"").length-1))),t)}return Si(n,t)}var Rg=re(function(n,t,e){return t=t.toLowerCase(),n+(e?Eo(t):t)});function Eo(n){return Ji(N(n).toLowerCase())}function Oo(n){return n=N(n),n&&n.replace(Es,ya).replace(Qs,"")}function Lg(n,t,e){n=N(n),t=Ln(t);var r=n.length;e=e===i?r:Nt(b(e),0,r);var u=e;return e-=t.length,e>=0&&n.slice(e,u)==t}function Eg(n){return n=N(n),n&&hs.test(n)?n.replace(su,wa):n}function Og(n){return n=N(n),n&&ms.test(n)?n.replace(Kr,"\\\\$&"):n}var Dg=re(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),Pg=re(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),Bg=Pf("toLowerCase");function Wg(n,t,e){n=N(n),t=b(t);var r=t?Qt(n):0;if(!t||r>=t)return n;var u=(t-r)/2;return vr(ir(u),e)+n+vr(rr(u),e)}function Ug(n,t,e){n=N(n),t=b(t);var r=t?Qt(n):0;return t&&r>>0,e?(n=N(n),n&&(typeof t=="string"||t!=null&&!Yi(t))&&(t=Ln(t),!t&&Jt(n))?Mt(Jn(n),0,e):n.split(t,e)):[]}var Kg=re(function(n,t,e){return n+(e?" ":"")+Ji(t)});function zg(n,t,e){return n=N(n),e=e==null?0:Nt(b(e),0,n.length),t=Ln(t),n.slice(e,e+t.length)==t}function Yg(n,t,e){var r=f.templateSettings;e&&An(n,t,e)&&(t=i),n=N(n),t=br({},t,r,kf);var u=br({},t.imports,r.imports,kf),o=cn(u),s=oi(u,o),a,h,d=0,_=t.interpolate||ke,v="__p += \'",x=ai((t.escape||ke).source+"|"+_.source+"|"+(_===au?Cs:ke).source+"|"+(t.evaluate||ke).source+"|$","g"),S="//# sourceURL="+(G.call(t,"sourceURL")?(t.sourceURL+"").replace(/\\s/g," "):"lodash.templateSources["+ ++ea+"]")+`\n`;n.replace(x,function(C,E,B,On,Sn,Dn){return B||(B=On),v+=n.slice(d,Dn).replace(Os,Aa),E&&(a=!0,v+=`\' +\n__e(`+E+`) +\n\'`),Sn&&(h=!0,v+=`\';\n`+Sn+`;\n__p += \'`),B&&(v+=`\' +\n((__t = (`+B+`)) == null ? \'\' : __t) +\n\'`),d=Dn+C.length,C}),v+=`\';\n`;var F=G.call(t,"variable")&&t.variable;if(!F)v=`with (obj) {\n`+v+`\n}\n`;else if(Ts.test(F))throw new I(O);v=(h?v.replace(ss,""):v).replace(as,"$1").replace(ls,"$1;"),v="function("+(F||"obj")+`) {\n`+(F?"":`obj || (obj = {});\n`)+"var __t, __p = \'\'"+(a?", __e = _.escape":"")+(h?`, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, \'\') }\n`:`;\n`)+v+`return __p\n}`;var R=Po(function(){return U(o,S+"return "+v).apply(i,s)});if(R.source=v,zi(R))throw R;return R}function Zg(n){return N(n).toLowerCase()}function Xg(n){return N(n).toUpperCase()}function Jg(n,t,e){if(n=N(n),n&&(e||t===i))return ku(n);if(!n||!(t=Ln(t)))return n;var r=Jn(n),u=Jn(t),o=$u(r,u),s=Hu(r,u)+1;return Mt(r,o,s).join("")}function Qg(n,t,e){if(n=N(n),n&&(e||t===i))return n.slice(0,zu(n)+1);if(!n||!(t=Ln(t)))return n;var r=Jn(n),u=Hu(r,Jn(t))+1;return Mt(r,0,u).join("")}function Vg(n,t,e){if(n=N(n),n&&(e||t===i))return n.replace(zr,"");if(!n||!(t=Ln(t)))return n;var r=Jn(n),u=$u(r,Jn(t));return Mt(r,u).join("")}function jg(n,t){var e=_n,r=Kn;if(X(t)){var u="separator"in t?t.separator:u;e="length"in t?b(t.length):e,r="omission"in t?Ln(t.omission):r}n=N(n);var o=n.length;if(Jt(n)){var s=Jn(n);o=s.length}if(e>=o)return n;var a=e-Qt(r);if(a<1)return r;var h=s?Mt(s,0,a).join(""):n.slice(0,a);if(u===i)return h+r;if(s&&(a+=h.length-a),Yi(u)){if(n.slice(a).search(u)){var d,_=h;for(u.global||(u=ai(u.source,N(lu.exec(u))+"g")),u.lastIndex=0;d=u.exec(_);)var v=d.index;h=h.slice(0,v===i?a:v)}}else if(n.indexOf(Ln(u),a)!=a){var x=h.lastIndexOf(u);x>-1&&(h=h.slice(0,x))}return h+r}function nd(n){return n=N(n),n&&cs.test(n)?n.replace(ou,ba):n}var td=re(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),Ji=Pf("toUpperCase");function Do(n,t,e){return n=N(n),t=e?i:t,t===i?Ta(n)?Ea(n):da(n):n.match(t)||[]}var Po=L(function(n,t){try{return bn(n,i,t)}catch(e){return zi(e)?e:new I(e)}}),ed=ct(function(n,t){return Un(t,function(e){e=it(e),at(n,e,Hi(n[e],n))}),n});function rd(n){var t=n==null?0:n.length,e=T();return n=t?Z(n,function(r){if(typeof r[1]!="function")throw new Nn(y);return[e(r[0]),r[1]]}):[],L(function(r){for(var u=-1;++uYn)return[];var e=Mn,r=mn(n,Mn);t=T(t),n-=Mn;for(var u=fi(r,t);++e0||t<0)?new D(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==i&&(t=b(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},D.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},D.prototype.toArray=function(){return this.take(Mn)},et(D.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),u=f[r?"take"+(t=="last"?"Right":""):t],o=r||/^find/.test(t);!u||(f.prototype[t]=function(){var s=this.__wrapped__,a=r?[1]:arguments,h=s instanceof D,d=a[0],_=h||M(s),v=function(E){var B=u.apply(f,wt([E],a));return r&&x?B[0]:B};_&&e&&typeof d=="function"&&d.length!=1&&(h=_=!1);var x=this.__chain__,S=!!this.__actions__.length,F=o&&!x,R=h&&!S;if(!o&&_){s=R?s:new D(this);var C=n.apply(s,a);return C.__actions__.push({func:Ar,args:[v],thisArg:i}),new Gn(C,x)}return F&&R?n.apply(this,a):(C=this.thru(v),F?r?C.value()[0]:C.value():C)})}),Un(["pop","push","shift","sort","splice","unshift"],function(n){var t=Ze[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);f.prototype[n]=function(){var u=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(M(o)?o:[],u)}return this[e](function(s){return t.apply(M(s)?s:[],u)})}}),et(D.prototype,function(n,t){var e=f[t];if(e){var r=e.name+"";G.call(ne,r)||(ne[r]=[]),ne[r].push({name:t,func:e})}}),ne[dr(i,q).name]=[{name:"wrapper",func:i}],D.prototype.clone=nl,D.prototype.reverse=tl,D.prototype.value=el,f.prototype.at=Lh,f.prototype.chain=Eh,f.prototype.commit=Oh,f.prototype.next=Dh,f.prototype.plant=Bh,f.prototype.reverse=Wh,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Uh,f.prototype.first=f.prototype.head,ge&&(f.prototype[ge]=Ph),f},St=Oa();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ln._=St,define(function(){return St})):Pt?((Pt.exports=St)._=St,Vr._=St):ln._=St}).call(oe)});var Pr=Jd(qo());var _t=i=>[...new Set(i)],ko=i=>[...new Map(i.map(l=>[l.toLowerCase(),l])).values()];var $o=(i,l,m)=>{if(i=="Spaces/Home")return"ui//mk-ui-spaces";if(!l)return m?"ui//mk-ui-folder-solid":"ui//mk-ui-folder";switch(l){case"png":case"jpg":case"jpeg":case"svg":return"ui//mk-make-image";case"mov":case"webm":return"ui//mk-ui-video";case"canvas":return"ui//mk-ui-canvas";default:return m?"ui//mk-ui-file-solid":"ui//mk-ui-file"}};function Ho(i){return Array.isArray(i)?i:[]}var Ko=(i,l)=>l.indexOf(i)>0?l.indexOf(i):l.length;var Rr=i=>"spaces://"+i;var ut=i=>{var l;return(l=i==null?void 0:i.match(/(\\\\.|[^,])+/g))!=null?l:[]},Ht=i=>{if(!i)return"";let l=/\\[\\[(.*?)\\]\\]/g.exec(i),m=(l==null?void 0:l.length)>1?l[1].substring(0,Ko("|",l[1])):i;return m||i};var be=(i,l)=>{if(typeof i=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(i)||i.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(i))return"date";if(l=="tag"||l=="tags")return"tag";if(/\\[\\[.*?\\]\\]/.test(i))return"link"}else{if(typeof i=="number")return"number";if(typeof i=="boolean")return"boolean";if(i)if(Array.isArray(i)||typeof i=="string"&&i.indexOf(",")>-1){let m=Array.isArray(i)?i:[];if(typeof i=="string"&&i.indexOf(",")>-1&&(m=ut(i)),l=="tag"||l=="tags")return"tag-multi";if(m.length==1&&Array.isArray(m[0])&&m[0].length==1&&typeof m[0][0]=="string")return"link";let w=_t(m.map(y=>be(y,l)));return w.length==1&&w[0]=="link"?"link-multi":"option-multi"}else{if(i.isLuxonDateTime)return"date";if(i.isLuxonDuration)return"duration";if(i.type=="file")return"link";if(typeof i=="object"&&!Array.isArray(i)&&i!==null)return"object"}else return"unknown"}return"text"};var zo=i=>Object.keys(i!=null?i:{}).filter(l=>l!="position").filter(l=>l!="tag"&&l!="tags");var se=i=>i.join(","),Yo=i=>i.join(", ");var Lr=(i,l)=>{switch(be(l,i)){case"object":return JSON.stringify(l);case"number":return l.toString();case"boolean":return l?"true":"false";case"date":return l;case"duration":return Yo(Object.keys(l.values).reduce((w,y)=>[...w,...l.values[y]>0?[l.values[y]+" "+y]:[]],[]));case"option-multi":case"link-multi":return typeof l=="string"?Ht(l):se(l.map(w=>w?typeof w=="string"?Ht(w):w.path?w.path:Array.isArray(l)&&w.length==1&&Array.isArray(w[0])&&w[0].length==1&&typeof w[0][0]=="string"?w[0][0]:JSON.stringify(w):""));case"link":return Array.isArray(l)&&l.length==1&&Array.isArray(l[0])&&l[0].length==1&&typeof l[0][0]=="string"?l[0][0]:typeof l=="string"?Ht(l):l.path;case"text":case"tag":case"image":return l}return""};var Zo=i=>{switch(i){case"duration":return"text";case"unknown":return"text"}return i};var Er=(i,l)=>i==l,iu=(i,l)=>(i!=null?i:"").length==0,uu=(i,l)=>(i!=null?i:"").toLowerCase().includes((l!=null?l:"").toLowerCase()),Or=(i,l)=>parseFloat(i)>parseFloat(l),Dr=(i,l)=>parseInt(i)>parseInt(l),fu=(i,l)=>{let m=i?ut(i):[];return(l?ut(l):[]).some(y=>m.some(O=>O==y))},Xo=i=>{let l=new Date(`${i}T00:00`),m=new Date;return l.getMonth()===m.getMonth()&&l.getDate()===m.getDate()};var Re={isNotEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(i,l)=>!iu(i,""),valueType:"none"},isEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(i,l)=>iu(i,""),valueType:"none"},include:{fn:(i,l)=>uu(i,l),type:["text","file","link","link-multi","fileprop","image"],valueType:"text"},notInclude:{type:["text","file","link","link-multi","fileprop","image"],fn:(i,l)=>!uu(i,l),valueType:"text"},is:{type:["text","file","link","context","fileprop"],fn:(i,l)=>Er(i,l),valueType:"text"},isNot:{type:["text","file","link","context","fileprop"],fn:(i,l)=>!Er(i,l),valueType:"text"},equal:{type:["number"],fn:(i,l)=>Er(i,l),valueType:"number"},isGreatThan:{type:["number"],fn:(i,l)=>Or(i,l),valueType:"number"},isLessThan:{type:["number"],fn:(i,l)=>Dr(i,l),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(i,l)=>!Or(i,l),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(i,l)=>!Dr(i,l),valueType:"number"},dateBefore:{type:["date","fileprop"],fn:(i,l)=>Dr(i,l),valueType:"date"},dateAfter:{type:["date","fileprop"],fn:(i,l)=>Or(i,l),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(i,l)=>Xo(i,l),valueType:"none"},isAnyInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(i,l)=>fu(i,l),valueType:"list"},isNoneInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(i,l)=>!fu(i,l),valueType:"list"},isTrue:{type:["boolean"],fn:(i,l)=>i=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(i,l)=>i!="true",valueType:"none"}};var Qd=(i,l)=>l.reduce((w,y)=>{let[O,J]=w,V=y.type=="fileprop"?Vo(J,y):y.type=="filemeta"?Qo(J,y):y.type=="frontmatter"?Jo(J,y):[],Y=J.filter(P=>!V.includes(P));return[[...O,...V],Y]},[[],i])[0],Vd=(i,l)=>l.reduce((m,w)=>w.type=="fileprop"?Vo(m,w):w.type=="filemeta"?Qo(m,w):w.type=="frontmatter"?Jo(m,w):[],i),Jo=(i,l)=>i.filter(m=>{let w=m.frontmatter;if(!w||!w[l.field])return!1;let y=Re[l.fn],O=!0;return y&&(O=y.fn(Lr(l.field,w[l.field]),l.value)),O}),Qo=(i,l)=>i.filter(m=>{let w="";l.field=="outlinks"?w=se(m.outlinks):l.field=="inlinks"?w=se(m.inlinks):l.field=="tags"&&(w=se(m.tags));let y=Re[l.fn],O=!0;return y&&(O=y.fn(w,l.value)),O}),Vo=(i,l)=>i.filter(m=>{if(["name","path","sticker","color","isFolder","extension","ctime","mtime","size","parent"].includes(l.field)){let y=Re[l.fn],O=!0;return y&&(O=y.fn(m[l.field],l.value)),O}return!0}),jo=(i,l)=>i.reduce((w,y)=>!w||y.filters.length==0?w:y.type=="any"?Qd([l],y.filters).length>0:Vd([l],y.filters).length>0,!0);var ns=(i,l,m)=>{if(!l)return{changed:!1,cache:{path:i.path,frames:{},schemas:[],listitems:{}}};let w=l.schemas,y=w.filter(Y=>Y.type=="frame").reduce((Y,P)=>{var an,j;return Lt(Rt({},Y),{[P.id]:{schema:P,cols:l.fields.filter(fn=>fn.schemaId==P.id),rows:(j=(an=l.tables[P.id])==null?void 0:an.rows)!=null?j:[]}})},{}),O=w.filter(Y=>Y.type=="listitem").reduce((Y,P)=>{var an,j;return Lt(Rt({},Y),{[P.id]:{schema:P,cols:l.fields.filter(fn=>fn.schemaId==P.id),rows:(j=(an=l.tables[P.id])==null?void 0:an.rows)!=null?j:[]}})},{}),J={path:i.path,frames:y,schemas:w,listitems:O},V=!0;return m&&Pr.default.isEqual(J,m)&&(V=!1),{changed:V,cache:J}},ts=(i,l,m)=>{var Pn,nn,q,vt,hn,Bn,pn,gn,yn;let w={};if(!l)return{changed:!1,cache:{cols:[],path:i.path,schemas:[],outlinks:[],contexts:[],files:[],tables:{},space:i,spaceMap:w}};let y=l.schemas.find(W=>W.primary=="true"),O={schema:y,cols:l.fields.filter(W=>W.schemaId==y.id),rows:(nn=(Pn=l.tables[y.id])==null?void 0:Pn.rows)!=null?nn:[]},J=l.schemas.filter(W=>W.type=="db").reduce((W,dn)=>{var _n,Kn;return Lt(Rt({},W),{[dn.id]:{schema:dn,cols:l.fields.filter(Kt=>Kt.schemaId==dn.id),rows:(Kn=(_n=l.tables[dn.id])==null?void 0:_n.rows)!=null?Kn:[]}})},{}),V=(vt=(q=O.cols)==null?void 0:q.filter(W=>W.type.startsWith("context")))!=null?vt:[],Y=(Bn=(hn=O.cols)==null?void 0:hn.filter(W=>W.type.startsWith("link")))!=null?Bn:[],P=_t(V.map(W=>W.value));V.forEach(W=>{w[W.name]={},O.rows.forEach(dn=>{ut(dn[W.name]).forEach(_n=>{var Kn;return w[W.name][_n]=[...(Kn=w[W.name][_n])!=null?Kn:[],dn.File]})})});let an=_t(O.rows.reduce((W,dn)=>_t([...W,...[...V,...Y].flatMap(_n=>ut(dn[_n.name]).map(Kn=>Ht(Kn)))]),[])),j={cols:l.fields.filter(W=>W.schemaId==y.id),path:i.path,contexts:P,outlinks:an,files:(yn=(gn=(pn=J.files)==null?void 0:pn.rows)==null?void 0:gn.map(W=>W.File))!=null?yn:[],tables:J,schemas:l.schemas,space:i,spaceMap:w},fn=!0;return m&&Pr.default.isEqual(j,m)&&(fn=!0),{changed:fn,cache:j}},jd=i=>{var m,w,y,O,J,V,Y,P,an,j,fn,Pn,nn;let l=[];return i&&i.tags&&l.push(...(w=(m=i.tags)==null?void 0:m.map(q=>q.tag))!=null?w:[]),i&&((y=i.frontmatter)==null?void 0:y.tags)&&l.push(...(typeof((O=i.frontmatter)==null?void 0:O.tags)=="string"?ut(i.frontmatter.tags.replace(/ /g,"")):Array.isArray((J=i.frontmatter)==null?void 0:J.tags)?(Y=(V=i.frontmatter)==null?void 0:V.tags)!=null?Y:[]:[]).filter(q=>typeof q=="string").map(q=>"#"+q)),i&&((P=i.frontmatter)==null?void 0:P.tag)&&l.push(...(typeof((an=i.frontmatter)==null?void 0:an.tag)=="string"?ut(i.frontmatter.tag.replace(/ /g,"")):Array.isArray((j=i.frontmatter)==null?void 0:j.tag)?(Pn=(fn=i.frontmatter)==null?void 0:fn.tag)!=null?Pn:[]:[]).filter(q=>typeof q=="string").map(q=>"#"+q)),(nn=_t(l))!=null?nn:[]};var es=(i,l,m,w,y,O,J,V,Y)=>{var Oe,Ot,Mn,De,Pe,Be,ft,Dt,We,mt,xt,Ue;let P={cacheType:"file",path:i.path,name:i.name,filename:i.filename};i.stat&&(P.ctime=i.stat.ctime,P.mtime=i.stat.mtime,P.size=i.stat.size,P.extension=i.extension);let an=[],j=jd(O),fn=($,tn,un=new Set)=>{var tt,Ne;let K=[];for(let Zn of tn){let Ge=(Ne=(tt=$.get(Zn))==null?void 0:tt.contexts)!=null?Ne:[];for(let zt of Ge)un.has(zt)||(K.push(zt),un.add(zt),K.push(...fn($,[Rr(zt)],un)))}return K};if(m.has(i.parent))for(let $ of(Oe=m.get(i.parent).contexts)!=null?Oe:[])an.push($);an.push(...j);let Pn=i.name,nn=i.name,q=(Ot=y==null?void 0:y.sticker)!=null?Ot:"",vt=(Mn=y==null?void 0:y.color)!=null?Mn:"",hn=(De=y==null?void 0:y.folder)!=null?De:"";hn=="true"&&(hn="");let Bn=i.parent,pn=i.isFolder,gn={},yn={},W=[],dn=[],_n=O==null?void 0:O.frontmatter;O!=null&&O.links&&dn.push(...O.links.map($=>$.link));let Kn=V&&pn?V.folderNotePath:i.path;for(let $ of Object.keys(J))Kn in J[$]&&W.push($);let Kt="";if(_n){let tn=ko(zo(_n)).reduce((un,K)=>Lt(Rt({},un),{[K]:{name:K,type:Zo(be(_n[K],K))}}),{});Object.keys(tn).forEach(un=>{gn[un]=Lr(un,_n[un]),yn[un]=tn[un].type,tn[un].type.startsWith("link")&&dn.push(Ht(gn[un]))}),Kt=(Pe=gn[l.fmKeyBanner])!=null?Pe:"",gn[l.fmKeySticker]&&(q=_n[l.fmKeySticker]),gn[l.fmKeyColor]&&(vt=_n[l.fmKeyColor]),gn[l.fmKeyAlias]&&(nn=(Be=Ho(_n[l.fmKeyAlias]))==null?void 0:Be[0])}q=(q==null?void 0:q.length)>0?q:$o(P.path,P.extension,!1);let Et=Lt(Rt({},P),{name:Pn,tags:_t(an),alias:nn,fileTags:j,folderNote:V,sticker:q,color:vt,parent:Bn,banner:Kt,isFolder:pn,sortBy:hn,frontmatter:gn,frontmatterTypes:yn,inlinks:W,outlinks:dn}),zn=[],Le={};for(let $ of an)zn.push(Rr($));for(let[$,tn]of m){if(tn.space&&tn.space.folderPath==Bn&&tn.space.defPath!=i.path){zn.push($);continue}if(((Dt=(ft=tn.metadata)==null?void 0:ft.filters)==null?void 0:Dt.length)>0&&jo(tn.metadata.filters,Et)){zn.push($);continue}if(((mt=(We=tn.metadata)==null?void 0:We.links)==null?void 0:mt.length)>0&&((Ue=(xt=tn.metadata)==null?void 0:xt.links)!=null?Ue:[]).find(K=>K==Et.path)){zn.push($);continue}}let Ee=fn(m,zn);zn.push(...Ee.map($=>Rr($))),zn.forEach($=>{var tn,un,K;Le[$]=(K=(un=(tn=w.get($))==null?void 0:tn.tables)==null?void 0:un.files)==null?void 0:K.rows.findIndex(tt=>tt.File==i.path)}),Et.tags.push(...Ee);let nt=V&&!pn?Lt(Rt({},Et),{spaces:[],contexts:[]}):Lt(Rt({},Et),{spaces:_t(zn),spaceRanks:Le}),Yn=!0;return Y&&Pr.default.isEqual(nt,Y)&&(Yn=!1),{changed:Yn,cache:nt}};function rs(i){let{file:l,settings:m,spacesCache:w,vaultItem:y,metadataCache:O,contextsCache:J,resolvedLinks:V,folderNote:Y,oldMetadata:P}=i;return es(l,m,w,J,y,O,V,Y,P)}function is(i){let{space:l,mdb:m,oldCache:w}=i;return ts(l,m,w)}function us(i){let{space:l,mdb:m,oldCache:w}=i;return ns(l,m,w)}var n_=self;n_.onmessage=async i=>{let{payload:l,job:m}=i.data,w;m.type=="file"?w=rs(l):m.type=="context"?w=is(l):m.type=="frames"&&(w=us(l));try{postMessage({job:m,result:w})}catch(y){console.log(y),postMessage({job:m,result:{$error:`Failed to index ${m.type} ${m.path}: ${y}`}})}};\n/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n'); + return inlineWorker('var qd=Object.create;var ru=Object.defineProperty,kd=Object.defineProperties,$d=Object.getOwnPropertyDescriptor,Hd=Object.getOwnPropertyDescriptors,Kd=Object.getOwnPropertyNames,Uo=Object.getOwnPropertySymbols,zd=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty,Yd=Object.prototype.propertyIsEnumerable;var No=(i,l,m)=>l in i?ru(i,l,{enumerable:!0,configurable:!0,writable:!0,value:m}):i[l]=m,Lt=(i,l)=>{for(var m in l||(l={}))Go.call(l,m)&&No(i,m,l[m]);if(Uo)for(var m of Uo(l))Yd.call(l,m)&&No(i,m,l[m]);return i},Et=(i,l)=>kd(i,Hd(l));var Zd=(i,l)=>()=>(l||i((l={exports:{}}).exports,l),l.exports);var Xd=(i,l,m,w)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of Kd(l))!Go.call(i,y)&&y!==m&&ru(i,y,{get:()=>l[y],enumerable:!(w=$d(l,y))||w.enumerable});return i};var Jd=(i,l,m)=>(m=i!=null?qd(zd(i)):{},Xd(l||!i||!i.__esModule?ru(m,"default",{value:i,enumerable:!0}):m,i));var qo=Zd((se,Me)=>{(function(){var i,l="4.17.21",m=200,w="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",O="Invalid `variable` option passed into `_.template`",J="__lodash_hash_undefined__",j=500,Y="__lodash_placeholder__",P=1,an=2,nn=4,rn=1,Tn=2,Q=1,k=2,vt=4,hn=8,Bn=16,pn=32,gn=64,yn=128,W=256,dn=512,_n=30,zn="...",zt=800,Dr=16,mt=1,jn=2,Le=3,nt=1/0,Yn=9007199254740991,Ee=17976931348623157e292,Ot=0/0,bn=4294967295,Oe=bn-1,De=bn>>>1,Pe=[["ary",yn],["bind",Q],["bindKey",k],["curry",hn],["curryRight",Bn],["flip",dn],["partial",pn],["partialRight",gn],["rearg",W]],ft="[object Arguments]",Dt="[object Array]",Be="[object AsyncFunction]",xt="[object Boolean]",yt="[object Date]",We="[object DOMException]",Pt="[object Error]",H="[object Function]",un="[object GeneratorFunction]",G="[object Map]",fn="[object Number]",Yt="[object Null]",Wn="[object Object]",Ue="[object Promise]",Pr="[object Proxy]",tt="[object RegExp]",Zn="[object Set]",le="[object String]",Ne="[object Symbol]",fs="[object Undefined]",ce="[object WeakMap]",os="[object WeakSet]",he="[object ArrayBuffer]",Zt="[object DataView]",Br="[object Float32Array]",Wr="[object Float64Array]",Ur="[object Int8Array]",Nr="[object Int16Array]",Gr="[object Int32Array]",qr="[object Uint8Array]",kr="[object Uint8ClampedArray]",$r="[object Uint16Array]",Hr="[object Uint32Array]",ss=/\\b__p \\+= \'\';/g,as=/\\b(__p \\+=) \'\' \\+/g,ls=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n\'\';/g,ou=/&(?:amp|lt|gt|quot|#39);/g,su=/[&<>"\']/g,cs=RegExp(ou.source),hs=RegExp(su.source),ps=/<%-([\\s\\S]+?)%>/g,gs=/<%([\\s\\S]+?)%>/g,au=/<%=([\\s\\S]+?)%>/g,ds=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,_s=/^\\w*$/,vs=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,Kr=/[\\\\^$.*+?()[\\]{}|]/g,ms=RegExp(Kr.source),zr=/^\\s+/,xs=/\\s/,ys=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,ws=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,As=/,? & /,Ss=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,Ts=/[()=,{}\\[\\]\\/\\s]/,Fs=/\\\\(\\\\)?/g,Cs=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,lu=/\\w*$/,Is=/^[-+]0x[0-9a-f]+$/i,Ms=/^0b[01]+$/i,bs=/^\\[object .+?Constructor\\]$/,Rs=/^0o[0-7]+$/i,Ls=/^(?:0|[1-9]\\d*)$/,Es=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ge=/($^)/,Os=/[\'\\n\\r\\u2028\\u2029\\\\]/g,qe="\\\\ud800-\\\\udfff",Ds="\\\\u0300-\\\\u036f",Ps="\\\\ufe20-\\\\ufe2f",Bs="\\\\u20d0-\\\\u20ff",cu=Ds+Ps+Bs,hu="\\\\u2700-\\\\u27bf",pu="a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff",Ws="\\\\xac\\\\xb1\\\\xd7\\\\xf7",Us="\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf",Ns="\\\\u2000-\\\\u206f",Gs=" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000",gu="A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde",du="\\\\ufe0e\\\\ufe0f",_u=Ws+Us+Ns+Gs,Yr="[\'\\u2019]",qs="["+qe+"]",vu="["+_u+"]",ke="["+cu+"]",mu="\\\\d+",ks="["+hu+"]",xu="["+pu+"]",yu="[^"+qe+_u+mu+hu+pu+gu+"]",Zr="\\\\ud83c[\\\\udffb-\\\\udfff]",$s="(?:"+ke+"|"+Zr+")",wu="[^"+qe+"]",Xr="(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}",Jr="[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]",Xt="["+gu+"]",Au="\\\\u200d",Su="(?:"+xu+"|"+yu+")",Hs="(?:"+Xt+"|"+yu+")",Tu="(?:"+Yr+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+Yr+"(?:D|LL|M|RE|S|T|VE))?",Cu=$s+"?",Iu="["+du+"]?",Ks="(?:"+Au+"(?:"+[wu,Xr,Jr].join("|")+")"+Iu+Cu+")*",zs="\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])",Ys="\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])",Mu=Iu+Cu+Ks,Zs="(?:"+[ks,Xr,Jr].join("|")+")"+Mu,Xs="(?:"+[wu+ke+"?",ke,Xr,Jr,qs].join("|")+")",Js=RegExp(Yr,"g"),Qs=RegExp(ke,"g"),Qr=RegExp(Zr+"(?="+Zr+")|"+Xs+Mu,"g"),Vs=RegExp([Xt+"?"+xu+"+"+Tu+"(?="+[vu,Xt,"$"].join("|")+")",Hs+"+"+Fu+"(?="+[vu,Xt+Su,"$"].join("|")+")",Xt+"?"+Su+"+"+Tu,Xt+"+"+Fu,Ys,zs,mu,Zs].join("|"),"g"),js=RegExp("["+Au+qe+cu+du+"]"),na=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ta=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ea=-1,z={};z[Br]=z[Wr]=z[Ur]=z[Nr]=z[Gr]=z[qr]=z[kr]=z[$r]=z[Hr]=!0,z[ft]=z[Dt]=z[he]=z[xt]=z[Zt]=z[yt]=z[Pt]=z[H]=z[G]=z[fn]=z[Wn]=z[tt]=z[Zn]=z[le]=z[ce]=!1;var K={};K[ft]=K[Dt]=K[he]=K[Zt]=K[xt]=K[yt]=K[Br]=K[Wr]=K[Ur]=K[Nr]=K[Gr]=K[G]=K[fn]=K[Wn]=K[tt]=K[Zn]=K[le]=K[Ne]=K[qr]=K[kr]=K[$r]=K[Hr]=!0,K[Pt]=K[H]=K[ce]=!1;var ra={\\u00C0:"A",\\u00C1:"A",\\u00C2:"A",\\u00C3:"A",\\u00C4:"A",\\u00C5:"A",\\u00E0:"a",\\u00E1:"a",\\u00E2:"a",\\u00E3:"a",\\u00E4:"a",\\u00E5:"a",\\u00C7:"C",\\u00E7:"c",\\u00D0:"D",\\u00F0:"d",\\u00C8:"E",\\u00C9:"E",\\u00CA:"E",\\u00CB:"E",\\u00E8:"e",\\u00E9:"e",\\u00EA:"e",\\u00EB:"e",\\u00CC:"I",\\u00CD:"I",\\u00CE:"I",\\u00CF:"I",\\u00EC:"i",\\u00ED:"i",\\u00EE:"i",\\u00EF:"i",\\u00D1:"N",\\u00F1:"n",\\u00D2:"O",\\u00D3:"O",\\u00D4:"O",\\u00D5:"O",\\u00D6:"O",\\u00D8:"O",\\u00F2:"o",\\u00F3:"o",\\u00F4:"o",\\u00F5:"o",\\u00F6:"o",\\u00F8:"o",\\u00D9:"U",\\u00DA:"U",\\u00DB:"U",\\u00DC:"U",\\u00F9:"u",\\u00FA:"u",\\u00FB:"u",\\u00FC:"u",\\u00DD:"Y",\\u00FD:"y",\\u00FF:"y",\\u00C6:"Ae",\\u00E6:"ae",\\u00DE:"Th",\\u00FE:"th",\\u00DF:"ss",\\u0100:"A",\\u0102:"A",\\u0104:"A",\\u0101:"a",\\u0103:"a",\\u0105:"a",\\u0106:"C",\\u0108:"C",\\u010A:"C",\\u010C:"C",\\u0107:"c",\\u0109:"c",\\u010B:"c",\\u010D:"c",\\u010E:"D",\\u0110:"D",\\u010F:"d",\\u0111:"d",\\u0112:"E",\\u0114:"E",\\u0116:"E",\\u0118:"E",\\u011A:"E",\\u0113:"e",\\u0115:"e",\\u0117:"e",\\u0119:"e",\\u011B:"e",\\u011C:"G",\\u011E:"G",\\u0120:"G",\\u0122:"G",\\u011D:"g",\\u011F:"g",\\u0121:"g",\\u0123:"g",\\u0124:"H",\\u0126:"H",\\u0125:"h",\\u0127:"h",\\u0128:"I",\\u012A:"I",\\u012C:"I",\\u012E:"I",\\u0130:"I",\\u0129:"i",\\u012B:"i",\\u012D:"i",\\u012F:"i",\\u0131:"i",\\u0134:"J",\\u0135:"j",\\u0136:"K",\\u0137:"k",\\u0138:"k",\\u0139:"L",\\u013B:"L",\\u013D:"L",\\u013F:"L",\\u0141:"L",\\u013A:"l",\\u013C:"l",\\u013E:"l",\\u0140:"l",\\u0142:"l",\\u0143:"N",\\u0145:"N",\\u0147:"N",\\u014A:"N",\\u0144:"n",\\u0146:"n",\\u0148:"n",\\u014B:"n",\\u014C:"O",\\u014E:"O",\\u0150:"O",\\u014D:"o",\\u014F:"o",\\u0151:"o",\\u0154:"R",\\u0156:"R",\\u0158:"R",\\u0155:"r",\\u0157:"r",\\u0159:"r",\\u015A:"S",\\u015C:"S",\\u015E:"S",\\u0160:"S",\\u015B:"s",\\u015D:"s",\\u015F:"s",\\u0161:"s",\\u0162:"T",\\u0164:"T",\\u0166:"T",\\u0163:"t",\\u0165:"t",\\u0167:"t",\\u0168:"U",\\u016A:"U",\\u016C:"U",\\u016E:"U",\\u0170:"U",\\u0172:"U",\\u0169:"u",\\u016B:"u",\\u016D:"u",\\u016F:"u",\\u0171:"u",\\u0173:"u",\\u0174:"W",\\u0175:"w",\\u0176:"Y",\\u0177:"y",\\u0178:"Y",\\u0179:"Z",\\u017B:"Z",\\u017D:"Z",\\u017A:"z",\\u017C:"z",\\u017E:"z",\\u0132:"IJ",\\u0133:"ij",\\u0152:"Oe",\\u0153:"oe",\\u0149:"\'n",\\u017F:"s"},ia={"&":"&","<":"<",">":">",\'"\':""","\'":"'"},ua={"&":"&","<":"<",">":">",""":\'"\',"'":"\'"},fa={"\\\\":"\\\\","\'":"\'","\\n":"n","\\r":"r","\\u2028":"u2028","\\u2029":"u2029"},oa=parseFloat,sa=parseInt,bu=typeof global=="object"&&global&&global.Object===Object&&global,aa=typeof self=="object"&&self&&self.Object===Object&&self,ln=bu||aa||Function("return this")(),Vr=typeof se=="object"&&se&&!se.nodeType&&se,Bt=Vr&&typeof Me=="object"&&Me&&!Me.nodeType&&Me,Ru=Bt&&Bt.exports===Vr,jr=Ru&&bu.process,Un=function(){try{var c=Bt&&Bt.require&&Bt.require("util").types;return c||jr&&jr.binding&&jr.binding("util")}catch(g){}}(),Lu=Un&&Un.isArrayBuffer,Eu=Un&&Un.isDate,Ou=Un&&Un.isMap,Du=Un&&Un.isRegExp,Pu=Un&&Un.isSet,Bu=Un&&Un.isTypedArray;function Rn(c,g,p){switch(p.length){case 0:return c.call(g);case 1:return c.call(g,p[0]);case 2:return c.call(g,p[0],p[1]);case 3:return c.call(g,p[0],p[1],p[2])}return c.apply(g,p)}function la(c,g,p,A){for(var I=-1,U=c==null?0:c.length;++I-1}function ni(c,g,p){for(var A=-1,I=c==null?0:c.length;++A-1;);return p}function Hu(c,g){for(var p=c.length;p--&&Jt(g,c[p],0)>-1;);return p}function xa(c,g){for(var p=c.length,A=0;p--;)c[p]===g&&++A;return A}var ya=ii(ra),wa=ii(ia);function Aa(c){return"\\\\"+fa[c]}function Sa(c,g){return c==null?i:c[g]}function Qt(c){return js.test(c)}function Ta(c){return na.test(c)}function Fa(c){for(var g,p=[];!(g=c.next()).done;)p.push(g.value);return p}function si(c){var g=-1,p=Array(c.size);return c.forEach(function(A,I){p[++g]=[I,A]}),p}function Ku(c,g){return function(p){return c(g(p))}}function St(c,g){for(var p=-1,A=c.length,I=0,U=[];++p-1}function hl(n,t){var e=this.__data__,r=fr(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}ot.prototype.clear=sl,ot.prototype.delete=al,ot.prototype.get=ll,ot.prototype.has=cl,ot.prototype.set=hl;function st(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t=t?n:t)),n}function kn(n,t,e,r,u,o){var s,a=t&P,h=t&an,d=t&nn;if(e&&(s=u?e(n,r,u,o):e(n)),s!==i)return s;if(!X(n))return n;var _=M(n);if(_){if(s=_c(n),!a)return Fn(n,s)}else{var v=xn(n),x=v==H||v==un;if(Rt(n))return Mf(n,a);if(v==Wn||v==ft||x&&!u){if(s=h||x?{}:Yf(n),!a)return h?uc(n,Ml(s,n)):ic(n,rf(s,n))}else{if(!K[v])return u?n:{};s=vc(n,v,a)}}o||(o=new Jn);var S=o.get(n);if(S)return S;o.set(n,s),So(n)?n.forEach(function(C){s.add(kn(C,t,e,C,n,o))}):wo(n)&&n.forEach(function(C,E){s.set(E,kn(C,t,e,E,n,o))});var F=d?h?Di:Oi:h?In:cn,R=_?i:F(n);return Nn(R||n,function(C,E){R&&(E=C,C=n[E]),xe(s,E,kn(C,t,e,E,n,o))}),s}function bl(n){var t=cn(n);return function(e){return uf(e,n,t)}}function uf(n,t,e){var r=e.length;if(n==null)return!r;for(n=$(n);r--;){var u=e[r],o=t[u],s=n[u];if(s===i&&!(u in n)||!o(s))return!1}return!0}function ff(n,t,e){if(typeof n!="function")throw new Gn(y);return Ce(function(){n.apply(i,e)},t)}function ye(n,t,e,r){var u=-1,o=$e,s=!0,a=n.length,h=[],d=t.length;if(!a)return h;e&&(t=Z(t,Ln(e))),r?(o=ni,s=!1):t.length>=m&&(o=pe,s=!1,t=new Nt(t));n:for(;++uu?0:u+e),r=r===i||r>u?u:b(r),r<0&&(r+=u),r=e>r?0:Fo(r);e0&&e(a)?t>1?vn(a,t-1,e,r,u):At(u,a):r||(u[u.length]=a)}return u}var di=Df(),af=Df(!0);function et(n,t){return n&&di(n,t,cn)}function _i(n,t){return n&&af(n,t,cn)}function sr(n,t){return wt(t,function(e){return pt(n[e])})}function qt(n,t){t=Mt(t,n);for(var e=0,r=t.length;n!=null&&et}function El(n,t){return n!=null&&q.call(n,t)}function Ol(n,t){return n!=null&&t in $(n)}function Dl(n,t,e){return n>=mn(t,e)&&n=120&&_.length>=120)?new Nt(s&&_):i}_=n[0];var v=-1,x=a[0];n:for(;++v-1;)a!==n&&je.call(a,h,1),je.call(n,h,1);return n}function yf(n,t){for(var e=n?t.length:0,r=e-1;e--;){var u=t[e];if(e==r||u!==o){var o=u;ht(u)?je.call(n,u,1):Ci(n,u)}}return n}function Si(n,t){return n+er(ju()*(t-n+1))}function Yl(n,t,e,r){for(var u=-1,o=sn(tr((t-n)/(e||1)),0),s=p(o);o--;)s[r?o:++u]=n,n+=e;return s}function Ti(n,t){var e="";if(!n||t<1||t>Yn)return e;do t%2&&(e+=n),t=er(t/2),t&&(n+=n);while(t);return e}function L(n,t){return qi(Jf(n,t,Mn),n+"")}function Zl(n){return ef(oe(n))}function Xl(n,t){var e=oe(n);return xr(e,Gt(t,0,e.length))}function Se(n,t,e,r){if(!X(n))return n;t=Mt(t,n);for(var u=-1,o=t.length,s=o-1,a=n;a!=null&&++uu?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=p(u);++r>>1,s=n[o];s!==null&&!On(s)&&(e?s<=t:s=m){var d=t?null:ac(n);if(d)return Ke(d);s=!1,u=pe,h=new Nt}else h=t?[]:a;n:for(;++r=r?n:$n(n,t,e)}var If=Ga||function(n){return ln.clearTimeout(n)};function Mf(n,t){if(t)return n.slice();var e=n.length,r=Zu?Zu(e):new n.constructor(e);return n.copy(r),r}function Ri(n){var t=new n.constructor(n.byteLength);return new Qe(t).set(new Qe(n)),t}function nc(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}function tc(n){var t=new n.constructor(n.source,lu.exec(n));return t.lastIndex=n.lastIndex,t}function ec(n){return me?$(me.call(n)):{}}function bf(n,t){var e=t?Ri(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function Rf(n,t){if(n!==t){var e=n!==i,r=n===null,u=n===n,o=On(n),s=t!==i,a=t===null,h=t===t,d=On(t);if(!a&&!d&&!o&&n>t||o&&s&&h&&!a&&!d||r&&s&&h||!e&&h||!u)return 1;if(!r&&!o&&!d&&n=a)return h;var d=e[r];return h*(d=="desc"?-1:1)}}return n.index-t.index}function Lf(n,t,e,r){for(var u=-1,o=n.length,s=e.length,a=-1,h=t.length,d=sn(o-s,0),_=p(h+d),v=!r;++a1?e[u-1]:i,s=u>2?e[2]:i;for(o=n.length>3&&typeof o=="function"?(u--,o):i,s&&An(e[0],e[1],s)&&(o=u<3?i:o,u=1),t=$(t);++r-1?u[o?t[s]:s]:i}}function Wf(n){return ct(function(t){var e=t.length,r=e,u=qn.prototype.thru;for(n&&t.reverse();r--;){var o=t[r];if(typeof o!="function")throw new Gn(y);if(u&&!s&&vr(o)=="wrapper")var s=new qn([],!0)}for(r=s?r:e;++r1&&B.reverse(),_&&ha))return!1;var d=o.get(n),_=o.get(t);if(d&&_)return d==t&&_==n;var v=-1,x=!0,S=e&Tn?new Nt:i;for(o.set(n,t),o.set(t,n);++v1?"& ":"")+t[r],t=t.join(e>2?", ":" "),n.replace(ys,`{\n/* [wrapped with `+t+`] */\n`)}function xc(n){return M(n)||Ht(n)||!!(Qu&&n&&n[Qu])}function ht(n,t){var e=typeof n;return t=t==null?Yn:t,!!t&&(e=="number"||e!="symbol"&&Ls.test(n))&&n>-1&&n%1==0&&n0){if(++t>=zt)return arguments[0]}else t=0;return n.apply(i,arguments)}}function xr(n,t){var e=-1,r=n.length,u=r-1;for(t=t===i?r:t;++e1?n[t-1]:i;return e=typeof e=="function"?(n.pop(),e):i,so(n,e)});function ao(n){var t=f(n);return t.__chain__=!0,t}function Rh(n,t){return t(n),n}function yr(n,t){return t(n)}var Lh=ct(function(n){var t=n.length,e=t?n[0]:0,r=this.__wrapped__,u=function(o){return gi(o,n)};return t>1||this.__actions__.length||!(r instanceof D)||!ht(e)?this.thru(u):(r=r.slice(e,+e+(t?1:0)),r.__actions__.push({func:yr,args:[u],thisArg:i}),new qn(r,this.__chain__).thru(function(o){return t&&!o.length&&o.push(i),o}))});function Eh(){return ao(this)}function Oh(){return new qn(this.value(),this.__chain__)}function Dh(){this.__values__===i&&(this.__values__=To(this.value()));var n=this.__index__>=this.__values__.length,t=n?i:this.__values__[this.__index__++];return{done:n,value:t}}function Ph(){return this}function Bh(n){for(var t,e=this;e instanceof ur;){var r=eo(e);r.__index__=0,r.__values__=i,t?u.__wrapped__=r:t=r;var u=r;e=e.__wrapped__}return u.__wrapped__=n,t}function Wh(){var n=this.__wrapped__;if(n instanceof D){var t=n;return this.__actions__.length&&(t=new D(this)),t=t.reverse(),t.__actions__.push({func:yr,args:[ki],thisArg:i}),new qn(t,this.__chain__)}return this.thru(ki)}function Uh(){return Ff(this.__wrapped__,this.__actions__)}var Nh=hr(function(n,t,e){q.call(n,e)?++n[e]:at(n,e,1)});function Gh(n,t,e){var r=M(n)?Wu:Rl;return e&&An(n,t,e)&&(t=i),r(n,T(t,3))}function qh(n,t){var e=M(n)?wt:sf;return e(n,T(t,3))}var kh=Bf(ro),$h=Bf(io);function Hh(n,t){return vn(wr(n,t),1)}function Kh(n,t){return vn(wr(n,t),nt)}function zh(n,t,e){return e=e===i?1:b(e),vn(wr(n,t),e)}function lo(n,t){var e=M(n)?Nn:Ct;return e(n,T(t,3))}function co(n,t){var e=M(n)?ca:of;return e(n,T(t,3))}var Yh=hr(function(n,t,e){q.call(n,e)?n[e].push(t):at(n,e,[t])});function Zh(n,t,e,r){n=Cn(n)?n:oe(n),e=e&&!r?b(e):0;var u=n.length;return e<0&&(e=sn(u+e,0)),Cr(n)?e<=u&&n.indexOf(t,e)>-1:!!u&&Jt(n,t,e)>-1}var Xh=L(function(n,t,e){var r=-1,u=typeof t=="function",o=Cn(n)?p(n.length):[];return Ct(n,function(s){o[++r]=u?Rn(t,s,e):we(s,t,e)}),o}),Jh=hr(function(n,t,e){at(n,e,t)});function wr(n,t){var e=M(n)?Z:gf;return e(n,T(t,3))}function Qh(n,t,e,r){return n==null?[]:(M(t)||(t=t==null?[]:[t]),e=r?i:e,M(e)||(e=e==null?[]:[e]),mf(n,t,e))}var Vh=hr(function(n,t,e){n[e?0:1].push(t)},function(){return[[],[]]});function jh(n,t,e){var r=M(n)?ti:qu,u=arguments.length<3;return r(n,T(t,4),e,u,Ct)}function np(n,t,e){var r=M(n)?ha:qu,u=arguments.length<3;return r(n,T(t,4),e,u,of)}function tp(n,t){var e=M(n)?wt:sf;return e(n,Tr(T(t,3)))}function ep(n){var t=M(n)?ef:Zl;return t(n)}function rp(n,t,e){(e?An(n,t,e):t===i)?t=1:t=b(t);var r=M(n)?Fl:Xl;return r(n,t)}function ip(n){var t=M(n)?Cl:Ql;return t(n)}function up(n){if(n==null)return 0;if(Cn(n))return Cr(n)?Vt(n):n.length;var t=xn(n);return t==G||t==Zn?n.size:yi(n).length}function fp(n,t,e){var r=M(n)?ei:Vl;return e&&An(n,t,e)&&(t=i),r(n,T(t,3))}var op=L(function(n,t){if(n==null)return[];var e=t.length;return e>1&&An(n,t[0],t[1])?t=[]:e>2&&An(t[0],t[1],t[2])&&(t=[t[0]]),mf(n,vn(t,1),[])}),Ar=qa||function(){return ln.Date.now()};function sp(n,t){if(typeof t!="function")throw new Gn(y);return n=b(n),function(){if(--n<1)return t.apply(this,arguments)}}function ho(n,t,e){return t=e?i:t,t=n&&t==null?n.length:t,lt(n,yn,i,i,i,i,t)}function po(n,t){var e;if(typeof t!="function")throw new Gn(y);return n=b(n),function(){return--n>0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var Hi=L(function(n,t,e){var r=Q;if(e.length){var u=St(e,ue(Hi));r|=pn}return lt(n,r,t,e,u)}),go=L(function(n,t,e){var r=Q|k;if(e.length){var u=St(e,ue(go));r|=pn}return lt(t,r,n,e,u)});function _o(n,t,e){t=e?i:t;var r=lt(n,hn,i,i,i,i,i,t);return r.placeholder=_o.placeholder,r}function vo(n,t,e){t=e?i:t;var r=lt(n,Bn,i,i,i,i,i,t);return r.placeholder=vo.placeholder,r}function mo(n,t,e){var r,u,o,s,a,h,d=0,_=!1,v=!1,x=!0;if(typeof n!="function")throw new Gn(y);t=Kn(t)||0,X(e)&&(_=!!e.leading,v="maxWait"in e,o=v?sn(Kn(e.maxWait)||0,t):o,x="trailing"in e?!!e.trailing:x);function S(en){var Vn=r,dt=u;return r=u=i,d=en,s=n.apply(dt,Vn),s}function F(en){return d=en,a=Ce(E,t),_?S(en):s}function R(en){var Vn=en-h,dt=en-d,Wo=t-Vn;return v?mn(Wo,o-dt):Wo}function C(en){var Vn=en-h,dt=en-d;return h===i||Vn>=t||Vn<0||v&&dt>=o}function E(){var en=Ar();if(C(en))return B(en);a=Ce(E,R(en))}function B(en){return a=i,x&&r?S(en):(r=u=i,s)}function Dn(){a!==i&&If(a),d=0,r=h=u=a=i}function Sn(){return a===i?s:B(Ar())}function Pn(){var en=Ar(),Vn=C(en);if(r=arguments,u=this,h=en,Vn){if(a===i)return F(h);if(v)return If(a),a=Ce(E,t),S(h)}return a===i&&(a=Ce(E,t)),s}return Pn.cancel=Dn,Pn.flush=Sn,Pn}var ap=L(function(n,t){return ff(n,1,t)}),lp=L(function(n,t,e){return ff(n,Kn(t)||0,e)});function cp(n){return lt(n,dn)}function Sr(n,t){if(typeof n!="function"||t!=null&&typeof t!="function")throw new Gn(y);var e=function(){var r=arguments,u=t?t.apply(this,r):r[0],o=e.cache;if(o.has(u))return o.get(u);var s=n.apply(this,r);return e.cache=o.set(u,s)||o,s};return e.cache=new(Sr.Cache||st),e}Sr.Cache=st;function Tr(n){if(typeof n!="function")throw new Gn(y);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hp(n){return po(2,n)}var pp=jl(function(n,t){t=t.length==1&&M(t[0])?Z(t[0],Ln(T())):Z(vn(t,1),Ln(T()));var e=t.length;return L(function(r){for(var u=-1,o=mn(r.length,e);++u=t}),Ht=cf(function(){return arguments}())?cf:function(n){return V(n)&&q.call(n,"callee")&&!Ju.call(n,"callee")},M=p.isArray,Mp=Lu?Ln(Lu):Bl;function Cn(n){return n!=null&&Fr(n.length)&&!pt(n)}function tn(n){return V(n)&&Cn(n)}function bp(n){return n===!0||n===!1||V(n)&&wn(n)==xt}var Rt=$a||eu,Rp=Eu?Ln(Eu):Wl;function Lp(n){return V(n)&&n.nodeType===1&&!Ie(n)}function Ep(n){if(n==null)return!0;if(Cn(n)&&(M(n)||typeof n=="string"||typeof n.splice=="function"||Rt(n)||fe(n)||Ht(n)))return!n.length;var t=xn(n);if(t==G||t==Zn)return!n.size;if(Fe(n))return!yi(n).length;for(var e in n)if(q.call(n,e))return!1;return!0}function Op(n,t){return Ae(n,t)}function Dp(n,t,e){e=typeof e=="function"?e:i;var r=e?e(n,t):i;return r===i?Ae(n,t,i,e):!!r}function zi(n){if(!V(n))return!1;var t=wn(n);return t==Pt||t==We||typeof n.message=="string"&&typeof n.name=="string"&&!Ie(n)}function Pp(n){return typeof n=="number"&&Vu(n)}function pt(n){if(!X(n))return!1;var t=wn(n);return t==H||t==un||t==Be||t==Pr}function yo(n){return typeof n=="number"&&n==b(n)}function Fr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Yn}function X(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function V(n){return n!=null&&typeof n=="object"}var wo=Ou?Ln(Ou):Nl;function Bp(n,t){return n===t||xi(n,t,Bi(t))}function Wp(n,t,e){return e=typeof e=="function"?e:i,xi(n,t,Bi(t),e)}function Up(n){return Ao(n)&&n!=+n}function Np(n){if(Ac(n))throw new I(w);return hf(n)}function Gp(n){return n===null}function qp(n){return n==null}function Ao(n){return typeof n=="number"||V(n)&&wn(n)==fn}function Ie(n){if(!V(n)||wn(n)!=Wn)return!1;var t=Ve(n);if(t===null)return!0;var e=q.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Ze.call(e)==Wa}var Yi=Du?Ln(Du):Gl;function kp(n){return yo(n)&&n>=-Yn&&n<=Yn}var So=Pu?Ln(Pu):ql;function Cr(n){return typeof n=="string"||!M(n)&&V(n)&&wn(n)==le}function On(n){return typeof n=="symbol"||V(n)&&wn(n)==Ne}var fe=Bu?Ln(Bu):kl;function $p(n){return n===i}function Hp(n){return V(n)&&xn(n)==ce}function Kp(n){return V(n)&&wn(n)==os}var zp=_r(wi),Yp=_r(function(n,t){return n<=t});function To(n){if(!n)return[];if(Cn(n))return Cr(n)?Xn(n):Fn(n);if(ge&&n[ge])return Fa(n[ge]());var t=xn(n),e=t==G?si:t==Zn?Ke:oe;return e(n)}function gt(n){if(!n)return n===0?n:0;if(n=Kn(n),n===nt||n===-nt){var t=n<0?-1:1;return t*Ee}return n===n?n:0}function b(n){var t=gt(n),e=t%1;return t===t?e?t-e:t:0}function Fo(n){return n?Gt(b(n),0,bn):0}function Kn(n){if(typeof n=="number")return n;if(On(n))return Ot;if(X(n)){var t=typeof n.valueOf=="function"?n.valueOf():n;n=X(t)?t+"":t}if(typeof n!="string")return n===0?n:+n;n=ku(n);var e=Ms.test(n);return e||Rs.test(n)?sa(n.slice(2),e?2:8):Is.test(n)?Ot:+n}function Co(n){return rt(n,In(n))}function Zp(n){return n?Gt(b(n),-Yn,Yn):n===0?n:0}function N(n){return n==null?"":En(n)}var Xp=re(function(n,t){if(Fe(t)||Cn(t)){rt(t,cn(t),n);return}for(var e in t)q.call(t,e)&&xe(n,e,t[e])}),Io=re(function(n,t){rt(t,In(t),n)}),Ir=re(function(n,t,e,r){rt(t,In(t),n,r)}),Jp=re(function(n,t,e,r){rt(t,cn(t),n,r)}),Qp=ct(gi);function Vp(n,t){var e=ee(n);return t==null?e:rf(e,t)}var jp=L(function(n,t){n=$(n);var e=-1,r=t.length,u=r>2?t[2]:i;for(u&&An(t[0],t[1],u)&&(r=1);++e1),o}),rt(n,Di(n),e),r&&(e=kn(e,P|an|nn,lc));for(var u=t.length;u--;)Ci(e,t[u]);return e});function vg(n,t){return bo(n,Tr(T(t)))}var mg=ct(function(n,t){return n==null?{}:Kl(n,t)});function bo(n,t){if(n==null)return{};var e=Z(Di(n),function(r){return[r]});return t=T(t),xf(n,e,function(r,u){return t(r,u[0])})}function xg(n,t,e){t=Mt(t,n);var r=-1,u=t.length;for(u||(u=1,n=i);++rt){var r=n;n=t,t=r}if(e||n%1||t%1){var u=ju();return mn(n+u*(t-n+oa("1e-"+((u+"").length-1))),t)}return Si(n,t)}var Rg=ie(function(n,t,e){return t=t.toLowerCase(),n+(e?Eo(t):t)});function Eo(n){return Ji(N(n).toLowerCase())}function Oo(n){return n=N(n),n&&n.replace(Es,ya).replace(Qs,"")}function Lg(n,t,e){n=N(n),t=En(t);var r=n.length;e=e===i?r:Gt(b(e),0,r);var u=e;return e-=t.length,e>=0&&n.slice(e,u)==t}function Eg(n){return n=N(n),n&&hs.test(n)?n.replace(su,wa):n}function Og(n){return n=N(n),n&&ms.test(n)?n.replace(Kr,"\\\\$&"):n}var Dg=ie(function(n,t,e){return n+(e?"-":"")+t.toLowerCase()}),Pg=ie(function(n,t,e){return n+(e?" ":"")+t.toLowerCase()}),Bg=Pf("toLowerCase");function Wg(n,t,e){n=N(n),t=b(t);var r=t?Vt(n):0;if(!t||r>=t)return n;var u=(t-r)/2;return dr(er(u),e)+n+dr(tr(u),e)}function Ug(n,t,e){n=N(n),t=b(t);var r=t?Vt(n):0;return t&&r>>0,e?(n=N(n),n&&(typeof t=="string"||t!=null&&!Yi(t))&&(t=En(t),!t&&Qt(n))?bt(Xn(n),0,e):n.split(t,e)):[]}var Kg=ie(function(n,t,e){return n+(e?" ":"")+Ji(t)});function zg(n,t,e){return n=N(n),e=e==null?0:Gt(b(e),0,n.length),t=En(t),n.slice(e,e+t.length)==t}function Yg(n,t,e){var r=f.templateSettings;e&&An(n,t,e)&&(t=i),n=N(n),t=Ir({},t,r,kf);var u=Ir({},t.imports,r.imports,kf),o=cn(u),s=oi(u,o),a,h,d=0,_=t.interpolate||Ge,v="__p += \'",x=ai((t.escape||Ge).source+"|"+_.source+"|"+(_===au?Cs:Ge).source+"|"+(t.evaluate||Ge).source+"|$","g"),S="//# sourceURL="+(q.call(t,"sourceURL")?(t.sourceURL+"").replace(/\\s/g," "):"lodash.templateSources["+ ++ea+"]")+`\n`;n.replace(x,function(C,E,B,Dn,Sn,Pn){return B||(B=Dn),v+=n.slice(d,Pn).replace(Os,Aa),E&&(a=!0,v+=`\' +\n__e(`+E+`) +\n\'`),Sn&&(h=!0,v+=`\';\n`+Sn+`;\n__p += \'`),B&&(v+=`\' +\n((__t = (`+B+`)) == null ? \'\' : __t) +\n\'`),d=Pn+C.length,C}),v+=`\';\n`;var F=q.call(t,"variable")&&t.variable;if(!F)v=`with (obj) {\n`+v+`\n}\n`;else if(Ts.test(F))throw new I(O);v=(h?v.replace(ss,""):v).replace(as,"$1").replace(ls,"$1;"),v="function("+(F||"obj")+`) {\n`+(F?"":`obj || (obj = {});\n`)+"var __t, __p = \'\'"+(a?", __e = _.escape":"")+(h?`, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, \'\') }\n`:`;\n`)+v+`return __p\n}`;var R=Po(function(){return U(o,S+"return "+v).apply(i,s)});if(R.source=v,zi(R))throw R;return R}function Zg(n){return N(n).toLowerCase()}function Xg(n){return N(n).toUpperCase()}function Jg(n,t,e){if(n=N(n),n&&(e||t===i))return ku(n);if(!n||!(t=En(t)))return n;var r=Xn(n),u=Xn(t),o=$u(r,u),s=Hu(r,u)+1;return bt(r,o,s).join("")}function Qg(n,t,e){if(n=N(n),n&&(e||t===i))return n.slice(0,zu(n)+1);if(!n||!(t=En(t)))return n;var r=Xn(n),u=Hu(r,Xn(t))+1;return bt(r,0,u).join("")}function Vg(n,t,e){if(n=N(n),n&&(e||t===i))return n.replace(zr,"");if(!n||!(t=En(t)))return n;var r=Xn(n),u=$u(r,Xn(t));return bt(r,u).join("")}function jg(n,t){var e=_n,r=zn;if(X(t)){var u="separator"in t?t.separator:u;e="length"in t?b(t.length):e,r="omission"in t?En(t.omission):r}n=N(n);var o=n.length;if(Qt(n)){var s=Xn(n);o=s.length}if(e>=o)return n;var a=e-Vt(r);if(a<1)return r;var h=s?bt(s,0,a).join(""):n.slice(0,a);if(u===i)return h+r;if(s&&(a+=h.length-a),Yi(u)){if(n.slice(a).search(u)){var d,_=h;for(u.global||(u=ai(u.source,N(lu.exec(u))+"g")),u.lastIndex=0;d=u.exec(_);)var v=d.index;h=h.slice(0,v===i?a:v)}}else if(n.indexOf(En(u),a)!=a){var x=h.lastIndexOf(u);x>-1&&(h=h.slice(0,x))}return h+r}function nd(n){return n=N(n),n&&cs.test(n)?n.replace(ou,ba):n}var td=ie(function(n,t,e){return n+(e?" ":"")+t.toUpperCase()}),Ji=Pf("toUpperCase");function Do(n,t,e){return n=N(n),t=e?i:t,t===i?Ta(n)?Ea(n):da(n):n.match(t)||[]}var Po=L(function(n,t){try{return Rn(n,i,t)}catch(e){return zi(e)?e:new I(e)}}),ed=ct(function(n,t){return Nn(t,function(e){e=it(e),at(n,e,Hi(n[e],n))}),n});function rd(n){var t=n==null?0:n.length,e=T();return n=t?Z(n,function(r){if(typeof r[1]!="function")throw new Gn(y);return[e(r[0]),r[1]]}):[],L(function(r){for(var u=-1;++uYn)return[];var e=bn,r=mn(n,bn);t=T(t),n-=bn;for(var u=fi(r,t);++e0||t<0)?new D(e):(n<0?e=e.takeRight(-n):n&&(e=e.drop(n)),t!==i&&(t=b(t),e=t<0?e.dropRight(-t):e.take(t-n)),e)},D.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},D.prototype.toArray=function(){return this.take(bn)},et(D.prototype,function(n,t){var e=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),u=f[r?"take"+(t=="last"?"Right":""):t],o=r||/^find/.test(t);!u||(f.prototype[t]=function(){var s=this.__wrapped__,a=r?[1]:arguments,h=s instanceof D,d=a[0],_=h||M(s),v=function(E){var B=u.apply(f,At([E],a));return r&&x?B[0]:B};_&&e&&typeof d=="function"&&d.length!=1&&(h=_=!1);var x=this.__chain__,S=!!this.__actions__.length,F=o&&!x,R=h&&!S;if(!o&&_){s=R?s:new D(this);var C=n.apply(s,a);return C.__actions__.push({func:yr,args:[v],thisArg:i}),new qn(C,x)}return F&&R?n.apply(this,a):(C=this.thru(v),F?r?C.value()[0]:C.value():C)})}),Nn(["pop","push","shift","sort","splice","unshift"],function(n){var t=ze[n],e=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);f.prototype[n]=function(){var u=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(M(o)?o:[],u)}return this[e](function(s){return t.apply(M(s)?s:[],u)})}}),et(D.prototype,function(n,t){var e=f[t];if(e){var r=e.name+"";q.call(te,r)||(te[r]=[]),te[r].push({name:t,func:e})}}),te[pr(i,k).name]=[{name:"wrapper",func:i}],D.prototype.clone=nl,D.prototype.reverse=tl,D.prototype.value=el,f.prototype.at=Lh,f.prototype.chain=Eh,f.prototype.commit=Oh,f.prototype.next=Dh,f.prototype.plant=Bh,f.prototype.reverse=Wh,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Uh,f.prototype.first=f.prototype.head,ge&&(f.prototype[ge]=Ph),f},Tt=Oa();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ln._=Tt,define(function(){return Tt})):Bt?((Bt.exports=Tt)._=Tt,Vr._=Tt):ln._=Tt}).call(se)});var Or=Jd(qo());var _t=i=>[...new Set(i)],ko=i=>[...new Map(i.map(l=>[l.toLowerCase(),l])).values()];var $o=(i,l,m)=>{if(i=="Spaces/Home")return"ui//mk-ui-spaces";if(!l)return m?"ui//mk-ui-folder-solid":"ui//mk-ui-folder";switch(l){case"png":case"jpg":case"jpeg":case"svg":return"ui//mk-make-image";case"mov":case"webm":return"ui//mk-ui-video";case"canvas":return"ui//mk-ui-canvas";default:return m?"ui//mk-ui-file-solid":"ui//mk-ui-file"}};function Ho(i){return Array.isArray(i)?i:typeof i=="string"?[i]:[]}var Ko=(i,l)=>l.indexOf(i)>0?l.indexOf(i):l.length;var Mr=i=>"spaces://"+i;var ut=i=>{var l;return(l=i==null?void 0:i.match(/(\\\\.|[^,])+/g))!=null?l:[]},Kt=i=>{if(!i)return"";let l=/\\[\\[(.*?)\\]\\]/g.exec(i),m=(l==null?void 0:l.length)>1?l[1].substring(0,Ko("|",l[1])):i;return m||i};var be=(i,l)=>{if(typeof i=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(i)||i.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(i))return"date";if(l=="tag"||l=="tags")return"tag";if(/\\[\\[.*?\\]\\]/.test(i))return"link"}else{if(typeof i=="number")return"number";if(typeof i=="boolean")return"boolean";if(i)if(Array.isArray(i)||typeof i=="string"&&i.indexOf(",")>-1){let m=Array.isArray(i)?i:[];if(typeof i=="string"&&i.indexOf(",")>-1&&(m=ut(i)),l=="tag"||l=="tags")return"tag-multi";if(m.length==1&&Array.isArray(m[0])&&m[0].length==1&&typeof m[0][0]=="string")return"link";let w=_t(m.map(y=>be(y,l)));return w.length==1&&w[0]=="link"?"link-multi":"option-multi"}else{if(i.isLuxonDateTime)return"date";if(i.isLuxonDuration)return"duration";if(i.type=="file")return"link";if(typeof i=="object"&&!Array.isArray(i)&&i!==null)return"object"}else return"unknown"}return"text"};var zo=i=>Object.keys(i!=null?i:{}).filter(l=>l!="position").filter(l=>l!="tag"&&l!="tags");var ae=i=>i.join(","),Yo=i=>i.join(", ");var br=(i,l)=>{switch(be(l,i)){case"object":return JSON.stringify(l);case"number":return l.toString();case"boolean":return l?"true":"false";case"date":return l;case"duration":return Yo(Object.keys(l.values).reduce((w,y)=>[...w,...l.values[y]>0?[l.values[y]+" "+y]:[]],[]));case"option-multi":case"link-multi":return typeof l=="string"?Kt(l):ae(l.map(w=>w?typeof w=="string"?Kt(w):w.path?w.path:Array.isArray(l)&&w.length==1&&Array.isArray(w[0])&&w[0].length==1&&typeof w[0][0]=="string"?w[0][0]:JSON.stringify(w):""));case"link":return Array.isArray(l)&&l.length==1&&Array.isArray(l[0])&&l[0].length==1&&typeof l[0][0]=="string"?l[0][0]:typeof l=="string"?Kt(l):l.path;case"text":case"tag":case"image":return l}return""};var Zo=i=>{switch(i){case"duration":return"text";case"unknown":return"text"}return i};var Rr=(i,l)=>i==l,iu=(i,l)=>(i!=null?i:"").length==0,uu=(i,l)=>(i!=null?i:"").toLowerCase().includes((l!=null?l:"").toLowerCase()),Lr=(i,l)=>parseFloat(i)>parseFloat(l),Er=(i,l)=>parseInt(i)>parseInt(l),fu=(i,l)=>{let m=i?ut(i):[];return(l?ut(l):[]).some(y=>m.some(O=>O==y))},Xo=i=>{let l=new Date(`${i}T00:00`),m=new Date;return l.getMonth()===m.getMonth()&&l.getDate()===m.getDate()};var Re={isNotEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(i,l)=>!iu(i,""),valueType:"none"},isEmpty:{type:["text","file","link","link-multi","fileprop","image"],fn:(i,l)=>iu(i,""),valueType:"none"},include:{fn:(i,l)=>uu(i,l),type:["text","file","link","link-multi","fileprop","image"],valueType:"text"},notInclude:{type:["text","file","link","link-multi","fileprop","image"],fn:(i,l)=>!uu(i,l),valueType:"text"},is:{type:["text","file","link","context","fileprop"],fn:(i,l)=>Rr(i,l),valueType:"text"},isNot:{type:["text","file","link","context","fileprop"],fn:(i,l)=>!Rr(i,l),valueType:"text"},equal:{type:["number"],fn:(i,l)=>Rr(i,l),valueType:"number"},isGreatThan:{type:["number"],fn:(i,l)=>Lr(i,l),valueType:"number"},isLessThan:{type:["number"],fn:(i,l)=>Er(i,l),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(i,l)=>!Lr(i,l),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(i,l)=>!Er(i,l),valueType:"number"},dateBefore:{type:["date","fileprop"],fn:(i,l)=>Er(i,l),valueType:"date"},dateAfter:{type:["date","fileprop"],fn:(i,l)=>Lr(i,l),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(i,l)=>Xo(i,l),valueType:"none"},isAnyInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(i,l)=>fu(i,l),valueType:"list"},isNoneInList:{type:["option","context","option-multi","context-multi","tags-multi","tags"],fn:(i,l)=>!fu(i,l),valueType:"list"},isTrue:{type:["boolean"],fn:(i,l)=>i=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(i,l)=>i!="true",valueType:"none"}};var Qd=(i,l)=>l.reduce((w,y)=>{let[O,J]=w,j=y.type=="fileprop"?Vo(J,y):y.type=="filemeta"?Qo(J,y):y.type=="frontmatter"?Jo(J,y):[],Y=J.filter(P=>!j.includes(P));return[[...O,...j],Y]},[[],i])[0],Vd=(i,l)=>l.reduce((m,w)=>w.type=="fileprop"?Vo(m,w):w.type=="filemeta"?Qo(m,w):w.type=="frontmatter"?Jo(m,w):[],i),Jo=(i,l)=>i.filter(m=>{let w=m.frontmatter;if(!w||!w[l.field])return!1;let y=Re[l.fn],O=!0;return y&&(O=y.fn(br(l.field,w[l.field]),l.value)),O}),Qo=(i,l)=>i.filter(m=>{let w="";l.field=="outlinks"?w=ae(m.outlinks):l.field=="inlinks"?w=ae(m.inlinks):l.field=="tags"&&(w=ae(m.tags));let y=Re[l.fn],O=!0;return y&&(O=y.fn(w,l.value)),O}),Vo=(i,l)=>i.filter(m=>{if(["name","path","sticker","color","isFolder","extension","ctime","mtime","size","parent"].includes(l.field)){let y=Re[l.fn],O=!0;return y&&(O=y.fn(m[l.field],l.value)),O}return!0}),jo=(i,l)=>i.reduce((w,y)=>!w||y.filters.length==0?w:y.type=="any"?Qd([l],y.filters).length>0:Vd([l],y.filters).length>0,!0);var ns=(i,l,m)=>{if(!l)return{changed:!1,cache:{path:i.path,frames:{},schemas:[],listitems:{}}};let w=l.schemas,y=w.filter(Y=>Y.type=="frame").reduce((Y,P)=>{var an,nn;return Et(Lt({},Y),{[P.id]:{schema:P,cols:l.fields.filter(rn=>rn.schemaId==P.id),rows:(nn=(an=l.tables[P.id])==null?void 0:an.rows)!=null?nn:[]}})},{}),O=w.filter(Y=>Y.type=="listitem").reduce((Y,P)=>{var an,nn;return Et(Lt({},Y),{[P.id]:{schema:P,cols:l.fields.filter(rn=>rn.schemaId==P.id),rows:(nn=(an=l.tables[P.id])==null?void 0:an.rows)!=null?nn:[]}})},{}),J={path:i.path,frames:y,schemas:w,listitems:O},j=!0;return m&&Or.default.isEqual(J,m)&&(j=!1),{changed:j,cache:J}},ts=(i,l,m)=>{var Tn,Q,k,vt,hn,Bn,pn,gn,yn;let w={};if(!l)return{changed:!1,cache:{cols:[],path:i.path,schemas:[],outlinks:[],contexts:[],files:[],tables:{},space:i,spaceMap:w}};let y=l.schemas.find(W=>W.primary=="true"),O={schema:y,cols:l.fields.filter(W=>W.schemaId==y.id),rows:(Q=(Tn=l.tables[y.id])==null?void 0:Tn.rows)!=null?Q:[]},J=l.schemas.filter(W=>W.type=="db").reduce((W,dn)=>{var _n,zn;return Et(Lt({},W),{[dn.id]:{schema:dn,cols:l.fields.filter(zt=>zt.schemaId==dn.id),rows:(zn=(_n=l.tables[dn.id])==null?void 0:_n.rows)!=null?zn:[]}})},{}),j=(vt=(k=O.cols)==null?void 0:k.filter(W=>W.type.startsWith("context")))!=null?vt:[],Y=(Bn=(hn=O.cols)==null?void 0:hn.filter(W=>W.type.startsWith("link")))!=null?Bn:[],P=_t(j.map(W=>W.value));j.forEach(W=>{w[W.name]={},O.rows.forEach(dn=>{ut(dn[W.name]).forEach(_n=>{var zn;return w[W.name][_n]=[...(zn=w[W.name][_n])!=null?zn:[],dn.File]})})});let an=_t(O.rows.reduce((W,dn)=>_t([...W,...[...j,...Y].flatMap(_n=>ut(dn[_n.name]).map(zn=>Kt(zn)))]),[])),nn={cols:l.fields.filter(W=>W.schemaId==y.id),path:i.path,contexts:P,outlinks:an,files:(yn=(gn=(pn=J.files)==null?void 0:pn.rows)==null?void 0:gn.map(W=>W.File))!=null?yn:[],tables:J,schemas:l.schemas,space:i,spaceMap:w},rn=!0;return m&&Or.default.isEqual(nn,m)&&(rn=!0),{changed:rn,cache:nn}},jd=i=>{var m,w,y,O,J,j,Y,P,an,nn,rn,Tn,Q;let l=[];return i&&i.tags&&l.push(...(w=(m=i.tags)==null?void 0:m.map(k=>k.tag))!=null?w:[]),i&&((y=i.frontmatter)==null?void 0:y.tags)&&l.push(...(typeof((O=i.frontmatter)==null?void 0:O.tags)=="string"?ut(i.frontmatter.tags.replace(/ /g,"")):Array.isArray((J=i.frontmatter)==null?void 0:J.tags)?(Y=(j=i.frontmatter)==null?void 0:j.tags)!=null?Y:[]:[]).filter(k=>typeof k=="string").map(k=>"#"+k)),i&&((P=i.frontmatter)==null?void 0:P.tag)&&l.push(...(typeof((an=i.frontmatter)==null?void 0:an.tag)=="string"?ut(i.frontmatter.tag.replace(/ /g,"")):Array.isArray((nn=i.frontmatter)==null?void 0:nn.tag)?(Tn=(rn=i.frontmatter)==null?void 0:rn.tag)!=null?Tn:[]:[]).filter(k=>typeof k=="string").map(k=>"#"+k)),(Q=_t(l))!=null?Q:[]};var es=(i,l,m,w,y,O,J,j,Y)=>{var Ot,bn,Oe,De,Pe,ft,Dt,Be,xt,yt,We,Pt;let P={cacheType:"file",path:i.path,name:i.name,displayName:i.name,filename:i.filename};i.stat&&(P.ctime=i.stat.ctime,P.mtime=i.stat.mtime,P.size=i.stat.size,P.extension=i.extension);let an=[],nn=jd(O),rn=(H,un,G=new Set)=>{var Yt,Wn;let fn=[];for(let Ue of un){let Pr=(Wn=(Yt=H.get(Ue))==null?void 0:Yt.contexts)!=null?Wn:[];for(let tt of Pr)G.has(tt)||(fn.push(tt),G.add(tt),fn.push(...rn(H,[Mr(tt)],G)))}return fn};if(m.has(i.parent))for(let H of(Ot=m.get(i.parent).contexts)!=null?Ot:[])an.push(H);an.push(...nn);let Tn=i.name,Q=[i.name],k=(bn=y==null?void 0:y.sticker)!=null?bn:"",vt=(Oe=y==null?void 0:y.color)!=null?Oe:"",hn=(De=y==null?void 0:y.folder)!=null?De:"";hn=="true"&&(hn="");let Bn=i.parent,pn=i.isFolder,gn={},yn={},W=[],dn=[],_n=O==null?void 0:O.frontmatter;O!=null&&O.links&&dn.push(...O.links.map(H=>H.link));let zn=j&&pn?j.folderNotePath:i.path;for(let H of Object.keys(J))zn in J[H]&&W.push(H);let zt="";if(_n){let un=ko(zo(_n)).reduce((G,fn)=>Et(Lt({},G),{[fn]:{name:fn,type:Zo(be(_n[fn],fn))}}),{});Object.keys(un).forEach(G=>{gn[G]=br(G,_n[G]),yn[G]=un[G].type,un[G].type.startsWith("link")&&dn.push(Kt(gn[G]))}),zt=(Pe=gn[l.fmKeyBanner])!=null?Pe:"",gn[l.fmKeySticker]&&(k=_n[l.fmKeySticker]),gn[l.fmKeyColor]&&(vt=_n[l.fmKeyColor]),gn[l.fmKeyAlias]&&(Q=Ho(_n[l.fmKeyAlias]))}let Dr=l.spacesUseAlias&&(ft=Q[0])!=null?ft:Tn;k=(k==null?void 0:k.length)>0?k:$o(P.path,P.extension,!1);let mt=Et(Lt({},P),{name:Tn,tags:_t(an),displayName:Dr,aliases:Q,fileTags:nn,folderNote:j,sticker:k,color:vt,parent:Bn,banner:zt,isFolder:pn,sortBy:hn,frontmatter:gn,frontmatterTypes:yn,inlinks:W,outlinks:dn}),jn=[],Le={};for(let H of an)jn.push(Mr(H));for(let[H,un]of m){if(un.space&&un.space.folderPath==Bn&&un.space.defPath!=i.path){jn.push(H);continue}if(((Be=(Dt=un.metadata)==null?void 0:Dt.filters)==null?void 0:Be.length)>0&&jo(un.metadata.filters,mt)){jn.push(H);continue}if(((yt=(xt=un.metadata)==null?void 0:xt.links)==null?void 0:yt.length)>0&&((Pt=(We=un.metadata)==null?void 0:We.links)!=null?Pt:[]).find(fn=>fn==mt.path)){jn.push(H);continue}}let nt=rn(m,jn);jn.push(...nt.map(H=>Mr(H))),jn.forEach(H=>{var un,G,fn;Le[H]=(fn=(G=(un=w.get(H))==null?void 0:un.tables)==null?void 0:G.files)==null?void 0:fn.rows.findIndex(Yt=>Yt.File==i.path)}),mt.tags.push(...nt);let Yn=j&&!pn?Et(Lt({},mt),{spaces:[],contexts:[]}):Et(Lt({},mt),{spaces:_t(jn),spaceRanks:Le}),Ee=!0;return Y&&Or.default.isEqual(Yn,Y)&&(Ee=!1),{changed:Ee,cache:Yn}};function rs(i){let{file:l,settings:m,spacesCache:w,vaultItem:y,metadataCache:O,contextsCache:J,resolvedLinks:j,folderNote:Y,oldMetadata:P}=i;return es(l,m,w,J,y,O,j,Y,P)}function is(i){let{space:l,mdb:m,oldCache:w}=i;return ts(l,m,w)}function us(i){let{space:l,mdb:m,oldCache:w}=i;return ns(l,m,w)}var n_=self;n_.onmessage=async i=>{let{payload:l,job:m}=i.data,w;m.type=="file"?w=rs(l):m.type=="context"?w=is(l):m.type=="frames"&&(w=us(l));try{postMessage({job:m,result:w})}catch(y){console.log(y),postMessage({job:m,result:{$error:`Failed to index ${m.type} ${m.path}: ${y}`}})}};\n/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n'); } // src/superstate/workers/manager.ts -var Manager = class extends import_obsidian62.Component { +var Manager = class extends import_obsidian64.Component { constructor(numWorkers, cache) { super(); this.numWorkers = numWorkers; @@ -64703,8 +64841,8 @@ var loadSpaces = (plugin) => { plugin2, getFolderPathFromString(plugin2, plugin2.settings.spacesFolder) ); - const allcontexts = (_b2 = uniq([...Object.keys(plugin2.app.metadataCache.getTags()), ...(_a2 = folder == null ? void 0 : folder.children.filter( - (f4) => f4 instanceof import_obsidian63.TFolder && f4.name.charAt(0) == "#" + const allcontexts = (_b2 = uniq([...Object.keys(plugin2.app.metadataCache.getTags()).map((f4) => tagToTagPath(f4)), ...(_a2 = folder == null ? void 0 : folder.children.filter( + (f4) => f4 instanceof import_obsidian65.TFolder && f4.name.charAt(0) == "#" ).map((g4) => g4.name)) != null ? _a2 : []]).map((f4) => spaceFromTag(plugin2, tagPathToTag(f4)))) != null ? _b2 : []; return allcontexts; }; @@ -64713,7 +64851,7 @@ var loadSpaces = (plugin) => { const rootFolder = plugin2.app.vault.getRoot(); function recursiveFx(folder) { for (const child of folder.children) { - if (child instanceof import_obsidian63.TFolder) { + if (child instanceof import_obsidian65.TFolder) { if (!child.path.startsWith(plugin2.settings.spacesFolder + "/#")) { const childFolder = child; folders.push(child); @@ -64727,10 +64865,12 @@ var loadSpaces = (plugin) => { return folders.map((f4) => spaceFromFolder(plugin2, f4.path)); }; const allTagSpaces = plugin.settings.enableTagSpaces && plugin.settings.enableDefaultSpaces ? getAllTagContextFiles(plugin) : []; + console.log(allTagSpaces); const allFolders = getAllFolderContextFiles(plugin); + console.log(allFolders); return [...allTagSpaces, ...allFolders]; }; -var Superstate = class extends import_obsidian63.Component { +var Superstate = class extends import_obsidian65.Component { constructor(app2, indexVersion, onChange, plugin) { super(); this.app = app2; @@ -64843,9 +64983,9 @@ var Superstate = class extends import_obsidian63.Component { } }); const spaceFolder = getAbstractFileAtPath(this.plugin, "Context"); - if (spaceFolder instanceof import_obsidian63.TFolder) { + if (spaceFolder instanceof import_obsidian65.TFolder) { promises.push(...spaceFolder.children.map((f4) => { - if (f4 instanceof import_obsidian63.TFile && f4.extension == "mdb") { + if (f4 instanceof import_obsidian65.TFile && f4.extension == "mdb") { const folderPath = `${this.plugin.settings.spacesFolder}/${f4.basename}/.space`; return this.plugin.files.fileExists(folderPath).then((g4) => { if (!g4) @@ -64860,7 +65000,7 @@ var Superstate = class extends import_obsidian63.Component { function recursiveFx(folder) { for (const child of folder.children) { if (!folder.path.startsWith(plugin.settings.spacesFolder)) { - if (child instanceof import_obsidian63.TFolder) { + if (child instanceof import_obsidian65.TFolder) { const childFolder = child; folders.push(child); if (childFolder.children) @@ -64917,7 +65057,7 @@ var Superstate = class extends import_obsidian63.Component { rebuildIndex(this.plugin, true); } async saveSpacesDatabaseToDisk(tables, save = true) { - if (await this.plugin.files.fileExists((0, import_obsidian63.normalizePath)(this.plugin.spacesDBPath)) && !this.spacesDBLoaded) { + if (await this.plugin.files.fileExists((0, import_obsidian65.normalizePath)(this.plugin.spacesDBPath)) && !this.spacesDBLoaded) { return; } this.spacesDBLoaded = true; @@ -64951,7 +65091,10 @@ var Superstate = class extends import_obsidian63.Component { getSpaceItems(spacePath, filesOnly) { let items = []; if (spacePath == "spaces://$tags") { - items = this.allSpaces().filter((f4) => f4.type == "tag").map((f4) => f4.path); + items = this.allSpaces().filter((f4) => f4.type == "tag").filter((f4) => { + var _a2; + return [...(_a2 = this.tagsMap.getInverse(f4.name)) != null ? _a2 : []].length > 0; + }).map((f4) => f4.path); } else { items = [...this.spacesMap.getInverse(spacePath)]; } @@ -65006,7 +65149,7 @@ var Superstate = class extends import_obsidian63.Component { async loadFromCache() { const allFiles = getAllAbstractFilesInVault(this.plugin); if (this.plugin.settings.indexSVG) { - const cacheIcons = allFiles.filter((f4) => f4 instanceof import_obsidian63.TFile && f4.extension == "svg").map((s5) => this.persister.load(s5.path, "icon").then((string) => { + const cacheIcons = allFiles.filter((f4) => f4 instanceof import_obsidian65.TFile && f4.extension == "svg").map((s5) => this.persister.load(s5.path, "icon").then((string) => { if ((string == null ? void 0 : string.length) > 0) this.iconsCache.set(s5.path, string); })); @@ -65232,7 +65375,7 @@ var Superstate = class extends import_obsidian63.Component { } async createFile(path) { const file = getAbstractFileAtPath(this.plugin, path); - if (file instanceof import_obsidian63.TFolder) { + if (file instanceof import_obsidian65.TFolder) { await this.reloadSpace(spaceFromFolder(this.plugin, path)); } await this.reloadFile(file); @@ -65343,7 +65486,7 @@ var Superstate = class extends import_obsidian63.Component { return [...this.framesIndex.values()].filter((f4) => f4).flatMap((f4) => f4.schemas.filter((f5) => f5.type == "listitem").map((s5) => ({ schema: s5, path: f4.path }))); } async updateSpaceMetadata(spacePath, metadata) { - var _a2, _b2, _c2; + var _a2, _b2, _c2, _d2; const space = this.spacesIndex.get(spacePath); if (!space) { return this.reloadSpaceByPath(spacePath); @@ -65358,7 +65501,9 @@ var Superstate = class extends import_obsidian63.Component { ...space, metadata, contexts: (_b2 = metadata == null ? void 0 : metadata.contexts) != null ? _b2 : [], - sticker: (_c2 = metadata.sticker) != null ? _c2 : iconForSpaceType(space.type, space.path, true), + aliases: metadata.aliases, + displayName: this.plugin.settings.spacesUseAlias ? (_c2 = ensureArray(metadata.aliases)[0]) != null ? _c2 : space.name : space.name, + sticker: (_d2 = metadata.sticker) != null ? _d2 : iconForSpaceType(space.type, space.path, true), banner: metadata.banner, color: metadata.color, sortable @@ -65396,7 +65541,7 @@ var Superstate = class extends import_obsidian63.Component { return null; } async reloadSpace(space, spaceMetadata, initialized = true) { - var _a2, _b2, _c2, _d2, _e2, _f, _g, _h; + var _a2, _b2, _c2, _d2, _e2, _f, _g; if (!space) return; const defFile = getAbstractFileAtPath(this.plugin, space.defPath); @@ -65419,13 +65564,14 @@ var Superstate = class extends import_obsidian63.Component { const cache = { name: space.name, space, - alias: (_f = (_e2 = ensureArray(metadata.aliases)) == null ? void 0 : _e2[0]) != null ? _f : space.name, + displayName: this.plugin.settings.spacesUseAlias ? (_e2 = ensureArray(metadata.aliases)[0]) != null ? _e2 : space.name : space.name, + aliases: ensureArray(metadata.aliases), cacheType: "space", path: space.path, frontmatter, type, - parent: (_g = folder == null ? void 0 : folder.parent) == null ? void 0 : _g.path, - contexts: contexts.map((f4) => tagToTagPath(f4)), + parent: (_f = folder == null ? void 0 : folder.parent) == null ? void 0 : _f.path, + contexts: contexts.map((f4) => ensureTag(f4)), metadata, sortable, sticker, @@ -65434,7 +65580,7 @@ var Superstate = class extends import_obsidian63.Component { }; this.spacesIndex.set(space.path, cache); this.persister.store(space.path, JSON.stringify(cache), "space"); - (_h = cache.metadata.links) == null ? void 0 : _h.forEach((f4) => { + (_g = cache.metadata.links) == null ? void 0 : _g.forEach((f4) => { if (pathIsSpace(this.plugin, f4)) { this.spacesMap.set(f4, /* @__PURE__ */ new Set([...this.spacesMap.get(f4), space.path])); } @@ -65515,7 +65661,7 @@ var Superstate = class extends import_obsidian63.Component { }; // src/utils/contexts/markdownPost.tsx -var import_obsidian64 = require("obsidian"); +var import_obsidian66 = require("obsidian"); // src/react/components/MarkdownEditor/FileHeaderContextView.tsx var FileHeaderContextView = (props2) => { @@ -65641,7 +65787,7 @@ var replaceInlineContext = (plugin, el, ctx) => { element.setAttribute("data-path", ctx.sourcePath); element.toggleClass("mk-inline-context", true); const reactEl = createRoot(element); - ctx.addChild(new import_obsidian64.MarkdownRenderChild(element)); + ctx.addChild(new import_obsidian66.MarkdownRenderChild(element)); if (ctx.sourcePath.match(urlRegex)) { reactEl.render( /* @__PURE__ */ Cn.createElement(FileHeaderContextView, { @@ -65682,7 +65828,7 @@ var loadSQL = async () => { }; // src/midd/filesystem.ts -var import_obsidian65 = require("obsidian"); +var import_obsidian67 = require("obsidian"); var FilesystemMiddleware = class { constructor(type, plugin) { this.type = type; @@ -65737,7 +65883,7 @@ var FilesystemMiddleware = class { if (type == "md") { const parentFolder = getAbstractFileAtPath(this.plugin, parent); return this.plugin.app.fileManager.createNewMarkdownFile( - parentFolder instanceof import_obsidian65.TFolder ? parentFolder : parentFolder.parent, + parentFolder instanceof import_obsidian67.TFolder ? parentFolder : parentFolder.parent, name ); } else if (type == "canvas") { @@ -65752,6 +65898,7 @@ var FilesystemMiddleware = class { } } async createFolder(path) { + console.log("create", path); if (this.type == 0 /* Obsidian */) { if (!await this.fileExists(path)) { const newFolder = await this.plugin.app.vault.createFolder(path); @@ -65788,7 +65935,7 @@ var FilesystemMiddleware = class { }; // src/midd/metadata.ts -var import_obsidian66 = require("obsidian"); +var import_obsidian68 = require("obsidian"); var MetadataMiddleware = class { static create(plugin, processors, editors) { const newMiddleware = new MetadataMiddleware(plugin, processors, editors); @@ -65807,7 +65954,7 @@ var MetadataMiddleware = class { } async processFrontMatter(path, fn2) { const afile = getAbstractFileAtPath(this.plugin, path); - if (afile && afile instanceof import_obsidian66.TFile) { + if (afile && afile instanceof import_obsidian68.TFile) { if (this.plugin.app.fileManager.processFrontMatter) { return this.plugin.app.fileManager.processFrontMatter(afile, fn2); } @@ -65853,10 +66000,10 @@ function around1(obj, method, createWrapper) { } // src/utils/spaces/patches.ts -var import_obsidian67 = require("obsidian"); +var import_obsidian69 = require("obsidian"); var patchFilesPlugin = (plugin) => { plugin.register( - around(import_obsidian67.Workspace.prototype, { + around(import_obsidian69.Workspace.prototype, { getLeavesOfType(old) { return function(type) { if (type == "file-explorer") { @@ -65870,7 +66017,7 @@ var patchFilesPlugin = (plugin) => { }; var patchWorkspace = (plugin) => { let layoutChanging = false; - const uninstaller = around(import_obsidian67.Workspace.prototype, { + const uninstaller = around(import_obsidian69.Workspace.prototype, { changeLayout(old) { return async function(workspace) { layoutChanging = true; @@ -65891,7 +66038,7 @@ var patchWorkspace = (plugin) => { return false; if (layoutChanging) return false; - if (parent === plugin.app.workspace.rootSplit || import_obsidian67.WorkspaceContainer && parent instanceof import_obsidian67.WorkspaceContainer) { + if (parent === plugin.app.workspace.rootSplit || import_obsidian69.WorkspaceContainer && parent instanceof import_obsidian69.WorkspaceContainer) { for (const popover of FlowEditor.popoversForWindow( parent.win )) { @@ -66079,6 +66226,8 @@ var modifyFlowDom = (plugin) => { inlineContext.classList.add("mk-inline-context"); inlineContext.classList.add("embedded-backlinks"); sizerEl.prepend(inlineContext); + } else if (sizerEl.indexOf(inlineContext) != 0) { + sizerEl.prepend(inlineContext); } const inlineContextReactEl = createRoot(inlineContext); inlineContextReactEl.render( @@ -66114,7 +66263,7 @@ var modifyFlowDom = (plugin) => { // src/main.ts var makeMDVersion = 0.804; -var MakeMDPlugin = class extends import_obsidian68.Plugin { +var MakeMDPlugin = class extends import_obsidian70.Plugin { constructor() { super(...arguments); this.dataViewAPI = () => (0, import_obsidian_dataview.getAPI)(); @@ -66126,20 +66275,20 @@ var MakeMDPlugin = class extends import_obsidian68.Plugin { this.onCreate = async (file) => { if (!file) return; - this.index.addToVaultQueue(() => onFileCreated(this, file.path, file instanceof import_obsidian68.TFolder)); + this.index.addToVaultQueue(() => onFileCreated(this, file.path, file instanceof import_obsidian70.TFolder)); }; this.onDelete = async (file) => { - if (file instanceof import_obsidian68.TFile && file.extension != "mdb") { + if (file instanceof import_obsidian70.TFile && file.extension != "mdb") { this.index.addToVaultQueue(() => onFileDeleted(this, file.path)); - } else if (file instanceof import_obsidian68.TFolder) { + } else if (file instanceof import_obsidian70.TFolder) { this.index.addToVaultQueue(() => onFolderDeleted(this, file.path)); } this.activeFileChange(); }; this.onRename = async (file, oldPath) => { - if (file instanceof import_obsidian68.TFile && file.extension != "mdb") { + if (file instanceof import_obsidian70.TFile && file.extension != "mdb") { this.index.addToVaultQueue(() => onFileChanged(this, oldPath, file.path)); - } else if (file instanceof import_obsidian68.TFolder) { + } else if (file instanceof import_obsidian70.TFolder) { this.index.addToVaultQueue(() => onFolderChanged(this, oldPath, file.path)); } this.activeFileChange(); @@ -66286,7 +66435,7 @@ var MakeMDPlugin = class extends import_obsidian68.Plugin { "dataview:metadata-change", (type, file, oldPath) => { if (type === "update" && this.app.metadataCache.fileCache[file.path].mtime >= this.loadTime && this.dataViewAPI().index.revision !== this.dataViewLastIndex && this.dataViewReady) { - if (file instanceof import_obsidian68.TFile) { + if (file instanceof import_obsidian70.TFile) { this.metadataChange(file); } this.dataViewLastIndex = this.dataViewAPI().index.revision; @@ -66318,22 +66467,23 @@ var MakeMDPlugin = class extends import_obsidian68.Plugin { this.registerEvent( this.app.workspace.on("active-leaf-change", () => this.activeFileChange()) ); + this.registerEvent(app.workspace.on("layout-change", () => this.activeFileChange())); } convertFolderNote() { const activeLeaf = this.app.workspace.activeLeaf; if ((activeLeaf == null ? void 0 : activeLeaf.view.getViewType()) == "markdown") { - const view = this.app.workspace.getActiveViewOfType(import_obsidian68.MarkdownView); - if (view instanceof import_obsidian68.MarkdownView && view.file instanceof import_obsidian68.TFile) { + const view = this.app.workspace.getActiveViewOfType(import_obsidian70.MarkdownView); + if (view instanceof import_obsidian70.MarkdownView && view.file instanceof import_obsidian70.TFile) { noteToFolderNote(this, view.file, true); } } else { - new import_obsidian68.Notice("The view is not a note"); + new import_obsidian70.Notice("The view is not a note"); } } getActiveFile() { var _a2, _b2, _c2; let filePath = null; - let leaf = (_a2 = this.app.workspace.getActiveViewOfType(import_obsidian68.MarkdownView)) == null ? void 0 : _a2.leaf; + let leaf = (_a2 = this.app.workspace.getActiveViewOfType(import_obsidian70.MarkdownView)) == null ? void 0 : _a2.leaf; if (!leaf) { leaf = (_b2 = this.app.workspace.getActiveViewOfType(SpaceView)) == null ? void 0 : _b2.leaf; } @@ -66466,7 +66616,7 @@ var MakeMDPlugin = class extends import_obsidian68.Plugin { }); this.app.workspace.onLayoutReady(async () => { if (this.settings.enableDefaultSpaces) { - await this.files.createFolder(getFolderPathFromString(this, this.settings.spacesFolder)); + await this.files.createFolder(this.settings.spacesFolder); if (this.settings.enableHomeSpace) { await this.files.createFolder(this.settings.spacesFolder + "/Home"); } @@ -66553,14 +66703,14 @@ var MakeMDPlugin = class extends import_obsidian68.Plugin { this.loadTime = Date.now(); this.metadata = MetadataMiddleware.create(this, [], []); this.files = FilesystemMiddleware.create(this, 0 /* Obsidian */); - (0, import_obsidian68.addIcon)("mk-logo", mkLogo); + (0, import_obsidian70.addIcon)("mk-logo", mkLogo); await this.loadSettings(); this.index = this.addChild( Superstate.create(this.app, "0.9", () => { this.debouncedRefresh(); }, this) ); - this.spacesDBPath = (0, import_obsidian68.normalizePath)( + this.spacesDBPath = (0, import_obsidian70.normalizePath)( this.app.vault.configDir + "/plugins/make-md/Spaces.mdb" ); this.loadSuperState(); diff --git a/manifest.json b/manifest.json index de98622..7f4bfb6 100755 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "make-md", "name": "MAKE.md", - "version": "0.8.6", + "version": "0.8.7", "minAppVersion": "0.16.0", "description": "Make.md brings you features that supercharges Obsidian. Sort your files in custom order and add file icons using Spaces. Edit inline embeds with Flow Editor. And style your text and add new markdown blocks without writing markdown using Maker Mode.", "author": "MAKE.md", diff --git a/styles.css b/styles.css index 086c982..ad7ad44 100644 --- a/styles.css +++ b/styles.css @@ -213,8 +213,10 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp } .mk-flow-container > div > span { font-size: var(--font-smallest); - padding: var(--size-4-1) var(--context-padding); color: var(--text-faint); + display: flex; + align-items: center; + padding: var(--size-4-1); } .mk-space-scroller .mk-flowspace-editor { padding: 0; @@ -838,14 +840,6 @@ body:not(.is-mobile) .markdown-source-view.mod-cm6.is-readable-line-width .mk-sp box-shadow: none; color: var(--text-faint); } -body:not(.is-mobile) .mk-view-config .mk-view-options, -body:not(.is-mobile) .mk-view-config .mk-view-selector > *:not(.mk-is-active) { - opacity: 0; -} -body:not(.is-mobile) .mk-view-config:hover .mk-view-options, -body:not(.is-mobile) .mk-view-config:hover .mk-view-selector > *:not(.mk-is-active) { - opacity: 1; -} .mk-view-config button:hover { color: var(--text-normal); } @@ -1480,6 +1474,8 @@ body { .mk-col-header > div { display: flex; gap: 4px; + width: 100%; + align-items: center; } .mk-col-header-context { margin-left: 4px; @@ -1648,6 +1644,7 @@ body { } .mk-cell-link, .mk-cell-context, +.mk-cell-tags, .mk-cell-option { width: 100%; min-height: 24px; @@ -1818,6 +1815,7 @@ body { display: flex; border-radius: 4px; } +.mk-cell-tags:hover .mk-cell-option-new, .mk-cell-link:hover .mk-cell-option-new, .mk-cell-context:hover .mk-cell-option-new, .mk-cell-option:hover .mk-cell-option-new { @@ -2651,10 +2649,11 @@ div:not(.mk-flowspace-editor) > .mk-floweditor .cm-content { gap: 10px; } .mk-file-context-field-key { - padding: var(--size-4-1) var(--size-4-2); - min-width: 122px; - display: flex; - gap: 6px; + padding: var(--size-4-1); + display: inline-block; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } .mk-file-context-field-space { display: flex; @@ -2698,7 +2697,8 @@ div:not(.mk-flowspace-editor) > .mk-floweditor .cm-content { color: var(--text-normal) !important; } .mk-file-context-field { - min-width: 100px; + max-width: 140px; + min-width: 140px; font-size: var(--font-ui-small); color: var(--text-faint); min-height: 24px;