From 192f7c76b1377b79e57f96646fd616c2df3508f2 Mon Sep 17 00:00:00 2001 From: GSteve-Paul Date: Wed, 27 May 2026 14:29:14 +0800 Subject: [PATCH] fix: register all locale resources --- dist/components/index.js | 292 ++++++++++++++++++++++++++++++++++- dist/components/index.js.map | 2 +- dist/index.js | 292 ++++++++++++++++++++++++++++++++++- dist/index.js.map | 2 +- src/i18n/index.ts | 58 +++++++ 5 files changed, 642 insertions(+), 4 deletions(-) diff --git a/dist/components/index.js b/dist/components/index.js index 74f30a5..ba43ee3 100644 --- a/dist/components/index.js +++ b/dist/components/index.js @@ -77,9 +77,299 @@ var en_US_default = { } }; +// src/i18n/locales/en-GB.ts +var en_GB_default = { + components: { + explorer: { + title: "Explorer" + } + } +}; + +// src/i18n/locales/ar-SA.ts +var ar_SA_default = { + components: { + explorer: { + title: "\u0627\u0644\u0645\u0633\u062A\u0639\u0631\u0636" + } + } +}; + +// src/i18n/locales/ca-ES.ts +var ca_ES_default = { + components: { + explorer: { + title: "Explorador" + } + } +}; + +// src/i18n/locales/cs-CZ.ts +var cs_CZ_default = { + components: { + explorer: { + title: "Proch\xE1zet" + } + } +}; + +// src/i18n/locales/de-DE.ts +var de_DE_default = { + components: { + explorer: { + title: "Explorer" + } + } +}; + +// src/i18n/locales/es-ES.ts +var es_ES_default = { + components: { + explorer: { + title: "Explorador" + } + } +}; + +// src/i18n/locales/fa-IR.ts +var fa_IR_default = { + components: { + explorer: { + title: "\u0645\u0637\u0627\u0644\u0628" + } + } +}; + +// src/i18n/locales/fi-FI.ts +var fi_FI_default = { + components: { + explorer: { + title: "Selain" + } + } +}; + +// src/i18n/locales/fr-FR.ts +var fr_FR_default = { + components: { + explorer: { + title: "Explorateur" + } + } +}; + +// src/i18n/locales/he-IL.ts +var he_IL_default = { + components: { + explorer: { + title: "\u05E1\u05D9\u05D9\u05E8" + } + } +}; + +// src/i18n/locales/hu-HU.ts +var hu_HU_default = { + components: { + explorer: { + title: "F\xE1jlb\xF6ng\xE9sz\u0151" + } + } +}; + +// src/i18n/locales/id-ID.ts +var id_ID_default = { + components: { + explorer: { + title: "Penjelajah" + } + } +}; + +// src/i18n/locales/it-IT.ts +var it_IT_default = { + components: { + explorer: { + title: "Esplora" + } + } +}; + +// src/i18n/locales/ja-JP.ts +var ja_JP_default = { + components: { + explorer: { + title: "\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u30FC" + } + } +}; + +// src/i18n/locales/kk-KZ.ts +var kk_KZ_default = { + components: { + explorer: { + title: "\u0417\u0435\u0440\u0442\u0442\u0435\u0443\u0448\u0456" + } + } +}; + +// src/i18n/locales/ko-KR.ts +var ko_KR_default = { + components: { + explorer: { + title: "\uD0D0\uC0C9\uAE30" + } + } +}; + +// src/i18n/locales/lt-LT.ts +var lt_LT_default = { + components: { + explorer: { + title: "Nar\u0161ykl\u0117" + } + } +}; + +// src/i18n/locales/nb-NO.ts +var nb_NO_default = { + components: { + explorer: { + title: "Utforsker" + } + } +}; + +// src/i18n/locales/nl-NL.ts +var nl_NL_default = { + components: { + explorer: { + title: "Verkenner" + } + } +}; + +// src/i18n/locales/pl-PL.ts +var pl_PL_default = { + components: { + explorer: { + title: "Przegl\u0105daj" + } + } +}; + +// src/i18n/locales/pt-BR.ts +var pt_BR_default = { + components: { + explorer: { + title: "Explorador" + } + } +}; + +// src/i18n/locales/ro-RO.ts +var ro_RO_default = { + components: { + explorer: { + title: "Explorator" + } + } +}; + +// src/i18n/locales/ru-RU.ts +var ru_RU_default = { + components: { + explorer: { + title: "\u041F\u0440\u043E\u0432\u043E\u0434\u043D\u0438\u043A" + } + } +}; + +// src/i18n/locales/th-TH.ts +var th_TH_default = { + components: { + explorer: { + title: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2B\u0E19\u0E49\u0E32" + } + } +}; + +// src/i18n/locales/tr-TR.ts +var tr_TR_default = { + components: { + explorer: { + title: "Gezgin" + } + } +}; + +// src/i18n/locales/uk-UA.ts +var uk_UA_default = { + components: { + explorer: { + title: "\u041F\u0440\u043E\u0432\u0456\u0434\u043D\u0438\u043A" + } + } +}; + +// src/i18n/locales/vi-VN.ts +var vi_VN_default = { + components: { + explorer: { + title: "N\u1ED9i dung" + } + } +}; + +// src/i18n/locales/zh-CN.ts +var zh_CN_default = { + components: { + explorer: { + title: "\u63A2\u7D22" + } + } +}; + +// src/i18n/locales/zh-TW.ts +var zh_TW_default = { + components: { + explorer: { + title: "\u63A2\u7D22" + } + } +}; + // src/i18n/index.ts var locales = { - "en-US": en_US_default + "en-US": en_US_default, + "en-GB": en_GB_default, + "ar-SA": ar_SA_default, + "ca-ES": ca_ES_default, + "cs-CZ": cs_CZ_default, + "de-DE": de_DE_default, + "es-ES": es_ES_default, + "fa-IR": fa_IR_default, + "fi-FI": fi_FI_default, + "fr-FR": fr_FR_default, + "he-IL": he_IL_default, + "hu-HU": hu_HU_default, + "id-ID": id_ID_default, + "it-IT": it_IT_default, + "ja-JP": ja_JP_default, + "kk-KZ": kk_KZ_default, + "ko-KR": ko_KR_default, + "lt-LT": lt_LT_default, + "nb-NO": nb_NO_default, + "nl-NL": nl_NL_default, + "pl-PL": pl_PL_default, + "pt-BR": pt_BR_default, + "ro-RO": ro_RO_default, + "ru-RU": ru_RU_default, + "th-TH": th_TH_default, + "tr-TR": tr_TR_default, + "uk-UA": uk_UA_default, + "vi-VN": vi_VN_default, + "zh-CN": zh_CN_default, + "zh-TW": zh_TW_default }; function i18n(locale) { return locales[locale] || en_US_default; diff --git a/dist/components/index.js.map b/dist/components/index.js.map index 0432f77..a6ecad1 100644 --- a/dist/components/index.js.map +++ b/dist/components/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../node_modules/preact/src/constants.js","../../node_modules/preact/src/options.js","../../node_modules/preact/src/diff/catch-error.js","../../node_modules/preact/src/component.js","../../node_modules/preact/src/diff/props.js","../../node_modules/preact/src/create-context.js","../../node_modules/preact/jsx-runtime/src/index.js","../../src/components/OverflowList.tsx","../../node_modules/@quartz-community/utils/src/lang.ts","../../src/i18n/locales/en-US.ts","../../src/i18n/index.ts","../../src/components/styles/explorer.scss","../../src/components/scripts/explorer.inline.ts","../../src/components/Explorer.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","__k","__b","__v","__i","__u","defaultProps","u","a","b","r","OverflowList"],"mappings":";AACO,ICUDA,CAAAA;AAAAA,CAAAA,GAAU,EACfC,KCDM,SAAqBC,EAAAA,EAAOC,EAAAA,EAAOC,EAAAA,EAAUC,EAAAA,EAAAA;AAQnD,EAAA,KAAA,IANIC,EAAAA,EAEHC,EAAAA,EAEAC,EAAAA,EAEOL,EAAAA,GAAQA,EAAAA,CAAKM,EAAAA,IACpB,IAAA,CAAKH,EAAAA,GAAYH,EAAAA,CAAKO,GAAAA,KAAAA,CAAiBJ,EAAAA,CAASG,IAC/C,IAAA;AAcC,IAAA,IAAA,CAbAF,EAAAA,GAAOD,EAAAA,CAAUK,WAAAA,KFND,IAAA,IEQJJ,GAAKK,wBAAAA,KAChBN,EAAAA,CAAUO,QAAAA,CAASN,EAAAA,CAAKK,wBAAAA,CAAyBV,EAAAA,CAAAA,CAAAA,EACjDM,KAAUF,EAAAA,CAASQ,GAAAA,CAAAA,EFVJ,IAAA,IEaZR,EAAAA,CAAUS,iBAAAA,KACbT,EAAAA,CAAUS,iBAAAA,CAAkBb,EAAAA,EAAOG,MAAa,EAAE,CAAA,EAClDG,EAAAA,GAAUF,EAAAA,CAASQ,GAAAA,CAAAA,EAIhBN,EAAAA,EACH,OAAQF,GAASU,GAAAA,GAAiBV,EAAAA;AAIpC,EAAA,CAAA,CAAA,OAFSW,EAAAA,EAAAA;AACRf,IAAAA,EAAAA,GAAQe,EAAAA;AACT,EAAA;AAIF,EAAA,MAAMf,EAAAA;AACP,CAA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,gBAAA;AAAA,kBACC,KAAA,EAAM,4BAAA;AAAA,kBACN,KAAA,EAAM,IAAA;AAAA,kBACN,MAAA,EAAO,IAAA;AAAA,kBACP,OAAA,EAAQ,UAAA;AAAA,kBACR,IAAA,EAAK,MAAA;AAAA,kBACL,MAAA,EAAO,cAAA;AAAA,kBACP,cAAA,EAAa,GAAA;AAAA,kBACb,gBAAA,EAAe,OAAA;AAAA,kBACf,iBAAA,EAAgB,OAAA;AAAA,kBAChB,KAAA,EAAM,yDAAA;AAAA,kBAEN,QAAA,kBAAAA,EAAAA,CAAC,UAAA,EAAA,EAAS,MAAA,EAAO,gBAAA,EAAiB;AAAA;AAAA,eACpC;AAAA,8BACAA,EAAAA,CAAC,KAAA,EAAA,EACC,QAAA,kBAAAA,GAAC,QAAA,EAAA,EAAO,KAAA,EAAM,eAAA,EACZ,QAAA,kBAAAA,EAAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,cAAA,EAAe,GAC7B,CAAA,EACF;AAAA,aAAA,EACF,CAAA;AAAA,4BACAA,EAAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,cAAA,EACT,0BAAAA,EAAAA,CAAC,IAAA,EAAA,EAAG,KAAA,EAAM,4BAAA,EAA6B,CAAA,EACzC;AAAA,WAAA,EACF,CAAA,EACF;AAAA;AAAA;AAAA,KACF;AAAA,EAEJ,CAAA;AAEA,EAAA,iBAAA,CAAkB,GAAA,GAAM,gBAAA;AACxB,EAAA,iBAAA,CAAkB,cAAA,GAAiB,oBAAA,CAAqB,uBAAA,EAAQ,0BAA0B,CAAA;AAC1F,EAAA,OAAO,iBAAA;AACT,CAAA","file":"index.js","sourcesContent":["/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type { VNode, JSX } from \"preact\";\n\nconst OverflowList = ({\n children,\n ...props\n}: JSX.HTMLAttributes & { id: string }) => {\n return (\n
    \n {children}\n
  • \n
