@ddict/popup 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/popup.css +1 -1
- package/dist/popup.es.js +1214 -1215
- package/dist/popup.umd.js +9 -9
- package/package.json +5 -4
package/dist/popup.es.js
CHANGED
|
@@ -1,151 +1,151 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const bn = "/assets/icons/logo.svg", _n = "/assets/icons/book-one.svg", yn = "/assets/icons/arrow-full-screen.svg", xn = "/assets/icons/setting.svg", wn = { class: "flex justify-between" }, Sn = /* @__PURE__ */ g("div", { class: "flex flex-row" }, [
|
|
1
|
+
import { openBlock as w, createElementBlock as O, createElementVNode as g, computed as y, unref as T, shallowRef as cn, watch as F, triggerRef as it, onScopeDispose as Xe, ref as E, onUnmounted as wt, inject as Le, watchEffect as ie, onMounted as ve, cloneVNode as Et, h as Se, Fragment as W, defineComponent as ae, provide as et, reactive as St, nextTick as te, toRaw as K, mergeModels as dn, useModel as fn, createBlock as X, withCtx as Ve, createVNode as H, renderList as se, normalizeClass as _e, toDisplayString as ee, effectScope as Ot, markRaw as de, hasInjectionContext as vn, getCurrentInstance as $t, isRef as xe, isReactive as tt, toRef as Ze, getCurrentScope as It, toRefs as at, createCommentVNode as Q, withModifiers as pn, createTextVNode as hn, withDirectives as Lt, vModelText as Tt, pushScopeId as mn, popScopeId as gn } from "vue";
|
|
2
|
+
const bn = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e", Cn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e", _n = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e", xn = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e", yn = { class: "flex justify-between" }, wn = /* @__PURE__ */ g("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ g("img", {
|
|
4
4
|
src: bn,
|
|
5
5
|
alt: "Vue logo",
|
|
6
6
|
class: "w-24"
|
|
7
7
|
})
|
|
8
|
-
], -1), En = { class: "flex" },
|
|
9
|
-
src:
|
|
8
|
+
], -1), En = { class: "flex" }, Sn = /* @__PURE__ */ g("img", {
|
|
9
|
+
src: Cn,
|
|
10
10
|
alt: "Reader",
|
|
11
11
|
class: "w-7"
|
|
12
|
-
}, null, -1),
|
|
13
|
-
|
|
14
|
-
],
|
|
15
|
-
src:
|
|
12
|
+
}, null, -1), On = [
|
|
13
|
+
Sn
|
|
14
|
+
], $n = /* @__PURE__ */ g("img", {
|
|
15
|
+
src: _n,
|
|
16
16
|
alt: "Full screen",
|
|
17
17
|
class: "w-7"
|
|
18
|
-
}, null, -1),
|
|
19
|
-
|
|
20
|
-
],
|
|
18
|
+
}, null, -1), In = [
|
|
19
|
+
$n
|
|
20
|
+
], Ln = /* @__PURE__ */ g("img", {
|
|
21
21
|
src: xn,
|
|
22
22
|
alt: "Setting",
|
|
23
23
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
25
|
-
|
|
26
|
-
],
|
|
24
|
+
}, null, -1), Tn = [
|
|
25
|
+
Ln
|
|
26
|
+
], Vn = {
|
|
27
27
|
__name: "Header",
|
|
28
28
|
emits: ["settings", "fullScreen", "reader"],
|
|
29
29
|
setup(e, { emit: o }) {
|
|
30
30
|
const t = o;
|
|
31
|
-
return (n,
|
|
32
|
-
|
|
31
|
+
return (n, l) => (w(), O("div", yn, [
|
|
32
|
+
wn,
|
|
33
33
|
g("div", En, [
|
|
34
34
|
g("button", {
|
|
35
35
|
class: "btn btn-ghost btn-circle",
|
|
36
|
-
onClick:
|
|
37
|
-
},
|
|
36
|
+
onClick: l[0] || (l[0] = (r) => t("reader"))
|
|
37
|
+
}, On),
|
|
38
38
|
g("button", {
|
|
39
39
|
class: "btn btn-ghost btn-circle",
|
|
40
|
-
onClick:
|
|
41
|
-
},
|
|
40
|
+
onClick: l[1] || (l[1] = (r) => t("fullScreen"))
|
|
41
|
+
}, In),
|
|
42
42
|
g("button", {
|
|
43
43
|
class: "btn btn-ghost btn-circle",
|
|
44
|
-
onClick:
|
|
45
|
-
},
|
|
44
|
+
onClick: l[2] || (l[2] = (r) => t("settings"))
|
|
45
|
+
}, Tn)
|
|
46
46
|
])
|
|
47
47
|
]));
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
51
|
-
let n = t.initialDeps ?? [],
|
|
50
|
+
function ye(e, o, t) {
|
|
51
|
+
let n = t.initialDeps ?? [], l;
|
|
52
52
|
return () => {
|
|
53
|
-
var r, i,
|
|
53
|
+
var r, i, s, a;
|
|
54
54
|
let u;
|
|
55
55
|
t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
|
|
56
|
-
const
|
|
57
|
-
if (!(
|
|
58
|
-
return
|
|
59
|
-
n =
|
|
60
|
-
let
|
|
61
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
62
|
-
const m = Math.round((Date.now() - u) * 100) / 100,
|
|
63
|
-
for (
|
|
64
|
-
|
|
65
|
-
return
|
|
56
|
+
const v = e();
|
|
57
|
+
if (!(v.length !== n.length || v.some((m, h) => n[h] !== m)))
|
|
58
|
+
return l;
|
|
59
|
+
n = v;
|
|
60
|
+
let p;
|
|
61
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (p = Date.now()), l = o(...v), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
62
|
+
const m = Math.round((Date.now() - u) * 100) / 100, h = Math.round((Date.now() - p) * 100) / 100, $ = h / 16, N = (L, I) => {
|
|
63
|
+
for (L = String(L); L.length < I; )
|
|
64
|
+
L = " " + L;
|
|
65
|
+
return L;
|
|
66
66
|
};
|
|
67
67
|
console.info(
|
|
68
|
-
`%c⏱ ${
|
|
68
|
+
`%c⏱ ${N(h, 5)} /${N(m, 5)} ms`,
|
|
69
69
|
`
|
|
70
70
|
font-size: .6rem;
|
|
71
71
|
font-weight: bold;
|
|
72
72
|
color: hsl(${Math.max(
|
|
73
73
|
0,
|
|
74
|
-
Math.min(120 - 120 *
|
|
74
|
+
Math.min(120 - 120 * $, 120)
|
|
75
75
|
)}deg 100% 31%);`,
|
|
76
76
|
t == null ? void 0 : t.key
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
-
return (a = t == null ? void 0 : t.onChange) == null || a.call(t,
|
|
79
|
+
return (a = t == null ? void 0 : t.onChange) == null || a.call(t, l), l;
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function We(e, o) {
|
|
83
83
|
if (e === void 0)
|
|
84
84
|
throw new Error("Unexpected undefined");
|
|
85
85
|
return e;
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const Pn = (e, o) => Math.abs(e - o) < 1, Mn = (e, o, t) => {
|
|
88
88
|
let n;
|
|
89
|
-
return function(...
|
|
90
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
89
|
+
return function(...l) {
|
|
90
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
91
91
|
};
|
|
92
|
-
},
|
|
92
|
+
}, kn = (e) => e, Rn = (e) => {
|
|
93
93
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
94
|
-
for (let
|
|
95
|
-
n.push(
|
|
94
|
+
for (let l = o; l <= t; l++)
|
|
95
|
+
n.push(l);
|
|
96
96
|
return n;
|
|
97
|
-
},
|
|
97
|
+
}, Nn = (e, o) => {
|
|
98
98
|
const t = e.scrollElement;
|
|
99
99
|
if (!t)
|
|
100
100
|
return;
|
|
101
101
|
const n = e.targetWindow;
|
|
102
102
|
if (!n)
|
|
103
103
|
return;
|
|
104
|
-
const
|
|
105
|
-
const { width:
|
|
106
|
-
o({ width: Math.round(
|
|
104
|
+
const l = (i) => {
|
|
105
|
+
const { width: s, height: a } = i;
|
|
106
|
+
o({ width: Math.round(s), height: Math.round(a) });
|
|
107
107
|
};
|
|
108
|
-
if (
|
|
108
|
+
if (l(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
109
109
|
return () => {
|
|
110
110
|
};
|
|
111
111
|
const r = new n.ResizeObserver((i) => {
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
const a =
|
|
112
|
+
const s = i[0];
|
|
113
|
+
if (s != null && s.borderBoxSize) {
|
|
114
|
+
const a = s.borderBoxSize[0];
|
|
115
115
|
if (a) {
|
|
116
|
-
|
|
116
|
+
l({ width: a.inlineSize, height: a.blockSize });
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
|
|
120
|
+
l(t.getBoundingClientRect());
|
|
121
121
|
});
|
|
122
122
|
return r.observe(t, { box: "border-box" }), () => {
|
|
123
123
|
r.unobserve(t);
|
|
124
124
|
};
|
|
125
125
|
}, ut = {
|
|
126
126
|
passive: !0
|
|
127
|
-
},
|
|
127
|
+
}, Dn = typeof window > "u" ? !0 : "onscrollend" in window, An = (e, o) => {
|
|
128
128
|
const t = e.scrollElement;
|
|
129
129
|
if (!t)
|
|
130
130
|
return;
|
|
131
131
|
const n = e.targetWindow;
|
|
132
132
|
if (!n)
|
|
133
133
|
return;
|
|
134
|
-
let
|
|
135
|
-
const r =
|
|
136
|
-
} :
|
|
134
|
+
let l = 0;
|
|
135
|
+
const r = Dn ? () => {
|
|
136
|
+
} : Mn(
|
|
137
137
|
n,
|
|
138
138
|
() => {
|
|
139
|
-
o(
|
|
139
|
+
o(l, !1);
|
|
140
140
|
},
|
|
141
141
|
e.options.isScrollingResetDelay
|
|
142
142
|
), i = (u) => () => {
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
return a(), t.addEventListener("scroll",
|
|
146
|
-
t.removeEventListener("scroll",
|
|
143
|
+
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), o(l, u);
|
|
144
|
+
}, s = i(!0), a = i(!1);
|
|
145
|
+
return a(), t.addEventListener("scroll", s, ut), t.addEventListener("scrollend", a, ut), () => {
|
|
146
|
+
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
|
|
147
147
|
};
|
|
148
|
-
},
|
|
148
|
+
}, Fn = (e, o, t) => {
|
|
149
149
|
if (o != null && o.borderBoxSize) {
|
|
150
150
|
const n = o.borderBoxSize[0];
|
|
151
151
|
if (n)
|
|
@@ -156,13 +156,13 @@ const Rn = (e, o) => Math.abs(e - o) < 1, Nn = (e, o, t) => {
|
|
|
156
156
|
return Math.round(
|
|
157
157
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
158
158
|
);
|
|
159
|
-
},
|
|
159
|
+
}, jn = (e, {
|
|
160
160
|
adjustments: o = 0,
|
|
161
161
|
behavior: t
|
|
162
162
|
}, n) => {
|
|
163
|
-
var
|
|
163
|
+
var l, r;
|
|
164
164
|
const i = e + o;
|
|
165
|
-
(r = (
|
|
165
|
+
(r = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || r.call(l, {
|
|
166
166
|
[n.options.horizontal ? "left" : "top"]: i,
|
|
167
167
|
behavior: t
|
|
168
168
|
});
|
|
@@ -171,28 +171,28 @@ class Bn {
|
|
|
171
171
|
constructor(o) {
|
|
172
172
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
173
173
|
let t = null;
|
|
174
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
175
|
-
|
|
174
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
|
|
175
|
+
l.forEach((r) => {
|
|
176
176
|
this._measureElement(r.target, r);
|
|
177
177
|
});
|
|
178
178
|
}));
|
|
179
179
|
return {
|
|
180
180
|
disconnect: () => {
|
|
181
|
-
var
|
|
182
|
-
return (
|
|
181
|
+
var l;
|
|
182
|
+
return (l = n()) == null ? void 0 : l.disconnect();
|
|
183
183
|
},
|
|
184
|
-
observe: (
|
|
184
|
+
observe: (l) => {
|
|
185
185
|
var r;
|
|
186
|
-
return (r = n()) == null ? void 0 : r.observe(
|
|
186
|
+
return (r = n()) == null ? void 0 : r.observe(l, { box: "border-box" });
|
|
187
187
|
},
|
|
188
|
-
unobserve: (
|
|
188
|
+
unobserve: (l) => {
|
|
189
189
|
var r;
|
|
190
|
-
return (r = n()) == null ? void 0 : r.unobserve(
|
|
190
|
+
return (r = n()) == null ? void 0 : r.unobserve(l);
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
})(), this.range = null, this.setOptions = (t) => {
|
|
194
|
-
Object.entries(t).forEach(([n,
|
|
195
|
-
typeof
|
|
194
|
+
Object.entries(t).forEach(([n, l]) => {
|
|
195
|
+
typeof l > "u" && delete t[n];
|
|
196
196
|
}), this.options = {
|
|
197
197
|
debug: !1,
|
|
198
198
|
initialOffset: 0,
|
|
@@ -202,11 +202,11 @@ class Bn {
|
|
|
202
202
|
scrollPaddingStart: 0,
|
|
203
203
|
scrollPaddingEnd: 0,
|
|
204
204
|
horizontal: !1,
|
|
205
|
-
getItemKey:
|
|
206
|
-
rangeExtractor:
|
|
205
|
+
getItemKey: kn,
|
|
206
|
+
rangeExtractor: Rn,
|
|
207
207
|
onChange: () => {
|
|
208
208
|
},
|
|
209
|
-
measureElement:
|
|
209
|
+
measureElement: Fn,
|
|
210
210
|
initialRect: { width: 0, height: 0 },
|
|
211
211
|
scrollMargin: 0,
|
|
212
212
|
gap: 0,
|
|
@@ -218,12 +218,12 @@ class Bn {
|
|
|
218
218
|
...t
|
|
219
219
|
};
|
|
220
220
|
}, this.notify = (t, n) => {
|
|
221
|
-
var
|
|
222
|
-
const { startIndex: i, endIndex:
|
|
221
|
+
var l, r;
|
|
222
|
+
const { startIndex: i, endIndex: s } = this.range ?? {
|
|
223
223
|
startIndex: void 0,
|
|
224
224
|
endIndex: void 0
|
|
225
225
|
}, a = this.calculateRange();
|
|
226
|
-
(t || i !== (a == null ? void 0 : a.startIndex) ||
|
|
226
|
+
(t || i !== (a == null ? void 0 : a.startIndex) || s !== (a == null ? void 0 : a.endIndex)) && ((r = (l = this.options).onChange) == null || r.call(l, this, n));
|
|
227
227
|
}, this.cleanup = () => {
|
|
228
228
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
229
229
|
}, this._didMount = () => () => {
|
|
@@ -240,31 +240,31 @@ class Bn {
|
|
|
240
240
|
adjustments: void 0,
|
|
241
241
|
behavior: void 0
|
|
242
242
|
}), this.unsubs.push(
|
|
243
|
-
this.options.observeElementRect(this, (
|
|
244
|
-
this.scrollRect =
|
|
243
|
+
this.options.observeElementRect(this, (l) => {
|
|
244
|
+
this.scrollRect = l, this.notify(!1, !1);
|
|
245
245
|
})
|
|
246
246
|
), this.unsubs.push(
|
|
247
|
-
this.options.observeElementOffset(this, (
|
|
248
|
-
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() <
|
|
247
|
+
this.options.observeElementOffset(this, (l, r) => {
|
|
248
|
+
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
|
|
249
249
|
const i = this.isScrolling;
|
|
250
250
|
this.isScrolling = r, this.notify(i !== r, r);
|
|
251
251
|
})
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
}, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
|
|
255
|
-
const
|
|
255
|
+
const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
256
256
|
for (let i = n - 1; i >= 0; i--) {
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
257
|
+
const s = t[i];
|
|
258
|
+
if (l.has(s.lane))
|
|
259
259
|
continue;
|
|
260
260
|
const a = r.get(
|
|
261
|
-
|
|
261
|
+
s.lane
|
|
262
262
|
);
|
|
263
|
-
if (a == null ||
|
|
263
|
+
if (a == null || s.end > a.end ? r.set(s.lane, s) : s.end < a.end && l.set(s.lane, !0), l.size === this.options.lanes)
|
|
264
264
|
break;
|
|
265
265
|
}
|
|
266
|
-
return r.size === this.options.lanes ? Array.from(r.values()).sort((i,
|
|
267
|
-
}, this.getMeasurementOptions =
|
|
266
|
+
return r.size === this.options.lanes ? Array.from(r.values()).sort((i, s) => i.end === s.end ? i.index - s.index : i.end - s.end)[0] : void 0;
|
|
267
|
+
}, this.getMeasurementOptions = ye(
|
|
268
268
|
() => [
|
|
269
269
|
this.options.count,
|
|
270
270
|
this.options.paddingStart,
|
|
@@ -272,19 +272,19 @@ class Bn {
|
|
|
272
272
|
this.options.getItemKey,
|
|
273
273
|
this.options.enabled
|
|
274
274
|
],
|
|
275
|
-
(t, n,
|
|
275
|
+
(t, n, l, r, i) => (this.pendingMeasuredCacheIndexes = [], {
|
|
276
276
|
count: t,
|
|
277
277
|
paddingStart: n,
|
|
278
|
-
scrollMargin:
|
|
278
|
+
scrollMargin: l,
|
|
279
279
|
getItemKey: r,
|
|
280
280
|
enabled: i
|
|
281
281
|
}),
|
|
282
282
|
{
|
|
283
283
|
key: !1
|
|
284
284
|
}
|
|
285
|
-
), this.getMeasurements =
|
|
285
|
+
), this.getMeasurements = ye(
|
|
286
286
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
287
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
287
|
+
({ count: t, paddingStart: n, scrollMargin: l, getItemKey: r, enabled: i }, s) => {
|
|
288
288
|
var a;
|
|
289
289
|
if (!i)
|
|
290
290
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
@@ -293,59 +293,59 @@ class Bn {
|
|
|
293
293
|
}));
|
|
294
294
|
const u = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
295
295
|
this.pendingMeasuredCacheIndexes = [];
|
|
296
|
-
const
|
|
296
|
+
const v = this.measurementsCache.slice(0, u);
|
|
297
297
|
for (let c = u; c < t; c++) {
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
-
const
|
|
301
|
-
if (!
|
|
302
|
-
|
|
298
|
+
let p = (a = this.measurementsCache[c]) == null ? void 0 : a.measureElement;
|
|
299
|
+
p || (p = (A) => {
|
|
300
|
+
const _ = r(c), P = this.elementsCache.get(_);
|
|
301
|
+
if (!A) {
|
|
302
|
+
P && (this.observer.unobserve(P), this.elementsCache.delete(_));
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
|
|
305
|
+
P !== A && (P && this.observer.unobserve(P), this.observer.observe(A), this.elementsCache.set(_, A)), A.isConnected && this.resizeItem(
|
|
306
306
|
c,
|
|
307
|
-
this.options.measureElement(
|
|
307
|
+
this.options.measureElement(A, void 0, this)
|
|
308
308
|
);
|
|
309
309
|
});
|
|
310
|
-
const m = r(c),
|
|
311
|
-
|
|
310
|
+
const m = r(c), h = this.options.lanes === 1 ? v[c - 1] : this.getFurthestMeasurement(v, c), $ = h ? h.end + this.options.gap : n + l, N = s.get(m), L = typeof N == "number" ? N : this.options.estimateSize(c), I = $ + L, R = h ? h.lane : c % this.options.lanes;
|
|
311
|
+
v[c] = {
|
|
312
312
|
index: c,
|
|
313
|
-
start:
|
|
314
|
-
size:
|
|
315
|
-
end:
|
|
313
|
+
start: $,
|
|
314
|
+
size: L,
|
|
315
|
+
end: I,
|
|
316
316
|
key: m,
|
|
317
|
-
lane:
|
|
318
|
-
measureElement:
|
|
317
|
+
lane: R,
|
|
318
|
+
measureElement: p
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
|
-
return this.measurementsCache =
|
|
321
|
+
return this.measurementsCache = v, v;
|
|
322
322
|
},
|
|
323
323
|
{
|
|
324
324
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
325
325
|
debug: () => this.options.debug
|
|
326
326
|
}
|
|
327
|
-
), this.calculateRange =
|
|
327
|
+
), this.calculateRange = ye(
|
|
328
328
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
329
|
-
(t, n,
|
|
329
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? Hn({
|
|
330
330
|
measurements: t,
|
|
331
331
|
outerSize: n,
|
|
332
|
-
scrollOffset:
|
|
332
|
+
scrollOffset: l
|
|
333
333
|
}) : null,
|
|
334
334
|
{
|
|
335
335
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
336
336
|
debug: () => this.options.debug
|
|
337
337
|
}
|
|
338
|
-
), this.getIndexes =
|
|
338
|
+
), this.getIndexes = ye(
|
|
339
339
|
() => [
|
|
340
340
|
this.options.rangeExtractor,
|
|
341
341
|
this.calculateRange(),
|
|
342
342
|
this.options.overscan,
|
|
343
343
|
this.options.count
|
|
344
344
|
],
|
|
345
|
-
(t, n,
|
|
345
|
+
(t, n, l, r) => n === null ? [] : t({
|
|
346
346
|
startIndex: n.startIndex,
|
|
347
347
|
endIndex: n.endIndex,
|
|
348
|
-
overscan:
|
|
348
|
+
overscan: l,
|
|
349
349
|
count: r
|
|
350
350
|
}),
|
|
351
351
|
{
|
|
@@ -353,40 +353,40 @@ class Bn {
|
|
|
353
353
|
debug: () => this.options.debug
|
|
354
354
|
}
|
|
355
355
|
), this.indexFromElement = (t) => {
|
|
356
|
-
const n = this.options.indexAttribute,
|
|
357
|
-
return
|
|
356
|
+
const n = this.options.indexAttribute, l = t.getAttribute(n);
|
|
357
|
+
return l ? parseInt(l, 10) : (console.warn(
|
|
358
358
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
359
359
|
), -1);
|
|
360
360
|
}, this._measureElement = (t, n) => {
|
|
361
|
-
const
|
|
361
|
+
const l = this.indexFromElement(t), r = this.getMeasurements()[l];
|
|
362
362
|
if (!r || !t.isConnected) {
|
|
363
|
-
this.elementsCache.forEach((
|
|
364
|
-
|
|
363
|
+
this.elementsCache.forEach((s, a) => {
|
|
364
|
+
s === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
|
|
365
365
|
});
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
368
|
const i = this.elementsCache.get(r.key);
|
|
369
|
-
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(
|
|
369
|
+
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(l, this.options.measureElement(t, n, this));
|
|
370
370
|
}, this.resizeItem = (t, n) => {
|
|
371
|
-
const
|
|
372
|
-
if (!
|
|
371
|
+
const l = this.getMeasurements()[t];
|
|
372
|
+
if (!l)
|
|
373
373
|
return;
|
|
374
|
-
const r = this.itemSizeCache.get(
|
|
375
|
-
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
374
|
+
const r = this.itemSizeCache.get(l.key) ?? l.size, i = n - r;
|
|
375
|
+
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(l, i, this) : l.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", i), this._scrollToOffset(this.getScrollOffset(), {
|
|
376
376
|
adjustments: this.scrollAdjustments += i,
|
|
377
377
|
behavior: void 0
|
|
378
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
378
|
+
})), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, n)), this.notify(!0, !1));
|
|
379
379
|
}, this.measureElement = (t) => {
|
|
380
380
|
t && this._measureElement(t, void 0);
|
|
381
|
-
}, this.getVirtualItems =
|
|
381
|
+
}, this.getVirtualItems = ye(
|
|
382
382
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
383
383
|
(t, n) => {
|
|
384
|
-
const
|
|
384
|
+
const l = [];
|
|
385
385
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
386
|
-
const
|
|
387
|
-
|
|
386
|
+
const s = t[r], a = n[s];
|
|
387
|
+
l.push(a);
|
|
388
388
|
}
|
|
389
|
-
return
|
|
389
|
+
return l;
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
392
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -395,60 +395,60 @@ class Bn {
|
|
|
395
395
|
), this.getVirtualItemForOffset = (t) => {
|
|
396
396
|
const n = this.getMeasurements();
|
|
397
397
|
if (n.length !== 0)
|
|
398
|
-
return
|
|
399
|
-
n[
|
|
398
|
+
return We(
|
|
399
|
+
n[Vt(
|
|
400
400
|
0,
|
|
401
401
|
n.length - 1,
|
|
402
|
-
(
|
|
402
|
+
(l) => We(n[l]).start,
|
|
403
403
|
t
|
|
404
404
|
)]
|
|
405
405
|
);
|
|
406
406
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
407
|
-
const
|
|
408
|
-
n === "auto" && (t <= r ? n = "start" : t >= r +
|
|
409
|
-
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) -
|
|
407
|
+
const l = this.getSize(), r = this.getScrollOffset();
|
|
408
|
+
n === "auto" && (t <= r ? n = "start" : t >= r + l ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - l : n === "center" && (t = t - l / 2);
|
|
409
|
+
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - l;
|
|
410
410
|
return Math.max(Math.min(a, t), 0);
|
|
411
411
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
412
412
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
413
|
-
const
|
|
414
|
-
if (!
|
|
413
|
+
const l = this.getMeasurements()[t];
|
|
414
|
+
if (!l)
|
|
415
415
|
return;
|
|
416
416
|
const r = this.getSize(), i = this.getScrollOffset();
|
|
417
417
|
if (n === "auto")
|
|
418
|
-
if (
|
|
418
|
+
if (l.end >= i + r - this.options.scrollPaddingEnd)
|
|
419
419
|
n = "end";
|
|
420
|
-
else if (
|
|
420
|
+
else if (l.start <= i + this.options.scrollPaddingStart)
|
|
421
421
|
n = "start";
|
|
422
422
|
else
|
|
423
423
|
return [i, n];
|
|
424
|
-
const
|
|
425
|
-
return [this.getOffsetForAlignment(
|
|
424
|
+
const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
|
|
425
|
+
return [this.getOffsetForAlignment(s, n), n];
|
|
426
426
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
427
427
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
428
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
429
|
-
this.cancelScrollToIndex(),
|
|
428
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: l } = {}) => {
|
|
429
|
+
this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
430
430
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
431
431
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
432
432
|
adjustments: void 0,
|
|
433
|
-
behavior:
|
|
433
|
+
behavior: l
|
|
434
434
|
});
|
|
435
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
436
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
435
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: l } = {}) => {
|
|
436
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
437
437
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
438
438
|
);
|
|
439
439
|
const r = this.getOffsetForIndex(t, n);
|
|
440
440
|
if (!r) return;
|
|
441
|
-
const [i,
|
|
442
|
-
this._scrollToOffset(i, { adjustments: void 0, behavior:
|
|
441
|
+
const [i, s] = r;
|
|
442
|
+
this._scrollToOffset(i, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
443
443
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
444
444
|
this.options.getItemKey(t)
|
|
445
445
|
)) {
|
|
446
|
-
const [u] =
|
|
447
|
-
this.getOffsetForIndex(t,
|
|
446
|
+
const [u] = We(
|
|
447
|
+
this.getOffsetForIndex(t, s)
|
|
448
448
|
);
|
|
449
|
-
|
|
449
|
+
Pn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
450
450
|
} else
|
|
451
|
-
this.scrollToIndex(t, { align:
|
|
451
|
+
this.scrollToIndex(t, { align: s, behavior: l });
|
|
452
452
|
}));
|
|
453
453
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
454
454
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -460,94 +460,94 @@ class Bn {
|
|
|
460
460
|
}, this.getTotalSize = () => {
|
|
461
461
|
var t;
|
|
462
462
|
const n = this.getMeasurements();
|
|
463
|
-
let
|
|
464
|
-
return n.length === 0 ?
|
|
463
|
+
let l;
|
|
464
|
+
return n.length === 0 ? l = this.options.paddingStart : l = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
|
|
465
465
|
...n.slice(-this.options.lanes).map((r) => r.end)
|
|
466
|
-
),
|
|
466
|
+
), l - this.options.scrollMargin + this.options.paddingEnd;
|
|
467
467
|
}, this._scrollToOffset = (t, {
|
|
468
468
|
adjustments: n,
|
|
469
|
-
behavior:
|
|
469
|
+
behavior: l
|
|
470
470
|
}) => {
|
|
471
|
-
this.options.scrollToFn(t, { behavior:
|
|
471
|
+
this.options.scrollToFn(t, { behavior: l, adjustments: n }, this);
|
|
472
472
|
}, this.measure = () => {
|
|
473
473
|
var t, n;
|
|
474
474
|
this.itemSizeCache = /* @__PURE__ */ new Map(), (n = (t = this.options).onChange) == null || n.call(t, this, !1);
|
|
475
475
|
}, this.setOptions(o);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const Vt = (e, o, t, n) => {
|
|
479
479
|
for (; e <= o; ) {
|
|
480
|
-
const
|
|
480
|
+
const l = (e + o) / 2 | 0, r = t(l);
|
|
481
481
|
if (r < n)
|
|
482
|
-
e =
|
|
482
|
+
e = l + 1;
|
|
483
483
|
else if (r > n)
|
|
484
|
-
o =
|
|
484
|
+
o = l - 1;
|
|
485
485
|
else
|
|
486
|
-
return
|
|
486
|
+
return l;
|
|
487
487
|
}
|
|
488
488
|
return e > 0 ? e - 1 : 0;
|
|
489
489
|
};
|
|
490
|
-
function
|
|
490
|
+
function Hn({
|
|
491
491
|
measurements: e,
|
|
492
492
|
outerSize: o,
|
|
493
493
|
scrollOffset: t
|
|
494
494
|
}) {
|
|
495
|
-
const n = e.length - 1, r =
|
|
495
|
+
const n = e.length - 1, r = Vt(0, n, (s) => e[s].start, t);
|
|
496
496
|
let i = r;
|
|
497
497
|
for (; i < n && e[i].end < t + o; )
|
|
498
498
|
i++;
|
|
499
499
|
return { startIndex: r, endIndex: i };
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
const o = new Bn(
|
|
503
|
-
return
|
|
504
|
-
() =>
|
|
505
|
-
(
|
|
506
|
-
|
|
501
|
+
function zn(e) {
|
|
502
|
+
const o = new Bn(T(e)), t = cn(o), n = o._didMount();
|
|
503
|
+
return F(
|
|
504
|
+
() => T(e).getScrollElement(),
|
|
505
|
+
(l) => {
|
|
506
|
+
l && o._willUpdate();
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
immediate: !0
|
|
510
510
|
}
|
|
511
|
-
),
|
|
512
|
-
() =>
|
|
513
|
-
(
|
|
511
|
+
), F(
|
|
512
|
+
() => T(e),
|
|
513
|
+
(l) => {
|
|
514
514
|
o.setOptions({
|
|
515
|
-
...
|
|
515
|
+
...l,
|
|
516
516
|
onChange: (r, i) => {
|
|
517
|
-
var
|
|
518
|
-
it(t), (
|
|
517
|
+
var s;
|
|
518
|
+
it(t), (s = l.onChange) == null || s.call(l, r, i);
|
|
519
519
|
}
|
|
520
520
|
}), o._willUpdate(), it(t);
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
immediate: !0
|
|
524
524
|
}
|
|
525
|
-
),
|
|
526
|
-
}
|
|
527
|
-
function
|
|
528
|
-
return
|
|
529
|
-
|
|
530
|
-
observeElementRect:
|
|
531
|
-
observeElementOffset:
|
|
532
|
-
scrollToFn:
|
|
533
|
-
...
|
|
525
|
+
), Xe(n), t;
|
|
526
|
+
}
|
|
527
|
+
function Un(e) {
|
|
528
|
+
return zn(
|
|
529
|
+
y(() => ({
|
|
530
|
+
observeElementRect: Nn,
|
|
531
|
+
observeElementOffset: An,
|
|
532
|
+
scrollToFn: jn,
|
|
533
|
+
...T(e)
|
|
534
534
|
}))
|
|
535
535
|
);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
let n = E(t == null ? void 0 : t.value),
|
|
539
|
-
return [
|
|
540
|
-
return
|
|
537
|
+
function Zn(e, o, t) {
|
|
538
|
+
let n = E(t == null ? void 0 : t.value), l = y(() => e.value !== void 0);
|
|
539
|
+
return [y(() => l.value ? e.value : n.value), function(r) {
|
|
540
|
+
return l.value || (n.value = r), o == null ? void 0 : o(r);
|
|
541
541
|
}];
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Wn(e) {
|
|
544
544
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
|
|
545
545
|
throw o;
|
|
546
546
|
}));
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
let e = [], o = { addEventListener(t, n,
|
|
550
|
-
return t.addEventListener(n,
|
|
548
|
+
function De() {
|
|
549
|
+
let e = [], o = { addEventListener(t, n, l, r) {
|
|
550
|
+
return t.addEventListener(n, l, r), o.add(() => t.removeEventListener(n, l, r));
|
|
551
551
|
}, requestAnimationFrame(...t) {
|
|
552
552
|
let n = requestAnimationFrame(...t);
|
|
553
553
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -560,59 +560,59 @@ function Ae() {
|
|
|
560
560
|
o.add(() => clearTimeout(n));
|
|
561
561
|
}, microTask(...t) {
|
|
562
562
|
let n = { current: !0 };
|
|
563
|
-
return
|
|
563
|
+
return Wn(() => {
|
|
564
564
|
n.current && t[0]();
|
|
565
565
|
}), o.add(() => {
|
|
566
566
|
n.current = !1;
|
|
567
567
|
});
|
|
568
|
-
}, style(t, n,
|
|
568
|
+
}, style(t, n, l) {
|
|
569
569
|
let r = t.style.getPropertyValue(n);
|
|
570
|
-
return Object.assign(t.style, { [n]:
|
|
570
|
+
return Object.assign(t.style, { [n]: l }), this.add(() => {
|
|
571
571
|
Object.assign(t.style, { [n]: r });
|
|
572
572
|
});
|
|
573
573
|
}, group(t) {
|
|
574
|
-
let n =
|
|
574
|
+
let n = De();
|
|
575
575
|
return t(n), this.add(() => n.dispose());
|
|
576
576
|
}, add(t) {
|
|
577
577
|
return e.push(t), () => {
|
|
578
578
|
let n = e.indexOf(t);
|
|
579
|
-
if (n >= 0) for (let
|
|
579
|
+
if (n >= 0) for (let l of e.splice(n, 1)) l();
|
|
580
580
|
};
|
|
581
581
|
}, dispose() {
|
|
582
582
|
for (let t of e.splice(0)) t();
|
|
583
583
|
} };
|
|
584
584
|
return o;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
let e =
|
|
588
|
-
return
|
|
586
|
+
function Gn() {
|
|
587
|
+
let e = De();
|
|
588
|
+
return wt(() => e.dispose()), e;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
591
|
-
let e =
|
|
590
|
+
function qn() {
|
|
591
|
+
let e = Gn();
|
|
592
592
|
return (o) => {
|
|
593
593
|
e.dispose(), e.nextFrame(o);
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
|
-
let
|
|
597
|
-
function
|
|
598
|
-
return
|
|
596
|
+
let Jn = Symbol("headlessui.useid"), Kn = 0;
|
|
597
|
+
function Te() {
|
|
598
|
+
return Le(Jn, () => `${++Kn}`)();
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function M(e) {
|
|
601
601
|
var o;
|
|
602
602
|
if (e == null || e.value == null) return null;
|
|
603
603
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
604
604
|
return t instanceof Node ? t : null;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function le(e, o, ...t) {
|
|
607
607
|
if (e in o) {
|
|
608
|
-
let
|
|
609
|
-
return typeof
|
|
608
|
+
let l = o[e];
|
|
609
|
+
return typeof l == "function" ? l(...t) : l;
|
|
610
610
|
}
|
|
611
|
-
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((
|
|
612
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
611
|
+
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((l) => `"${l}"`).join(", ")}.`);
|
|
612
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, le), n;
|
|
613
613
|
}
|
|
614
|
-
var
|
|
615
|
-
let
|
|
614
|
+
var Yn = Object.defineProperty, Qn = (e, o, t) => o in e ? Yn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, ct = (e, o, t) => (Qn(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
615
|
+
let Xn = class {
|
|
616
616
|
constructor() {
|
|
617
617
|
ct(this, "current", this.detect()), ct(this, "currentId", 0);
|
|
618
618
|
}
|
|
@@ -634,21 +634,21 @@ let Zn = class {
|
|
|
634
634
|
detect() {
|
|
635
635
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
636
636
|
}
|
|
637
|
-
}, nt = new
|
|
637
|
+
}, nt = new Xn();
|
|
638
638
|
function ot(e) {
|
|
639
639
|
if (nt.isServer) return null;
|
|
640
640
|
if (e instanceof Node) return e.ownerDocument;
|
|
641
641
|
if (e != null && e.hasOwnProperty("value")) {
|
|
642
|
-
let o =
|
|
642
|
+
let o = M(e);
|
|
643
643
|
if (o) return o.ownerDocument;
|
|
644
644
|
}
|
|
645
645
|
return document;
|
|
646
646
|
}
|
|
647
647
|
let dt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
648
|
-
var eo = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(eo || {}), to = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(to || {}), no = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(no || {}),
|
|
648
|
+
var eo = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(eo || {}), to = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(to || {}), no = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(no || {}), Pt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Pt || {});
|
|
649
649
|
function oo(e, o = 0) {
|
|
650
650
|
var t;
|
|
651
|
-
return e === ((t = ot(e)) == null ? void 0 : t.body) ? !1 :
|
|
651
|
+
return e === ((t = ot(e)) == null ? void 0 : t.body) ? !1 : le(o, { 0() {
|
|
652
652
|
return e.matches(dt);
|
|
653
653
|
}, 1() {
|
|
654
654
|
let n = e;
|
|
@@ -659,17 +659,17 @@ function oo(e, o = 0) {
|
|
|
659
659
|
return !1;
|
|
660
660
|
} });
|
|
661
661
|
}
|
|
662
|
-
var
|
|
662
|
+
var lo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(lo || {});
|
|
663
663
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
664
664
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
665
665
|
}, !0), document.addEventListener("click", (e) => {
|
|
666
666
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
667
667
|
}, !0));
|
|
668
|
-
function
|
|
668
|
+
function so(e, o = (t) => t) {
|
|
669
669
|
return e.slice().sort((t, n) => {
|
|
670
|
-
let
|
|
671
|
-
if (
|
|
672
|
-
let i =
|
|
670
|
+
let l = o(t), r = o(n);
|
|
671
|
+
if (l === null || r === null) return 0;
|
|
672
|
+
let i = l.compareDocumentPosition(r);
|
|
673
673
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
674
674
|
});
|
|
675
675
|
}
|
|
@@ -679,10 +679,10 @@ function ro() {
|
|
|
679
679
|
function io() {
|
|
680
680
|
return /Android/gi.test(window.navigator.userAgent);
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Mt() {
|
|
683
683
|
return ro() || io();
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Pe(e, o, t) {
|
|
686
686
|
nt.isServer || ie((n) => {
|
|
687
687
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
688
688
|
});
|
|
@@ -692,31 +692,31 @@ function ao(e, o, t) {
|
|
|
692
692
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
|
-
function uo(e, o, t =
|
|
695
|
+
function uo(e, o, t = y(() => !0)) {
|
|
696
696
|
function n(r, i) {
|
|
697
697
|
if (!t.value || r.defaultPrevented) return;
|
|
698
|
-
let
|
|
699
|
-
if (
|
|
700
|
-
let a = function u(
|
|
701
|
-
return typeof
|
|
698
|
+
let s = i(r);
|
|
699
|
+
if (s === null || !s.getRootNode().contains(s)) return;
|
|
700
|
+
let a = function u(v) {
|
|
701
|
+
return typeof v == "function" ? u(v()) : Array.isArray(v) || v instanceof Set ? v : [v];
|
|
702
702
|
}(e);
|
|
703
703
|
for (let u of a) {
|
|
704
704
|
if (u === null) continue;
|
|
705
|
-
let
|
|
706
|
-
if (
|
|
705
|
+
let v = u instanceof HTMLElement ? u : M(u);
|
|
706
|
+
if (v != null && v.contains(s) || r.composed && r.composedPath().includes(v)) return;
|
|
707
707
|
}
|
|
708
|
-
return !oo(
|
|
709
|
-
}
|
|
710
|
-
let
|
|
711
|
-
|
|
712
|
-
var i,
|
|
713
|
-
t.value && (
|
|
714
|
-
}, !0),
|
|
715
|
-
var i,
|
|
716
|
-
t.value && (
|
|
717
|
-
}, !0),
|
|
718
|
-
|
|
719
|
-
}, !0),
|
|
708
|
+
return !oo(s, Pt.Loose) && s.tabIndex !== -1 && r.preventDefault(), o(r, s);
|
|
709
|
+
}
|
|
710
|
+
let l = E(null);
|
|
711
|
+
Pe("pointerdown", (r) => {
|
|
712
|
+
var i, s;
|
|
713
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
714
|
+
}, !0), Pe("mousedown", (r) => {
|
|
715
|
+
var i, s;
|
|
716
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
717
|
+
}, !0), Pe("click", (r) => {
|
|
718
|
+
Mt() || l.value && (n(r, () => l.value), l.value = null);
|
|
719
|
+
}, !0), Pe("touchend", (r) => n(r, () => r.target instanceof HTMLElement ? r.target : null), !0), ao("blur", (r) => n(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
720
720
|
}
|
|
721
721
|
function ft(e, o) {
|
|
722
722
|
if (e) return e;
|
|
@@ -725,87 +725,87 @@ function ft(e, o) {
|
|
|
725
725
|
}
|
|
726
726
|
function co(e, o) {
|
|
727
727
|
let t = E(ft(e.value.type, e.value.as));
|
|
728
|
-
return
|
|
728
|
+
return ve(() => {
|
|
729
729
|
t.value = ft(e.value.type, e.value.as);
|
|
730
730
|
}), ie(() => {
|
|
731
731
|
var n;
|
|
732
|
-
t.value ||
|
|
732
|
+
t.value || M(o) && M(o) instanceof HTMLButtonElement && !((n = M(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
733
733
|
}), t;
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function vt(e) {
|
|
736
736
|
return [e.screenX, e.screenY];
|
|
737
737
|
}
|
|
738
738
|
function fo() {
|
|
739
739
|
let e = E([-1, -1]);
|
|
740
740
|
return { wasMoved(o) {
|
|
741
|
-
let t =
|
|
741
|
+
let t = vt(o);
|
|
742
742
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
743
743
|
}, update(o) {
|
|
744
|
-
e.value =
|
|
744
|
+
e.value = vt(o);
|
|
745
745
|
} };
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function vo({ container: e, accept: o, walk: t, enabled: n }) {
|
|
748
748
|
ie(() => {
|
|
749
|
-
let
|
|
750
|
-
if (!
|
|
749
|
+
let l = e.value;
|
|
750
|
+
if (!l || n !== void 0 && !n.value) return;
|
|
751
751
|
let r = ot(e);
|
|
752
752
|
if (!r) return;
|
|
753
|
-
let i = Object.assign((a) => o(a), { acceptNode: o }),
|
|
754
|
-
for (;
|
|
753
|
+
let i = Object.assign((a) => o(a), { acceptNode: o }), s = r.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
754
|
+
for (; s.nextNode(); ) t(s.currentNode);
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
|
-
var
|
|
758
|
-
function
|
|
757
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), po = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(po || {});
|
|
758
|
+
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
759
759
|
var r;
|
|
760
|
-
let i =
|
|
761
|
-
if (e || o & 2 && i.static) return
|
|
760
|
+
let i = Rt(n, t), s = Object.assign(l, { props: i });
|
|
761
|
+
if (e || o & 2 && i.static) return Ge(s);
|
|
762
762
|
if (o & 1) {
|
|
763
763
|
let a = (r = i.unmount) == null || r ? 0 : 1;
|
|
764
|
-
return
|
|
764
|
+
return le(a, { 0() {
|
|
765
765
|
return null;
|
|
766
766
|
}, 1() {
|
|
767
|
-
return
|
|
767
|
+
return Ge({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
768
768
|
} });
|
|
769
769
|
}
|
|
770
|
-
return
|
|
770
|
+
return Ge(s);
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function Ge({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
773
773
|
var r, i;
|
|
774
|
-
let { as:
|
|
774
|
+
let { as: s, ...a } = je(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), v = {};
|
|
775
775
|
if (n) {
|
|
776
|
-
let c = !1,
|
|
777
|
-
for (let [m,
|
|
778
|
-
c && (
|
|
779
|
-
}
|
|
780
|
-
if (
|
|
781
|
-
if (u =
|
|
782
|
-
let [c, ...
|
|
783
|
-
if (!mo(c) ||
|
|
784
|
-
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((
|
|
776
|
+
let c = !1, p = [];
|
|
777
|
+
for (let [m, h] of Object.entries(n)) typeof h == "boolean" && (c = !0), h === !0 && p.push(m);
|
|
778
|
+
c && (v["data-headlessui-state"] = p.join(" "));
|
|
779
|
+
}
|
|
780
|
+
if (s === "template") {
|
|
781
|
+
if (u = kt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
782
|
+
let [c, ...p] = u ?? [];
|
|
783
|
+
if (!mo(c) || p.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(a).concat(Object.keys(o)).map(($) => $.trim()).filter(($, N, L) => L.indexOf($) === N).sort(($, N) => $.localeCompare(N)).map(($) => ` - ${$}`).join(`
|
|
784
|
+
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map(($) => ` - ${$}`).join(`
|
|
785
785
|
`)].join(`
|
|
786
786
|
`));
|
|
787
|
-
let m =
|
|
788
|
-
for (let
|
|
789
|
-
return
|
|
787
|
+
let m = Rt((i = c.props) != null ? i : {}, a, v), h = Et(c, m, !0);
|
|
788
|
+
for (let $ in m) $.startsWith("on") && (h.props || (h.props = {}), h.props[$] = m[$]);
|
|
789
|
+
return h;
|
|
790
790
|
}
|
|
791
791
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
792
792
|
}
|
|
793
|
-
return
|
|
793
|
+
return Se(s, Object.assign({}, a, v), { default: () => u });
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
return e.flatMap((o) => o.type ===
|
|
795
|
+
function kt(e) {
|
|
796
|
+
return e.flatMap((o) => o.type === W ? kt(o.children) : [o]);
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function Rt(...e) {
|
|
799
799
|
if (e.length === 0) return {};
|
|
800
800
|
if (e.length === 1) return e[0];
|
|
801
801
|
let o = {}, t = {};
|
|
802
|
-
for (let n of e) for (let
|
|
802
|
+
for (let n of e) for (let l in n) l.startsWith("on") && typeof n[l] == "function" ? (t[l] != null || (t[l] = []), t[l].push(n[l])) : o[l] = n[l];
|
|
803
803
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
804
|
-
for (let n in t) Object.assign(o, { [n](
|
|
804
|
+
for (let n in t) Object.assign(o, { [n](l, ...r) {
|
|
805
805
|
let i = t[n];
|
|
806
|
-
for (let
|
|
807
|
-
if (
|
|
808
|
-
l
|
|
806
|
+
for (let s of i) {
|
|
807
|
+
if (l instanceof Event && l.defaultPrevented) return;
|
|
808
|
+
s(l, ...r);
|
|
809
809
|
}
|
|
810
810
|
} });
|
|
811
811
|
return o;
|
|
@@ -815,7 +815,7 @@ function ho(e) {
|
|
|
815
815
|
for (let t in o) o[t] === void 0 && delete o[t];
|
|
816
816
|
return o;
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function je(e, o = []) {
|
|
819
819
|
let t = Object.assign({}, e);
|
|
820
820
|
for (let n of o) n in t && delete t[n];
|
|
821
821
|
return t;
|
|
@@ -823,30 +823,30 @@ function Fe(e, o = []) {
|
|
|
823
823
|
function mo(e) {
|
|
824
824
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
825
825
|
}
|
|
826
|
-
var
|
|
826
|
+
var Nt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Nt || {});
|
|
827
827
|
let go = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
828
828
|
return () => {
|
|
829
829
|
var n;
|
|
830
|
-
let { features:
|
|
831
|
-
return
|
|
830
|
+
let { features: l, ...r } = e, i = { "aria-hidden": (l & 2) === 2 ? !0 : (n = r["aria-hidden"]) != null ? n : void 0, hidden: (l & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(l & 4) === 4 && (l & 2) !== 2 && { display: "none" } } };
|
|
831
|
+
return pe({ ourProps: i, theirProps: r, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
832
832
|
};
|
|
833
|
-
} }),
|
|
834
|
-
var
|
|
833
|
+
} }), Dt = Symbol("Context");
|
|
834
|
+
var $e = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))($e || {});
|
|
835
835
|
function bo() {
|
|
836
|
-
return
|
|
836
|
+
return Le(Dt, null);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
et(
|
|
838
|
+
function Co(e) {
|
|
839
|
+
et(Dt, e);
|
|
840
840
|
}
|
|
841
|
-
var
|
|
842
|
-
function
|
|
841
|
+
var Z = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(Z || {}), At = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(At || {});
|
|
842
|
+
function _o(e) {
|
|
843
843
|
function o() {
|
|
844
844
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
845
845
|
}
|
|
846
846
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
|
|
847
847
|
}
|
|
848
848
|
let ce = [];
|
|
849
|
-
|
|
849
|
+
_o(() => {
|
|
850
850
|
function e(o) {
|
|
851
851
|
o.target instanceof HTMLElement && o.target !== document.body && ce[0] !== o.target && (ce.unshift(o.target), ce = ce.filter((t) => t != null && t.isConnected), ce.splice(10));
|
|
852
852
|
}
|
|
@@ -855,23 +855,23 @@ yo(() => {
|
|
|
855
855
|
function xo(e) {
|
|
856
856
|
throw new Error("Unexpected object: " + e);
|
|
857
857
|
}
|
|
858
|
-
var
|
|
859
|
-
function
|
|
858
|
+
var z = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(z || {});
|
|
859
|
+
function pt(e, o) {
|
|
860
860
|
let t = o.resolveItems();
|
|
861
861
|
if (t.length <= 0) return null;
|
|
862
|
-
let n = o.resolveActiveIndex(),
|
|
862
|
+
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
863
863
|
switch (e.focus) {
|
|
864
864
|
case 0: {
|
|
865
865
|
for (let r = 0; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
866
866
|
return n;
|
|
867
867
|
}
|
|
868
868
|
case 1: {
|
|
869
|
-
|
|
870
|
-
for (let r =
|
|
869
|
+
l === -1 && (l = t.length);
|
|
870
|
+
for (let r = l - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
871
871
|
return n;
|
|
872
872
|
}
|
|
873
873
|
case 2: {
|
|
874
|
-
for (let r =
|
|
874
|
+
for (let r = l + 1; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
875
875
|
return n;
|
|
876
876
|
}
|
|
877
877
|
case 3: {
|
|
@@ -888,366 +888,366 @@ function vt(e, o) {
|
|
|
888
888
|
xo(e);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
function
|
|
892
|
-
for (let [n,
|
|
891
|
+
function Ft(e = {}, o = null, t = []) {
|
|
892
|
+
for (let [n, l] of Object.entries(e)) Bt(t, jt(o, n), l);
|
|
893
893
|
return t;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function jt(e, o) {
|
|
896
896
|
return e ? e + "[" + o + "]" : o;
|
|
897
897
|
}
|
|
898
898
|
function Bt(e, o, t) {
|
|
899
|
-
if (Array.isArray(t)) for (let [n,
|
|
900
|
-
else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) :
|
|
899
|
+
if (Array.isArray(t)) for (let [n, l] of t.entries()) Bt(e, jt(o, n.toString()), l);
|
|
900
|
+
else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : Ft(t, o, e);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function yo(e, o) {
|
|
903
903
|
return e === o;
|
|
904
904
|
}
|
|
905
|
-
var
|
|
906
|
-
let
|
|
905
|
+
var wo = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(wo || {}), Eo = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Eo || {}), So = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(So || {});
|
|
906
|
+
let Ht = Symbol("ComboboxContext");
|
|
907
907
|
function he(e) {
|
|
908
|
-
let o =
|
|
908
|
+
let o = Le(Ht, null);
|
|
909
909
|
if (o === null) {
|
|
910
910
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
911
911
|
throw Error.captureStackTrace && Error.captureStackTrace(t, he), t;
|
|
912
912
|
}
|
|
913
913
|
return o;
|
|
914
914
|
}
|
|
915
|
-
let
|
|
916
|
-
let t = he("VirtualProvider"), n =
|
|
917
|
-
let
|
|
918
|
-
if (!
|
|
919
|
-
let a = window.getComputedStyle(
|
|
915
|
+
let zt = Symbol("VirtualContext"), Oo = ae({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
916
|
+
let t = he("VirtualProvider"), n = y(() => {
|
|
917
|
+
let s = M(t.optionsRef);
|
|
918
|
+
if (!s) return { start: 0, end: 0 };
|
|
919
|
+
let a = window.getComputedStyle(s);
|
|
920
920
|
return { start: parseFloat(a.paddingBlockStart || a.paddingTop), end: parseFloat(a.paddingBlockEnd || a.paddingBottom) };
|
|
921
|
-
}),
|
|
921
|
+
}), l = Un(y(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
922
922
|
return 40;
|
|
923
923
|
}, getScrollElement() {
|
|
924
|
-
return
|
|
925
|
-
}, overscan: 12 }))), r =
|
|
926
|
-
var
|
|
927
|
-
return (
|
|
924
|
+
return M(t.optionsRef);
|
|
925
|
+
}, overscan: 12 }))), r = y(() => {
|
|
926
|
+
var s;
|
|
927
|
+
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
928
928
|
}), i = E(0);
|
|
929
|
-
return
|
|
929
|
+
return F([r], () => {
|
|
930
930
|
i.value += 1;
|
|
931
|
-
}), et(
|
|
932
|
-
if (
|
|
931
|
+
}), et(zt, t.virtual.value ? l : null), () => [Se("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
932
|
+
if (s) {
|
|
933
933
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
934
|
-
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value &&
|
|
934
|
+
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
935
935
|
}
|
|
936
|
-
} },
|
|
937
|
-
} }),
|
|
938
|
-
let
|
|
939
|
-
function
|
|
940
|
-
let f = c.value !== null ?
|
|
941
|
-
return
|
|
942
|
-
}
|
|
943
|
-
let
|
|
944
|
-
function
|
|
945
|
-
return
|
|
946
|
-
return
|
|
936
|
+
} }, l.value.getVirtualItems().map((s) => Et(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${i.value}-${s.index}`, "data-index": s.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": s.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${s.start}px)`, overflowAnchor: "none" } })))];
|
|
937
|
+
} }), $o = ae({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: o, attrs: t, emit: n }) {
|
|
938
|
+
let l = E(1), r = E(null), i = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), v = E([]), c = E(null), p = E(2), m = E(!1);
|
|
939
|
+
function h(d = (f) => f) {
|
|
940
|
+
let f = c.value !== null ? v.value[c.value] : null, x = d(v.value.slice()), S = x.length > 0 && x[0].dataRef.order.value !== null ? x.sort((D, G) => D.dataRef.order.value - G.dataRef.order.value) : so(x, (D) => M(D.dataRef.domRef)), k = f ? S.indexOf(f) : null;
|
|
941
|
+
return k === -1 && (k = null), { options: S, activeOptionIndex: k };
|
|
942
|
+
}
|
|
943
|
+
let $ = y(() => e.multiple ? 1 : 0), N = y(() => e.nullable), [L, I] = Zn(y(() => e.modelValue), (d) => n("update:modelValue", d), y(() => e.defaultValue)), R = y(() => L.value === void 0 ? le($.value, { 1: [], 0: void 0 }) : L.value), A = null, _ = null;
|
|
944
|
+
function P(d) {
|
|
945
|
+
return le($.value, { 0() {
|
|
946
|
+
return I == null ? void 0 : I(d);
|
|
947
947
|
}, 1: () => {
|
|
948
|
-
let f =
|
|
949
|
-
return
|
|
948
|
+
let f = K(b.value.value).slice(), x = K(d), S = f.findIndex((k) => b.compare(x, K(k)));
|
|
949
|
+
return S === -1 ? f.push(x) : f.splice(S, 1), I == null ? void 0 : I(f);
|
|
950
950
|
} });
|
|
951
951
|
}
|
|
952
|
-
let
|
|
952
|
+
let C = y(() => {
|
|
953
953
|
});
|
|
954
|
-
|
|
954
|
+
F([C], ([d], [f]) => {
|
|
955
955
|
if (b.virtual.value && d && f && c.value !== null) {
|
|
956
956
|
let x = d.indexOf(f[c.value]);
|
|
957
957
|
x !== -1 ? c.value = x : c.value = null;
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
|
-
let b = { comboboxState:
|
|
960
|
+
let b = { comboboxState: l, value: R, mode: $, compare(d, f) {
|
|
961
961
|
if (typeof e.by == "string") {
|
|
962
962
|
let x = e.by;
|
|
963
963
|
return (d == null ? void 0 : d[x]) === (f == null ? void 0 : f[x]);
|
|
964
964
|
}
|
|
965
|
-
return e.by === null ?
|
|
965
|
+
return e.by === null ? yo(d, f) : e.by(d, f);
|
|
966
966
|
}, calculateIndex(d) {
|
|
967
|
-
return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(d) : b.virtual.value.options.findIndex((f) => b.compare(f, d)) :
|
|
968
|
-
}, defaultValue:
|
|
969
|
-
|
|
970
|
-
}, activeOptionIndex:
|
|
971
|
-
if (m.value && c.value === null && (b.virtual.value ? b.virtual.value.options.length > 0 :
|
|
967
|
+
return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(d) : b.virtual.value.options.findIndex((f) => b.compare(f, d)) : v.value.findIndex((f) => b.compare(f.dataRef.value, d));
|
|
968
|
+
}, defaultValue: y(() => e.defaultValue), nullable: N, immediate: y(() => !1), virtual: y(() => null), inputRef: i, labelRef: r, buttonRef: s, optionsRef: a, disabled: y(() => e.disabled), options: v, change(d) {
|
|
969
|
+
I(d);
|
|
970
|
+
}, activeOptionIndex: y(() => {
|
|
971
|
+
if (m.value && c.value === null && (b.virtual.value ? b.virtual.value.options.length > 0 : v.value.length > 0)) {
|
|
972
972
|
if (b.virtual.value) {
|
|
973
973
|
let f = b.virtual.value.options.findIndex((x) => {
|
|
974
|
-
var
|
|
975
|
-
return !((
|
|
974
|
+
var S;
|
|
975
|
+
return !((S = b.virtual.value) != null && S.disabled(x));
|
|
976
976
|
});
|
|
977
977
|
if (f !== -1) return f;
|
|
978
978
|
}
|
|
979
|
-
let d =
|
|
979
|
+
let d = v.value.findIndex((f) => !f.dataRef.disabled);
|
|
980
980
|
if (d !== -1) return d;
|
|
981
981
|
}
|
|
982
982
|
return c.value;
|
|
983
|
-
}), activationTrigger:
|
|
984
|
-
m.value = !1, !e.disabled &&
|
|
983
|
+
}), activationTrigger: p, optionsPropsRef: u, closeCombobox() {
|
|
984
|
+
m.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, c.value = null);
|
|
985
985
|
}, openCombobox() {
|
|
986
|
-
if (m.value = !0, !e.disabled &&
|
|
986
|
+
if (m.value = !0, !e.disabled && l.value !== 0) {
|
|
987
987
|
if (b.value.value) {
|
|
988
988
|
let d = b.calculateIndex(b.value.value);
|
|
989
989
|
d !== -1 && (c.value = d);
|
|
990
990
|
}
|
|
991
|
-
|
|
991
|
+
l.value = 0;
|
|
992
992
|
}
|
|
993
993
|
}, setActivationTrigger(d) {
|
|
994
|
-
|
|
994
|
+
p.value = d;
|
|
995
995
|
}, goToOption(d, f, x) {
|
|
996
|
-
m.value = !1,
|
|
997
|
-
if (e.disabled || a.value && !u.value.static &&
|
|
996
|
+
m.value = !1, A !== null && cancelAnimationFrame(A), A = requestAnimationFrame(() => {
|
|
997
|
+
if (e.disabled || a.value && !u.value.static && l.value === 1) return;
|
|
998
998
|
if (b.virtual.value) {
|
|
999
|
-
c.value = d ===
|
|
1000
|
-
var
|
|
1001
|
-
return (
|
|
1002
|
-
var
|
|
1003
|
-
return !((
|
|
1004
|
-
})) != null ?
|
|
1005
|
-
}, resolveDisabled: (
|
|
999
|
+
c.value = d === z.Specific ? f : pt({ focus: d }, { resolveItems: () => b.virtual.value.options, resolveActiveIndex: () => {
|
|
1000
|
+
var D, G;
|
|
1001
|
+
return (G = (D = b.activeOptionIndex.value) != null ? D : b.virtual.value.options.findIndex((q) => {
|
|
1002
|
+
var j;
|
|
1003
|
+
return !((j = b.virtual.value) != null && j.disabled(q));
|
|
1004
|
+
})) != null ? G : null;
|
|
1005
|
+
}, resolveDisabled: (D) => b.virtual.value.disabled(D), resolveId() {
|
|
1006
1006
|
throw new Error("Function not implemented.");
|
|
1007
|
-
} }),
|
|
1007
|
+
} }), p.value = x ?? 2;
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
|
-
let
|
|
1011
|
-
if (
|
|
1012
|
-
let
|
|
1013
|
-
|
|
1010
|
+
let S = h();
|
|
1011
|
+
if (S.activeOptionIndex === null) {
|
|
1012
|
+
let D = S.options.findIndex((G) => !G.dataRef.disabled);
|
|
1013
|
+
D !== -1 && (S.activeOptionIndex = D);
|
|
1014
1014
|
}
|
|
1015
|
-
let
|
|
1016
|
-
c.value =
|
|
1015
|
+
let k = d === z.Specific ? f : pt({ focus: d }, { resolveItems: () => S.options, resolveActiveIndex: () => S.activeOptionIndex, resolveId: (D) => D.id, resolveDisabled: (D) => D.dataRef.disabled });
|
|
1016
|
+
c.value = k, p.value = x ?? 2, v.value = S.options;
|
|
1017
1017
|
});
|
|
1018
1018
|
}, selectOption(d) {
|
|
1019
|
-
let f =
|
|
1019
|
+
let f = v.value.find((S) => S.id === d);
|
|
1020
1020
|
if (!f) return;
|
|
1021
1021
|
let { dataRef: x } = f;
|
|
1022
|
-
|
|
1022
|
+
P(x.value);
|
|
1023
1023
|
}, selectActiveOption() {
|
|
1024
1024
|
if (b.activeOptionIndex.value !== null) {
|
|
1025
|
-
if (b.virtual.value)
|
|
1025
|
+
if (b.virtual.value) P(b.virtual.value.options[b.activeOptionIndex.value]);
|
|
1026
1026
|
else {
|
|
1027
|
-
let { dataRef: d } =
|
|
1028
|
-
|
|
1027
|
+
let { dataRef: d } = v.value[b.activeOptionIndex.value];
|
|
1028
|
+
P(d.value);
|
|
1029
1029
|
}
|
|
1030
|
-
b.goToOption(
|
|
1030
|
+
b.goToOption(z.Specific, b.activeOptionIndex.value);
|
|
1031
1031
|
}
|
|
1032
1032
|
}, registerOption(d, f) {
|
|
1033
|
-
let x =
|
|
1033
|
+
let x = St({ id: d, dataRef: f });
|
|
1034
1034
|
if (b.virtual.value) {
|
|
1035
|
-
|
|
1035
|
+
v.value.push(x);
|
|
1036
1036
|
return;
|
|
1037
1037
|
}
|
|
1038
|
-
|
|
1039
|
-
let
|
|
1040
|
-
c.value === null && b.isSelected(f.value.value) && (
|
|
1041
|
-
let
|
|
1042
|
-
|
|
1038
|
+
_ && cancelAnimationFrame(_);
|
|
1039
|
+
let S = h((k) => (k.push(x), k));
|
|
1040
|
+
c.value === null && b.isSelected(f.value.value) && (S.activeOptionIndex = S.options.indexOf(x)), v.value = S.options, c.value = S.activeOptionIndex, p.value = 2, S.options.some((k) => !M(k.dataRef.domRef)) && (_ = requestAnimationFrame(() => {
|
|
1041
|
+
let k = h();
|
|
1042
|
+
v.value = k.options, c.value = k.activeOptionIndex;
|
|
1043
1043
|
}));
|
|
1044
1044
|
}, unregisterOption(d, f) {
|
|
1045
|
-
if (
|
|
1046
|
-
|
|
1045
|
+
if (A !== null && cancelAnimationFrame(A), f && (m.value = !0), b.virtual.value) {
|
|
1046
|
+
v.value = v.value.filter((S) => S.id !== d);
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
let x =
|
|
1050
|
-
let
|
|
1051
|
-
return
|
|
1049
|
+
let x = h((S) => {
|
|
1050
|
+
let k = S.findIndex((D) => D.id === d);
|
|
1051
|
+
return k !== -1 && S.splice(k, 1), S;
|
|
1052
1052
|
});
|
|
1053
|
-
|
|
1053
|
+
v.value = x.options, c.value = x.activeOptionIndex, p.value = 2;
|
|
1054
1054
|
}, isSelected(d) {
|
|
1055
|
-
return
|
|
1055
|
+
return le($.value, { 0: () => b.compare(K(b.value.value), K(d)), 1: () => K(b.value.value).some((f) => b.compare(K(f), K(d))) });
|
|
1056
1056
|
}, isActive(d) {
|
|
1057
1057
|
return c.value === b.calculateIndex(d);
|
|
1058
1058
|
} };
|
|
1059
|
-
uo([i,
|
|
1060
|
-
let
|
|
1059
|
+
uo([i, s, a], () => b.closeCombobox(), y(() => l.value === 0)), et(Ht, b), Co(y(() => le(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1060
|
+
let V = y(() => {
|
|
1061
1061
|
var d;
|
|
1062
|
-
return (d =
|
|
1062
|
+
return (d = M(i)) == null ? void 0 : d.closest("form");
|
|
1063
1063
|
});
|
|
1064
|
-
return
|
|
1065
|
-
|
|
1066
|
-
if (!
|
|
1064
|
+
return ve(() => {
|
|
1065
|
+
F([V], () => {
|
|
1066
|
+
if (!V.value || e.defaultValue === void 0) return;
|
|
1067
1067
|
function d() {
|
|
1068
1068
|
b.change(e.defaultValue);
|
|
1069
1069
|
}
|
|
1070
|
-
return
|
|
1070
|
+
return V.value.addEventListener("reset", d), () => {
|
|
1071
1071
|
var f;
|
|
1072
|
-
(f =
|
|
1072
|
+
(f = V.value) == null || f.removeEventListener("reset", d);
|
|
1073
1073
|
};
|
|
1074
1074
|
}, { immediate: !0 });
|
|
1075
1075
|
}), () => {
|
|
1076
1076
|
var d, f, x;
|
|
1077
|
-
let { name:
|
|
1078
|
-
return
|
|
1077
|
+
let { name: S, disabled: k, form: D, ...G } = e, q = { open: l.value === 0, disabled: k, activeIndex: b.activeOptionIndex.value, activeOption: b.activeOptionIndex.value === null ? null : b.virtual.value ? b.virtual.value.options[(d = b.activeOptionIndex.value) != null ? d : 0] : (x = (f = b.options.value[b.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? x : null, value: R.value };
|
|
1078
|
+
return Se(W, [...S != null && R.value != null ? Ft({ [S]: R.value }).map(([j, un]) => Se(go, ho({ features: Nt.Hidden, key: j, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: D, disabled: k, name: j, value: un }))) : [], pe({ theirProps: { ...t, ...je(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1079
1079
|
};
|
|
1080
1080
|
} });
|
|
1081
1081
|
ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1082
1082
|
var n;
|
|
1083
|
-
let
|
|
1083
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Te()}`, r = he("ComboboxLabel");
|
|
1084
1084
|
function i() {
|
|
1085
|
-
var
|
|
1086
|
-
(
|
|
1085
|
+
var s;
|
|
1086
|
+
(s = M(r.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1087
1087
|
}
|
|
1088
1088
|
return () => {
|
|
1089
|
-
let
|
|
1090
|
-
return
|
|
1089
|
+
let s = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...a } = e, u = { id: l, ref: r.labelRef, onClick: i };
|
|
1090
|
+
return pe({ ourProps: u, theirProps: a, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1091
1091
|
};
|
|
1092
1092
|
} });
|
|
1093
|
-
let
|
|
1094
|
-
var
|
|
1095
|
-
let r = (
|
|
1093
|
+
let Io = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1094
|
+
var l;
|
|
1095
|
+
let r = (l = e.id) != null ? l : `headlessui-combobox-button-${Te()}`, i = he("ComboboxButton");
|
|
1096
1096
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1097
|
-
function
|
|
1098
|
-
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (
|
|
1097
|
+
function s(v) {
|
|
1098
|
+
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (v.preventDefault(), i.openCombobox()), te(() => {
|
|
1099
1099
|
var c;
|
|
1100
|
-
return (c =
|
|
1100
|
+
return (c = M(i.inputRef)) == null ? void 0 : c.focus({ preventScroll: !0 });
|
|
1101
1101
|
}));
|
|
1102
1102
|
}
|
|
1103
|
-
function a(
|
|
1104
|
-
switch (
|
|
1105
|
-
case
|
|
1106
|
-
|
|
1103
|
+
function a(v) {
|
|
1104
|
+
switch (v.key) {
|
|
1105
|
+
case Z.ArrowDown:
|
|
1106
|
+
v.preventDefault(), v.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), te(() => {
|
|
1107
1107
|
var c;
|
|
1108
1108
|
return (c = i.inputRef.value) == null ? void 0 : c.focus({ preventScroll: !0 });
|
|
1109
1109
|
});
|
|
1110
1110
|
return;
|
|
1111
|
-
case
|
|
1112
|
-
|
|
1113
|
-
i.value.value || i.goToOption(
|
|
1111
|
+
case Z.ArrowUp:
|
|
1112
|
+
v.preventDefault(), v.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), te(() => {
|
|
1113
|
+
i.value.value || i.goToOption(z.Last);
|
|
1114
1114
|
})), te(() => {
|
|
1115
1115
|
var c;
|
|
1116
1116
|
return (c = i.inputRef.value) == null ? void 0 : c.focus({ preventScroll: !0 });
|
|
1117
1117
|
});
|
|
1118
1118
|
return;
|
|
1119
|
-
case
|
|
1119
|
+
case Z.Escape:
|
|
1120
1120
|
if (i.comboboxState.value !== 0) return;
|
|
1121
|
-
|
|
1121
|
+
v.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && v.stopPropagation(), i.closeCombobox(), te(() => {
|
|
1122
1122
|
var c;
|
|
1123
1123
|
return (c = i.inputRef.value) == null ? void 0 : c.focus({ preventScroll: !0 });
|
|
1124
1124
|
});
|
|
1125
1125
|
return;
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
let u = co(
|
|
1128
|
+
let u = co(y(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1129
1129
|
return () => {
|
|
1130
|
-
var
|
|
1131
|
-
let
|
|
1132
|
-
return
|
|
1130
|
+
var v, c;
|
|
1131
|
+
let p = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...m } = e, h = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (v = M(i.optionsRef)) == null ? void 0 : v.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(c = M(i.labelRef)) == null ? void 0 : c.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
|
|
1132
|
+
return pe({ ourProps: h, theirProps: m, slot: p, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1133
1133
|
};
|
|
1134
|
-
} }),
|
|
1134
|
+
} }), Lo = ae({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: o, attrs: t, slots: n, expose: l }) {
|
|
1135
1135
|
var r;
|
|
1136
|
-
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${
|
|
1137
|
-
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1140
|
-
let
|
|
1141
|
-
|
|
1142
|
-
}
|
|
1143
|
-
let c =
|
|
1144
|
-
var
|
|
1145
|
-
let
|
|
1146
|
-
return
|
|
1136
|
+
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Te()}`, s = he("ComboboxInput"), a = y(() => ot(M(s.inputRef))), u = { value: !1 };
|
|
1137
|
+
l({ el: s.inputRef, $el: s.inputRef });
|
|
1138
|
+
function v() {
|
|
1139
|
+
s.change(null);
|
|
1140
|
+
let _ = M(s.optionsRef);
|
|
1141
|
+
_ && (_.scrollTop = 0), s.goToOption(z.Nothing);
|
|
1142
|
+
}
|
|
1143
|
+
let c = y(() => {
|
|
1144
|
+
var _;
|
|
1145
|
+
let P = s.value.value;
|
|
1146
|
+
return M(s.inputRef) ? typeof e.displayValue < "u" && P !== void 0 ? (_ = e.displayValue(P)) != null ? _ : "" : typeof P == "string" ? P : "" : "";
|
|
1147
1147
|
});
|
|
1148
|
-
|
|
1149
|
-
|
|
1148
|
+
ve(() => {
|
|
1149
|
+
F([c, s.comboboxState, a], ([_, P], [C, b]) => {
|
|
1150
1150
|
if (u.value) return;
|
|
1151
|
-
let
|
|
1152
|
-
|
|
1151
|
+
let V = M(s.inputRef);
|
|
1152
|
+
V && ((b === 0 && P === 1 || _ !== C) && (V.value = _), requestAnimationFrame(() => {
|
|
1153
1153
|
var d;
|
|
1154
|
-
if (u.value || !
|
|
1155
|
-
let { selectionStart: f, selectionEnd: x } =
|
|
1156
|
-
Math.abs((x ?? 0) - (f ?? 0)) === 0 && f === 0 &&
|
|
1154
|
+
if (u.value || !V || ((d = a.value) == null ? void 0 : d.activeElement) !== V) return;
|
|
1155
|
+
let { selectionStart: f, selectionEnd: x } = V;
|
|
1156
|
+
Math.abs((x ?? 0) - (f ?? 0)) === 0 && f === 0 && V.setSelectionRange(V.value.length, V.value.length);
|
|
1157
1157
|
}));
|
|
1158
|
-
}, { immediate: !0 }),
|
|
1159
|
-
if (
|
|
1158
|
+
}, { immediate: !0 }), F([s.comboboxState], ([_], [P]) => {
|
|
1159
|
+
if (_ === 0 && P === 1) {
|
|
1160
1160
|
if (u.value) return;
|
|
1161
|
-
let
|
|
1162
|
-
if (!
|
|
1163
|
-
let b =
|
|
1164
|
-
|
|
1161
|
+
let C = M(s.inputRef);
|
|
1162
|
+
if (!C) return;
|
|
1163
|
+
let b = C.value, { selectionStart: V, selectionEnd: d, selectionDirection: f } = C;
|
|
1164
|
+
C.value = "", C.value = b, f !== null ? C.setSelectionRange(V, d, f) : C.setSelectionRange(V, d);
|
|
1165
1165
|
}
|
|
1166
1166
|
});
|
|
1167
1167
|
});
|
|
1168
|
-
let
|
|
1168
|
+
let p = E(!1);
|
|
1169
1169
|
function m() {
|
|
1170
|
-
|
|
1170
|
+
p.value = !0;
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1173
|
-
|
|
1174
|
-
|
|
1172
|
+
function h() {
|
|
1173
|
+
De().nextFrame(() => {
|
|
1174
|
+
p.value = !1;
|
|
1175
1175
|
});
|
|
1176
1176
|
}
|
|
1177
|
-
let
|
|
1178
|
-
function
|
|
1179
|
-
switch (u.value = !0,
|
|
1177
|
+
let $ = qn();
|
|
1178
|
+
function N(_) {
|
|
1179
|
+
switch (u.value = !0, $(() => {
|
|
1180
1180
|
u.value = !1;
|
|
1181
|
-
}),
|
|
1182
|
-
case
|
|
1183
|
-
if (u.value = !1,
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
1181
|
+
}), _.key) {
|
|
1182
|
+
case Z.Enter:
|
|
1183
|
+
if (u.value = !1, s.comboboxState.value !== 0 || p.value) return;
|
|
1184
|
+
if (_.preventDefault(), _.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1185
|
+
s.closeCombobox();
|
|
1186
1186
|
return;
|
|
1187
1187
|
}
|
|
1188
|
-
|
|
1188
|
+
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1189
1189
|
break;
|
|
1190
|
-
case
|
|
1191
|
-
return u.value = !1,
|
|
1192
|
-
case
|
|
1193
|
-
return u.value = !1,
|
|
1194
|
-
|
|
1195
|
-
|
|
1190
|
+
case Z.ArrowDown:
|
|
1191
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Next), 1: () => s.openCombobox() });
|
|
1192
|
+
case Z.ArrowUp:
|
|
1193
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Previous), 1: () => {
|
|
1194
|
+
s.openCombobox(), te(() => {
|
|
1195
|
+
s.value.value || s.goToOption(z.Last);
|
|
1196
1196
|
});
|
|
1197
1197
|
} });
|
|
1198
|
-
case
|
|
1199
|
-
if (
|
|
1200
|
-
return u.value = !1,
|
|
1201
|
-
case
|
|
1202
|
-
return u.value = !1,
|
|
1203
|
-
case
|
|
1204
|
-
if (
|
|
1205
|
-
return u.value = !1,
|
|
1206
|
-
case
|
|
1207
|
-
return u.value = !1,
|
|
1208
|
-
case
|
|
1209
|
-
if (u.value = !1,
|
|
1210
|
-
|
|
1198
|
+
case Z.Home:
|
|
1199
|
+
if (_.shiftKey) break;
|
|
1200
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.First);
|
|
1201
|
+
case Z.PageUp:
|
|
1202
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.First);
|
|
1203
|
+
case Z.End:
|
|
1204
|
+
if (_.shiftKey) break;
|
|
1205
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.Last);
|
|
1206
|
+
case Z.PageDown:
|
|
1207
|
+
return u.value = !1, _.preventDefault(), _.stopPropagation(), s.goToOption(z.Last);
|
|
1208
|
+
case Z.Escape:
|
|
1209
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1210
|
+
_.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && _.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && v(), s.closeCombobox();
|
|
1211
1211
|
break;
|
|
1212
|
-
case
|
|
1213
|
-
if (u.value = !1,
|
|
1214
|
-
|
|
1212
|
+
case Z.Tab:
|
|
1213
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1214
|
+
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1215
1215
|
break;
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1219
|
-
o("change",
|
|
1218
|
+
function L(_) {
|
|
1219
|
+
o("change", _), s.nullable.value && s.mode.value === 0 && _.target.value === "" && v(), s.openCombobox();
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
var
|
|
1223
|
-
let
|
|
1224
|
-
if (u.value = !1, !((
|
|
1221
|
+
function I(_) {
|
|
1222
|
+
var P, C, b;
|
|
1223
|
+
let V = (P = _.relatedTarget) != null ? P : ce.find((d) => d !== _.currentTarget);
|
|
1224
|
+
if (u.value = !1, !((C = M(s.optionsRef)) != null && C.contains(V)) && !((b = M(s.buttonRef)) != null && b.contains(V)) && s.comboboxState.value === 0) return _.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? v() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1227
|
-
var
|
|
1228
|
-
let
|
|
1229
|
-
(
|
|
1230
|
-
|
|
1226
|
+
function R(_) {
|
|
1227
|
+
var P, C, b;
|
|
1228
|
+
let V = (P = _.relatedTarget) != null ? P : ce.find((d) => d !== _.currentTarget);
|
|
1229
|
+
(C = M(s.buttonRef)) != null && C.contains(V) || (b = M(s.optionsRef)) != null && b.contains(V) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), De().nextFrame(() => {
|
|
1230
|
+
s.setActivationTrigger(1);
|
|
1231
1231
|
}));
|
|
1232
1232
|
}
|
|
1233
|
-
let
|
|
1234
|
-
var
|
|
1235
|
-
return (b = (
|
|
1233
|
+
let A = y(() => {
|
|
1234
|
+
var _, P, C, b;
|
|
1235
|
+
return (b = (C = (P = e.defaultValue) != null ? P : s.defaultValue.value !== void 0 ? (_ = e.displayValue) == null ? void 0 : _.call(e, s.defaultValue.value) : null) != null ? C : s.defaultValue.value) != null ? b : "";
|
|
1236
1236
|
});
|
|
1237
1237
|
return () => {
|
|
1238
|
-
var
|
|
1239
|
-
let x = { open:
|
|
1240
|
-
return
|
|
1238
|
+
var _, P, C, b, V, d, f;
|
|
1239
|
+
let x = { open: s.comboboxState.value === 0 }, { displayValue: S, onChange: k, ...D } = e, G = { "aria-controls": (_ = s.optionsRef.value) == null ? void 0 : _.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (P = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : P.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (b = M(s.labelRef)) == null ? void 0 : b.id) != null ? d : (V = M(s.buttonRef)) == null ? void 0 : V.id, "aria-autocomplete": "list", id: i, onCompositionstart: m, onCompositionend: h, onKeydown: N, onInput: L, onFocus: R, onBlur: I, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: A.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1240
|
+
return pe({ ourProps: G, theirProps: D, slot: x, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1241
1241
|
};
|
|
1242
|
-
} }),
|
|
1243
|
-
let
|
|
1244
|
-
n({ el:
|
|
1245
|
-
|
|
1242
|
+
} }), To = ae({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1243
|
+
let l = he("ComboboxOptions"), r = `headlessui-combobox-options-${Te()}`;
|
|
1244
|
+
n({ el: l.optionsRef, $el: l.optionsRef }), ie(() => {
|
|
1245
|
+
l.optionsPropsRef.value.static = e.static;
|
|
1246
1246
|
}), ie(() => {
|
|
1247
|
-
|
|
1247
|
+
l.optionsPropsRef.value.hold = e.hold;
|
|
1248
1248
|
});
|
|
1249
|
-
let i = bo(),
|
|
1250
|
-
|
|
1249
|
+
let i = bo(), s = y(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1250
|
+
vo({ container: y(() => M(l.optionsRef)), enabled: y(() => l.comboboxState.value === 0), accept(u) {
|
|
1251
1251
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1252
1252
|
}, walk(u) {
|
|
1253
1253
|
u.setAttribute("role", "none");
|
|
@@ -1256,59 +1256,59 @@ let Co = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1256
1256
|
u.preventDefault();
|
|
1257
1257
|
}
|
|
1258
1258
|
return () => {
|
|
1259
|
-
var u,
|
|
1260
|
-
let
|
|
1261
|
-
return
|
|
1259
|
+
var u, v, c;
|
|
1260
|
+
let p = { open: l.comboboxState.value === 0 }, m = { "aria-labelledby": (c = (u = M(l.labelRef)) == null ? void 0 : u.id) != null ? c : (v = M(l.buttonRef)) == null ? void 0 : v.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, h = je(e, ["hold"]);
|
|
1261
|
+
return pe({ ourProps: m, theirProps: h, slot: p, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Se(Oo, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1262
1262
|
};
|
|
1263
|
-
} }),
|
|
1264
|
-
let
|
|
1263
|
+
} }), Vo = ae({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: o, attrs: t, expose: n }) {
|
|
1264
|
+
let l = he("ComboboxOption"), r = `headlessui-combobox-option-${Te()}`, i = E(null), s = y(() => e.disabled);
|
|
1265
1265
|
n({ el: i, $el: i });
|
|
1266
|
-
let a =
|
|
1267
|
-
var
|
|
1268
|
-
return
|
|
1269
|
-
}), u =
|
|
1270
|
-
|
|
1271
|
-
let
|
|
1272
|
-
|
|
1266
|
+
let a = y(() => {
|
|
1267
|
+
var I;
|
|
1268
|
+
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((I = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : I.id) === r;
|
|
1269
|
+
}), u = y(() => l.isSelected(e.value)), v = Le(zt, null), c = y(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: y(() => e.order) }));
|
|
1270
|
+
ve(() => l.registerOption(r, c)), wt(() => l.unregisterOption(r, a.value)), ie(() => {
|
|
1271
|
+
let I = M(i);
|
|
1272
|
+
I && (v == null || v.value.measureElement(I));
|
|
1273
1273
|
}), ie(() => {
|
|
1274
|
-
|
|
1275
|
-
var
|
|
1276
|
-
return (
|
|
1274
|
+
l.comboboxState.value === 0 && a.value && (l.virtual.value || l.activationTrigger.value !== 0 && te(() => {
|
|
1275
|
+
var I, R;
|
|
1276
|
+
return (R = (I = M(i)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : R.call(I, { block: "nearest" });
|
|
1277
1277
|
}));
|
|
1278
1278
|
});
|
|
1279
|
-
function
|
|
1280
|
-
|
|
1281
|
-
var
|
|
1282
|
-
return (
|
|
1283
|
-
}),
|
|
1279
|
+
function p(I) {
|
|
1280
|
+
I.preventDefault(), I.button === At.Left && (s.value || (l.selectOption(r), Mt() || requestAnimationFrame(() => {
|
|
1281
|
+
var R;
|
|
1282
|
+
return (R = M(l.inputRef)) == null ? void 0 : R.focus({ preventScroll: !0 });
|
|
1283
|
+
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1284
1284
|
}
|
|
1285
1285
|
function m() {
|
|
1286
|
-
var
|
|
1287
|
-
if (e.disabled || (
|
|
1288
|
-
let
|
|
1289
|
-
|
|
1286
|
+
var I;
|
|
1287
|
+
if (e.disabled || (I = l.virtual.value) != null && I.disabled(e.value)) return l.goToOption(z.Nothing);
|
|
1288
|
+
let R = l.calculateIndex(e.value);
|
|
1289
|
+
l.goToOption(z.Specific, R);
|
|
1290
1290
|
}
|
|
1291
|
-
let
|
|
1292
|
-
function I
|
|
1293
|
-
|
|
1291
|
+
let h = fo();
|
|
1292
|
+
function $(I) {
|
|
1293
|
+
h.update(I);
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1296
|
-
var
|
|
1297
|
-
if (!
|
|
1298
|
-
let
|
|
1299
|
-
|
|
1295
|
+
function N(I) {
|
|
1296
|
+
var R;
|
|
1297
|
+
if (!h.wasMoved(I) || e.disabled || (R = l.virtual.value) != null && R.disabled(e.value) || a.value) return;
|
|
1298
|
+
let A = l.calculateIndex(e.value);
|
|
1299
|
+
l.goToOption(z.Specific, A, 0);
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1302
|
-
var
|
|
1303
|
-
|
|
1301
|
+
function L(I) {
|
|
1302
|
+
var R;
|
|
1303
|
+
h.wasMoved(I) && (e.disabled || (R = l.virtual.value) != null && R.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(z.Nothing)));
|
|
1304
1304
|
}
|
|
1305
1305
|
return () => {
|
|
1306
|
-
let { disabled:
|
|
1307
|
-
return
|
|
1306
|
+
let { disabled: I } = e, R = { active: a.value, selected: u.value, disabled: I }, A = { id: r, ref: i, role: "option", tabIndex: I === !0 ? void 0 : -1, "aria-disabled": I === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: p, onFocus: m, onPointerenter: $, onMouseenter: $, onPointermove: N, onMousemove: N, onPointerleave: L, onMouseleave: L }, _ = je(e, ["order", "value"]);
|
|
1307
|
+
return pe({ ourProps: A, theirProps: _, slot: R, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1308
1308
|
};
|
|
1309
1309
|
} });
|
|
1310
|
-
function
|
|
1311
|
-
return
|
|
1310
|
+
function Po(e, o) {
|
|
1311
|
+
return w(), O("svg", {
|
|
1312
1312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1313
1313
|
viewBox: "0 0 20 20",
|
|
1314
1314
|
fill: "currentColor",
|
|
@@ -1322,8 +1322,8 @@ function Ro(e, o) {
|
|
|
1322
1322
|
})
|
|
1323
1323
|
]);
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1326
|
-
return
|
|
1325
|
+
function Mo(e, o) {
|
|
1326
|
+
return w(), O("svg", {
|
|
1327
1327
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1328
1328
|
viewBox: "0 0 20 20",
|
|
1329
1329
|
fill: "currentColor",
|
|
@@ -1337,8 +1337,8 @@ function No(e, o) {
|
|
|
1337
1337
|
})
|
|
1338
1338
|
]);
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return
|
|
1340
|
+
function ko(e, o) {
|
|
1341
|
+
return w(), O("svg", {
|
|
1342
1342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1343
|
viewBox: "0 0 20 20",
|
|
1344
1344
|
fill: "currentColor",
|
|
@@ -1365,31 +1365,31 @@ const ht = {
|
|
|
1365
1365
|
}),
|
|
1366
1366
|
emits: ["update:modelValue"],
|
|
1367
1367
|
setup(e) {
|
|
1368
|
-
const o = e, t = fn(e, "modelValue"), n = E(""),
|
|
1369
|
-
([,
|
|
1370
|
-
)), i = (
|
|
1371
|
-
|
|
1368
|
+
const o = e, t = fn(e, "modelValue"), n = E(""), l = E(null), r = y(() => Object.entries(o.languages).filter(
|
|
1369
|
+
([, s]) => s.toLowerCase().includes(n.value.toLowerCase())
|
|
1370
|
+
)), i = (s) => {
|
|
1371
|
+
s.target.value = "", n.value = "", l.value && l.value.$el.click();
|
|
1372
1372
|
};
|
|
1373
|
-
return (
|
|
1373
|
+
return (s, a) => (w(), X(T($o), {
|
|
1374
1374
|
modelValue: t.value,
|
|
1375
1375
|
"onUpdate:modelValue": a[3] || (a[3] = (u) => t.value = u),
|
|
1376
1376
|
as: "div",
|
|
1377
1377
|
class: "relative mt-1"
|
|
1378
1378
|
}, {
|
|
1379
|
-
default:
|
|
1380
|
-
|
|
1379
|
+
default: Ve(() => [
|
|
1380
|
+
H(T(Lo), {
|
|
1381
1381
|
class: "w-full bg-white border border-gray-300 rounded py-2.5 pl-3 pr-10 text-sm text-gray-800 font-medium focus:outline-none focus:ring-0.5 focus:ring-gray-400 focus:border-gray-400",
|
|
1382
1382
|
onChange: a[0] || (a[0] = (u) => n.value = u.target.value),
|
|
1383
1383
|
displayValue: (u) => e.languages[u],
|
|
1384
1384
|
onFocus: a[1] || (a[1] = (u) => i(u))
|
|
1385
1385
|
}, null, 8, ["displayValue"]),
|
|
1386
|
-
|
|
1386
|
+
H(T(Io), {
|
|
1387
1387
|
ref_key: "btnSelect",
|
|
1388
|
-
ref:
|
|
1388
|
+
ref: l,
|
|
1389
1389
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
1390
1390
|
}, {
|
|
1391
|
-
default:
|
|
1392
|
-
|
|
1391
|
+
default: Ve(() => [
|
|
1392
|
+
H(T(Mo), {
|
|
1393
1393
|
class: "h-5 w-5 text-gray-400",
|
|
1394
1394
|
"aria-hidden": "true",
|
|
1395
1395
|
onClick: a[2] || (a[2] = (u) => i(u))
|
|
@@ -1397,22 +1397,22 @@ const ht = {
|
|
|
1397
1397
|
]),
|
|
1398
1398
|
_: 1
|
|
1399
1399
|
}, 512),
|
|
1400
|
-
|
|
1401
|
-
default:
|
|
1402
|
-
(
|
|
1400
|
+
H(T(To), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50" }, {
|
|
1401
|
+
default: Ve(() => [
|
|
1402
|
+
(w(!0), O(W, null, se(r.value, ([u, v]) => (w(), X(T(Vo), {
|
|
1403
1403
|
key: u,
|
|
1404
1404
|
value: u
|
|
1405
1405
|
}, {
|
|
1406
|
-
default:
|
|
1406
|
+
default: Ve(({ active: c, selected: p }) => [
|
|
1407
1407
|
g("li", {
|
|
1408
|
-
class:
|
|
1408
|
+
class: _e([
|
|
1409
1409
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
1410
1410
|
c ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
1411
1411
|
])
|
|
1412
1412
|
}, [
|
|
1413
1413
|
g("span", {
|
|
1414
|
-
class:
|
|
1415
|
-
}, ee(
|
|
1414
|
+
class: _e(["block truncate", p && "font-semibold"])
|
|
1415
|
+
}, ee(v), 3)
|
|
1416
1416
|
], 2)
|
|
1417
1417
|
]),
|
|
1418
1418
|
_: 2
|
|
@@ -1424,19 +1424,19 @@ const ht = {
|
|
|
1424
1424
|
_: 1
|
|
1425
1425
|
}, 8, ["modelValue"]));
|
|
1426
1426
|
}
|
|
1427
|
-
},
|
|
1428
|
-
src:
|
|
1427
|
+
}, Ut = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.68688%202.3131C3.88214%202.50837%203.88214%202.82495%203.68688%203.02021L2.04043%204.66666L3.68688%206.3131C3.88214%206.50837%203.88214%206.82495%203.68688%207.02021C3.49162%207.21547%203.17504%207.21547%202.97977%207.02021L0.979775%205.02021C0.784513%204.82495%200.784513%204.50837%200.979775%204.3131L2.97977%202.3131C3.17504%202.11784%203.49162%202.11784%203.68688%202.3131Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M12.3131%208.97977C12.5084%208.78451%2012.825%208.78451%2013.0202%208.97977L15.0202%2010.9798C15.2155%2011.175%2015.2155%2011.4916%2015.0202%2011.6869L13.0202%2013.6869C12.825%2013.8821%2012.5084%2013.8821%2012.3131%2013.6869C12.1178%2013.4916%2012.1178%2013.175%2012.3131%2012.9798L13.9596%2011.3333L12.3131%209.68688C12.1178%209.49161%2012.1178%209.17503%2012.3131%208.97977Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%204.66666C0.833328%204.39051%201.05719%204.16666%201.33333%204.16666H14.6667C14.9428%204.16666%2015.1667%204.39051%2015.1667%204.66666C15.1667%204.9428%2014.9428%205.16666%2014.6667%205.16666H1.33333C1.05719%205.16666%200.833328%204.9428%200.833328%204.66666Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M0.833328%2011.3333C0.833328%2011.0572%201.05719%2010.8333%201.33333%2010.8333H14.6667C14.9428%2010.8333%2015.1667%2011.0572%2015.1667%2011.3333C15.1667%2011.6095%2014.9428%2011.8333%2014.6667%2011.8333H1.33333C1.05719%2011.8333%200.833328%2011.6095%200.833328%2011.3333Z'%20fill='%237E7E7E'/%3e%3c/svg%3e", Ro = { key: 0 }, No = /* @__PURE__ */ g("img", {
|
|
1428
|
+
src: Ut,
|
|
1429
1429
|
alt: "swap",
|
|
1430
1430
|
class: "w-4"
|
|
1431
|
-
}, null, -1),
|
|
1432
|
-
|
|
1433
|
-
],
|
|
1434
|
-
src:
|
|
1431
|
+
}, null, -1), Do = [
|
|
1432
|
+
No
|
|
1433
|
+
], Ao = /* @__PURE__ */ g("img", {
|
|
1434
|
+
src: Ut,
|
|
1435
1435
|
alt: "swap",
|
|
1436
1436
|
class: "w-4"
|
|
1437
|
-
}, null, -1),
|
|
1438
|
-
|
|
1439
|
-
],
|
|
1437
|
+
}, null, -1), Fo = [
|
|
1438
|
+
Ao
|
|
1439
|
+
], jo = {
|
|
1440
1440
|
__name: "SwapBtn",
|
|
1441
1441
|
props: {
|
|
1442
1442
|
isBidirect: {
|
|
@@ -1447,17 +1447,17 @@ const ht = {
|
|
|
1447
1447
|
emits: ["swap"],
|
|
1448
1448
|
setup(e, { emit: o }) {
|
|
1449
1449
|
const t = o;
|
|
1450
|
-
return (n,
|
|
1450
|
+
return (n, l) => e.isBidirect ? (w(), O("button", {
|
|
1451
1451
|
key: 1,
|
|
1452
|
-
onClick:
|
|
1453
|
-
},
|
|
1452
|
+
onClick: l[0] || (l[0] = (r) => t("swap"))
|
|
1453
|
+
}, Fo)) : (w(), O("button", Ro, Do));
|
|
1454
1454
|
}
|
|
1455
1455
|
};
|
|
1456
|
-
var
|
|
1457
|
-
function
|
|
1456
|
+
var Zt = !1;
|
|
1457
|
+
function Me(e, o, t) {
|
|
1458
1458
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function qe(e, o) {
|
|
1461
1461
|
if (Array.isArray(e)) {
|
|
1462
1462
|
e.splice(o, 1);
|
|
1463
1463
|
return;
|
|
@@ -1465,34 +1465,34 @@ function Je(e, o) {
|
|
|
1465
1465
|
delete e[o];
|
|
1466
1466
|
}
|
|
1467
1467
|
function Bo() {
|
|
1468
|
-
return
|
|
1468
|
+
return Wt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function Wt() {
|
|
1471
1471
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1472
1472
|
}
|
|
1473
|
-
const
|
|
1474
|
-
let ge,
|
|
1475
|
-
function
|
|
1473
|
+
const Ho = typeof Proxy == "function", zo = "devtools-plugin:setup", Uo = "plugin:settings:set";
|
|
1474
|
+
let ge, Je;
|
|
1475
|
+
function Zo() {
|
|
1476
1476
|
var e;
|
|
1477
|
-
return ge !== void 0 || (typeof window < "u" && window.performance ? (ge = !0,
|
|
1477
|
+
return ge !== void 0 || (typeof window < "u" && window.performance ? (ge = !0, Je = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ge = !0, Je = globalThis.perf_hooks.performance) : ge = !1), ge;
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1480
|
-
return
|
|
1479
|
+
function Wo() {
|
|
1480
|
+
return Zo() ? Je.now() : Date.now();
|
|
1481
1481
|
}
|
|
1482
|
-
class
|
|
1482
|
+
class Go {
|
|
1483
1483
|
constructor(o, t) {
|
|
1484
1484
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1485
1485
|
const n = {};
|
|
1486
1486
|
if (o.settings)
|
|
1487
1487
|
for (const i in o.settings) {
|
|
1488
|
-
const
|
|
1489
|
-
n[i] =
|
|
1488
|
+
const s = o.settings[i];
|
|
1489
|
+
n[i] = s.defaultValue;
|
|
1490
1490
|
}
|
|
1491
|
-
const
|
|
1491
|
+
const l = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1492
1492
|
let r = Object.assign({}, n);
|
|
1493
1493
|
try {
|
|
1494
|
-
const i = localStorage.getItem(
|
|
1495
|
-
Object.assign(r,
|
|
1494
|
+
const i = localStorage.getItem(l), s = JSON.parse(i);
|
|
1495
|
+
Object.assign(r, s);
|
|
1496
1496
|
} catch {
|
|
1497
1497
|
}
|
|
1498
1498
|
this.fallbacks = {
|
|
@@ -1501,32 +1501,32 @@ class qo {
|
|
|
1501
1501
|
},
|
|
1502
1502
|
setSettings(i) {
|
|
1503
1503
|
try {
|
|
1504
|
-
localStorage.setItem(
|
|
1504
|
+
localStorage.setItem(l, JSON.stringify(i));
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
1507
|
r = i;
|
|
1508
1508
|
},
|
|
1509
1509
|
now() {
|
|
1510
|
-
return
|
|
1510
|
+
return Wo();
|
|
1511
1511
|
}
|
|
1512
|
-
}, t && t.on(
|
|
1513
|
-
i === this.plugin.id && this.fallbacks.setSettings(
|
|
1512
|
+
}, t && t.on(Uo, (i, s) => {
|
|
1513
|
+
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1514
1514
|
}), this.proxiedOn = new Proxy({}, {
|
|
1515
|
-
get: (i,
|
|
1515
|
+
get: (i, s) => this.target ? this.target.on[s] : (...a) => {
|
|
1516
1516
|
this.onQueue.push({
|
|
1517
|
-
method:
|
|
1517
|
+
method: s,
|
|
1518
1518
|
args: a
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1522
|
-
get: (i,
|
|
1523
|
-
method:
|
|
1522
|
+
get: (i, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...a) => (this.targetQueue.push({
|
|
1523
|
+
method: s,
|
|
1524
1524
|
args: a,
|
|
1525
1525
|
resolve: () => {
|
|
1526
1526
|
}
|
|
1527
|
-
}), this.fallbacks[
|
|
1527
|
+
}), this.fallbacks[s](...a)) : (...a) => new Promise((u) => {
|
|
1528
1528
|
this.targetQueue.push({
|
|
1529
|
-
method:
|
|
1529
|
+
method: s,
|
|
1530
1530
|
args: a,
|
|
1531
1531
|
resolve: u
|
|
1532
1532
|
});
|
|
@@ -1541,12 +1541,12 @@ class qo {
|
|
|
1541
1541
|
t.resolve(await this.target[t.method](...t.args));
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const t = e, n =
|
|
1546
|
-
if (
|
|
1547
|
-
|
|
1544
|
+
function Gt(e, o) {
|
|
1545
|
+
const t = e, n = Wt(), l = Bo(), r = Ho && t.enableEarlyProxy;
|
|
1546
|
+
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
|
|
1547
|
+
l.emit(zo, e, o);
|
|
1548
1548
|
else {
|
|
1549
|
-
const i = r ? new
|
|
1549
|
+
const i = r ? new Go(t, l) : null;
|
|
1550
1550
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1551
1551
|
pluginDescriptor: t,
|
|
1552
1552
|
setupFn: o,
|
|
@@ -1559,8 +1559,8 @@ function qt(e, o) {
|
|
|
1559
1559
|
* (c) 2023 Eduardo San Martin Morote
|
|
1560
1560
|
* @license MIT
|
|
1561
1561
|
*/
|
|
1562
|
-
let
|
|
1563
|
-
const
|
|
1562
|
+
let we;
|
|
1563
|
+
const Ie = (e) => we = e, qt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1564
1564
|
/* istanbul ignore next */
|
|
1565
1565
|
Symbol()
|
|
1566
1566
|
);
|
|
@@ -1572,18 +1572,18 @@ var ne;
|
|
|
1572
1572
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1573
1573
|
})(ne || (ne = {}));
|
|
1574
1574
|
const Be = typeof window < "u", Ee = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Be, mt = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
1575
|
-
function
|
|
1575
|
+
function qo(e, { autoBom: o = !1 } = {}) {
|
|
1576
1576
|
return o && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function lt(e, o, t) {
|
|
1579
1579
|
const n = new XMLHttpRequest();
|
|
1580
1580
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1581
|
-
|
|
1581
|
+
Yt(n.response, o, t);
|
|
1582
1582
|
}, n.onerror = function() {
|
|
1583
1583
|
console.error("could not download file");
|
|
1584
1584
|
}, n.send();
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Jt(e) {
|
|
1587
1587
|
const o = new XMLHttpRequest();
|
|
1588
1588
|
o.open("HEAD", e, !1);
|
|
1589
1589
|
try {
|
|
@@ -1592,7 +1592,7 @@ function Kt(e) {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
return o.status >= 200 && o.status <= 299;
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1595
|
+
function ke(e) {
|
|
1596
1596
|
try {
|
|
1597
1597
|
e.dispatchEvent(new MouseEvent("click"));
|
|
1598
1598
|
} catch {
|
|
@@ -1600,54 +1600,54 @@ function De(e) {
|
|
|
1600
1600
|
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1601
1601
|
}
|
|
1602
1602
|
}
|
|
1603
|
-
const
|
|
1603
|
+
const Re = typeof navigator == "object" ? navigator : { userAgent: "" }, Kt = /Macintosh/.test(Re.userAgent) && /AppleWebKit/.test(Re.userAgent) && !/Safari/.test(Re.userAgent), Yt = Be ? (
|
|
1604
1604
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
1605
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
1605
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Kt ? Jo : (
|
|
1606
1606
|
// Use msSaveOrOpenBlob as a second approach
|
|
1607
|
-
"msSaveOrOpenBlob" in
|
|
1607
|
+
"msSaveOrOpenBlob" in Re ? Ko : (
|
|
1608
1608
|
// Fallback to using FileReader and a popup
|
|
1609
|
-
|
|
1609
|
+
Yo
|
|
1610
1610
|
)
|
|
1611
1611
|
)
|
|
1612
1612
|
) : () => {
|
|
1613
1613
|
};
|
|
1614
|
-
function
|
|
1614
|
+
function Jo(e, o = "download", t) {
|
|
1615
1615
|
const n = document.createElement("a");
|
|
1616
|
-
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ?
|
|
1616
|
+
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Jt(n.href) ? lt(e, o, t) : (n.target = "_blank", ke(n)) : ke(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1617
1617
|
URL.revokeObjectURL(n.href);
|
|
1618
1618
|
}, 4e4), setTimeout(function() {
|
|
1619
|
-
|
|
1619
|
+
ke(n);
|
|
1620
1620
|
}, 0));
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1622
|
+
function Ko(e, o = "download", t) {
|
|
1623
1623
|
if (typeof e == "string")
|
|
1624
|
-
if (
|
|
1625
|
-
|
|
1624
|
+
if (Jt(e))
|
|
1625
|
+
lt(e, o, t);
|
|
1626
1626
|
else {
|
|
1627
1627
|
const n = document.createElement("a");
|
|
1628
1628
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
1629
|
-
|
|
1629
|
+
ke(n);
|
|
1630
1630
|
});
|
|
1631
1631
|
}
|
|
1632
1632
|
else
|
|
1633
|
-
navigator.msSaveOrOpenBlob(
|
|
1633
|
+
navigator.msSaveOrOpenBlob(qo(e, t), o);
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Yo(e, o, t, n) {
|
|
1636
1636
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1637
|
-
return
|
|
1638
|
-
const
|
|
1639
|
-
if ((i ||
|
|
1640
|
-
const
|
|
1641
|
-
|
|
1642
|
-
let a =
|
|
1637
|
+
return lt(e, o, t);
|
|
1638
|
+
const l = e.type === "application/octet-stream", r = /constructor/i.test(String(mt.HTMLElement)) || "safari" in mt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1639
|
+
if ((i || l && r || Kt) && typeof FileReader < "u") {
|
|
1640
|
+
const s = new FileReader();
|
|
1641
|
+
s.onloadend = function() {
|
|
1642
|
+
let a = s.result;
|
|
1643
1643
|
if (typeof a != "string")
|
|
1644
1644
|
throw n = null, new Error("Wrong reader.result type");
|
|
1645
1645
|
a = i ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1646
|
-
},
|
|
1646
|
+
}, s.readAsDataURL(e);
|
|
1647
1647
|
} else {
|
|
1648
|
-
const
|
|
1649
|
-
n ? n.location.assign(
|
|
1650
|
-
URL.revokeObjectURL(
|
|
1648
|
+
const s = URL.createObjectURL(e);
|
|
1649
|
+
n ? n.location.assign(s) : location.href = s, n = null, setTimeout(function() {
|
|
1650
|
+
URL.revokeObjectURL(s);
|
|
1651
1651
|
}, 4e4);
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
@@ -1655,39 +1655,39 @@ function B(e, o) {
|
|
|
1655
1655
|
const t = "🍍 " + e;
|
|
1656
1656
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function st(e) {
|
|
1659
1659
|
return "_a" in e && "install" in e;
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1661
|
+
function Qt() {
|
|
1662
1662
|
if (!("clipboard" in navigator))
|
|
1663
1663
|
return B("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function Xt(e) {
|
|
1666
1666
|
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
1667
1667
|
}
|
|
1668
|
-
async function
|
|
1669
|
-
if (!
|
|
1668
|
+
async function Qo(e) {
|
|
1669
|
+
if (!Qt())
|
|
1670
1670
|
try {
|
|
1671
1671
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), B("Global state copied to clipboard.");
|
|
1672
1672
|
} catch (o) {
|
|
1673
|
-
if (
|
|
1673
|
+
if (Xt(o))
|
|
1674
1674
|
return;
|
|
1675
1675
|
B("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
async function
|
|
1679
|
-
if (!
|
|
1678
|
+
async function Xo(e) {
|
|
1679
|
+
if (!Qt())
|
|
1680
1680
|
try {
|
|
1681
1681
|
en(e, JSON.parse(await navigator.clipboard.readText())), B("Global state pasted from clipboard.");
|
|
1682
1682
|
} catch (o) {
|
|
1683
|
-
if (
|
|
1683
|
+
if (Xt(o))
|
|
1684
1684
|
return;
|
|
1685
1685
|
B("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
async function
|
|
1688
|
+
async function e2(e) {
|
|
1689
1689
|
try {
|
|
1690
|
-
|
|
1690
|
+
Yt(new Blob([JSON.stringify(e.state.value)], {
|
|
1691
1691
|
type: "text/plain;charset=utf-8"
|
|
1692
1692
|
}), "pinia-state.json");
|
|
1693
1693
|
} catch (o) {
|
|
@@ -1695,7 +1695,7 @@ async function es(e) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
let oe;
|
|
1698
|
-
function
|
|
1698
|
+
function t2() {
|
|
1699
1699
|
oe || (oe = document.createElement("input"), oe.type = "file", oe.accept = ".json");
|
|
1700
1700
|
function e() {
|
|
1701
1701
|
return new Promise((o, t) => {
|
|
@@ -1703,20 +1703,20 @@ function ts() {
|
|
|
1703
1703
|
const n = oe.files;
|
|
1704
1704
|
if (!n)
|
|
1705
1705
|
return o(null);
|
|
1706
|
-
const
|
|
1707
|
-
return o(
|
|
1706
|
+
const l = n.item(0);
|
|
1707
|
+
return o(l ? { text: await l.text(), file: l } : null);
|
|
1708
1708
|
}, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
|
|
1709
1709
|
});
|
|
1710
1710
|
}
|
|
1711
1711
|
return e;
|
|
1712
1712
|
}
|
|
1713
|
-
async function
|
|
1713
|
+
async function n2(e) {
|
|
1714
1714
|
try {
|
|
1715
|
-
const t = await
|
|
1715
|
+
const t = await t2()();
|
|
1716
1716
|
if (!t)
|
|
1717
1717
|
return;
|
|
1718
|
-
const { text: n, file:
|
|
1719
|
-
en(e, JSON.parse(n)), B(`Global state imported from "${
|
|
1718
|
+
const { text: n, file: l } = t;
|
|
1719
|
+
en(e, JSON.parse(n)), B(`Global state imported from "${l.name}".`);
|
|
1720
1720
|
} catch (o) {
|
|
1721
1721
|
B("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1722
1722
|
}
|
|
@@ -1727,25 +1727,25 @@ function en(e, o) {
|
|
|
1727
1727
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function Y(e) {
|
|
1731
1731
|
return {
|
|
1732
1732
|
_custom: {
|
|
1733
1733
|
display: e
|
|
1734
1734
|
}
|
|
1735
1735
|
};
|
|
1736
1736
|
}
|
|
1737
|
-
const tn = "🍍 Pinia (root)",
|
|
1738
|
-
function
|
|
1739
|
-
return
|
|
1740
|
-
id:
|
|
1737
|
+
const tn = "🍍 Pinia (root)", Ke = "_root";
|
|
1738
|
+
function o2(e) {
|
|
1739
|
+
return st(e) ? {
|
|
1740
|
+
id: Ke,
|
|
1741
1741
|
label: tn
|
|
1742
1742
|
} : {
|
|
1743
1743
|
id: e.$id,
|
|
1744
1744
|
label: e.$id
|
|
1745
1745
|
};
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1748
|
-
if (
|
|
1747
|
+
function l2(e) {
|
|
1748
|
+
if (st(e)) {
|
|
1749
1749
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1750
1750
|
return {
|
|
1751
1751
|
state: t.map((r) => ({
|
|
@@ -1758,7 +1758,7 @@ function ss(e) {
|
|
|
1758
1758
|
return {
|
|
1759
1759
|
editable: !1,
|
|
1760
1760
|
key: r,
|
|
1761
|
-
value: i._getters.reduce((
|
|
1761
|
+
value: i._getters.reduce((s, a) => (s[a] = i[a], s), {})
|
|
1762
1762
|
};
|
|
1763
1763
|
})
|
|
1764
1764
|
};
|
|
@@ -1780,20 +1780,20 @@ function ss(e) {
|
|
|
1780
1780
|
value: e[t]
|
|
1781
1781
|
}))), o;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1783
|
+
function s2(e) {
|
|
1784
1784
|
return e ? Array.isArray(e) ? e.reduce((o, t) => (o.keys.push(t.key), o.operations.push(t.type), o.oldValue[t.key] = t.oldValue, o.newValue[t.key] = t.newValue, o), {
|
|
1785
1785
|
oldValue: {},
|
|
1786
1786
|
keys: [],
|
|
1787
1787
|
operations: [],
|
|
1788
1788
|
newValue: {}
|
|
1789
1789
|
}) : {
|
|
1790
|
-
operation:
|
|
1791
|
-
key:
|
|
1790
|
+
operation: Y(e.type),
|
|
1791
|
+
key: Y(e.key),
|
|
1792
1792
|
oldValue: e.oldValue,
|
|
1793
1793
|
newValue: e.newValue
|
|
1794
1794
|
} : {};
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function r2(e) {
|
|
1797
1797
|
switch (e) {
|
|
1798
1798
|
case ne.direct:
|
|
1799
1799
|
return "mutation";
|
|
@@ -1805,16 +1805,16 @@ function rs(e) {
|
|
|
1805
1805
|
return "unknown";
|
|
1806
1806
|
}
|
|
1807
1807
|
}
|
|
1808
|
-
let
|
|
1809
|
-
const
|
|
1810
|
-
function
|
|
1811
|
-
|
|
1808
|
+
let Ce = !0;
|
|
1809
|
+
const Ne = [], ue = "pinia:mutations", U = "pinia", { assign: i2 } = Object, Ae = (e) => "🍍 " + e;
|
|
1810
|
+
function a2(e, o) {
|
|
1811
|
+
Gt({
|
|
1812
1812
|
id: "dev.esm.pinia",
|
|
1813
1813
|
label: "Pinia 🍍",
|
|
1814
1814
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1815
1815
|
packageName: "pinia",
|
|
1816
1816
|
homepage: "https://pinia.vuejs.org",
|
|
1817
|
-
componentStateTypes:
|
|
1817
|
+
componentStateTypes: Ne,
|
|
1818
1818
|
app: e
|
|
1819
1819
|
}, (t) => {
|
|
1820
1820
|
typeof t.now != "function" && B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
|
|
@@ -1822,7 +1822,7 @@ function as(e, o) {
|
|
|
1822
1822
|
label: "Pinia 🍍",
|
|
1823
1823
|
color: 15064968
|
|
1824
1824
|
}), t.addInspector({
|
|
1825
|
-
id:
|
|
1825
|
+
id: U,
|
|
1826
1826
|
label: "Pinia 🍍",
|
|
1827
1827
|
icon: "storage",
|
|
1828
1828
|
treeFilterPlaceholder: "Search stores",
|
|
@@ -1830,28 +1830,28 @@ function as(e, o) {
|
|
|
1830
1830
|
{
|
|
1831
1831
|
icon: "content_copy",
|
|
1832
1832
|
action: () => {
|
|
1833
|
-
|
|
1833
|
+
Qo(o);
|
|
1834
1834
|
},
|
|
1835
1835
|
tooltip: "Serialize and copy the state"
|
|
1836
1836
|
},
|
|
1837
1837
|
{
|
|
1838
1838
|
icon: "content_paste",
|
|
1839
1839
|
action: async () => {
|
|
1840
|
-
await
|
|
1840
|
+
await Xo(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1841
1841
|
},
|
|
1842
1842
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1843
1843
|
},
|
|
1844
1844
|
{
|
|
1845
1845
|
icon: "save",
|
|
1846
1846
|
action: () => {
|
|
1847
|
-
|
|
1847
|
+
e2(o);
|
|
1848
1848
|
},
|
|
1849
1849
|
tooltip: "Save the state as a JSON file"
|
|
1850
1850
|
},
|
|
1851
1851
|
{
|
|
1852
1852
|
icon: "folder_open",
|
|
1853
1853
|
action: async () => {
|
|
1854
|
-
await
|
|
1854
|
+
await n2(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1855
1855
|
},
|
|
1856
1856
|
tooltip: "Import the state from a JSON file"
|
|
1857
1857
|
}
|
|
@@ -1861,44 +1861,44 @@ function as(e, o) {
|
|
|
1861
1861
|
icon: "restore",
|
|
1862
1862
|
tooltip: 'Reset the state (with "$reset")',
|
|
1863
1863
|
action: (n) => {
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1864
|
+
const l = o._s.get(n);
|
|
1865
|
+
l ? typeof l.$reset != "function" ? B(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), B(`Store "${n}" reset.`)) : B(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
]
|
|
1869
|
-
}), t.on.inspectComponent((n,
|
|
1869
|
+
}), t.on.inspectComponent((n, l) => {
|
|
1870
1870
|
const r = n.componentInstance && n.componentInstance.proxy;
|
|
1871
1871
|
if (r && r._pStores) {
|
|
1872
1872
|
const i = n.componentInstance.proxy._pStores;
|
|
1873
|
-
Object.values(i).forEach((
|
|
1873
|
+
Object.values(i).forEach((s) => {
|
|
1874
1874
|
n.instanceData.state.push({
|
|
1875
|
-
type:
|
|
1875
|
+
type: Ae(s.$id),
|
|
1876
1876
|
key: "state",
|
|
1877
1877
|
editable: !0,
|
|
1878
|
-
value:
|
|
1878
|
+
value: s._isOptionsAPI ? {
|
|
1879
1879
|
_custom: {
|
|
1880
|
-
value:
|
|
1880
|
+
value: K(s.$state),
|
|
1881
1881
|
actions: [
|
|
1882
1882
|
{
|
|
1883
1883
|
icon: "restore",
|
|
1884
1884
|
tooltip: "Reset the state of this store",
|
|
1885
|
-
action: () =>
|
|
1885
|
+
action: () => s.$reset()
|
|
1886
1886
|
}
|
|
1887
1887
|
]
|
|
1888
1888
|
}
|
|
1889
1889
|
} : (
|
|
1890
1890
|
// NOTE: workaround to unwrap transferred refs
|
|
1891
|
-
Object.keys(
|
|
1891
|
+
Object.keys(s.$state).reduce((a, u) => (a[u] = s.$state[u], a), {})
|
|
1892
1892
|
)
|
|
1893
|
-
}),
|
|
1894
|
-
type:
|
|
1893
|
+
}), s._getters && s._getters.length && n.instanceData.state.push({
|
|
1894
|
+
type: Ae(s.$id),
|
|
1895
1895
|
key: "getters",
|
|
1896
1896
|
editable: !1,
|
|
1897
|
-
value:
|
|
1897
|
+
value: s._getters.reduce((a, u) => {
|
|
1898
1898
|
try {
|
|
1899
|
-
a[u] =
|
|
1900
|
-
} catch (
|
|
1901
|
-
a[u] =
|
|
1899
|
+
a[u] = s[u];
|
|
1900
|
+
} catch (v) {
|
|
1901
|
+
a[u] = v;
|
|
1902
1902
|
}
|
|
1903
1903
|
return a;
|
|
1904
1904
|
}, {})
|
|
@@ -1906,48 +1906,48 @@ function as(e, o) {
|
|
|
1906
1906
|
});
|
|
1907
1907
|
}
|
|
1908
1908
|
}), t.on.getInspectorTree((n) => {
|
|
1909
|
-
if (n.app === e && n.inspectorId ===
|
|
1910
|
-
let
|
|
1911
|
-
|
|
1909
|
+
if (n.app === e && n.inspectorId === U) {
|
|
1910
|
+
let l = [o];
|
|
1911
|
+
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((r) => "$id" in r ? r.$id.toLowerCase().includes(n.filter.toLowerCase()) : tn.toLowerCase().includes(n.filter.toLowerCase())) : l).map(o2);
|
|
1912
1912
|
}
|
|
1913
1913
|
}), t.on.getInspectorState((n) => {
|
|
1914
|
-
if (n.app === e && n.inspectorId ===
|
|
1915
|
-
const
|
|
1916
|
-
if (!
|
|
1914
|
+
if (n.app === e && n.inspectorId === U) {
|
|
1915
|
+
const l = n.nodeId === Ke ? o : o._s.get(n.nodeId);
|
|
1916
|
+
if (!l)
|
|
1917
1917
|
return;
|
|
1918
|
-
|
|
1918
|
+
l && (n.state = l2(l));
|
|
1919
1919
|
}
|
|
1920
|
-
}), t.on.editInspectorState((n,
|
|
1921
|
-
if (n.app === e && n.inspectorId ===
|
|
1922
|
-
const r = n.nodeId ===
|
|
1920
|
+
}), t.on.editInspectorState((n, l) => {
|
|
1921
|
+
if (n.app === e && n.inspectorId === U) {
|
|
1922
|
+
const r = n.nodeId === Ke ? o : o._s.get(n.nodeId);
|
|
1923
1923
|
if (!r)
|
|
1924
1924
|
return B(`store "${n.nodeId}" not found`, "error");
|
|
1925
1925
|
const { path: i } = n;
|
|
1926
|
-
|
|
1926
|
+
st(r) ? i.unshift("state") : (i.length !== 1 || !r._customProperties.has(i[0]) || i[0] in r.$state) && i.unshift("$state"), Ce = !1, n.set(r, i, n.state.value), Ce = !0;
|
|
1927
1927
|
}
|
|
1928
1928
|
}), t.on.editComponentState((n) => {
|
|
1929
1929
|
if (n.type.startsWith("🍍")) {
|
|
1930
|
-
const
|
|
1930
|
+
const l = n.type.replace(/^🍍\s*/, ""), r = o._s.get(l);
|
|
1931
1931
|
if (!r)
|
|
1932
|
-
return B(`store "${
|
|
1932
|
+
return B(`store "${l}" not found`, "error");
|
|
1933
1933
|
const { path: i } = n;
|
|
1934
1934
|
if (i[0] !== "state")
|
|
1935
|
-
return B(`Invalid path for store "${
|
|
1935
|
+
return B(`Invalid path for store "${l}":
|
|
1936
1936
|
${i}
|
|
1937
1937
|
Only state can be modified.`);
|
|
1938
|
-
i[0] = "$state",
|
|
1938
|
+
i[0] = "$state", Ce = !1, n.set(r, i, n.state.value), Ce = !0;
|
|
1939
1939
|
}
|
|
1940
1940
|
});
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1944
|
-
|
|
1943
|
+
function u2(e, o) {
|
|
1944
|
+
Ne.includes(Ae(o.$id)) || Ne.push(Ae(o.$id)), Gt({
|
|
1945
1945
|
id: "dev.esm.pinia",
|
|
1946
1946
|
label: "Pinia 🍍",
|
|
1947
1947
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1948
1948
|
packageName: "pinia",
|
|
1949
1949
|
homepage: "https://pinia.vuejs.org",
|
|
1950
|
-
componentStateTypes:
|
|
1950
|
+
componentStateTypes: Ne,
|
|
1951
1951
|
app: e,
|
|
1952
1952
|
settings: {
|
|
1953
1953
|
logStoreChanges: {
|
|
@@ -1963,8 +1963,8 @@ function us(e, o) {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
}, (t) => {
|
|
1965
1965
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1966
|
-
o.$onAction(({ after: i, onError:
|
|
1967
|
-
const
|
|
1966
|
+
o.$onAction(({ after: i, onError: s, name: a, args: u }) => {
|
|
1967
|
+
const v = nn++;
|
|
1968
1968
|
t.addTimelineEvent({
|
|
1969
1969
|
layerId: ue,
|
|
1970
1970
|
event: {
|
|
@@ -1972,11 +1972,11 @@ function us(e, o) {
|
|
|
1972
1972
|
title: "🛫 " + a,
|
|
1973
1973
|
subtitle: "start",
|
|
1974
1974
|
data: {
|
|
1975
|
-
store:
|
|
1976
|
-
action:
|
|
1975
|
+
store: Y(o.$id),
|
|
1976
|
+
action: Y(a),
|
|
1977
1977
|
args: u
|
|
1978
1978
|
},
|
|
1979
|
-
groupId:
|
|
1979
|
+
groupId: v
|
|
1980
1980
|
}
|
|
1981
1981
|
}), i((c) => {
|
|
1982
1982
|
re = void 0, t.addTimelineEvent({
|
|
@@ -1986,15 +1986,15 @@ function us(e, o) {
|
|
|
1986
1986
|
title: "🛬 " + a,
|
|
1987
1987
|
subtitle: "end",
|
|
1988
1988
|
data: {
|
|
1989
|
-
store:
|
|
1990
|
-
action:
|
|
1989
|
+
store: Y(o.$id),
|
|
1990
|
+
action: Y(a),
|
|
1991
1991
|
args: u,
|
|
1992
1992
|
result: c
|
|
1993
1993
|
},
|
|
1994
|
-
groupId:
|
|
1994
|
+
groupId: v
|
|
1995
1995
|
}
|
|
1996
1996
|
});
|
|
1997
|
-
}),
|
|
1997
|
+
}), s((c) => {
|
|
1998
1998
|
re = void 0, t.addTimelineEvent({
|
|
1999
1999
|
layerId: ue,
|
|
2000
2000
|
event: {
|
|
@@ -2003,41 +2003,41 @@ function us(e, o) {
|
|
|
2003
2003
|
title: "💥 " + a,
|
|
2004
2004
|
subtitle: "end",
|
|
2005
2005
|
data: {
|
|
2006
|
-
store:
|
|
2007
|
-
action:
|
|
2006
|
+
store: Y(o.$id),
|
|
2007
|
+
action: Y(a),
|
|
2008
2008
|
args: u,
|
|
2009
2009
|
error: c
|
|
2010
2010
|
},
|
|
2011
|
-
groupId:
|
|
2011
|
+
groupId: v
|
|
2012
2012
|
}
|
|
2013
2013
|
});
|
|
2014
2014
|
});
|
|
2015
2015
|
}, !0), o._customProperties.forEach((i) => {
|
|
2016
|
-
|
|
2017
|
-
t.notifyComponentUpdate(), t.sendInspectorState(
|
|
2016
|
+
F(() => T(o[i]), (s, a) => {
|
|
2017
|
+
t.notifyComponentUpdate(), t.sendInspectorState(U), Ce && t.addTimelineEvent({
|
|
2018
2018
|
layerId: ue,
|
|
2019
2019
|
event: {
|
|
2020
2020
|
time: n(),
|
|
2021
2021
|
title: "Change",
|
|
2022
2022
|
subtitle: i,
|
|
2023
2023
|
data: {
|
|
2024
|
-
newValue:
|
|
2024
|
+
newValue: s,
|
|
2025
2025
|
oldValue: a
|
|
2026
2026
|
},
|
|
2027
2027
|
groupId: re
|
|
2028
2028
|
}
|
|
2029
2029
|
});
|
|
2030
2030
|
}, { deep: !0 });
|
|
2031
|
-
}), o.$subscribe(({ events: i, type:
|
|
2032
|
-
if (t.notifyComponentUpdate(), t.sendInspectorState(
|
|
2031
|
+
}), o.$subscribe(({ events: i, type: s }, a) => {
|
|
2032
|
+
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !Ce)
|
|
2033
2033
|
return;
|
|
2034
2034
|
const u = {
|
|
2035
2035
|
time: n(),
|
|
2036
|
-
title:
|
|
2037
|
-
data:
|
|
2036
|
+
title: r2(s),
|
|
2037
|
+
data: i2({ store: Y(o.$id) }, s2(i)),
|
|
2038
2038
|
groupId: re
|
|
2039
2039
|
};
|
|
2040
|
-
|
|
2040
|
+
s === ne.patchFunction ? u.subtitle = "⤵️" : s === ne.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
2041
2041
|
_custom: {
|
|
2042
2042
|
display: "DebuggerEvent",
|
|
2043
2043
|
type: "object",
|
|
@@ -2049,32 +2049,32 @@ function us(e, o) {
|
|
|
2049
2049
|
event: u
|
|
2050
2050
|
});
|
|
2051
2051
|
}, { detached: !0, flush: "sync" });
|
|
2052
|
-
const
|
|
2052
|
+
const l = o._hotUpdate;
|
|
2053
2053
|
o._hotUpdate = de((i) => {
|
|
2054
|
-
|
|
2054
|
+
l(i), t.addTimelineEvent({
|
|
2055
2055
|
layerId: ue,
|
|
2056
2056
|
event: {
|
|
2057
2057
|
time: n(),
|
|
2058
2058
|
title: "🔥 " + o.$id,
|
|
2059
2059
|
subtitle: "HMR update",
|
|
2060
2060
|
data: {
|
|
2061
|
-
store:
|
|
2062
|
-
info:
|
|
2061
|
+
store: Y(o.$id),
|
|
2062
|
+
info: Y("HMR update")
|
|
2063
2063
|
}
|
|
2064
2064
|
}
|
|
2065
|
-
}), t.notifyComponentUpdate(), t.sendInspectorTree(
|
|
2065
|
+
}), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
2066
2066
|
});
|
|
2067
2067
|
const { $dispose: r } = o;
|
|
2068
2068
|
o.$dispose = () => {
|
|
2069
|
-
r(), t.notifyComponentUpdate(), t.sendInspectorTree(
|
|
2070
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(
|
|
2069
|
+
r(), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`Disposed "${o.$id}" store 🗑`);
|
|
2070
|
+
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`"${o.$id}" store installed 🆕`);
|
|
2071
2071
|
});
|
|
2072
2072
|
}
|
|
2073
2073
|
let nn = 0, re;
|
|
2074
2074
|
function gt(e, o, t) {
|
|
2075
|
-
const n = o.reduce((
|
|
2076
|
-
for (const
|
|
2077
|
-
e[
|
|
2075
|
+
const n = o.reduce((l, r) => (l[r] = K(e)[r], l), {});
|
|
2076
|
+
for (const l in n)
|
|
2077
|
+
e[l] = function() {
|
|
2078
2078
|
const r = nn, i = t ? new Proxy(e, {
|
|
2079
2079
|
get(...a) {
|
|
2080
2080
|
return re = r, Reflect.get(...a);
|
|
@@ -2084,32 +2084,32 @@ function gt(e, o, t) {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
}) : e;
|
|
2086
2086
|
re = r;
|
|
2087
|
-
const
|
|
2088
|
-
return re = void 0,
|
|
2087
|
+
const s = n[l].apply(i, arguments);
|
|
2088
|
+
return re = void 0, s;
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2091
|
+
function c2({ app: e, store: o, options: t }) {
|
|
2092
2092
|
if (o.$id.startsWith("__hot:"))
|
|
2093
2093
|
return;
|
|
2094
2094
|
o._isOptionsAPI = !!t.state, gt(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2095
2095
|
const n = o._hotUpdate;
|
|
2096
|
-
|
|
2097
|
-
n.apply(this, arguments), gt(o, Object.keys(
|
|
2098
|
-
},
|
|
2096
|
+
K(o)._hotUpdate = function(l) {
|
|
2097
|
+
n.apply(this, arguments), gt(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2098
|
+
}, u2(
|
|
2099
2099
|
e,
|
|
2100
2100
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2101
2101
|
o
|
|
2102
2102
|
);
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2105
|
-
const e =
|
|
2104
|
+
function d2() {
|
|
2105
|
+
const e = Ot(!0), o = e.run(() => E({}));
|
|
2106
2106
|
let t = [], n = [];
|
|
2107
|
-
const
|
|
2107
|
+
const l = de({
|
|
2108
2108
|
install(r) {
|
|
2109
|
-
|
|
2109
|
+
Ie(l), l._a = r, r.provide(qt, l), r.config.globalProperties.$pinia = l, Ee && a2(r, l), n.forEach((i) => t.push(i)), n = [];
|
|
2110
2110
|
},
|
|
2111
2111
|
use(r) {
|
|
2112
|
-
return !this._a && !
|
|
2112
|
+
return !this._a && !Zt ? n.push(r) : t.push(r), this;
|
|
2113
2113
|
},
|
|
2114
2114
|
_p: t,
|
|
2115
2115
|
// it's actually undefined here
|
|
@@ -2119,231 +2119,231 @@ function ds() {
|
|
|
2119
2119
|
_s: /* @__PURE__ */ new Map(),
|
|
2120
2120
|
state: o
|
|
2121
2121
|
});
|
|
2122
|
-
return Ee && typeof Proxy < "u" &&
|
|
2122
|
+
return Ee && typeof Proxy < "u" && l.use(c2), l;
|
|
2123
2123
|
}
|
|
2124
2124
|
function on(e, o) {
|
|
2125
2125
|
for (const t in o) {
|
|
2126
2126
|
const n = o[t];
|
|
2127
2127
|
if (!(t in e))
|
|
2128
2128
|
continue;
|
|
2129
|
-
const
|
|
2130
|
-
fe(
|
|
2129
|
+
const l = e[t];
|
|
2130
|
+
fe(l) && fe(n) && !xe(n) && !tt(n) ? e[t] = on(l, n) : e[t] = n;
|
|
2131
2131
|
}
|
|
2132
2132
|
return e;
|
|
2133
2133
|
}
|
|
2134
|
-
const
|
|
2134
|
+
const ln = () => {
|
|
2135
2135
|
};
|
|
2136
|
-
function bt(e, o, t, n =
|
|
2136
|
+
function bt(e, o, t, n = ln) {
|
|
2137
2137
|
e.push(o);
|
|
2138
|
-
const
|
|
2138
|
+
const l = () => {
|
|
2139
2139
|
const r = e.indexOf(o);
|
|
2140
2140
|
r > -1 && (e.splice(r, 1), n());
|
|
2141
2141
|
};
|
|
2142
|
-
return !t &&
|
|
2142
|
+
return !t && It() && Xe(l), l;
|
|
2143
2143
|
}
|
|
2144
2144
|
function be(e, ...o) {
|
|
2145
2145
|
e.slice().forEach((t) => {
|
|
2146
2146
|
t(...o);
|
|
2147
2147
|
});
|
|
2148
2148
|
}
|
|
2149
|
-
const
|
|
2150
|
-
function
|
|
2149
|
+
const f2 = (e) => e();
|
|
2150
|
+
function Ye(e, o) {
|
|
2151
2151
|
e instanceof Map && o instanceof Map && o.forEach((t, n) => e.set(n, t)), e instanceof Set && o instanceof Set && o.forEach(e.add, e);
|
|
2152
2152
|
for (const t in o) {
|
|
2153
2153
|
if (!o.hasOwnProperty(t))
|
|
2154
2154
|
continue;
|
|
2155
|
-
const n = o[t],
|
|
2156
|
-
fe(
|
|
2155
|
+
const n = o[t], l = e[t];
|
|
2156
|
+
fe(l) && fe(n) && e.hasOwnProperty(t) && !xe(n) && !tt(n) ? e[t] = Ye(l, n) : e[t] = n;
|
|
2157
2157
|
}
|
|
2158
2158
|
return e;
|
|
2159
2159
|
}
|
|
2160
|
-
const
|
|
2160
|
+
const v2 = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2161
2161
|
/* istanbul ignore next */
|
|
2162
2162
|
Symbol()
|
|
2163
2163
|
);
|
|
2164
|
-
function
|
|
2165
|
-
return !fe(e) || !e.hasOwnProperty(
|
|
2164
|
+
function p2(e) {
|
|
2165
|
+
return !fe(e) || !e.hasOwnProperty(v2);
|
|
2166
2166
|
}
|
|
2167
|
-
const { assign:
|
|
2168
|
-
function
|
|
2167
|
+
const { assign: J } = Object;
|
|
2168
|
+
function Ct(e) {
|
|
2169
2169
|
return !!(xe(e) && e.effect);
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2172
|
-
const { state:
|
|
2171
|
+
function _t(e, o, t, n) {
|
|
2172
|
+
const { state: l, actions: r, getters: i } = o, s = t.state.value[e];
|
|
2173
2173
|
let a;
|
|
2174
2174
|
function u() {
|
|
2175
|
-
!
|
|
2176
|
-
const
|
|
2175
|
+
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2176
|
+
const v = process.env.NODE_ENV !== "production" && n ? (
|
|
2177
2177
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2178
|
-
at(E(
|
|
2178
|
+
at(E(l ? l() : {}).value)
|
|
2179
2179
|
) : at(t.state.value[e]);
|
|
2180
|
-
return
|
|
2181
|
-
|
|
2180
|
+
return J(v, r, Object.keys(i || {}).reduce((c, p) => (process.env.NODE_ENV !== "production" && p in v && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`), c[p] = de(y(() => {
|
|
2181
|
+
Ie(t);
|
|
2182
2182
|
const m = t._s.get(e);
|
|
2183
|
-
return i[
|
|
2183
|
+
return i[p].call(m, m);
|
|
2184
2184
|
})), c), {}));
|
|
2185
2185
|
}
|
|
2186
|
-
return a =
|
|
2186
|
+
return a = Qe(e, u, o, t, n, !0), a;
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function Qe(e, o, t = {}, n, l, r) {
|
|
2189
2189
|
let i;
|
|
2190
|
-
const
|
|
2190
|
+
const s = J({ actions: {} }, t);
|
|
2191
2191
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2192
2192
|
throw new Error("Pinia destroyed");
|
|
2193
2193
|
const a = {
|
|
2194
2194
|
deep: !0
|
|
2195
2195
|
// flush: 'post',
|
|
2196
2196
|
};
|
|
2197
|
-
process.env.NODE_ENV !== "production" && !
|
|
2198
|
-
u ? m = d : u == !1 && !
|
|
2197
|
+
process.env.NODE_ENV !== "production" && !Zt && (a.onTrigger = (d) => {
|
|
2198
|
+
u ? m = d : u == !1 && !C._hotUpdating && (Array.isArray(m) ? m.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2199
2199
|
});
|
|
2200
|
-
let u,
|
|
2201
|
-
const
|
|
2202
|
-
!r && !
|
|
2203
|
-
const
|
|
2204
|
-
let
|
|
2205
|
-
function
|
|
2200
|
+
let u, v, c = [], p = [], m;
|
|
2201
|
+
const h = n.state.value[e];
|
|
2202
|
+
!r && !h && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2203
|
+
const $ = E({});
|
|
2204
|
+
let N;
|
|
2205
|
+
function L(d) {
|
|
2206
2206
|
let f;
|
|
2207
|
-
u =
|
|
2207
|
+
u = v = !1, process.env.NODE_ENV !== "production" && (m = []), typeof d == "function" ? (d(n.state.value[e]), f = {
|
|
2208
2208
|
type: ne.patchFunction,
|
|
2209
2209
|
storeId: e,
|
|
2210
2210
|
events: m
|
|
2211
|
-
}) : (
|
|
2211
|
+
}) : (Ye(n.state.value[e], d), f = {
|
|
2212
2212
|
type: ne.patchObject,
|
|
2213
2213
|
payload: d,
|
|
2214
2214
|
storeId: e,
|
|
2215
2215
|
events: m
|
|
2216
2216
|
});
|
|
2217
|
-
const x =
|
|
2217
|
+
const x = N = Symbol();
|
|
2218
2218
|
te().then(() => {
|
|
2219
|
-
|
|
2220
|
-
}),
|
|
2219
|
+
N === x && (u = !0);
|
|
2220
|
+
}), v = !0, be(c, f, n.state.value[e]);
|
|
2221
2221
|
}
|
|
2222
|
-
const
|
|
2222
|
+
const I = r ? function() {
|
|
2223
2223
|
const { state: f } = t, x = f ? f() : {};
|
|
2224
|
-
this.$patch((
|
|
2225
|
-
|
|
2224
|
+
this.$patch((S) => {
|
|
2225
|
+
J(S, x);
|
|
2226
2226
|
});
|
|
2227
2227
|
} : (
|
|
2228
2228
|
/* istanbul ignore next */
|
|
2229
2229
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2230
2230
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2231
|
-
} :
|
|
2231
|
+
} : ln
|
|
2232
2232
|
);
|
|
2233
|
-
function
|
|
2234
|
-
i.stop(), c = [],
|
|
2233
|
+
function R() {
|
|
2234
|
+
i.stop(), c = [], p = [], n._s.delete(e);
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function A(d, f) {
|
|
2237
2237
|
return function() {
|
|
2238
|
-
|
|
2239
|
-
const x = Array.from(arguments),
|
|
2240
|
-
function
|
|
2241
|
-
|
|
2238
|
+
Ie(n);
|
|
2239
|
+
const x = Array.from(arguments), S = [], k = [];
|
|
2240
|
+
function D(j) {
|
|
2241
|
+
S.push(j);
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2244
|
-
|
|
2243
|
+
function G(j) {
|
|
2244
|
+
k.push(j);
|
|
2245
2245
|
}
|
|
2246
|
-
be(
|
|
2246
|
+
be(p, {
|
|
2247
2247
|
args: x,
|
|
2248
2248
|
name: d,
|
|
2249
|
-
store:
|
|
2250
|
-
after:
|
|
2251
|
-
onError:
|
|
2249
|
+
store: C,
|
|
2250
|
+
after: D,
|
|
2251
|
+
onError: G
|
|
2252
2252
|
});
|
|
2253
|
-
let
|
|
2253
|
+
let q;
|
|
2254
2254
|
try {
|
|
2255
|
-
|
|
2256
|
-
} catch (
|
|
2257
|
-
throw be(
|
|
2255
|
+
q = f.apply(this && this.$id === e ? this : C, x);
|
|
2256
|
+
} catch (j) {
|
|
2257
|
+
throw be(k, j), j;
|
|
2258
2258
|
}
|
|
2259
|
-
return
|
|
2259
|
+
return q instanceof Promise ? q.then((j) => (be(S, j), j)).catch((j) => (be(k, j), Promise.reject(j))) : (be(S, q), q);
|
|
2260
2260
|
};
|
|
2261
2261
|
}
|
|
2262
|
-
const
|
|
2262
|
+
const _ = /* @__PURE__ */ de({
|
|
2263
2263
|
actions: {},
|
|
2264
2264
|
getters: {},
|
|
2265
2265
|
state: [],
|
|
2266
|
-
hotState:
|
|
2267
|
-
}),
|
|
2266
|
+
hotState: $
|
|
2267
|
+
}), P = {
|
|
2268
2268
|
_p: n,
|
|
2269
2269
|
// _s: scope,
|
|
2270
2270
|
$id: e,
|
|
2271
|
-
$onAction: bt.bind(null,
|
|
2272
|
-
$patch:
|
|
2273
|
-
$reset:
|
|
2271
|
+
$onAction: bt.bind(null, p),
|
|
2272
|
+
$patch: L,
|
|
2273
|
+
$reset: I,
|
|
2274
2274
|
$subscribe(d, f = {}) {
|
|
2275
|
-
const x = bt(c, d, f.detached, () =>
|
|
2276
|
-
(f.flush === "sync" ?
|
|
2275
|
+
const x = bt(c, d, f.detached, () => S()), S = i.run(() => F(() => n.state.value[e], (k) => {
|
|
2276
|
+
(f.flush === "sync" ? v : u) && d({
|
|
2277
2277
|
storeId: e,
|
|
2278
2278
|
type: ne.direct,
|
|
2279
2279
|
events: m
|
|
2280
|
-
},
|
|
2281
|
-
},
|
|
2280
|
+
}, k);
|
|
2281
|
+
}, J({}, a, f)));
|
|
2282
2282
|
return x;
|
|
2283
2283
|
},
|
|
2284
|
-
$dispose:
|
|
2285
|
-
},
|
|
2284
|
+
$dispose: R
|
|
2285
|
+
}, C = St(process.env.NODE_ENV !== "production" || Ee ? J(
|
|
2286
2286
|
{
|
|
2287
|
-
_hmrPayload:
|
|
2287
|
+
_hmrPayload: _,
|
|
2288
2288
|
_customProperties: de(/* @__PURE__ */ new Set())
|
|
2289
2289
|
// devtools custom properties
|
|
2290
2290
|
},
|
|
2291
|
-
|
|
2291
|
+
P
|
|
2292
2292
|
// must be added later
|
|
2293
2293
|
// setupStore
|
|
2294
|
-
) :
|
|
2295
|
-
n._s.set(e,
|
|
2296
|
-
const
|
|
2297
|
-
for (const d in
|
|
2298
|
-
const f =
|
|
2299
|
-
if (xe(f) && !
|
|
2300
|
-
process.env.NODE_ENV !== "production" &&
|
|
2294
|
+
) : P);
|
|
2295
|
+
n._s.set(e, C);
|
|
2296
|
+
const V = (n._a && n._a.runWithContext || f2)(() => n._e.run(() => (i = Ot()).run(o)));
|
|
2297
|
+
for (const d in V) {
|
|
2298
|
+
const f = V[d];
|
|
2299
|
+
if (xe(f) && !Ct(f) || tt(f))
|
|
2300
|
+
process.env.NODE_ENV !== "production" && l ? Me($.value, d, Ze(V, d)) : r || (h && p2(f) && (xe(f) ? f.value = h[d] : Ye(f, h[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && _.state.push(d);
|
|
2301
2301
|
else if (typeof f == "function") {
|
|
2302
|
-
const x = process.env.NODE_ENV !== "production" &&
|
|
2303
|
-
|
|
2304
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
2302
|
+
const x = process.env.NODE_ENV !== "production" && l ? f : A(d, f);
|
|
2303
|
+
V[d] = x, process.env.NODE_ENV !== "production" && (_.actions[d] = f), s.actions[d] = f;
|
|
2304
|
+
} else process.env.NODE_ENV !== "production" && Ct(f) && (_.getters[d] = r ? (
|
|
2305
2305
|
// @ts-expect-error
|
|
2306
2306
|
t.getters[d]
|
|
2307
|
-
) : f, Be && (
|
|
2308
|
-
(
|
|
2307
|
+
) : f, Be && (V._getters || // @ts-expect-error: same
|
|
2308
|
+
(V._getters = de([]))).push(d));
|
|
2309
2309
|
}
|
|
2310
|
-
if (
|
|
2311
|
-
get: () => process.env.NODE_ENV !== "production" &&
|
|
2310
|
+
if (J(C, V), J(K(C), V), Object.defineProperty(C, "$state", {
|
|
2311
|
+
get: () => process.env.NODE_ENV !== "production" && l ? $.value : n.state.value[e],
|
|
2312
2312
|
set: (d) => {
|
|
2313
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2313
|
+
if (process.env.NODE_ENV !== "production" && l)
|
|
2314
2314
|
throw new Error("cannot set hotState");
|
|
2315
|
-
|
|
2316
|
-
|
|
2315
|
+
L((f) => {
|
|
2316
|
+
J(f, d);
|
|
2317
2317
|
});
|
|
2318
2318
|
}
|
|
2319
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
2320
|
-
|
|
2321
|
-
if (f in
|
|
2322
|
-
const x = d.$state[f],
|
|
2323
|
-
typeof x == "object" && fe(x) && fe(
|
|
2319
|
+
}), process.env.NODE_ENV !== "production" && (C._hotUpdate = de((d) => {
|
|
2320
|
+
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2321
|
+
if (f in C.$state) {
|
|
2322
|
+
const x = d.$state[f], S = C.$state[f];
|
|
2323
|
+
typeof x == "object" && fe(x) && fe(S) ? on(x, S) : d.$state[f] = S;
|
|
2324
2324
|
}
|
|
2325
|
-
|
|
2326
|
-
}), Object.keys(
|
|
2327
|
-
f in d.$state ||
|
|
2328
|
-
}), u = !1,
|
|
2325
|
+
Me(C, f, Ze(d.$state, f));
|
|
2326
|
+
}), Object.keys(C.$state).forEach((f) => {
|
|
2327
|
+
f in d.$state || qe(C, f);
|
|
2328
|
+
}), u = !1, v = !1, n.state.value[e] = Ze(d._hmrPayload, "hotState"), v = !0, te().then(() => {
|
|
2329
2329
|
u = !0;
|
|
2330
2330
|
});
|
|
2331
2331
|
for (const f in d._hmrPayload.actions) {
|
|
2332
2332
|
const x = d[f];
|
|
2333
|
-
|
|
2333
|
+
Me(C, f, A(f, x));
|
|
2334
2334
|
}
|
|
2335
2335
|
for (const f in d._hmrPayload.getters) {
|
|
2336
|
-
const x = d._hmrPayload.getters[f],
|
|
2336
|
+
const x = d._hmrPayload.getters[f], S = r ? (
|
|
2337
2337
|
// special handling of options api
|
|
2338
|
-
|
|
2338
|
+
y(() => (Ie(n), x.call(C, C)))
|
|
2339
2339
|
) : x;
|
|
2340
|
-
|
|
2340
|
+
Me(C, f, S);
|
|
2341
2341
|
}
|
|
2342
|
-
Object.keys(
|
|
2343
|
-
f in d._hmrPayload.getters ||
|
|
2344
|
-
}), Object.keys(
|
|
2345
|
-
f in d._hmrPayload.actions ||
|
|
2346
|
-
}),
|
|
2342
|
+
Object.keys(C._hmrPayload.getters).forEach((f) => {
|
|
2343
|
+
f in d._hmrPayload.getters || qe(C, f);
|
|
2344
|
+
}), Object.keys(C._hmrPayload.actions).forEach((f) => {
|
|
2345
|
+
f in d._hmrPayload.actions || qe(C, f);
|
|
2346
|
+
}), C._hmrPayload = d._hmrPayload, C._getters = d._getters, C._hotUpdating = !1;
|
|
2347
2347
|
})), Ee) {
|
|
2348
2348
|
const d = {
|
|
2349
2349
|
writable: !0,
|
|
@@ -2352,67 +2352,67 @@ function Xe(e, o, t = {}, n, s, r) {
|
|
|
2352
2352
|
enumerable: !1
|
|
2353
2353
|
};
|
|
2354
2354
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((f) => {
|
|
2355
|
-
Object.defineProperty(
|
|
2355
|
+
Object.defineProperty(C, f, J({ value: C[f] }, d));
|
|
2356
2356
|
});
|
|
2357
2357
|
}
|
|
2358
2358
|
return n._p.forEach((d) => {
|
|
2359
2359
|
if (Ee) {
|
|
2360
2360
|
const f = i.run(() => d({
|
|
2361
|
-
store:
|
|
2361
|
+
store: C,
|
|
2362
2362
|
app: n._a,
|
|
2363
2363
|
pinia: n,
|
|
2364
|
-
options:
|
|
2364
|
+
options: s
|
|
2365
2365
|
}));
|
|
2366
|
-
Object.keys(f || {}).forEach((x) =>
|
|
2366
|
+
Object.keys(f || {}).forEach((x) => C._customProperties.add(x)), J(C, f);
|
|
2367
2367
|
} else
|
|
2368
|
-
|
|
2369
|
-
store:
|
|
2368
|
+
J(C, i.run(() => d({
|
|
2369
|
+
store: C,
|
|
2370
2370
|
app: n._a,
|
|
2371
2371
|
pinia: n,
|
|
2372
|
-
options:
|
|
2372
|
+
options: s
|
|
2373
2373
|
})));
|
|
2374
|
-
}), process.env.NODE_ENV !== "production" &&
|
|
2374
|
+
}), process.env.NODE_ENV !== "production" && C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2375
2375
|
state: () => new MyClass()
|
|
2376
|
-
Found in store "${
|
|
2376
|
+
Found in store "${C.$id}".`), h && r && t.hydrate && t.hydrate(C.$state, h), u = !0, v = !0, C;
|
|
2377
2377
|
}
|
|
2378
2378
|
function rt(e, o, t) {
|
|
2379
|
-
let n,
|
|
2379
|
+
let n, l;
|
|
2380
2380
|
const r = typeof o == "function";
|
|
2381
2381
|
if (typeof e == "string")
|
|
2382
|
-
n = e,
|
|
2383
|
-
else if (
|
|
2382
|
+
n = e, l = r ? t : o;
|
|
2383
|
+
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2384
2384
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2385
|
-
function i(
|
|
2386
|
-
const u =
|
|
2387
|
-
if (
|
|
2385
|
+
function i(s, a) {
|
|
2386
|
+
const u = vn();
|
|
2387
|
+
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2388
2388
|
// pinia instance with getActivePinia()
|
|
2389
|
-
(process.env.NODE_ENV === "test" &&
|
|
2389
|
+
(process.env.NODE_ENV === "test" && we && we._testing ? null : s) || (u ? Le(qt, null) : null), s && Ie(s), process.env.NODE_ENV !== "production" && !we)
|
|
2390
2390
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2391
2391
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2392
2392
|
This will fail in production.`);
|
|
2393
|
-
|
|
2394
|
-
const
|
|
2393
|
+
s = we, s._s.has(n) || (r ? Qe(n, o, l, s) : _t(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2394
|
+
const v = s._s.get(n);
|
|
2395
2395
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2396
|
-
const c = "__hot:" + n,
|
|
2397
|
-
a._hotUpdate(
|
|
2396
|
+
const c = "__hot:" + n, p = r ? Qe(c, o, l, s, !0) : _t(c, J({}, l), s, !0);
|
|
2397
|
+
a._hotUpdate(p), delete s.state.value[c], s._s.delete(c);
|
|
2398
2398
|
}
|
|
2399
2399
|
if (process.env.NODE_ENV !== "production" && Be) {
|
|
2400
|
-
const c =
|
|
2400
|
+
const c = $t();
|
|
2401
2401
|
if (c && c.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2402
2402
|
!a) {
|
|
2403
|
-
const
|
|
2404
|
-
m[n] =
|
|
2403
|
+
const p = c.proxy, m = "_pStores" in p ? p._pStores : p._pStores = {};
|
|
2404
|
+
m[n] = v;
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
|
-
return
|
|
2407
|
+
return v;
|
|
2408
2408
|
}
|
|
2409
2409
|
return i.$id = n, i;
|
|
2410
2410
|
}
|
|
2411
|
-
const
|
|
2411
|
+
const He = rt("language", () => {
|
|
2412
2412
|
const e = E("auto"), o = E("en"), t = E({
|
|
2413
2413
|
src: [],
|
|
2414
2414
|
target: []
|
|
2415
|
-
}), n =
|
|
2415
|
+
}), n = y(() => t.value.src[e.value]), l = y(() => t.value.target[o.value]);
|
|
2416
2416
|
function r(a, u) {
|
|
2417
2417
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2418
2418
|
}
|
|
@@ -2421,110 +2421,110 @@ const ze = rt("language", () => {
|
|
|
2421
2421
|
const a = e.value;
|
|
2422
2422
|
e.value = o.value, o.value = a;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function s(a) {
|
|
2425
2425
|
return t.value.src[a] || t.value.target[a];
|
|
2426
2426
|
}
|
|
2427
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel:
|
|
2428
|
-
}),
|
|
2427
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: r, swap: i, getLabel: s };
|
|
2428
|
+
}), h2 = {
|
|
2429
2429
|
key: 0,
|
|
2430
2430
|
class: "flex"
|
|
2431
|
-
},
|
|
2431
|
+
}, m2 = {
|
|
2432
2432
|
__name: "Selects",
|
|
2433
2433
|
setup(e) {
|
|
2434
|
-
const o =
|
|
2434
|
+
const o = He();
|
|
2435
2435
|
function t() {
|
|
2436
2436
|
o.swap();
|
|
2437
2437
|
}
|
|
2438
|
-
return (n,
|
|
2439
|
-
|
|
2440
|
-
modelValue:
|
|
2441
|
-
"onUpdate:modelValue":
|
|
2442
|
-
languages:
|
|
2438
|
+
return (n, l) => T(o).languages ? (w(), O("div", h2, [
|
|
2439
|
+
H(ht, {
|
|
2440
|
+
modelValue: T(o).src,
|
|
2441
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => T(o).src = r),
|
|
2442
|
+
languages: T(o).languages.src,
|
|
2443
2443
|
class: "grow"
|
|
2444
2444
|
}, null, 8, ["modelValue", "languages"]),
|
|
2445
|
-
|
|
2446
|
-
isBidirect:
|
|
2445
|
+
H(jo, {
|
|
2446
|
+
isBidirect: T(o).src !== "auto",
|
|
2447
2447
|
class: "grow-0 mx-3",
|
|
2448
2448
|
onSwap: t
|
|
2449
2449
|
}, null, 8, ["isBidirect"]),
|
|
2450
|
-
|
|
2451
|
-
modelValue:
|
|
2452
|
-
"onUpdate:modelValue":
|
|
2453
|
-
languages:
|
|
2450
|
+
H(ht, {
|
|
2451
|
+
modelValue: T(o).target,
|
|
2452
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => T(o).target = r),
|
|
2453
|
+
languages: T(o).languages.target,
|
|
2454
2454
|
class: "grow"
|
|
2455
2455
|
}, null, 8, ["modelValue", "languages"])
|
|
2456
|
-
])) :
|
|
2456
|
+
])) : Q("", !0);
|
|
2457
2457
|
}
|
|
2458
|
-
},
|
|
2458
|
+
}, g2 = {
|
|
2459
2459
|
INPUT_MAX_LENGTH: 5e3,
|
|
2460
2460
|
INPUT_DEBOUNCE: 500
|
|
2461
|
-
},
|
|
2461
|
+
}, ze = (e, o) => {
|
|
2462
2462
|
const t = e.__vccOpts || e;
|
|
2463
|
-
for (const [n,
|
|
2464
|
-
t[n] =
|
|
2463
|
+
for (const [n, l] of o)
|
|
2464
|
+
t[n] = l;
|
|
2465
2465
|
return t;
|
|
2466
|
-
},
|
|
2467
|
-
function
|
|
2468
|
-
return
|
|
2466
|
+
}, b2 = {}, C2 = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2467
|
+
function _2(e, o) {
|
|
2468
|
+
return w(), O("span", C2);
|
|
2469
2469
|
}
|
|
2470
|
-
const
|
|
2471
|
-
function
|
|
2472
|
-
const a = E(null), u = E(!1),
|
|
2473
|
-
function
|
|
2474
|
-
var
|
|
2475
|
-
typeof i == "function" && i.call(this),
|
|
2476
|
-
}
|
|
2477
|
-
return
|
|
2478
|
-
const
|
|
2479
|
-
a.value =
|
|
2480
|
-
src:
|
|
2481
|
-
volume:
|
|
2482
|
-
rate:
|
|
2483
|
-
onload:
|
|
2484
|
-
...
|
|
2470
|
+
const x2 = /* @__PURE__ */ ze(b2, [["render", _2]]), y2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e", w2 = "data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e";
|
|
2471
|
+
function E2(e, { volume: o = 1, playbackRate: t = 1, soundEnabled: n = !0, interrupt: l = !1, autoplay: r = !1, onload: i, ...s } = {}) {
|
|
2472
|
+
const a = E(null), u = E(!1), v = E(null), c = E(null);
|
|
2473
|
+
function p() {
|
|
2474
|
+
var L;
|
|
2475
|
+
typeof i == "function" && i.call(this), v.value = (v.value || ((L = c.value) == null ? void 0 : L.duration()) || 0) * 1e3, r === !0 && (u.value = !0);
|
|
2476
|
+
}
|
|
2477
|
+
return ve(async () => {
|
|
2478
|
+
const L = await import("./howler-DJIW9wc6.js").then((I) => I.h);
|
|
2479
|
+
a.value = L.default.Howl, c.value = new a.value({
|
|
2480
|
+
src: T(e),
|
|
2481
|
+
volume: T(o),
|
|
2482
|
+
rate: T(t),
|
|
2483
|
+
onload: p,
|
|
2484
|
+
...s
|
|
2485
2485
|
});
|
|
2486
|
-
}),
|
|
2486
|
+
}), F(
|
|
2487
2487
|
() => [e],
|
|
2488
2488
|
() => {
|
|
2489
2489
|
a.value && a.value && c && c.value && (c.value = new a.value({
|
|
2490
|
-
src:
|
|
2491
|
-
volume:
|
|
2492
|
-
rate:
|
|
2493
|
-
onload:
|
|
2494
|
-
...
|
|
2490
|
+
src: T(e),
|
|
2491
|
+
volume: T(o),
|
|
2492
|
+
rate: T(t),
|
|
2493
|
+
onload: p,
|
|
2494
|
+
...s
|
|
2495
2495
|
}));
|
|
2496
2496
|
}
|
|
2497
|
-
),
|
|
2498
|
-
() => [
|
|
2497
|
+
), F(
|
|
2498
|
+
() => [T(o), T(t)],
|
|
2499
2499
|
() => {
|
|
2500
|
-
c.value && (c.value.volume(
|
|
2500
|
+
c.value && (c.value.volume(T(o)), c.value.rate(T(t)));
|
|
2501
2501
|
}
|
|
2502
2502
|
), {
|
|
2503
|
-
play: (
|
|
2504
|
-
typeof
|
|
2503
|
+
play: (L) => {
|
|
2504
|
+
typeof L > "u" && (L = {}), !(!c.value || !n && !L.forceSoundEnabled) && (l && c.value.stop(), L.playbackRate && c.value.rate(L.playbackRate), c.value.play(L.id), c.value.once("end", () => {
|
|
2505
2505
|
c.value && c.value && !c.value.playing() && (u.value = !1);
|
|
2506
2506
|
}), u.value = !0);
|
|
2507
2507
|
},
|
|
2508
2508
|
sound: c,
|
|
2509
2509
|
isPlaying: u,
|
|
2510
|
-
duration:
|
|
2511
|
-
pause: (
|
|
2512
|
-
c.value && (c.value.pause(typeof
|
|
2510
|
+
duration: v,
|
|
2511
|
+
pause: (L) => {
|
|
2512
|
+
c.value && (c.value.pause(typeof L == "number" ? L : void 0), u.value = !1);
|
|
2513
2513
|
},
|
|
2514
|
-
stop: (
|
|
2515
|
-
c.value && (c.value.stop(typeof
|
|
2514
|
+
stop: (L) => {
|
|
2515
|
+
c.value && (c.value.stop(typeof L == "number" ? L : void 0), u.value = !1);
|
|
2516
2516
|
}
|
|
2517
2517
|
};
|
|
2518
2518
|
}
|
|
2519
|
-
const
|
|
2519
|
+
const S2 = {
|
|
2520
2520
|
key: 0,
|
|
2521
|
-
src:
|
|
2521
|
+
src: y2,
|
|
2522
2522
|
alt: "Play"
|
|
2523
|
-
},
|
|
2523
|
+
}, O2 = {
|
|
2524
2524
|
key: 1,
|
|
2525
|
-
src:
|
|
2525
|
+
src: w2,
|
|
2526
2526
|
alt: "Stop"
|
|
2527
|
-
},
|
|
2527
|
+
}, $2 = {
|
|
2528
2528
|
__name: "SpeakBtn",
|
|
2529
2529
|
props: {
|
|
2530
2530
|
url: {
|
|
@@ -2533,62 +2533,62 @@ const Os = {
|
|
|
2533
2533
|
}
|
|
2534
2534
|
},
|
|
2535
2535
|
setup(e) {
|
|
2536
|
-
const o = e, { play: t, stop: n, isPlaying:
|
|
2537
|
-
|
|
2538
|
-
() =>
|
|
2539
|
-
(
|
|
2540
|
-
r.value =
|
|
2536
|
+
const o = e, { play: t, stop: n, isPlaying: l } = E2(o.url), r = E(!1);
|
|
2537
|
+
F(
|
|
2538
|
+
() => l.value,
|
|
2539
|
+
(s) => {
|
|
2540
|
+
r.value = s;
|
|
2541
2541
|
}
|
|
2542
2542
|
);
|
|
2543
2543
|
function i() {
|
|
2544
|
-
if (
|
|
2544
|
+
if (l.value) {
|
|
2545
2545
|
n();
|
|
2546
2546
|
return;
|
|
2547
2547
|
}
|
|
2548
2548
|
t();
|
|
2549
2549
|
}
|
|
2550
|
-
return (
|
|
2550
|
+
return (s, a) => (w(), O("button", {
|
|
2551
2551
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2552
|
-
onClick:
|
|
2552
|
+
onClick: pn(i, ["prevent"])
|
|
2553
2553
|
}, [
|
|
2554
|
-
|
|
2554
|
+
T(l) ? (w(), O("img", O2)) : (w(), O("img", S2))
|
|
2555
2555
|
]));
|
|
2556
2556
|
}
|
|
2557
|
-
},
|
|
2558
|
-
src:
|
|
2557
|
+
}, I2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", L2 = {}, T2 = { class: "btn btn-xs btn-circle btn-ghost" }, V2 = /* @__PURE__ */ g("img", {
|
|
2558
|
+
src: I2,
|
|
2559
2559
|
alt: "Clear",
|
|
2560
2560
|
class: "w-4"
|
|
2561
|
-
}, null, -1),
|
|
2562
|
-
|
|
2561
|
+
}, null, -1), P2 = [
|
|
2562
|
+
V2
|
|
2563
2563
|
];
|
|
2564
|
-
function
|
|
2565
|
-
return
|
|
2564
|
+
function M2(e, o) {
|
|
2565
|
+
return w(), O("button", T2, P2);
|
|
2566
2566
|
}
|
|
2567
|
-
const
|
|
2567
|
+
const k2 = /* @__PURE__ */ ze(L2, [["render", M2]]), R2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.47207%201.31905C7.57125%201.12371%207.77589%201%208.00001%201C8.22413%201%208.42877%201.12367%208.52795%201.31905L10.3721%204.95175L14.4959%205.53427C14.7177%205.5656%2014.9019%205.7166%2014.9712%205.9238C15.0404%206.13101%2014.9827%206.35843%2014.8222%206.51049L11.8382%209.33816L12.5427%2013.3309C12.5806%2013.5456%2012.4897%2013.7626%2012.3084%2013.8906C12.1272%2014.0187%2011.8868%2014.0356%2011.6884%2013.9342L8.00004%2012.0491L4.31158%2013.9343C4.11323%2014.0356%203.87286%2014.0187%203.69157%2013.8907C3.51028%2013.7627%203.4195%2013.5457%203.45736%2013.3309L4.1618%209.33819L1.17781%206.51052C1.01735%206.35846%200.959571%206.13101%201.02884%205.92383C1.09807%205.71663%201.28232%205.56563%201.50409%205.53431L5.62787%204.95178L7.47207%201.31905Z'%20fill='%23FFC857'/%3e%3c/svg%3e", N2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", D2 = { class: "btn btn-xs btn-circle btn-ghost" }, A2 = {
|
|
2568
2568
|
key: 0,
|
|
2569
|
-
src:
|
|
2569
|
+
src: R2,
|
|
2570
2570
|
alt: "Clear",
|
|
2571
2571
|
class: "w-4"
|
|
2572
|
-
},
|
|
2572
|
+
}, F2 = {
|
|
2573
2573
|
key: 1,
|
|
2574
|
-
src:
|
|
2574
|
+
src: N2,
|
|
2575
2575
|
alt: "Clear",
|
|
2576
2576
|
class: "w-4"
|
|
2577
|
-
},
|
|
2577
|
+
}, j2 = {
|
|
2578
2578
|
__name: "FavoriteBtn",
|
|
2579
2579
|
props: {
|
|
2580
2580
|
isFilled: Boolean
|
|
2581
2581
|
},
|
|
2582
2582
|
setup(e) {
|
|
2583
2583
|
const o = e;
|
|
2584
|
-
return (t, n) => (
|
|
2585
|
-
o.isFilled ? (
|
|
2584
|
+
return (t, n) => (w(), O("button", D2, [
|
|
2585
|
+
o.isFilled ? (w(), O("img", A2)) : (w(), O("img", F2))
|
|
2586
2586
|
]));
|
|
2587
2587
|
}
|
|
2588
|
-
},
|
|
2588
|
+
}, B2 = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, H2 = { class: "text-sm text-gray-600" }, z2 = {
|
|
2589
2589
|
key: 0,
|
|
2590
2590
|
class: "italic"
|
|
2591
|
-
},
|
|
2591
|
+
}, U2 = /* @__PURE__ */ g("div", { class: "flex-grow" }, null, -1), sn = {
|
|
2592
2592
|
__name: "TranslationBtnGroup",
|
|
2593
2593
|
props: {
|
|
2594
2594
|
loading: {
|
|
@@ -2632,157 +2632,157 @@ const Ds = /* @__PURE__ */ Ue(Ts, [["render", Ns]]), Ls = "/assets/icons/favorit
|
|
|
2632
2632
|
emits: ["clear", "favorite"],
|
|
2633
2633
|
setup(e, { emit: o }) {
|
|
2634
2634
|
const t = e, n = o;
|
|
2635
|
-
return (
|
|
2636
|
-
t.tts ? (
|
|
2635
|
+
return (l, r) => (w(), O("div", B2, [
|
|
2636
|
+
t.tts ? (w(), X($2, {
|
|
2637
2637
|
key: 0,
|
|
2638
2638
|
url: t.tts
|
|
2639
|
-
}, null, 8, ["url"])) :
|
|
2640
|
-
g("div",
|
|
2639
|
+
}, null, 8, ["url"])) : Q("", !0),
|
|
2640
|
+
g("div", H2, [
|
|
2641
2641
|
hn(ee(e.srcLabel) + " ", 1),
|
|
2642
|
-
e.phonetic ? (
|
|
2642
|
+
e.phonetic ? (w(), O("span", z2, "- [" + ee(t.phonetic) + "]", 1)) : Q("", !0)
|
|
2643
2643
|
]),
|
|
2644
|
-
|
|
2645
|
-
t.loading ? (
|
|
2646
|
-
t.src && t.isClearBtn ? (
|
|
2644
|
+
U2,
|
|
2645
|
+
t.loading ? (w(), X(x2, { key: 1 })) : Q("", !0),
|
|
2646
|
+
t.src && t.isClearBtn ? (w(), X(k2, {
|
|
2647
2647
|
key: 2,
|
|
2648
2648
|
onClick: r[0] || (r[0] = (i) => n("clear"))
|
|
2649
|
-
})) :
|
|
2650
|
-
t.src && t.isFavoriteBtn ? (
|
|
2649
|
+
})) : Q("", !0),
|
|
2650
|
+
t.src && t.isFavoriteBtn ? (w(), X(j2, {
|
|
2651
2651
|
key: 3,
|
|
2652
2652
|
isFilled: t.isFavorite,
|
|
2653
2653
|
onClick: r[1] || (r[1] = (i) => n("favorite"))
|
|
2654
|
-
}, null, 8, ["isFilled"])) :
|
|
2654
|
+
}, null, 8, ["isFilled"])) : Q("", !0)
|
|
2655
2655
|
]));
|
|
2656
2656
|
}
|
|
2657
2657
|
}, me = rt("translation", () => {
|
|
2658
2658
|
const e = E(null), o = E(null), t = E({
|
|
2659
2659
|
src: null,
|
|
2660
2660
|
target: null
|
|
2661
|
-
}), n = E(null),
|
|
2661
|
+
}), n = E(null), l = E([]), r = E([]), i = E([]), s = E([]), a = E({
|
|
2662
2662
|
src: null,
|
|
2663
2663
|
target: null
|
|
2664
|
-
}), u =
|
|
2665
|
-
function h
|
|
2666
|
-
e.value =
|
|
2664
|
+
}), u = He(), v = y(() => u.getLabel(e.value)), c = y(() => u.getLabel(o.value));
|
|
2665
|
+
function p(h) {
|
|
2666
|
+
e.value = h.src, o.value = h.target, t.value = h.phonetic, n.value = h.result, l.value = h.dictionary, r.value = h.definitions, i.value = h.synonyms, s.value = h.examples, a.value = h.tts;
|
|
2667
2667
|
}
|
|
2668
2668
|
function m() {
|
|
2669
2669
|
e.value = null, o.value = null, t.value = {
|
|
2670
2670
|
src: null,
|
|
2671
2671
|
target: null
|
|
2672
|
-
}, n.value = null,
|
|
2672
|
+
}, n.value = null, l.value = [], r.value = [], i.value = [], s.value = [], a.value = {
|
|
2673
2673
|
src: null,
|
|
2674
2674
|
target: null
|
|
2675
2675
|
};
|
|
2676
2676
|
}
|
|
2677
2677
|
return {
|
|
2678
2678
|
src: e,
|
|
2679
|
-
srcLabel:
|
|
2679
|
+
srcLabel: v,
|
|
2680
2680
|
target: o,
|
|
2681
2681
|
targetLabel: c,
|
|
2682
2682
|
phonetic: t,
|
|
2683
2683
|
result: n,
|
|
2684
|
-
dictionary:
|
|
2684
|
+
dictionary: l,
|
|
2685
2685
|
definitions: r,
|
|
2686
2686
|
synonyms: i,
|
|
2687
|
-
examples:
|
|
2687
|
+
examples: s,
|
|
2688
2688
|
tts: a,
|
|
2689
|
-
init:
|
|
2689
|
+
init: p,
|
|
2690
2690
|
reset: m
|
|
2691
2691
|
};
|
|
2692
2692
|
});
|
|
2693
|
-
function
|
|
2694
|
-
return
|
|
2693
|
+
function Z2(e) {
|
|
2694
|
+
return It() ? (Xe(e), !0) : !1;
|
|
2695
2695
|
}
|
|
2696
|
-
function
|
|
2697
|
-
return typeof e == "function" ? e() :
|
|
2696
|
+
function Fe(e) {
|
|
2697
|
+
return typeof e == "function" ? e() : T(e);
|
|
2698
2698
|
}
|
|
2699
|
-
const
|
|
2699
|
+
const W2 = typeof window < "u" && typeof document < "u";
|
|
2700
2700
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2701
2701
|
const xt = () => {
|
|
2702
2702
|
};
|
|
2703
|
-
function
|
|
2703
|
+
function G2(e, o) {
|
|
2704
2704
|
function t(...n) {
|
|
2705
|
-
return new Promise((
|
|
2706
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(
|
|
2705
|
+
return new Promise((l, r) => {
|
|
2706
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(r);
|
|
2707
2707
|
});
|
|
2708
2708
|
}
|
|
2709
2709
|
return t;
|
|
2710
2710
|
}
|
|
2711
|
-
function
|
|
2712
|
-
let t, n,
|
|
2713
|
-
const r = (
|
|
2714
|
-
clearTimeout(
|
|
2711
|
+
function q2(e, o = {}) {
|
|
2712
|
+
let t, n, l = xt;
|
|
2713
|
+
const r = (s) => {
|
|
2714
|
+
clearTimeout(s), l(), l = xt;
|
|
2715
2715
|
};
|
|
2716
|
-
return (
|
|
2717
|
-
const a =
|
|
2718
|
-
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(
|
|
2719
|
-
|
|
2720
|
-
t && r(t), n = null,
|
|
2716
|
+
return (s) => {
|
|
2717
|
+
const a = Fe(e), u = Fe(o.maxWait);
|
|
2718
|
+
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(s())) : new Promise((v, c) => {
|
|
2719
|
+
l = o.rejectOnCancel ? c : v, u && !n && (n = setTimeout(() => {
|
|
2720
|
+
t && r(t), n = null, v(s());
|
|
2721
2721
|
}, u)), t = setTimeout(() => {
|
|
2722
|
-
n && r(n), n = null,
|
|
2722
|
+
n && r(n), n = null, v(s());
|
|
2723
2723
|
}, a);
|
|
2724
2724
|
});
|
|
2725
2725
|
};
|
|
2726
2726
|
}
|
|
2727
|
-
function
|
|
2728
|
-
return
|
|
2729
|
-
|
|
2727
|
+
function J2(e, o = 200, t = {}) {
|
|
2728
|
+
return G2(
|
|
2729
|
+
q2(o, t),
|
|
2730
2730
|
e
|
|
2731
2731
|
);
|
|
2732
2732
|
}
|
|
2733
|
-
function
|
|
2733
|
+
function yt(e) {
|
|
2734
2734
|
var o;
|
|
2735
|
-
const t =
|
|
2735
|
+
const t = Fe(e);
|
|
2736
2736
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2737
2737
|
}
|
|
2738
|
-
const
|
|
2739
|
-
function
|
|
2740
|
-
const e = E(!1), o =
|
|
2741
|
-
return o &&
|
|
2738
|
+
const K2 = W2 ? window : void 0;
|
|
2739
|
+
function Y2() {
|
|
2740
|
+
const e = E(!1), o = $t();
|
|
2741
|
+
return o && ve(() => {
|
|
2742
2742
|
e.value = !0;
|
|
2743
2743
|
}, o), e;
|
|
2744
2744
|
}
|
|
2745
|
-
function
|
|
2746
|
-
const o =
|
|
2747
|
-
return
|
|
2745
|
+
function Q2(e) {
|
|
2746
|
+
const o = Y2();
|
|
2747
|
+
return y(() => (o.value, !!e()));
|
|
2748
2748
|
}
|
|
2749
|
-
function
|
|
2750
|
-
const { window: n =
|
|
2749
|
+
function X2(e, o, t = {}) {
|
|
2750
|
+
const { window: n = K2, ...l } = t;
|
|
2751
2751
|
let r;
|
|
2752
|
-
const i =
|
|
2752
|
+
const i = Q2(() => n && "ResizeObserver" in n), s = () => {
|
|
2753
2753
|
r && (r.disconnect(), r = void 0);
|
|
2754
|
-
}, a =
|
|
2754
|
+
}, a = y(() => Array.isArray(e) ? e.map((c) => yt(c)) : [yt(e)]), u = F(
|
|
2755
2755
|
a,
|
|
2756
2756
|
(c) => {
|
|
2757
|
-
if (
|
|
2757
|
+
if (s(), i.value && n) {
|
|
2758
2758
|
r = new ResizeObserver(o);
|
|
2759
|
-
for (const
|
|
2760
|
-
|
|
2759
|
+
for (const p of c)
|
|
2760
|
+
p && r.observe(p, l);
|
|
2761
2761
|
}
|
|
2762
2762
|
},
|
|
2763
2763
|
{ immediate: !0, flush: "post" }
|
|
2764
|
-
),
|
|
2765
|
-
|
|
2764
|
+
), v = () => {
|
|
2765
|
+
s(), u();
|
|
2766
2766
|
};
|
|
2767
|
-
return
|
|
2767
|
+
return Z2(v), {
|
|
2768
2768
|
isSupported: i,
|
|
2769
|
-
stop:
|
|
2769
|
+
stop: v
|
|
2770
2770
|
};
|
|
2771
2771
|
}
|
|
2772
2772
|
function rn(e) {
|
|
2773
2773
|
var o;
|
|
2774
|
-
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input),
|
|
2774
|
+
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", r = E(1);
|
|
2775
2775
|
function i() {
|
|
2776
|
-
var
|
|
2776
|
+
var s;
|
|
2777
2777
|
if (!t.value)
|
|
2778
2778
|
return;
|
|
2779
2779
|
let a = "";
|
|
2780
|
-
t.value.style[
|
|
2780
|
+
t.value.style[l] = "1px", r.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Fe(e.styleTarget).style[l] = `${r.value}px` : a = `${r.value}px`, t.value.style[l] = a;
|
|
2781
2781
|
}
|
|
2782
|
-
return
|
|
2783
|
-
var
|
|
2784
|
-
return (
|
|
2785
|
-
}),
|
|
2782
|
+
return F([n, t], () => te(i), { immediate: !0 }), F(r, () => {
|
|
2783
|
+
var s;
|
|
2784
|
+
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2785
|
+
}), X2(t, () => i()), e != null && e.watch && F(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2786
2786
|
textarea: t,
|
|
2787
2787
|
input: n,
|
|
2788
2788
|
triggerResize: i
|
|
@@ -2798,58 +2798,59 @@ const el = {
|
|
|
2798
2798
|
},
|
|
2799
2799
|
emits: ["change", "clear"],
|
|
2800
2800
|
setup(e, { emit: o }) {
|
|
2801
|
-
const t = me(), n = e,
|
|
2802
|
-
var
|
|
2803
|
-
return (
|
|
2804
|
-
}), a =
|
|
2805
|
-
var
|
|
2806
|
-
return (
|
|
2807
|
-
}), { textarea: u } = rn({ input:
|
|
2808
|
-
|
|
2809
|
-
},
|
|
2810
|
-
function
|
|
2811
|
-
if (!
|
|
2801
|
+
const t = me(), n = e, l = E(n.text), r = y(() => t.src), i = y(() => t.srcLabel), s = y(() => {
|
|
2802
|
+
var h;
|
|
2803
|
+
return (h = t.phonetic) == null ? void 0 : h.src;
|
|
2804
|
+
}), a = y(() => {
|
|
2805
|
+
var h;
|
|
2806
|
+
return (h = t.tts) == null ? void 0 : h.src;
|
|
2807
|
+
}), { textarea: u } = rn({ input: l, styleProp: "minHeight" }), v = o, c = J2(() => {
|
|
2808
|
+
v("change", l.value);
|
|
2809
|
+
}, g2.INPUT_DEBOUNCE);
|
|
2810
|
+
function p() {
|
|
2811
|
+
if (!l.value) {
|
|
2812
2812
|
m();
|
|
2813
2813
|
return;
|
|
2814
2814
|
}
|
|
2815
2815
|
c();
|
|
2816
2816
|
}
|
|
2817
2817
|
function m() {
|
|
2818
|
-
|
|
2818
|
+
v("clear"), l.value = "", u.value.focus();
|
|
2819
2819
|
}
|
|
2820
|
-
return
|
|
2820
|
+
return F(
|
|
2821
2821
|
() => n.text,
|
|
2822
|
-
(
|
|
2823
|
-
|
|
2822
|
+
(h) => {
|
|
2823
|
+
l.value = h;
|
|
2824
2824
|
}
|
|
2825
|
-
), (
|
|
2826
|
-
|
|
2825
|
+
), (h, $) => (w(), O(W, null, [
|
|
2826
|
+
H(sn, {
|
|
2827
2827
|
src: r.value,
|
|
2828
2828
|
srcLabel: i.value,
|
|
2829
2829
|
tts: a.value,
|
|
2830
|
-
phonetic:
|
|
2830
|
+
phonetic: s.value,
|
|
2831
2831
|
isClearBtn: !0,
|
|
2832
2832
|
onClear: m
|
|
2833
2833
|
}, null, 8, ["src", "srcLabel", "tts", "phonetic"]),
|
|
2834
|
-
|
|
2834
|
+
Lt(g("textarea", {
|
|
2835
2835
|
ref_key: "textarea",
|
|
2836
2836
|
ref: u,
|
|
2837
|
-
"onUpdate:modelValue":
|
|
2837
|
+
"onUpdate:modelValue": $[0] || ($[0] = (N) => l.value = N),
|
|
2838
2838
|
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
|
|
2839
2839
|
autofocus: "",
|
|
2840
2840
|
rows: "2",
|
|
2841
|
-
onInput:
|
|
2841
|
+
onInput: p,
|
|
2842
|
+
onFocus: $[1] || ($[1] = (N) => N.target.select())
|
|
2842
2843
|
}, null, 544), [
|
|
2843
2844
|
[
|
|
2844
|
-
|
|
2845
|
-
|
|
2845
|
+
Tt,
|
|
2846
|
+
l.value,
|
|
2846
2847
|
void 0,
|
|
2847
2848
|
{ trim: !0 }
|
|
2848
2849
|
]
|
|
2849
2850
|
])
|
|
2850
2851
|
], 64));
|
|
2851
2852
|
}
|
|
2852
|
-
}, tl = /* @__PURE__ */
|
|
2853
|
+
}, tl = /* @__PURE__ */ ze(el, [["__scopeId", "data-v-5ce52ee5"]]), nl = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.2018%204.409H8.2373L7.46364%202H2.79867C2.35907%202%202%202.3595%202%202.7995V10.937C2%2011.376%202.36008%2011.7355%202.79867%2011.7355H7.79971L8.53636%2014H13.2013C13.6404%2014%2014%2013.6465%2014%2013.214V5.195C14%204.7625%2013.6404%204.409%2013.2018%204.409ZM5.3702%208.749C4.33499%208.749%203.49481%207.909%203.49481%206.874C3.49481%205.839%204.33499%204.999%205.3702%204.999C5.87631%204.999%206.3004%205.1865%206.62646%205.487L6.13136%205.963C5.9244%205.77181%205.65196%205.66729%205.3702%205.671C4.71757%205.671%204.18846%206.211%204.18846%206.8755C4.18846%207.54%204.71757%208.08%205.3697%208.08C6.12336%208.08%206.43492%207.54%206.46493%207.176L5.3707%207.175V6.533H7.12607C7.15107%206.648%207.17108%206.7615%207.17108%206.915C7.17108%207.9885%206.45393%208.7495%205.3697%208.7495L5.3702%208.749ZM13.7504%2013.214C13.7504%2013.509%2013.5044%2013.75%2013.2018%2013.75H8.76341L10.5883%2011.735H10.5908L10.2207%2010.584L10.2237%2010.5815C10.2237%2010.5815%2010.5078%2010.3375%2010.8623%209.9615C11.2184%2010.347%2011.6775%2010.811%2012.2716%2011.364L12.6572%2010.978C12.0211%2010.401%2011.555%209.943%2011.2119%209.5755C11.6715%209.032%2012.1381%208.348%2012.2366%207.722H13.2538V7.723H13.2548V7.253H10.9884V6.493H10.2527V7.253H9.15049L8.31432%204.648L8.31732%204.659H13.2018C13.5044%204.659%2013.7504%204.899%2013.7504%205.195V13.214ZM10.5078%209.5585C10.2397%209.8325%2010.0362%209.995%2010.0362%209.995L10.0322%209.997L9.30202%207.723H11.6845C11.531%208.265%2011.1904%208.777%2010.8588%209.175C10.2707%208.479%2010.2687%208.253%2010.2687%208.253H9.6576C9.6576%208.253%209.6826%208.5925%2010.5078%209.5585Z'%20fill='%237E7E7E'/%3e%3c/svg%3e", an = rt("loader", () => ({ loading: E(!1) })), ol = (e) => (mn("data-v-5a9dbf88"), e = e(), gn(), e), ll = { class: "flex flex-col" }, sl = /* @__PURE__ */ ol(() => /* @__PURE__ */ g("div", { class: "w-full flex align-item-center justify-end" }, [
|
|
2853
2854
|
/* @__PURE__ */ g("span", { class: "text-sm" }, "Powered by Google Translate"),
|
|
2854
2855
|
/* @__PURE__ */ g("img", {
|
|
2855
2856
|
src: nl,
|
|
@@ -2862,92 +2863,91 @@ const el = {
|
|
|
2862
2863
|
isFavoriteFeatureEnabled: Boolean
|
|
2863
2864
|
},
|
|
2864
2865
|
setup(e) {
|
|
2865
|
-
const o = me(), t = E(!1), n =
|
|
2866
|
-
var
|
|
2867
|
-
return (
|
|
2868
|
-
}),
|
|
2869
|
-
var
|
|
2870
|
-
return (
|
|
2871
|
-
}), a = e, u = an(), { textarea:
|
|
2872
|
-
return (
|
|
2873
|
-
|
|
2874
|
-
loading:
|
|
2875
|
-
src:
|
|
2866
|
+
const o = me(), t = E(!1), n = y(() => o.result), l = y(() => o.target), r = y(() => o.targetLabel), i = y(() => {
|
|
2867
|
+
var p;
|
|
2868
|
+
return (p = o.phonetic) == null ? void 0 : p.target;
|
|
2869
|
+
}), s = y(() => {
|
|
2870
|
+
var p;
|
|
2871
|
+
return (p = o.tts) == null ? void 0 : p.target;
|
|
2872
|
+
}), a = e, u = an(), { textarea: v, input: c } = rn({ input: n, styleProp: "minHeight" });
|
|
2873
|
+
return (p, m) => (w(), O(W, null, [
|
|
2874
|
+
H(sn, {
|
|
2875
|
+
loading: T(u).loading,
|
|
2876
|
+
src: l.value,
|
|
2876
2877
|
srcLabel: r.value,
|
|
2877
|
-
tts:
|
|
2878
|
+
tts: s.value,
|
|
2878
2879
|
isFavoriteBtn: a.isFavoriteFeatureEnabled,
|
|
2879
2880
|
isFavorite: t.value,
|
|
2880
2881
|
phonetic: i.value,
|
|
2881
|
-
onFavorite: m[0] || (m[0] = (
|
|
2882
|
+
onFavorite: m[0] || (m[0] = (h) => t.value = !t.value)
|
|
2882
2883
|
}, null, 8, ["loading", "src", "srcLabel", "tts", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2883
|
-
g("div",
|
|
2884
|
-
|
|
2884
|
+
g("div", ll, [
|
|
2885
|
+
Lt(g("textarea", {
|
|
2885
2886
|
ref_key: "textarea",
|
|
2886
|
-
ref:
|
|
2887
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
2887
|
+
ref: v,
|
|
2888
|
+
"onUpdate:modelValue": m[1] || (m[1] = (h) => xe(c) ? c.value = h : null),
|
|
2888
2889
|
class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
|
|
2889
2890
|
readonly: "",
|
|
2890
2891
|
rows: "2",
|
|
2891
2892
|
spellcheck: "false"
|
|
2892
2893
|
}, null, 512), [
|
|
2893
|
-
[
|
|
2894
|
+
[Tt, T(c)]
|
|
2894
2895
|
]),
|
|
2895
|
-
|
|
2896
|
+
sl
|
|
2896
2897
|
])
|
|
2897
2898
|
], 64));
|
|
2898
2899
|
}
|
|
2899
|
-
}, il = /* @__PURE__ */
|
|
2900
|
+
}, il = /* @__PURE__ */ ze(rl, [["__scopeId", "data-v-5a9dbf88"]]), al = { class: "btn btn-sm btn-circle btn-ghost" }, Ue = {
|
|
2900
2901
|
__name: "ToggleBtn",
|
|
2901
2902
|
props: {
|
|
2902
2903
|
isExpanded: Boolean
|
|
2903
2904
|
},
|
|
2904
2905
|
setup(e) {
|
|
2905
2906
|
const o = e;
|
|
2906
|
-
return (t, n) => (
|
|
2907
|
-
o.isExpanded ? (
|
|
2907
|
+
return (t, n) => (w(), O("button", al, [
|
|
2908
|
+
o.isExpanded ? (w(), X(T(ko), {
|
|
2908
2909
|
key: 0,
|
|
2909
2910
|
class: "w-7 text-gray-400"
|
|
2910
|
-
})) : (
|
|
2911
|
+
})) : (w(), X(T(Po), {
|
|
2911
2912
|
key: 1,
|
|
2912
2913
|
class: "w-7 text-gray-400"
|
|
2913
2914
|
}))
|
|
2914
2915
|
]));
|
|
2915
2916
|
}
|
|
2916
|
-
}, ul = { class: "card border bg-white rounded-lg" }, cl = { class: "card-body px-4 py-2 gap-0" }, dl = { class: "flex justify-between items-center" }, fl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1),
|
|
2917
|
+
}, ul = { class: "card border bg-white rounded-lg" }, cl = { class: "card-body px-4 py-2 gap-0" }, dl = { class: "flex justify-between items-center" }, fl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), vl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, pl = { class: "list-none list-inside" }, hl = ["onClick"], ml = { class: "text-base font-normal text-gray-800 leading-4" }, gl = {
|
|
2917
2918
|
__name: "Dictionary",
|
|
2918
2919
|
emits: ["translate"],
|
|
2919
2920
|
setup(e, { emit: o }) {
|
|
2920
|
-
const t = E(!0), n = me(),
|
|
2921
|
+
const t = E(!0), n = me(), l = He(), r = y(() => n.dictionary), i = o, s = () => {
|
|
2921
2922
|
t.value = !t.value;
|
|
2922
2923
|
}, a = (u) => {
|
|
2923
|
-
|
|
2924
|
-
s.src = c, s.target = p, i("translate", u);
|
|
2924
|
+
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src;
|
|
2925
2925
|
};
|
|
2926
|
-
return (u,
|
|
2926
|
+
return (u, v) => (w(), O("div", ul, [
|
|
2927
2927
|
g("div", cl, [
|
|
2928
2928
|
g("div", dl, [
|
|
2929
2929
|
fl,
|
|
2930
|
-
|
|
2930
|
+
H(Ue, {
|
|
2931
2931
|
isExpanded: t.value,
|
|
2932
|
-
onClick:
|
|
2932
|
+
onClick: s
|
|
2933
2933
|
}, null, 8, ["isExpanded"])
|
|
2934
2934
|
]),
|
|
2935
2935
|
g("div", {
|
|
2936
|
-
class:
|
|
2936
|
+
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2937
2937
|
}, [
|
|
2938
2938
|
g("ul", null, [
|
|
2939
|
-
(
|
|
2940
|
-
key: `${c.pos}-${
|
|
2939
|
+
(w(!0), O(W, null, se(r.value, (c, p) => (w(), O("li", {
|
|
2940
|
+
key: `${c.pos}-${p}`,
|
|
2941
2941
|
class: "mb-2"
|
|
2942
2942
|
}, [
|
|
2943
|
-
g("h5",
|
|
2944
|
-
g("ul",
|
|
2945
|
-
(
|
|
2946
|
-
key: `${m.word}-${
|
|
2943
|
+
g("h5", vl, ee(c.pos), 1),
|
|
2944
|
+
g("ul", pl, [
|
|
2945
|
+
(w(!0), O(W, null, se(c.items, (m, h) => (w(), O("li", {
|
|
2946
|
+
key: `${m.word}-${h}`
|
|
2947
2947
|
}, [
|
|
2948
2948
|
g("span", {
|
|
2949
2949
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2950
|
-
onClick: (
|
|
2950
|
+
onClick: ($) => a(m.word)
|
|
2951
2951
|
}, ee(m.word), 9, hl),
|
|
2952
2952
|
g("small", ml, " - " + ee(m.reverse_translation.join(", ")), 1)
|
|
2953
2953
|
]))), 128))
|
|
@@ -2958,41 +2958,41 @@ const el = {
|
|
|
2958
2958
|
])
|
|
2959
2959
|
]));
|
|
2960
2960
|
}
|
|
2961
|
-
}, bl = { class: "card border bg-white rounded-lg" },
|
|
2961
|
+
}, bl = { class: "card border bg-white rounded-lg" }, Cl = { class: "card-body px-4 py-2 gap-0" }, _l = { class: "flex justify-between items-center" }, xl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), yl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, wl = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, El = /* @__PURE__ */ g("br", null, null, -1), Sl = {
|
|
2962
2962
|
key: 0,
|
|
2963
2963
|
class: "italic"
|
|
2964
|
-
},
|
|
2964
|
+
}, Ol = {
|
|
2965
2965
|
__name: "Definition",
|
|
2966
2966
|
setup(e) {
|
|
2967
|
-
const o = E(!0), t = me(), n =
|
|
2967
|
+
const o = E(!0), t = me(), n = y(() => t.definitions), l = () => {
|
|
2968
2968
|
o.value = !o.value;
|
|
2969
2969
|
};
|
|
2970
|
-
return (r, i) => (
|
|
2971
|
-
g("div",
|
|
2972
|
-
g("div",
|
|
2970
|
+
return (r, i) => (w(), O("div", bl, [
|
|
2971
|
+
g("div", Cl, [
|
|
2972
|
+
g("div", _l, [
|
|
2973
2973
|
xl,
|
|
2974
|
-
|
|
2974
|
+
H(Ue, {
|
|
2975
2975
|
isExpanded: o.value,
|
|
2976
|
-
onClick:
|
|
2976
|
+
onClick: l
|
|
2977
2977
|
}, null, 8, ["isExpanded"])
|
|
2978
2978
|
]),
|
|
2979
2979
|
g("div", {
|
|
2980
|
-
class:
|
|
2980
|
+
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2981
2981
|
}, [
|
|
2982
2982
|
g("ul", null, [
|
|
2983
|
-
(
|
|
2984
|
-
key: `${
|
|
2983
|
+
(w(!0), O(W, null, se(n.value, (s, a) => (w(), O("li", {
|
|
2984
|
+
key: `${s.pos}-${a}`,
|
|
2985
2985
|
class: "mb-2"
|
|
2986
2986
|
}, [
|
|
2987
|
-
g("h5",
|
|
2988
|
-
g("ul",
|
|
2989
|
-
(
|
|
2990
|
-
key: `${u.gloss}-${
|
|
2987
|
+
g("h5", yl, ee(s.pos), 1),
|
|
2988
|
+
g("ul", wl, [
|
|
2989
|
+
(w(!0), O(W, null, se(s.items, (u, v) => (w(), O("li", {
|
|
2990
|
+
key: `${u.gloss}-${v}`,
|
|
2991
2991
|
class: "mb-1"
|
|
2992
2992
|
}, [
|
|
2993
2993
|
g("span", null, ee(u.gloss), 1),
|
|
2994
2994
|
El,
|
|
2995
|
-
u.example ? (
|
|
2995
|
+
u.example ? (w(), O("small", Sl, '"' + ee(u.example) + '"', 1)) : Q("", !0)
|
|
2996
2996
|
]))), 128))
|
|
2997
2997
|
])
|
|
2998
2998
|
]))), 128))
|
|
@@ -3001,72 +3001,72 @@ const el = {
|
|
|
3001
3001
|
])
|
|
3002
3002
|
]));
|
|
3003
3003
|
}
|
|
3004
|
-
},
|
|
3004
|
+
}, $l = { class: "card border bg-white rounded-lg" }, Il = { class: "card-body px-4 py-2 gap-0" }, Ll = { class: "flex justify-between items-center" }, Tl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), Vl = { class: "text-textCustom list-decimal list-outside ml-7 mt-2" }, Pl = ["innerHTML"], Ml = {
|
|
3005
3005
|
__name: "Example",
|
|
3006
3006
|
setup(e) {
|
|
3007
|
-
const o = E(!0), t = me(), n =
|
|
3007
|
+
const o = E(!0), t = me(), n = y(() => t.examples), l = () => {
|
|
3008
3008
|
o.value = !o.value;
|
|
3009
3009
|
};
|
|
3010
|
-
return (r, i) => (
|
|
3011
|
-
g("div",
|
|
3012
|
-
g("div",
|
|
3013
|
-
|
|
3014
|
-
|
|
3010
|
+
return (r, i) => (w(), O("div", $l, [
|
|
3011
|
+
g("div", Il, [
|
|
3012
|
+
g("div", Ll, [
|
|
3013
|
+
Tl,
|
|
3014
|
+
H(Ue, {
|
|
3015
3015
|
isExpanded: o.value,
|
|
3016
|
-
onClick:
|
|
3016
|
+
onClick: l
|
|
3017
3017
|
}, null, 8, ["isExpanded"])
|
|
3018
3018
|
]),
|
|
3019
3019
|
g("div", {
|
|
3020
|
-
class:
|
|
3020
|
+
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3021
3021
|
}, [
|
|
3022
|
-
g("ul",
|
|
3023
|
-
(
|
|
3024
|
-
key: `${
|
|
3025
|
-
innerHTML:
|
|
3026
|
-
}, null, 8,
|
|
3022
|
+
g("ul", Vl, [
|
|
3023
|
+
(w(!0), O(W, null, se(n.value, (s, a) => (w(), O("li", {
|
|
3024
|
+
key: `${s.definition_id}-${a}`,
|
|
3025
|
+
innerHTML: s
|
|
3026
|
+
}, null, 8, Pl))), 128))
|
|
3027
3027
|
])
|
|
3028
3028
|
], 2)
|
|
3029
3029
|
])
|
|
3030
3030
|
]));
|
|
3031
3031
|
}
|
|
3032
|
-
},
|
|
3032
|
+
}, kl = { class: "card border bg-white rounded-lg" }, Rl = { class: "card-body px-4 py-2 gap-0" }, Nl = { class: "flex justify-between items-center" }, Dl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), Al = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Fl = { class: "list-none list-inside" }, jl = { class: "flex flex-wrap" }, Bl = ["onClick"], Hl = {
|
|
3033
3033
|
__name: "Synonyms",
|
|
3034
3034
|
emits: ["translate"],
|
|
3035
3035
|
setup(e, { emit: o }) {
|
|
3036
|
-
const t = E(!0), n = me(),
|
|
3036
|
+
const t = E(!0), n = me(), l = y(() => n.synonyms), r = o, i = () => {
|
|
3037
3037
|
t.value = !t.value;
|
|
3038
|
-
},
|
|
3038
|
+
}, s = (a) => {
|
|
3039
3039
|
r("translate", a);
|
|
3040
3040
|
};
|
|
3041
|
-
return (a, u) => (
|
|
3042
|
-
g("div",
|
|
3043
|
-
g("div",
|
|
3044
|
-
|
|
3045
|
-
|
|
3041
|
+
return (a, u) => (w(), O("div", kl, [
|
|
3042
|
+
g("div", Rl, [
|
|
3043
|
+
g("div", Nl, [
|
|
3044
|
+
Dl,
|
|
3045
|
+
H(Ue, {
|
|
3046
3046
|
isExpanded: t.value,
|
|
3047
3047
|
onClick: i
|
|
3048
3048
|
}, null, 8, ["isExpanded"])
|
|
3049
3049
|
]),
|
|
3050
3050
|
g("div", {
|
|
3051
|
-
class:
|
|
3051
|
+
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3052
3052
|
}, [
|
|
3053
3053
|
g("ul", null, [
|
|
3054
|
-
(
|
|
3055
|
-
key: `${
|
|
3054
|
+
(w(!0), O(W, null, se(l.value, (v, c) => (w(), O("li", {
|
|
3055
|
+
key: `${v.pos}-${c}`,
|
|
3056
3056
|
class: "mb-2"
|
|
3057
3057
|
}, [
|
|
3058
|
-
g("h5",
|
|
3059
|
-
g("ul",
|
|
3060
|
-
(
|
|
3061
|
-
key: `${
|
|
3058
|
+
g("h5", Al, ee(v.pos), 1),
|
|
3059
|
+
g("ul", Fl, [
|
|
3060
|
+
(w(!0), O(W, null, se(v.items, (p, m) => (w(), O("li", {
|
|
3061
|
+
key: `${p.word}-${m}`,
|
|
3062
3062
|
class: "mb-2"
|
|
3063
3063
|
}, [
|
|
3064
|
-
g("div",
|
|
3065
|
-
(
|
|
3066
|
-
key: `${
|
|
3064
|
+
g("div", jl, [
|
|
3065
|
+
(w(!0), O(W, null, se(p.synonym, (h, $) => (w(), O("span", {
|
|
3066
|
+
key: `${h}-${$}`,
|
|
3067
3067
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3068
|
-
onClick: (
|
|
3069
|
-
}, ee(
|
|
3068
|
+
onClick: (N) => s(h)
|
|
3069
|
+
}, ee(h), 9, Bl))), 128))
|
|
3070
3070
|
])
|
|
3071
3071
|
]))), 128))
|
|
3072
3072
|
])
|
|
@@ -3076,13 +3076,13 @@ const el = {
|
|
|
3076
3076
|
])
|
|
3077
3077
|
]));
|
|
3078
3078
|
}
|
|
3079
|
-
},
|
|
3079
|
+
}, zl = { class: "bg-white min-h-screen flex flex-col" }, Ul = { class: "py-2 px-5 shadow-lg" }, Zl = { class: "px-5 flex-grow" }, Wl = { class: "flex flex-col lg:flex-row lg:gap-2" }, Gl = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, ql = /* @__PURE__ */ g("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), Jl = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, Kl = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Yl = {
|
|
3080
3080
|
key: 0,
|
|
3081
3081
|
class: "w-full my-4"
|
|
3082
|
-
},
|
|
3082
|
+
}, Ql = /* @__PURE__ */ g("div", { class: "mt-auto py-5 px-5" }, [
|
|
3083
3083
|
/* @__PURE__ */ g("span", { class: "block text-center text-gray-700" }, " The site is not affiliated with Google Translate "),
|
|
3084
3084
|
/* @__PURE__ */ g("span", { class: "block text-center text-gray-700" }, "Since 2011")
|
|
3085
|
-
], -1),
|
|
3085
|
+
], -1), ts = {
|
|
3086
3086
|
__name: "Popup",
|
|
3087
3087
|
props: {
|
|
3088
3088
|
opt: {
|
|
@@ -3104,76 +3104,75 @@ const el = {
|
|
|
3104
3104
|
},
|
|
3105
3105
|
emits: ["opt", "translate", "reader", "settings", "fullscreen"],
|
|
3106
3106
|
setup(e, { emit: o }) {
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
j(
|
|
3107
|
+
const t = d2(), n = me(t), l = He(t), r = an(t), i = e, s = o, a = E("");
|
|
3108
|
+
F(
|
|
3110
3109
|
() => i.translation,
|
|
3111
|
-
(
|
|
3112
|
-
r.loading = !1, n.init(
|
|
3110
|
+
(p) => {
|
|
3111
|
+
r.loading = !1, a.value = p.text, n.init(p);
|
|
3113
3112
|
},
|
|
3114
3113
|
{ immediate: !0 }
|
|
3115
|
-
),
|
|
3116
|
-
|
|
3117
|
-
}),
|
|
3118
|
-
|
|
3119
|
-
}),
|
|
3120
|
-
|
|
3114
|
+
), F([() => i.opt, () => i.languages], ([p, m]) => {
|
|
3115
|
+
l.init(p, m), c(a.value);
|
|
3116
|
+
}), F([() => l.src, () => l.target], ([p, m]) => {
|
|
3117
|
+
s("opt", { src: p, target: m }), a.value && c(a.value);
|
|
3118
|
+
}), ve(() => {
|
|
3119
|
+
l.init(i.opt, i.languages);
|
|
3121
3120
|
});
|
|
3122
3121
|
function u() {
|
|
3123
3122
|
a.value = "", n.reset();
|
|
3124
3123
|
}
|
|
3125
|
-
function p
|
|
3126
|
-
|
|
3124
|
+
function v(p) {
|
|
3125
|
+
p && c(p);
|
|
3127
3126
|
}
|
|
3128
|
-
function c(m) {
|
|
3129
|
-
a.value =
|
|
3130
|
-
src:
|
|
3131
|
-
target:
|
|
3132
|
-
text:
|
|
3127
|
+
function c(p, m = l.src, h = l.target) {
|
|
3128
|
+
a.value = p, r.loading = !0, s("translate", {
|
|
3129
|
+
src: m,
|
|
3130
|
+
target: h,
|
|
3131
|
+
text: p
|
|
3133
3132
|
});
|
|
3134
3133
|
}
|
|
3135
|
-
return (
|
|
3136
|
-
g("div",
|
|
3137
|
-
|
|
3138
|
-
onReader:
|
|
3139
|
-
onSettings:
|
|
3140
|
-
onFullScreen:
|
|
3134
|
+
return (p, m) => (w(), O("div", zl, [
|
|
3135
|
+
g("div", Ul, [
|
|
3136
|
+
H(Vn, {
|
|
3137
|
+
onReader: m[0] || (m[0] = (h) => s("reader")),
|
|
3138
|
+
onSettings: m[1] || (m[1] = (h) => s("settings")),
|
|
3139
|
+
onFullScreen: m[2] || (m[2] = (h) => s("fullscreen"))
|
|
3141
3140
|
})
|
|
3142
3141
|
]),
|
|
3143
|
-
g("div",
|
|
3144
|
-
|
|
3145
|
-
g("div",
|
|
3146
|
-
g("div",
|
|
3147
|
-
|
|
3142
|
+
g("div", Zl, [
|
|
3143
|
+
H(m2, { class: "my-4" }),
|
|
3144
|
+
g("div", Wl, [
|
|
3145
|
+
g("div", Gl, [
|
|
3146
|
+
H(tl, {
|
|
3148
3147
|
text: a.value,
|
|
3149
|
-
onChange:
|
|
3148
|
+
onChange: v,
|
|
3150
3149
|
onClear: u
|
|
3151
3150
|
}, null, 8, ["text"])
|
|
3152
3151
|
]),
|
|
3153
|
-
|
|
3154
|
-
g("div",
|
|
3155
|
-
|
|
3152
|
+
ql,
|
|
3153
|
+
g("div", Jl, [
|
|
3154
|
+
H(il, { isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled }, null, 8, ["isFavoriteFeatureEnabled"])
|
|
3156
3155
|
])
|
|
3157
3156
|
]),
|
|
3158
|
-
g("div",
|
|
3159
|
-
|
|
3157
|
+
g("div", Kl, [
|
|
3158
|
+
T(n).dictionary.length ? (w(), X(gl, {
|
|
3160
3159
|
key: 0,
|
|
3161
3160
|
onTranslate: c
|
|
3162
|
-
})) :
|
|
3163
|
-
|
|
3164
|
-
|
|
3161
|
+
})) : Q("", !0),
|
|
3162
|
+
T(n).definitions.length ? (w(), X(Ol, { key: 1 })) : Q("", !0),
|
|
3163
|
+
T(n).synonyms.length ? (w(), X(Hl, {
|
|
3165
3164
|
key: 2,
|
|
3166
3165
|
onTranslate: c
|
|
3167
|
-
})) :
|
|
3166
|
+
})) : Q("", !0)
|
|
3168
3167
|
]),
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
])) :
|
|
3168
|
+
T(n).examples.length ? (w(), O("div", Yl, [
|
|
3169
|
+
H(Ml)
|
|
3170
|
+
])) : Q("", !0)
|
|
3172
3171
|
]),
|
|
3173
|
-
|
|
3172
|
+
Ql
|
|
3174
3173
|
]));
|
|
3175
3174
|
}
|
|
3176
3175
|
};
|
|
3177
3176
|
export {
|
|
3178
|
-
|
|
3177
|
+
ts as default
|
|
3179
3178
|
};
|