@ddict/popup 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/favorite.svg +1 -1
- package/dist/assets/icons/star-list.svg +5 -0
- package/dist/popup.css +1 -1
- package/dist/popup.es.js +1018 -1001
- package/dist/popup.umd.js +7 -7
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,86 +1,106 @@
|
|
|
1
|
-
import { openBlock as w, createElementBlock as
|
|
2
|
-
const _n = "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", yn = "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", wn = "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", Sn = { class: "flex justify-between" }, En = /* @__PURE__ */ m("div", { class: "flex flex-row" }, [
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { openBlock as w, createElementBlock as T, createElementVNode as h, pushScopeId as Tt, popScopeId as It, computed as S, unref as V, shallowRef as mn, watch as F, triggerRef as ct, onScopeDispose as nt, ref as E, onUnmounted as ot, inject as Ie, watchEffect as ie, onMounted as Ce, cloneVNode as Lt, h as Ee, Fragment as Z, defineComponent as ae, provide as lt, reactive as Rt, nextTick as Q, toRaw as K, effectScope as Pt, markRaw as de, hasInjectionContext as gn, getCurrentInstance as Vt, isRef as xe, isReactive as st, toRef as qe, getCurrentScope as kt, toRefs as dt, mergeModels as bn, useModel as xn, createBlock as ee, withCtx as Ve, createVNode as H, renderList as se, normalizeClass as _e, toDisplayString as te, createCommentVNode as X, withModifiers as ft, createTextVNode as _n, withDirectives as Mt, vModelText as Nt } from "vue";
|
|
2
|
+
const Cn = "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", yn = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%20fill='%233B5695'%20class='bi%20bi-list-stars%20fill-primaryColor'%3e%3cpath%20fill-rule='evenodd'%20d='M5%2011.5a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5z'/%3e%3cpath%20d='M2.242%202.194a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.256-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53z'/%3e%3c/svg%3e", wn = "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", Sn = "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", En = "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", Le = (e, o) => {
|
|
3
|
+
const t = e.__vccOpts || e;
|
|
4
|
+
for (const [n, l] of o)
|
|
5
|
+
t[n] = l;
|
|
6
|
+
return t;
|
|
7
|
+
}, Re = (e) => (Tt("data-v-5c07032a"), e = e(), It(), e), On = { class: "flex justify-between" }, $n = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("div", { class: "flex flex-row" }, [
|
|
8
|
+
/* @__PURE__ */ h("img", {
|
|
9
|
+
src: Cn,
|
|
5
10
|
alt: "Vue logo",
|
|
6
11
|
class: "w-24"
|
|
7
12
|
})
|
|
8
|
-
], -1),
|
|
9
|
-
class: "tooltip tooltip-bottom tooltip-
|
|
13
|
+
], -1)), Tn = { class: "flex" }, In = {
|
|
14
|
+
class: "tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]",
|
|
15
|
+
"data-tip": "Saved Words"
|
|
16
|
+
}, Ln = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
17
|
+
src: yn,
|
|
18
|
+
alt: "Star list",
|
|
19
|
+
class: "w-7"
|
|
20
|
+
}, null, -1)), Rn = [
|
|
21
|
+
Ln
|
|
22
|
+
], Pn = {
|
|
23
|
+
class: "tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]",
|
|
10
24
|
"data-tip": "Reader"
|
|
11
|
-
},
|
|
12
|
-
src:
|
|
25
|
+
}, Vn = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
26
|
+
src: wn,
|
|
13
27
|
alt: "Reader",
|
|
14
28
|
class: "w-7"
|
|
15
|
-
}, null, -1),
|
|
16
|
-
|
|
17
|
-
],
|
|
18
|
-
class: "tooltip tooltip-bottom tooltip-
|
|
29
|
+
}, null, -1)), kn = [
|
|
30
|
+
Vn
|
|
31
|
+
], Mn = {
|
|
32
|
+
class: "tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] md:hidden",
|
|
19
33
|
"data-tip": "Full screen"
|
|
20
|
-
},
|
|
21
|
-
src:
|
|
34
|
+
}, Nn = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
35
|
+
src: Sn,
|
|
22
36
|
alt: "Full screen",
|
|
23
37
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
25
|
-
|
|
26
|
-
],
|
|
27
|
-
class: "tooltip tooltip-bottom tooltip-
|
|
28
|
-
"data-tip": "
|
|
29
|
-
},
|
|
30
|
-
src:
|
|
38
|
+
}, null, -1)), Dn = [
|
|
39
|
+
Nn
|
|
40
|
+
], An = {
|
|
41
|
+
class: "tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]",
|
|
42
|
+
"data-tip": "Settings"
|
|
43
|
+
}, Fn = /* @__PURE__ */ Re(() => /* @__PURE__ */ h("img", {
|
|
44
|
+
src: En,
|
|
31
45
|
alt: "Setting",
|
|
32
46
|
class: "w-7"
|
|
33
|
-
}, null, -1),
|
|
34
|
-
|
|
35
|
-
],
|
|
47
|
+
}, null, -1)), jn = [
|
|
48
|
+
Fn
|
|
49
|
+
], Bn = {
|
|
36
50
|
__name: "Header",
|
|
37
|
-
emits: ["settings", "fullScreen", "reader"],
|
|
51
|
+
emits: ["settings", "fullScreen", "reader", "starList"],
|
|
38
52
|
setup(e, { emit: o }) {
|
|
39
53
|
const t = o;
|
|
40
|
-
return (n,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
return (n, l) => (w(), T("div", On, [
|
|
55
|
+
$n,
|
|
56
|
+
h("div", Tn, [
|
|
57
|
+
h("div", In, [
|
|
58
|
+
h("button", {
|
|
45
59
|
class: "btn btn-ghost btn-circle",
|
|
46
|
-
onClick:
|
|
47
|
-
},
|
|
60
|
+
onClick: l[0] || (l[0] = (r) => t("starList"))
|
|
61
|
+
}, Rn)
|
|
48
62
|
]),
|
|
49
|
-
|
|
50
|
-
|
|
63
|
+
h("div", Pn, [
|
|
64
|
+
h("button", {
|
|
51
65
|
class: "btn btn-ghost btn-circle",
|
|
52
|
-
onClick:
|
|
53
|
-
},
|
|
66
|
+
onClick: l[1] || (l[1] = (r) => t("reader"))
|
|
67
|
+
}, kn)
|
|
68
|
+
]),
|
|
69
|
+
h("div", Mn, [
|
|
70
|
+
h("button", {
|
|
71
|
+
class: "btn btn-ghost btn-circle",
|
|
72
|
+
onClick: l[2] || (l[2] = (r) => t("fullScreen"))
|
|
73
|
+
}, Dn)
|
|
54
74
|
]),
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
h("div", An, [
|
|
76
|
+
h("button", {
|
|
57
77
|
class: "btn btn-ghost btn-circle",
|
|
58
|
-
onClick:
|
|
59
|
-
},
|
|
78
|
+
onClick: l[3] || (l[3] = (r) => t("settings"))
|
|
79
|
+
}, jn)
|
|
60
80
|
])
|
|
61
81
|
])
|
|
62
82
|
]));
|
|
63
83
|
}
|
|
64
|
-
};
|
|
84
|
+
}, Hn = /* @__PURE__ */ Le(Bn, [["__scopeId", "data-v-5c07032a"]]);
|
|
65
85
|
function ye(e, o, t) {
|
|
66
|
-
let n = t.initialDeps ?? [],
|
|
86
|
+
let n = t.initialDeps ?? [], l;
|
|
67
87
|
return () => {
|
|
68
|
-
var r, i,
|
|
88
|
+
var r, i, s, a;
|
|
69
89
|
let u;
|
|
70
90
|
t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
|
|
71
91
|
const c = e();
|
|
72
92
|
if (!(c.length !== n.length || c.some((x, _) => n[_] !== x)))
|
|
73
|
-
return
|
|
93
|
+
return l;
|
|
74
94
|
n = c;
|
|
75
95
|
let g;
|
|
76
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()),
|
|
77
|
-
const x = Math.round((Date.now() - u) * 100) / 100, _ = Math.round((Date.now() - g) * 100) / 100, v = _ / 16,
|
|
96
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()), l = o(...c), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
97
|
+
const x = Math.round((Date.now() - u) * 100) / 100, _ = Math.round((Date.now() - g) * 100) / 100, v = _ / 16, $ = (N, I) => {
|
|
78
98
|
for (N = String(N); N.length < I; )
|
|
79
99
|
N = " " + N;
|
|
80
100
|
return N;
|
|
81
101
|
};
|
|
82
102
|
console.info(
|
|
83
|
-
`%c⏱ ${
|
|
103
|
+
`%c⏱ ${$(_, 5)} /${$(x, 5)} ms`,
|
|
84
104
|
`
|
|
85
105
|
font-size: .6rem;
|
|
86
106
|
font-weight: bold;
|
|
@@ -91,76 +111,76 @@ function ye(e, o, t) {
|
|
|
91
111
|
t == null ? void 0 : t.key
|
|
92
112
|
);
|
|
93
113
|
}
|
|
94
|
-
return (a = t == null ? void 0 : t.onChange) == null || a.call(t,
|
|
114
|
+
return (a = t == null ? void 0 : t.onChange) == null || a.call(t, l), l;
|
|
95
115
|
};
|
|
96
116
|
}
|
|
97
|
-
function
|
|
117
|
+
function Je(e, o) {
|
|
98
118
|
if (e === void 0)
|
|
99
119
|
throw new Error("Unexpected undefined");
|
|
100
120
|
return e;
|
|
101
121
|
}
|
|
102
|
-
const
|
|
122
|
+
const zn = (e, o) => Math.abs(e - o) < 1, Un = (e, o, t) => {
|
|
103
123
|
let n;
|
|
104
|
-
return function(...
|
|
105
|
-
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this,
|
|
124
|
+
return function(...l) {
|
|
125
|
+
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
106
126
|
};
|
|
107
|
-
},
|
|
127
|
+
}, Zn = (e) => e, Wn = (e) => {
|
|
108
128
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
109
|
-
for (let
|
|
110
|
-
n.push(
|
|
129
|
+
for (let l = o; l <= t; l++)
|
|
130
|
+
n.push(l);
|
|
111
131
|
return n;
|
|
112
|
-
},
|
|
132
|
+
}, Gn = (e, o) => {
|
|
113
133
|
const t = e.scrollElement;
|
|
114
134
|
if (!t)
|
|
115
135
|
return;
|
|
116
136
|
const n = e.targetWindow;
|
|
117
137
|
if (!n)
|
|
118
138
|
return;
|
|
119
|
-
const
|
|
120
|
-
const { width:
|
|
121
|
-
o({ width: Math.round(
|
|
139
|
+
const l = (i) => {
|
|
140
|
+
const { width: s, height: a } = i;
|
|
141
|
+
o({ width: Math.round(s), height: Math.round(a) });
|
|
122
142
|
};
|
|
123
|
-
if (
|
|
143
|
+
if (l(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
124
144
|
return () => {
|
|
125
145
|
};
|
|
126
146
|
const r = new n.ResizeObserver((i) => {
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
const a =
|
|
147
|
+
const s = i[0];
|
|
148
|
+
if (s != null && s.borderBoxSize) {
|
|
149
|
+
const a = s.borderBoxSize[0];
|
|
130
150
|
if (a) {
|
|
131
|
-
|
|
151
|
+
l({ width: a.inlineSize, height: a.blockSize });
|
|
132
152
|
return;
|
|
133
153
|
}
|
|
134
154
|
}
|
|
135
|
-
|
|
155
|
+
l(t.getBoundingClientRect());
|
|
136
156
|
});
|
|
137
157
|
return r.observe(t, { box: "border-box" }), () => {
|
|
138
158
|
r.unobserve(t);
|
|
139
159
|
};
|
|
140
|
-
},
|
|
160
|
+
}, pt = {
|
|
141
161
|
passive: !0
|
|
142
|
-
},
|
|
162
|
+
}, qn = typeof window > "u" ? !0 : "onscrollend" in window, Jn = (e, o) => {
|
|
143
163
|
const t = e.scrollElement;
|
|
144
164
|
if (!t)
|
|
145
165
|
return;
|
|
146
166
|
const n = e.targetWindow;
|
|
147
167
|
if (!n)
|
|
148
168
|
return;
|
|
149
|
-
let
|
|
150
|
-
const r =
|
|
151
|
-
} :
|
|
169
|
+
let l = 0;
|
|
170
|
+
const r = qn ? () => {
|
|
171
|
+
} : Un(
|
|
152
172
|
n,
|
|
153
173
|
() => {
|
|
154
|
-
o(
|
|
174
|
+
o(l, !1);
|
|
155
175
|
},
|
|
156
176
|
e.options.isScrollingResetDelay
|
|
157
177
|
), i = (u) => () => {
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
return a(), t.addEventListener("scroll",
|
|
161
|
-
t.removeEventListener("scroll",
|
|
178
|
+
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), o(l, u);
|
|
179
|
+
}, s = i(!0), a = i(!1);
|
|
180
|
+
return a(), t.addEventListener("scroll", s, pt), t.addEventListener("scrollend", a, pt), () => {
|
|
181
|
+
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
|
|
162
182
|
};
|
|
163
|
-
},
|
|
183
|
+
}, Kn = (e, o, t) => {
|
|
164
184
|
if (o != null && o.borderBoxSize) {
|
|
165
185
|
const n = o.borderBoxSize[0];
|
|
166
186
|
if (n)
|
|
@@ -171,43 +191,43 @@ const Dn = (e, o) => Math.abs(e - o) < 1, An = (e, o, t) => {
|
|
|
171
191
|
return Math.round(
|
|
172
192
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
173
193
|
);
|
|
174
|
-
},
|
|
194
|
+
}, Yn = (e, {
|
|
175
195
|
adjustments: o = 0,
|
|
176
196
|
behavior: t
|
|
177
197
|
}, n) => {
|
|
178
|
-
var
|
|
198
|
+
var l, r;
|
|
179
199
|
const i = e + o;
|
|
180
|
-
(r = (
|
|
200
|
+
(r = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || r.call(l, {
|
|
181
201
|
[n.options.horizontal ? "left" : "top"]: i,
|
|
182
202
|
behavior: t
|
|
183
203
|
});
|
|
184
204
|
};
|
|
185
|
-
class
|
|
205
|
+
class Qn {
|
|
186
206
|
constructor(o) {
|
|
187
207
|
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__ */ (() => {
|
|
188
208
|
let t = null;
|
|
189
|
-
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((
|
|
190
|
-
|
|
209
|
+
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
|
|
210
|
+
l.forEach((r) => {
|
|
191
211
|
this._measureElement(r.target, r);
|
|
192
212
|
});
|
|
193
213
|
}));
|
|
194
214
|
return {
|
|
195
215
|
disconnect: () => {
|
|
196
|
-
var
|
|
197
|
-
return (
|
|
216
|
+
var l;
|
|
217
|
+
return (l = n()) == null ? void 0 : l.disconnect();
|
|
198
218
|
},
|
|
199
|
-
observe: (
|
|
219
|
+
observe: (l) => {
|
|
200
220
|
var r;
|
|
201
|
-
return (r = n()) == null ? void 0 : r.observe(
|
|
221
|
+
return (r = n()) == null ? void 0 : r.observe(l, { box: "border-box" });
|
|
202
222
|
},
|
|
203
|
-
unobserve: (
|
|
223
|
+
unobserve: (l) => {
|
|
204
224
|
var r;
|
|
205
|
-
return (r = n()) == null ? void 0 : r.unobserve(
|
|
225
|
+
return (r = n()) == null ? void 0 : r.unobserve(l);
|
|
206
226
|
}
|
|
207
227
|
};
|
|
208
228
|
})(), this.range = null, this.setOptions = (t) => {
|
|
209
|
-
Object.entries(t).forEach(([n,
|
|
210
|
-
typeof
|
|
229
|
+
Object.entries(t).forEach(([n, l]) => {
|
|
230
|
+
typeof l > "u" && delete t[n];
|
|
211
231
|
}), this.options = {
|
|
212
232
|
debug: !1,
|
|
213
233
|
initialOffset: 0,
|
|
@@ -217,11 +237,11 @@ class Wn {
|
|
|
217
237
|
scrollPaddingStart: 0,
|
|
218
238
|
scrollPaddingEnd: 0,
|
|
219
239
|
horizontal: !1,
|
|
220
|
-
getItemKey:
|
|
221
|
-
rangeExtractor:
|
|
240
|
+
getItemKey: Zn,
|
|
241
|
+
rangeExtractor: Wn,
|
|
222
242
|
onChange: () => {
|
|
223
243
|
},
|
|
224
|
-
measureElement:
|
|
244
|
+
measureElement: Kn,
|
|
225
245
|
initialRect: { width: 0, height: 0 },
|
|
226
246
|
scrollMargin: 0,
|
|
227
247
|
gap: 0,
|
|
@@ -233,12 +253,12 @@ class Wn {
|
|
|
233
253
|
...t
|
|
234
254
|
};
|
|
235
255
|
}, this.notify = (t, n) => {
|
|
236
|
-
var
|
|
237
|
-
const { startIndex: i, endIndex:
|
|
256
|
+
var l, r;
|
|
257
|
+
const { startIndex: i, endIndex: s } = this.range ?? {
|
|
238
258
|
startIndex: void 0,
|
|
239
259
|
endIndex: void 0
|
|
240
260
|
}, a = this.calculateRange();
|
|
241
|
-
(t || i !== (a == null ? void 0 : a.startIndex) ||
|
|
261
|
+
(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));
|
|
242
262
|
}, this.cleanup = () => {
|
|
243
263
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
244
264
|
}, this._didMount = () => () => {
|
|
@@ -255,30 +275,30 @@ class Wn {
|
|
|
255
275
|
adjustments: void 0,
|
|
256
276
|
behavior: void 0
|
|
257
277
|
}), this.unsubs.push(
|
|
258
|
-
this.options.observeElementRect(this, (
|
|
259
|
-
this.scrollRect =
|
|
278
|
+
this.options.observeElementRect(this, (l) => {
|
|
279
|
+
this.scrollRect = l, this.notify(!1, !1);
|
|
260
280
|
})
|
|
261
281
|
), this.unsubs.push(
|
|
262
|
-
this.options.observeElementOffset(this, (
|
|
263
|
-
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() <
|
|
282
|
+
this.options.observeElementOffset(this, (l, r) => {
|
|
283
|
+
this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
|
|
264
284
|
const i = this.isScrolling;
|
|
265
285
|
this.isScrolling = r, this.notify(i !== r, r);
|
|
266
286
|
})
|
|
267
287
|
);
|
|
268
288
|
}
|
|
269
289
|
}, 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) => {
|
|
270
|
-
const
|
|
290
|
+
const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
271
291
|
for (let i = n - 1; i >= 0; i--) {
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
292
|
+
const s = t[i];
|
|
293
|
+
if (l.has(s.lane))
|
|
274
294
|
continue;
|
|
275
295
|
const a = r.get(
|
|
276
|
-
|
|
296
|
+
s.lane
|
|
277
297
|
);
|
|
278
|
-
if (a == null ||
|
|
298
|
+
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)
|
|
279
299
|
break;
|
|
280
300
|
}
|
|
281
|
-
return r.size === this.options.lanes ? Array.from(r.values()).sort((i,
|
|
301
|
+
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;
|
|
282
302
|
}, this.getMeasurementOptions = ye(
|
|
283
303
|
() => [
|
|
284
304
|
this.options.count,
|
|
@@ -287,10 +307,10 @@ class Wn {
|
|
|
287
307
|
this.options.getItemKey,
|
|
288
308
|
this.options.enabled
|
|
289
309
|
],
|
|
290
|
-
(t, n,
|
|
310
|
+
(t, n, l, r, i) => (this.pendingMeasuredCacheIndexes = [], {
|
|
291
311
|
count: t,
|
|
292
312
|
paddingStart: n,
|
|
293
|
-
scrollMargin:
|
|
313
|
+
scrollMargin: l,
|
|
294
314
|
getItemKey: r,
|
|
295
315
|
enabled: i
|
|
296
316
|
}),
|
|
@@ -299,7 +319,7 @@ class Wn {
|
|
|
299
319
|
}
|
|
300
320
|
), this.getMeasurements = ye(
|
|
301
321
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
302
|
-
({ count: t, paddingStart: n, scrollMargin:
|
|
322
|
+
({ count: t, paddingStart: n, scrollMargin: l, getItemKey: r, enabled: i }, s) => {
|
|
303
323
|
var a;
|
|
304
324
|
if (!i)
|
|
305
325
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
@@ -312,17 +332,17 @@ class Wn {
|
|
|
312
332
|
for (let p = u; p < t; p++) {
|
|
313
333
|
let g = (a = this.measurementsCache[p]) == null ? void 0 : a.measureElement;
|
|
314
334
|
g || (g = (D) => {
|
|
315
|
-
const
|
|
335
|
+
const m = r(p), R = this.elementsCache.get(m);
|
|
316
336
|
if (!D) {
|
|
317
|
-
|
|
337
|
+
R && (this.observer.unobserve(R), this.elementsCache.delete(m));
|
|
318
338
|
return;
|
|
319
339
|
}
|
|
320
|
-
|
|
340
|
+
R !== D && (R && this.observer.unobserve(R), this.observer.observe(D), this.elementsCache.set(m, D)), D.isConnected && this.resizeItem(
|
|
321
341
|
p,
|
|
322
342
|
this.options.measureElement(D, void 0, this)
|
|
323
343
|
);
|
|
324
344
|
});
|
|
325
|
-
const x = r(p), _ = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), v = _ ? _.end + this.options.gap : n +
|
|
345
|
+
const x = r(p), _ = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), v = _ ? _.end + this.options.gap : n + l, $ = s.get(x), N = typeof $ == "number" ? $ : this.options.estimateSize(p), I = v + N, k = _ ? _.lane : p % this.options.lanes;
|
|
326
346
|
c[p] = {
|
|
327
347
|
index: p,
|
|
328
348
|
start: v,
|
|
@@ -341,10 +361,10 @@ class Wn {
|
|
|
341
361
|
}
|
|
342
362
|
), this.calculateRange = ye(
|
|
343
363
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
344
|
-
(t, n,
|
|
364
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? Xn({
|
|
345
365
|
measurements: t,
|
|
346
366
|
outerSize: n,
|
|
347
|
-
scrollOffset:
|
|
367
|
+
scrollOffset: l
|
|
348
368
|
}) : null,
|
|
349
369
|
{
|
|
350
370
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
@@ -357,10 +377,10 @@ class Wn {
|
|
|
357
377
|
this.options.overscan,
|
|
358
378
|
this.options.count
|
|
359
379
|
],
|
|
360
|
-
(t, n,
|
|
380
|
+
(t, n, l, r) => n === null ? [] : t({
|
|
361
381
|
startIndex: n.startIndex,
|
|
362
382
|
endIndex: n.endIndex,
|
|
363
|
-
overscan:
|
|
383
|
+
overscan: l,
|
|
364
384
|
count: r
|
|
365
385
|
}),
|
|
366
386
|
{
|
|
@@ -368,40 +388,40 @@ class Wn {
|
|
|
368
388
|
debug: () => this.options.debug
|
|
369
389
|
}
|
|
370
390
|
), this.indexFromElement = (t) => {
|
|
371
|
-
const n = this.options.indexAttribute,
|
|
372
|
-
return
|
|
391
|
+
const n = this.options.indexAttribute, l = t.getAttribute(n);
|
|
392
|
+
return l ? parseInt(l, 10) : (console.warn(
|
|
373
393
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
374
394
|
), -1);
|
|
375
395
|
}, this._measureElement = (t, n) => {
|
|
376
|
-
const
|
|
396
|
+
const l = this.indexFromElement(t), r = this.getMeasurements()[l];
|
|
377
397
|
if (!r || !t.isConnected) {
|
|
378
|
-
this.elementsCache.forEach((
|
|
379
|
-
|
|
398
|
+
this.elementsCache.forEach((s, a) => {
|
|
399
|
+
s === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
|
|
380
400
|
});
|
|
381
401
|
return;
|
|
382
402
|
}
|
|
383
403
|
const i = this.elementsCache.get(r.key);
|
|
384
|
-
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(
|
|
404
|
+
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));
|
|
385
405
|
}, this.resizeItem = (t, n) => {
|
|
386
|
-
const
|
|
387
|
-
if (!
|
|
406
|
+
const l = this.getMeasurements()[t];
|
|
407
|
+
if (!l)
|
|
388
408
|
return;
|
|
389
|
-
const r = this.itemSizeCache.get(
|
|
390
|
-
i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
409
|
+
const r = this.itemSizeCache.get(l.key) ?? l.size, i = n - r;
|
|
410
|
+
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(), {
|
|
391
411
|
adjustments: this.scrollAdjustments += i,
|
|
392
412
|
behavior: void 0
|
|
393
|
-
})), this.pendingMeasuredCacheIndexes.push(
|
|
413
|
+
})), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, n)), this.notify(!0, !1));
|
|
394
414
|
}, this.measureElement = (t) => {
|
|
395
415
|
t && this._measureElement(t, void 0);
|
|
396
416
|
}, this.getVirtualItems = ye(
|
|
397
417
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
398
418
|
(t, n) => {
|
|
399
|
-
const
|
|
419
|
+
const l = [];
|
|
400
420
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
401
|
-
const
|
|
402
|
-
|
|
421
|
+
const s = t[r], a = n[s];
|
|
422
|
+
l.push(a);
|
|
403
423
|
}
|
|
404
|
-
return
|
|
424
|
+
return l;
|
|
405
425
|
},
|
|
406
426
|
{
|
|
407
427
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -410,60 +430,60 @@ class Wn {
|
|
|
410
430
|
), this.getVirtualItemForOffset = (t) => {
|
|
411
431
|
const n = this.getMeasurements();
|
|
412
432
|
if (n.length !== 0)
|
|
413
|
-
return
|
|
414
|
-
n[
|
|
433
|
+
return Je(
|
|
434
|
+
n[Dt(
|
|
415
435
|
0,
|
|
416
436
|
n.length - 1,
|
|
417
|
-
(
|
|
437
|
+
(l) => Je(n[l]).start,
|
|
418
438
|
t
|
|
419
439
|
)]
|
|
420
440
|
);
|
|
421
441
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
422
|
-
const
|
|
423
|
-
n === "auto" && (t <= r ? n = "start" : t >= r +
|
|
424
|
-
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) -
|
|
442
|
+
const l = this.getSize(), r = this.getScrollOffset();
|
|
443
|
+
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);
|
|
444
|
+
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - l;
|
|
425
445
|
return Math.max(Math.min(a, t), 0);
|
|
426
446
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
427
447
|
t = Math.max(0, Math.min(t, this.options.count - 1));
|
|
428
|
-
const
|
|
429
|
-
if (!
|
|
448
|
+
const l = this.getMeasurements()[t];
|
|
449
|
+
if (!l)
|
|
430
450
|
return;
|
|
431
451
|
const r = this.getSize(), i = this.getScrollOffset();
|
|
432
452
|
if (n === "auto")
|
|
433
|
-
if (
|
|
453
|
+
if (l.end >= i + r - this.options.scrollPaddingEnd)
|
|
434
454
|
n = "end";
|
|
435
|
-
else if (
|
|
455
|
+
else if (l.start <= i + this.options.scrollPaddingStart)
|
|
436
456
|
n = "start";
|
|
437
457
|
else
|
|
438
458
|
return [i, n];
|
|
439
|
-
const
|
|
440
|
-
return [this.getOffsetForAlignment(
|
|
459
|
+
const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
|
|
460
|
+
return [this.getOffsetForAlignment(s, n), n];
|
|
441
461
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
442
462
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
443
|
-
}, this.scrollToOffset = (t, { align: n = "start", behavior:
|
|
444
|
-
this.cancelScrollToIndex(),
|
|
463
|
+
}, this.scrollToOffset = (t, { align: n = "start", behavior: l } = {}) => {
|
|
464
|
+
this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
445
465
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
446
466
|
), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
|
|
447
467
|
adjustments: void 0,
|
|
448
|
-
behavior:
|
|
468
|
+
behavior: l
|
|
449
469
|
});
|
|
450
|
-
}, this.scrollToIndex = (t, { align: n = "auto", behavior:
|
|
451
|
-
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(),
|
|
470
|
+
}, this.scrollToIndex = (t, { align: n = "auto", behavior: l } = {}) => {
|
|
471
|
+
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
452
472
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
453
473
|
);
|
|
454
474
|
const r = this.getOffsetForIndex(t, n);
|
|
455
475
|
if (!r) return;
|
|
456
|
-
const [i,
|
|
457
|
-
this._scrollToOffset(i, { adjustments: void 0, behavior:
|
|
476
|
+
const [i, s] = r;
|
|
477
|
+
this._scrollToOffset(i, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
458
478
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
459
479
|
this.options.getItemKey(t)
|
|
460
480
|
)) {
|
|
461
|
-
const [u] =
|
|
462
|
-
this.getOffsetForIndex(t,
|
|
481
|
+
const [u] = Je(
|
|
482
|
+
this.getOffsetForIndex(t, s)
|
|
463
483
|
);
|
|
464
|
-
|
|
484
|
+
zn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
465
485
|
} else
|
|
466
|
-
this.scrollToIndex(t, { align:
|
|
486
|
+
this.scrollToIndex(t, { align: s, behavior: l });
|
|
467
487
|
}));
|
|
468
488
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
469
489
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -475,94 +495,94 @@ class Wn {
|
|
|
475
495
|
}, this.getTotalSize = () => {
|
|
476
496
|
var t;
|
|
477
497
|
const n = this.getMeasurements();
|
|
478
|
-
let
|
|
479
|
-
return n.length === 0 ?
|
|
498
|
+
let l;
|
|
499
|
+
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(
|
|
480
500
|
...n.slice(-this.options.lanes).map((r) => r.end)
|
|
481
|
-
),
|
|
501
|
+
), l - this.options.scrollMargin + this.options.paddingEnd;
|
|
482
502
|
}, this._scrollToOffset = (t, {
|
|
483
503
|
adjustments: n,
|
|
484
|
-
behavior:
|
|
504
|
+
behavior: l
|
|
485
505
|
}) => {
|
|
486
|
-
this.options.scrollToFn(t, { behavior:
|
|
506
|
+
this.options.scrollToFn(t, { behavior: l, adjustments: n }, this);
|
|
487
507
|
}, this.measure = () => {
|
|
488
508
|
var t, n;
|
|
489
509
|
this.itemSizeCache = /* @__PURE__ */ new Map(), (n = (t = this.options).onChange) == null || n.call(t, this, !1);
|
|
490
510
|
}, this.setOptions(o);
|
|
491
511
|
}
|
|
492
512
|
}
|
|
493
|
-
const
|
|
513
|
+
const Dt = (e, o, t, n) => {
|
|
494
514
|
for (; e <= o; ) {
|
|
495
|
-
const
|
|
515
|
+
const l = (e + o) / 2 | 0, r = t(l);
|
|
496
516
|
if (r < n)
|
|
497
|
-
e =
|
|
517
|
+
e = l + 1;
|
|
498
518
|
else if (r > n)
|
|
499
|
-
o =
|
|
519
|
+
o = l - 1;
|
|
500
520
|
else
|
|
501
|
-
return
|
|
521
|
+
return l;
|
|
502
522
|
}
|
|
503
523
|
return e > 0 ? e - 1 : 0;
|
|
504
524
|
};
|
|
505
|
-
function
|
|
525
|
+
function Xn({
|
|
506
526
|
measurements: e,
|
|
507
527
|
outerSize: o,
|
|
508
528
|
scrollOffset: t
|
|
509
529
|
}) {
|
|
510
|
-
const n = e.length - 1, r =
|
|
530
|
+
const n = e.length - 1, r = Dt(0, n, (s) => e[s].start, t);
|
|
511
531
|
let i = r;
|
|
512
532
|
for (; i < n && e[i].end < t + o; )
|
|
513
533
|
i++;
|
|
514
534
|
return { startIndex: r, endIndex: i };
|
|
515
535
|
}
|
|
516
|
-
function
|
|
517
|
-
const o = new
|
|
536
|
+
function eo(e) {
|
|
537
|
+
const o = new Qn(V(e)), t = mn(o), n = o._didMount();
|
|
518
538
|
return F(
|
|
519
539
|
() => V(e).getScrollElement(),
|
|
520
|
-
(
|
|
521
|
-
|
|
540
|
+
(l) => {
|
|
541
|
+
l && o._willUpdate();
|
|
522
542
|
},
|
|
523
543
|
{
|
|
524
544
|
immediate: !0
|
|
525
545
|
}
|
|
526
546
|
), F(
|
|
527
547
|
() => V(e),
|
|
528
|
-
(
|
|
548
|
+
(l) => {
|
|
529
549
|
o.setOptions({
|
|
530
|
-
...
|
|
550
|
+
...l,
|
|
531
551
|
onChange: (r, i) => {
|
|
532
|
-
var
|
|
533
|
-
|
|
552
|
+
var s;
|
|
553
|
+
ct(t), (s = l.onChange) == null || s.call(l, r, i);
|
|
534
554
|
}
|
|
535
|
-
}), o._willUpdate(),
|
|
555
|
+
}), o._willUpdate(), ct(t);
|
|
536
556
|
},
|
|
537
557
|
{
|
|
538
558
|
immediate: !0
|
|
539
559
|
}
|
|
540
|
-
),
|
|
560
|
+
), nt(n), t;
|
|
541
561
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
562
|
+
function to(e) {
|
|
563
|
+
return eo(
|
|
544
564
|
S(() => ({
|
|
545
|
-
observeElementRect:
|
|
546
|
-
observeElementOffset:
|
|
547
|
-
scrollToFn:
|
|
565
|
+
observeElementRect: Gn,
|
|
566
|
+
observeElementOffset: Jn,
|
|
567
|
+
scrollToFn: Yn,
|
|
548
568
|
...V(e)
|
|
549
569
|
}))
|
|
550
570
|
);
|
|
551
571
|
}
|
|
552
|
-
function
|
|
553
|
-
let n = E(t == null ? void 0 : t.value),
|
|
554
|
-
return [S(() =>
|
|
555
|
-
return
|
|
572
|
+
function no(e, o, t) {
|
|
573
|
+
let n = E(t == null ? void 0 : t.value), l = S(() => e.value !== void 0);
|
|
574
|
+
return [S(() => l.value ? e.value : n.value), function(r) {
|
|
575
|
+
return l.value || (n.value = r), o == null ? void 0 : o(r);
|
|
556
576
|
}];
|
|
557
577
|
}
|
|
558
|
-
function
|
|
578
|
+
function oo(e) {
|
|
559
579
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
|
|
560
580
|
throw o;
|
|
561
581
|
}));
|
|
562
582
|
}
|
|
563
|
-
function
|
|
564
|
-
let e = [], o = { addEventListener(t, n,
|
|
565
|
-
return t.addEventListener(n,
|
|
583
|
+
function Fe() {
|
|
584
|
+
let e = [], o = { addEventListener(t, n, l, r) {
|
|
585
|
+
return t.addEventListener(n, l, r), o.add(() => t.removeEventListener(n, l, r));
|
|
566
586
|
}, requestAnimationFrame(...t) {
|
|
567
587
|
let n = requestAnimationFrame(...t);
|
|
568
588
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -575,61 +595,61 @@ function De() {
|
|
|
575
595
|
o.add(() => clearTimeout(n));
|
|
576
596
|
}, microTask(...t) {
|
|
577
597
|
let n = { current: !0 };
|
|
578
|
-
return
|
|
598
|
+
return oo(() => {
|
|
579
599
|
n.current && t[0]();
|
|
580
600
|
}), o.add(() => {
|
|
581
601
|
n.current = !1;
|
|
582
602
|
});
|
|
583
|
-
}, style(t, n,
|
|
603
|
+
}, style(t, n, l) {
|
|
584
604
|
let r = t.style.getPropertyValue(n);
|
|
585
|
-
return Object.assign(t.style, { [n]:
|
|
605
|
+
return Object.assign(t.style, { [n]: l }), this.add(() => {
|
|
586
606
|
Object.assign(t.style, { [n]: r });
|
|
587
607
|
});
|
|
588
608
|
}, group(t) {
|
|
589
|
-
let n =
|
|
609
|
+
let n = Fe();
|
|
590
610
|
return t(n), this.add(() => n.dispose());
|
|
591
611
|
}, add(t) {
|
|
592
612
|
return e.push(t), () => {
|
|
593
613
|
let n = e.indexOf(t);
|
|
594
|
-
if (n >= 0) for (let
|
|
614
|
+
if (n >= 0) for (let l of e.splice(n, 1)) l();
|
|
595
615
|
};
|
|
596
616
|
}, dispose() {
|
|
597
617
|
for (let t of e.splice(0)) t();
|
|
598
618
|
} };
|
|
599
619
|
return o;
|
|
600
620
|
}
|
|
601
|
-
function
|
|
602
|
-
let e =
|
|
603
|
-
return
|
|
621
|
+
function lo() {
|
|
622
|
+
let e = Fe();
|
|
623
|
+
return ot(() => e.dispose()), e;
|
|
604
624
|
}
|
|
605
|
-
function
|
|
606
|
-
let e =
|
|
625
|
+
function so() {
|
|
626
|
+
let e = lo();
|
|
607
627
|
return (o) => {
|
|
608
628
|
e.dispose(), e.nextFrame(o);
|
|
609
629
|
};
|
|
610
630
|
}
|
|
611
|
-
let
|
|
612
|
-
function
|
|
613
|
-
return Ie(
|
|
631
|
+
let ro = Symbol("headlessui.useid"), io = 0;
|
|
632
|
+
function Pe() {
|
|
633
|
+
return Ie(ro, () => `${++io}`)();
|
|
614
634
|
}
|
|
615
|
-
function
|
|
635
|
+
function P(e) {
|
|
616
636
|
var o;
|
|
617
637
|
if (e == null || e.value == null) return null;
|
|
618
638
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
619
639
|
return t instanceof Node ? t : null;
|
|
620
640
|
}
|
|
621
|
-
function
|
|
641
|
+
function le(e, o, ...t) {
|
|
622
642
|
if (e in o) {
|
|
623
|
-
let
|
|
624
|
-
return typeof
|
|
643
|
+
let l = o[e];
|
|
644
|
+
return typeof l == "function" ? l(...t) : l;
|
|
625
645
|
}
|
|
626
|
-
let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((
|
|
627
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
646
|
+
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(", ")}.`);
|
|
647
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, le), n;
|
|
628
648
|
}
|
|
629
|
-
var
|
|
630
|
-
let
|
|
649
|
+
var ao = Object.defineProperty, uo = (e, o, t) => o in e ? ao(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, vt = (e, o, t) => (uo(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
650
|
+
let co = class {
|
|
631
651
|
constructor() {
|
|
632
|
-
|
|
652
|
+
vt(this, "current", this.detect()), vt(this, "currentId", 0);
|
|
633
653
|
}
|
|
634
654
|
set(o) {
|
|
635
655
|
this.current !== o && (this.currentId = 0, this.current = o);
|
|
@@ -649,244 +669,244 @@ let so = class {
|
|
|
649
669
|
detect() {
|
|
650
670
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
651
671
|
}
|
|
652
|
-
},
|
|
653
|
-
function
|
|
654
|
-
if (
|
|
672
|
+
}, rt = new co();
|
|
673
|
+
function it(e) {
|
|
674
|
+
if (rt.isServer) return null;
|
|
655
675
|
if (e instanceof Node) return e.ownerDocument;
|
|
656
676
|
if (e != null && e.hasOwnProperty("value")) {
|
|
657
|
-
let o =
|
|
677
|
+
let o = P(e);
|
|
658
678
|
if (o) return o.ownerDocument;
|
|
659
679
|
}
|
|
660
680
|
return document;
|
|
661
681
|
}
|
|
662
|
-
let
|
|
663
|
-
var
|
|
664
|
-
function
|
|
682
|
+
let ht = ["[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(",");
|
|
683
|
+
var fo = ((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))(fo || {}), po = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(po || {}), vo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(vo || {}), At = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(At || {});
|
|
684
|
+
function ho(e, o = 0) {
|
|
665
685
|
var t;
|
|
666
|
-
return e === ((t =
|
|
667
|
-
return e.matches(
|
|
686
|
+
return e === ((t = it(e)) == null ? void 0 : t.body) ? !1 : le(o, { 0() {
|
|
687
|
+
return e.matches(ht);
|
|
668
688
|
}, 1() {
|
|
669
689
|
let n = e;
|
|
670
690
|
for (; n !== null; ) {
|
|
671
|
-
if (n.matches(
|
|
691
|
+
if (n.matches(ht)) return !0;
|
|
672
692
|
n = n.parentElement;
|
|
673
693
|
}
|
|
674
694
|
return !1;
|
|
675
695
|
} });
|
|
676
696
|
}
|
|
677
|
-
var
|
|
697
|
+
var mo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(mo || {});
|
|
678
698
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
679
699
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
680
700
|
}, !0), document.addEventListener("click", (e) => {
|
|
681
701
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
682
702
|
}, !0));
|
|
683
|
-
function
|
|
703
|
+
function go(e, o = (t) => t) {
|
|
684
704
|
return e.slice().sort((t, n) => {
|
|
685
|
-
let
|
|
686
|
-
if (
|
|
687
|
-
let i =
|
|
705
|
+
let l = o(t), r = o(n);
|
|
706
|
+
if (l === null || r === null) return 0;
|
|
707
|
+
let i = l.compareDocumentPosition(r);
|
|
688
708
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
689
709
|
});
|
|
690
710
|
}
|
|
691
|
-
function
|
|
711
|
+
function bo() {
|
|
692
712
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
693
713
|
}
|
|
694
|
-
function
|
|
714
|
+
function xo() {
|
|
695
715
|
return /Android/gi.test(window.navigator.userAgent);
|
|
696
716
|
}
|
|
697
|
-
function
|
|
698
|
-
return
|
|
717
|
+
function Ft() {
|
|
718
|
+
return bo() || xo();
|
|
699
719
|
}
|
|
700
|
-
function
|
|
701
|
-
|
|
720
|
+
function ke(e, o, t) {
|
|
721
|
+
rt.isServer || ie((n) => {
|
|
702
722
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
703
723
|
});
|
|
704
724
|
}
|
|
705
|
-
function
|
|
706
|
-
|
|
725
|
+
function _o(e, o, t) {
|
|
726
|
+
rt.isServer || ie((n) => {
|
|
707
727
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
708
728
|
});
|
|
709
729
|
}
|
|
710
|
-
function
|
|
730
|
+
function Co(e, o, t = S(() => !0)) {
|
|
711
731
|
function n(r, i) {
|
|
712
732
|
if (!t.value || r.defaultPrevented) return;
|
|
713
|
-
let
|
|
714
|
-
if (
|
|
733
|
+
let s = i(r);
|
|
734
|
+
if (s === null || !s.getRootNode().contains(s)) return;
|
|
715
735
|
let a = function u(c) {
|
|
716
736
|
return typeof c == "function" ? u(c()) : Array.isArray(c) || c instanceof Set ? c : [c];
|
|
717
737
|
}(e);
|
|
718
738
|
for (let u of a) {
|
|
719
739
|
if (u === null) continue;
|
|
720
|
-
let c = u instanceof HTMLElement ? u :
|
|
721
|
-
if (c != null && c.contains(
|
|
740
|
+
let c = u instanceof HTMLElement ? u : P(u);
|
|
741
|
+
if (c != null && c.contains(s) || r.composed && r.composedPath().includes(c)) return;
|
|
722
742
|
}
|
|
723
|
-
return !
|
|
724
|
-
}
|
|
725
|
-
let
|
|
726
|
-
|
|
727
|
-
var i,
|
|
728
|
-
t.value && (
|
|
729
|
-
}, !0),
|
|
730
|
-
var i,
|
|
731
|
-
t.value && (
|
|
732
|
-
}, !0),
|
|
733
|
-
|
|
734
|
-
}, !0),
|
|
735
|
-
}
|
|
736
|
-
function
|
|
743
|
+
return !ho(s, At.Loose) && s.tabIndex !== -1 && r.preventDefault(), o(r, s);
|
|
744
|
+
}
|
|
745
|
+
let l = E(null);
|
|
746
|
+
ke("pointerdown", (r) => {
|
|
747
|
+
var i, s;
|
|
748
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
749
|
+
}, !0), ke("mousedown", (r) => {
|
|
750
|
+
var i, s;
|
|
751
|
+
t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
|
|
752
|
+
}, !0), ke("click", (r) => {
|
|
753
|
+
Ft() || l.value && (n(r, () => l.value), l.value = null);
|
|
754
|
+
}, !0), ke("touchend", (r) => n(r, () => r.target instanceof HTMLElement ? r.target : null), !0), _o("blur", (r) => n(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
755
|
+
}
|
|
756
|
+
function mt(e, o) {
|
|
737
757
|
if (e) return e;
|
|
738
758
|
let t = o ?? "button";
|
|
739
759
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
740
760
|
}
|
|
741
|
-
function
|
|
742
|
-
let t = E(
|
|
761
|
+
function yo(e, o) {
|
|
762
|
+
let t = E(mt(e.value.type, e.value.as));
|
|
743
763
|
return Ce(() => {
|
|
744
|
-
t.value =
|
|
764
|
+
t.value = mt(e.value.type, e.value.as);
|
|
745
765
|
}), ie(() => {
|
|
746
766
|
var n;
|
|
747
|
-
t.value ||
|
|
767
|
+
t.value || P(o) && P(o) instanceof HTMLButtonElement && !((n = P(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
748
768
|
}), t;
|
|
749
769
|
}
|
|
750
|
-
function
|
|
770
|
+
function gt(e) {
|
|
751
771
|
return [e.screenX, e.screenY];
|
|
752
772
|
}
|
|
753
|
-
function
|
|
773
|
+
function wo() {
|
|
754
774
|
let e = E([-1, -1]);
|
|
755
775
|
return { wasMoved(o) {
|
|
756
|
-
let t =
|
|
776
|
+
let t = gt(o);
|
|
757
777
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
758
778
|
}, update(o) {
|
|
759
|
-
e.value =
|
|
779
|
+
e.value = gt(o);
|
|
760
780
|
} };
|
|
761
781
|
}
|
|
762
|
-
function
|
|
782
|
+
function So({ container: e, accept: o, walk: t, enabled: n }) {
|
|
763
783
|
ie(() => {
|
|
764
|
-
let
|
|
765
|
-
if (!
|
|
766
|
-
let r =
|
|
784
|
+
let l = e.value;
|
|
785
|
+
if (!l || n !== void 0 && !n.value) return;
|
|
786
|
+
let r = it(e);
|
|
767
787
|
if (!r) return;
|
|
768
|
-
let i = Object.assign((a) => o(a), { acceptNode: o }),
|
|
769
|
-
for (;
|
|
788
|
+
let i = Object.assign((a) => o(a), { acceptNode: o }), s = r.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
789
|
+
for (; s.nextNode(); ) t(s.currentNode);
|
|
770
790
|
});
|
|
771
791
|
}
|
|
772
|
-
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}),
|
|
773
|
-
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...
|
|
792
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), Eo = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Eo || {});
|
|
793
|
+
function pe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
774
794
|
var r;
|
|
775
|
-
let i =
|
|
776
|
-
if (e || o & 2 && i.static) return
|
|
795
|
+
let i = Bt(n, t), s = Object.assign(l, { props: i });
|
|
796
|
+
if (e || o & 2 && i.static) return Ke(s);
|
|
777
797
|
if (o & 1) {
|
|
778
798
|
let a = (r = i.unmount) == null || r ? 0 : 1;
|
|
779
|
-
return
|
|
799
|
+
return le(a, { 0() {
|
|
780
800
|
return null;
|
|
781
801
|
}, 1() {
|
|
782
|
-
return
|
|
802
|
+
return Ke({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
783
803
|
} });
|
|
784
804
|
}
|
|
785
|
-
return
|
|
805
|
+
return Ke(s);
|
|
786
806
|
}
|
|
787
|
-
function
|
|
807
|
+
function Ke({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
788
808
|
var r, i;
|
|
789
|
-
let { as:
|
|
809
|
+
let { as: s, ...a } = He(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), c = {};
|
|
790
810
|
if (n) {
|
|
791
811
|
let p = !1, g = [];
|
|
792
812
|
for (let [x, _] of Object.entries(n)) typeof _ == "boolean" && (p = !0), _ === !0 && g.push(x);
|
|
793
813
|
p && (c["data-headlessui-state"] = g.join(" "));
|
|
794
814
|
}
|
|
795
|
-
if (
|
|
796
|
-
if (u =
|
|
815
|
+
if (s === "template") {
|
|
816
|
+
if (u = jt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
|
|
797
817
|
let [p, ...g] = u ?? [];
|
|
798
|
-
if (
|
|
818
|
+
if (!$o(p) || g.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((v) => v.trim()).filter((v, $, N) => N.indexOf(v) === $).sort((v, $) => v.localeCompare($)).map((v) => ` - ${v}`).join(`
|
|
799
819
|
`), "", "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((v) => ` - ${v}`).join(`
|
|
800
820
|
`)].join(`
|
|
801
821
|
`));
|
|
802
|
-
let x =
|
|
822
|
+
let x = Bt((i = p.props) != null ? i : {}, a, c), _ = Lt(p, x, !0);
|
|
803
823
|
for (let v in x) v.startsWith("on") && (_.props || (_.props = {}), _.props[v] = x[v]);
|
|
804
824
|
return _;
|
|
805
825
|
}
|
|
806
826
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
807
827
|
}
|
|
808
|
-
return Ee(
|
|
828
|
+
return Ee(s, Object.assign({}, a, c), { default: () => u });
|
|
809
829
|
}
|
|
810
|
-
function
|
|
811
|
-
return e.flatMap((o) => o.type === Z ?
|
|
830
|
+
function jt(e) {
|
|
831
|
+
return e.flatMap((o) => o.type === Z ? jt(o.children) : [o]);
|
|
812
832
|
}
|
|
813
|
-
function
|
|
833
|
+
function Bt(...e) {
|
|
814
834
|
if (e.length === 0) return {};
|
|
815
835
|
if (e.length === 1) return e[0];
|
|
816
836
|
let o = {}, t = {};
|
|
817
|
-
for (let n of e) for (let
|
|
837
|
+
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];
|
|
818
838
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
819
|
-
for (let n in t) Object.assign(o, { [n](
|
|
839
|
+
for (let n in t) Object.assign(o, { [n](l, ...r) {
|
|
820
840
|
let i = t[n];
|
|
821
|
-
for (let
|
|
822
|
-
if (
|
|
823
|
-
l
|
|
841
|
+
for (let s of i) {
|
|
842
|
+
if (l instanceof Event && l.defaultPrevented) return;
|
|
843
|
+
s(l, ...r);
|
|
824
844
|
}
|
|
825
845
|
} });
|
|
826
846
|
return o;
|
|
827
847
|
}
|
|
828
|
-
function
|
|
848
|
+
function Oo(e) {
|
|
829
849
|
let o = Object.assign({}, e);
|
|
830
850
|
for (let t in o) o[t] === void 0 && delete o[t];
|
|
831
851
|
return o;
|
|
832
852
|
}
|
|
833
|
-
function
|
|
853
|
+
function He(e, o = []) {
|
|
834
854
|
let t = Object.assign({}, e);
|
|
835
855
|
for (let n of o) n in t && delete t[n];
|
|
836
856
|
return t;
|
|
837
857
|
}
|
|
838
|
-
function
|
|
858
|
+
function $o(e) {
|
|
839
859
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
840
860
|
}
|
|
841
|
-
var
|
|
842
|
-
let
|
|
861
|
+
var Ht = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Ht || {});
|
|
862
|
+
let To = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
843
863
|
return () => {
|
|
844
864
|
var n;
|
|
845
|
-
let { features:
|
|
865
|
+
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" } } };
|
|
846
866
|
return pe({ ourProps: i, theirProps: r, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
847
867
|
};
|
|
848
|
-
} }),
|
|
868
|
+
} }), zt = Symbol("Context");
|
|
849
869
|
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 || {});
|
|
850
|
-
function
|
|
851
|
-
return Ie(
|
|
870
|
+
function Io() {
|
|
871
|
+
return Ie(zt, null);
|
|
852
872
|
}
|
|
853
|
-
function
|
|
854
|
-
|
|
873
|
+
function Lo(e) {
|
|
874
|
+
lt(zt, e);
|
|
855
875
|
}
|
|
856
|
-
var W = ((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))(W || {}),
|
|
857
|
-
function
|
|
876
|
+
var W = ((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))(W || {}), Ut = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Ut || {});
|
|
877
|
+
function Ro(e) {
|
|
858
878
|
function o() {
|
|
859
879
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
860
880
|
}
|
|
861
881
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
|
|
862
882
|
}
|
|
863
883
|
let ce = [];
|
|
864
|
-
|
|
884
|
+
Ro(() => {
|
|
865
885
|
function e(o) {
|
|
866
886
|
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));
|
|
867
887
|
}
|
|
868
888
|
window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
|
|
869
889
|
});
|
|
870
|
-
function
|
|
890
|
+
function Po(e) {
|
|
871
891
|
throw new Error("Unexpected object: " + e);
|
|
872
892
|
}
|
|
873
893
|
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 || {});
|
|
874
|
-
function
|
|
894
|
+
function bt(e, o) {
|
|
875
895
|
let t = o.resolveItems();
|
|
876
896
|
if (t.length <= 0) return null;
|
|
877
|
-
let n = o.resolveActiveIndex(),
|
|
897
|
+
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
878
898
|
switch (e.focus) {
|
|
879
899
|
case 0: {
|
|
880
900
|
for (let r = 0; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
881
901
|
return n;
|
|
882
902
|
}
|
|
883
903
|
case 1: {
|
|
884
|
-
|
|
885
|
-
for (let r =
|
|
904
|
+
l === -1 && (l = t.length);
|
|
905
|
+
for (let r = l - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
886
906
|
return n;
|
|
887
907
|
}
|
|
888
908
|
case 2: {
|
|
889
|
-
for (let r =
|
|
909
|
+
for (let r = l + 1; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
|
|
890
910
|
return n;
|
|
891
911
|
}
|
|
892
912
|
case 3: {
|
|
@@ -900,64 +920,64 @@ function gt(e, o) {
|
|
|
900
920
|
case 5:
|
|
901
921
|
return null;
|
|
902
922
|
default:
|
|
903
|
-
|
|
923
|
+
Po(e);
|
|
904
924
|
}
|
|
905
925
|
}
|
|
906
|
-
function
|
|
907
|
-
for (let [n,
|
|
926
|
+
function Zt(e = {}, o = null, t = []) {
|
|
927
|
+
for (let [n, l] of Object.entries(e)) Gt(t, Wt(o, n), l);
|
|
908
928
|
return t;
|
|
909
929
|
}
|
|
910
|
-
function
|
|
930
|
+
function Wt(e, o) {
|
|
911
931
|
return e ? e + "[" + o + "]" : o;
|
|
912
932
|
}
|
|
913
|
-
function
|
|
914
|
-
if (Array.isArray(t)) for (let [n,
|
|
915
|
-
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, ""]) :
|
|
933
|
+
function Gt(e, o, t) {
|
|
934
|
+
if (Array.isArray(t)) for (let [n, l] of t.entries()) Gt(e, Wt(o, n.toString()), l);
|
|
935
|
+
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, ""]) : Zt(t, o, e);
|
|
916
936
|
}
|
|
917
|
-
function
|
|
937
|
+
function Vo(e, o) {
|
|
918
938
|
return e === o;
|
|
919
939
|
}
|
|
920
|
-
var
|
|
921
|
-
let
|
|
940
|
+
var ko = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(ko || {}), Mo = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Mo || {}), No = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(No || {});
|
|
941
|
+
let qt = Symbol("ComboboxContext");
|
|
922
942
|
function ve(e) {
|
|
923
|
-
let o = Ie(
|
|
943
|
+
let o = Ie(qt, null);
|
|
924
944
|
if (o === null) {
|
|
925
945
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
926
946
|
throw Error.captureStackTrace && Error.captureStackTrace(t, ve), t;
|
|
927
947
|
}
|
|
928
948
|
return o;
|
|
929
949
|
}
|
|
930
|
-
let
|
|
950
|
+
let Jt = Symbol("VirtualContext"), Do = ae({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
931
951
|
let t = ve("VirtualProvider"), n = S(() => {
|
|
932
|
-
let
|
|
933
|
-
if (!
|
|
934
|
-
let a = window.getComputedStyle(
|
|
952
|
+
let s = P(t.optionsRef);
|
|
953
|
+
if (!s) return { start: 0, end: 0 };
|
|
954
|
+
let a = window.getComputedStyle(s);
|
|
935
955
|
return { start: parseFloat(a.paddingBlockStart || a.paddingTop), end: parseFloat(a.paddingBlockEnd || a.paddingBottom) };
|
|
936
|
-
}),
|
|
956
|
+
}), l = to(S(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
937
957
|
return 40;
|
|
938
958
|
}, getScrollElement() {
|
|
939
|
-
return
|
|
959
|
+
return P(t.optionsRef);
|
|
940
960
|
}, overscan: 12 }))), r = S(() => {
|
|
941
|
-
var
|
|
942
|
-
return (
|
|
961
|
+
var s;
|
|
962
|
+
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
943
963
|
}), i = E(0);
|
|
944
964
|
return F([r], () => {
|
|
945
965
|
i.value += 1;
|
|
946
|
-
}),
|
|
947
|
-
if (
|
|
966
|
+
}), lt(Jt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
967
|
+
if (s) {
|
|
948
968
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
949
|
-
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value &&
|
|
969
|
+
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
950
970
|
}
|
|
951
|
-
} },
|
|
952
|
-
} }),
|
|
953
|
-
let
|
|
971
|
+
} }, l.value.getVirtualItems().map((s) => Lt(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" } })))];
|
|
972
|
+
} }), Ao = 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 }) {
|
|
973
|
+
let l = E(1), r = E(null), i = E(null), s = E(null), a = E(null), u = E({ static: !1, hold: !1 }), c = E([]), p = E(null), g = E(2), x = E(!1);
|
|
954
974
|
function _(d = (f) => f) {
|
|
955
|
-
let f = p.value !== null ? c.value[p.value] : null, y = d(c.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((A, G) => A.dataRef.order.value - G.dataRef.order.value) :
|
|
975
|
+
let f = p.value !== null ? c.value[p.value] : null, y = d(c.value.slice()), O = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((A, G) => A.dataRef.order.value - G.dataRef.order.value) : go(y, (A) => P(A.dataRef.domRef)), M = f ? O.indexOf(f) : null;
|
|
956
976
|
return M === -1 && (M = null), { options: O, activeOptionIndex: M };
|
|
957
977
|
}
|
|
958
|
-
let v = S(() => e.multiple ? 1 : 0),
|
|
959
|
-
function
|
|
960
|
-
return
|
|
978
|
+
let v = S(() => e.multiple ? 1 : 0), $ = S(() => e.nullable), [N, I] = no(S(() => e.modelValue), (d) => n("update:modelValue", d), S(() => e.defaultValue)), k = S(() => N.value === void 0 ? le(v.value, { 1: [], 0: void 0 }) : N.value), D = null, m = null;
|
|
979
|
+
function R(d) {
|
|
980
|
+
return le(v.value, { 0() {
|
|
961
981
|
return I == null ? void 0 : I(d);
|
|
962
982
|
}, 1: () => {
|
|
963
983
|
let f = K(b.value.value).slice(), y = K(d), O = f.findIndex((M) => b.compare(y, K(M)));
|
|
@@ -972,15 +992,15 @@ let Wt = Symbol("VirtualContext"), Po = ae({ name: "VirtualProvider", setup(e, {
|
|
|
972
992
|
y !== -1 ? p.value = y : p.value = null;
|
|
973
993
|
}
|
|
974
994
|
});
|
|
975
|
-
let b = { comboboxState:
|
|
995
|
+
let b = { comboboxState: l, value: k, mode: v, compare(d, f) {
|
|
976
996
|
if (typeof e.by == "string") {
|
|
977
997
|
let y = e.by;
|
|
978
998
|
return (d == null ? void 0 : d[y]) === (f == null ? void 0 : f[y]);
|
|
979
999
|
}
|
|
980
|
-
return e.by === null ?
|
|
1000
|
+
return e.by === null ? Vo(d, f) : e.by(d, f);
|
|
981
1001
|
}, calculateIndex(d) {
|
|
982
1002
|
return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(d) : b.virtual.value.options.findIndex((f) => b.compare(f, d)) : c.value.findIndex((f) => b.compare(f.dataRef.value, d));
|
|
983
|
-
}, defaultValue: S(() => e.defaultValue), nullable:
|
|
1003
|
+
}, defaultValue: S(() => e.defaultValue), nullable: $, immediate: S(() => !1), virtual: S(() => null), inputRef: i, labelRef: r, buttonRef: s, optionsRef: a, disabled: S(() => e.disabled), options: c, change(d) {
|
|
984
1004
|
I(d);
|
|
985
1005
|
}, activeOptionIndex: S(() => {
|
|
986
1006
|
if (x.value && p.value === null && (b.virtual.value ? b.virtual.value.options.length > 0 : c.value.length > 0)) {
|
|
@@ -996,22 +1016,22 @@ let Wt = Symbol("VirtualContext"), Po = ae({ name: "VirtualProvider", setup(e, {
|
|
|
996
1016
|
}
|
|
997
1017
|
return p.value;
|
|
998
1018
|
}), activationTrigger: g, optionsPropsRef: u, closeCombobox() {
|
|
999
|
-
x.value = !1, !e.disabled &&
|
|
1019
|
+
x.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, p.value = null);
|
|
1000
1020
|
}, openCombobox() {
|
|
1001
|
-
if (x.value = !0, !e.disabled &&
|
|
1021
|
+
if (x.value = !0, !e.disabled && l.value !== 0) {
|
|
1002
1022
|
if (b.value.value) {
|
|
1003
1023
|
let d = b.calculateIndex(b.value.value);
|
|
1004
1024
|
d !== -1 && (p.value = d);
|
|
1005
1025
|
}
|
|
1006
|
-
|
|
1026
|
+
l.value = 0;
|
|
1007
1027
|
}
|
|
1008
1028
|
}, setActivationTrigger(d) {
|
|
1009
1029
|
g.value = d;
|
|
1010
1030
|
}, goToOption(d, f, y) {
|
|
1011
1031
|
x.value = !1, D !== null && cancelAnimationFrame(D), D = requestAnimationFrame(() => {
|
|
1012
|
-
if (e.disabled || a.value && !u.value.static &&
|
|
1032
|
+
if (e.disabled || a.value && !u.value.static && l.value === 1) return;
|
|
1013
1033
|
if (b.virtual.value) {
|
|
1014
|
-
p.value = d === z.Specific ? f :
|
|
1034
|
+
p.value = d === z.Specific ? f : bt({ focus: d }, { resolveItems: () => b.virtual.value.options, resolveActiveIndex: () => {
|
|
1015
1035
|
var A, G;
|
|
1016
1036
|
return (G = (A = b.activeOptionIndex.value) != null ? A : b.virtual.value.options.findIndex((q) => {
|
|
1017
1037
|
var j;
|
|
@@ -1027,32 +1047,32 @@ let Wt = Symbol("VirtualContext"), Po = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1027
1047
|
let A = O.options.findIndex((G) => !G.dataRef.disabled);
|
|
1028
1048
|
A !== -1 && (O.activeOptionIndex = A);
|
|
1029
1049
|
}
|
|
1030
|
-
let M = d === z.Specific ? f :
|
|
1050
|
+
let M = d === z.Specific ? f : bt({ focus: d }, { resolveItems: () => O.options, resolveActiveIndex: () => O.activeOptionIndex, resolveId: (A) => A.id, resolveDisabled: (A) => A.dataRef.disabled });
|
|
1031
1051
|
p.value = M, g.value = y ?? 2, c.value = O.options;
|
|
1032
1052
|
});
|
|
1033
1053
|
}, selectOption(d) {
|
|
1034
1054
|
let f = c.value.find((O) => O.id === d);
|
|
1035
1055
|
if (!f) return;
|
|
1036
1056
|
let { dataRef: y } = f;
|
|
1037
|
-
|
|
1057
|
+
R(y.value);
|
|
1038
1058
|
}, selectActiveOption() {
|
|
1039
1059
|
if (b.activeOptionIndex.value !== null) {
|
|
1040
|
-
if (b.virtual.value)
|
|
1060
|
+
if (b.virtual.value) R(b.virtual.value.options[b.activeOptionIndex.value]);
|
|
1041
1061
|
else {
|
|
1042
1062
|
let { dataRef: d } = c.value[b.activeOptionIndex.value];
|
|
1043
|
-
|
|
1063
|
+
R(d.value);
|
|
1044
1064
|
}
|
|
1045
1065
|
b.goToOption(z.Specific, b.activeOptionIndex.value);
|
|
1046
1066
|
}
|
|
1047
1067
|
}, registerOption(d, f) {
|
|
1048
|
-
let y =
|
|
1068
|
+
let y = Rt({ id: d, dataRef: f });
|
|
1049
1069
|
if (b.virtual.value) {
|
|
1050
1070
|
c.value.push(y);
|
|
1051
1071
|
return;
|
|
1052
1072
|
}
|
|
1053
|
-
|
|
1073
|
+
m && cancelAnimationFrame(m);
|
|
1054
1074
|
let O = _((M) => (M.push(y), M));
|
|
1055
|
-
p.value === null && b.isSelected(f.value.value) && (O.activeOptionIndex = O.options.indexOf(y)), c.value = O.options, p.value = O.activeOptionIndex, g.value = 2, O.options.some((M) => !
|
|
1075
|
+
p.value === null && b.isSelected(f.value.value) && (O.activeOptionIndex = O.options.indexOf(y)), c.value = O.options, p.value = O.activeOptionIndex, g.value = 2, O.options.some((M) => !P(M.dataRef.domRef)) && (m = requestAnimationFrame(() => {
|
|
1056
1076
|
let M = _();
|
|
1057
1077
|
c.value = M.options, p.value = M.activeOptionIndex;
|
|
1058
1078
|
}));
|
|
@@ -1067,14 +1087,14 @@ let Wt = Symbol("VirtualContext"), Po = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1067
1087
|
});
|
|
1068
1088
|
c.value = y.options, p.value = y.activeOptionIndex, g.value = 2;
|
|
1069
1089
|
}, isSelected(d) {
|
|
1070
|
-
return
|
|
1090
|
+
return le(v.value, { 0: () => b.compare(K(b.value.value), K(d)), 1: () => K(b.value.value).some((f) => b.compare(K(f), K(d))) });
|
|
1071
1091
|
}, isActive(d) {
|
|
1072
1092
|
return p.value === b.calculateIndex(d);
|
|
1073
1093
|
} };
|
|
1074
|
-
|
|
1094
|
+
Co([i, s, a], () => b.closeCombobox(), S(() => l.value === 0)), lt(qt, b), Lo(S(() => le(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1075
1095
|
let L = S(() => {
|
|
1076
1096
|
var d;
|
|
1077
|
-
return (d =
|
|
1097
|
+
return (d = P(i)) == null ? void 0 : d.closest("form");
|
|
1078
1098
|
});
|
|
1079
1099
|
return Ce(() => {
|
|
1080
1100
|
F([L], () => {
|
|
@@ -1089,30 +1109,30 @@ let Wt = Symbol("VirtualContext"), Po = ae({ name: "VirtualProvider", setup(e, {
|
|
|
1089
1109
|
}, { immediate: !0 });
|
|
1090
1110
|
}), () => {
|
|
1091
1111
|
var d, f, y;
|
|
1092
|
-
let { name: O, disabled: M, form: A, ...G } = e, q = { open:
|
|
1093
|
-
return Ee(Z, [...O != null && k.value != null ?
|
|
1112
|
+
let { name: O, disabled: M, form: A, ...G } = e, q = { open: l.value === 0, disabled: M, activeIndex: b.activeOptionIndex.value, activeOption: b.activeOptionIndex.value === null ? null : b.virtual.value ? b.virtual.value.options[(d = b.activeOptionIndex.value) != null ? d : 0] : (y = (f = b.options.value[b.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? y : null, value: k.value };
|
|
1113
|
+
return Ee(Z, [...O != null && k.value != null ? Zt({ [O]: k.value }).map(([j, hn]) => Ee(To, Oo({ features: Ht.Hidden, key: j, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: A, disabled: M, name: j, value: hn }))) : [], pe({ theirProps: { ...t, ...He(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1094
1114
|
};
|
|
1095
1115
|
} });
|
|
1096
1116
|
ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1097
1117
|
var n;
|
|
1098
|
-
let
|
|
1118
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Pe()}`, r = ve("ComboboxLabel");
|
|
1099
1119
|
function i() {
|
|
1100
|
-
var
|
|
1101
|
-
(
|
|
1120
|
+
var s;
|
|
1121
|
+
(s = P(r.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1102
1122
|
}
|
|
1103
1123
|
return () => {
|
|
1104
|
-
let
|
|
1105
|
-
return pe({ ourProps: u, theirProps: a, slot:
|
|
1124
|
+
let s = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...a } = e, u = { id: l, ref: r.labelRef, onClick: i };
|
|
1125
|
+
return pe({ ourProps: u, theirProps: a, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1106
1126
|
};
|
|
1107
1127
|
} });
|
|
1108
|
-
let
|
|
1109
|
-
var
|
|
1110
|
-
let r = (
|
|
1128
|
+
let Fo = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1129
|
+
var l;
|
|
1130
|
+
let r = (l = e.id) != null ? l : `headlessui-combobox-button-${Pe()}`, i = ve("ComboboxButton");
|
|
1111
1131
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1112
|
-
function
|
|
1132
|
+
function s(c) {
|
|
1113
1133
|
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), Q(() => {
|
|
1114
1134
|
var p;
|
|
1115
|
-
return (p =
|
|
1135
|
+
return (p = P(i.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1116
1136
|
}));
|
|
1117
1137
|
}
|
|
1118
1138
|
function a(c) {
|
|
@@ -1140,40 +1160,40 @@ let Vo = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1140
1160
|
return;
|
|
1141
1161
|
}
|
|
1142
1162
|
}
|
|
1143
|
-
let u =
|
|
1163
|
+
let u = yo(S(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1144
1164
|
return () => {
|
|
1145
1165
|
var c, p;
|
|
1146
|
-
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...x } = e, _ = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c =
|
|
1166
|
+
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...x } = e, _ = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = P(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = P(i.labelRef)) == null ? void 0 : p.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
|
|
1147
1167
|
return pe({ ourProps: _, theirProps: x, slot: g, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1148
1168
|
};
|
|
1149
|
-
} }),
|
|
1169
|
+
} }), jo = 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 }) {
|
|
1150
1170
|
var r;
|
|
1151
|
-
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${
|
|
1152
|
-
|
|
1171
|
+
let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Pe()}`, s = ve("ComboboxInput"), a = S(() => it(P(s.inputRef))), u = { value: !1 };
|
|
1172
|
+
l({ el: s.inputRef, $el: s.inputRef });
|
|
1153
1173
|
function c() {
|
|
1154
|
-
|
|
1155
|
-
let
|
|
1156
|
-
|
|
1174
|
+
s.change(null);
|
|
1175
|
+
let m = P(s.optionsRef);
|
|
1176
|
+
m && (m.scrollTop = 0), s.goToOption(z.Nothing);
|
|
1157
1177
|
}
|
|
1158
1178
|
let p = S(() => {
|
|
1159
|
-
var
|
|
1160
|
-
let
|
|
1161
|
-
return
|
|
1179
|
+
var m;
|
|
1180
|
+
let R = s.value.value;
|
|
1181
|
+
return P(s.inputRef) ? typeof e.displayValue < "u" && R !== void 0 ? (m = e.displayValue(R)) != null ? m : "" : typeof R == "string" ? R : "" : "";
|
|
1162
1182
|
});
|
|
1163
1183
|
Ce(() => {
|
|
1164
|
-
F([p,
|
|
1184
|
+
F([p, s.comboboxState, a], ([m, R], [C, b]) => {
|
|
1165
1185
|
if (u.value) return;
|
|
1166
|
-
let L =
|
|
1167
|
-
L && ((b === 0 &&
|
|
1186
|
+
let L = P(s.inputRef);
|
|
1187
|
+
L && ((b === 0 && R === 1 || m !== C) && (L.value = m), requestAnimationFrame(() => {
|
|
1168
1188
|
var d;
|
|
1169
1189
|
if (u.value || !L || ((d = a.value) == null ? void 0 : d.activeElement) !== L) return;
|
|
1170
1190
|
let { selectionStart: f, selectionEnd: y } = L;
|
|
1171
1191
|
Math.abs((y ?? 0) - (f ?? 0)) === 0 && f === 0 && L.setSelectionRange(L.value.length, L.value.length);
|
|
1172
1192
|
}));
|
|
1173
|
-
}, { immediate: !0 }), F([
|
|
1174
|
-
if (
|
|
1193
|
+
}, { immediate: !0 }), F([s.comboboxState], ([m], [R]) => {
|
|
1194
|
+
if (m === 0 && R === 1) {
|
|
1175
1195
|
if (u.value) return;
|
|
1176
|
-
let C =
|
|
1196
|
+
let C = P(s.inputRef);
|
|
1177
1197
|
if (!C) return;
|
|
1178
1198
|
let b = C.value, { selectionStart: L, selectionEnd: d, selectionDirection: f } = C;
|
|
1179
1199
|
C.value = "", C.value = b, f !== null ? C.setSelectionRange(L, d, f) : C.setSelectionRange(L, d);
|
|
@@ -1185,84 +1205,84 @@ let Vo = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1185
1205
|
g.value = !0;
|
|
1186
1206
|
}
|
|
1187
1207
|
function _() {
|
|
1188
|
-
|
|
1208
|
+
Fe().nextFrame(() => {
|
|
1189
1209
|
g.value = !1;
|
|
1190
1210
|
});
|
|
1191
1211
|
}
|
|
1192
|
-
let v =
|
|
1193
|
-
function
|
|
1212
|
+
let v = so();
|
|
1213
|
+
function $(m) {
|
|
1194
1214
|
switch (u.value = !0, v(() => {
|
|
1195
1215
|
u.value = !1;
|
|
1196
|
-
}),
|
|
1216
|
+
}), m.key) {
|
|
1197
1217
|
case W.Enter:
|
|
1198
|
-
if (u.value = !1,
|
|
1199
|
-
if (
|
|
1200
|
-
|
|
1218
|
+
if (u.value = !1, s.comboboxState.value !== 0 || g.value) return;
|
|
1219
|
+
if (m.preventDefault(), m.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1220
|
+
s.closeCombobox();
|
|
1201
1221
|
return;
|
|
1202
1222
|
}
|
|
1203
|
-
|
|
1223
|
+
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1204
1224
|
break;
|
|
1205
1225
|
case W.ArrowDown:
|
|
1206
|
-
return u.value = !1,
|
|
1226
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Next), 1: () => s.openCombobox() });
|
|
1207
1227
|
case W.ArrowUp:
|
|
1208
|
-
return u.value = !1,
|
|
1209
|
-
|
|
1210
|
-
|
|
1228
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), le(s.comboboxState.value, { 0: () => s.goToOption(z.Previous), 1: () => {
|
|
1229
|
+
s.openCombobox(), Q(() => {
|
|
1230
|
+
s.value.value || s.goToOption(z.Last);
|
|
1211
1231
|
});
|
|
1212
1232
|
} });
|
|
1213
1233
|
case W.Home:
|
|
1214
|
-
if (
|
|
1215
|
-
return u.value = !1,
|
|
1234
|
+
if (m.shiftKey) break;
|
|
1235
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.First);
|
|
1216
1236
|
case W.PageUp:
|
|
1217
|
-
return u.value = !1,
|
|
1237
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.First);
|
|
1218
1238
|
case W.End:
|
|
1219
|
-
if (
|
|
1220
|
-
return u.value = !1,
|
|
1239
|
+
if (m.shiftKey) break;
|
|
1240
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.Last);
|
|
1221
1241
|
case W.PageDown:
|
|
1222
|
-
return u.value = !1,
|
|
1242
|
+
return u.value = !1, m.preventDefault(), m.stopPropagation(), s.goToOption(z.Last);
|
|
1223
1243
|
case W.Escape:
|
|
1224
|
-
if (u.value = !1,
|
|
1225
|
-
|
|
1244
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1245
|
+
m.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && m.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && c(), s.closeCombobox();
|
|
1226
1246
|
break;
|
|
1227
1247
|
case W.Tab:
|
|
1228
|
-
if (u.value = !1,
|
|
1229
|
-
|
|
1248
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1249
|
+
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1230
1250
|
break;
|
|
1231
1251
|
}
|
|
1232
1252
|
}
|
|
1233
|
-
function N(
|
|
1234
|
-
o("change",
|
|
1253
|
+
function N(m) {
|
|
1254
|
+
o("change", m), s.nullable.value && s.mode.value === 0 && m.target.value === "" && c(), s.openCombobox();
|
|
1235
1255
|
}
|
|
1236
|
-
function I(
|
|
1237
|
-
var
|
|
1238
|
-
let L = (
|
|
1239
|
-
if (u.value = !1, !((C =
|
|
1256
|
+
function I(m) {
|
|
1257
|
+
var R, C, b;
|
|
1258
|
+
let L = (R = m.relatedTarget) != null ? R : ce.find((d) => d !== m.currentTarget);
|
|
1259
|
+
if (u.value = !1, !((C = P(s.optionsRef)) != null && C.contains(L)) && !((b = P(s.buttonRef)) != null && b.contains(L)) && s.comboboxState.value === 0) return m.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? c() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1240
1260
|
}
|
|
1241
|
-
function k(
|
|
1242
|
-
var
|
|
1243
|
-
let L = (
|
|
1244
|
-
(C =
|
|
1245
|
-
|
|
1261
|
+
function k(m) {
|
|
1262
|
+
var R, C, b;
|
|
1263
|
+
let L = (R = m.relatedTarget) != null ? R : ce.find((d) => d !== m.currentTarget);
|
|
1264
|
+
(C = P(s.buttonRef)) != null && C.contains(L) || (b = P(s.optionsRef)) != null && b.contains(L) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), Fe().nextFrame(() => {
|
|
1265
|
+
s.setActivationTrigger(1);
|
|
1246
1266
|
}));
|
|
1247
1267
|
}
|
|
1248
1268
|
let D = S(() => {
|
|
1249
|
-
var
|
|
1250
|
-
return (b = (C = (
|
|
1269
|
+
var m, R, C, b;
|
|
1270
|
+
return (b = (C = (R = e.defaultValue) != null ? R : s.defaultValue.value !== void 0 ? (m = e.displayValue) == null ? void 0 : m.call(e, s.defaultValue.value) : null) != null ? C : s.defaultValue.value) != null ? b : "";
|
|
1251
1271
|
});
|
|
1252
1272
|
return () => {
|
|
1253
|
-
var
|
|
1254
|
-
let y = { open:
|
|
1273
|
+
var m, R, C, b, L, d, f;
|
|
1274
|
+
let y = { open: s.comboboxState.value === 0 }, { displayValue: O, onChange: M, ...A } = e, G = { "aria-controls": (m = s.optionsRef.value) == null ? void 0 : m.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (R = 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 : R.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (b = P(s.labelRef)) == null ? void 0 : b.id) != null ? d : (L = P(s.buttonRef)) == null ? void 0 : L.id, "aria-autocomplete": "list", id: i, onCompositionstart: x, onCompositionend: _, onKeydown: $, onInput: N, onFocus: k, onBlur: I, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: D.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1255
1275
|
return pe({ ourProps: G, theirProps: A, slot: y, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1256
1276
|
};
|
|
1257
|
-
} }),
|
|
1258
|
-
let
|
|
1259
|
-
n({ el:
|
|
1260
|
-
|
|
1277
|
+
} }), Bo = 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 }) {
|
|
1278
|
+
let l = ve("ComboboxOptions"), r = `headlessui-combobox-options-${Pe()}`;
|
|
1279
|
+
n({ el: l.optionsRef, $el: l.optionsRef }), ie(() => {
|
|
1280
|
+
l.optionsPropsRef.value.static = e.static;
|
|
1261
1281
|
}), ie(() => {
|
|
1262
|
-
|
|
1282
|
+
l.optionsPropsRef.value.hold = e.hold;
|
|
1263
1283
|
});
|
|
1264
|
-
let i =
|
|
1265
|
-
|
|
1284
|
+
let i = Io(), s = S(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1285
|
+
So({ container: S(() => P(l.optionsRef)), enabled: S(() => l.comboboxState.value === 0), accept(u) {
|
|
1266
1286
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1267
1287
|
}, walk(u) {
|
|
1268
1288
|
u.setAttribute("role", "none");
|
|
@@ -1272,141 +1292,141 @@ let Vo = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1272
1292
|
}
|
|
1273
1293
|
return () => {
|
|
1274
1294
|
var u, c, p;
|
|
1275
|
-
let g = { open:
|
|
1276
|
-
return pe({ ourProps: x, theirProps: _, slot: g, attrs: o, slots:
|
|
1295
|
+
let g = { open: l.comboboxState.value === 0 }, x = { "aria-labelledby": (p = (u = P(l.labelRef)) == null ? void 0 : u.id) != null ? p : (c = P(l.buttonRef)) == null ? void 0 : c.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, _ = He(e, ["hold"]);
|
|
1296
|
+
return pe({ ourProps: x, theirProps: _, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(Do, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1277
1297
|
};
|
|
1278
|
-
} }),
|
|
1279
|
-
let
|
|
1298
|
+
} }), Ho = 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 }) {
|
|
1299
|
+
let l = ve("ComboboxOption"), r = `headlessui-combobox-option-${Pe()}`, i = E(null), s = S(() => e.disabled);
|
|
1280
1300
|
n({ el: i, $el: i });
|
|
1281
1301
|
let a = S(() => {
|
|
1282
1302
|
var I;
|
|
1283
|
-
return
|
|
1284
|
-
}), u = S(() =>
|
|
1285
|
-
Ce(() =>
|
|
1286
|
-
let I =
|
|
1303
|
+
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;
|
|
1304
|
+
}), u = S(() => l.isSelected(e.value)), c = Ie(Jt, null), p = S(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: S(() => e.order) }));
|
|
1305
|
+
Ce(() => l.registerOption(r, p)), ot(() => l.unregisterOption(r, a.value)), ie(() => {
|
|
1306
|
+
let I = P(i);
|
|
1287
1307
|
I && (c == null || c.value.measureElement(I));
|
|
1288
1308
|
}), ie(() => {
|
|
1289
|
-
|
|
1309
|
+
l.comboboxState.value === 0 && a.value && (l.virtual.value || l.activationTrigger.value !== 0 && Q(() => {
|
|
1290
1310
|
var I, k;
|
|
1291
|
-
return (k = (I =
|
|
1311
|
+
return (k = (I = P(i)) == null ? void 0 : I.scrollIntoView) == null ? void 0 : k.call(I, { block: "nearest" });
|
|
1292
1312
|
}));
|
|
1293
1313
|
});
|
|
1294
1314
|
function g(I) {
|
|
1295
|
-
I.preventDefault(), I.button ===
|
|
1315
|
+
I.preventDefault(), I.button === Ut.Left && (s.value || (l.selectOption(r), Ft() || requestAnimationFrame(() => {
|
|
1296
1316
|
var k;
|
|
1297
|
-
return (k =
|
|
1298
|
-
}),
|
|
1317
|
+
return (k = P(l.inputRef)) == null ? void 0 : k.focus({ preventScroll: !0 });
|
|
1318
|
+
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1299
1319
|
}
|
|
1300
1320
|
function x() {
|
|
1301
1321
|
var I;
|
|
1302
|
-
if (e.disabled || (I =
|
|
1303
|
-
let k =
|
|
1304
|
-
|
|
1322
|
+
if (e.disabled || (I = l.virtual.value) != null && I.disabled(e.value)) return l.goToOption(z.Nothing);
|
|
1323
|
+
let k = l.calculateIndex(e.value);
|
|
1324
|
+
l.goToOption(z.Specific, k);
|
|
1305
1325
|
}
|
|
1306
|
-
let _ =
|
|
1326
|
+
let _ = wo();
|
|
1307
1327
|
function v(I) {
|
|
1308
1328
|
_.update(I);
|
|
1309
1329
|
}
|
|
1310
|
-
function
|
|
1330
|
+
function $(I) {
|
|
1311
1331
|
var k;
|
|
1312
|
-
if (!_.wasMoved(I) || e.disabled || (k =
|
|
1313
|
-
let D =
|
|
1314
|
-
|
|
1332
|
+
if (!_.wasMoved(I) || e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || a.value) return;
|
|
1333
|
+
let D = l.calculateIndex(e.value);
|
|
1334
|
+
l.goToOption(z.Specific, D, 0);
|
|
1315
1335
|
}
|
|
1316
1336
|
function N(I) {
|
|
1317
1337
|
var k;
|
|
1318
|
-
_.wasMoved(I) && (e.disabled || (k =
|
|
1338
|
+
_.wasMoved(I) && (e.disabled || (k = l.virtual.value) != null && k.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(z.Nothing)));
|
|
1319
1339
|
}
|
|
1320
1340
|
return () => {
|
|
1321
|
-
let { disabled: I } = e, k = { active: a.value, selected: u.value, disabled: I }, D = { 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: g, onFocus: x, onPointerenter: v, onMouseenter: v, onPointermove:
|
|
1322
|
-
return pe({ ourProps: D, theirProps:
|
|
1341
|
+
let { disabled: I } = e, k = { active: a.value, selected: u.value, disabled: I }, D = { 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: g, onFocus: x, onPointerenter: v, onMouseenter: v, onPointermove: $, onMousemove: $, onPointerleave: N, onMouseleave: N }, m = He(e, ["order", "value"]);
|
|
1342
|
+
return pe({ ourProps: D, theirProps: m, slot: k, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1323
1343
|
};
|
|
1324
1344
|
} });
|
|
1325
|
-
function
|
|
1326
|
-
return w(),
|
|
1345
|
+
function zo(e, o) {
|
|
1346
|
+
return w(), T("svg", {
|
|
1327
1347
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1328
1348
|
viewBox: "0 0 20 20",
|
|
1329
1349
|
fill: "currentColor",
|
|
1330
1350
|
"aria-hidden": "true",
|
|
1331
1351
|
"data-slot": "icon"
|
|
1332
1352
|
}, [
|
|
1333
|
-
|
|
1353
|
+
h("path", {
|
|
1334
1354
|
"fill-rule": "evenodd",
|
|
1335
1355
|
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
1336
1356
|
"clip-rule": "evenodd"
|
|
1337
1357
|
})
|
|
1338
1358
|
]);
|
|
1339
1359
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return w(),
|
|
1360
|
+
function Uo(e, o) {
|
|
1361
|
+
return w(), T("svg", {
|
|
1342
1362
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1363
|
viewBox: "0 0 20 20",
|
|
1344
1364
|
fill: "currentColor",
|
|
1345
1365
|
"aria-hidden": "true",
|
|
1346
1366
|
"data-slot": "icon"
|
|
1347
1367
|
}, [
|
|
1348
|
-
|
|
1368
|
+
h("path", {
|
|
1349
1369
|
"fill-rule": "evenodd",
|
|
1350
1370
|
d: "M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",
|
|
1351
1371
|
"clip-rule": "evenodd"
|
|
1352
1372
|
})
|
|
1353
1373
|
]);
|
|
1354
1374
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return w(),
|
|
1375
|
+
function Zo(e, o) {
|
|
1376
|
+
return w(), T("svg", {
|
|
1357
1377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1358
1378
|
viewBox: "0 0 20 20",
|
|
1359
1379
|
fill: "currentColor",
|
|
1360
1380
|
"aria-hidden": "true",
|
|
1361
1381
|
"data-slot": "icon"
|
|
1362
1382
|
}, [
|
|
1363
|
-
|
|
1383
|
+
h("path", {
|
|
1364
1384
|
"fill-rule": "evenodd",
|
|
1365
1385
|
d: "M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",
|
|
1366
1386
|
"clip-rule": "evenodd"
|
|
1367
1387
|
})
|
|
1368
1388
|
]);
|
|
1369
1389
|
}
|
|
1370
|
-
var
|
|
1371
|
-
function
|
|
1390
|
+
var Kt = !1;
|
|
1391
|
+
function Me(e, o, t) {
|
|
1372
1392
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1373
1393
|
}
|
|
1374
|
-
function
|
|
1394
|
+
function Ye(e, o) {
|
|
1375
1395
|
if (Array.isArray(e)) {
|
|
1376
1396
|
e.splice(o, 1);
|
|
1377
1397
|
return;
|
|
1378
1398
|
}
|
|
1379
1399
|
delete e[o];
|
|
1380
1400
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return
|
|
1401
|
+
function Wo() {
|
|
1402
|
+
return Yt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1383
1403
|
}
|
|
1384
|
-
function
|
|
1404
|
+
function Yt() {
|
|
1385
1405
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1386
1406
|
}
|
|
1387
|
-
const
|
|
1388
|
-
let me,
|
|
1389
|
-
function
|
|
1407
|
+
const Go = typeof Proxy == "function", qo = "devtools-plugin:setup", Jo = "plugin:settings:set";
|
|
1408
|
+
let me, Qe;
|
|
1409
|
+
function Ko() {
|
|
1390
1410
|
var e;
|
|
1391
|
-
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0,
|
|
1411
|
+
return me !== void 0 || (typeof window < "u" && window.performance ? (me = !0, Qe = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (me = !0, Qe = globalThis.perf_hooks.performance) : me = !1), me;
|
|
1392
1412
|
}
|
|
1393
|
-
function
|
|
1394
|
-
return
|
|
1413
|
+
function Yo() {
|
|
1414
|
+
return Ko() ? Qe.now() : Date.now();
|
|
1395
1415
|
}
|
|
1396
|
-
class
|
|
1416
|
+
class Qo {
|
|
1397
1417
|
constructor(o, t) {
|
|
1398
1418
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1399
1419
|
const n = {};
|
|
1400
1420
|
if (o.settings)
|
|
1401
1421
|
for (const i in o.settings) {
|
|
1402
|
-
const
|
|
1403
|
-
n[i] =
|
|
1422
|
+
const s = o.settings[i];
|
|
1423
|
+
n[i] = s.defaultValue;
|
|
1404
1424
|
}
|
|
1405
|
-
const
|
|
1425
|
+
const l = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1406
1426
|
let r = Object.assign({}, n);
|
|
1407
1427
|
try {
|
|
1408
|
-
const i = localStorage.getItem(
|
|
1409
|
-
Object.assign(r,
|
|
1428
|
+
const i = localStorage.getItem(l), s = JSON.parse(i);
|
|
1429
|
+
Object.assign(r, s);
|
|
1410
1430
|
} catch {
|
|
1411
1431
|
}
|
|
1412
1432
|
this.fallbacks = {
|
|
@@ -1415,32 +1435,32 @@ class Wo {
|
|
|
1415
1435
|
},
|
|
1416
1436
|
setSettings(i) {
|
|
1417
1437
|
try {
|
|
1418
|
-
localStorage.setItem(
|
|
1438
|
+
localStorage.setItem(l, JSON.stringify(i));
|
|
1419
1439
|
} catch {
|
|
1420
1440
|
}
|
|
1421
1441
|
r = i;
|
|
1422
1442
|
},
|
|
1423
1443
|
now() {
|
|
1424
|
-
return
|
|
1444
|
+
return Yo();
|
|
1425
1445
|
}
|
|
1426
|
-
}, t && t.on(
|
|
1427
|
-
i === this.plugin.id && this.fallbacks.setSettings(
|
|
1446
|
+
}, t && t.on(Jo, (i, s) => {
|
|
1447
|
+
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1428
1448
|
}), this.proxiedOn = new Proxy({}, {
|
|
1429
|
-
get: (i,
|
|
1449
|
+
get: (i, s) => this.target ? this.target.on[s] : (...a) => {
|
|
1430
1450
|
this.onQueue.push({
|
|
1431
|
-
method:
|
|
1451
|
+
method: s,
|
|
1432
1452
|
args: a
|
|
1433
1453
|
});
|
|
1434
1454
|
}
|
|
1435
1455
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1436
|
-
get: (i,
|
|
1437
|
-
method:
|
|
1456
|
+
get: (i, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...a) => (this.targetQueue.push({
|
|
1457
|
+
method: s,
|
|
1438
1458
|
args: a,
|
|
1439
1459
|
resolve: () => {
|
|
1440
1460
|
}
|
|
1441
|
-
}), this.fallbacks[
|
|
1461
|
+
}), this.fallbacks[s](...a)) : (...a) => new Promise((u) => {
|
|
1442
1462
|
this.targetQueue.push({
|
|
1443
|
-
method:
|
|
1463
|
+
method: s,
|
|
1444
1464
|
args: a,
|
|
1445
1465
|
resolve: u
|
|
1446
1466
|
});
|
|
@@ -1455,12 +1475,12 @@ class Wo {
|
|
|
1455
1475
|
t.resolve(await this.target[t.method](...t.args));
|
|
1456
1476
|
}
|
|
1457
1477
|
}
|
|
1458
|
-
function
|
|
1459
|
-
const t = e, n =
|
|
1460
|
-
if (
|
|
1461
|
-
|
|
1478
|
+
function Qt(e, o) {
|
|
1479
|
+
const t = e, n = Yt(), l = Wo(), r = Go && t.enableEarlyProxy;
|
|
1480
|
+
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
|
|
1481
|
+
l.emit(qo, e, o);
|
|
1462
1482
|
else {
|
|
1463
|
-
const i = r ? new
|
|
1483
|
+
const i = r ? new Qo(t, l) : null;
|
|
1464
1484
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1465
1485
|
pluginDescriptor: t,
|
|
1466
1486
|
setupFn: o,
|
|
@@ -1474,7 +1494,7 @@ function Jt(e, o) {
|
|
|
1474
1494
|
* @license MIT
|
|
1475
1495
|
*/
|
|
1476
1496
|
let we;
|
|
1477
|
-
const Te = (e) => we = e,
|
|
1497
|
+
const Te = (e) => we = e, Xt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1478
1498
|
/* istanbul ignore next */
|
|
1479
1499
|
Symbol()
|
|
1480
1500
|
);
|
|
@@ -1485,19 +1505,19 @@ var ne;
|
|
|
1485
1505
|
(function(e) {
|
|
1486
1506
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1487
1507
|
})(ne || (ne = {}));
|
|
1488
|
-
const
|
|
1489
|
-
function
|
|
1508
|
+
const ze = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && ze, xt = 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 };
|
|
1509
|
+
function Xo(e, { autoBom: o = !1 } = {}) {
|
|
1490
1510
|
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;
|
|
1491
1511
|
}
|
|
1492
|
-
function
|
|
1512
|
+
function at(e, o, t) {
|
|
1493
1513
|
const n = new XMLHttpRequest();
|
|
1494
1514
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1495
|
-
|
|
1515
|
+
nn(n.response, o, t);
|
|
1496
1516
|
}, n.onerror = function() {
|
|
1497
1517
|
console.error("could not download file");
|
|
1498
1518
|
}, n.send();
|
|
1499
1519
|
}
|
|
1500
|
-
function
|
|
1520
|
+
function en(e) {
|
|
1501
1521
|
const o = new XMLHttpRequest();
|
|
1502
1522
|
o.open("HEAD", e, !1);
|
|
1503
1523
|
try {
|
|
@@ -1506,7 +1526,7 @@ function Yt(e) {
|
|
|
1506
1526
|
}
|
|
1507
1527
|
return o.status >= 200 && o.status <= 299;
|
|
1508
1528
|
}
|
|
1509
|
-
function
|
|
1529
|
+
function Ne(e) {
|
|
1510
1530
|
try {
|
|
1511
1531
|
e.dispatchEvent(new MouseEvent("click"));
|
|
1512
1532
|
} catch {
|
|
@@ -1514,54 +1534,54 @@ function ke(e) {
|
|
|
1514
1534
|
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1515
1535
|
}
|
|
1516
1536
|
}
|
|
1517
|
-
const
|
|
1537
|
+
const De = typeof navigator == "object" ? navigator : { userAgent: "" }, tn = /Macintosh/.test(De.userAgent) && /AppleWebKit/.test(De.userAgent) && !/Safari/.test(De.userAgent), nn = ze ? (
|
|
1518
1538
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
1519
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
1539
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !tn ? e2 : (
|
|
1520
1540
|
// Use msSaveOrOpenBlob as a second approach
|
|
1521
|
-
"msSaveOrOpenBlob" in
|
|
1541
|
+
"msSaveOrOpenBlob" in De ? t2 : (
|
|
1522
1542
|
// Fallback to using FileReader and a popup
|
|
1523
|
-
|
|
1543
|
+
n2
|
|
1524
1544
|
)
|
|
1525
1545
|
)
|
|
1526
1546
|
) : () => {
|
|
1527
1547
|
};
|
|
1528
|
-
function
|
|
1548
|
+
function e2(e, o = "download", t) {
|
|
1529
1549
|
const n = document.createElement("a");
|
|
1530
|
-
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ?
|
|
1550
|
+
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? en(n.href) ? at(e, o, t) : (n.target = "_blank", Ne(n)) : Ne(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1531
1551
|
URL.revokeObjectURL(n.href);
|
|
1532
1552
|
}, 4e4), setTimeout(function() {
|
|
1533
|
-
|
|
1553
|
+
Ne(n);
|
|
1534
1554
|
}, 0));
|
|
1535
1555
|
}
|
|
1536
|
-
function
|
|
1556
|
+
function t2(e, o = "download", t) {
|
|
1537
1557
|
if (typeof e == "string")
|
|
1538
|
-
if (
|
|
1539
|
-
|
|
1558
|
+
if (en(e))
|
|
1559
|
+
at(e, o, t);
|
|
1540
1560
|
else {
|
|
1541
1561
|
const n = document.createElement("a");
|
|
1542
1562
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
1543
|
-
|
|
1563
|
+
Ne(n);
|
|
1544
1564
|
});
|
|
1545
1565
|
}
|
|
1546
1566
|
else
|
|
1547
|
-
navigator.msSaveOrOpenBlob(
|
|
1567
|
+
navigator.msSaveOrOpenBlob(Xo(e, t), o);
|
|
1548
1568
|
}
|
|
1549
|
-
function
|
|
1569
|
+
function n2(e, o, t, n) {
|
|
1550
1570
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1551
|
-
return
|
|
1552
|
-
const
|
|
1553
|
-
if ((i ||
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
let a =
|
|
1571
|
+
return at(e, o, t);
|
|
1572
|
+
const l = e.type === "application/octet-stream", r = /constructor/i.test(String(xt.HTMLElement)) || "safari" in xt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1573
|
+
if ((i || l && r || tn) && typeof FileReader < "u") {
|
|
1574
|
+
const s = new FileReader();
|
|
1575
|
+
s.onloadend = function() {
|
|
1576
|
+
let a = s.result;
|
|
1557
1577
|
if (typeof a != "string")
|
|
1558
1578
|
throw n = null, new Error("Wrong reader.result type");
|
|
1559
1579
|
a = i ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
|
|
1560
|
-
},
|
|
1580
|
+
}, s.readAsDataURL(e);
|
|
1561
1581
|
} else {
|
|
1562
|
-
const
|
|
1563
|
-
n ? n.location.assign(
|
|
1564
|
-
URL.revokeObjectURL(
|
|
1582
|
+
const s = URL.createObjectURL(e);
|
|
1583
|
+
n ? n.location.assign(s) : location.href = s, n = null, setTimeout(function() {
|
|
1584
|
+
URL.revokeObjectURL(s);
|
|
1565
1585
|
}, 4e4);
|
|
1566
1586
|
}
|
|
1567
1587
|
}
|
|
@@ -1569,39 +1589,39 @@ function B(e, o) {
|
|
|
1569
1589
|
const t = "🍍 " + e;
|
|
1570
1590
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1571
1591
|
}
|
|
1572
|
-
function
|
|
1592
|
+
function ut(e) {
|
|
1573
1593
|
return "_a" in e && "install" in e;
|
|
1574
1594
|
}
|
|
1575
|
-
function
|
|
1595
|
+
function on() {
|
|
1576
1596
|
if (!("clipboard" in navigator))
|
|
1577
1597
|
return B("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1578
1598
|
}
|
|
1579
|
-
function
|
|
1599
|
+
function ln(e) {
|
|
1580
1600
|
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;
|
|
1581
1601
|
}
|
|
1582
|
-
async function
|
|
1583
|
-
if (!
|
|
1602
|
+
async function o2(e) {
|
|
1603
|
+
if (!on())
|
|
1584
1604
|
try {
|
|
1585
1605
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), B("Global state copied to clipboard.");
|
|
1586
1606
|
} catch (o) {
|
|
1587
|
-
if (
|
|
1607
|
+
if (ln(o))
|
|
1588
1608
|
return;
|
|
1589
1609
|
B("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1590
1610
|
}
|
|
1591
1611
|
}
|
|
1592
|
-
async function
|
|
1593
|
-
if (!
|
|
1612
|
+
async function l2(e) {
|
|
1613
|
+
if (!on())
|
|
1594
1614
|
try {
|
|
1595
|
-
|
|
1615
|
+
sn(e, JSON.parse(await navigator.clipboard.readText())), B("Global state pasted from clipboard.");
|
|
1596
1616
|
} catch (o) {
|
|
1597
|
-
if (
|
|
1617
|
+
if (ln(o))
|
|
1598
1618
|
return;
|
|
1599
1619
|
B("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1600
1620
|
}
|
|
1601
1621
|
}
|
|
1602
|
-
async function
|
|
1622
|
+
async function s2(e) {
|
|
1603
1623
|
try {
|
|
1604
|
-
|
|
1624
|
+
nn(new Blob([JSON.stringify(e.state.value)], {
|
|
1605
1625
|
type: "text/plain;charset=utf-8"
|
|
1606
1626
|
}), "pinia-state.json");
|
|
1607
1627
|
} catch (o) {
|
|
@@ -1609,7 +1629,7 @@ async function Xo(e) {
|
|
|
1609
1629
|
}
|
|
1610
1630
|
}
|
|
1611
1631
|
let oe;
|
|
1612
|
-
function
|
|
1632
|
+
function r2() {
|
|
1613
1633
|
oe || (oe = document.createElement("input"), oe.type = "file", oe.accept = ".json");
|
|
1614
1634
|
function e() {
|
|
1615
1635
|
return new Promise((o, t) => {
|
|
@@ -1617,25 +1637,25 @@ function es() {
|
|
|
1617
1637
|
const n = oe.files;
|
|
1618
1638
|
if (!n)
|
|
1619
1639
|
return o(null);
|
|
1620
|
-
const
|
|
1621
|
-
return o(
|
|
1640
|
+
const l = n.item(0);
|
|
1641
|
+
return o(l ? { text: await l.text(), file: l } : null);
|
|
1622
1642
|
}, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
|
|
1623
1643
|
});
|
|
1624
1644
|
}
|
|
1625
1645
|
return e;
|
|
1626
1646
|
}
|
|
1627
|
-
async function
|
|
1647
|
+
async function i2(e) {
|
|
1628
1648
|
try {
|
|
1629
|
-
const t = await
|
|
1649
|
+
const t = await r2()();
|
|
1630
1650
|
if (!t)
|
|
1631
1651
|
return;
|
|
1632
|
-
const { text: n, file:
|
|
1633
|
-
|
|
1652
|
+
const { text: n, file: l } = t;
|
|
1653
|
+
sn(e, JSON.parse(n)), B(`Global state imported from "${l.name}".`);
|
|
1634
1654
|
} catch (o) {
|
|
1635
1655
|
B("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1636
1656
|
}
|
|
1637
1657
|
}
|
|
1638
|
-
function
|
|
1658
|
+
function sn(e, o) {
|
|
1639
1659
|
for (const t in o) {
|
|
1640
1660
|
const n = e.state.value[t];
|
|
1641
1661
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
@@ -1648,18 +1668,18 @@ function Y(e) {
|
|
|
1648
1668
|
}
|
|
1649
1669
|
};
|
|
1650
1670
|
}
|
|
1651
|
-
const
|
|
1652
|
-
function
|
|
1653
|
-
return
|
|
1654
|
-
id:
|
|
1655
|
-
label:
|
|
1671
|
+
const rn = "🍍 Pinia (root)", Xe = "_root";
|
|
1672
|
+
function a2(e) {
|
|
1673
|
+
return ut(e) ? {
|
|
1674
|
+
id: Xe,
|
|
1675
|
+
label: rn
|
|
1656
1676
|
} : {
|
|
1657
1677
|
id: e.$id,
|
|
1658
1678
|
label: e.$id
|
|
1659
1679
|
};
|
|
1660
1680
|
}
|
|
1661
|
-
function
|
|
1662
|
-
if (
|
|
1681
|
+
function u2(e) {
|
|
1682
|
+
if (ut(e)) {
|
|
1663
1683
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1664
1684
|
return {
|
|
1665
1685
|
state: t.map((r) => ({
|
|
@@ -1672,7 +1692,7 @@ function os(e) {
|
|
|
1672
1692
|
return {
|
|
1673
1693
|
editable: !1,
|
|
1674
1694
|
key: r,
|
|
1675
|
-
value: i._getters.reduce((
|
|
1695
|
+
value: i._getters.reduce((s, a) => (s[a] = i[a], s), {})
|
|
1676
1696
|
};
|
|
1677
1697
|
})
|
|
1678
1698
|
};
|
|
@@ -1694,7 +1714,7 @@ function os(e) {
|
|
|
1694
1714
|
value: e[t]
|
|
1695
1715
|
}))), o;
|
|
1696
1716
|
}
|
|
1697
|
-
function
|
|
1717
|
+
function c2(e) {
|
|
1698
1718
|
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), {
|
|
1699
1719
|
oldValue: {},
|
|
1700
1720
|
keys: [],
|
|
@@ -1707,7 +1727,7 @@ function ss(e) {
|
|
|
1707
1727
|
newValue: e.newValue
|
|
1708
1728
|
} : {};
|
|
1709
1729
|
}
|
|
1710
|
-
function
|
|
1730
|
+
function d2(e) {
|
|
1711
1731
|
switch (e) {
|
|
1712
1732
|
case ne.direct:
|
|
1713
1733
|
return "mutation";
|
|
@@ -1720,15 +1740,15 @@ function ls(e) {
|
|
|
1720
1740
|
}
|
|
1721
1741
|
}
|
|
1722
1742
|
let be = !0;
|
|
1723
|
-
const
|
|
1724
|
-
function
|
|
1725
|
-
|
|
1743
|
+
const Ae = [], ue = "pinia:mutations", U = "pinia", { assign: f2 } = Object, je = (e) => "🍍 " + e;
|
|
1744
|
+
function p2(e, o) {
|
|
1745
|
+
Qt({
|
|
1726
1746
|
id: "dev.esm.pinia",
|
|
1727
1747
|
label: "Pinia 🍍",
|
|
1728
1748
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1729
1749
|
packageName: "pinia",
|
|
1730
1750
|
homepage: "https://pinia.vuejs.org",
|
|
1731
|
-
componentStateTypes:
|
|
1751
|
+
componentStateTypes: Ae,
|
|
1732
1752
|
app: e
|
|
1733
1753
|
}, (t) => {
|
|
1734
1754
|
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({
|
|
@@ -1744,28 +1764,28 @@ function is(e, o) {
|
|
|
1744
1764
|
{
|
|
1745
1765
|
icon: "content_copy",
|
|
1746
1766
|
action: () => {
|
|
1747
|
-
|
|
1767
|
+
o2(o);
|
|
1748
1768
|
},
|
|
1749
1769
|
tooltip: "Serialize and copy the state"
|
|
1750
1770
|
},
|
|
1751
1771
|
{
|
|
1752
1772
|
icon: "content_paste",
|
|
1753
1773
|
action: async () => {
|
|
1754
|
-
await
|
|
1774
|
+
await l2(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1755
1775
|
},
|
|
1756
1776
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1757
1777
|
},
|
|
1758
1778
|
{
|
|
1759
1779
|
icon: "save",
|
|
1760
1780
|
action: () => {
|
|
1761
|
-
|
|
1781
|
+
s2(o);
|
|
1762
1782
|
},
|
|
1763
1783
|
tooltip: "Save the state as a JSON file"
|
|
1764
1784
|
},
|
|
1765
1785
|
{
|
|
1766
1786
|
icon: "folder_open",
|
|
1767
1787
|
action: async () => {
|
|
1768
|
-
await
|
|
1788
|
+
await i2(o), t.sendInspectorTree(U), t.sendInspectorState(U);
|
|
1769
1789
|
},
|
|
1770
1790
|
tooltip: "Import the state from a JSON file"
|
|
1771
1791
|
}
|
|
@@ -1775,42 +1795,42 @@ function is(e, o) {
|
|
|
1775
1795
|
icon: "restore",
|
|
1776
1796
|
tooltip: 'Reset the state (with "$reset")',
|
|
1777
1797
|
action: (n) => {
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1798
|
+
const l = o._s.get(n);
|
|
1799
|
+
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");
|
|
1780
1800
|
}
|
|
1781
1801
|
}
|
|
1782
1802
|
]
|
|
1783
|
-
}), t.on.inspectComponent((n,
|
|
1803
|
+
}), t.on.inspectComponent((n, l) => {
|
|
1784
1804
|
const r = n.componentInstance && n.componentInstance.proxy;
|
|
1785
1805
|
if (r && r._pStores) {
|
|
1786
1806
|
const i = n.componentInstance.proxy._pStores;
|
|
1787
|
-
Object.values(i).forEach((
|
|
1807
|
+
Object.values(i).forEach((s) => {
|
|
1788
1808
|
n.instanceData.state.push({
|
|
1789
|
-
type:
|
|
1809
|
+
type: je(s.$id),
|
|
1790
1810
|
key: "state",
|
|
1791
1811
|
editable: !0,
|
|
1792
|
-
value:
|
|
1812
|
+
value: s._isOptionsAPI ? {
|
|
1793
1813
|
_custom: {
|
|
1794
|
-
value: K(
|
|
1814
|
+
value: K(s.$state),
|
|
1795
1815
|
actions: [
|
|
1796
1816
|
{
|
|
1797
1817
|
icon: "restore",
|
|
1798
1818
|
tooltip: "Reset the state of this store",
|
|
1799
|
-
action: () =>
|
|
1819
|
+
action: () => s.$reset()
|
|
1800
1820
|
}
|
|
1801
1821
|
]
|
|
1802
1822
|
}
|
|
1803
1823
|
} : (
|
|
1804
1824
|
// NOTE: workaround to unwrap transferred refs
|
|
1805
|
-
Object.keys(
|
|
1825
|
+
Object.keys(s.$state).reduce((a, u) => (a[u] = s.$state[u], a), {})
|
|
1806
1826
|
)
|
|
1807
|
-
}),
|
|
1808
|
-
type:
|
|
1827
|
+
}), s._getters && s._getters.length && n.instanceData.state.push({
|
|
1828
|
+
type: je(s.$id),
|
|
1809
1829
|
key: "getters",
|
|
1810
1830
|
editable: !1,
|
|
1811
|
-
value:
|
|
1831
|
+
value: s._getters.reduce((a, u) => {
|
|
1812
1832
|
try {
|
|
1813
|
-
a[u] =
|
|
1833
|
+
a[u] = s[u];
|
|
1814
1834
|
} catch (c) {
|
|
1815
1835
|
a[u] = c;
|
|
1816
1836
|
}
|
|
@@ -1821,32 +1841,32 @@ function is(e, o) {
|
|
|
1821
1841
|
}
|
|
1822
1842
|
}), t.on.getInspectorTree((n) => {
|
|
1823
1843
|
if (n.app === e && n.inspectorId === U) {
|
|
1824
|
-
let
|
|
1825
|
-
|
|
1844
|
+
let l = [o];
|
|
1845
|
+
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()) : rn.toLowerCase().includes(n.filter.toLowerCase())) : l).map(a2);
|
|
1826
1846
|
}
|
|
1827
1847
|
}), t.on.getInspectorState((n) => {
|
|
1828
1848
|
if (n.app === e && n.inspectorId === U) {
|
|
1829
|
-
const
|
|
1830
|
-
if (!
|
|
1849
|
+
const l = n.nodeId === Xe ? o : o._s.get(n.nodeId);
|
|
1850
|
+
if (!l)
|
|
1831
1851
|
return;
|
|
1832
|
-
|
|
1852
|
+
l && (n.state = u2(l));
|
|
1833
1853
|
}
|
|
1834
|
-
}), t.on.editInspectorState((n,
|
|
1854
|
+
}), t.on.editInspectorState((n, l) => {
|
|
1835
1855
|
if (n.app === e && n.inspectorId === U) {
|
|
1836
|
-
const r = n.nodeId ===
|
|
1856
|
+
const r = n.nodeId === Xe ? o : o._s.get(n.nodeId);
|
|
1837
1857
|
if (!r)
|
|
1838
1858
|
return B(`store "${n.nodeId}" not found`, "error");
|
|
1839
1859
|
const { path: i } = n;
|
|
1840
|
-
|
|
1860
|
+
ut(r) ? i.unshift("state") : (i.length !== 1 || !r._customProperties.has(i[0]) || i[0] in r.$state) && i.unshift("$state"), be = !1, n.set(r, i, n.state.value), be = !0;
|
|
1841
1861
|
}
|
|
1842
1862
|
}), t.on.editComponentState((n) => {
|
|
1843
1863
|
if (n.type.startsWith("🍍")) {
|
|
1844
|
-
const
|
|
1864
|
+
const l = n.type.replace(/^🍍\s*/, ""), r = o._s.get(l);
|
|
1845
1865
|
if (!r)
|
|
1846
|
-
return B(`store "${
|
|
1866
|
+
return B(`store "${l}" not found`, "error");
|
|
1847
1867
|
const { path: i } = n;
|
|
1848
1868
|
if (i[0] !== "state")
|
|
1849
|
-
return B(`Invalid path for store "${
|
|
1869
|
+
return B(`Invalid path for store "${l}":
|
|
1850
1870
|
${i}
|
|
1851
1871
|
Only state can be modified.`);
|
|
1852
1872
|
i[0] = "$state", be = !1, n.set(r, i, n.state.value), be = !0;
|
|
@@ -1854,14 +1874,14 @@ Only state can be modified.`);
|
|
|
1854
1874
|
});
|
|
1855
1875
|
});
|
|
1856
1876
|
}
|
|
1857
|
-
function
|
|
1858
|
-
|
|
1877
|
+
function v2(e, o) {
|
|
1878
|
+
Ae.includes(je(o.$id)) || Ae.push(je(o.$id)), Qt({
|
|
1859
1879
|
id: "dev.esm.pinia",
|
|
1860
1880
|
label: "Pinia 🍍",
|
|
1861
1881
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1862
1882
|
packageName: "pinia",
|
|
1863
1883
|
homepage: "https://pinia.vuejs.org",
|
|
1864
|
-
componentStateTypes:
|
|
1884
|
+
componentStateTypes: Ae,
|
|
1865
1885
|
app: e,
|
|
1866
1886
|
settings: {
|
|
1867
1887
|
logStoreChanges: {
|
|
@@ -1877,8 +1897,8 @@ function as(e, o) {
|
|
|
1877
1897
|
}
|
|
1878
1898
|
}, (t) => {
|
|
1879
1899
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1880
|
-
o.$onAction(({ after: i, onError:
|
|
1881
|
-
const c =
|
|
1900
|
+
o.$onAction(({ after: i, onError: s, name: a, args: u }) => {
|
|
1901
|
+
const c = an++;
|
|
1882
1902
|
t.addTimelineEvent({
|
|
1883
1903
|
layerId: ue,
|
|
1884
1904
|
event: {
|
|
@@ -1908,7 +1928,7 @@ function as(e, o) {
|
|
|
1908
1928
|
groupId: c
|
|
1909
1929
|
}
|
|
1910
1930
|
});
|
|
1911
|
-
}),
|
|
1931
|
+
}), s((p) => {
|
|
1912
1932
|
re = void 0, t.addTimelineEvent({
|
|
1913
1933
|
layerId: ue,
|
|
1914
1934
|
event: {
|
|
@@ -1927,7 +1947,7 @@ function as(e, o) {
|
|
|
1927
1947
|
});
|
|
1928
1948
|
});
|
|
1929
1949
|
}, !0), o._customProperties.forEach((i) => {
|
|
1930
|
-
F(() => V(o[i]), (
|
|
1950
|
+
F(() => V(o[i]), (s, a) => {
|
|
1931
1951
|
t.notifyComponentUpdate(), t.sendInspectorState(U), be && t.addTimelineEvent({
|
|
1932
1952
|
layerId: ue,
|
|
1933
1953
|
event: {
|
|
@@ -1935,23 +1955,23 @@ function as(e, o) {
|
|
|
1935
1955
|
title: "Change",
|
|
1936
1956
|
subtitle: i,
|
|
1937
1957
|
data: {
|
|
1938
|
-
newValue:
|
|
1958
|
+
newValue: s,
|
|
1939
1959
|
oldValue: a
|
|
1940
1960
|
},
|
|
1941
1961
|
groupId: re
|
|
1942
1962
|
}
|
|
1943
1963
|
});
|
|
1944
1964
|
}, { deep: !0 });
|
|
1945
|
-
}), o.$subscribe(({ events: i, type:
|
|
1965
|
+
}), o.$subscribe(({ events: i, type: s }, a) => {
|
|
1946
1966
|
if (t.notifyComponentUpdate(), t.sendInspectorState(U), !be)
|
|
1947
1967
|
return;
|
|
1948
1968
|
const u = {
|
|
1949
1969
|
time: n(),
|
|
1950
|
-
title:
|
|
1951
|
-
data:
|
|
1970
|
+
title: d2(s),
|
|
1971
|
+
data: f2({ store: Y(o.$id) }, c2(i)),
|
|
1952
1972
|
groupId: re
|
|
1953
1973
|
};
|
|
1954
|
-
|
|
1974
|
+
s === ne.patchFunction ? u.subtitle = "⤵️" : s === ne.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
1955
1975
|
_custom: {
|
|
1956
1976
|
display: "DebuggerEvent",
|
|
1957
1977
|
type: "object",
|
|
@@ -1963,9 +1983,9 @@ function as(e, o) {
|
|
|
1963
1983
|
event: u
|
|
1964
1984
|
});
|
|
1965
1985
|
}, { detached: !0, flush: "sync" });
|
|
1966
|
-
const
|
|
1986
|
+
const l = o._hotUpdate;
|
|
1967
1987
|
o._hotUpdate = de((i) => {
|
|
1968
|
-
|
|
1988
|
+
l(i), t.addTimelineEvent({
|
|
1969
1989
|
layerId: ue,
|
|
1970
1990
|
event: {
|
|
1971
1991
|
time: n(),
|
|
@@ -1984,12 +2004,12 @@ function as(e, o) {
|
|
|
1984
2004
|
}, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && B(`"${o.$id}" store installed 🆕`);
|
|
1985
2005
|
});
|
|
1986
2006
|
}
|
|
1987
|
-
let
|
|
1988
|
-
function
|
|
1989
|
-
const n = o.reduce((
|
|
1990
|
-
for (const
|
|
1991
|
-
e[
|
|
1992
|
-
const r =
|
|
2007
|
+
let an = 0, re;
|
|
2008
|
+
function _t(e, o, t) {
|
|
2009
|
+
const n = o.reduce((l, r) => (l[r] = K(e)[r], l), {});
|
|
2010
|
+
for (const l in n)
|
|
2011
|
+
e[l] = function() {
|
|
2012
|
+
const r = an, i = t ? new Proxy(e, {
|
|
1993
2013
|
get(...a) {
|
|
1994
2014
|
return re = r, Reflect.get(...a);
|
|
1995
2015
|
},
|
|
@@ -1998,32 +2018,32 @@ function xt(e, o, t) {
|
|
|
1998
2018
|
}
|
|
1999
2019
|
}) : e;
|
|
2000
2020
|
re = r;
|
|
2001
|
-
const
|
|
2002
|
-
return re = void 0,
|
|
2021
|
+
const s = n[l].apply(i, arguments);
|
|
2022
|
+
return re = void 0, s;
|
|
2003
2023
|
};
|
|
2004
2024
|
}
|
|
2005
|
-
function
|
|
2025
|
+
function h2({ app: e, store: o, options: t }) {
|
|
2006
2026
|
if (o.$id.startsWith("__hot:"))
|
|
2007
2027
|
return;
|
|
2008
|
-
o._isOptionsAPI = !!t.state,
|
|
2028
|
+
o._isOptionsAPI = !!t.state, _t(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2009
2029
|
const n = o._hotUpdate;
|
|
2010
|
-
K(o)._hotUpdate = function(
|
|
2011
|
-
n.apply(this, arguments),
|
|
2012
|
-
},
|
|
2030
|
+
K(o)._hotUpdate = function(l) {
|
|
2031
|
+
n.apply(this, arguments), _t(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2032
|
+
}, v2(
|
|
2013
2033
|
e,
|
|
2014
2034
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2015
2035
|
o
|
|
2016
2036
|
);
|
|
2017
2037
|
}
|
|
2018
|
-
function
|
|
2019
|
-
const e =
|
|
2038
|
+
function m2() {
|
|
2039
|
+
const e = Pt(!0), o = e.run(() => E({}));
|
|
2020
2040
|
let t = [], n = [];
|
|
2021
|
-
const
|
|
2041
|
+
const l = de({
|
|
2022
2042
|
install(r) {
|
|
2023
|
-
Te(
|
|
2043
|
+
Te(l), l._a = r, r.provide(Xt, l), r.config.globalProperties.$pinia = l, Se && p2(r, l), n.forEach((i) => t.push(i)), n = [];
|
|
2024
2044
|
},
|
|
2025
2045
|
use(r) {
|
|
2026
|
-
return !this._a && !
|
|
2046
|
+
return !this._a && !Kt ? n.push(r) : t.push(r), this;
|
|
2027
2047
|
},
|
|
2028
2048
|
_p: t,
|
|
2029
2049
|
// it's actually undefined here
|
|
@@ -2033,104 +2053,104 @@ function cs() {
|
|
|
2033
2053
|
_s: /* @__PURE__ */ new Map(),
|
|
2034
2054
|
state: o
|
|
2035
2055
|
});
|
|
2036
|
-
return Se && typeof Proxy < "u" &&
|
|
2056
|
+
return Se && typeof Proxy < "u" && l.use(h2), l;
|
|
2037
2057
|
}
|
|
2038
|
-
function
|
|
2058
|
+
function un(e, o) {
|
|
2039
2059
|
for (const t in o) {
|
|
2040
2060
|
const n = o[t];
|
|
2041
2061
|
if (!(t in e))
|
|
2042
2062
|
continue;
|
|
2043
|
-
const
|
|
2044
|
-
fe(
|
|
2063
|
+
const l = e[t];
|
|
2064
|
+
fe(l) && fe(n) && !xe(n) && !st(n) ? e[t] = un(l, n) : e[t] = n;
|
|
2045
2065
|
}
|
|
2046
2066
|
return e;
|
|
2047
2067
|
}
|
|
2048
|
-
const
|
|
2068
|
+
const cn = () => {
|
|
2049
2069
|
};
|
|
2050
|
-
function
|
|
2070
|
+
function Ct(e, o, t, n = cn) {
|
|
2051
2071
|
e.push(o);
|
|
2052
|
-
const
|
|
2072
|
+
const l = () => {
|
|
2053
2073
|
const r = e.indexOf(o);
|
|
2054
2074
|
r > -1 && (e.splice(r, 1), n());
|
|
2055
2075
|
};
|
|
2056
|
-
return !t &&
|
|
2076
|
+
return !t && kt() && nt(l), l;
|
|
2057
2077
|
}
|
|
2058
2078
|
function ge(e, ...o) {
|
|
2059
2079
|
e.slice().forEach((t) => {
|
|
2060
2080
|
t(...o);
|
|
2061
2081
|
});
|
|
2062
2082
|
}
|
|
2063
|
-
const
|
|
2064
|
-
function
|
|
2083
|
+
const g2 = (e) => e();
|
|
2084
|
+
function et(e, o) {
|
|
2065
2085
|
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);
|
|
2066
2086
|
for (const t in o) {
|
|
2067
2087
|
if (!o.hasOwnProperty(t))
|
|
2068
2088
|
continue;
|
|
2069
|
-
const n = o[t],
|
|
2070
|
-
fe(
|
|
2089
|
+
const n = o[t], l = e[t];
|
|
2090
|
+
fe(l) && fe(n) && e.hasOwnProperty(t) && !xe(n) && !st(n) ? e[t] = et(l, n) : e[t] = n;
|
|
2071
2091
|
}
|
|
2072
2092
|
return e;
|
|
2073
2093
|
}
|
|
2074
|
-
const
|
|
2094
|
+
const b2 = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2075
2095
|
/* istanbul ignore next */
|
|
2076
2096
|
Symbol()
|
|
2077
2097
|
);
|
|
2078
|
-
function
|
|
2079
|
-
return !fe(e) || !e.hasOwnProperty(
|
|
2098
|
+
function x2(e) {
|
|
2099
|
+
return !fe(e) || !e.hasOwnProperty(b2);
|
|
2080
2100
|
}
|
|
2081
2101
|
const { assign: J } = Object;
|
|
2082
|
-
function
|
|
2102
|
+
function yt(e) {
|
|
2083
2103
|
return !!(xe(e) && e.effect);
|
|
2084
2104
|
}
|
|
2085
|
-
function
|
|
2086
|
-
const { state:
|
|
2105
|
+
function wt(e, o, t, n) {
|
|
2106
|
+
const { state: l, actions: r, getters: i } = o, s = t.state.value[e];
|
|
2087
2107
|
let a;
|
|
2088
2108
|
function u() {
|
|
2089
|
-
!
|
|
2109
|
+
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2090
2110
|
const c = process.env.NODE_ENV !== "production" && n ? (
|
|
2091
2111
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2092
|
-
|
|
2093
|
-
) :
|
|
2112
|
+
dt(E(l ? l() : {}).value)
|
|
2113
|
+
) : dt(t.state.value[e]);
|
|
2094
2114
|
return J(c, r, Object.keys(i || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = de(S(() => {
|
|
2095
2115
|
Te(t);
|
|
2096
2116
|
const x = t._s.get(e);
|
|
2097
2117
|
return i[g].call(x, x);
|
|
2098
2118
|
})), p), {}));
|
|
2099
2119
|
}
|
|
2100
|
-
return a =
|
|
2120
|
+
return a = tt(e, u, o, t, n, !0), a;
|
|
2101
2121
|
}
|
|
2102
|
-
function
|
|
2122
|
+
function tt(e, o, t = {}, n, l, r) {
|
|
2103
2123
|
let i;
|
|
2104
|
-
const
|
|
2124
|
+
const s = J({ actions: {} }, t);
|
|
2105
2125
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2106
2126
|
throw new Error("Pinia destroyed");
|
|
2107
2127
|
const a = {
|
|
2108
2128
|
deep: !0
|
|
2109
2129
|
// flush: 'post',
|
|
2110
2130
|
};
|
|
2111
|
-
process.env.NODE_ENV !== "production" && !
|
|
2131
|
+
process.env.NODE_ENV !== "production" && !Kt && (a.onTrigger = (d) => {
|
|
2112
2132
|
u ? x = d : u == !1 && !C._hotUpdating && (Array.isArray(x) ? x.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2113
2133
|
});
|
|
2114
2134
|
let u, c, p = [], g = [], x;
|
|
2115
2135
|
const _ = n.state.value[e];
|
|
2116
|
-
!r && !_ && (process.env.NODE_ENV === "production" || !
|
|
2136
|
+
!r && !_ && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2117
2137
|
const v = E({});
|
|
2118
|
-
let
|
|
2138
|
+
let $;
|
|
2119
2139
|
function N(d) {
|
|
2120
2140
|
let f;
|
|
2121
2141
|
u = c = !1, process.env.NODE_ENV !== "production" && (x = []), typeof d == "function" ? (d(n.state.value[e]), f = {
|
|
2122
2142
|
type: ne.patchFunction,
|
|
2123
2143
|
storeId: e,
|
|
2124
2144
|
events: x
|
|
2125
|
-
}) : (
|
|
2145
|
+
}) : (et(n.state.value[e], d), f = {
|
|
2126
2146
|
type: ne.patchObject,
|
|
2127
2147
|
payload: d,
|
|
2128
2148
|
storeId: e,
|
|
2129
2149
|
events: x
|
|
2130
2150
|
});
|
|
2131
|
-
const y =
|
|
2151
|
+
const y = $ = Symbol();
|
|
2132
2152
|
Q().then(() => {
|
|
2133
|
-
|
|
2153
|
+
$ === y && (u = !0);
|
|
2134
2154
|
}), c = !0, ge(p, f, n.state.value[e]);
|
|
2135
2155
|
}
|
|
2136
2156
|
const I = r ? function() {
|
|
@@ -2142,7 +2162,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2142
2162
|
/* istanbul ignore next */
|
|
2143
2163
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2144
2164
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2145
|
-
} :
|
|
2165
|
+
} : cn
|
|
2146
2166
|
);
|
|
2147
2167
|
function k() {
|
|
2148
2168
|
i.stop(), p = [], g = [], n._s.delete(e);
|
|
@@ -2173,20 +2193,20 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2173
2193
|
return q instanceof Promise ? q.then((j) => (ge(O, j), j)).catch((j) => (ge(M, j), Promise.reject(j))) : (ge(O, q), q);
|
|
2174
2194
|
};
|
|
2175
2195
|
}
|
|
2176
|
-
const
|
|
2196
|
+
const m = /* @__PURE__ */ de({
|
|
2177
2197
|
actions: {},
|
|
2178
2198
|
getters: {},
|
|
2179
2199
|
state: [],
|
|
2180
2200
|
hotState: v
|
|
2181
|
-
}),
|
|
2201
|
+
}), R = {
|
|
2182
2202
|
_p: n,
|
|
2183
2203
|
// _s: scope,
|
|
2184
2204
|
$id: e,
|
|
2185
|
-
$onAction:
|
|
2205
|
+
$onAction: Ct.bind(null, g),
|
|
2186
2206
|
$patch: N,
|
|
2187
2207
|
$reset: I,
|
|
2188
2208
|
$subscribe(d, f = {}) {
|
|
2189
|
-
const y =
|
|
2209
|
+
const y = Ct(p, d, f.detached, () => O()), O = i.run(() => F(() => n.state.value[e], (M) => {
|
|
2190
2210
|
(f.flush === "sync" ? c : u) && d({
|
|
2191
2211
|
storeId: e,
|
|
2192
2212
|
type: ne.direct,
|
|
@@ -2196,35 +2216,35 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2196
2216
|
return y;
|
|
2197
2217
|
},
|
|
2198
2218
|
$dispose: k
|
|
2199
|
-
}, C =
|
|
2219
|
+
}, C = Rt(process.env.NODE_ENV !== "production" || Se ? J(
|
|
2200
2220
|
{
|
|
2201
|
-
_hmrPayload:
|
|
2221
|
+
_hmrPayload: m,
|
|
2202
2222
|
_customProperties: de(/* @__PURE__ */ new Set())
|
|
2203
2223
|
// devtools custom properties
|
|
2204
2224
|
},
|
|
2205
|
-
|
|
2225
|
+
R
|
|
2206
2226
|
// must be added later
|
|
2207
2227
|
// setupStore
|
|
2208
|
-
) :
|
|
2228
|
+
) : R);
|
|
2209
2229
|
n._s.set(e, C);
|
|
2210
|
-
const L = (n._a && n._a.runWithContext ||
|
|
2230
|
+
const L = (n._a && n._a.runWithContext || g2)(() => n._e.run(() => (i = Pt()).run(o)));
|
|
2211
2231
|
for (const d in L) {
|
|
2212
2232
|
const f = L[d];
|
|
2213
|
-
if (xe(f) && !
|
|
2214
|
-
process.env.NODE_ENV !== "production" &&
|
|
2233
|
+
if (xe(f) && !yt(f) || st(f))
|
|
2234
|
+
process.env.NODE_ENV !== "production" && l ? Me(v.value, d, qe(L, d)) : r || (_ && x2(f) && (xe(f) ? f.value = _[d] : et(f, _[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && m.state.push(d);
|
|
2215
2235
|
else if (typeof f == "function") {
|
|
2216
|
-
const y = process.env.NODE_ENV !== "production" &&
|
|
2217
|
-
L[d] = y, process.env.NODE_ENV !== "production" && (
|
|
2218
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
2236
|
+
const y = process.env.NODE_ENV !== "production" && l ? f : D(d, f);
|
|
2237
|
+
L[d] = y, process.env.NODE_ENV !== "production" && (m.actions[d] = f), s.actions[d] = f;
|
|
2238
|
+
} else process.env.NODE_ENV !== "production" && yt(f) && (m.getters[d] = r ? (
|
|
2219
2239
|
// @ts-expect-error
|
|
2220
2240
|
t.getters[d]
|
|
2221
|
-
) : f,
|
|
2241
|
+
) : f, ze && (L._getters || // @ts-expect-error: same
|
|
2222
2242
|
(L._getters = de([]))).push(d));
|
|
2223
2243
|
}
|
|
2224
2244
|
if (J(C, L), J(K(C), L), Object.defineProperty(C, "$state", {
|
|
2225
|
-
get: () => process.env.NODE_ENV !== "production" &&
|
|
2245
|
+
get: () => process.env.NODE_ENV !== "production" && l ? v.value : n.state.value[e],
|
|
2226
2246
|
set: (d) => {
|
|
2227
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2247
|
+
if (process.env.NODE_ENV !== "production" && l)
|
|
2228
2248
|
throw new Error("cannot set hotState");
|
|
2229
2249
|
N((f) => {
|
|
2230
2250
|
J(f, d);
|
|
@@ -2234,29 +2254,29 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2234
2254
|
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2235
2255
|
if (f in C.$state) {
|
|
2236
2256
|
const y = d.$state[f], O = C.$state[f];
|
|
2237
|
-
typeof y == "object" && fe(y) && fe(O) ?
|
|
2257
|
+
typeof y == "object" && fe(y) && fe(O) ? un(y, O) : d.$state[f] = O;
|
|
2238
2258
|
}
|
|
2239
|
-
|
|
2259
|
+
Me(C, f, qe(d.$state, f));
|
|
2240
2260
|
}), Object.keys(C.$state).forEach((f) => {
|
|
2241
|
-
f in d.$state ||
|
|
2242
|
-
}), u = !1, c = !1, n.state.value[e] =
|
|
2261
|
+
f in d.$state || Ye(C, f);
|
|
2262
|
+
}), u = !1, c = !1, n.state.value[e] = qe(d._hmrPayload, "hotState"), c = !0, Q().then(() => {
|
|
2243
2263
|
u = !0;
|
|
2244
2264
|
});
|
|
2245
2265
|
for (const f in d._hmrPayload.actions) {
|
|
2246
2266
|
const y = d[f];
|
|
2247
|
-
|
|
2267
|
+
Me(C, f, D(f, y));
|
|
2248
2268
|
}
|
|
2249
2269
|
for (const f in d._hmrPayload.getters) {
|
|
2250
2270
|
const y = d._hmrPayload.getters[f], O = r ? (
|
|
2251
2271
|
// special handling of options api
|
|
2252
2272
|
S(() => (Te(n), y.call(C, C)))
|
|
2253
2273
|
) : y;
|
|
2254
|
-
|
|
2274
|
+
Me(C, f, O);
|
|
2255
2275
|
}
|
|
2256
2276
|
Object.keys(C._hmrPayload.getters).forEach((f) => {
|
|
2257
|
-
f in d._hmrPayload.getters ||
|
|
2277
|
+
f in d._hmrPayload.getters || Ye(C, f);
|
|
2258
2278
|
}), Object.keys(C._hmrPayload.actions).forEach((f) => {
|
|
2259
|
-
f in d._hmrPayload.actions ||
|
|
2279
|
+
f in d._hmrPayload.actions || Ye(C, f);
|
|
2260
2280
|
}), C._hmrPayload = d._hmrPayload, C._getters = d._getters, C._hotUpdating = !1;
|
|
2261
2281
|
})), Se) {
|
|
2262
2282
|
const d = {
|
|
@@ -2275,7 +2295,7 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2275
2295
|
store: C,
|
|
2276
2296
|
app: n._a,
|
|
2277
2297
|
pinia: n,
|
|
2278
|
-
options:
|
|
2298
|
+
options: s
|
|
2279
2299
|
}));
|
|
2280
2300
|
Object.keys(f || {}).forEach((y) => C._customProperties.add(y)), J(C, f);
|
|
2281
2301
|
} else
|
|
@@ -2283,35 +2303,35 @@ function et(e, o, t = {}, n, s, r) {
|
|
|
2283
2303
|
store: C,
|
|
2284
2304
|
app: n._a,
|
|
2285
2305
|
pinia: n,
|
|
2286
|
-
options:
|
|
2306
|
+
options: s
|
|
2287
2307
|
})));
|
|
2288
2308
|
}), 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
|
|
2289
2309
|
state: () => new MyClass()
|
|
2290
2310
|
Found in store "${C.$id}".`), _ && r && t.hydrate && t.hydrate(C.$state, _), u = !0, c = !0, C;
|
|
2291
2311
|
}
|
|
2292
|
-
function
|
|
2293
|
-
let n,
|
|
2312
|
+
function Ue(e, o, t) {
|
|
2313
|
+
let n, l;
|
|
2294
2314
|
const r = typeof o == "function";
|
|
2295
2315
|
if (typeof e == "string")
|
|
2296
|
-
n = e,
|
|
2297
|
-
else if (
|
|
2316
|
+
n = e, l = r ? t : o;
|
|
2317
|
+
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2298
2318
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2299
|
-
function i(
|
|
2300
|
-
const u =
|
|
2301
|
-
if (
|
|
2319
|
+
function i(s, a) {
|
|
2320
|
+
const u = gn();
|
|
2321
|
+
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2302
2322
|
// pinia instance with getActivePinia()
|
|
2303
|
-
(process.env.NODE_ENV === "test" && we && we._testing ? null :
|
|
2323
|
+
(process.env.NODE_ENV === "test" && we && we._testing ? null : s) || (u ? Ie(Xt, null) : null), s && Te(s), process.env.NODE_ENV !== "production" && !we)
|
|
2304
2324
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2305
2325
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2306
2326
|
This will fail in production.`);
|
|
2307
|
-
|
|
2308
|
-
const c =
|
|
2327
|
+
s = we, s._s.has(n) || (r ? tt(n, o, l, s) : wt(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2328
|
+
const c = s._s.get(n);
|
|
2309
2329
|
if (process.env.NODE_ENV !== "production" && a) {
|
|
2310
|
-
const p = "__hot:" + n, g = r ?
|
|
2311
|
-
a._hotUpdate(g), delete
|
|
2330
|
+
const p = "__hot:" + n, g = r ? tt(p, o, l, s, !0) : wt(p, J({}, l), s, !0);
|
|
2331
|
+
a._hotUpdate(g), delete s.state.value[p], s._s.delete(p);
|
|
2312
2332
|
}
|
|
2313
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2314
|
-
const p =
|
|
2333
|
+
if (process.env.NODE_ENV !== "production" && ze) {
|
|
2334
|
+
const p = Vt();
|
|
2315
2335
|
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2316
2336
|
!a) {
|
|
2317
2337
|
const g = p.proxy, x = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
@@ -2322,9 +2342,9 @@ This will fail in production.`);
|
|
|
2322
2342
|
}
|
|
2323
2343
|
return i.$id = n, i;
|
|
2324
2344
|
}
|
|
2325
|
-
const
|
|
2345
|
+
const Ze = Ue("loader", () => ({ loading: E(!1) })), St = {
|
|
2326
2346
|
__name: "Select",
|
|
2327
|
-
props: /* @__PURE__ */
|
|
2347
|
+
props: /* @__PURE__ */ bn({
|
|
2328
2348
|
languages: {
|
|
2329
2349
|
type: Object,
|
|
2330
2350
|
required: !0
|
|
@@ -2335,53 +2355,53 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2335
2355
|
}),
|
|
2336
2356
|
emits: ["update:modelValue"],
|
|
2337
2357
|
setup(e) {
|
|
2338
|
-
const o =
|
|
2339
|
-
([, a]) => a.toLowerCase().includes(
|
|
2340
|
-
)),
|
|
2341
|
-
a.target.value = "",
|
|
2358
|
+
const o = Ze(), t = e, n = xn(e, "modelValue"), l = E(""), r = E(null), i = S(() => Object.entries(t.languages).filter(
|
|
2359
|
+
([, a]) => a.toLowerCase().includes(l.value.toLowerCase())
|
|
2360
|
+
)), s = (a) => {
|
|
2361
|
+
a.target.value = "", l.value = "", r.value && r.value.$el.click();
|
|
2342
2362
|
};
|
|
2343
|
-
return (a, u) => (w(), ee(V(
|
|
2363
|
+
return (a, u) => (w(), ee(V(Ao), {
|
|
2344
2364
|
modelValue: n.value,
|
|
2345
2365
|
"onUpdate:modelValue": u[3] || (u[3] = (c) => n.value = c),
|
|
2346
2366
|
disabled: V(o).loading,
|
|
2347
2367
|
as: "div",
|
|
2348
2368
|
class: "relative mt-1"
|
|
2349
2369
|
}, {
|
|
2350
|
-
default:
|
|
2351
|
-
H(V(
|
|
2370
|
+
default: Ve(() => [
|
|
2371
|
+
H(V(jo), {
|
|
2352
2372
|
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",
|
|
2353
|
-
onChange: u[0] || (u[0] = (c) =>
|
|
2373
|
+
onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
|
|
2354
2374
|
displayValue: (c) => e.languages[c],
|
|
2355
|
-
onFocus: u[1] || (u[1] = (c) =>
|
|
2375
|
+
onFocus: u[1] || (u[1] = (c) => s(c))
|
|
2356
2376
|
}, null, 8, ["displayValue"]),
|
|
2357
|
-
H(V(
|
|
2377
|
+
H(V(Fo), {
|
|
2358
2378
|
ref_key: "btnSelect",
|
|
2359
2379
|
ref: r,
|
|
2360
2380
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
2361
2381
|
}, {
|
|
2362
|
-
default:
|
|
2363
|
-
H(V(
|
|
2382
|
+
default: Ve(() => [
|
|
2383
|
+
H(V(Uo), {
|
|
2364
2384
|
class: "h-5 w-5 text-gray-400",
|
|
2365
2385
|
"aria-hidden": "true",
|
|
2366
|
-
onClick: u[2] || (u[2] = (c) =>
|
|
2386
|
+
onClick: u[2] || (u[2] = (c) => s(c))
|
|
2367
2387
|
})
|
|
2368
2388
|
]),
|
|
2369
2389
|
_: 1
|
|
2370
2390
|
}, 512),
|
|
2371
|
-
H(V(
|
|
2372
|
-
default:
|
|
2373
|
-
(w(!0),
|
|
2391
|
+
H(V(Bo), { 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" }, {
|
|
2392
|
+
default: Ve(() => [
|
|
2393
|
+
(w(!0), T(Z, null, se(i.value, ([c, p]) => (w(), ee(V(Ho), {
|
|
2374
2394
|
key: c,
|
|
2375
2395
|
value: c
|
|
2376
2396
|
}, {
|
|
2377
|
-
default:
|
|
2378
|
-
|
|
2397
|
+
default: Ve(({ active: g, selected: x }) => [
|
|
2398
|
+
h("li", {
|
|
2379
2399
|
class: _e([
|
|
2380
2400
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
2381
2401
|
g ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
2382
2402
|
])
|
|
2383
2403
|
}, [
|
|
2384
|
-
|
|
2404
|
+
h("span", {
|
|
2385
2405
|
class: _e(["block truncate", x && "font-semibold"])
|
|
2386
2406
|
}, te(p), 3)
|
|
2387
2407
|
], 2)
|
|
@@ -2395,19 +2415,19 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2395
2415
|
_: 1
|
|
2396
2416
|
}, 8, ["modelValue", "disabled"]));
|
|
2397
2417
|
}
|
|
2398
|
-
},
|
|
2399
|
-
src:
|
|
2418
|
+
}, dn = "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", _2 = ["disabled"], C2 = /* @__PURE__ */ h("img", {
|
|
2419
|
+
src: dn,
|
|
2400
2420
|
alt: "swap",
|
|
2401
2421
|
class: "w-4"
|
|
2402
|
-
}, null, -1),
|
|
2403
|
-
|
|
2404
|
-
],
|
|
2405
|
-
src:
|
|
2422
|
+
}, null, -1), y2 = [
|
|
2423
|
+
C2
|
|
2424
|
+
], w2 = ["disabled"], S2 = /* @__PURE__ */ h("img", {
|
|
2425
|
+
src: dn,
|
|
2406
2426
|
alt: "swap",
|
|
2407
2427
|
class: "w-4"
|
|
2408
|
-
}, null, -1),
|
|
2409
|
-
|
|
2410
|
-
],
|
|
2428
|
+
}, null, -1), E2 = [
|
|
2429
|
+
S2
|
|
2430
|
+
], O2 = {
|
|
2411
2431
|
__name: "SwapBtn",
|
|
2412
2432
|
props: {
|
|
2413
2433
|
isBidirect: {
|
|
@@ -2417,21 +2437,21 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2417
2437
|
},
|
|
2418
2438
|
emits: ["swap"],
|
|
2419
2439
|
setup(e, { emit: o }) {
|
|
2420
|
-
const t =
|
|
2421
|
-
return (
|
|
2440
|
+
const t = Ze(), n = o;
|
|
2441
|
+
return (l, r) => e.isBidirect ? (w(), T("button", {
|
|
2422
2442
|
key: 1,
|
|
2423
2443
|
onClick: r[0] || (r[0] = (i) => n("swap")),
|
|
2424
2444
|
disabled: V(t).loading
|
|
2425
|
-
},
|
|
2445
|
+
}, E2, 8, w2)) : (w(), T("button", {
|
|
2426
2446
|
key: 0,
|
|
2427
2447
|
disabled: V(t).loading
|
|
2428
|
-
},
|
|
2448
|
+
}, y2, 8, _2));
|
|
2429
2449
|
}
|
|
2430
|
-
},
|
|
2450
|
+
}, We = Ue("language", () => {
|
|
2431
2451
|
const e = E("auto"), o = E("en"), t = E({
|
|
2432
2452
|
src: [],
|
|
2433
2453
|
target: []
|
|
2434
|
-
}), n = S(() => t.value.src[e.value]),
|
|
2454
|
+
}), n = S(() => t.value.src[e.value]), l = S(() => t.value.target[o.value]);
|
|
2435
2455
|
function r(a, u) {
|
|
2436
2456
|
e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
|
|
2437
2457
|
}
|
|
@@ -2440,63 +2460,58 @@ const ze = He("loader", () => ({ loading: E(!1) })), wt = {
|
|
|
2440
2460
|
const a = e.value;
|
|
2441
2461
|
e.value = o.value, o.value = a;
|
|
2442
2462
|
}
|
|
2443
|
-
function
|
|
2463
|
+
function s(a) {
|
|
2444
2464
|
return t.value.src[a] || t.value.target[a];
|
|
2445
2465
|
}
|
|
2446
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel:
|
|
2447
|
-
}),
|
|
2466
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: r, swap: i, getLabel: s };
|
|
2467
|
+
}), $2 = {
|
|
2448
2468
|
key: 0,
|
|
2449
2469
|
class: "flex"
|
|
2450
|
-
},
|
|
2470
|
+
}, T2 = {
|
|
2451
2471
|
__name: "Selects",
|
|
2452
2472
|
setup(e) {
|
|
2453
|
-
const o =
|
|
2473
|
+
const o = We();
|
|
2454
2474
|
function t() {
|
|
2455
2475
|
o.swap();
|
|
2456
2476
|
}
|
|
2457
|
-
return (n,
|
|
2458
|
-
H(
|
|
2477
|
+
return (n, l) => V(o).languages ? (w(), T("div", $2, [
|
|
2478
|
+
H(St, {
|
|
2459
2479
|
modelValue: V(o).src,
|
|
2460
|
-
"onUpdate:modelValue":
|
|
2480
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => V(o).src = r),
|
|
2461
2481
|
languages: V(o).languages.src,
|
|
2462
2482
|
class: "grow"
|
|
2463
2483
|
}, null, 8, ["modelValue", "languages"]),
|
|
2464
|
-
H(
|
|
2484
|
+
H(O2, {
|
|
2465
2485
|
isBidirect: V(o).src !== "auto",
|
|
2466
2486
|
class: "grow-0 mx-3",
|
|
2467
2487
|
onSwap: t
|
|
2468
2488
|
}, null, 8, ["isBidirect"]),
|
|
2469
|
-
H(
|
|
2489
|
+
H(St, {
|
|
2470
2490
|
modelValue: V(o).target,
|
|
2471
|
-
"onUpdate:modelValue":
|
|
2491
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => V(o).target = r),
|
|
2472
2492
|
languages: V(o).languages.target,
|
|
2473
2493
|
class: "grow"
|
|
2474
2494
|
}, null, 8, ["modelValue", "languages"])
|
|
2475
2495
|
])) : X("", !0);
|
|
2476
2496
|
}
|
|
2477
|
-
},
|
|
2497
|
+
}, I2 = {
|
|
2478
2498
|
INPUT_MAX_LENGTH: 5e3,
|
|
2479
2499
|
INPUT_DEBOUNCE: 500
|
|
2480
|
-
},
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
t[n] = s;
|
|
2484
|
-
return t;
|
|
2485
|
-
}, Ss = {}, Es = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2486
|
-
function Os(e, o) {
|
|
2487
|
-
return w(), $("span", Es);
|
|
2500
|
+
}, L2 = {}, R2 = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2501
|
+
function P2(e, o) {
|
|
2502
|
+
return w(), T("span", R2);
|
|
2488
2503
|
}
|
|
2489
|
-
const
|
|
2504
|
+
const V2 = /* @__PURE__ */ Le(L2, [["render", P2]]), k2 = "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", M2 = "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", fn = Ue("tts", () => {
|
|
2490
2505
|
const e = E({
|
|
2491
2506
|
src: null,
|
|
2492
2507
|
target: null
|
|
2493
2508
|
});
|
|
2494
|
-
function o(
|
|
2495
|
-
|
|
2509
|
+
function o(l) {
|
|
2510
|
+
l.src && (e.value.src = l.src), l.target && (e.value.target = l.target);
|
|
2496
2511
|
}
|
|
2497
|
-
function t(
|
|
2498
|
-
if (
|
|
2499
|
-
if (
|
|
2512
|
+
function t(l) {
|
|
2513
|
+
if (l === "src") return e.value.src;
|
|
2514
|
+
if (l === "target") return e.value.target;
|
|
2500
2515
|
}
|
|
2501
2516
|
function n() {
|
|
2502
2517
|
e.value = {
|
|
@@ -2510,17 +2525,17 @@ const $s = /* @__PURE__ */ Ze(Ss, [["render", Os]]), Ts = "data:image/svg+xml,%3
|
|
|
2510
2525
|
get: t,
|
|
2511
2526
|
reset: n
|
|
2512
2527
|
};
|
|
2513
|
-
}),
|
|
2514
|
-
src:
|
|
2528
|
+
}), N2 = /* @__PURE__ */ h("img", {
|
|
2529
|
+
src: k2,
|
|
2515
2530
|
alt: "Play"
|
|
2516
|
-
}, null, -1),
|
|
2517
|
-
|
|
2518
|
-
],
|
|
2519
|
-
src:
|
|
2531
|
+
}, null, -1), D2 = [
|
|
2532
|
+
N2
|
|
2533
|
+
], A2 = /* @__PURE__ */ h("img", {
|
|
2534
|
+
src: M2,
|
|
2520
2535
|
alt: "Stop"
|
|
2521
|
-
}, null, -1),
|
|
2522
|
-
|
|
2523
|
-
],
|
|
2536
|
+
}, null, -1), F2 = [
|
|
2537
|
+
A2
|
|
2538
|
+
], j2 = {
|
|
2524
2539
|
__name: "SpeakBtn",
|
|
2525
2540
|
props: {
|
|
2526
2541
|
type: {
|
|
@@ -2530,7 +2545,7 @@ const $s = /* @__PURE__ */ Ze(Ss, [["render", Os]]), Ts = "data:image/svg+xml,%3
|
|
|
2530
2545
|
},
|
|
2531
2546
|
emits: ["loadTTS"],
|
|
2532
2547
|
setup(e, { emit: o }) {
|
|
2533
|
-
const t =
|
|
2548
|
+
const t = fn(), n = e, l = o, r = S(() => t.tts[n.type]), i = E(!1), s = new Audio();
|
|
2534
2549
|
F(
|
|
2535
2550
|
r,
|
|
2536
2551
|
() => {
|
|
@@ -2541,71 +2556,71 @@ const $s = /* @__PURE__ */ Ze(Ss, [["render", Os]]), Ts = "data:image/svg+xml,%3
|
|
|
2541
2556
|
u();
|
|
2542
2557
|
},
|
|
2543
2558
|
{ immediate: !0 }
|
|
2544
|
-
),
|
|
2545
|
-
c(),
|
|
2559
|
+
), ot(() => {
|
|
2560
|
+
c(), s.src = "";
|
|
2546
2561
|
});
|
|
2547
2562
|
function a() {
|
|
2548
2563
|
if (r.value) {
|
|
2549
2564
|
u();
|
|
2550
2565
|
return;
|
|
2551
2566
|
}
|
|
2552
|
-
i.value = !0,
|
|
2567
|
+
i.value = !0, l("loadTTS");
|
|
2553
2568
|
}
|
|
2554
2569
|
function u() {
|
|
2555
|
-
r.value && (
|
|
2570
|
+
r.value && (s.src = r.value, i.value = !0, s.play().catch(() => {
|
|
2556
2571
|
i.value = !1;
|
|
2557
2572
|
}));
|
|
2558
2573
|
}
|
|
2559
2574
|
function c() {
|
|
2560
|
-
|
|
2575
|
+
s.pause(), s.currentTime = 0, i.value = !1;
|
|
2561
2576
|
}
|
|
2562
|
-
return
|
|
2577
|
+
return s.onended = () => {
|
|
2563
2578
|
i.value = !1;
|
|
2564
|
-
}, (p, g) => i.value ? (w(),
|
|
2579
|
+
}, (p, g) => i.value ? (w(), T("button", {
|
|
2565
2580
|
key: 1,
|
|
2566
2581
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2567
|
-
onClick:
|
|
2568
|
-
},
|
|
2582
|
+
onClick: ft(c, ["prevent"])
|
|
2583
|
+
}, F2)) : (w(), T("button", {
|
|
2569
2584
|
key: 0,
|
|
2570
2585
|
class: "btn btn-xs btn-ghost btn-circle",
|
|
2571
|
-
onClick:
|
|
2572
|
-
},
|
|
2586
|
+
onClick: ft(a, ["prevent"])
|
|
2587
|
+
}, D2));
|
|
2573
2588
|
}
|
|
2574
|
-
},
|
|
2575
|
-
src:
|
|
2589
|
+
}, B2 = "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", H2 = {}, z2 = { class: "btn btn-xs btn-circle btn-ghost" }, U2 = /* @__PURE__ */ h("img", {
|
|
2590
|
+
src: B2,
|
|
2576
2591
|
alt: "Clear",
|
|
2577
2592
|
class: "w-4"
|
|
2578
|
-
}, null, -1),
|
|
2579
|
-
|
|
2593
|
+
}, null, -1), Z2 = [
|
|
2594
|
+
U2
|
|
2580
2595
|
];
|
|
2581
|
-
function
|
|
2582
|
-
return w(),
|
|
2596
|
+
function W2(e, o) {
|
|
2597
|
+
return w(), T("button", z2, Z2);
|
|
2583
2598
|
}
|
|
2584
|
-
const
|
|
2599
|
+
const G2 = /* @__PURE__ */ Le(H2, [["render", W2]]), q2 = "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", J2 = "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='%23FFC857'/%3e%3c/svg%3e", K2 = { class: "btn btn-xs btn-circle btn-ghost" }, Y2 = {
|
|
2585
2600
|
key: 0,
|
|
2586
|
-
src:
|
|
2601
|
+
src: q2,
|
|
2587
2602
|
alt: "Clear",
|
|
2588
2603
|
class: "w-4"
|
|
2589
|
-
},
|
|
2604
|
+
}, Q2 = {
|
|
2590
2605
|
key: 1,
|
|
2591
|
-
src:
|
|
2606
|
+
src: J2,
|
|
2592
2607
|
alt: "Clear",
|
|
2593
2608
|
class: "w-4"
|
|
2594
|
-
},
|
|
2609
|
+
}, X2 = {
|
|
2595
2610
|
__name: "FavoriteBtn",
|
|
2596
2611
|
props: {
|
|
2597
2612
|
isFilled: Boolean
|
|
2598
2613
|
},
|
|
2599
2614
|
setup(e) {
|
|
2600
2615
|
const o = e;
|
|
2601
|
-
return (t, n) => (w(),
|
|
2602
|
-
o.isFilled ? (w(),
|
|
2616
|
+
return (t, n) => (w(), T("button", K2, [
|
|
2617
|
+
o.isFilled ? (w(), T("img", Y2)) : (w(), T("img", Q2))
|
|
2603
2618
|
]));
|
|
2604
2619
|
}
|
|
2605
|
-
},
|
|
2620
|
+
}, el = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, tl = { class: "text-sm text-gray-600" }, nl = {
|
|
2606
2621
|
key: 0,
|
|
2607
2622
|
class: "italic"
|
|
2608
|
-
},
|
|
2623
|
+
}, ol = /* @__PURE__ */ h("div", { class: "flex-grow" }, null, -1), pn = {
|
|
2609
2624
|
__name: "TranslationBtnGroup",
|
|
2610
2625
|
props: {
|
|
2611
2626
|
loading: {
|
|
@@ -2649,45 +2664,45 @@ const Bs = /* @__PURE__ */ Ze(Ns, [["render", js]]), Hs = "data:image/svg+xml,%3
|
|
|
2649
2664
|
emits: ["clear", "favorite", "loadTTS"],
|
|
2650
2665
|
setup(e, { emit: o }) {
|
|
2651
2666
|
const t = e, n = o;
|
|
2652
|
-
return (
|
|
2653
|
-
t.src ? (w(), ee(
|
|
2667
|
+
return (l, r) => (w(), T("div", el, [
|
|
2668
|
+
t.src ? (w(), ee(j2, {
|
|
2654
2669
|
key: 0,
|
|
2655
2670
|
type: t.type,
|
|
2656
2671
|
onLoadTTS: r[0] || (r[0] = (i) => n("loadTTS"))
|
|
2657
2672
|
}, null, 8, ["type"])) : X("", !0),
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
e.phonetic ? (w(),
|
|
2673
|
+
h("div", tl, [
|
|
2674
|
+
_n(te(e.srcLabel) + " ", 1),
|
|
2675
|
+
e.phonetic ? (w(), T("span", nl, "- [" + te(t.phonetic) + "]", 1)) : X("", !0)
|
|
2661
2676
|
]),
|
|
2662
|
-
|
|
2663
|
-
t.loading ? (w(), ee(
|
|
2664
|
-
t.src && t.isClearBtn ? (w(), ee(
|
|
2677
|
+
ol,
|
|
2678
|
+
t.loading ? (w(), ee(V2, { key: 1 })) : X("", !0),
|
|
2679
|
+
t.src && t.isClearBtn ? (w(), ee(G2, {
|
|
2665
2680
|
key: 2,
|
|
2666
2681
|
onClick: r[1] || (r[1] = (i) => n("clear"))
|
|
2667
2682
|
})) : X("", !0),
|
|
2668
|
-
t.src && t.isFavoriteBtn ? (w(), ee(
|
|
2683
|
+
t.src && t.isFavoriteBtn ? (w(), ee(X2, {
|
|
2669
2684
|
key: 3,
|
|
2670
2685
|
isFilled: t.isFavorite,
|
|
2671
2686
|
onClick: r[2] || (r[2] = (i) => n("favorite"))
|
|
2672
2687
|
}, null, 8, ["isFilled"])) : X("", !0)
|
|
2673
2688
|
]));
|
|
2674
2689
|
}
|
|
2675
|
-
}, he =
|
|
2690
|
+
}, he = Ue("translation", () => {
|
|
2676
2691
|
const e = E(null), o = E(null), t = E(null), n = E({
|
|
2677
2692
|
src: null,
|
|
2678
2693
|
target: null
|
|
2679
|
-
}),
|
|
2694
|
+
}), l = E(null), r = E([]), i = E([]), s = E([]), a = E([]), u = E({
|
|
2680
2695
|
src: null,
|
|
2681
2696
|
target: null
|
|
2682
|
-
}), c =
|
|
2697
|
+
}), c = We(), p = S(() => c.getLabel(e.value)), g = S(() => c.getLabel(o.value));
|
|
2683
2698
|
function x(v) {
|
|
2684
|
-
e.value = v.src, o.value = v.target, t.value = v.text, n.value = v.phonetic,
|
|
2699
|
+
e.value = v.src, o.value = v.target, t.value = v.text, n.value = v.phonetic, l.value = v.result, r.value = v.dictionary, i.value = v.definitions, s.value = v.synonyms, a.value = v.examples, u.value = v.tts;
|
|
2685
2700
|
}
|
|
2686
2701
|
function _() {
|
|
2687
2702
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2688
2703
|
src: null,
|
|
2689
2704
|
target: null
|
|
2690
|
-
},
|
|
2705
|
+
}, l.value = null, r.value = [], i.value = [], s.value = [], a.value = [], u.value = {
|
|
2691
2706
|
src: null,
|
|
2692
2707
|
target: null
|
|
2693
2708
|
};
|
|
@@ -2699,115 +2714,115 @@ const Bs = /* @__PURE__ */ Ze(Ns, [["render", js]]), Hs = "data:image/svg+xml,%3
|
|
|
2699
2714
|
targetLabel: g,
|
|
2700
2715
|
phonetic: n,
|
|
2701
2716
|
text: t,
|
|
2702
|
-
result:
|
|
2717
|
+
result: l,
|
|
2703
2718
|
dictionary: r,
|
|
2704
2719
|
definitions: i,
|
|
2705
|
-
synonyms:
|
|
2720
|
+
synonyms: s,
|
|
2706
2721
|
examples: a,
|
|
2707
2722
|
tts: u,
|
|
2708
2723
|
init: x,
|
|
2709
2724
|
reset: _
|
|
2710
2725
|
};
|
|
2711
2726
|
});
|
|
2712
|
-
function
|
|
2713
|
-
return
|
|
2727
|
+
function ll(e) {
|
|
2728
|
+
return kt() ? (nt(e), !0) : !1;
|
|
2714
2729
|
}
|
|
2715
|
-
function
|
|
2730
|
+
function Be(e) {
|
|
2716
2731
|
return typeof e == "function" ? e() : V(e);
|
|
2717
2732
|
}
|
|
2718
|
-
const
|
|
2733
|
+
const sl = typeof window < "u" && typeof document < "u";
|
|
2719
2734
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2720
|
-
const
|
|
2735
|
+
const Et = () => {
|
|
2721
2736
|
};
|
|
2722
|
-
function
|
|
2737
|
+
function rl(e, o) {
|
|
2723
2738
|
function t(...n) {
|
|
2724
|
-
return new Promise((
|
|
2725
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(
|
|
2739
|
+
return new Promise((l, r) => {
|
|
2740
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(r);
|
|
2726
2741
|
});
|
|
2727
2742
|
}
|
|
2728
2743
|
return t;
|
|
2729
2744
|
}
|
|
2730
|
-
function
|
|
2731
|
-
let t, n,
|
|
2732
|
-
const r = (
|
|
2733
|
-
clearTimeout(
|
|
2745
|
+
function il(e, o = {}) {
|
|
2746
|
+
let t, n, l = Et;
|
|
2747
|
+
const r = (s) => {
|
|
2748
|
+
clearTimeout(s), l(), l = Et;
|
|
2734
2749
|
};
|
|
2735
|
-
return (
|
|
2736
|
-
const a =
|
|
2737
|
-
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(
|
|
2738
|
-
|
|
2739
|
-
t && r(t), n = null, c(
|
|
2750
|
+
return (s) => {
|
|
2751
|
+
const a = Be(e), u = Be(o.maxWait);
|
|
2752
|
+
return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(s())) : new Promise((c, p) => {
|
|
2753
|
+
l = o.rejectOnCancel ? p : c, u && !n && (n = setTimeout(() => {
|
|
2754
|
+
t && r(t), n = null, c(s());
|
|
2740
2755
|
}, u)), t = setTimeout(() => {
|
|
2741
|
-
n && r(n), n = null, c(
|
|
2756
|
+
n && r(n), n = null, c(s());
|
|
2742
2757
|
}, a);
|
|
2743
2758
|
});
|
|
2744
2759
|
};
|
|
2745
2760
|
}
|
|
2746
|
-
function
|
|
2747
|
-
return
|
|
2748
|
-
|
|
2761
|
+
function al(e, o = 200, t = {}) {
|
|
2762
|
+
return rl(
|
|
2763
|
+
il(o, t),
|
|
2749
2764
|
e
|
|
2750
2765
|
);
|
|
2751
2766
|
}
|
|
2752
|
-
function
|
|
2767
|
+
function Ot(e) {
|
|
2753
2768
|
var o;
|
|
2754
|
-
const t =
|
|
2769
|
+
const t = Be(e);
|
|
2755
2770
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2756
2771
|
}
|
|
2757
|
-
const
|
|
2758
|
-
function
|
|
2759
|
-
const e = E(!1), o =
|
|
2772
|
+
const ul = sl ? window : void 0;
|
|
2773
|
+
function cl() {
|
|
2774
|
+
const e = E(!1), o = Vt();
|
|
2760
2775
|
return o && Ce(() => {
|
|
2761
2776
|
e.value = !0;
|
|
2762
2777
|
}, o), e;
|
|
2763
2778
|
}
|
|
2764
|
-
function
|
|
2765
|
-
const o =
|
|
2779
|
+
function dl(e) {
|
|
2780
|
+
const o = cl();
|
|
2766
2781
|
return S(() => (o.value, !!e()));
|
|
2767
2782
|
}
|
|
2768
|
-
function
|
|
2769
|
-
const { window: n =
|
|
2783
|
+
function fl(e, o, t = {}) {
|
|
2784
|
+
const { window: n = ul, ...l } = t;
|
|
2770
2785
|
let r;
|
|
2771
|
-
const i =
|
|
2786
|
+
const i = dl(() => n && "ResizeObserver" in n), s = () => {
|
|
2772
2787
|
r && (r.disconnect(), r = void 0);
|
|
2773
|
-
}, a = S(() => Array.isArray(e) ? e.map((p) =>
|
|
2788
|
+
}, a = S(() => Array.isArray(e) ? e.map((p) => Ot(p)) : [Ot(e)]), u = F(
|
|
2774
2789
|
a,
|
|
2775
2790
|
(p) => {
|
|
2776
|
-
if (
|
|
2791
|
+
if (s(), i.value && n) {
|
|
2777
2792
|
r = new ResizeObserver(o);
|
|
2778
2793
|
for (const g of p)
|
|
2779
|
-
g && r.observe(g,
|
|
2794
|
+
g && r.observe(g, l);
|
|
2780
2795
|
}
|
|
2781
2796
|
},
|
|
2782
2797
|
{ immediate: !0, flush: "post" }
|
|
2783
2798
|
), c = () => {
|
|
2784
|
-
|
|
2799
|
+
s(), u();
|
|
2785
2800
|
};
|
|
2786
|
-
return
|
|
2801
|
+
return ll(c), {
|
|
2787
2802
|
isSupported: i,
|
|
2788
2803
|
stop: c
|
|
2789
2804
|
};
|
|
2790
2805
|
}
|
|
2791
|
-
function
|
|
2806
|
+
function vn(e) {
|
|
2792
2807
|
var o;
|
|
2793
|
-
const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input),
|
|
2808
|
+
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);
|
|
2794
2809
|
function i() {
|
|
2795
|
-
var
|
|
2810
|
+
var s;
|
|
2796
2811
|
if (!t.value)
|
|
2797
2812
|
return;
|
|
2798
2813
|
let a = "";
|
|
2799
|
-
t.value.style[
|
|
2814
|
+
t.value.style[l] = "1px", r.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Be(e.styleTarget).style[l] = `${r.value}px` : a = `${r.value}px`, t.value.style[l] = a;
|
|
2800
2815
|
}
|
|
2801
2816
|
return F([n, t], () => Q(i), { immediate: !0 }), F(r, () => {
|
|
2802
|
-
var
|
|
2803
|
-
return (
|
|
2804
|
-
}),
|
|
2817
|
+
var s;
|
|
2818
|
+
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2819
|
+
}), fl(t, () => i()), e != null && e.watch && F(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2805
2820
|
textarea: t,
|
|
2806
2821
|
input: n,
|
|
2807
2822
|
triggerResize: i
|
|
2808
2823
|
};
|
|
2809
2824
|
}
|
|
2810
|
-
const
|
|
2825
|
+
const pl = {
|
|
2811
2826
|
__name: "TranslationInput",
|
|
2812
2827
|
props: {
|
|
2813
2828
|
text: {
|
|
@@ -2817,21 +2832,21 @@ const il = {
|
|
|
2817
2832
|
},
|
|
2818
2833
|
emits: ["change", "clear", "loadTTS"],
|
|
2819
2834
|
setup(e, { emit: o }) {
|
|
2820
|
-
const t = he(), n = e,
|
|
2835
|
+
const t = he(), n = e, l = E(""), r = S(() => t.src), i = S(() => t.srcLabel), s = S(() => {
|
|
2821
2836
|
var _;
|
|
2822
2837
|
return (_ = t.phonetic) == null ? void 0 : _.src;
|
|
2823
|
-
}), { textarea: a } =
|
|
2824
|
-
u("change",
|
|
2825
|
-
},
|
|
2838
|
+
}), { textarea: a } = vn({ input: l, styleProp: "minHeight" }), u = o, c = al(() => {
|
|
2839
|
+
u("change", l.value);
|
|
2840
|
+
}, I2.INPUT_DEBOUNCE);
|
|
2826
2841
|
function p() {
|
|
2827
|
-
if (!
|
|
2842
|
+
if (!l.value) {
|
|
2828
2843
|
g();
|
|
2829
2844
|
return;
|
|
2830
2845
|
}
|
|
2831
2846
|
c();
|
|
2832
2847
|
}
|
|
2833
2848
|
function g() {
|
|
2834
|
-
u("clear"),
|
|
2849
|
+
u("clear"), l.value = "", a.value.focus();
|
|
2835
2850
|
}
|
|
2836
2851
|
async function x() {
|
|
2837
2852
|
await Q(), a.value.select();
|
|
@@ -2839,22 +2854,22 @@ const il = {
|
|
|
2839
2854
|
return F(
|
|
2840
2855
|
() => n.text,
|
|
2841
2856
|
(_) => {
|
|
2842
|
-
|
|
2857
|
+
l.value !== _ && x(), l.value = _;
|
|
2843
2858
|
}
|
|
2844
|
-
), (_, v) => (w(),
|
|
2845
|
-
H(
|
|
2859
|
+
), (_, v) => (w(), T(Z, null, [
|
|
2860
|
+
H(pn, {
|
|
2846
2861
|
src: r.value,
|
|
2847
2862
|
srcLabel: i.value,
|
|
2848
2863
|
type: "src",
|
|
2849
|
-
phonetic:
|
|
2864
|
+
phonetic: s.value,
|
|
2850
2865
|
isClearBtn: !0,
|
|
2851
2866
|
onClear: g,
|
|
2852
|
-
onLoadTTS: v[0] || (v[0] = (
|
|
2867
|
+
onLoadTTS: v[0] || (v[0] = ($) => u("loadTTS"))
|
|
2853
2868
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
2854
|
-
|
|
2869
|
+
Mt(h("textarea", {
|
|
2855
2870
|
ref_key: "textarea",
|
|
2856
2871
|
ref: a,
|
|
2857
|
-
"onUpdate:modelValue": v[1] || (v[1] = (
|
|
2872
|
+
"onUpdate:modelValue": v[1] || (v[1] = ($) => l.value = $),
|
|
2858
2873
|
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 overflow-x-hidden overflow-y-hidden",
|
|
2859
2874
|
autofocus: "",
|
|
2860
2875
|
rows: "2",
|
|
@@ -2862,15 +2877,15 @@ const il = {
|
|
|
2862
2877
|
onFocus: x
|
|
2863
2878
|
}, null, 544), [
|
|
2864
2879
|
[
|
|
2865
|
-
|
|
2866
|
-
|
|
2880
|
+
Nt,
|
|
2881
|
+
l.value,
|
|
2867
2882
|
void 0,
|
|
2868
2883
|
{ trim: !0 }
|
|
2869
2884
|
]
|
|
2870
2885
|
])
|
|
2871
2886
|
], 64));
|
|
2872
2887
|
}
|
|
2873
|
-
},
|
|
2888
|
+
}, vl = /* @__PURE__ */ Le(pl, [["__scopeId", "data-v-90bf3e0d"]]), hl = (e) => (Tt("data-v-f47b8efe"), e = e(), It(), e), ml = { class: "flex flex-col" }, gl = /* @__PURE__ */ hl(() => /* @__PURE__ */ h("div", { class: "w-full flex align-item-center justify-end mt-2" }, null, -1)), bl = {
|
|
2874
2889
|
__name: "TranslationResult",
|
|
2875
2890
|
props: {
|
|
2876
2891
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -2878,24 +2893,24 @@ const il = {
|
|
|
2878
2893
|
},
|
|
2879
2894
|
emits: ["loadTTS", "favorite"],
|
|
2880
2895
|
setup(e, { emit: o }) {
|
|
2881
|
-
const t = he(), n = S(() => t.result),
|
|
2896
|
+
const t = he(), n = S(() => t.result), l = S(() => t.target), r = S(() => t.targetLabel), i = S(() => {
|
|
2882
2897
|
var g;
|
|
2883
2898
|
return (g = t.phonetic) == null ? void 0 : g.target;
|
|
2884
|
-
}),
|
|
2885
|
-
return (g, x) => (w(),
|
|
2886
|
-
H(
|
|
2899
|
+
}), s = e, a = Ze(), { textarea: u, input: c } = vn({ input: n, styleProp: "minHeight" }), p = o;
|
|
2900
|
+
return (g, x) => (w(), T(Z, null, [
|
|
2901
|
+
H(pn, {
|
|
2887
2902
|
loading: V(a).loading,
|
|
2888
|
-
src:
|
|
2903
|
+
src: l.value,
|
|
2889
2904
|
srcLabel: r.value,
|
|
2890
2905
|
type: "target",
|
|
2891
|
-
isFavoriteBtn:
|
|
2906
|
+
isFavoriteBtn: s.isFavoriteFeatureEnabled,
|
|
2892
2907
|
isFavorite: e.isFavorite,
|
|
2893
2908
|
phonetic: i.value,
|
|
2894
2909
|
onFavorite: x[0] || (x[0] = (_) => p("favorite")),
|
|
2895
2910
|
onLoadTTS: x[1] || (x[1] = (_) => p("loadTTS"))
|
|
2896
2911
|
}, null, 8, ["loading", "src", "srcLabel", "isFavoriteBtn", "isFavorite", "phonetic"]),
|
|
2897
|
-
|
|
2898
|
-
|
|
2912
|
+
h("div", ml, [
|
|
2913
|
+
Mt(h("textarea", {
|
|
2899
2914
|
ref_key: "textarea",
|
|
2900
2915
|
ref: u,
|
|
2901
2916
|
"onUpdate:modelValue": x[2] || (x[2] = (_) => xe(c) ? c.value = _ : null),
|
|
@@ -2904,65 +2919,65 @@ const il = {
|
|
|
2904
2919
|
rows: "2",
|
|
2905
2920
|
spellcheck: "false"
|
|
2906
2921
|
}, null, 512), [
|
|
2907
|
-
[
|
|
2922
|
+
[Nt, V(c)]
|
|
2908
2923
|
]),
|
|
2909
|
-
|
|
2924
|
+
gl
|
|
2910
2925
|
])
|
|
2911
2926
|
], 64));
|
|
2912
2927
|
}
|
|
2913
|
-
},
|
|
2928
|
+
}, xl = /* @__PURE__ */ Le(bl, [["__scopeId", "data-v-f47b8efe"]]), _l = { class: "btn btn-sm btn-circle btn-ghost" }, Ge = {
|
|
2914
2929
|
__name: "ToggleBtn",
|
|
2915
2930
|
props: {
|
|
2916
2931
|
isExpanded: Boolean
|
|
2917
2932
|
},
|
|
2918
2933
|
setup(e) {
|
|
2919
2934
|
const o = e;
|
|
2920
|
-
return (t, n) => (w(),
|
|
2921
|
-
o.isExpanded ? (w(), ee(V(
|
|
2935
|
+
return (t, n) => (w(), T("button", _l, [
|
|
2936
|
+
o.isExpanded ? (w(), ee(V(Zo), {
|
|
2922
2937
|
key: 0,
|
|
2923
2938
|
class: "w-7 text-gray-400"
|
|
2924
|
-
})) : (w(), ee(V(
|
|
2939
|
+
})) : (w(), ee(V(zo), {
|
|
2925
2940
|
key: 1,
|
|
2926
2941
|
class: "w-7 text-gray-400"
|
|
2927
2942
|
}))
|
|
2928
2943
|
]));
|
|
2929
2944
|
}
|
|
2930
|
-
},
|
|
2945
|
+
}, Cl = { class: "card border bg-white rounded-lg" }, yl = { class: "card-body px-4 py-2 gap-0" }, wl = { class: "flex justify-between items-center" }, Sl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), El = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Ol = { class: "list-none list-inside" }, $l = ["onClick"], Tl = { class: "text-base font-normal text-gray-800 leading-4" }, Il = {
|
|
2931
2946
|
__name: "Dictionary",
|
|
2932
2947
|
emits: ["translate"],
|
|
2933
2948
|
setup(e, { emit: o }) {
|
|
2934
|
-
const t = E(!0), n = he(),
|
|
2949
|
+
const t = E(!0), n = he(), l = We(), r = S(() => n.dictionary), i = o, s = () => {
|
|
2935
2950
|
t.value = !t.value;
|
|
2936
2951
|
}, a = (u) => {
|
|
2937
|
-
i("translate", u, n.target, n.src),
|
|
2952
|
+
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
2938
2953
|
};
|
|
2939
|
-
return (u, c) => (w(),
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
H(
|
|
2954
|
+
return (u, c) => (w(), T("div", Cl, [
|
|
2955
|
+
h("div", yl, [
|
|
2956
|
+
h("div", wl, [
|
|
2957
|
+
Sl,
|
|
2958
|
+
H(Ge, {
|
|
2944
2959
|
isExpanded: t.value,
|
|
2945
|
-
onClick:
|
|
2960
|
+
onClick: s
|
|
2946
2961
|
}, null, 8, ["isExpanded"])
|
|
2947
2962
|
]),
|
|
2948
|
-
|
|
2963
|
+
h("div", {
|
|
2949
2964
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2950
2965
|
}, [
|
|
2951
|
-
|
|
2952
|
-
(w(!0),
|
|
2966
|
+
h("ul", null, [
|
|
2967
|
+
(w(!0), T(Z, null, se(r.value, (p, g) => (w(), T("li", {
|
|
2953
2968
|
key: `${p.pos}-${g}`,
|
|
2954
2969
|
class: "mb-2"
|
|
2955
2970
|
}, [
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
(w(!0),
|
|
2971
|
+
h("h5", El, te(p.pos), 1),
|
|
2972
|
+
h("ul", Ol, [
|
|
2973
|
+
(w(!0), T(Z, null, se(p.items, (x, _) => (w(), T("li", {
|
|
2959
2974
|
key: `${x.word}-${_}`
|
|
2960
2975
|
}, [
|
|
2961
|
-
|
|
2976
|
+
h("span", {
|
|
2962
2977
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
2963
2978
|
onClick: (v) => a(x.word)
|
|
2964
|
-
}, te(x.word), 9,
|
|
2965
|
-
|
|
2979
|
+
}, te(x.word), 9, $l),
|
|
2980
|
+
h("small", Tl, " - " + te(x.reverse_translation.join(", ")), 1)
|
|
2966
2981
|
]))), 128))
|
|
2967
2982
|
])
|
|
2968
2983
|
]))), 128))
|
|
@@ -2971,41 +2986,41 @@ const il = {
|
|
|
2971
2986
|
])
|
|
2972
2987
|
]));
|
|
2973
2988
|
}
|
|
2974
|
-
},
|
|
2989
|
+
}, Ll = { class: "card border bg-white rounded-lg" }, Rl = { class: "card-body px-4 py-2 gap-0" }, Pl = { class: "flex justify-between items-center" }, Vl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), kl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Ml = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, Nl = /* @__PURE__ */ h("br", null, null, -1), Dl = {
|
|
2975
2990
|
key: 0,
|
|
2976
2991
|
class: "italic"
|
|
2977
|
-
},
|
|
2992
|
+
}, Al = {
|
|
2978
2993
|
__name: "Definition",
|
|
2979
2994
|
setup(e) {
|
|
2980
|
-
const o = E(!0), t = he(), n = S(() => t.definitions),
|
|
2995
|
+
const o = E(!0), t = he(), n = S(() => t.definitions), l = () => {
|
|
2981
2996
|
o.value = !o.value;
|
|
2982
2997
|
};
|
|
2983
|
-
return (r, i) => (w(),
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
H(
|
|
2998
|
+
return (r, i) => (w(), T("div", Ll, [
|
|
2999
|
+
h("div", Rl, [
|
|
3000
|
+
h("div", Pl, [
|
|
3001
|
+
Vl,
|
|
3002
|
+
H(Ge, {
|
|
2988
3003
|
isExpanded: o.value,
|
|
2989
|
-
onClick:
|
|
3004
|
+
onClick: l
|
|
2990
3005
|
}, null, 8, ["isExpanded"])
|
|
2991
3006
|
]),
|
|
2992
|
-
|
|
3007
|
+
h("div", {
|
|
2993
3008
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
2994
3009
|
}, [
|
|
2995
|
-
|
|
2996
|
-
(w(!0),
|
|
2997
|
-
key: `${
|
|
3010
|
+
h("ul", null, [
|
|
3011
|
+
(w(!0), T(Z, null, se(n.value, (s, a) => (w(), T("li", {
|
|
3012
|
+
key: `${s.pos}-${a}`,
|
|
2998
3013
|
class: "mb-2"
|
|
2999
3014
|
}, [
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
(w(!0),
|
|
3015
|
+
h("h5", kl, te(s.pos), 1),
|
|
3016
|
+
h("ul", Ml, [
|
|
3017
|
+
(w(!0), T(Z, null, se(s.items, (u, c) => (w(), T("li", {
|
|
3003
3018
|
key: `${u.gloss}-${c}`,
|
|
3004
3019
|
class: "mb-1"
|
|
3005
3020
|
}, [
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
u.example ? (w(),
|
|
3021
|
+
h("span", null, te(u.gloss), 1),
|
|
3022
|
+
Nl,
|
|
3023
|
+
u.example ? (w(), T("small", Dl, '"' + te(u.example) + '"', 1)) : X("", !0)
|
|
3009
3024
|
]))), 128))
|
|
3010
3025
|
])
|
|
3011
3026
|
]))), 128))
|
|
@@ -3014,72 +3029,72 @@ const il = {
|
|
|
3014
3029
|
])
|
|
3015
3030
|
]));
|
|
3016
3031
|
}
|
|
3017
|
-
},
|
|
3032
|
+
}, Fl = { class: "card border bg-white rounded-lg" }, jl = { class: "card-body px-4 py-2 gap-0" }, Bl = { class: "flex justify-between items-center" }, Hl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), zl = { class: "text-textCustom list-decimal list-outside ml-7 mt-2" }, Ul = ["innerHTML"], Zl = {
|
|
3018
3033
|
__name: "Example",
|
|
3019
3034
|
setup(e) {
|
|
3020
|
-
const o = E(!0), t = he(), n = S(() => t.examples),
|
|
3035
|
+
const o = E(!0), t = he(), n = S(() => t.examples), l = () => {
|
|
3021
3036
|
o.value = !o.value;
|
|
3022
3037
|
};
|
|
3023
|
-
return (r, i) => (w(),
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
H(
|
|
3038
|
+
return (r, i) => (w(), T("div", Fl, [
|
|
3039
|
+
h("div", jl, [
|
|
3040
|
+
h("div", Bl, [
|
|
3041
|
+
Hl,
|
|
3042
|
+
H(Ge, {
|
|
3028
3043
|
isExpanded: o.value,
|
|
3029
|
-
onClick:
|
|
3044
|
+
onClick: l
|
|
3030
3045
|
}, null, 8, ["isExpanded"])
|
|
3031
3046
|
]),
|
|
3032
|
-
|
|
3047
|
+
h("div", {
|
|
3033
3048
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3034
3049
|
}, [
|
|
3035
|
-
|
|
3036
|
-
(w(!0),
|
|
3037
|
-
key: `${
|
|
3038
|
-
innerHTML:
|
|
3039
|
-
}, null, 8,
|
|
3050
|
+
h("ul", zl, [
|
|
3051
|
+
(w(!0), T(Z, null, se(n.value, (s, a) => (w(), T("li", {
|
|
3052
|
+
key: `${s.definition_id}-${a}`,
|
|
3053
|
+
innerHTML: s
|
|
3054
|
+
}, null, 8, Ul))), 128))
|
|
3040
3055
|
])
|
|
3041
3056
|
], 2)
|
|
3042
3057
|
])
|
|
3043
3058
|
]));
|
|
3044
3059
|
}
|
|
3045
|
-
},
|
|
3060
|
+
}, Wl = { class: "card border bg-white rounded-lg" }, Gl = { class: "card-body px-4 py-2 gap-0" }, ql = { class: "flex justify-between items-center" }, Jl = /* @__PURE__ */ h("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), Kl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Yl = { class: "list-none list-inside" }, Ql = { class: "flex flex-wrap" }, Xl = ["onClick"], es = {
|
|
3046
3061
|
__name: "Synonyms",
|
|
3047
3062
|
emits: ["translate"],
|
|
3048
3063
|
setup(e, { emit: o }) {
|
|
3049
|
-
const t = E(!0), n = he(),
|
|
3064
|
+
const t = E(!0), n = he(), l = S(() => n.synonyms), r = o, i = () => {
|
|
3050
3065
|
t.value = !t.value;
|
|
3051
|
-
},
|
|
3066
|
+
}, s = (a) => {
|
|
3052
3067
|
r("translate", a), window.scrollTo(0, 0);
|
|
3053
3068
|
};
|
|
3054
|
-
return (a, u) => (w(),
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
H(
|
|
3069
|
+
return (a, u) => (w(), T("div", Wl, [
|
|
3070
|
+
h("div", Gl, [
|
|
3071
|
+
h("div", ql, [
|
|
3072
|
+
Jl,
|
|
3073
|
+
H(Ge, {
|
|
3059
3074
|
isExpanded: t.value,
|
|
3060
3075
|
onClick: i
|
|
3061
3076
|
}, null, 8, ["isExpanded"])
|
|
3062
3077
|
]),
|
|
3063
|
-
|
|
3078
|
+
h("div", {
|
|
3064
3079
|
class: _e(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3065
3080
|
}, [
|
|
3066
|
-
|
|
3067
|
-
(w(!0),
|
|
3081
|
+
h("ul", null, [
|
|
3082
|
+
(w(!0), T(Z, null, se(l.value, (c, p) => (w(), T("li", {
|
|
3068
3083
|
key: `${c.pos}-${p}`,
|
|
3069
3084
|
class: "mb-2"
|
|
3070
3085
|
}, [
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
(w(!0),
|
|
3086
|
+
h("h5", Kl, te(c.pos), 1),
|
|
3087
|
+
h("ul", Yl, [
|
|
3088
|
+
(w(!0), T(Z, null, se(c.items, (g, x) => (w(), T("li", {
|
|
3074
3089
|
key: `${g.word}-${x}`,
|
|
3075
3090
|
class: "mb-2"
|
|
3076
3091
|
}, [
|
|
3077
|
-
|
|
3078
|
-
(w(!0),
|
|
3092
|
+
h("div", Ql, [
|
|
3093
|
+
(w(!0), T(Z, null, se(g.synonym, (_, v) => (w(), T("span", {
|
|
3079
3094
|
key: `${_}-${v}`,
|
|
3080
3095
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3081
|
-
onClick: (
|
|
3082
|
-
}, te(_), 9,
|
|
3096
|
+
onClick: ($) => s(_)
|
|
3097
|
+
}, te(_), 9, Xl))), 128))
|
|
3083
3098
|
])
|
|
3084
3099
|
]))), 128))
|
|
3085
3100
|
])
|
|
@@ -3090,22 +3105,22 @@ const il = {
|
|
|
3090
3105
|
]));
|
|
3091
3106
|
}
|
|
3092
3107
|
};
|
|
3093
|
-
function
|
|
3108
|
+
function ts() {
|
|
3094
3109
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3095
3110
|
}
|
|
3096
|
-
function
|
|
3111
|
+
function ns() {
|
|
3097
3112
|
document.documentElement.removeAttribute("dir");
|
|
3098
3113
|
}
|
|
3099
|
-
const
|
|
3100
|
-
supportRTL:
|
|
3101
|
-
removeRTL:
|
|
3102
|
-
},
|
|
3114
|
+
const $t = {
|
|
3115
|
+
supportRTL: ts,
|
|
3116
|
+
removeRTL: ns
|
|
3117
|
+
}, os = ["ar", "fa", "iw", "yi", "ur", "pa"], ls = { class: "bg-white min-h-screen flex flex-col" }, ss = { class: "py-2 px-5 shadow-lg" }, rs = { class: "px-5 flex-grow" }, is = { class: "flex flex-col lg:flex-row lg:gap-2" }, as = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, us = /* @__PURE__ */ h("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), cs = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, ds = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, fs = {
|
|
3103
3118
|
key: 0,
|
|
3104
3119
|
class: "w-full my-4"
|
|
3105
|
-
},
|
|
3120
|
+
}, ps = {
|
|
3106
3121
|
key: 1,
|
|
3107
3122
|
class: "text-textCustom italic font-medium"
|
|
3108
|
-
},
|
|
3123
|
+
}, ms = {
|
|
3109
3124
|
__name: "Popup",
|
|
3110
3125
|
props: {
|
|
3111
3126
|
opt: {
|
|
@@ -3139,36 +3154,37 @@ const Ot = {
|
|
|
3139
3154
|
"reader",
|
|
3140
3155
|
"settings",
|
|
3141
3156
|
"fullscreen",
|
|
3157
|
+
"starList",
|
|
3142
3158
|
"loadTTS",
|
|
3143
3159
|
"favorite"
|
|
3144
3160
|
],
|
|
3145
3161
|
setup(e, { emit: o }) {
|
|
3146
|
-
const t =
|
|
3147
|
-
const v =
|
|
3148
|
-
|
|
3162
|
+
const t = m2(), n = he(t), l = fn(t), r = We(t), i = Ze(t), s = e, a = o, u = E(""), c = () => {
|
|
3163
|
+
const v = s.opt.target;
|
|
3164
|
+
os.includes(v) ? $t.supportRTL() : $t.removeRTL();
|
|
3149
3165
|
};
|
|
3150
3166
|
F(
|
|
3151
|
-
() =>
|
|
3167
|
+
() => s.translation,
|
|
3152
3168
|
(v) => {
|
|
3153
|
-
v && (i.loading = !1, u.value = v.text, n.init(v),
|
|
3169
|
+
v && (i.loading = !1, u.value = v.text, n.init(v), l.reset());
|
|
3154
3170
|
},
|
|
3155
3171
|
{ immediate: !0 }
|
|
3156
3172
|
), F(
|
|
3157
|
-
() =>
|
|
3173
|
+
() => s.tts,
|
|
3158
3174
|
(v) => {
|
|
3159
3175
|
if (!v) {
|
|
3160
|
-
|
|
3176
|
+
l.reset();
|
|
3161
3177
|
return;
|
|
3162
3178
|
}
|
|
3163
|
-
|
|
3179
|
+
l.set(v);
|
|
3164
3180
|
},
|
|
3165
3181
|
{ immediate: !0 }
|
|
3166
|
-
), F([() =>
|
|
3167
|
-
r.init(v,
|
|
3168
|
-
}), F([() => r.src, () => r.target], ([v,
|
|
3169
|
-
a("opt", { src: v, target:
|
|
3182
|
+
), F([() => s.opt, () => s.languages], ([v, $]) => {
|
|
3183
|
+
r.init(v, $), c();
|
|
3184
|
+
}), F([() => r.src, () => r.target], ([v, $]) => {
|
|
3185
|
+
a("opt", { src: v, target: $ }), _(u.value);
|
|
3170
3186
|
}), Ce(() => {
|
|
3171
|
-
r.init(
|
|
3187
|
+
r.init(s.opt, s.languages), c();
|
|
3172
3188
|
});
|
|
3173
3189
|
function p() {
|
|
3174
3190
|
u.value = "", n.reset();
|
|
@@ -3177,68 +3193,69 @@ const Ot = {
|
|
|
3177
3193
|
_(v);
|
|
3178
3194
|
}
|
|
3179
3195
|
function x(v) {
|
|
3180
|
-
const
|
|
3181
|
-
a("loadTTS", { type: v, data:
|
|
3196
|
+
const $ = v === "src" ? n.text : n.result;
|
|
3197
|
+
a("loadTTS", { type: v, data: $ });
|
|
3182
3198
|
}
|
|
3183
|
-
function _(v,
|
|
3199
|
+
function _(v, $ = r.src, N = r.target) {
|
|
3184
3200
|
v && (u.value = v, i.loading = !0, a("translate", {
|
|
3185
|
-
src:
|
|
3201
|
+
src: $,
|
|
3186
3202
|
target: N,
|
|
3187
3203
|
text: v
|
|
3188
3204
|
}));
|
|
3189
3205
|
}
|
|
3190
|
-
return (v,
|
|
3206
|
+
return (v, $) => {
|
|
3191
3207
|
var N, I, k, D;
|
|
3192
|
-
return w(),
|
|
3193
|
-
|
|
3194
|
-
H(
|
|
3195
|
-
onReader:
|
|
3196
|
-
onSettings:
|
|
3197
|
-
onFullScreen:
|
|
3208
|
+
return w(), T("div", ls, [
|
|
3209
|
+
h("div", ss, [
|
|
3210
|
+
H(Hn, {
|
|
3211
|
+
onReader: $[0] || ($[0] = (m) => a("reader")),
|
|
3212
|
+
onSettings: $[1] || ($[1] = (m) => a("settings")),
|
|
3213
|
+
onFullScreen: $[2] || ($[2] = (m) => a("fullscreen")),
|
|
3214
|
+
onStarList: $[3] || ($[3] = (m) => a("starList"))
|
|
3198
3215
|
})
|
|
3199
3216
|
]),
|
|
3200
|
-
|
|
3201
|
-
H(
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
H(
|
|
3217
|
+
h("div", rs, [
|
|
3218
|
+
H(T2, { class: "my-4" }),
|
|
3219
|
+
h("div", is, [
|
|
3220
|
+
h("div", as, [
|
|
3221
|
+
H(vl, {
|
|
3205
3222
|
text: u.value,
|
|
3206
3223
|
onChange: g,
|
|
3207
3224
|
onClear: p,
|
|
3208
|
-
onLoadTTS:
|
|
3225
|
+
onLoadTTS: $[4] || ($[4] = (m) => x("src"))
|
|
3209
3226
|
}, null, 8, ["text"])
|
|
3210
3227
|
]),
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
H(
|
|
3228
|
+
us,
|
|
3229
|
+
h("div", cs, [
|
|
3230
|
+
H(xl, {
|
|
3214
3231
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3215
3232
|
isFavorite: e.isFavorite,
|
|
3216
|
-
onFavorite:
|
|
3217
|
-
onLoadTTS:
|
|
3233
|
+
onFavorite: $[5] || ($[5] = (m) => a("favorite")),
|
|
3234
|
+
onLoadTTS: $[6] || ($[6] = (m) => x("target"))
|
|
3218
3235
|
}, null, 8, ["isFavoriteFeatureEnabled", "isFavorite"])
|
|
3219
3236
|
])
|
|
3220
3237
|
]),
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
(N = V(n).dictionary) != null && N.length ? (w(), ee(
|
|
3238
|
+
s.translation ? (w(), T(Z, { key: 0 }, [
|
|
3239
|
+
h("div", ds, [
|
|
3240
|
+
(N = V(n).dictionary) != null && N.length ? (w(), ee(Il, {
|
|
3224
3241
|
key: 0,
|
|
3225
3242
|
onTranslate: _
|
|
3226
3243
|
})) : X("", !0),
|
|
3227
|
-
(I = V(n).definitions) != null && I.length ? (w(), ee(
|
|
3228
|
-
(k = V(n).synonyms) != null && k.length ? (w(), ee(
|
|
3244
|
+
(I = V(n).definitions) != null && I.length ? (w(), ee(Al, { key: 1 })) : X("", !0),
|
|
3245
|
+
(k = V(n).synonyms) != null && k.length ? (w(), ee(es, {
|
|
3229
3246
|
key: 2,
|
|
3230
3247
|
onTranslate: _
|
|
3231
3248
|
})) : X("", !0)
|
|
3232
3249
|
]),
|
|
3233
|
-
(D = V(n).examples) != null && D.length ? (w(),
|
|
3234
|
-
H(
|
|
3250
|
+
(D = V(n).examples) != null && D.length ? (w(), T("div", fs, [
|
|
3251
|
+
H(Zl)
|
|
3235
3252
|
])) : X("", !0)
|
|
3236
|
-
], 64)) : (w(),
|
|
3253
|
+
], 64)) : (w(), T("span", ps, "Service unavailable"))
|
|
3237
3254
|
])
|
|
3238
3255
|
]);
|
|
3239
3256
|
};
|
|
3240
3257
|
}
|
|
3241
3258
|
};
|
|
3242
3259
|
export {
|
|
3243
|
-
|
|
3260
|
+
ms as default
|
|
3244
3261
|
};
|