\n );\n};\n\nlet numLists = 0;\n\nexport interface OverflowListFactory {\n OverflowList: (props: JSX.HTMLAttributes) => VNode;\n overflowListAfterDOMLoaded: string;\n}\n\nexport default (): OverflowListFactory => {\n const id = `list-${numLists++}`;\n\n return {\n OverflowList: (props: JSX.HTMLAttributes) => (\n \n ),\n overflowListAfterDOMLoaded: `\ndocument.addEventListener(\"nav\", (e) => {\n const ul = document.getElementById(\"${id}\")\n if (!ul) return\n\n const end = ul.querySelector(\".overflow-end\")\n if (!end) return\n\n const scrollContainer = ul.parentElement\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n const parentUl = entry.target.parentElement\n if (!parentUl) return\n if (entry.isIntersecting) {\n parentUl.classList.remove(\"gradient-active\")\n } else {\n parentUl.classList.add(\"gradient-active\")\n }\n }\n }, scrollContainer ? { root: scrollContainer } : undefined)\n\n observer.observe(end)\n window.addCleanup(() => observer.disconnect())\n})\n`,\n };\n};\n","export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n","@media all and (max-width: 800px) {\n .page > #quartz-body > :not(.sidebar.left:has(.explorer)) {\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body.lock-scroll > :not(.sidebar.left:has(.explorer)) {\n transform: translateX(100dvw);\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body .sidebar.left:has(.explorer) {\n box-sizing: border-box;\n position: sticky;\n background-color: var(--light);\n padding: 1rem 0 1rem 0;\n margin: 0;\n }\n .page > #quartz-body .hide-until-loaded ~ .explorer-content {\n display: none;\n }\n}\n.explorer {\n display: flex;\n flex-direction: column;\n overflow-y: hidden;\n min-height: 1.2rem;\n flex: 0 1 auto;\n}\n\n.explorer.collapsed {\n flex: 0 1 1.2rem;\n}\n\n.explorer.collapsed .fold {\n transform: rotateZ(-90deg);\n}\n\n.explorer .fold {\n margin-left: 0.5rem;\n transition: transform 0.3s ease;\n opacity: 0.8;\n}\n\n@media all and (max-width: 800px) {\n .explorer {\n order: -1;\n height: initial;\n overflow: hidden;\n flex-shrink: 0;\n align-self: flex-start;\n margin-top: auto;\n margin-bottom: auto;\n }\n}\n.explorer button.mobile-explorer {\n display: none;\n}\n\n.explorer button.desktop-explorer {\n display: flex;\n}\n\n@media all and (max-width: 800px) {\n .explorer button.mobile-explorer {\n display: flex;\n }\n .explorer button.desktop-explorer {\n display: none;\n }\n}\n.explorer svg {\n pointer-events: all;\n transition: transform 0.35s ease;\n}\n\n.explorer svg > polyline {\n pointer-events: none;\n}\n\nbutton.mobile-explorer,\nbutton.desktop-explorer {\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding: 0;\n color: var(--dark);\n display: flex;\n align-items: center;\n}\n\nbutton.mobile-explorer h2,\nbutton.desktop-explorer h2 {\n font-size: 1rem;\n display: inline-block;\n margin: 0;\n}\n\n.explorer-content {\n list-style: none;\n overflow: hidden;\n overflow-y: auto;\n margin-top: 0.5rem;\n}\n\n.explorer-content ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.explorer-content ul.explorer-ul {\n overscroll-behavior: contain;\n}\n\n.explorer-content ul li > a {\n color: var(--dark);\n opacity: 0.75;\n pointer-events: all;\n}\n\n.explorer-content ul li > a.active {\n opacity: 1;\n color: var(--tertiary);\n}\n\n.explorer-content .folder-outer {\n visibility: collapse;\n display: grid;\n grid-template-rows: 0fr;\n transition-property: grid-template-rows, visibility;\n transition-duration: 0.3s;\n transition-timing-function: ease-in-out;\n}\n\n.explorer-content .folder-outer.open {\n visibility: visible;\n grid-template-rows: 1fr;\n}\n\n.explorer-content .folder-outer > ul {\n overflow: hidden;\n margin-left: 6px;\n padding-left: 0.8rem;\n border-left: 1px solid var(--lightgray);\n}\n\n.folder-container {\n flex-direction: row;\n display: flex;\n align-items: center;\n user-select: none;\n}\n\n.folder-container div > a {\n color: var(--secondary);\n font-family: var(--headerFont);\n font-size: 0.95rem;\n font-weight: 600;\n line-height: 1.5rem;\n display: inline-block;\n}\n\n.folder-container div > a:hover {\n color: var(--tertiary);\n}\n\n.folder-container div > button {\n color: var(--dark);\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding-left: 0;\n padding-right: 0;\n display: flex;\n align-items: center;\n font-family: var(--headerFont);\n}\n\n.folder-container div > button span {\n font-size: 0.95rem;\n display: inline-block;\n color: var(--secondary);\n font-weight: 600;\n margin: 0;\n line-height: 1.5rem;\n pointer-events: none;\n}\n\n.folder-icon {\n margin-right: 5px;\n color: var(--secondary);\n cursor: pointer;\n transition: transform 0.3s ease;\n backface-visibility: visible;\n flex-shrink: 0;\n}\n\nli:has(> .folder-outer:not(.open)) > .folder-container > svg {\n transform: rotate(-90deg);\n}\n\n.folder-icon:hover {\n color: var(--tertiary);\n}\n\n@media all and (max-width: 800px) {\n .explorer.collapsed {\n flex: 0 0 34px;\n }\n .explorer.collapsed > .explorer-content {\n transform: translateX(-100vw);\n visibility: hidden;\n }\n .explorer:not(.collapsed) {\n flex: 0 0 34px;\n }\n .explorer:not(.collapsed) > .explorer-content {\n transform: translateX(0);\n visibility: visible;\n }\n .explorer .explorer-content {\n box-sizing: border-box;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n margin-top: 0;\n background-color: var(--light);\n max-width: 100vw;\n width: 100vw;\n transform: translateX(-100vw);\n transition: transform 200ms ease, visibility 200ms ease;\n overflow: hidden;\n padding: 4rem 0 2rem 0;\n height: 100dvh;\n max-height: 100dvh;\n visibility: hidden;\n }\n .explorer .mobile-explorer {\n margin: 0;\n padding: 5px;\n z-index: 101;\n }\n .explorer .mobile-explorer.hide-until-loaded {\n display: none;\n }\n .explorer .mobile-explorer .lucide-menu {\n stroke: var(--darkgray);\n }\n}\n@media all and (max-width: 800px) {\n .mobile-no-scroll .explorer-content > .explorer-ul {\n overscroll-behavior: contain;\n }\n}","var U=Object.hasOwnProperty;function S(u){let e=k(W(u,\"index\"),!0);return e.length===0?\"/\":e}function T(){return typeof document>\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function v(u,e){let D=e??T(),n=u.startsWith(\"/\")?u:\"/\"+u;return D+n}function I(u,e){return u===e||u.endsWith(\"/\"+e)}function W(u,e){return I(u,e)&&(u=u.slice(0,-e.length)),u}function k(u,e){return u.startsWith(\"/\")&&(u=u.substring(1)),!e&&u.endsWith(\"/\")&&(u=u.slice(0,-1)),u}var y=class u{constructor(e,D){this.children=[],this.slugSegments=e,this.data=D||null,this.isFolder=!1,this.fileSegmentHint=null,this.displayNameOverride=void 0}get displayName(){return this.displayNameOverride!==void 0?this.displayNameOverride:(this.data?.title===\"index\"?void 0:this.data?.title)||this.fileSegmentHint||this.slugSegment||\"\"}set displayName(e){this.displayNameOverride=e}get slug(){let e=this.slugSegments.join(\"/\");return this.isFolder?e+\"/index\":e}get slugSegment(){return this.slugSegments[this.slugSegments.length-1]||\"\"}makeChild(e,D){let n=[...this.slugSegments,e[0]],r=new u(n,D);return this.children.push(r),r}insert(e,D){if(e.length===0)return;this.isFolder=!0;let n=e[0];if(e.length===1)n===\"index\"?this.data||(this.data=D):this.makeChild(e,D);else{let r=this.children.find(F=>F.slugSegment===n);r||(r=this.makeChild(e,void 0));let t=(D.filePath||D.slug||\"\").split(\"/\");r.fileSegmentHint=t[t.length-e.length],r.insert(e.slice(1),D)}}add(e){this.insert(e.slug.split(\"/\"),e)}sort(e){this.children.sort(e),this.children.forEach(D=>D.sort(e))}filter(e){this.children=this.children.filter(e),this.children.forEach(D=>D.filter(e))}map(e){e(this),this.children.forEach(D=>D.map(e))}static fromEntries(e){let D=new u([],null);return e.forEach(([,n])=>D.add(n)),D}},P=(u,e)=>!u.isFolder&&!e.isFolder||u.isFolder&&e.isFolder?u.displayName.localeCompare(e.displayName,void 0,{numeric:!0,sensitivity:\"base\"}):!u.isFolder&&e.isFolder?1:-1,O=u=>u.slugSegment!==\"tags\";function j(u,e,D,n){return D&&u.filter(D),n&&u.map(n),e&&u.sort(e),u}async function R(u){try{console.log(\"[Explorer] Fetching content index...\");let e=await fetchData;if(console.log(\"[Explorer] Fetched data keys:\",Object.keys(e).slice(0,5)),!e)return console.error(\"[Explorer] No data received\"),null;let D=e.content||e,n=Object.entries(D);if(console.log(\"[Explorer] Entry count:\",n.length),n.length===0)return console.warn(\"[Explorer] No content entries found\"),null;let r=y.fromEntries(n);console.log(\"[Explorer] Trie root children:\",r.children.length);let t=P,F=O,d=null;if(u)try{let E=JSON.parse(u);E.sortFn&&(t=new Function(\"a\",\"b\",\"return (\"+E.sortFn+\")(a, b)\")),E.filterFn&&(F=new Function(\"node\",\"return (\"+E.filterFn+\")(node)\")),E.mapFn&&(d=new Function(\"node\",\"(\"+E.mapFn+\")(node)\"))}catch(E){console.error(\"Error parsing data functions:\",E)}return j(r,t,F,d)}catch(e){return console.error(\"Error building file trie:\",e),null}}var b=0;function N(u,e,D,n,r,t=\"\"){let F=document.getElementById(\"template-folder\"),d=document.getElementById(\"template-file\");if(!F||!d)return;let E=t?t+\"/\"+u.slugSegment:u.slugSegment,A=S(D);if(u.isFolder){let s=F.content.cloneNode(!0),a=s.querySelector(\".folder-container\"),p=s.querySelector(\".folder-button\"),m=s.querySelector(\".folder-title\"),l=s.querySelector(\".folder-outer\"),o=s.querySelector(\".content\");if(m&&(m.textContent=u.displayName||u.slugSegment),a&&(a.dataset.folderpath=u.slug),n===\"link\"&&p){let i=document.createElement(\"a\");i.className=p.className;let B=S(u.slug);i.href=v(B||\"\"),m?i.appendChild(m):i.textContent=u.displayName||u.slugSegment,p.replaceWith(i),p=i}let C=r[u.slug]!==void 0?r[u.slug]:!0,c=S(u.slug),f=c&&c===A.slice(0,c.length);if((!C||f)&&l&&l.classList.add(\"open\"),u.children&&u.children.length>0&&o)for(let i of u.children)N(i,o,D,n,r,E);e.appendChild(s)}else if(u.data){let s=d.content.cloneNode(!0),a=s.querySelector(\"a\");a&&(a.href=v(u.data.slug),a.textContent=u.displayName||u.slugSegment,u.data.slug===D&&a.classList.add(\"active\",\"is-active\")),e.appendChild(s)}}async function L(u){let e=++b;try{console.log(\"[Explorer] Nav event received, generation:\",e);let D=(u.detail?.url||\"\").replace(/^\\/+/,\"\"),n=document.querySelectorAll(\"div.explorer\");console.log(\"[Explorer] Found\",n.length,\"explorers\");let r={};try{JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\").forEach(F=>{r[F.path]=F.collapsed})}catch(t){console.error(\"[Explorer] Error loading saved state:\",t)}for(let t of n){let F=t.querySelector(\".explorer-ul\");if(!F){console.warn(\"[Explorer] No explorer-ul found\");continue}F.innerHTML='
  • ';let d=t.dataset.dataFns,E=t.dataset.behavior||\"collapse\";console.log(\"[Explorer] Starting tree build...\");let A=await R(d);if(e===b){if(console.log(\"[Explorer] Render generation is current, rendering tree\"),console.log(\"[Explorer] Trie result:\",A?\"success\":\"null\"),A&&A.children&&A.children.length>0){F.innerHTML='
  • ',console.log(\"[Explorer] Rendering\",A.children.length,\"children\");for(let o of A.children)N(o,F,D,E,r,\"\");console.log(\"[Explorer] Render complete, final list length:\",F.children.length)}else console.warn(\"[Explorer] No trie or empty children\");let l=sessionStorage.getItem(\"explorerScrollTop\");if(l)F.scrollTop=parseInt(l,10);else{let o=F.querySelector(\".active\");o&&o.scrollIntoView({behavior:\"smooth\"})}}else console.log(\"[Explorer] Stale render generation, skipping tree render\");let s=[],a=t.getElementsByClassName(\"explorer-toggle\");for(let l of a){let o=function(){let C=this.closest(\".explorer\");if(!C)return;let c=C.classList.toggle(\"collapsed\");C.setAttribute(\"aria-expanded\",c?\"false\":\"true\"),c?document.documentElement.classList.remove(\"mobile-no-scroll\"):document.documentElement.classList.add(\"mobile-no-scroll\")};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let p=t.getElementsByClassName(\"folder-icon\");for(let l of p){let o=function(C){C.stopPropagation();let c=this.parentElement;if(!c)return;let f=c.nextElementSibling;if(!f)return;f.classList.toggle(\"open\");let i=!f.classList.contains(\"open\"),B=c.dataset.folderpath,h=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),g=h.findIndex(x=>x.path===B);g>=0?h[g].collapsed=i:h.push({path:B,collapsed:i}),localStorage.setItem(\"fileTree\",JSON.stringify(h))};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let m=t.getElementsByClassName(\"folder-button\");for(let l of m){let o=function(C){let c=this.closest(\".folder-container\");if(!c)return;let f=t.dataset.behavior||\"collapse\",i=c.nextElementSibling,B=c.dataset.folderpath;if(f!==\"link\"){if(C.stopPropagation(),!i)return;i.classList.toggle(\"open\");let h=!i.classList.contains(\"open\"),g=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),x=g.findIndex(w=>w.path===B);x>=0?g[x].collapsed=h:g.push({path:B,collapsed:h}),localStorage.setItem(\"fileTree\",JSON.stringify(g))}};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}typeof window<\"u\"&&window.addCleanup&&window.addCleanup(()=>s.forEach(l=>l()))}for(let t of document.getElementsByClassName(\"explorer\")){let F=t.querySelector(\".mobile-explorer\");F&&(F.classList.remove(\"hide-until-loaded\"),F.checkVisibility&&F.checkVisibility()&&(t.classList.add(\"collapsed\"),t.setAttribute(\"aria-expanded\",\"false\"),document.documentElement.classList.remove(\"mobile-no-scroll\")))}}catch(D){console.error(\"[Explorer] Fatal error in nav handler:\",D)}}document.addEventListener(\"nav\",L);document.addEventListener(\"render\",L);document.addEventListener(\"prenav\",()=>{let u=document.querySelector(\".explorer-ul\");u&&sessionStorage.setItem(\"explorerScrollTop\",u.scrollTop.toString())});\n","import type {\n QuartzComponent,\n QuartzComponentConstructor,\n QuartzComponentProps,\n} from \"@quartz-community/types\";\nimport OverflowListFactory from \"./OverflowList\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/explorer.scss\";\n// @ts-expect-error - Inline script loaded as text by esbuild plugin\nimport script from \"./scripts/explorer.inline.ts\";\n\ninterface FileTrieNode {\n slugSegment?: string;\n slugSegments?: string[];\n displayName?: string;\n isFolder: boolean;\n data: Record | null;\n children: FileTrieNode[];\n}\n\nexport interface ExplorerOptions {\n title?: string;\n folderDefaultState: \"collapsed\" | \"open\";\n folderClickBehavior: \"collapse\" | \"link\";\n useSavedState: boolean;\n sortFn?: (a: FileTrieNode, b: FileTrieNode) => number;\n filterFn?: (node: FileTrieNode) => boolean;\n mapFn?: (node: FileTrieNode) => FileTrieNode;\n order?: Array<\"filter\" | \"map\" | \"sort\">;\n}\n\nconst defaultOptions: ExplorerOptions = {\n folderDefaultState: \"collapsed\",\n folderClickBehavior: \"link\",\n useSavedState: true,\n mapFn: (node: FileTrieNode) => {\n return node;\n },\n sortFn: (a: FileTrieNode, b: FileTrieNode) => {\n if ((!a.isFolder && !b.isFolder) || (a.isFolder && b.isFolder)) {\n return (a.displayName || \"\").localeCompare(b.displayName || \"\", undefined, {\n numeric: true,\n sensitivity: \"base\",\n });\n }\n\n if (!a.isFolder && b.isFolder) {\n return 1;\n }\n return -1;\n },\n filterFn: (node: FileTrieNode) => node.slugSegment !== \"tags\",\n order: [\"filter\", \"map\", \"sort\"],\n};\n\nlet numExplorers = 0;\n\nfunction concatenateResources(...resources: (string | undefined)[]): string {\n return resources.filter((r): r is string => !!r).join(\"\\n\");\n}\n\nexport default ((userOpts?: Partial) => {\n const opts: ExplorerOptions = { ...defaultOptions, ...userOpts };\n const { OverflowList, overflowListAfterDOMLoaded } = OverflowListFactory();\n\n const ExplorerComponent: QuartzComponent = (props: QuartzComponentProps) => {\n const { cfg } = props;\n const displayClass = (props as { displayClass?: \"mobile-only\" | \"desktop-only\" }).displayClass;\n const id = `explorer-${numExplorers++}`;\n const locale = cfg?.locale ?? \"en-US\";\n\n const title = opts.title ?? i18n(locale).components.explorer.title;\n\n return (\n \n \n \n \n \n \n \n \n \n

    {title}

    \n \n \n \n \n
    \n \n
    \n \n \n \n );\n };\n\n ExplorerComponent.css = style;\n ExplorerComponent.afterDOMLoaded = concatenateResources(script, overflowListAfterDOMLoaded);\n return ExplorerComponent;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file +{"version":3,"sources":["../../node_modules/preact/src/constants.js","../../node_modules/preact/src/options.js","../../node_modules/preact/src/diff/catch-error.js","../../node_modules/preact/src/component.js","../../node_modules/preact/src/diff/props.js","../../node_modules/preact/src/create-context.js","../../node_modules/preact/jsx-runtime/src/index.js","../../src/components/OverflowList.tsx","../../node_modules/@quartz-community/utils/src/lang.ts","../../src/i18n/locales/en-US.ts","../../src/i18n/locales/en-GB.ts","../../src/i18n/locales/ar-SA.ts","../../src/i18n/locales/ca-ES.ts","../../src/i18n/locales/cs-CZ.ts","../../src/i18n/locales/de-DE.ts","../../src/i18n/locales/es-ES.ts","../../src/i18n/locales/fa-IR.ts","../../src/i18n/locales/fi-FI.ts","../../src/i18n/locales/fr-FR.ts","../../src/i18n/locales/he-IL.ts","../../src/i18n/locales/hu-HU.ts","../../src/i18n/locales/id-ID.ts","../../src/i18n/locales/it-IT.ts","../../src/i18n/locales/ja-JP.ts","../../src/i18n/locales/kk-KZ.ts","../../src/i18n/locales/ko-KR.ts","../../src/i18n/locales/lt-LT.ts","../../src/i18n/locales/nb-NO.ts","../../src/i18n/locales/nl-NL.ts","../../src/i18n/locales/pl-PL.ts","../../src/i18n/locales/pt-BR.ts","../../src/i18n/locales/ro-RO.ts","../../src/i18n/locales/ru-RU.ts","../../src/i18n/locales/th-TH.ts","../../src/i18n/locales/tr-TR.ts","../../src/i18n/locales/uk-UA.ts","../../src/i18n/locales/vi-VN.ts","../../src/i18n/locales/zh-CN.ts","../../src/i18n/locales/zh-TW.ts","../../src/i18n/index.ts","../../src/components/styles/explorer.scss","../../src/components/scripts/explorer.inline.ts","../../src/components/Explorer.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","__k","__b","__v","__i","__u","defaultProps","u","a","b","r","OverflowList"],"mappings":";AACO,ICUDA,CAAAA;AAAAA,CAAAA,GAAU,EACfC,KCDM,SAAqBC,EAAAA,EAAOC,EAAAA,EAAOC,EAAAA,EAAUC,EAAAA,EAAAA;AAQnD,EAAA,KAAA,IAN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MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type { VNode, JSX } from \"preact\";\n\nconst OverflowList = ({\n children,\n ...props\n}: JSX.HTMLAttributes & { id: string }) => {\n return (\n
      \n {children}\n
    • \n
    \n );\n};\n\nlet numLists = 0;\n\nexport interface OverflowListFactory {\n OverflowList: (props: JSX.HTMLAttributes) => VNode;\n overflowListAfterDOMLoaded: string;\n}\n\nexport default (): OverflowListFactory => {\n const id = `list-${numLists++}`;\n\n return {\n OverflowList: (props: JSX.HTMLAttributes) => (\n \n ),\n overflowListAfterDOMLoaded: `\ndocument.addEventListener(\"nav\", (e) => {\n const ul = document.getElementById(\"${id}\")\n if (!ul) return\n\n const end = ul.querySelector(\".overflow-end\")\n if (!end) return\n\n const scrollContainer = ul.parentElement\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n const parentUl = entry.target.parentElement\n if (!parentUl) return\n if (entry.isIntersecting) {\n parentUl.classList.remove(\"gradient-active\")\n } else {\n parentUl.classList.add(\"gradient-active\")\n }\n }\n }, scrollContainer ? { root: scrollContainer } : undefined)\n\n observer.observe(end)\n window.addCleanup(() => observer.disconnect())\n})\n`,\n };\n};\n","export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"المستعرض\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorador\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Procházet\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorador\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"مطالب\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Selain\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorateur\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"סייר\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Fájlböngésző\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Penjelajah\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Esplora\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"エクスプローラー\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Зерттеуші\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"탐색기\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Naršyklė\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Utforsker\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Verkenner\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Przeglądaj\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorador\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorator\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Проводник\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"รายการหน้า\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Gezgin\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Провідник\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Nội dung\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"探索\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"探索\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\nimport enGB from \"./locales/en-GB\";\nimport arSA from \"./locales/ar-SA\";\nimport caES from \"./locales/ca-ES\";\nimport csCZ from \"./locales/cs-CZ\";\nimport deDE from \"./locales/de-DE\";\nimport esES from \"./locales/es-ES\";\nimport faIR from \"./locales/fa-IR\";\nimport fiFI from \"./locales/fi-FI\";\nimport frFR from \"./locales/fr-FR\";\nimport heIL from \"./locales/he-IL\";\nimport huHU from \"./locales/hu-HU\";\nimport idID from \"./locales/id-ID\";\nimport itIT from \"./locales/it-IT\";\nimport jaJP from \"./locales/ja-JP\";\nimport kkKZ from \"./locales/kk-KZ\";\nimport koKR from \"./locales/ko-KR\";\nimport ltLT from \"./locales/lt-LT\";\nimport nbNO from \"./locales/nb-NO\";\nimport nlNL from \"./locales/nl-NL\";\nimport plPL from \"./locales/pl-PL\";\nimport ptBR from \"./locales/pt-BR\";\nimport roRO from \"./locales/ro-RO\";\nimport ruRU from \"./locales/ru-RU\";\nimport thTH from \"./locales/th-TH\";\nimport trTR from \"./locales/tr-TR\";\nimport ukUA from \"./locales/uk-UA\";\nimport viVN from \"./locales/vi-VN\";\nimport zhCN from \"./locales/zh-CN\";\nimport zhTW from \"./locales/zh-TW\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n \"en-GB\": enGB,\n \"ar-SA\": arSA,\n \"ca-ES\": caES,\n \"cs-CZ\": csCZ,\n \"de-DE\": deDE,\n \"es-ES\": esES,\n \"fa-IR\": faIR,\n \"fi-FI\": fiFI,\n \"fr-FR\": frFR,\n \"he-IL\": heIL,\n \"hu-HU\": huHU,\n \"id-ID\": idID,\n \"it-IT\": itIT,\n \"ja-JP\": jaJP,\n \"kk-KZ\": kkKZ,\n \"ko-KR\": koKR,\n \"lt-LT\": ltLT,\n \"nb-NO\": nbNO,\n \"nl-NL\": nlNL,\n \"pl-PL\": plPL,\n \"pt-BR\": ptBR,\n \"ro-RO\": roRO,\n \"ru-RU\": ruRU,\n \"th-TH\": thTH,\n \"tr-TR\": trTR,\n \"uk-UA\": ukUA,\n \"vi-VN\": viVN,\n \"zh-CN\": zhCN,\n \"zh-TW\": zhTW,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n","@media all and (max-width: 800px) {\n .page > #quartz-body > :not(.sidebar.left:has(.explorer)) {\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body.lock-scroll > :not(.sidebar.left:has(.explorer)) {\n transform: translateX(100dvw);\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body .sidebar.left:has(.explorer) {\n box-sizing: border-box;\n position: sticky;\n background-color: var(--light);\n padding: 1rem 0 1rem 0;\n margin: 0;\n }\n .page > #quartz-body .hide-until-loaded ~ .explorer-content {\n display: none;\n }\n}\n.explorer {\n display: flex;\n flex-direction: column;\n overflow-y: hidden;\n min-height: 1.2rem;\n flex: 0 1 auto;\n}\n\n.explorer.collapsed {\n flex: 0 1 1.2rem;\n}\n\n.explorer.collapsed .fold {\n transform: rotateZ(-90deg);\n}\n\n.explorer .fold {\n margin-left: 0.5rem;\n transition: transform 0.3s ease;\n opacity: 0.8;\n}\n\n@media all and (max-width: 800px) {\n .explorer {\n order: -1;\n height: initial;\n overflow: hidden;\n flex-shrink: 0;\n align-self: flex-start;\n margin-top: auto;\n margin-bottom: auto;\n }\n}\n.explorer button.mobile-explorer {\n display: none;\n}\n\n.explorer button.desktop-explorer {\n display: flex;\n}\n\n@media all and (max-width: 800px) {\n .explorer button.mobile-explorer {\n display: flex;\n }\n .explorer button.desktop-explorer {\n display: none;\n }\n}\n.explorer svg {\n pointer-events: all;\n transition: transform 0.35s ease;\n}\n\n.explorer svg > polyline {\n pointer-events: none;\n}\n\nbutton.mobile-explorer,\nbutton.desktop-explorer {\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding: 0;\n color: var(--dark);\n display: flex;\n align-items: center;\n}\n\nbutton.mobile-explorer h2,\nbutton.desktop-explorer h2 {\n font-size: 1rem;\n display: inline-block;\n margin: 0;\n}\n\n.explorer-content {\n list-style: none;\n overflow: hidden;\n overflow-y: auto;\n margin-top: 0.5rem;\n}\n\n.explorer-content ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.explorer-content ul.explorer-ul {\n overscroll-behavior: contain;\n}\n\n.explorer-content ul li > a {\n color: var(--dark);\n opacity: 0.75;\n pointer-events: all;\n}\n\n.explorer-content ul li > a.active {\n opacity: 1;\n color: var(--tertiary);\n}\n\n.explorer-content .folder-outer {\n visibility: collapse;\n display: grid;\n grid-template-rows: 0fr;\n transition-property: grid-template-rows, visibility;\n transition-duration: 0.3s;\n transition-timing-function: ease-in-out;\n}\n\n.explorer-content .folder-outer.open {\n visibility: visible;\n grid-template-rows: 1fr;\n}\n\n.explorer-content .folder-outer > ul {\n overflow: hidden;\n margin-left: 6px;\n padding-left: 0.8rem;\n border-left: 1px solid var(--lightgray);\n}\n\n.folder-container {\n flex-direction: row;\n display: flex;\n align-items: center;\n user-select: none;\n}\n\n.folder-container div > a {\n color: var(--secondary);\n font-family: var(--headerFont);\n font-size: 0.95rem;\n font-weight: 600;\n line-height: 1.5rem;\n display: inline-block;\n}\n\n.folder-container div > a:hover {\n color: var(--tertiary);\n}\n\n.folder-container div > button {\n color: var(--dark);\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding-left: 0;\n padding-right: 0;\n display: flex;\n align-items: center;\n font-family: var(--headerFont);\n}\n\n.folder-container div > button span {\n font-size: 0.95rem;\n display: inline-block;\n color: var(--secondary);\n font-weight: 600;\n margin: 0;\n line-height: 1.5rem;\n pointer-events: none;\n}\n\n.folder-icon {\n margin-right: 5px;\n color: var(--secondary);\n cursor: pointer;\n transition: transform 0.3s ease;\n backface-visibility: visible;\n flex-shrink: 0;\n}\n\nli:has(> .folder-outer:not(.open)) > .folder-container > svg {\n transform: rotate(-90deg);\n}\n\n.folder-icon:hover {\n color: var(--tertiary);\n}\n\n@media all and (max-width: 800px) {\n .explorer.collapsed {\n flex: 0 0 34px;\n }\n .explorer.collapsed > .explorer-content {\n transform: translateX(-100vw);\n visibility: hidden;\n }\n .explorer:not(.collapsed) {\n flex: 0 0 34px;\n }\n .explorer:not(.collapsed) > .explorer-content {\n transform: translateX(0);\n visibility: visible;\n }\n .explorer .explorer-content {\n box-sizing: border-box;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n margin-top: 0;\n background-color: var(--light);\n max-width: 100vw;\n width: 100vw;\n transform: translateX(-100vw);\n transition: transform 200ms ease, visibility 200ms ease;\n overflow: hidden;\n padding: 4rem 0 2rem 0;\n height: 100dvh;\n max-height: 100dvh;\n visibility: hidden;\n }\n .explorer .mobile-explorer {\n margin: 0;\n padding: 5px;\n z-index: 101;\n }\n .explorer .mobile-explorer.hide-until-loaded {\n display: none;\n }\n .explorer .mobile-explorer .lucide-menu {\n stroke: var(--darkgray);\n }\n}\n@media all and (max-width: 800px) {\n .mobile-no-scroll .explorer-content > .explorer-ul {\n overscroll-behavior: contain;\n }\n}","var U=Object.hasOwnProperty;function S(u){let e=k(W(u,\"index\"),!0);return e.length===0?\"/\":e}function T(){return typeof document>\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function v(u,e){let D=e??T(),n=u.startsWith(\"/\")?u:\"/\"+u;return D+n}function I(u,e){return u===e||u.endsWith(\"/\"+e)}function W(u,e){return I(u,e)&&(u=u.slice(0,-e.length)),u}function k(u,e){return u.startsWith(\"/\")&&(u=u.substring(1)),!e&&u.endsWith(\"/\")&&(u=u.slice(0,-1)),u}var y=class u{constructor(e,D){this.children=[],this.slugSegments=e,this.data=D||null,this.isFolder=!1,this.fileSegmentHint=null,this.displayNameOverride=void 0}get displayName(){return this.displayNameOverride!==void 0?this.displayNameOverride:(this.data?.title===\"index\"?void 0:this.data?.title)||this.fileSegmentHint||this.slugSegment||\"\"}set displayName(e){this.displayNameOverride=e}get slug(){let e=this.slugSegments.join(\"/\");return this.isFolder?e+\"/index\":e}get slugSegment(){return this.slugSegments[this.slugSegments.length-1]||\"\"}makeChild(e,D){let n=[...this.slugSegments,e[0]],r=new u(n,D);return this.children.push(r),r}insert(e,D){if(e.length===0)return;this.isFolder=!0;let n=e[0];if(e.length===1)n===\"index\"?this.data||(this.data=D):this.makeChild(e,D);else{let r=this.children.find(F=>F.slugSegment===n);r||(r=this.makeChild(e,void 0));let t=(D.filePath||D.slug||\"\").split(\"/\");r.fileSegmentHint=t[t.length-e.length],r.insert(e.slice(1),D)}}add(e){this.insert(e.slug.split(\"/\"),e)}sort(e){this.children.sort(e),this.children.forEach(D=>D.sort(e))}filter(e){this.children=this.children.filter(e),this.children.forEach(D=>D.filter(e))}map(e){e(this),this.children.forEach(D=>D.map(e))}static fromEntries(e){let D=new u([],null);return e.forEach(([,n])=>D.add(n)),D}},P=(u,e)=>!u.isFolder&&!e.isFolder||u.isFolder&&e.isFolder?u.displayName.localeCompare(e.displayName,void 0,{numeric:!0,sensitivity:\"base\"}):!u.isFolder&&e.isFolder?1:-1,O=u=>u.slugSegment!==\"tags\";function j(u,e,D,n){return D&&u.filter(D),n&&u.map(n),e&&u.sort(e),u}async function R(u){try{console.log(\"[Explorer] Fetching content index...\");let e=await fetchData;if(console.log(\"[Explorer] Fetched data keys:\",Object.keys(e).slice(0,5)),!e)return console.error(\"[Explorer] No data received\"),null;let D=e.content||e,n=Object.entries(D);if(console.log(\"[Explorer] Entry count:\",n.length),n.length===0)return console.warn(\"[Explorer] No content entries found\"),null;let r=y.fromEntries(n);console.log(\"[Explorer] Trie root children:\",r.children.length);let t=P,F=O,d=null;if(u)try{let E=JSON.parse(u);E.sortFn&&(t=new Function(\"a\",\"b\",\"return (\"+E.sortFn+\")(a, b)\")),E.filterFn&&(F=new Function(\"node\",\"return (\"+E.filterFn+\")(node)\")),E.mapFn&&(d=new Function(\"node\",\"(\"+E.mapFn+\")(node)\"))}catch(E){console.error(\"Error parsing data functions:\",E)}return j(r,t,F,d)}catch(e){return console.error(\"Error building file trie:\",e),null}}var b=0;function N(u,e,D,n,r,t=\"\"){let F=document.getElementById(\"template-folder\"),d=document.getElementById(\"template-file\");if(!F||!d)return;let E=t?t+\"/\"+u.slugSegment:u.slugSegment,A=S(D);if(u.isFolder){let s=F.content.cloneNode(!0),a=s.querySelector(\".folder-container\"),p=s.querySelector(\".folder-button\"),m=s.querySelector(\".folder-title\"),l=s.querySelector(\".folder-outer\"),o=s.querySelector(\".content\");if(m&&(m.textContent=u.displayName||u.slugSegment),a&&(a.dataset.folderpath=u.slug),n===\"link\"&&p){let i=document.createElement(\"a\");i.className=p.className;let B=S(u.slug);i.href=v(B||\"\"),m?i.appendChild(m):i.textContent=u.displayName||u.slugSegment,p.replaceWith(i),p=i}let C=r[u.slug]!==void 0?r[u.slug]:!0,c=S(u.slug),f=c&&c===A.slice(0,c.length);if((!C||f)&&l&&l.classList.add(\"open\"),u.children&&u.children.length>0&&o)for(let i of u.children)N(i,o,D,n,r,E);e.appendChild(s)}else if(u.data){let s=d.content.cloneNode(!0),a=s.querySelector(\"a\");a&&(a.href=v(u.data.slug),a.textContent=u.displayName||u.slugSegment,u.data.slug===D&&a.classList.add(\"active\",\"is-active\")),e.appendChild(s)}}async function L(u){let e=++b;try{console.log(\"[Explorer] Nav event received, generation:\",e);let D=(u.detail?.url||\"\").replace(/^\\/+/,\"\"),n=document.querySelectorAll(\"div.explorer\");console.log(\"[Explorer] Found\",n.length,\"explorers\");let r={};try{JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\").forEach(F=>{r[F.path]=F.collapsed})}catch(t){console.error(\"[Explorer] Error loading saved state:\",t)}for(let t of n){let F=t.querySelector(\".explorer-ul\");if(!F){console.warn(\"[Explorer] No explorer-ul found\");continue}F.innerHTML='
  • ';let d=t.dataset.dataFns,E=t.dataset.behavior||\"collapse\";console.log(\"[Explorer] Starting tree build...\");let A=await R(d);if(e===b){if(console.log(\"[Explorer] Render generation is current, rendering tree\"),console.log(\"[Explorer] Trie result:\",A?\"success\":\"null\"),A&&A.children&&A.children.length>0){F.innerHTML='
  • ',console.log(\"[Explorer] Rendering\",A.children.length,\"children\");for(let o of A.children)N(o,F,D,E,r,\"\");console.log(\"[Explorer] Render complete, final list length:\",F.children.length)}else console.warn(\"[Explorer] No trie or empty children\");let l=sessionStorage.getItem(\"explorerScrollTop\");if(l)F.scrollTop=parseInt(l,10);else{let o=F.querySelector(\".active\");o&&o.scrollIntoView({behavior:\"smooth\"})}}else console.log(\"[Explorer] Stale render generation, skipping tree render\");let s=[],a=t.getElementsByClassName(\"explorer-toggle\");for(let l of a){let o=function(){let C=this.closest(\".explorer\");if(!C)return;let c=C.classList.toggle(\"collapsed\");C.setAttribute(\"aria-expanded\",c?\"false\":\"true\"),c?document.documentElement.classList.remove(\"mobile-no-scroll\"):document.documentElement.classList.add(\"mobile-no-scroll\")};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let p=t.getElementsByClassName(\"folder-icon\");for(let l of p){let o=function(C){C.stopPropagation();let c=this.parentElement;if(!c)return;let f=c.nextElementSibling;if(!f)return;f.classList.toggle(\"open\");let i=!f.classList.contains(\"open\"),B=c.dataset.folderpath,h=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),g=h.findIndex(x=>x.path===B);g>=0?h[g].collapsed=i:h.push({path:B,collapsed:i}),localStorage.setItem(\"fileTree\",JSON.stringify(h))};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let m=t.getElementsByClassName(\"folder-button\");for(let l of m){let o=function(C){let c=this.closest(\".folder-container\");if(!c)return;let f=t.dataset.behavior||\"collapse\",i=c.nextElementSibling,B=c.dataset.folderpath;if(f!==\"link\"){if(C.stopPropagation(),!i)return;i.classList.toggle(\"open\");let h=!i.classList.contains(\"open\"),g=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),x=g.findIndex(w=>w.path===B);x>=0?g[x].collapsed=h:g.push({path:B,collapsed:h}),localStorage.setItem(\"fileTree\",JSON.stringify(g))}};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}typeof window<\"u\"&&window.addCleanup&&window.addCleanup(()=>s.forEach(l=>l()))}for(let t of document.getElementsByClassName(\"explorer\")){let F=t.querySelector(\".mobile-explorer\");F&&(F.classList.remove(\"hide-until-loaded\"),F.checkVisibility&&F.checkVisibility()&&(t.classList.add(\"collapsed\"),t.setAttribute(\"aria-expanded\",\"false\"),document.documentElement.classList.remove(\"mobile-no-scroll\")))}}catch(D){console.error(\"[Explorer] Fatal error in nav handler:\",D)}}document.addEventListener(\"nav\",L);document.addEventListener(\"render\",L);document.addEventListener(\"prenav\",()=>{let u=document.querySelector(\".explorer-ul\");u&&sessionStorage.setItem(\"explorerScrollTop\",u.scrollTop.toString())});\n","import type {\n QuartzComponent,\n QuartzComponentConstructor,\n QuartzComponentProps,\n} from \"@quartz-community/types\";\nimport OverflowListFactory from \"./OverflowList\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/explorer.scss\";\n// @ts-expect-error - Inline script loaded as text by esbuild plugin\nimport script from \"./scripts/explorer.inline.ts\";\n\ninterface FileTrieNode {\n slugSegment?: string;\n slugSegments?: string[];\n displayName?: string;\n isFolder: boolean;\n data: Record | null;\n children: FileTrieNode[];\n}\n\nexport interface ExplorerOptions {\n title?: string;\n folderDefaultState: \"collapsed\" | \"open\";\n folderClickBehavior: \"collapse\" | \"link\";\n useSavedState: boolean;\n sortFn?: (a: FileTrieNode, b: FileTrieNode) => number;\n filterFn?: (node: FileTrieNode) => boolean;\n mapFn?: (node: FileTrieNode) => FileTrieNode;\n order?: Array<\"filter\" | \"map\" | \"sort\">;\n}\n\nconst defaultOptions: ExplorerOptions = {\n folderDefaultState: \"collapsed\",\n folderClickBehavior: \"link\",\n useSavedState: true,\n mapFn: (node: FileTrieNode) => {\n return node;\n },\n sortFn: (a: FileTrieNode, b: FileTrieNode) => {\n if ((!a.isFolder && !b.isFolder) || (a.isFolder && b.isFolder)) {\n return (a.displayName || \"\").localeCompare(b.displayName || \"\", undefined, {\n numeric: true,\n sensitivity: \"base\",\n });\n }\n\n if (!a.isFolder && b.isFolder) {\n return 1;\n }\n return -1;\n },\n filterFn: (node: FileTrieNode) => node.slugSegment !== \"tags\",\n order: [\"filter\", \"map\", \"sort\"],\n};\n\nlet numExplorers = 0;\n\nfunction concatenateResources(...resources: (string | undefined)[]): string {\n return resources.filter((r): r is string => !!r).join(\"\\n\");\n}\n\nexport default ((userOpts?: Partial) => {\n const opts: ExplorerOptions = { ...defaultOptions, ...userOpts };\n const { OverflowList, overflowListAfterDOMLoaded } = OverflowListFactory();\n\n const ExplorerComponent: QuartzComponent = (props: QuartzComponentProps) => {\n const { cfg } = props;\n const displayClass = (props as { displayClass?: \"mobile-only\" | \"desktop-only\" }).displayClass;\n const id = `explorer-${numExplorers++}`;\n const locale = cfg?.locale ?? \"en-US\";\n\n const title = opts.title ?? i18n(locale).components.explorer.title;\n\n return (\n \n \n \n \n \n \n \n \n \n

    {title}

    \n \n \n \n \n
    \n \n
    \n \n \n \n );\n };\n\n ExplorerComponent.css = style;\n ExplorerComponent.afterDOMLoaded = concatenateResources(script, overflowListAfterDOMLoaded);\n return ExplorerComponent;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 74f30a5..ba43ee3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -77,9 +77,299 @@ var en_US_default = { } }; +// src/i18n/locales/en-GB.ts +var en_GB_default = { + components: { + explorer: { + title: "Explorer" + } + } +}; + +// src/i18n/locales/ar-SA.ts +var ar_SA_default = { + components: { + explorer: { + title: "\u0627\u0644\u0645\u0633\u062A\u0639\u0631\u0636" + } + } +}; + +// src/i18n/locales/ca-ES.ts +var ca_ES_default = { + components: { + explorer: { + title: "Explorador" + } + } +}; + +// src/i18n/locales/cs-CZ.ts +var cs_CZ_default = { + components: { + explorer: { + title: "Proch\xE1zet" + } + } +}; + +// src/i18n/locales/de-DE.ts +var de_DE_default = { + components: { + explorer: { + title: "Explorer" + } + } +}; + +// src/i18n/locales/es-ES.ts +var es_ES_default = { + components: { + explorer: { + title: "Explorador" + } + } +}; + +// src/i18n/locales/fa-IR.ts +var fa_IR_default = { + components: { + explorer: { + title: "\u0645\u0637\u0627\u0644\u0628" + } + } +}; + +// src/i18n/locales/fi-FI.ts +var fi_FI_default = { + components: { + explorer: { + title: "Selain" + } + } +}; + +// src/i18n/locales/fr-FR.ts +var fr_FR_default = { + components: { + explorer: { + title: "Explorateur" + } + } +}; + +// src/i18n/locales/he-IL.ts +var he_IL_default = { + components: { + explorer: { + title: "\u05E1\u05D9\u05D9\u05E8" + } + } +}; + +// src/i18n/locales/hu-HU.ts +var hu_HU_default = { + components: { + explorer: { + title: "F\xE1jlb\xF6ng\xE9sz\u0151" + } + } +}; + +// src/i18n/locales/id-ID.ts +var id_ID_default = { + components: { + explorer: { + title: "Penjelajah" + } + } +}; + +// src/i18n/locales/it-IT.ts +var it_IT_default = { + components: { + explorer: { + title: "Esplora" + } + } +}; + +// src/i18n/locales/ja-JP.ts +var ja_JP_default = { + components: { + explorer: { + title: "\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u30FC" + } + } +}; + +// src/i18n/locales/kk-KZ.ts +var kk_KZ_default = { + components: { + explorer: { + title: "\u0417\u0435\u0440\u0442\u0442\u0435\u0443\u0448\u0456" + } + } +}; + +// src/i18n/locales/ko-KR.ts +var ko_KR_default = { + components: { + explorer: { + title: "\uD0D0\uC0C9\uAE30" + } + } +}; + +// src/i18n/locales/lt-LT.ts +var lt_LT_default = { + components: { + explorer: { + title: "Nar\u0161ykl\u0117" + } + } +}; + +// src/i18n/locales/nb-NO.ts +var nb_NO_default = { + components: { + explorer: { + title: "Utforsker" + } + } +}; + +// src/i18n/locales/nl-NL.ts +var nl_NL_default = { + components: { + explorer: { + title: "Verkenner" + } + } +}; + +// src/i18n/locales/pl-PL.ts +var pl_PL_default = { + components: { + explorer: { + title: "Przegl\u0105daj" + } + } +}; + +// src/i18n/locales/pt-BR.ts +var pt_BR_default = { + components: { + explorer: { + title: "Explorador" + } + } +}; + +// src/i18n/locales/ro-RO.ts +var ro_RO_default = { + components: { + explorer: { + title: "Explorator" + } + } +}; + +// src/i18n/locales/ru-RU.ts +var ru_RU_default = { + components: { + explorer: { + title: "\u041F\u0440\u043E\u0432\u043E\u0434\u043D\u0438\u043A" + } + } +}; + +// src/i18n/locales/th-TH.ts +var th_TH_default = { + components: { + explorer: { + title: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E2B\u0E19\u0E49\u0E32" + } + } +}; + +// src/i18n/locales/tr-TR.ts +var tr_TR_default = { + components: { + explorer: { + title: "Gezgin" + } + } +}; + +// src/i18n/locales/uk-UA.ts +var uk_UA_default = { + components: { + explorer: { + title: "\u041F\u0440\u043E\u0432\u0456\u0434\u043D\u0438\u043A" + } + } +}; + +// src/i18n/locales/vi-VN.ts +var vi_VN_default = { + components: { + explorer: { + title: "N\u1ED9i dung" + } + } +}; + +// src/i18n/locales/zh-CN.ts +var zh_CN_default = { + components: { + explorer: { + title: "\u63A2\u7D22" + } + } +}; + +// src/i18n/locales/zh-TW.ts +var zh_TW_default = { + components: { + explorer: { + title: "\u63A2\u7D22" + } + } +}; + // src/i18n/index.ts var locales = { - "en-US": en_US_default + "en-US": en_US_default, + "en-GB": en_GB_default, + "ar-SA": ar_SA_default, + "ca-ES": ca_ES_default, + "cs-CZ": cs_CZ_default, + "de-DE": de_DE_default, + "es-ES": es_ES_default, + "fa-IR": fa_IR_default, + "fi-FI": fi_FI_default, + "fr-FR": fr_FR_default, + "he-IL": he_IL_default, + "hu-HU": hu_HU_default, + "id-ID": id_ID_default, + "it-IT": it_IT_default, + "ja-JP": ja_JP_default, + "kk-KZ": kk_KZ_default, + "ko-KR": ko_KR_default, + "lt-LT": lt_LT_default, + "nb-NO": nb_NO_default, + "nl-NL": nl_NL_default, + "pl-PL": pl_PL_default, + "pt-BR": pt_BR_default, + "ro-RO": ro_RO_default, + "ru-RU": ru_RU_default, + "th-TH": th_TH_default, + "tr-TR": tr_TR_default, + "uk-UA": uk_UA_default, + "vi-VN": vi_VN_default, + "zh-CN": zh_CN_default, + "zh-TW": zh_TW_default }; function i18n(locale) { return locales[locale] || en_US_default; diff --git a/dist/index.js.map b/dist/index.js.map index d04bf3c..2ed69fa 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../node_modules/preact/src/constants.js","../node_modules/preact/src/options.js","../node_modules/preact/src/diff/catch-error.js","../node_modules/preact/src/component.js","../node_modules/preact/src/diff/props.js","../node_modules/preact/src/create-context.js","../node_modules/preact/jsx-runtime/src/index.js","../src/components/OverflowList.tsx","../node_modules/@quartz-community/utils/src/lang.ts","../src/i18n/locales/en-US.ts","../src/i18n/index.ts","../src/components/styles/explorer.scss","../src/components/scripts/explorer.inline.ts","../src/components/Explorer.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","__k","__b","__v","__i","__u","defaultProps","u","a","b","r","OverflowList"],"mappings":";AACO,ICUDA,CAAAA;AAAAA,CAAAA,GAAU,EACfC,KCDM,SAAqBC,EAAAA,EAAOC,EAAAA,EAAOC,EAAAA,EAAUC,EAAAA,EAAAA;AAQnD,EAAA,KAAA,IANIC,EAAAA,EAEHC,EAAAA,EAEAC,EAAAA,EAEOL,EAAAA,GAAQA,EAAAA,CAAKM,EAAAA,IACpB,IAAA,CAAKH,EAAAA,GAAYH,EAAAA,CAAKO,GAAAA,KAAAA,CAAiBJ,EAAAA,CAASG,IAC/C,IAAA;AAcC,IAAA,IAAA,CAbAF,EAAAA,GAAOD,EAAAA,CAAUK,WAAAA,KFND,IAAA,IEQJJ,GAAKK,wBAAAA,KAChBN,EAAAA,CAAUO,QAAAA,CAASN,EAAAA,CAAKK,wBAAAA,CAAyBV,EAAAA,CAAAA,CAAAA,EACjDM,KAAUF,EAAAA,CAASQ,GAAAA,CAAAA,EFVJ,IAAA,IEaZR,EAAAA,CAAUS,iBAAAA,KACbT,EAAAA,CAAUS,iBAAAA,CAAkBb,EAAAA,EAAOG,MAAa,EAAE,CAAA,EAClDG,EAAAA,GAAUF,EAAAA,CAASQ,GAAAA,CAAAA,EAIhBN,EAAAA,EACH,OAAQF,GAASU,GAAAA,GAAiBV,EAAAA;AAIpC,EAAA,CAAA,CAAA,OAFSW,EAAAA,EAAAA;AACRf,IAAAA,EAAAA,GAAQe,EAAAA;AACT,EAAA;AAIF,EAAA,MAAMf,EAAAA;AACP,CAAA,EAAA,ECiJmB,UAAA,IAAA,OAAXgB,OAAAA,GACJA,QAAQC,SAAAA,CAAUC,IAAAA,CAAKC,IAAAA,CAAKH,OAAAA,CAAQI,OAAAA,E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,UAAA;AAAA,kBACR,IAAA,EAAK,MAAA;AAAA,kBACL,MAAA,EAAO,cAAA;AAAA,kBACP,cAAA,EAAa,GAAA;AAAA,kBACb,gBAAA,EAAe,OAAA;AAAA,kBACf,iBAAA,EAAgB,OAAA;AAAA,kBAChB,KAAA,EAAM,yDAAA;AAAA,kBAEN,QAAA,kBAAAA,EAAAA,CAAC,UAAA,EAAA,EAAS,MAAA,EAAO,gBAAA,EAAiB;AAAA;AAAA,eACpC;AAAA,8BACAA,EAAAA,CAAC,KAAA,EAAA,EACC,QAAA,kBAAAA,GAAC,QAAA,EAAA,EAAO,KAAA,EAAM,eAAA,EACZ,QAAA,kBAAAA,EAAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,cAAA,EAAe,GAC7B,CAAA,EACF;AAAA,aAAA,EACF,CAAA;AAAA,4BACAA,EAAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,cAAA,EACT,0BAAAA,EAAAA,CAAC,IAAA,EAAA,EAAG,KAAA,EAAM,4BAAA,EAA6B,CAAA,EACzC;AAAA,WAAA,EACF,CAAA,EACF;AAAA;AAAA;AAAA,KACF;AAAA,EAEJ,CAAA;AAEA,EAAA,iBAAA,CAAkB,GAAA,GAAM,gBAAA;AACxB,EAAA,iBAAA,CAAkB,cAAA,GAAiB,oBAAA,CAAqB,uBAAA,EAAQ,0BAA0B,CAAA;AAC1F,EAAA,OAAO,iBAAA;AACT,CAAA","file":"index.js","sourcesContent":["/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type { VNode, JSX } from \"preact\";\n\nconst OverflowList = ({\n children,\n ...props\n}: JSX.HTMLAttributes & { id: string }) => {\n return (\n
      \n {children}\n
    • \n
    \n );\n};\n\nlet numLists = 0;\n\nexport interface OverflowListFactory {\n OverflowList: (props: JSX.HTMLAttributes) => VNode;\n overflowListAfterDOMLoaded: string;\n}\n\nexport default (): OverflowListFactory => {\n const id = `list-${numLists++}`;\n\n return {\n OverflowList: (props: JSX.HTMLAttributes) => (\n \n ),\n overflowListAfterDOMLoaded: `\ndocument.addEventListener(\"nav\", (e) => {\n const ul = document.getElementById(\"${id}\")\n if (!ul) return\n\n const end = ul.querySelector(\".overflow-end\")\n if (!end) return\n\n const scrollContainer = ul.parentElement\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n const parentUl = entry.target.parentElement\n if (!parentUl) return\n if (entry.isIntersecting) {\n parentUl.classList.remove(\"gradient-active\")\n } else {\n parentUl.classList.add(\"gradient-active\")\n }\n }\n }, scrollContainer ? { root: scrollContainer } : undefined)\n\n observer.observe(end)\n window.addCleanup(() => observer.disconnect())\n})\n`,\n };\n};\n","export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n","@media all and (max-width: 800px) {\n .page > #quartz-body > :not(.sidebar.left:has(.explorer)) {\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body.lock-scroll > :not(.sidebar.left:has(.explorer)) {\n transform: translateX(100dvw);\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body .sidebar.left:has(.explorer) {\n box-sizing: border-box;\n position: sticky;\n background-color: var(--light);\n padding: 1rem 0 1rem 0;\n margin: 0;\n }\n .page > #quartz-body .hide-until-loaded ~ .explorer-content {\n display: none;\n }\n}\n.explorer {\n display: flex;\n flex-direction: column;\n overflow-y: hidden;\n min-height: 1.2rem;\n flex: 0 1 auto;\n}\n\n.explorer.collapsed {\n flex: 0 1 1.2rem;\n}\n\n.explorer.collapsed .fold {\n transform: rotateZ(-90deg);\n}\n\n.explorer .fold {\n margin-left: 0.5rem;\n transition: transform 0.3s ease;\n opacity: 0.8;\n}\n\n@media all and (max-width: 800px) {\n .explorer {\n order: -1;\n height: initial;\n overflow: hidden;\n flex-shrink: 0;\n align-self: flex-start;\n margin-top: auto;\n margin-bottom: auto;\n }\n}\n.explorer button.mobile-explorer {\n display: none;\n}\n\n.explorer button.desktop-explorer {\n display: flex;\n}\n\n@media all and (max-width: 800px) {\n .explorer button.mobile-explorer {\n display: flex;\n }\n .explorer button.desktop-explorer {\n display: none;\n }\n}\n.explorer svg {\n pointer-events: all;\n transition: transform 0.35s ease;\n}\n\n.explorer svg > polyline {\n pointer-events: none;\n}\n\nbutton.mobile-explorer,\nbutton.desktop-explorer {\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding: 0;\n color: var(--dark);\n display: flex;\n align-items: center;\n}\n\nbutton.mobile-explorer h2,\nbutton.desktop-explorer h2 {\n font-size: 1rem;\n display: inline-block;\n margin: 0;\n}\n\n.explorer-content {\n list-style: none;\n overflow: hidden;\n overflow-y: auto;\n margin-top: 0.5rem;\n}\n\n.explorer-content ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.explorer-content ul.explorer-ul {\n overscroll-behavior: contain;\n}\n\n.explorer-content ul li > a {\n color: var(--dark);\n opacity: 0.75;\n pointer-events: all;\n}\n\n.explorer-content ul li > a.active {\n opacity: 1;\n color: var(--tertiary);\n}\n\n.explorer-content .folder-outer {\n visibility: collapse;\n display: grid;\n grid-template-rows: 0fr;\n transition-property: grid-template-rows, visibility;\n transition-duration: 0.3s;\n transition-timing-function: ease-in-out;\n}\n\n.explorer-content .folder-outer.open {\n visibility: visible;\n grid-template-rows: 1fr;\n}\n\n.explorer-content .folder-outer > ul {\n overflow: hidden;\n margin-left: 6px;\n padding-left: 0.8rem;\n border-left: 1px solid var(--lightgray);\n}\n\n.folder-container {\n flex-direction: row;\n display: flex;\n align-items: center;\n user-select: none;\n}\n\n.folder-container div > a {\n color: var(--secondary);\n font-family: var(--headerFont);\n font-size: 0.95rem;\n font-weight: 600;\n line-height: 1.5rem;\n display: inline-block;\n}\n\n.folder-container div > a:hover {\n color: var(--tertiary);\n}\n\n.folder-container div > button {\n color: var(--dark);\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding-left: 0;\n padding-right: 0;\n display: flex;\n align-items: center;\n font-family: var(--headerFont);\n}\n\n.folder-container div > button span {\n font-size: 0.95rem;\n display: inline-block;\n color: var(--secondary);\n font-weight: 600;\n margin: 0;\n line-height: 1.5rem;\n pointer-events: none;\n}\n\n.folder-icon {\n margin-right: 5px;\n color: var(--secondary);\n cursor: pointer;\n transition: transform 0.3s ease;\n backface-visibility: visible;\n flex-shrink: 0;\n}\n\nli:has(> .folder-outer:not(.open)) > .folder-container > svg {\n transform: rotate(-90deg);\n}\n\n.folder-icon:hover {\n color: var(--tertiary);\n}\n\n@media all and (max-width: 800px) {\n .explorer.collapsed {\n flex: 0 0 34px;\n }\n .explorer.collapsed > .explorer-content {\n transform: translateX(-100vw);\n visibility: hidden;\n }\n .explorer:not(.collapsed) {\n flex: 0 0 34px;\n }\n .explorer:not(.collapsed) > .explorer-content {\n transform: translateX(0);\n visibility: visible;\n }\n .explorer .explorer-content {\n box-sizing: border-box;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n margin-top: 0;\n background-color: var(--light);\n max-width: 100vw;\n width: 100vw;\n transform: translateX(-100vw);\n transition: transform 200ms ease, visibility 200ms ease;\n overflow: hidden;\n padding: 4rem 0 2rem 0;\n height: 100dvh;\n max-height: 100dvh;\n visibility: hidden;\n }\n .explorer .mobile-explorer {\n margin: 0;\n padding: 5px;\n z-index: 101;\n }\n .explorer .mobile-explorer.hide-until-loaded {\n display: none;\n }\n .explorer .mobile-explorer .lucide-menu {\n stroke: var(--darkgray);\n }\n}\n@media all and (max-width: 800px) {\n .mobile-no-scroll .explorer-content > .explorer-ul {\n overscroll-behavior: contain;\n }\n}","var U=Object.hasOwnProperty;function S(u){let e=k(W(u,\"index\"),!0);return e.length===0?\"/\":e}function T(){return typeof document>\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function v(u,e){let D=e??T(),n=u.startsWith(\"/\")?u:\"/\"+u;return D+n}function I(u,e){return u===e||u.endsWith(\"/\"+e)}function W(u,e){return I(u,e)&&(u=u.slice(0,-e.length)),u}function k(u,e){return u.startsWith(\"/\")&&(u=u.substring(1)),!e&&u.endsWith(\"/\")&&(u=u.slice(0,-1)),u}var y=class u{constructor(e,D){this.children=[],this.slugSegments=e,this.data=D||null,this.isFolder=!1,this.fileSegmentHint=null,this.displayNameOverride=void 0}get displayName(){return this.displayNameOverride!==void 0?this.displayNameOverride:(this.data?.title===\"index\"?void 0:this.data?.title)||this.fileSegmentHint||this.slugSegment||\"\"}set displayName(e){this.displayNameOverride=e}get slug(){let e=this.slugSegments.join(\"/\");return this.isFolder?e+\"/index\":e}get slugSegment(){return this.slugSegments[this.slugSegments.length-1]||\"\"}makeChild(e,D){let n=[...this.slugSegments,e[0]],r=new u(n,D);return this.children.push(r),r}insert(e,D){if(e.length===0)return;this.isFolder=!0;let n=e[0];if(e.length===1)n===\"index\"?this.data||(this.data=D):this.makeChild(e,D);else{let r=this.children.find(F=>F.slugSegment===n);r||(r=this.makeChild(e,void 0));let t=(D.filePath||D.slug||\"\").split(\"/\");r.fileSegmentHint=t[t.length-e.length],r.insert(e.slice(1),D)}}add(e){this.insert(e.slug.split(\"/\"),e)}sort(e){this.children.sort(e),this.children.forEach(D=>D.sort(e))}filter(e){this.children=this.children.filter(e),this.children.forEach(D=>D.filter(e))}map(e){e(this),this.children.forEach(D=>D.map(e))}static fromEntries(e){let D=new u([],null);return e.forEach(([,n])=>D.add(n)),D}},P=(u,e)=>!u.isFolder&&!e.isFolder||u.isFolder&&e.isFolder?u.displayName.localeCompare(e.displayName,void 0,{numeric:!0,sensitivity:\"base\"}):!u.isFolder&&e.isFolder?1:-1,O=u=>u.slugSegment!==\"tags\";function j(u,e,D,n){return D&&u.filter(D),n&&u.map(n),e&&u.sort(e),u}async function R(u){try{console.log(\"[Explorer] Fetching content index...\");let e=await fetchData;if(console.log(\"[Explorer] Fetched data keys:\",Object.keys(e).slice(0,5)),!e)return console.error(\"[Explorer] No data received\"),null;let D=e.content||e,n=Object.entries(D);if(console.log(\"[Explorer] Entry count:\",n.length),n.length===0)return console.warn(\"[Explorer] No content entries found\"),null;let r=y.fromEntries(n);console.log(\"[Explorer] Trie root children:\",r.children.length);let t=P,F=O,d=null;if(u)try{let E=JSON.parse(u);E.sortFn&&(t=new Function(\"a\",\"b\",\"return (\"+E.sortFn+\")(a, b)\")),E.filterFn&&(F=new Function(\"node\",\"return (\"+E.filterFn+\")(node)\")),E.mapFn&&(d=new Function(\"node\",\"(\"+E.mapFn+\")(node)\"))}catch(E){console.error(\"Error parsing data functions:\",E)}return j(r,t,F,d)}catch(e){return console.error(\"Error building file trie:\",e),null}}var b=0;function N(u,e,D,n,r,t=\"\"){let F=document.getElementById(\"template-folder\"),d=document.getElementById(\"template-file\");if(!F||!d)return;let E=t?t+\"/\"+u.slugSegment:u.slugSegment,A=S(D);if(u.isFolder){let s=F.content.cloneNode(!0),a=s.querySelector(\".folder-container\"),p=s.querySelector(\".folder-button\"),m=s.querySelector(\".folder-title\"),l=s.querySelector(\".folder-outer\"),o=s.querySelector(\".content\");if(m&&(m.textContent=u.displayName||u.slugSegment),a&&(a.dataset.folderpath=u.slug),n===\"link\"&&p){let i=document.createElement(\"a\");i.className=p.className;let B=S(u.slug);i.href=v(B||\"\"),m?i.appendChild(m):i.textContent=u.displayName||u.slugSegment,p.replaceWith(i),p=i}let C=r[u.slug]!==void 0?r[u.slug]:!0,c=S(u.slug),f=c&&c===A.slice(0,c.length);if((!C||f)&&l&&l.classList.add(\"open\"),u.children&&u.children.length>0&&o)for(let i of u.children)N(i,o,D,n,r,E);e.appendChild(s)}else if(u.data){let s=d.content.cloneNode(!0),a=s.querySelector(\"a\");a&&(a.href=v(u.data.slug),a.textContent=u.displayName||u.slugSegment,u.data.slug===D&&a.classList.add(\"active\",\"is-active\")),e.appendChild(s)}}async function L(u){let e=++b;try{console.log(\"[Explorer] Nav event received, generation:\",e);let D=(u.detail?.url||\"\").replace(/^\\/+/,\"\"),n=document.querySelectorAll(\"div.explorer\");console.log(\"[Explorer] Found\",n.length,\"explorers\");let r={};try{JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\").forEach(F=>{r[F.path]=F.collapsed})}catch(t){console.error(\"[Explorer] Error loading saved state:\",t)}for(let t of n){let F=t.querySelector(\".explorer-ul\");if(!F){console.warn(\"[Explorer] No explorer-ul found\");continue}F.innerHTML='
  • ';let d=t.dataset.dataFns,E=t.dataset.behavior||\"collapse\";console.log(\"[Explorer] Starting tree build...\");let A=await R(d);if(e===b){if(console.log(\"[Explorer] Render generation is current, rendering tree\"),console.log(\"[Explorer] Trie result:\",A?\"success\":\"null\"),A&&A.children&&A.children.length>0){F.innerHTML='
  • ',console.log(\"[Explorer] Rendering\",A.children.length,\"children\");for(let o of A.children)N(o,F,D,E,r,\"\");console.log(\"[Explorer] Render complete, final list length:\",F.children.length)}else console.warn(\"[Explorer] No trie or empty children\");let l=sessionStorage.getItem(\"explorerScrollTop\");if(l)F.scrollTop=parseInt(l,10);else{let o=F.querySelector(\".active\");o&&o.scrollIntoView({behavior:\"smooth\"})}}else console.log(\"[Explorer] Stale render generation, skipping tree render\");let s=[],a=t.getElementsByClassName(\"explorer-toggle\");for(let l of a){let o=function(){let C=this.closest(\".explorer\");if(!C)return;let c=C.classList.toggle(\"collapsed\");C.setAttribute(\"aria-expanded\",c?\"false\":\"true\"),c?document.documentElement.classList.remove(\"mobile-no-scroll\"):document.documentElement.classList.add(\"mobile-no-scroll\")};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let p=t.getElementsByClassName(\"folder-icon\");for(let l of p){let o=function(C){C.stopPropagation();let c=this.parentElement;if(!c)return;let f=c.nextElementSibling;if(!f)return;f.classList.toggle(\"open\");let i=!f.classList.contains(\"open\"),B=c.dataset.folderpath,h=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),g=h.findIndex(x=>x.path===B);g>=0?h[g].collapsed=i:h.push({path:B,collapsed:i}),localStorage.setItem(\"fileTree\",JSON.stringify(h))};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let m=t.getElementsByClassName(\"folder-button\");for(let l of m){let o=function(C){let c=this.closest(\".folder-container\");if(!c)return;let f=t.dataset.behavior||\"collapse\",i=c.nextElementSibling,B=c.dataset.folderpath;if(f!==\"link\"){if(C.stopPropagation(),!i)return;i.classList.toggle(\"open\");let h=!i.classList.contains(\"open\"),g=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),x=g.findIndex(w=>w.path===B);x>=0?g[x].collapsed=h:g.push({path:B,collapsed:h}),localStorage.setItem(\"fileTree\",JSON.stringify(g))}};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}typeof window<\"u\"&&window.addCleanup&&window.addCleanup(()=>s.forEach(l=>l()))}for(let t of document.getElementsByClassName(\"explorer\")){let F=t.querySelector(\".mobile-explorer\");F&&(F.classList.remove(\"hide-until-loaded\"),F.checkVisibility&&F.checkVisibility()&&(t.classList.add(\"collapsed\"),t.setAttribute(\"aria-expanded\",\"false\"),document.documentElement.classList.remove(\"mobile-no-scroll\")))}}catch(D){console.error(\"[Explorer] Fatal error in nav handler:\",D)}}document.addEventListener(\"nav\",L);document.addEventListener(\"render\",L);document.addEventListener(\"prenav\",()=>{let u=document.querySelector(\".explorer-ul\");u&&sessionStorage.setItem(\"explorerScrollTop\",u.scrollTop.toString())});\n","import type {\n QuartzComponent,\n QuartzComponentConstructor,\n QuartzComponentProps,\n} from \"@quartz-community/types\";\nimport OverflowListFactory from \"./OverflowList\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/explorer.scss\";\n// @ts-expect-error - Inline script loaded as text by esbuild plugin\nimport script from \"./scripts/explorer.inline.ts\";\n\ninterface FileTrieNode {\n slugSegment?: string;\n slugSegments?: string[];\n displayName?: string;\n isFolder: boolean;\n data: Record | null;\n children: FileTrieNode[];\n}\n\nexport interface ExplorerOptions {\n title?: string;\n folderDefaultState: \"collapsed\" | \"open\";\n folderClickBehavior: \"collapse\" | \"link\";\n useSavedState: boolean;\n sortFn?: (a: FileTrieNode, b: FileTrieNode) => number;\n filterFn?: (node: FileTrieNode) => boolean;\n mapFn?: (node: FileTrieNode) => FileTrieNode;\n order?: Array<\"filter\" | \"map\" | \"sort\">;\n}\n\nconst defaultOptions: ExplorerOptions = {\n folderDefaultState: \"collapsed\",\n folderClickBehavior: \"link\",\n useSavedState: true,\n mapFn: (node: FileTrieNode) => {\n return node;\n },\n sortFn: (a: FileTrieNode, b: FileTrieNode) => {\n if ((!a.isFolder && !b.isFolder) || (a.isFolder && b.isFolder)) {\n return (a.displayName || \"\").localeCompare(b.displayName || \"\", undefined, {\n numeric: true,\n sensitivity: \"base\",\n });\n }\n\n if (!a.isFolder && b.isFolder) {\n return 1;\n }\n return -1;\n },\n filterFn: (node: FileTrieNode) => node.slugSegment !== \"tags\",\n order: [\"filter\", \"map\", \"sort\"],\n};\n\nlet numExplorers = 0;\n\nfunction concatenateResources(...resources: (string | undefined)[]): string {\n return resources.filter((r): r is string => !!r).join(\"\\n\");\n}\n\nexport default ((userOpts?: Partial) => {\n const opts: ExplorerOptions = { ...defaultOptions, ...userOpts };\n const { OverflowList, overflowListAfterDOMLoaded } = OverflowListFactory();\n\n const ExplorerComponent: QuartzComponent = (props: QuartzComponentProps) => {\n const { cfg } = props;\n const displayClass = (props as { displayClass?: \"mobile-only\" | \"desktop-only\" }).displayClass;\n const id = `explorer-${numExplorers++}`;\n const locale = cfg?.locale ?? \"en-US\";\n\n const title = opts.title ?? i18n(locale).components.explorer.title;\n\n return (\n \n \n \n \n \n \n \n \n \n

    {title}

    \n \n \n \n \n
    \n \n
    \n \n \n \n );\n };\n\n ExplorerComponent.css = style;\n ExplorerComponent.afterDOMLoaded = concatenateResources(script, overflowListAfterDOMLoaded);\n return ExplorerComponent;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file +{"version":3,"sources":["../node_modules/preact/src/constants.js","../node_modules/preact/src/options.js","../node_modules/preact/src/diff/catch-error.js","../node_modules/preact/src/component.js","../node_modules/preact/src/diff/props.js","../node_modules/preact/src/create-context.js","../node_modules/preact/jsx-runtime/src/index.js","../src/components/OverflowList.tsx","../node_modules/@quartz-community/utils/src/lang.ts","../src/i18n/locales/en-US.ts","../src/i18n/locales/en-GB.ts","../src/i18n/locales/ar-SA.ts","../src/i18n/locales/ca-ES.ts","../src/i18n/locales/cs-CZ.ts","../src/i18n/locales/de-DE.ts","../src/i18n/locales/es-ES.ts","../src/i18n/locales/fa-IR.ts","../src/i18n/locales/fi-FI.ts","../src/i18n/locales/fr-FR.ts","../src/i18n/locales/he-IL.ts","../src/i18n/locales/hu-HU.ts","../src/i18n/locales/id-ID.ts","../src/i18n/locales/it-IT.ts","../src/i18n/locales/ja-JP.ts","../src/i18n/locales/kk-KZ.ts","../src/i18n/locales/ko-KR.ts","../src/i18n/locales/lt-LT.ts","../src/i18n/locales/nb-NO.ts","../src/i18n/locales/nl-NL.ts","../src/i18n/locales/pl-PL.ts","../src/i18n/locales/pt-BR.ts","../src/i18n/locales/ro-RO.ts","../src/i18n/locales/ru-RU.ts","../src/i18n/locales/th-TH.ts","../src/i18n/locales/tr-TR.ts","../src/i18n/locales/uk-UA.ts","../src/i18n/locales/vi-VN.ts","../src/i18n/locales/zh-CN.ts","../src/i18n/locales/zh-TW.ts","../src/i18n/index.ts","../src/components/styles/explorer.scss","../src/components/scripts/explorer.inline.ts","../src/components/Explorer.tsx"],"names":["options","__e","error","vnode","oldVNode","errorInfo","component","ctor","handled","__","__c","constructor","getDerivedStateFromError","setState","__d","componentDidCatch","__E","e","Promise","prototype","then","bind","resolve","setTimeout","Math","random","toString","vnodeId","createVNode","type","props","key","isStaticChildren","__source","__self","ref","i","normalizedProps","__k","__b","__v","__i","__u","defaultProps","u","a","b","r","OverflowList"],"mappings":";AACO,ICUDA,CAAAA;AAAAA,CAAAA,GAAU,EACfC,KCDM,SAAqBC,EAAAA,EAAOC,EAAAA,EAAOC,EAAAA,EAAUC,EAAAA,EAAAA;AAQnD,EAAA,KAAA,IANIC,EAAAA,EAEHC,EAAAA,EAEAC,EAAAA,EAEOL,EAAAA,GAAQA,EAAAA,CAAKM,EAAAA,IACpB,IAAA,CAAKH,EAAAA,GAAYH,EAAAA,CAAKO,GAAAA,KAAAA,CAAiBJ,EAAAA,CAASG,IAC/C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C,KAAA,EAAM,4BAAA;AAAA,kBACN,KAAA,EAAM,IAAA;AAAA,kBACN,MAAA,EAAO,IAAA;AAAA,kBACP,OAAA,EAAQ,UAAA;AAAA,kBACR,IAAA,EAAK,MAAA;AAAA,kBACL,MAAA,EAAO,cAAA;AAAA,kBACP,cAAA,EAAa,GAAA;AAAA,kBACb,gBAAA,EAAe,OAAA;AAAA,kBACf,iBAAA,EAAgB,OAAA;AAAA,kBAChB,KAAA,EAAM,yDAAA;AAAA,kBAEN,QAAA,kBAAAA,EAAAA,CAAC,UAAA,EAAA,EAAS,MAAA,EAAO,gBAAA,EAAiB;AAAA;AAAA,eACpC;AAAA,8BACAA,EAAAA,CAAC,KAAA,EAAA,EACC,QAAA,kBAAAA,GAAC,QAAA,EAAA,EAAO,KAAA,EAAM,eAAA,EACZ,QAAA,kBAAAA,EAAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,cAAA,EAAe,GAC7B,CAAA,EACF;AAAA,aAAA,EACF,CAAA;AAAA,4BACAA,EAAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,cAAA,EACT,0BAAAA,EAAAA,CAAC,IAAA,EAAA,EAAG,KAAA,EAAM,4BAAA,EAA6B,CAAA,EACzC;AAAA,WAAA,EACF,CAAA,EACF;AAAA;AAAA;AAAA,KACF;AAAA,EAEJ,CAAA;AAEA,EAAA,iBAAA,CAAkB,GAAA,GAAM,gBAAA;AACxB,EAAA,iBAAA,CAAkB,cAAA,GAAiB,oBAAA,CAAqB,uBAAA,EAAQ,0BAA0B,CAAA;AAC1F,EAAA,OAAO,iBAAA;AACT,CAAA","file":"index.js","sourcesContent":["/** Normal hydration that attaches to a DOM tree but does not diff it. */\nexport const MODE_HYDRATE = 1 << 5;\n/** Signifies this VNode suspended on the previous render */\nexport const MODE_SUSPENDED = 1 << 7;\n/** Indicates that this node needs to be inserted while patching children */\nexport const INSERT_VNODE = 1 << 2;\n/** Indicates a VNode has been matched with another VNode in the diff */\nexport const MATCHED = 1 << 1;\n\n/** Reset all mode flags */\nexport const RESET_MODE = ~(MODE_HYDRATE | MODE_SUSPENDED);\n\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nexport const XHTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nexport const MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n\nexport const NULL = null;\nexport const UNDEFINED = undefined;\nexport const EMPTY_OBJ = /** @type {any} */ ({});\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL =\n\t/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { NULL } from '../constants';\n\n/**\n * Find the closest error boundary to a thrown error and call it\n * @param {object} error The thrown value\n * @param {import('../internal').VNode} vnode The vnode that threw the error that was caught (except\n * for unmounting when this parameter is the highest parent that was being\n * unmounted)\n * @param {import('../internal').VNode} [oldVNode]\n * @param {import('../internal').ErrorInfo} [errorInfo]\n */\nexport function _catchError(error, vnode, oldVNode, errorInfo) {\n\t/** @type {import('../internal').Component} */\n\tlet component,\n\t\t/** @type {import('../internal').ComponentType} */\n\t\tctor,\n\t\t/** @type {boolean} */\n\t\thandled;\n\n\tfor (; (vnode = vnode._parent); ) {\n\t\tif ((component = vnode._component) && !component._processingException) {\n\t\t\ttry {\n\t\t\t\tctor = component.constructor;\n\n\t\t\t\tif (ctor && ctor.getDerivedStateFromError != NULL) {\n\t\t\t\t\tcomponent.setState(ctor.getDerivedStateFromError(error));\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\tif (component.componentDidCatch != NULL) {\n\t\t\t\t\tcomponent.componentDidCatch(error, errorInfo || {});\n\t\t\t\t\thandled = component._dirty;\n\t\t\t\t}\n\n\t\t\t\t// This is an error boundary. Mark it as having bailed out, and whether it was mid-hydration.\n\t\t\t\tif (handled) {\n\t\t\t\t\treturn (component._pendingError = component);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t}\n\t\t}\n\t}\n\n\tthrow error;\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { MODE_HYDRATE, NULL } from './constants';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function BaseComponent(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nBaseComponent.prototype.setState = function (update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != NULL && this._nextState != this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == NULL) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nBaseComponent.prototype.forceUpdate = function (callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](https://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {ComponentChildren | void}\n */\nBaseComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == NULL) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._index + 1)\n\t\t\t: NULL;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != NULL && sibling._dom != NULL) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : NULL;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tif (component._parentDom && component._dirty) {\n\t\tlet oldVNode = component._vnode,\n\t\t\toldDom = oldVNode._dom,\n\t\t\tcommitQueue = [],\n\t\t\trefQueue = [],\n\t\t\tnewVNode = assign({}, oldVNode);\n\t\tnewVNode._original = oldVNode._original + 1;\n\t\tif (options.vnode) options.vnode(newVNode);\n\n\t\tdiff(\n\t\t\tcomponent._parentDom,\n\t\t\tnewVNode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tcomponent._parentDom.namespaceURI,\n\t\t\toldVNode._flags & MODE_HYDRATE ? [oldDom] : NULL,\n\t\t\tcommitQueue,\n\t\t\toldDom == NULL ? getDomSibling(oldVNode) : oldDom,\n\t\t\t!!(oldVNode._flags & MODE_HYDRATE),\n\t\t\trefQueue\n\t\t);\n\n\t\tnewVNode._original = oldVNode._original;\n\t\tnewVNode._parent._children[newVNode._index] = newVNode;\n\t\tcommitRoot(commitQueue, newVNode, refQueue);\n\t\toldVNode._dom = oldVNode._parent = null;\n\n\t\tif (newVNode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(newVNode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != NULL && vnode._component != NULL) {\n\t\tvnode._dom = vnode._component.base = NULL;\n\t\tvnode._children.some(child => {\n\t\t\tif (child != NULL && child._dom != NULL) {\n\t\t\t\treturn (vnode._dom = vnode._component.base = child._dom);\n\t\t\t}\n\t\t});\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst defer =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce != options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/**\n * @param {import('./internal').Component} a\n * @param {import('./internal').Component} b\n */\nconst depthSort = (a, b) => a._vnode._depth - b._vnode._depth;\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\ttry {\n\t\tlet c,\n\t\t\tl = 1;\n\n\t\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t\t// process() calls from getting scheduled while `queue` is still being consumed.\n\t\twhile (rerenderQueue.length) {\n\t\t\t// Keep the rerender queue sorted by (depth, insertion order). The queue\n\t\t\t// will initially be sorted on the first iteration only if it has more than 1 item.\n\t\t\t//\n\t\t\t// New items can be added to the queue e.g. when rerendering a provider, so we want to\n\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t// single pass\n\t\t\tif (rerenderQueue.length > l) {\n\t\t\t\trerenderQueue.sort(depthSort);\n\t\t\t}\n\n\t\t\tc = rerenderQueue.shift();\n\t\t\tl = rerenderQueue.length;\n\n\t\t\trenderComponent(c);\n\t\t}\n\t} finally {\n\t\trerenderQueue.length = process._rerenderCount = 0;\n\t}\n}\n\nprocess._rerenderCount = 0;\n","import { IS_NON_DIMENSIONAL, NULL, SVG_NAMESPACE } from '../constants';\nimport options from '../options';\n\n// Per-instance unique key for event clock stamps. Each Preact copy on the page\n// gets its own random suffix so that `_dispatched` / `_attached` properties on\n// shared event objects and handler functions cannot collide across instances.\n// ~1 in 60M collision odds - if you have that many praect versions on the page,\n// you deserve some weird bugs.\n// In 11 we can replace this with a\n// Symbol\nlet _id = Math.random().toString(8),\n\tEVENT_DISPATCHED = '__d' + _id,\n\tEVENT_ATTACHED = '__a' + _id;\n\nfunction setStyle(style, key, value) {\n\tif (key[0] == '-') {\n\t\tstyle.setProperty(key, value == NULL ? '' : value);\n\t} else if (value == NULL) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\nconst CAPTURE_REGEX = /(PointerCapture)$|Capture$/i;\n\n// A logical clock to solve issues like https://github.com/preactjs/preact/issues/3927.\n// When the DOM performs an event it leaves micro-ticks in between bubbling up which means that\n// an event can trigger on a newly reated DOM-node while the event bubbles up.\n//\n// Originally inspired by Vue\n// (https://github.com/vuejs/core/blob/caeb8a68811a1b0f79/packages/runtime-dom/src/modules/events.ts#L90-L101),\n// but modified to use a logical clock instead of Date.now() in case event handlers get attached\n// and events get dispatched during the same millisecond.\n//\n// The clock is incremented after each new event dispatch. This allows 1 000 000 new events\n// per second for over 280 years before the value reaches Number.MAX_SAFE_INTEGER (2**53 - 1).\nlet eventClock = 0;\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {string} namespace Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, namespace) {\n\tlet useCapture;\n\n\to: if (name == 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] != oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] == 'o' && name[1] == 'n') {\n\t\tuseCapture = name != (name = name.replace(CAPTURE_REGEX, '$1'));\n\t\tconst lowerCaseName = name.toLowerCase();\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (lowerCaseName in dom || name == 'onFocusOut' || name == 'onFocusIn')\n\t\t\tname = lowerCaseName.slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tvalue[EVENT_ATTACHED] = eventClock;\n\t\t\t\tdom.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\t\tuseCapture\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvalue[EVENT_ATTACHED] = oldValue[EVENT_ATTACHED];\n\t\t\t}\n\t\t} else {\n\t\t\tdom.removeEventListener(\n\t\t\t\tname,\n\t\t\t\tuseCapture ? eventProxyCapture : eventProxy,\n\t\t\t\tuseCapture\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (namespace == SVG_NAMESPACE) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname != 'width' &&\n\t\t\tname != 'height' &&\n\t\t\tname != 'href' &&\n\t\t\tname != 'list' &&\n\t\t\tname != 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname != 'tabIndex' &&\n\t\t\tname != 'download' &&\n\t\t\tname != 'rowSpan' &&\n\t\t\tname != 'colSpan' &&\n\t\t\tname != 'role' &&\n\t\t\tname != 'popover' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == NULL ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// aria- and data- attributes have no boolean representation.\n\t\t// A `false` value is different from the attribute not being\n\t\t// present, so we can't remove it. For non-boolean aria\n\t\t// attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost too many bytes. On top of\n\t\t// that other frameworks generally stringify `false`.\n\n\t\tif (typeof value == 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != NULL && (value !== false || name[4] == '-')) {\n\t\t\tdom.setAttribute(name, name == 'popover' && value == true ? '' : value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\n/**\n * Create an event proxy function.\n * @param {boolean} useCapture Is the event handler for the capture phase.\n * @private\n */\nfunction createEventProxy(useCapture) {\n\t/**\n\t * Proxy an event to hooked event handlers\n\t * @param {import('../internal').PreactEvent} e The event object from the browser\n\t * @private\n\t */\n\treturn function (e) {\n\t\tif (this._listeners) {\n\t\t\tconst eventHandler = this._listeners[e.type + useCapture];\n\t\t\tif (e[EVENT_DISPATCHED] == NULL) {\n\t\t\t\te[EVENT_DISPATCHED] = eventClock++;\n\n\t\t\t\t// When `e[EVENT_DISPATCHED]` is smaller than the time when the targeted event\n\t\t\t\t// handler was attached we know we have bubbled up to an element that was added\n\t\t\t\t// during patching the DOM.\n\t\t\t} else if (e[EVENT_DISPATCHED] < eventHandler[EVENT_ATTACHED]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn eventHandler(options.event ? options.event(e) : e);\n\t\t}\n\t};\n}\n\nconst eventProxy = createEventProxy(false);\nconst eventProxyCapture = createEventProxy(true);\n","import { enqueueRender } from './component';\nimport { NULL } from './constants';\n\nexport let i = 0;\n\nexport function createContext(defaultValue) {\n\tfunction Context(props) {\n\t\tif (!this.getChildContext) {\n\t\t\t/** @type {Set | null} */\n\t\t\tlet subs = new Set();\n\t\t\tlet ctx = {};\n\t\t\tctx[Context._id] = this;\n\n\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\tthis.componentWillUnmount = () => {\n\t\t\t\tsubs = NULL;\n\t\t\t};\n\n\t\t\tthis.shouldComponentUpdate = function (_props) {\n\t\t\t\t// @ts-expect-error even\n\t\t\t\tif (this.props.value != _props.value) {\n\t\t\t\t\tsubs.forEach(c => {\n\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.sub = c => {\n\t\t\t\tsubs.add(c);\n\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\tif (subs) {\n\t\t\t\t\t\tsubs.delete(c);\n\t\t\t\t\t}\n\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\treturn props.children;\n\t}\n\n\tContext._id = '__cC' + i++;\n\tContext._defaultValue = defaultValue;\n\n\t/** @type {import('./internal').FunctionComponent} */\n\tContext.Consumer = (props, contextValue) => {\n\t\treturn props.children(contextValue);\n\t};\n\n\t// we could also get rid of _contextRef entirely\n\tContext.Provider =\n\t\tContext._contextRef =\n\t\tContext.Consumer.contextType =\n\t\t\tContext;\n\n\treturn Context;\n}\n","import { options, Fragment } from 'preact';\nimport { encodeEntities } from './utils';\nimport { IS_NON_DIMENSIONAL } from '../../src/constants';\n\nlet vnodeId = 0;\n\nconst isArray = Array.isArray;\n\n/**\n * @fileoverview\n * This file exports various methods that implement Babel's \"automatic\" JSX runtime API:\n * - jsx(type, props, key)\n * - jsxs(type, props, key)\n * - jsxDEV(type, props, key, __source, __self)\n *\n * The implementation of createVNode here is optimized for performance.\n * Benchmarks: https://esbench.com/bench/5f6b54a0b4632100a7dcd2b3\n */\n\n/**\n * JSX.Element factory used by Babel's {runtime:\"automatic\"} JSX transform\n * @param {VNode['type']} type\n * @param {VNode['props']} props\n * @param {VNode['key']} [key]\n * @param {unknown} [isStaticChildren]\n * @param {unknown} [__source]\n * @param {unknown} [__self]\n */\nfunction createVNode(type, props, key, isStaticChildren, __source, __self) {\n\tif (!props) props = {};\n\t// We'll want to preserve `ref` in props to get rid of the need for\n\t// forwardRef components in the future, but that should happen via\n\t// a separate PR.\n\tlet normalizedProps = props,\n\t\tref,\n\t\ti;\n\n\tif ('ref' in normalizedProps) {\n\t\tnormalizedProps = {};\n\t\tfor (i in props) {\n\t\t\tif (i == 'ref') {\n\t\t\t\tref = props[i];\n\t\t\t} else {\n\t\t\t\tnormalizedProps[i] = props[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @type {VNode & { __source: any; __self: any }} */\n\tconst vnode = {\n\t\ttype,\n\t\tprops: normalizedProps,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t_component: null,\n\t\tconstructor: undefined,\n\t\t_original: --vnodeId,\n\t\t_index: -1,\n\t\t_flags: 0,\n\t\t__source,\n\t\t__self\n\t};\n\n\t// If a Component VNode, check for and apply defaultProps.\n\t// Note: `type` is often a String, and can be `undefined` in development.\n\tif (typeof type === 'function' && (ref = type.defaultProps)) {\n\t\tfor (i in ref)\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = ref[i];\n\t\t\t}\n\t}\n\n\tif (options.vnode) options.vnode(vnode);\n\treturn vnode;\n}\n\n/**\n * Create a template vnode. This function is not expected to be\n * used directly, but rather through a precompile JSX transform\n * @param {string[]} templates\n * @param {Array} exprs\n * @returns {VNode}\n */\nfunction jsxTemplate(templates, ...exprs) {\n\tconst vnode = createVNode(Fragment, { tpl: templates, exprs });\n\t// Bypass render to string top level Fragment optimization\n\tvnode.key = vnode._vnode;\n\treturn vnode;\n}\n\nconst JS_TO_CSS = {};\nconst CSS_REGEX = /[A-Z]/g;\n\n/**\n * Unwrap potential signals.\n * @param {*} value\n * @returns {*}\n */\nfunction normalizeAttrValue(value) {\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.valueOf === 'function'\n\t\t? value.valueOf()\n\t\t: value;\n}\n\n/**\n * Serialize an HTML attribute to a string. This function is not\n * expected to be used directly, but rather through a precompile\n * JSX transform\n * @param {string} name The attribute name\n * @param {*} value The attribute value\n * @returns {string}\n */\nfunction jsxAttr(name, value) {\n\tif (options.attr) {\n\t\tconst result = options.attr(name, value);\n\t\tif (typeof result === 'string') return result;\n\t}\n\n\tvalue = normalizeAttrValue(value);\n\n\tif (name === 'ref' || name === 'key') return '';\n\tif (name === 'style' && typeof value === 'object') {\n\t\tlet str = '';\n\t\tfor (let prop in value) {\n\t\t\tlet val = value[prop];\n\t\t\tif (val != null && val !== '') {\n\t\t\t\tconst name =\n\t\t\t\t\tprop[0] == '-'\n\t\t\t\t\t\t? prop\n\t\t\t\t\t\t: JS_TO_CSS[prop] ||\n\t\t\t\t\t\t\t(JS_TO_CSS[prop] = prop.replace(CSS_REGEX, '-$&').toLowerCase());\n\n\t\t\t\tlet suffix = ';';\n\t\t\t\tif (\n\t\t\t\t\ttypeof val === 'number' &&\n\t\t\t\t\t// Exclude custom-attributes\n\t\t\t\t\t!name.startsWith('--') &&\n\t\t\t\t\t!IS_NON_DIMENSIONAL.test(name)\n\t\t\t\t) {\n\t\t\t\t\tsuffix = 'px;';\n\t\t\t\t}\n\t\t\t\tstr = str + name + ':' + val + suffix;\n\t\t\t}\n\t\t}\n\t\treturn name + '=\"' + encodeEntities(str) + '\"';\n\t}\n\n\tif (\n\t\tvalue == null ||\n\t\tvalue === false ||\n\t\ttypeof value === 'function' ||\n\t\ttypeof value === 'object'\n\t) {\n\t\treturn '';\n\t} else if (value === true) return name;\n\n\treturn name + '=\"' + encodeEntities('' + value) + '\"';\n}\n\n/**\n * Escape a dynamic child passed to `jsxTemplate`. This function\n * is not expected to be used directly, but rather through a\n * precompile JSX transform\n * @param {*} value\n * @returns {string | null | VNode | Array}\n */\nfunction jsxEscape(value) {\n\tif (\n\t\tvalue == null ||\n\t\ttypeof value === 'boolean' ||\n\t\ttypeof value === 'function'\n\t) {\n\t\treturn null;\n\t}\n\n\tif (typeof value === 'object') {\n\t\t// Check for VNode\n\t\tif (value.constructor === undefined) return value;\n\n\t\tif (isArray(value)) {\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tvalue[i] = jsxEscape(value[i]);\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t}\n\n\treturn encodeEntities('' + value);\n}\n\nexport {\n\tcreateVNode as jsx,\n\tcreateVNode as jsxs,\n\tcreateVNode as jsxDEV,\n\tFragment,\n\t// precompiled JSX transform\n\tjsxTemplate,\n\tjsxAttr,\n\tjsxEscape\n};\n","import type { VNode, JSX } from \"preact\";\n\nconst OverflowList = ({\n children,\n ...props\n}: JSX.HTMLAttributes & { id: string }) => {\n return (\n
      \n {children}\n
    • \n
    \n );\n};\n\nlet numLists = 0;\n\nexport interface OverflowListFactory {\n OverflowList: (props: JSX.HTMLAttributes) => VNode;\n overflowListAfterDOMLoaded: string;\n}\n\nexport default (): OverflowListFactory => {\n const id = `list-${numLists++}`;\n\n return {\n OverflowList: (props: JSX.HTMLAttributes) => (\n \n ),\n overflowListAfterDOMLoaded: `\ndocument.addEventListener(\"nav\", (e) => {\n const ul = document.getElementById(\"${id}\")\n if (!ul) return\n\n const end = ul.querySelector(\".overflow-end\")\n if (!end) return\n\n const scrollContainer = ul.parentElement\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n const parentUl = entry.target.parentElement\n if (!parentUl) return\n if (entry.isIntersecting) {\n parentUl.classList.remove(\"gradient-active\")\n } else {\n parentUl.classList.add(\"gradient-active\")\n }\n }\n }, scrollContainer ? { root: scrollContainer } : undefined)\n\n observer.observe(end)\n window.addCleanup(() => observer.disconnect())\n})\n`,\n };\n};\n","export function capitalize(s: string): string {\n return s.substring(0, 1).toUpperCase() + s.substring(1);\n}\n\nexport function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"المستعرض\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorador\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Procházet\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorer\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorador\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"مطالب\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Selain\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorateur\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"סייר\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Fájlböngésző\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Penjelajah\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Esplora\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"エクスプローラー\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Зерттеуші\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"탐색기\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Naršyklė\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Utforsker\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Verkenner\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Przeglądaj\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorador\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Explorator\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Проводник\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"รายการหน้า\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Gezgin\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Провідник\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"Nội dung\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"探索\",\n },\n },\n};\n","export default {\n components: {\n explorer: {\n title: \"探索\",\n },\n },\n};\n","import enUS from \"./locales/en-US\";\nimport enGB from \"./locales/en-GB\";\nimport arSA from \"./locales/ar-SA\";\nimport caES from \"./locales/ca-ES\";\nimport csCZ from \"./locales/cs-CZ\";\nimport deDE from \"./locales/de-DE\";\nimport esES from \"./locales/es-ES\";\nimport faIR from \"./locales/fa-IR\";\nimport fiFI from \"./locales/fi-FI\";\nimport frFR from \"./locales/fr-FR\";\nimport heIL from \"./locales/he-IL\";\nimport huHU from \"./locales/hu-HU\";\nimport idID from \"./locales/id-ID\";\nimport itIT from \"./locales/it-IT\";\nimport jaJP from \"./locales/ja-JP\";\nimport kkKZ from \"./locales/kk-KZ\";\nimport koKR from \"./locales/ko-KR\";\nimport ltLT from \"./locales/lt-LT\";\nimport nbNO from \"./locales/nb-NO\";\nimport nlNL from \"./locales/nl-NL\";\nimport plPL from \"./locales/pl-PL\";\nimport ptBR from \"./locales/pt-BR\";\nimport roRO from \"./locales/ro-RO\";\nimport ruRU from \"./locales/ru-RU\";\nimport thTH from \"./locales/th-TH\";\nimport trTR from \"./locales/tr-TR\";\nimport ukUA from \"./locales/uk-UA\";\nimport viVN from \"./locales/vi-VN\";\nimport zhCN from \"./locales/zh-CN\";\nimport zhTW from \"./locales/zh-TW\";\n\nconst locales: Record = {\n \"en-US\": enUS,\n \"en-GB\": enGB,\n \"ar-SA\": arSA,\n \"ca-ES\": caES,\n \"cs-CZ\": csCZ,\n \"de-DE\": deDE,\n \"es-ES\": esES,\n \"fa-IR\": faIR,\n \"fi-FI\": fiFI,\n \"fr-FR\": frFR,\n \"he-IL\": heIL,\n \"hu-HU\": huHU,\n \"id-ID\": idID,\n \"it-IT\": itIT,\n \"ja-JP\": jaJP,\n \"kk-KZ\": kkKZ,\n \"ko-KR\": koKR,\n \"lt-LT\": ltLT,\n \"nb-NO\": nbNO,\n \"nl-NL\": nlNL,\n \"pl-PL\": plPL,\n \"pt-BR\": ptBR,\n \"ro-RO\": roRO,\n \"ru-RU\": ruRU,\n \"th-TH\": thTH,\n \"tr-TR\": trTR,\n \"uk-UA\": ukUA,\n \"vi-VN\": viVN,\n \"zh-CN\": zhCN,\n \"zh-TW\": zhTW,\n};\n\nexport function i18n(locale: string) {\n return locales[locale] || enUS;\n}\n","@media all and (max-width: 800px) {\n .page > #quartz-body > :not(.sidebar.left:has(.explorer)) {\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body.lock-scroll > :not(.sidebar.left:has(.explorer)) {\n transform: translateX(100dvw);\n transition: transform 300ms ease-in-out;\n }\n .page > #quartz-body .sidebar.left:has(.explorer) {\n box-sizing: border-box;\n position: sticky;\n background-color: var(--light);\n padding: 1rem 0 1rem 0;\n margin: 0;\n }\n .page > #quartz-body .hide-until-loaded ~ .explorer-content {\n display: none;\n }\n}\n.explorer {\n display: flex;\n flex-direction: column;\n overflow-y: hidden;\n min-height: 1.2rem;\n flex: 0 1 auto;\n}\n\n.explorer.collapsed {\n flex: 0 1 1.2rem;\n}\n\n.explorer.collapsed .fold {\n transform: rotateZ(-90deg);\n}\n\n.explorer .fold {\n margin-left: 0.5rem;\n transition: transform 0.3s ease;\n opacity: 0.8;\n}\n\n@media all and (max-width: 800px) {\n .explorer {\n order: -1;\n height: initial;\n overflow: hidden;\n flex-shrink: 0;\n align-self: flex-start;\n margin-top: auto;\n margin-bottom: auto;\n }\n}\n.explorer button.mobile-explorer {\n display: none;\n}\n\n.explorer button.desktop-explorer {\n display: flex;\n}\n\n@media all and (max-width: 800px) {\n .explorer button.mobile-explorer {\n display: flex;\n }\n .explorer button.desktop-explorer {\n display: none;\n }\n}\n.explorer svg {\n pointer-events: all;\n transition: transform 0.35s ease;\n}\n\n.explorer svg > polyline {\n pointer-events: none;\n}\n\nbutton.mobile-explorer,\nbutton.desktop-explorer {\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding: 0;\n color: var(--dark);\n display: flex;\n align-items: center;\n}\n\nbutton.mobile-explorer h2,\nbutton.desktop-explorer h2 {\n font-size: 1rem;\n display: inline-block;\n margin: 0;\n}\n\n.explorer-content {\n list-style: none;\n overflow: hidden;\n overflow-y: auto;\n margin-top: 0.5rem;\n}\n\n.explorer-content ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.explorer-content ul.explorer-ul {\n overscroll-behavior: contain;\n}\n\n.explorer-content ul li > a {\n color: var(--dark);\n opacity: 0.75;\n pointer-events: all;\n}\n\n.explorer-content ul li > a.active {\n opacity: 1;\n color: var(--tertiary);\n}\n\n.explorer-content .folder-outer {\n visibility: collapse;\n display: grid;\n grid-template-rows: 0fr;\n transition-property: grid-template-rows, visibility;\n transition-duration: 0.3s;\n transition-timing-function: ease-in-out;\n}\n\n.explorer-content .folder-outer.open {\n visibility: visible;\n grid-template-rows: 1fr;\n}\n\n.explorer-content .folder-outer > ul {\n overflow: hidden;\n margin-left: 6px;\n padding-left: 0.8rem;\n border-left: 1px solid var(--lightgray);\n}\n\n.folder-container {\n flex-direction: row;\n display: flex;\n align-items: center;\n user-select: none;\n}\n\n.folder-container div > a {\n color: var(--secondary);\n font-family: var(--headerFont);\n font-size: 0.95rem;\n font-weight: 600;\n line-height: 1.5rem;\n display: inline-block;\n}\n\n.folder-container div > a:hover {\n color: var(--tertiary);\n}\n\n.folder-container div > button {\n color: var(--dark);\n background-color: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n padding-left: 0;\n padding-right: 0;\n display: flex;\n align-items: center;\n font-family: var(--headerFont);\n}\n\n.folder-container div > button span {\n font-size: 0.95rem;\n display: inline-block;\n color: var(--secondary);\n font-weight: 600;\n margin: 0;\n line-height: 1.5rem;\n pointer-events: none;\n}\n\n.folder-icon {\n margin-right: 5px;\n color: var(--secondary);\n cursor: pointer;\n transition: transform 0.3s ease;\n backface-visibility: visible;\n flex-shrink: 0;\n}\n\nli:has(> .folder-outer:not(.open)) > .folder-container > svg {\n transform: rotate(-90deg);\n}\n\n.folder-icon:hover {\n color: var(--tertiary);\n}\n\n@media all and (max-width: 800px) {\n .explorer.collapsed {\n flex: 0 0 34px;\n }\n .explorer.collapsed > .explorer-content {\n transform: translateX(-100vw);\n visibility: hidden;\n }\n .explorer:not(.collapsed) {\n flex: 0 0 34px;\n }\n .explorer:not(.collapsed) > .explorer-content {\n transform: translateX(0);\n visibility: visible;\n }\n .explorer .explorer-content {\n box-sizing: border-box;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n margin-top: 0;\n background-color: var(--light);\n max-width: 100vw;\n width: 100vw;\n transform: translateX(-100vw);\n transition: transform 200ms ease, visibility 200ms ease;\n overflow: hidden;\n padding: 4rem 0 2rem 0;\n height: 100dvh;\n max-height: 100dvh;\n visibility: hidden;\n }\n .explorer .mobile-explorer {\n margin: 0;\n padding: 5px;\n z-index: 101;\n }\n .explorer .mobile-explorer.hide-until-loaded {\n display: none;\n }\n .explorer .mobile-explorer .lucide-menu {\n stroke: var(--darkgray);\n }\n}\n@media all and (max-width: 800px) {\n .mobile-no-scroll .explorer-content > .explorer-ul {\n overscroll-behavior: contain;\n }\n}","var U=Object.hasOwnProperty;function S(u){let e=k(W(u,\"index\"),!0);return e.length===0?\"/\":e}function T(){return typeof document>\"u\"?\"\":document.body?.dataset?.basepath??\"\"}function v(u,e){let D=e??T(),n=u.startsWith(\"/\")?u:\"/\"+u;return D+n}function I(u,e){return u===e||u.endsWith(\"/\"+e)}function W(u,e){return I(u,e)&&(u=u.slice(0,-e.length)),u}function k(u,e){return u.startsWith(\"/\")&&(u=u.substring(1)),!e&&u.endsWith(\"/\")&&(u=u.slice(0,-1)),u}var y=class u{constructor(e,D){this.children=[],this.slugSegments=e,this.data=D||null,this.isFolder=!1,this.fileSegmentHint=null,this.displayNameOverride=void 0}get displayName(){return this.displayNameOverride!==void 0?this.displayNameOverride:(this.data?.title===\"index\"?void 0:this.data?.title)||this.fileSegmentHint||this.slugSegment||\"\"}set displayName(e){this.displayNameOverride=e}get slug(){let e=this.slugSegments.join(\"/\");return this.isFolder?e+\"/index\":e}get slugSegment(){return this.slugSegments[this.slugSegments.length-1]||\"\"}makeChild(e,D){let n=[...this.slugSegments,e[0]],r=new u(n,D);return this.children.push(r),r}insert(e,D){if(e.length===0)return;this.isFolder=!0;let n=e[0];if(e.length===1)n===\"index\"?this.data||(this.data=D):this.makeChild(e,D);else{let r=this.children.find(F=>F.slugSegment===n);r||(r=this.makeChild(e,void 0));let t=(D.filePath||D.slug||\"\").split(\"/\");r.fileSegmentHint=t[t.length-e.length],r.insert(e.slice(1),D)}}add(e){this.insert(e.slug.split(\"/\"),e)}sort(e){this.children.sort(e),this.children.forEach(D=>D.sort(e))}filter(e){this.children=this.children.filter(e),this.children.forEach(D=>D.filter(e))}map(e){e(this),this.children.forEach(D=>D.map(e))}static fromEntries(e){let D=new u([],null);return e.forEach(([,n])=>D.add(n)),D}},P=(u,e)=>!u.isFolder&&!e.isFolder||u.isFolder&&e.isFolder?u.displayName.localeCompare(e.displayName,void 0,{numeric:!0,sensitivity:\"base\"}):!u.isFolder&&e.isFolder?1:-1,O=u=>u.slugSegment!==\"tags\";function j(u,e,D,n){return D&&u.filter(D),n&&u.map(n),e&&u.sort(e),u}async function R(u){try{console.log(\"[Explorer] Fetching content index...\");let e=await fetchData;if(console.log(\"[Explorer] Fetched data keys:\",Object.keys(e).slice(0,5)),!e)return console.error(\"[Explorer] No data received\"),null;let D=e.content||e,n=Object.entries(D);if(console.log(\"[Explorer] Entry count:\",n.length),n.length===0)return console.warn(\"[Explorer] No content entries found\"),null;let r=y.fromEntries(n);console.log(\"[Explorer] Trie root children:\",r.children.length);let t=P,F=O,d=null;if(u)try{let E=JSON.parse(u);E.sortFn&&(t=new Function(\"a\",\"b\",\"return (\"+E.sortFn+\")(a, b)\")),E.filterFn&&(F=new Function(\"node\",\"return (\"+E.filterFn+\")(node)\")),E.mapFn&&(d=new Function(\"node\",\"(\"+E.mapFn+\")(node)\"))}catch(E){console.error(\"Error parsing data functions:\",E)}return j(r,t,F,d)}catch(e){return console.error(\"Error building file trie:\",e),null}}var b=0;function N(u,e,D,n,r,t=\"\"){let F=document.getElementById(\"template-folder\"),d=document.getElementById(\"template-file\");if(!F||!d)return;let E=t?t+\"/\"+u.slugSegment:u.slugSegment,A=S(D);if(u.isFolder){let s=F.content.cloneNode(!0),a=s.querySelector(\".folder-container\"),p=s.querySelector(\".folder-button\"),m=s.querySelector(\".folder-title\"),l=s.querySelector(\".folder-outer\"),o=s.querySelector(\".content\");if(m&&(m.textContent=u.displayName||u.slugSegment),a&&(a.dataset.folderpath=u.slug),n===\"link\"&&p){let i=document.createElement(\"a\");i.className=p.className;let B=S(u.slug);i.href=v(B||\"\"),m?i.appendChild(m):i.textContent=u.displayName||u.slugSegment,p.replaceWith(i),p=i}let C=r[u.slug]!==void 0?r[u.slug]:!0,c=S(u.slug),f=c&&c===A.slice(0,c.length);if((!C||f)&&l&&l.classList.add(\"open\"),u.children&&u.children.length>0&&o)for(let i of u.children)N(i,o,D,n,r,E);e.appendChild(s)}else if(u.data){let s=d.content.cloneNode(!0),a=s.querySelector(\"a\");a&&(a.href=v(u.data.slug),a.textContent=u.displayName||u.slugSegment,u.data.slug===D&&a.classList.add(\"active\",\"is-active\")),e.appendChild(s)}}async function L(u){let e=++b;try{console.log(\"[Explorer] Nav event received, generation:\",e);let D=(u.detail?.url||\"\").replace(/^\\/+/,\"\"),n=document.querySelectorAll(\"div.explorer\");console.log(\"[Explorer] Found\",n.length,\"explorers\");let r={};try{JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\").forEach(F=>{r[F.path]=F.collapsed})}catch(t){console.error(\"[Explorer] Error loading saved state:\",t)}for(let t of n){let F=t.querySelector(\".explorer-ul\");if(!F){console.warn(\"[Explorer] No explorer-ul found\");continue}F.innerHTML='
  • ';let d=t.dataset.dataFns,E=t.dataset.behavior||\"collapse\";console.log(\"[Explorer] Starting tree build...\");let A=await R(d);if(e===b){if(console.log(\"[Explorer] Render generation is current, rendering tree\"),console.log(\"[Explorer] Trie result:\",A?\"success\":\"null\"),A&&A.children&&A.children.length>0){F.innerHTML='
  • ',console.log(\"[Explorer] Rendering\",A.children.length,\"children\");for(let o of A.children)N(o,F,D,E,r,\"\");console.log(\"[Explorer] Render complete, final list length:\",F.children.length)}else console.warn(\"[Explorer] No trie or empty children\");let l=sessionStorage.getItem(\"explorerScrollTop\");if(l)F.scrollTop=parseInt(l,10);else{let o=F.querySelector(\".active\");o&&o.scrollIntoView({behavior:\"smooth\"})}}else console.log(\"[Explorer] Stale render generation, skipping tree render\");let s=[],a=t.getElementsByClassName(\"explorer-toggle\");for(let l of a){let o=function(){let C=this.closest(\".explorer\");if(!C)return;let c=C.classList.toggle(\"collapsed\");C.setAttribute(\"aria-expanded\",c?\"false\":\"true\"),c?document.documentElement.classList.remove(\"mobile-no-scroll\"):document.documentElement.classList.add(\"mobile-no-scroll\")};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let p=t.getElementsByClassName(\"folder-icon\");for(let l of p){let o=function(C){C.stopPropagation();let c=this.parentElement;if(!c)return;let f=c.nextElementSibling;if(!f)return;f.classList.toggle(\"open\");let i=!f.classList.contains(\"open\"),B=c.dataset.folderpath,h=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),g=h.findIndex(x=>x.path===B);g>=0?h[g].collapsed=i:h.push({path:B,collapsed:i}),localStorage.setItem(\"fileTree\",JSON.stringify(h))};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}let m=t.getElementsByClassName(\"folder-button\");for(let l of m){let o=function(C){let c=this.closest(\".folder-container\");if(!c)return;let f=t.dataset.behavior||\"collapse\",i=c.nextElementSibling,B=c.dataset.folderpath;if(f!==\"link\"){if(C.stopPropagation(),!i)return;i.classList.toggle(\"open\");let h=!i.classList.contains(\"open\"),g=JSON.parse(localStorage.getItem(\"fileTree\")||\"[]\"),x=g.findIndex(w=>w.path===B);x>=0?g[x].collapsed=h:g.push({path:B,collapsed:h}),localStorage.setItem(\"fileTree\",JSON.stringify(g))}};l.addEventListener(\"click\",o),s.push(()=>l.removeEventListener(\"click\",o))}typeof window<\"u\"&&window.addCleanup&&window.addCleanup(()=>s.forEach(l=>l()))}for(let t of document.getElementsByClassName(\"explorer\")){let F=t.querySelector(\".mobile-explorer\");F&&(F.classList.remove(\"hide-until-loaded\"),F.checkVisibility&&F.checkVisibility()&&(t.classList.add(\"collapsed\"),t.setAttribute(\"aria-expanded\",\"false\"),document.documentElement.classList.remove(\"mobile-no-scroll\")))}}catch(D){console.error(\"[Explorer] Fatal error in nav handler:\",D)}}document.addEventListener(\"nav\",L);document.addEventListener(\"render\",L);document.addEventListener(\"prenav\",()=>{let u=document.querySelector(\".explorer-ul\");u&&sessionStorage.setItem(\"explorerScrollTop\",u.scrollTop.toString())});\n","import type {\n QuartzComponent,\n QuartzComponentConstructor,\n QuartzComponentProps,\n} from \"@quartz-community/types\";\nimport OverflowListFactory from \"./OverflowList\";\nimport { classNames } from \"../util/lang\";\nimport { i18n } from \"../i18n\";\nimport style from \"./styles/explorer.scss\";\n// @ts-expect-error - Inline script loaded as text by esbuild plugin\nimport script from \"./scripts/explorer.inline.ts\";\n\ninterface FileTrieNode {\n slugSegment?: string;\n slugSegments?: string[];\n displayName?: string;\n isFolder: boolean;\n data: Record | null;\n children: FileTrieNode[];\n}\n\nexport interface ExplorerOptions {\n title?: string;\n folderDefaultState: \"collapsed\" | \"open\";\n folderClickBehavior: \"collapse\" | \"link\";\n useSavedState: boolean;\n sortFn?: (a: FileTrieNode, b: FileTrieNode) => number;\n filterFn?: (node: FileTrieNode) => boolean;\n mapFn?: (node: FileTrieNode) => FileTrieNode;\n order?: Array<\"filter\" | \"map\" | \"sort\">;\n}\n\nconst defaultOptions: ExplorerOptions = {\n folderDefaultState: \"collapsed\",\n folderClickBehavior: \"link\",\n useSavedState: true,\n mapFn: (node: FileTrieNode) => {\n return node;\n },\n sortFn: (a: FileTrieNode, b: FileTrieNode) => {\n if ((!a.isFolder && !b.isFolder) || (a.isFolder && b.isFolder)) {\n return (a.displayName || \"\").localeCompare(b.displayName || \"\", undefined, {\n numeric: true,\n sensitivity: \"base\",\n });\n }\n\n if (!a.isFolder && b.isFolder) {\n return 1;\n }\n return -1;\n },\n filterFn: (node: FileTrieNode) => node.slugSegment !== \"tags\",\n order: [\"filter\", \"map\", \"sort\"],\n};\n\nlet numExplorers = 0;\n\nfunction concatenateResources(...resources: (string | undefined)[]): string {\n return resources.filter((r): r is string => !!r).join(\"\\n\");\n}\n\nexport default ((userOpts?: Partial) => {\n const opts: ExplorerOptions = { ...defaultOptions, ...userOpts };\n const { OverflowList, overflowListAfterDOMLoaded } = OverflowListFactory();\n\n const ExplorerComponent: QuartzComponent = (props: QuartzComponentProps) => {\n const { cfg } = props;\n const displayClass = (props as { displayClass?: \"mobile-only\" | \"desktop-only\" }).displayClass;\n const id = `explorer-${numExplorers++}`;\n const locale = cfg?.locale ?? \"en-US\";\n\n const title = opts.title ?? i18n(locale).components.explorer.title;\n\n return (\n \n \n \n \n \n \n \n \n \n

    {title}

    \n \n \n \n \n
    \n \n
    \n \n \n \n );\n };\n\n ExplorerComponent.css = style;\n ExplorerComponent.afterDOMLoaded = concatenateResources(script, overflowListAfterDOMLoaded);\n return ExplorerComponent;\n}) satisfies QuartzComponentConstructor;\n"]} \ No newline at end of file diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 8ad01cf..6118b4a 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -1,7 +1,65 @@ import enUS from "./locales/en-US"; +import enGB from "./locales/en-GB"; +import arSA from "./locales/ar-SA"; +import caES from "./locales/ca-ES"; +import csCZ from "./locales/cs-CZ"; +import deDE from "./locales/de-DE"; +import esES from "./locales/es-ES"; +import faIR from "./locales/fa-IR"; +import fiFI from "./locales/fi-FI"; +import frFR from "./locales/fr-FR"; +import heIL from "./locales/he-IL"; +import huHU from "./locales/hu-HU"; +import idID from "./locales/id-ID"; +import itIT from "./locales/it-IT"; +import jaJP from "./locales/ja-JP"; +import kkKZ from "./locales/kk-KZ"; +import koKR from "./locales/ko-KR"; +import ltLT from "./locales/lt-LT"; +import nbNO from "./locales/nb-NO"; +import nlNL from "./locales/nl-NL"; +import plPL from "./locales/pl-PL"; +import ptBR from "./locales/pt-BR"; +import roRO from "./locales/ro-RO"; +import ruRU from "./locales/ru-RU"; +import thTH from "./locales/th-TH"; +import trTR from "./locales/tr-TR"; +import ukUA from "./locales/uk-UA"; +import viVN from "./locales/vi-VN"; +import zhCN from "./locales/zh-CN"; +import zhTW from "./locales/zh-TW"; const locales: Record = { "en-US": enUS, + "en-GB": enGB, + "ar-SA": arSA, + "ca-ES": caES, + "cs-CZ": csCZ, + "de-DE": deDE, + "es-ES": esES, + "fa-IR": faIR, + "fi-FI": fiFI, + "fr-FR": frFR, + "he-IL": heIL, + "hu-HU": huHU, + "id-ID": idID, + "it-IT": itIT, + "ja-JP": jaJP, + "kk-KZ": kkKZ, + "ko-KR": koKR, + "lt-LT": ltLT, + "nb-NO": nbNO, + "nl-NL": nlNL, + "pl-PL": plPL, + "pt-BR": ptBR, + "ro-RO": roRO, + "ru-RU": ruRU, + "th-TH": thTH, + "tr-TR": trTR, + "uk-UA": ukUA, + "vi-VN": viVN, + "zh-CN": zhCN, + "zh-TW": zhTW, }; export function i18n(locale: string) {