@ddict/popup 1.1.0 → 1.2.1
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/ai-explain-filled.svg +1 -0
- package/dist/assets/icons/ai-explain.svg +1 -0
- package/dist/assets/icons/{ai.svg → ai-translate.svg} +3 -3
- package/dist/assets/icons/copy.svg +3 -3
- package/dist/popup.css +1 -1
- package/dist/popup.es.js +1324 -1194
- package/dist/popup.umd.js +8 -7
- package/package.json +1 -1
- /package/dist/assets/icons/{ai-filled.svg → ai-translate-filled.svg} +0 -0
package/dist/popup.es.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const x2 = "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", y2 = "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", w2 = "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", _2 = "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", S2 = "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", E2 = { class: "flex justify-between" }, O2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
1
|
+
import { openBlock as C, createElementBlock as O, createElementVNode as v, computed as E, unref as L, shallowRef as v2, watch as j, triggerRef as ut, onScopeDispose as tt, ref as $, onUnmounted as nt, inject as Te, watchEffect as re, onMounted as ye, cloneVNode as It, h as Ee, Fragment as J, defineComponent as ue, provide as ot, reactive as $t, nextTick as te, toRaw as X, effectScope as Tt, markRaw as fe, hasInjectionContext as h2, getCurrentInstance as Lt, isRef as xe, isReactive as lt, toRef as Ge, getCurrentScope as Mt, toRefs as ct, mergeModels as m2, useModel as b2, createBlock as G, withCtx as Ae, createVNode as N, renderList as oe, normalizeClass as B, toDisplayString as ne, createCommentVNode as Z, withModifiers as dt, createTextVNode as g2, withDirectives as At, vModelText as Vt, pushScopeId as C2, popScopeId as x2 } from "vue";
|
|
2
|
+
const y2 = "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", w2 = "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", _2 = "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", S2 = "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", E2 = "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", O2 = { class: "flex justify-between" }, I2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ v("img", {
|
|
4
|
-
src:
|
|
4
|
+
src: y2,
|
|
5
5
|
alt: "Vue logo",
|
|
6
6
|
class: "w-24"
|
|
7
7
|
})
|
|
8
|
-
], -1),
|
|
8
|
+
], -1), $2 = { class: "flex" }, T2 = {
|
|
9
9
|
class: "tooltip tooltip-bottom before:!bg-baseColor 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
10
|
"data-tip": "Saved Words"
|
|
11
|
-
},
|
|
12
|
-
src:
|
|
11
|
+
}, L2 = /* @__PURE__ */ v("img", {
|
|
12
|
+
src: w2,
|
|
13
13
|
alt: "Star list",
|
|
14
14
|
class: "w-7"
|
|
15
|
-
}, null, -1),
|
|
16
|
-
|
|
17
|
-
],
|
|
15
|
+
}, null, -1), M2 = [
|
|
16
|
+
L2
|
|
17
|
+
], A2 = {
|
|
18
18
|
class: "tooltip tooltip-bottom before:!bg-baseColor 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%]",
|
|
19
19
|
"data-tip": "Reader"
|
|
20
20
|
}, V2 = /* @__PURE__ */ v("img", {
|
|
21
|
-
src:
|
|
21
|
+
src: _2,
|
|
22
22
|
alt: "Reader",
|
|
23
23
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
24
|
+
}, null, -1), k2 = [
|
|
25
25
|
V2
|
|
26
26
|
], F2 = {
|
|
27
27
|
class: "tooltip tooltip-bottom before:!bg-baseColor 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",
|
|
28
28
|
"data-tip": "Full screen"
|
|
29
29
|
}, P2 = /* @__PURE__ */ v("img", {
|
|
30
|
-
src:
|
|
30
|
+
src: S2,
|
|
31
31
|
alt: "Full screen",
|
|
32
32
|
class: "w-7"
|
|
33
33
|
}, null, -1), R2 = [
|
|
34
34
|
P2
|
|
35
|
-
],
|
|
35
|
+
], D2 = {
|
|
36
36
|
class: "tooltip tooltip-bottom before:!bg-baseColor 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%]",
|
|
37
37
|
"data-tip": "Settings"
|
|
38
|
-
},
|
|
39
|
-
src:
|
|
38
|
+
}, N2 = /* @__PURE__ */ v("img", {
|
|
39
|
+
src: E2,
|
|
40
40
|
alt: "Setting",
|
|
41
41
|
class: "w-7"
|
|
42
|
-
}, null, -1),
|
|
43
|
-
|
|
44
|
-
],
|
|
42
|
+
}, null, -1), B2 = [
|
|
43
|
+
N2
|
|
44
|
+
], j2 = {
|
|
45
45
|
__name: "Header",
|
|
46
46
|
emits: ["settings", "fullScreen", "reader", "starList"],
|
|
47
47
|
setup(e, { emit: o }) {
|
|
48
48
|
const t = o;
|
|
49
|
-
return (n, l) => (
|
|
50
|
-
|
|
51
|
-
v("div",
|
|
52
|
-
v("div",
|
|
49
|
+
return (n, l) => (C(), O("div", O2, [
|
|
50
|
+
I2,
|
|
51
|
+
v("div", $2, [
|
|
52
|
+
v("div", T2, [
|
|
53
53
|
v("button", {
|
|
54
54
|
class: "btn btn-ghost btn-circle",
|
|
55
|
-
onClick: l[0] || (l[0] = (
|
|
56
|
-
},
|
|
55
|
+
onClick: l[0] || (l[0] = (a) => t("starList"))
|
|
56
|
+
}, M2)
|
|
57
57
|
]),
|
|
58
|
-
v("div",
|
|
58
|
+
v("div", A2, [
|
|
59
59
|
v("button", {
|
|
60
60
|
class: "btn btn-ghost btn-circle",
|
|
61
|
-
onClick: l[1] || (l[1] = (
|
|
62
|
-
},
|
|
61
|
+
onClick: l[1] || (l[1] = (a) => t("reader"))
|
|
62
|
+
}, k2)
|
|
63
63
|
]),
|
|
64
64
|
v("div", F2, [
|
|
65
65
|
v("button", {
|
|
66
66
|
class: "btn btn-ghost btn-circle",
|
|
67
|
-
onClick: l[2] || (l[2] = (
|
|
67
|
+
onClick: l[2] || (l[2] = (a) => t("fullScreen"))
|
|
68
68
|
}, R2)
|
|
69
69
|
]),
|
|
70
|
-
v("div",
|
|
70
|
+
v("div", D2, [
|
|
71
71
|
v("button", {
|
|
72
72
|
class: "btn btn-ghost btn-circle",
|
|
73
|
-
onClick: l[3] || (l[3] = (
|
|
74
|
-
},
|
|
73
|
+
onClick: l[3] || (l[3] = (a) => t("settings"))
|
|
74
|
+
}, B2)
|
|
75
75
|
])
|
|
76
76
|
])
|
|
77
77
|
]));
|
|
@@ -80,28 +80,28 @@ const x2 = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
80
80
|
function we(e, o, t) {
|
|
81
81
|
let n = t.initialDeps ?? [], l;
|
|
82
82
|
return () => {
|
|
83
|
-
var
|
|
83
|
+
var a, i, s, r;
|
|
84
84
|
let u;
|
|
85
|
-
t.key && ((
|
|
85
|
+
t.key && ((a = t.debug) != null && a.call(t)) && (u = Date.now());
|
|
86
86
|
const c = e();
|
|
87
|
-
if (!(c.length !== n.length || c.some((
|
|
87
|
+
if (!(c.length !== n.length || c.some((w, m) => n[m] !== w)))
|
|
88
88
|
return l;
|
|
89
89
|
n = c;
|
|
90
|
-
let
|
|
91
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
92
|
-
const
|
|
93
|
-
for (
|
|
94
|
-
|
|
95
|
-
return
|
|
90
|
+
let b;
|
|
91
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (b = Date.now()), l = o(...c), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
92
|
+
const w = Math.round((Date.now() - u) * 100) / 100, m = Math.round((Date.now() - b) * 100) / 100, _ = m / 16, P = (I, x) => {
|
|
93
|
+
for (I = String(I); I.length < x; )
|
|
94
|
+
I = " " + I;
|
|
95
|
+
return I;
|
|
96
96
|
};
|
|
97
97
|
console.info(
|
|
98
|
-
`%c⏱ ${
|
|
98
|
+
`%c⏱ ${P(m, 5)} /${P(w, 5)} ms`,
|
|
99
99
|
`
|
|
100
100
|
font-size: .6rem;
|
|
101
101
|
font-weight: bold;
|
|
102
102
|
color: hsl(${Math.max(
|
|
103
103
|
0,
|
|
104
|
-
Math.min(120 - 120 *
|
|
104
|
+
Math.min(120 - 120 * _, 120)
|
|
105
105
|
)}deg 100% 31%);`,
|
|
106
106
|
t == null ? void 0 : t.key
|
|
107
107
|
);
|
|
@@ -114,17 +114,17 @@ function qe(e, o) {
|
|
|
114
114
|
throw new Error("Unexpected undefined");
|
|
115
115
|
return e;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
117
|
+
const H2 = (e, o) => Math.abs(e - o) < 1, z2 = (e, o, t) => {
|
|
118
118
|
let n;
|
|
119
119
|
return function(...l) {
|
|
120
120
|
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
121
121
|
};
|
|
122
|
-
},
|
|
122
|
+
}, U2 = (e) => e, Z2 = (e) => {
|
|
123
123
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
124
124
|
for (let l = o; l <= t; l++)
|
|
125
125
|
n.push(l);
|
|
126
126
|
return n;
|
|
127
|
-
},
|
|
127
|
+
}, W2 = (e, o) => {
|
|
128
128
|
const t = e.scrollElement;
|
|
129
129
|
if (!t)
|
|
130
130
|
return;
|
|
@@ -132,16 +132,16 @@ const j2 = (e, o) => Math.abs(e - o) < 1, H2 = (e, o, t) => {
|
|
|
132
132
|
if (!n)
|
|
133
133
|
return;
|
|
134
134
|
const l = (i) => {
|
|
135
|
-
const { width:
|
|
136
|
-
o({ width: Math.round(
|
|
135
|
+
const { width: s, height: r } = i;
|
|
136
|
+
o({ width: Math.round(s), height: Math.round(r) });
|
|
137
137
|
};
|
|
138
138
|
if (l(t.getBoundingClientRect()), !n.ResizeObserver)
|
|
139
139
|
return () => {
|
|
140
140
|
};
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
const r =
|
|
141
|
+
const a = new n.ResizeObserver((i) => {
|
|
142
|
+
const s = i[0];
|
|
143
|
+
if (s != null && s.borderBoxSize) {
|
|
144
|
+
const r = s.borderBoxSize[0];
|
|
145
145
|
if (r) {
|
|
146
146
|
l({ width: r.inlineSize, height: r.blockSize });
|
|
147
147
|
return;
|
|
@@ -149,12 +149,12 @@ const j2 = (e, o) => Math.abs(e - o) < 1, H2 = (e, o, t) => {
|
|
|
149
149
|
}
|
|
150
150
|
l(t.getBoundingClientRect());
|
|
151
151
|
});
|
|
152
|
-
return
|
|
153
|
-
|
|
152
|
+
return a.observe(t, { box: "border-box" }), () => {
|
|
153
|
+
a.unobserve(t);
|
|
154
154
|
};
|
|
155
155
|
}, ft = {
|
|
156
156
|
passive: !0
|
|
157
|
-
},
|
|
157
|
+
}, G2 = typeof window > "u" ? !0 : "onscrollend" in window, q2 = (e, o) => {
|
|
158
158
|
const t = e.scrollElement;
|
|
159
159
|
if (!t)
|
|
160
160
|
return;
|
|
@@ -162,20 +162,20 @@ const j2 = (e, o) => Math.abs(e - o) < 1, H2 = (e, o, t) => {
|
|
|
162
162
|
if (!n)
|
|
163
163
|
return;
|
|
164
164
|
let l = 0;
|
|
165
|
-
const
|
|
166
|
-
} :
|
|
165
|
+
const a = G2 ? () => {
|
|
166
|
+
} : z2(
|
|
167
167
|
n,
|
|
168
168
|
() => {
|
|
169
169
|
o(l, !1);
|
|
170
170
|
},
|
|
171
171
|
e.options.isScrollingResetDelay
|
|
172
172
|
), i = (u) => () => {
|
|
173
|
-
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"],
|
|
174
|
-
},
|
|
175
|
-
return r(), t.addEventListener("scroll",
|
|
176
|
-
t.removeEventListener("scroll",
|
|
173
|
+
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], a(), o(l, u);
|
|
174
|
+
}, s = i(!0), r = i(!1);
|
|
175
|
+
return r(), t.addEventListener("scroll", s, ft), t.addEventListener("scrollend", r, ft), () => {
|
|
176
|
+
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", r);
|
|
177
177
|
};
|
|
178
|
-
},
|
|
178
|
+
}, J2 = (e, o, t) => {
|
|
179
179
|
if (o != null && o.borderBoxSize) {
|
|
180
180
|
const n = o.borderBoxSize[0];
|
|
181
181
|
if (n)
|
|
@@ -186,24 +186,24 @@ const j2 = (e, o) => Math.abs(e - o) < 1, H2 = (e, o, t) => {
|
|
|
186
186
|
return Math.round(
|
|
187
187
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
188
188
|
);
|
|
189
|
-
},
|
|
189
|
+
}, K2 = (e, {
|
|
190
190
|
adjustments: o = 0,
|
|
191
191
|
behavior: t
|
|
192
192
|
}, n) => {
|
|
193
|
-
var l,
|
|
193
|
+
var l, a;
|
|
194
194
|
const i = e + o;
|
|
195
|
-
(
|
|
195
|
+
(a = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || a.call(l, {
|
|
196
196
|
[n.options.horizontal ? "left" : "top"]: i,
|
|
197
197
|
behavior: t
|
|
198
198
|
});
|
|
199
199
|
};
|
|
200
|
-
class
|
|
200
|
+
class Y2 {
|
|
201
201
|
constructor(o) {
|
|
202
202
|
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__ */ (() => {
|
|
203
203
|
let t = null;
|
|
204
204
|
const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
|
|
205
|
-
l.forEach((
|
|
206
|
-
this._measureElement(
|
|
205
|
+
l.forEach((a) => {
|
|
206
|
+
this._measureElement(a.target, a);
|
|
207
207
|
});
|
|
208
208
|
}));
|
|
209
209
|
return {
|
|
@@ -212,12 +212,12 @@ class K2 {
|
|
|
212
212
|
return (l = n()) == null ? void 0 : l.disconnect();
|
|
213
213
|
},
|
|
214
214
|
observe: (l) => {
|
|
215
|
-
var
|
|
216
|
-
return (
|
|
215
|
+
var a;
|
|
216
|
+
return (a = n()) == null ? void 0 : a.observe(l, { box: "border-box" });
|
|
217
217
|
},
|
|
218
218
|
unobserve: (l) => {
|
|
219
|
-
var
|
|
220
|
-
return (
|
|
219
|
+
var a;
|
|
220
|
+
return (a = n()) == null ? void 0 : a.unobserve(l);
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
})(), this.range = null, this.setOptions = (t) => {
|
|
@@ -232,11 +232,11 @@ class K2 {
|
|
|
232
232
|
scrollPaddingStart: 0,
|
|
233
233
|
scrollPaddingEnd: 0,
|
|
234
234
|
horizontal: !1,
|
|
235
|
-
getItemKey:
|
|
236
|
-
rangeExtractor:
|
|
235
|
+
getItemKey: U2,
|
|
236
|
+
rangeExtractor: Z2,
|
|
237
237
|
onChange: () => {
|
|
238
238
|
},
|
|
239
|
-
measureElement:
|
|
239
|
+
measureElement: J2,
|
|
240
240
|
initialRect: { width: 0, height: 0 },
|
|
241
241
|
scrollMargin: 0,
|
|
242
242
|
gap: 0,
|
|
@@ -248,12 +248,12 @@ class K2 {
|
|
|
248
248
|
...t
|
|
249
249
|
};
|
|
250
250
|
}, this.notify = (t, n) => {
|
|
251
|
-
var l,
|
|
252
|
-
const { startIndex: i, endIndex:
|
|
251
|
+
var l, a;
|
|
252
|
+
const { startIndex: i, endIndex: s } = this.range ?? {
|
|
253
253
|
startIndex: void 0,
|
|
254
254
|
endIndex: void 0
|
|
255
255
|
}, r = this.calculateRange();
|
|
256
|
-
(t || i !== (r == null ? void 0 : r.startIndex) ||
|
|
256
|
+
(t || i !== (r == null ? void 0 : r.startIndex) || s !== (r == null ? void 0 : r.endIndex)) && ((a = (l = this.options).onChange) == null || a.call(l, this, n));
|
|
257
257
|
}, this.cleanup = () => {
|
|
258
258
|
this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
|
|
259
259
|
}, this._didMount = () => () => {
|
|
@@ -274,26 +274,26 @@ class K2 {
|
|
|
274
274
|
this.scrollRect = l, this.notify(!1, !1);
|
|
275
275
|
})
|
|
276
276
|
), this.unsubs.push(
|
|
277
|
-
this.options.observeElementOffset(this, (l,
|
|
278
|
-
this.scrollAdjustments = 0, this.scrollDirection =
|
|
277
|
+
this.options.observeElementOffset(this, (l, a) => {
|
|
278
|
+
this.scrollAdjustments = 0, this.scrollDirection = a ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
|
|
279
279
|
const i = this.isScrolling;
|
|
280
|
-
this.isScrolling =
|
|
280
|
+
this.isScrolling = a, this.notify(i !== a, a);
|
|
281
281
|
})
|
|
282
282
|
);
|
|
283
283
|
}
|
|
284
284
|
}, 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) => {
|
|
285
|
-
const l = /* @__PURE__ */ new Map(),
|
|
285
|
+
const l = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
286
286
|
for (let i = n - 1; i >= 0; i--) {
|
|
287
|
-
const
|
|
288
|
-
if (l.has(
|
|
287
|
+
const s = t[i];
|
|
288
|
+
if (l.has(s.lane))
|
|
289
289
|
continue;
|
|
290
|
-
const r =
|
|
291
|
-
|
|
290
|
+
const r = a.get(
|
|
291
|
+
s.lane
|
|
292
292
|
);
|
|
293
|
-
if (r == null ||
|
|
293
|
+
if (r == null || s.end > r.end ? a.set(s.lane, s) : s.end < r.end && l.set(s.lane, !0), l.size === this.options.lanes)
|
|
294
294
|
break;
|
|
295
295
|
}
|
|
296
|
-
return
|
|
296
|
+
return a.size === this.options.lanes ? Array.from(a.values()).sort((i, s) => i.end === s.end ? i.index - s.index : i.end - s.end)[0] : void 0;
|
|
297
297
|
}, this.getMeasurementOptions = we(
|
|
298
298
|
() => [
|
|
299
299
|
this.options.count,
|
|
@@ -302,11 +302,11 @@ class K2 {
|
|
|
302
302
|
this.options.getItemKey,
|
|
303
303
|
this.options.enabled
|
|
304
304
|
],
|
|
305
|
-
(t, n, l,
|
|
305
|
+
(t, n, l, a, i) => (this.pendingMeasuredCacheIndexes = [], {
|
|
306
306
|
count: t,
|
|
307
307
|
paddingStart: n,
|
|
308
308
|
scrollMargin: l,
|
|
309
|
-
getItemKey:
|
|
309
|
+
getItemKey: a,
|
|
310
310
|
enabled: i
|
|
311
311
|
}),
|
|
312
312
|
{
|
|
@@ -314,7 +314,7 @@ class K2 {
|
|
|
314
314
|
}
|
|
315
315
|
), this.getMeasurements = we(
|
|
316
316
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
317
|
-
({ count: t, paddingStart: n, scrollMargin: l, getItemKey:
|
|
317
|
+
({ count: t, paddingStart: n, scrollMargin: l, getItemKey: a, enabled: i }, s) => {
|
|
318
318
|
var r;
|
|
319
319
|
if (!i)
|
|
320
320
|
return this.measurementsCache = [], this.itemSizeCache.clear(), [];
|
|
@@ -325,27 +325,27 @@ class K2 {
|
|
|
325
325
|
this.pendingMeasuredCacheIndexes = [];
|
|
326
326
|
const c = this.measurementsCache.slice(0, u);
|
|
327
327
|
for (let p = u; p < t; p++) {
|
|
328
|
-
let
|
|
329
|
-
|
|
330
|
-
const
|
|
331
|
-
if (!
|
|
332
|
-
M && (this.observer.unobserve(M), this.elementsCache.delete(
|
|
328
|
+
let b = (r = this.measurementsCache[p]) == null ? void 0 : r.measureElement;
|
|
329
|
+
b || (b = (R) => {
|
|
330
|
+
const y = a(p), M = this.elementsCache.get(y);
|
|
331
|
+
if (!R) {
|
|
332
|
+
M && (this.observer.unobserve(M), this.elementsCache.delete(y));
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
M !==
|
|
335
|
+
M !== R && (M && this.observer.unobserve(M), this.observer.observe(R), this.elementsCache.set(y, R)), R.isConnected && this.resizeItem(
|
|
336
336
|
p,
|
|
337
|
-
this.options.measureElement(
|
|
337
|
+
this.options.measureElement(R, void 0, this)
|
|
338
338
|
);
|
|
339
339
|
});
|
|
340
|
-
const
|
|
340
|
+
const w = a(p), m = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), _ = m ? m.end + this.options.gap : n + l, P = s.get(w), I = typeof P == "number" ? P : this.options.estimateSize(p), x = _ + I, V = m ? m.lane : p % this.options.lanes;
|
|
341
341
|
c[p] = {
|
|
342
342
|
index: p,
|
|
343
|
-
start:
|
|
344
|
-
size:
|
|
345
|
-
end:
|
|
346
|
-
key:
|
|
347
|
-
lane:
|
|
348
|
-
measureElement:
|
|
343
|
+
start: _,
|
|
344
|
+
size: I,
|
|
345
|
+
end: x,
|
|
346
|
+
key: w,
|
|
347
|
+
lane: V,
|
|
348
|
+
measureElement: b
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
return this.measurementsCache = c, c;
|
|
@@ -356,7 +356,7 @@ class K2 {
|
|
|
356
356
|
}
|
|
357
357
|
), this.calculateRange = we(
|
|
358
358
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
359
|
-
(t, n, l) => this.range = t.length > 0 && n > 0 ?
|
|
359
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? Q2({
|
|
360
360
|
measurements: t,
|
|
361
361
|
outerSize: n,
|
|
362
362
|
scrollOffset: l
|
|
@@ -372,11 +372,11 @@ class K2 {
|
|
|
372
372
|
this.options.overscan,
|
|
373
373
|
this.options.count
|
|
374
374
|
],
|
|
375
|
-
(t, n, l,
|
|
375
|
+
(t, n, l, a) => n === null ? [] : t({
|
|
376
376
|
startIndex: n.startIndex,
|
|
377
377
|
endIndex: n.endIndex,
|
|
378
378
|
overscan: l,
|
|
379
|
-
count:
|
|
379
|
+
count: a
|
|
380
380
|
}),
|
|
381
381
|
{
|
|
382
382
|
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
@@ -388,20 +388,20 @@ class K2 {
|
|
|
388
388
|
`Missing attribute name '${n}={index}' on measured element.`
|
|
389
389
|
), -1);
|
|
390
390
|
}, this._measureElement = (t, n) => {
|
|
391
|
-
const l = this.indexFromElement(t),
|
|
392
|
-
if (!
|
|
393
|
-
this.elementsCache.forEach((
|
|
394
|
-
|
|
391
|
+
const l = this.indexFromElement(t), a = this.getMeasurements()[l];
|
|
392
|
+
if (!a || !t.isConnected) {
|
|
393
|
+
this.elementsCache.forEach((s, r) => {
|
|
394
|
+
s === t && (this.observer.unobserve(t), this.elementsCache.delete(r));
|
|
395
395
|
});
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
|
-
const i = this.elementsCache.get(
|
|
399
|
-
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(
|
|
398
|
+
const i = this.elementsCache.get(a.key);
|
|
399
|
+
i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(a.key, t)), this.resizeItem(l, this.options.measureElement(t, n, this));
|
|
400
400
|
}, this.resizeItem = (t, n) => {
|
|
401
401
|
const l = this.getMeasurements()[t];
|
|
402
402
|
if (!l)
|
|
403
403
|
return;
|
|
404
|
-
const
|
|
404
|
+
const a = this.itemSizeCache.get(l.key) ?? l.size, i = n - a;
|
|
405
405
|
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(), {
|
|
406
406
|
adjustments: this.scrollAdjustments += i,
|
|
407
407
|
behavior: void 0
|
|
@@ -412,8 +412,8 @@ class K2 {
|
|
|
412
412
|
() => [this.getIndexes(), this.getMeasurements()],
|
|
413
413
|
(t, n) => {
|
|
414
414
|
const l = [];
|
|
415
|
-
for (let
|
|
416
|
-
const
|
|
415
|
+
for (let a = 0, i = t.length; a < i; a++) {
|
|
416
|
+
const s = t[a], r = n[s];
|
|
417
417
|
l.push(r);
|
|
418
418
|
}
|
|
419
419
|
return l;
|
|
@@ -426,7 +426,7 @@ class K2 {
|
|
|
426
426
|
const n = this.getMeasurements();
|
|
427
427
|
if (n.length !== 0)
|
|
428
428
|
return qe(
|
|
429
|
-
n[
|
|
429
|
+
n[kt(
|
|
430
430
|
0,
|
|
431
431
|
n.length - 1,
|
|
432
432
|
(l) => qe(n[l]).start,
|
|
@@ -434,8 +434,8 @@ class K2 {
|
|
|
434
434
|
)]
|
|
435
435
|
);
|
|
436
436
|
}, this.getOffsetForAlignment = (t, n) => {
|
|
437
|
-
const l = this.getSize(),
|
|
438
|
-
n === "auto" && (t <=
|
|
437
|
+
const l = this.getSize(), a = this.getScrollOffset();
|
|
438
|
+
n === "auto" && (t <= a ? n = "start" : t >= a + l ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - l : n === "center" && (t = t - l / 2);
|
|
439
439
|
const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", r = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - l;
|
|
440
440
|
return Math.max(Math.min(r, t), 0);
|
|
441
441
|
}, this.getOffsetForIndex = (t, n = "auto") => {
|
|
@@ -443,16 +443,16 @@ class K2 {
|
|
|
443
443
|
const l = this.getMeasurements()[t];
|
|
444
444
|
if (!l)
|
|
445
445
|
return;
|
|
446
|
-
const
|
|
446
|
+
const a = this.getSize(), i = this.getScrollOffset();
|
|
447
447
|
if (n === "auto")
|
|
448
|
-
if (l.end >= i +
|
|
448
|
+
if (l.end >= i + a - this.options.scrollPaddingEnd)
|
|
449
449
|
n = "end";
|
|
450
450
|
else if (l.start <= i + this.options.scrollPaddingStart)
|
|
451
451
|
n = "start";
|
|
452
452
|
else
|
|
453
453
|
return [i, n];
|
|
454
|
-
const
|
|
455
|
-
return [this.getOffsetForAlignment(
|
|
454
|
+
const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
|
|
455
|
+
return [this.getOffsetForAlignment(s, n), n];
|
|
456
456
|
}, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
|
|
457
457
|
this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
|
|
458
458
|
}, this.scrollToOffset = (t, { align: n = "start", behavior: l } = {}) => {
|
|
@@ -466,19 +466,19 @@ class K2 {
|
|
|
466
466
|
t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
|
|
467
467
|
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
468
468
|
);
|
|
469
|
-
const
|
|
470
|
-
if (!
|
|
471
|
-
const [i,
|
|
469
|
+
const a = this.getOffsetForIndex(t, n);
|
|
470
|
+
if (!a) return;
|
|
471
|
+
const [i, s] = a;
|
|
472
472
|
this._scrollToOffset(i, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
473
473
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
474
474
|
this.options.getItemKey(t)
|
|
475
475
|
)) {
|
|
476
476
|
const [u] = qe(
|
|
477
|
-
this.getOffsetForIndex(t,
|
|
477
|
+
this.getOffsetForIndex(t, s)
|
|
478
478
|
);
|
|
479
|
-
|
|
479
|
+
H2(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
480
480
|
} else
|
|
481
|
-
this.scrollToIndex(t, { align:
|
|
481
|
+
this.scrollToIndex(t, { align: s, behavior: l });
|
|
482
482
|
}));
|
|
483
483
|
}, this.scrollBy = (t, { behavior: n } = {}) => {
|
|
484
484
|
this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
|
|
@@ -492,7 +492,7 @@ class K2 {
|
|
|
492
492
|
const n = this.getMeasurements();
|
|
493
493
|
let l;
|
|
494
494
|
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(
|
|
495
|
-
...n.slice(-this.options.lanes).map((
|
|
495
|
+
...n.slice(-this.options.lanes).map((a) => a.end)
|
|
496
496
|
), l - this.options.scrollMargin + this.options.paddingEnd;
|
|
497
497
|
}, this._scrollToOffset = (t, {
|
|
498
498
|
adjustments: n,
|
|
@@ -505,47 +505,47 @@ class K2 {
|
|
|
505
505
|
}, this.setOptions(o);
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
const
|
|
508
|
+
const kt = (e, o, t, n) => {
|
|
509
509
|
for (; e <= o; ) {
|
|
510
|
-
const l = (e + o) / 2 | 0,
|
|
511
|
-
if (
|
|
510
|
+
const l = (e + o) / 2 | 0, a = t(l);
|
|
511
|
+
if (a < n)
|
|
512
512
|
e = l + 1;
|
|
513
|
-
else if (
|
|
513
|
+
else if (a > n)
|
|
514
514
|
o = l - 1;
|
|
515
515
|
else
|
|
516
516
|
return l;
|
|
517
517
|
}
|
|
518
518
|
return e > 0 ? e - 1 : 0;
|
|
519
519
|
};
|
|
520
|
-
function
|
|
520
|
+
function Q2({
|
|
521
521
|
measurements: e,
|
|
522
522
|
outerSize: o,
|
|
523
523
|
scrollOffset: t
|
|
524
524
|
}) {
|
|
525
|
-
const n = e.length - 1,
|
|
526
|
-
let i =
|
|
525
|
+
const n = e.length - 1, a = kt(0, n, (s) => e[s].start, t);
|
|
526
|
+
let i = a;
|
|
527
527
|
for (; i < n && e[i].end < t + o; )
|
|
528
528
|
i++;
|
|
529
|
-
return { startIndex:
|
|
529
|
+
return { startIndex: a, endIndex: i };
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
const o = new
|
|
533
|
-
return
|
|
534
|
-
() =>
|
|
531
|
+
function X2(e) {
|
|
532
|
+
const o = new Y2(L(e)), t = v2(o), n = o._didMount();
|
|
533
|
+
return j(
|
|
534
|
+
() => L(e).getScrollElement(),
|
|
535
535
|
(l) => {
|
|
536
536
|
l && o._willUpdate();
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
539
|
immediate: !0
|
|
540
540
|
}
|
|
541
|
-
),
|
|
542
|
-
() =>
|
|
541
|
+
), j(
|
|
542
|
+
() => L(e),
|
|
543
543
|
(l) => {
|
|
544
544
|
o.setOptions({
|
|
545
545
|
...l,
|
|
546
|
-
onChange: (
|
|
547
|
-
var
|
|
548
|
-
ut(t), (
|
|
546
|
+
onChange: (a, i) => {
|
|
547
|
+
var s;
|
|
548
|
+
ut(t), (s = l.onChange) == null || s.call(l, a, i);
|
|
549
549
|
}
|
|
550
550
|
}), o._willUpdate(), ut(t);
|
|
551
551
|
},
|
|
@@ -554,30 +554,30 @@ function Q2(e) {
|
|
|
554
554
|
}
|
|
555
555
|
), tt(n), t;
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
return
|
|
559
|
-
|
|
560
|
-
observeElementRect:
|
|
561
|
-
observeElementOffset:
|
|
562
|
-
scrollToFn:
|
|
563
|
-
...
|
|
557
|
+
function e0(e) {
|
|
558
|
+
return X2(
|
|
559
|
+
E(() => ({
|
|
560
|
+
observeElementRect: W2,
|
|
561
|
+
observeElementOffset: q2,
|
|
562
|
+
scrollToFn: K2,
|
|
563
|
+
...L(e)
|
|
564
564
|
}))
|
|
565
565
|
);
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
let n =
|
|
569
|
-
return [
|
|
570
|
-
return l.value || (n.value =
|
|
567
|
+
function t0(e, o, t) {
|
|
568
|
+
let n = $(t == null ? void 0 : t.value), l = E(() => e.value !== void 0);
|
|
569
|
+
return [E(() => l.value ? e.value : n.value), function(a) {
|
|
570
|
+
return l.value || (n.value = a), o == null ? void 0 : o(a);
|
|
571
571
|
}];
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function n0(e) {
|
|
574
574
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
|
|
575
575
|
throw o;
|
|
576
576
|
}));
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
let e = [], o = { addEventListener(t, n, l,
|
|
580
|
-
return t.addEventListener(n, l,
|
|
578
|
+
function De() {
|
|
579
|
+
let e = [], o = { addEventListener(t, n, l, a) {
|
|
580
|
+
return t.addEventListener(n, l, a), o.add(() => t.removeEventListener(n, l, a));
|
|
581
581
|
}, requestAnimationFrame(...t) {
|
|
582
582
|
let n = requestAnimationFrame(...t);
|
|
583
583
|
o.add(() => cancelAnimationFrame(n));
|
|
@@ -590,18 +590,18 @@ function ke() {
|
|
|
590
590
|
o.add(() => clearTimeout(n));
|
|
591
591
|
}, microTask(...t) {
|
|
592
592
|
let n = { current: !0 };
|
|
593
|
-
return
|
|
593
|
+
return n0(() => {
|
|
594
594
|
n.current && t[0]();
|
|
595
595
|
}), o.add(() => {
|
|
596
596
|
n.current = !1;
|
|
597
597
|
});
|
|
598
598
|
}, style(t, n, l) {
|
|
599
|
-
let
|
|
599
|
+
let a = t.style.getPropertyValue(n);
|
|
600
600
|
return Object.assign(t.style, { [n]: l }), this.add(() => {
|
|
601
|
-
Object.assign(t.style, { [n]:
|
|
601
|
+
Object.assign(t.style, { [n]: a });
|
|
602
602
|
});
|
|
603
603
|
}, group(t) {
|
|
604
|
-
let n =
|
|
604
|
+
let n = De();
|
|
605
605
|
return t(n), this.add(() => n.dispose());
|
|
606
606
|
}, add(t) {
|
|
607
607
|
return e.push(t), () => {
|
|
@@ -613,36 +613,36 @@ function ke() {
|
|
|
613
613
|
} };
|
|
614
614
|
return o;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
let e =
|
|
616
|
+
function o0() {
|
|
617
|
+
let e = De();
|
|
618
618
|
return nt(() => e.dispose()), e;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
let e =
|
|
620
|
+
function l0() {
|
|
621
|
+
let e = o0();
|
|
622
622
|
return (o) => {
|
|
623
623
|
e.dispose(), e.nextFrame(o);
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
let
|
|
626
|
+
let s0 = Symbol("headlessui.useid"), a0 = 0;
|
|
627
627
|
function Le() {
|
|
628
|
-
return
|
|
628
|
+
return Te(s0, () => `${++a0}`)();
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function k(e) {
|
|
631
631
|
var o;
|
|
632
632
|
if (e == null || e.value == null) return null;
|
|
633
633
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
634
634
|
return t instanceof Node ? t : null;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function ae(e, o, ...t) {
|
|
637
637
|
if (e in o) {
|
|
638
638
|
let l = o[e];
|
|
639
639
|
return typeof l == "function" ? l(...t) : l;
|
|
640
640
|
}
|
|
641
641
|
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(", ")}.`);
|
|
642
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
642
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, ae), n;
|
|
643
643
|
}
|
|
644
|
-
var
|
|
645
|
-
let
|
|
644
|
+
var i0 = Object.defineProperty, r0 = (e, o, t) => o in e ? i0(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, pt = (e, o, t) => (r0(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
645
|
+
let u0 = class {
|
|
646
646
|
constructor() {
|
|
647
647
|
pt(this, "current", this.detect()), pt(this, "currentId", 0);
|
|
648
648
|
}
|
|
@@ -664,21 +664,21 @@ let r0 = class {
|
|
|
664
664
|
detect() {
|
|
665
665
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
666
666
|
}
|
|
667
|
-
}, st = new
|
|
667
|
+
}, st = new u0();
|
|
668
668
|
function at(e) {
|
|
669
669
|
if (st.isServer) return null;
|
|
670
670
|
if (e instanceof Node) return e.ownerDocument;
|
|
671
671
|
if (e != null && e.hasOwnProperty("value")) {
|
|
672
|
-
let o =
|
|
672
|
+
let o = k(e);
|
|
673
673
|
if (o) return o.ownerDocument;
|
|
674
674
|
}
|
|
675
675
|
return document;
|
|
676
676
|
}
|
|
677
677
|
let vt = ["[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(",");
|
|
678
|
-
var
|
|
679
|
-
function
|
|
678
|
+
var c0 = ((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))(c0 || {}), d0 = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(d0 || {}), f0 = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(f0 || {}), Ft = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Ft || {});
|
|
679
|
+
function p0(e, o = 0) {
|
|
680
680
|
var t;
|
|
681
|
-
return e === ((t = at(e)) == null ? void 0 : t.body) ? !1 :
|
|
681
|
+
return e === ((t = at(e)) == null ? void 0 : t.body) ? !1 : ae(o, { 0() {
|
|
682
682
|
return e.matches(vt);
|
|
683
683
|
}, 1() {
|
|
684
684
|
let n = e;
|
|
@@ -689,84 +689,84 @@ function f0(e, o = 0) {
|
|
|
689
689
|
return !1;
|
|
690
690
|
} });
|
|
691
691
|
}
|
|
692
|
-
var
|
|
692
|
+
var v0 = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(v0 || {});
|
|
693
693
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
694
694
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
695
695
|
}, !0), document.addEventListener("click", (e) => {
|
|
696
696
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
697
697
|
}, !0));
|
|
698
|
-
function
|
|
698
|
+
function h0(e, o = (t) => t) {
|
|
699
699
|
return e.slice().sort((t, n) => {
|
|
700
|
-
let l = o(t),
|
|
701
|
-
if (l === null ||
|
|
702
|
-
let i = l.compareDocumentPosition(
|
|
700
|
+
let l = o(t), a = o(n);
|
|
701
|
+
if (l === null || a === null) return 0;
|
|
702
|
+
let i = l.compareDocumentPosition(a);
|
|
703
703
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
704
704
|
});
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function m0() {
|
|
707
707
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function b0() {
|
|
710
710
|
return /Android/gi.test(window.navigator.userAgent);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
712
|
+
function Pt() {
|
|
713
|
+
return m0() || b0();
|
|
714
714
|
}
|
|
715
715
|
function Ve(e, o, t) {
|
|
716
716
|
st.isServer || re((n) => {
|
|
717
717
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function g0(e, o, t) {
|
|
721
721
|
st.isServer || re((n) => {
|
|
722
722
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
function n(
|
|
727
|
-
if (!t.value ||
|
|
728
|
-
let
|
|
729
|
-
if (
|
|
725
|
+
function C0(e, o, t = E(() => !0)) {
|
|
726
|
+
function n(a, i) {
|
|
727
|
+
if (!t.value || a.defaultPrevented) return;
|
|
728
|
+
let s = i(a);
|
|
729
|
+
if (s === null || !s.getRootNode().contains(s)) return;
|
|
730
730
|
let r = function u(c) {
|
|
731
731
|
return typeof c == "function" ? u(c()) : Array.isArray(c) || c instanceof Set ? c : [c];
|
|
732
732
|
}(e);
|
|
733
733
|
for (let u of r) {
|
|
734
734
|
if (u === null) continue;
|
|
735
|
-
let c = u instanceof HTMLElement ? u :
|
|
736
|
-
if (c != null && c.contains(
|
|
735
|
+
let c = u instanceof HTMLElement ? u : k(u);
|
|
736
|
+
if (c != null && c.contains(s) || a.composed && a.composedPath().includes(c)) return;
|
|
737
737
|
}
|
|
738
|
-
return !
|
|
739
|
-
}
|
|
740
|
-
let l =
|
|
741
|
-
Ve("pointerdown", (
|
|
742
|
-
var i,
|
|
743
|
-
t.value && (l.value = ((
|
|
744
|
-
}, !0), Ve("mousedown", (
|
|
745
|
-
var i,
|
|
746
|
-
t.value && (l.value = ((
|
|
747
|
-
}, !0), Ve("click", (
|
|
748
|
-
|
|
749
|
-
}, !0), Ve("touchend", (
|
|
738
|
+
return !p0(s, Ft.Loose) && s.tabIndex !== -1 && a.preventDefault(), o(a, s);
|
|
739
|
+
}
|
|
740
|
+
let l = $(null);
|
|
741
|
+
Ve("pointerdown", (a) => {
|
|
742
|
+
var i, s;
|
|
743
|
+
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
744
|
+
}, !0), Ve("mousedown", (a) => {
|
|
745
|
+
var i, s;
|
|
746
|
+
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
747
|
+
}, !0), Ve("click", (a) => {
|
|
748
|
+
Pt() || l.value && (n(a, () => l.value), l.value = null);
|
|
749
|
+
}, !0), Ve("touchend", (a) => n(a, () => a.target instanceof HTMLElement ? a.target : null), !0), g0("blur", (a) => n(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
750
750
|
}
|
|
751
751
|
function ht(e, o) {
|
|
752
752
|
if (e) return e;
|
|
753
753
|
let t = o ?? "button";
|
|
754
754
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
let t =
|
|
756
|
+
function x0(e, o) {
|
|
757
|
+
let t = $(ht(e.value.type, e.value.as));
|
|
758
758
|
return ye(() => {
|
|
759
759
|
t.value = ht(e.value.type, e.value.as);
|
|
760
760
|
}), re(() => {
|
|
761
761
|
var n;
|
|
762
|
-
t.value ||
|
|
762
|
+
t.value || k(o) && k(o) instanceof HTMLButtonElement && !((n = k(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
763
763
|
}), t;
|
|
764
764
|
}
|
|
765
765
|
function mt(e) {
|
|
766
766
|
return [e.screenX, e.screenY];
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
let e =
|
|
768
|
+
function y0() {
|
|
769
|
+
let e = $([-1, -1]);
|
|
770
770
|
return { wasMoved(o) {
|
|
771
771
|
let t = mt(o);
|
|
772
772
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
@@ -774,56 +774,56 @@ function x0() {
|
|
|
774
774
|
e.value = mt(o);
|
|
775
775
|
} };
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function w0({ container: e, accept: o, walk: t, enabled: n }) {
|
|
778
778
|
re(() => {
|
|
779
779
|
let l = e.value;
|
|
780
780
|
if (!l || n !== void 0 && !n.value) return;
|
|
781
|
-
let
|
|
782
|
-
if (!
|
|
783
|
-
let i = Object.assign((r) => o(r), { acceptNode: o }),
|
|
784
|
-
for (;
|
|
781
|
+
let a = at(e);
|
|
782
|
+
if (!a) return;
|
|
783
|
+
let i = Object.assign((r) => o(r), { acceptNode: o }), s = a.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
784
|
+
for (; s.nextNode(); ) t(s.currentNode);
|
|
785
785
|
});
|
|
786
786
|
}
|
|
787
|
-
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}),
|
|
787
|
+
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), _0 = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(_0 || {});
|
|
788
788
|
function ve({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
789
|
-
var
|
|
790
|
-
let i = Dt(n, t),
|
|
791
|
-
if (e || o & 2 && i.static) return Je(
|
|
789
|
+
var a;
|
|
790
|
+
let i = Dt(n, t), s = Object.assign(l, { props: i });
|
|
791
|
+
if (e || o & 2 && i.static) return Je(s);
|
|
792
792
|
if (o & 1) {
|
|
793
|
-
let r = (
|
|
794
|
-
return
|
|
793
|
+
let r = (a = i.unmount) == null || a ? 0 : 1;
|
|
794
|
+
return ae(r, { 0() {
|
|
795
795
|
return null;
|
|
796
796
|
}, 1() {
|
|
797
797
|
return Je({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
798
798
|
} });
|
|
799
799
|
}
|
|
800
|
-
return Je(
|
|
800
|
+
return Je(s);
|
|
801
801
|
}
|
|
802
802
|
function Je({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
803
|
-
var
|
|
804
|
-
let { as:
|
|
803
|
+
var a, i;
|
|
804
|
+
let { as: s, ...r } = je(e, ["unmount", "static"]), u = (a = t.default) == null ? void 0 : a.call(t, n), c = {};
|
|
805
805
|
if (n) {
|
|
806
|
-
let p = !1,
|
|
807
|
-
for (let [
|
|
808
|
-
p && (c["data-headlessui-state"] =
|
|
809
|
-
}
|
|
810
|
-
if (
|
|
811
|
-
if (u =
|
|
812
|
-
let [p, ...
|
|
813
|
-
if (!
|
|
814
|
-
`), "", "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((
|
|
806
|
+
let p = !1, b = [];
|
|
807
|
+
for (let [w, m] of Object.entries(n)) typeof m == "boolean" && (p = !0), m === !0 && b.push(w);
|
|
808
|
+
p && (c["data-headlessui-state"] = b.join(" "));
|
|
809
|
+
}
|
|
810
|
+
if (s === "template") {
|
|
811
|
+
if (u = Rt(u ?? []), Object.keys(r).length > 0 || Object.keys(o).length > 0) {
|
|
812
|
+
let [p, ...b] = u ?? [];
|
|
813
|
+
if (!E0(p) || b.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(r).concat(Object.keys(o)).map((_) => _.trim()).filter((_, P, I) => I.indexOf(_) === P).sort((_, P) => _.localeCompare(P)).map((_) => ` - ${_}`).join(`
|
|
814
|
+
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((_) => ` - ${_}`).join(`
|
|
815
815
|
`)].join(`
|
|
816
816
|
`));
|
|
817
|
-
let
|
|
818
|
-
for (let
|
|
819
|
-
return
|
|
817
|
+
let w = Dt((i = p.props) != null ? i : {}, r, c), m = It(p, w, !0);
|
|
818
|
+
for (let _ in w) _.startsWith("on") && (m.props || (m.props = {}), m.props[_] = w[_]);
|
|
819
|
+
return m;
|
|
820
820
|
}
|
|
821
821
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
822
822
|
}
|
|
823
|
-
return Ee(
|
|
823
|
+
return Ee(s, Object.assign({}, r, c), { default: () => u });
|
|
824
824
|
}
|
|
825
|
-
function
|
|
826
|
-
return e.flatMap((o) => o.type ===
|
|
825
|
+
function Rt(e) {
|
|
826
|
+
return e.flatMap((o) => o.type === J ? Rt(o.children) : [o]);
|
|
827
827
|
}
|
|
828
828
|
function Dt(...e) {
|
|
829
829
|
if (e.length === 0) return {};
|
|
@@ -831,91 +831,91 @@ function Dt(...e) {
|
|
|
831
831
|
let o = {}, t = {};
|
|
832
832
|
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];
|
|
833
833
|
if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
|
|
834
|
-
for (let n in t) Object.assign(o, { [n](l, ...
|
|
834
|
+
for (let n in t) Object.assign(o, { [n](l, ...a) {
|
|
835
835
|
let i = t[n];
|
|
836
|
-
for (let
|
|
836
|
+
for (let s of i) {
|
|
837
837
|
if (l instanceof Event && l.defaultPrevented) return;
|
|
838
|
-
|
|
838
|
+
s(l, ...a);
|
|
839
839
|
}
|
|
840
840
|
} });
|
|
841
841
|
return o;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function S0(e) {
|
|
844
844
|
let o = Object.assign({}, e);
|
|
845
845
|
for (let t in o) o[t] === void 0 && delete o[t];
|
|
846
846
|
return o;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function je(e, o = []) {
|
|
849
849
|
let t = Object.assign({}, e);
|
|
850
850
|
for (let n of o) n in t && delete t[n];
|
|
851
851
|
return t;
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function E0(e) {
|
|
854
854
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
855
855
|
}
|
|
856
856
|
var Nt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Nt || {});
|
|
857
|
-
let
|
|
857
|
+
let O0 = ue({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
858
858
|
return () => {
|
|
859
859
|
var n;
|
|
860
|
-
let { features: l, ...
|
|
861
|
-
return ve({ ourProps: i, theirProps:
|
|
860
|
+
let { features: l, ...a } = e, i = { "aria-hidden": (l & 2) === 2 ? !0 : (n = a["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" } } };
|
|
861
|
+
return ve({ ourProps: i, theirProps: a, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
862
862
|
};
|
|
863
863
|
} }), Bt = Symbol("Context");
|
|
864
|
-
var
|
|
865
|
-
function
|
|
866
|
-
return
|
|
864
|
+
var Ie = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(Ie || {});
|
|
865
|
+
function I0() {
|
|
866
|
+
return Te(Bt, null);
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function $0(e) {
|
|
869
869
|
ot(Bt, e);
|
|
870
870
|
}
|
|
871
|
-
var
|
|
872
|
-
function
|
|
871
|
+
var q = ((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))(q || {}), jt = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(jt || {});
|
|
872
|
+
function T0(e) {
|
|
873
873
|
function o() {
|
|
874
874
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
875
875
|
}
|
|
876
876
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
|
|
877
877
|
}
|
|
878
878
|
let de = [];
|
|
879
|
-
|
|
879
|
+
T0(() => {
|
|
880
880
|
function e(o) {
|
|
881
881
|
o.target instanceof HTMLElement && o.target !== document.body && de[0] !== o.target && (de.unshift(o.target), de = de.filter((t) => t != null && t.isConnected), de.splice(10));
|
|
882
882
|
}
|
|
883
883
|
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 });
|
|
884
884
|
});
|
|
885
|
-
function
|
|
885
|
+
function L0(e) {
|
|
886
886
|
throw new Error("Unexpected object: " + e);
|
|
887
887
|
}
|
|
888
|
-
var
|
|
888
|
+
var U = ((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))(U || {});
|
|
889
889
|
function bt(e, o) {
|
|
890
890
|
let t = o.resolveItems();
|
|
891
891
|
if (t.length <= 0) return null;
|
|
892
892
|
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
893
893
|
switch (e.focus) {
|
|
894
894
|
case 0: {
|
|
895
|
-
for (let
|
|
895
|
+
for (let a = 0; a < t.length; ++a) if (!o.resolveDisabled(t[a], a, t)) return a;
|
|
896
896
|
return n;
|
|
897
897
|
}
|
|
898
898
|
case 1: {
|
|
899
899
|
l === -1 && (l = t.length);
|
|
900
|
-
for (let
|
|
900
|
+
for (let a = l - 1; a >= 0; --a) if (!o.resolveDisabled(t[a], a, t)) return a;
|
|
901
901
|
return n;
|
|
902
902
|
}
|
|
903
903
|
case 2: {
|
|
904
|
-
for (let
|
|
904
|
+
for (let a = l + 1; a < t.length; ++a) if (!o.resolveDisabled(t[a], a, t)) return a;
|
|
905
905
|
return n;
|
|
906
906
|
}
|
|
907
907
|
case 3: {
|
|
908
|
-
for (let
|
|
908
|
+
for (let a = t.length - 1; a >= 0; --a) if (!o.resolveDisabled(t[a], a, t)) return a;
|
|
909
909
|
return n;
|
|
910
910
|
}
|
|
911
911
|
case 4: {
|
|
912
|
-
for (let
|
|
912
|
+
for (let a = 0; a < t.length; ++a) if (o.resolveId(t[a], a, t) === e.id) return a;
|
|
913
913
|
return n;
|
|
914
914
|
}
|
|
915
915
|
case 5:
|
|
916
916
|
return null;
|
|
917
917
|
default:
|
|
918
|
-
|
|
918
|
+
L0(e);
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
921
|
function Ht(e = {}, o = null, t = []) {
|
|
@@ -929,13 +929,13 @@ function Ut(e, o, t) {
|
|
|
929
929
|
if (Array.isArray(t)) for (let [n, l] of t.entries()) Ut(e, zt(o, n.toString()), l);
|
|
930
930
|
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, ""]) : Ht(t, o, e);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function M0(e, o) {
|
|
933
933
|
return e === o;
|
|
934
934
|
}
|
|
935
|
-
var
|
|
935
|
+
var A0 = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(A0 || {}), V0 = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(V0 || {}), k0 = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(k0 || {});
|
|
936
936
|
let Zt = Symbol("ComboboxContext");
|
|
937
937
|
function he(e) {
|
|
938
|
-
let o =
|
|
938
|
+
let o = Te(Zt, null);
|
|
939
939
|
if (o === null) {
|
|
940
940
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
941
941
|
throw Error.captureStackTrace && Error.captureStackTrace(t, he), t;
|
|
@@ -943,66 +943,66 @@ function he(e) {
|
|
|
943
943
|
return o;
|
|
944
944
|
}
|
|
945
945
|
let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
946
|
-
let t = he("VirtualProvider"), n =
|
|
947
|
-
let
|
|
948
|
-
if (!
|
|
949
|
-
let r = window.getComputedStyle(
|
|
946
|
+
let t = he("VirtualProvider"), n = E(() => {
|
|
947
|
+
let s = k(t.optionsRef);
|
|
948
|
+
if (!s) return { start: 0, end: 0 };
|
|
949
|
+
let r = window.getComputedStyle(s);
|
|
950
950
|
return { start: parseFloat(r.paddingBlockStart || r.paddingTop), end: parseFloat(r.paddingBlockEnd || r.paddingBottom) };
|
|
951
|
-
}), l =
|
|
951
|
+
}), l = e0(E(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
952
952
|
return 40;
|
|
953
953
|
}, getScrollElement() {
|
|
954
|
-
return
|
|
955
|
-
}, overscan: 12 }))),
|
|
956
|
-
var
|
|
957
|
-
return (
|
|
958
|
-
}), i =
|
|
959
|
-
return
|
|
954
|
+
return k(t.optionsRef);
|
|
955
|
+
}, overscan: 12 }))), a = E(() => {
|
|
956
|
+
var s;
|
|
957
|
+
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
958
|
+
}), i = $(0);
|
|
959
|
+
return j([a], () => {
|
|
960
960
|
i.value += 1;
|
|
961
|
-
}), ot(Wt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (
|
|
962
|
-
if (
|
|
961
|
+
}), ot(Wt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
962
|
+
if (s) {
|
|
963
963
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
964
964
|
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
965
965
|
}
|
|
966
|
-
} }, l.value.getVirtualItems().map((
|
|
966
|
+
} }, l.value.getVirtualItems().map((s) => It(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" } })))];
|
|
967
967
|
} }), P0 = ue({ 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 }) {
|
|
968
|
-
let l =
|
|
969
|
-
function
|
|
970
|
-
let f = p.value !== null ? c.value[p.value] : null,
|
|
971
|
-
return
|
|
968
|
+
let l = $(1), a = $(null), i = $(null), s = $(null), r = $(null), u = $({ static: !1, hold: !1 }), c = $([]), p = $(null), b = $(2), w = $(!1);
|
|
969
|
+
function m(d = (f) => f) {
|
|
970
|
+
let f = p.value !== null ? c.value[p.value] : null, S = d(c.value.slice()), T = S.length > 0 && S[0].dataRef.order.value !== null ? S.sort((D, K) => D.dataRef.order.value - K.dataRef.order.value) : h0(S, (D) => k(D.dataRef.domRef)), F = f ? T.indexOf(f) : null;
|
|
971
|
+
return F === -1 && (F = null), { options: T, activeOptionIndex: F };
|
|
972
972
|
}
|
|
973
|
-
let
|
|
973
|
+
let _ = E(() => e.multiple ? 1 : 0), P = E(() => e.nullable), [I, x] = t0(E(() => e.modelValue), (d) => n("update:modelValue", d), E(() => e.defaultValue)), V = E(() => I.value === void 0 ? ae(_.value, { 1: [], 0: void 0 }) : I.value), R = null, y = null;
|
|
974
974
|
function M(d) {
|
|
975
|
-
return
|
|
976
|
-
return
|
|
975
|
+
return ae(_.value, { 0() {
|
|
976
|
+
return x == null ? void 0 : x(d);
|
|
977
977
|
}, 1: () => {
|
|
978
|
-
let f =
|
|
979
|
-
return
|
|
978
|
+
let f = X(h.value.value).slice(), S = X(d), T = f.findIndex((F) => h.compare(S, X(F)));
|
|
979
|
+
return T === -1 ? f.push(S) : f.splice(T, 1), x == null ? void 0 : x(f);
|
|
980
980
|
} });
|
|
981
981
|
}
|
|
982
|
-
let
|
|
982
|
+
let g = E(() => {
|
|
983
983
|
});
|
|
984
|
-
|
|
985
|
-
if (
|
|
986
|
-
let
|
|
987
|
-
|
|
984
|
+
j([g], ([d], [f]) => {
|
|
985
|
+
if (h.virtual.value && d && f && p.value !== null) {
|
|
986
|
+
let S = d.indexOf(f[p.value]);
|
|
987
|
+
S !== -1 ? p.value = S : p.value = null;
|
|
988
988
|
}
|
|
989
989
|
});
|
|
990
|
-
let
|
|
990
|
+
let h = { comboboxState: l, value: V, mode: _, compare(d, f) {
|
|
991
991
|
if (typeof e.by == "string") {
|
|
992
|
-
let
|
|
993
|
-
return (d == null ? void 0 : d[
|
|
992
|
+
let S = e.by;
|
|
993
|
+
return (d == null ? void 0 : d[S]) === (f == null ? void 0 : f[S]);
|
|
994
994
|
}
|
|
995
|
-
return e.by === null ?
|
|
995
|
+
return e.by === null ? M0(d, f) : e.by(d, f);
|
|
996
996
|
}, calculateIndex(d) {
|
|
997
|
-
return
|
|
998
|
-
}, defaultValue:
|
|
999
|
-
|
|
1000
|
-
}, activeOptionIndex:
|
|
1001
|
-
if (
|
|
1002
|
-
if (
|
|
1003
|
-
let f =
|
|
1004
|
-
var
|
|
1005
|
-
return !((
|
|
997
|
+
return h.virtual.value ? e.by === null ? h.virtual.value.options.indexOf(d) : h.virtual.value.options.findIndex((f) => h.compare(f, d)) : c.value.findIndex((f) => h.compare(f.dataRef.value, d));
|
|
998
|
+
}, defaultValue: E(() => e.defaultValue), nullable: P, immediate: E(() => !1), virtual: E(() => null), inputRef: i, labelRef: a, buttonRef: s, optionsRef: r, disabled: E(() => e.disabled), options: c, change(d) {
|
|
999
|
+
x(d);
|
|
1000
|
+
}, activeOptionIndex: E(() => {
|
|
1001
|
+
if (w.value && p.value === null && (h.virtual.value ? h.virtual.value.options.length > 0 : c.value.length > 0)) {
|
|
1002
|
+
if (h.virtual.value) {
|
|
1003
|
+
let f = h.virtual.value.options.findIndex((S) => {
|
|
1004
|
+
var T;
|
|
1005
|
+
return !((T = h.virtual.value) != null && T.disabled(S));
|
|
1006
1006
|
});
|
|
1007
1007
|
if (f !== -1) return f;
|
|
1008
1008
|
}
|
|
@@ -1010,92 +1010,92 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1010
1010
|
if (d !== -1) return d;
|
|
1011
1011
|
}
|
|
1012
1012
|
return p.value;
|
|
1013
|
-
}), activationTrigger:
|
|
1014
|
-
|
|
1013
|
+
}), activationTrigger: b, optionsPropsRef: u, closeCombobox() {
|
|
1014
|
+
w.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, p.value = null);
|
|
1015
1015
|
}, openCombobox() {
|
|
1016
|
-
if (
|
|
1017
|
-
if (
|
|
1018
|
-
let d =
|
|
1016
|
+
if (w.value = !0, !e.disabled && l.value !== 0) {
|
|
1017
|
+
if (h.value.value) {
|
|
1018
|
+
let d = h.calculateIndex(h.value.value);
|
|
1019
1019
|
d !== -1 && (p.value = d);
|
|
1020
1020
|
}
|
|
1021
1021
|
l.value = 0;
|
|
1022
1022
|
}
|
|
1023
1023
|
}, setActivationTrigger(d) {
|
|
1024
|
-
|
|
1025
|
-
}, goToOption(d, f,
|
|
1026
|
-
|
|
1024
|
+
b.value = d;
|
|
1025
|
+
}, goToOption(d, f, S) {
|
|
1026
|
+
w.value = !1, R !== null && cancelAnimationFrame(R), R = requestAnimationFrame(() => {
|
|
1027
1027
|
if (e.disabled || r.value && !u.value.static && l.value === 1) return;
|
|
1028
|
-
if (
|
|
1029
|
-
p.value = d ===
|
|
1030
|
-
var D,
|
|
1031
|
-
return (
|
|
1032
|
-
var
|
|
1033
|
-
return !((
|
|
1034
|
-
})) != null ?
|
|
1035
|
-
}, resolveDisabled: (D) =>
|
|
1028
|
+
if (h.virtual.value) {
|
|
1029
|
+
p.value = d === U.Specific ? f : bt({ focus: d }, { resolveItems: () => h.virtual.value.options, resolveActiveIndex: () => {
|
|
1030
|
+
var D, K;
|
|
1031
|
+
return (K = (D = h.activeOptionIndex.value) != null ? D : h.virtual.value.options.findIndex((Y) => {
|
|
1032
|
+
var H;
|
|
1033
|
+
return !((H = h.virtual.value) != null && H.disabled(Y));
|
|
1034
|
+
})) != null ? K : null;
|
|
1035
|
+
}, resolveDisabled: (D) => h.virtual.value.disabled(D), resolveId() {
|
|
1036
1036
|
throw new Error("Function not implemented.");
|
|
1037
|
-
} }),
|
|
1037
|
+
} }), b.value = S ?? 2;
|
|
1038
1038
|
return;
|
|
1039
1039
|
}
|
|
1040
|
-
let
|
|
1041
|
-
if (
|
|
1042
|
-
let D =
|
|
1043
|
-
D !== -1 && (
|
|
1040
|
+
let T = m();
|
|
1041
|
+
if (T.activeOptionIndex === null) {
|
|
1042
|
+
let D = T.options.findIndex((K) => !K.dataRef.disabled);
|
|
1043
|
+
D !== -1 && (T.activeOptionIndex = D);
|
|
1044
1044
|
}
|
|
1045
|
-
let
|
|
1046
|
-
p.value =
|
|
1045
|
+
let F = d === U.Specific ? f : bt({ focus: d }, { resolveItems: () => T.options, resolveActiveIndex: () => T.activeOptionIndex, resolveId: (D) => D.id, resolveDisabled: (D) => D.dataRef.disabled });
|
|
1046
|
+
p.value = F, b.value = S ?? 2, c.value = T.options;
|
|
1047
1047
|
});
|
|
1048
1048
|
}, selectOption(d) {
|
|
1049
|
-
let f = c.value.find((
|
|
1049
|
+
let f = c.value.find((T) => T.id === d);
|
|
1050
1050
|
if (!f) return;
|
|
1051
|
-
let { dataRef:
|
|
1052
|
-
M(
|
|
1051
|
+
let { dataRef: S } = f;
|
|
1052
|
+
M(S.value);
|
|
1053
1053
|
}, selectActiveOption() {
|
|
1054
|
-
if (
|
|
1055
|
-
if (
|
|
1054
|
+
if (h.activeOptionIndex.value !== null) {
|
|
1055
|
+
if (h.virtual.value) M(h.virtual.value.options[h.activeOptionIndex.value]);
|
|
1056
1056
|
else {
|
|
1057
|
-
let { dataRef: d } = c.value[
|
|
1057
|
+
let { dataRef: d } = c.value[h.activeOptionIndex.value];
|
|
1058
1058
|
M(d.value);
|
|
1059
1059
|
}
|
|
1060
|
-
|
|
1060
|
+
h.goToOption(U.Specific, h.activeOptionIndex.value);
|
|
1061
1061
|
}
|
|
1062
1062
|
}, registerOption(d, f) {
|
|
1063
|
-
let
|
|
1064
|
-
if (
|
|
1065
|
-
c.value.push(
|
|
1063
|
+
let S = $t({ id: d, dataRef: f });
|
|
1064
|
+
if (h.virtual.value) {
|
|
1065
|
+
c.value.push(S);
|
|
1066
1066
|
return;
|
|
1067
1067
|
}
|
|
1068
|
-
|
|
1069
|
-
let
|
|
1070
|
-
p.value === null &&
|
|
1071
|
-
let
|
|
1072
|
-
c.value =
|
|
1068
|
+
y && cancelAnimationFrame(y);
|
|
1069
|
+
let T = m((F) => (F.push(S), F));
|
|
1070
|
+
p.value === null && h.isSelected(f.value.value) && (T.activeOptionIndex = T.options.indexOf(S)), c.value = T.options, p.value = T.activeOptionIndex, b.value = 2, T.options.some((F) => !k(F.dataRef.domRef)) && (y = requestAnimationFrame(() => {
|
|
1071
|
+
let F = m();
|
|
1072
|
+
c.value = F.options, p.value = F.activeOptionIndex;
|
|
1073
1073
|
}));
|
|
1074
1074
|
}, unregisterOption(d, f) {
|
|
1075
|
-
if (
|
|
1076
|
-
c.value = c.value.filter((
|
|
1075
|
+
if (R !== null && cancelAnimationFrame(R), f && (w.value = !0), h.virtual.value) {
|
|
1076
|
+
c.value = c.value.filter((T) => T.id !== d);
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
let
|
|
1080
|
-
let
|
|
1081
|
-
return
|
|
1079
|
+
let S = m((T) => {
|
|
1080
|
+
let F = T.findIndex((D) => D.id === d);
|
|
1081
|
+
return F !== -1 && T.splice(F, 1), T;
|
|
1082
1082
|
});
|
|
1083
|
-
c.value =
|
|
1083
|
+
c.value = S.options, p.value = S.activeOptionIndex, b.value = 2;
|
|
1084
1084
|
}, isSelected(d) {
|
|
1085
|
-
return
|
|
1085
|
+
return ae(_.value, { 0: () => h.compare(X(h.value.value), X(d)), 1: () => X(h.value.value).some((f) => h.compare(X(f), X(d))) });
|
|
1086
1086
|
}, isActive(d) {
|
|
1087
|
-
return p.value ===
|
|
1087
|
+
return p.value === h.calculateIndex(d);
|
|
1088
1088
|
} };
|
|
1089
|
-
|
|
1090
|
-
let A =
|
|
1089
|
+
C0([i, s, r], () => h.closeCombobox(), E(() => l.value === 0)), ot(Zt, h), $0(E(() => ae(l.value, { 0: Ie.Open, 1: Ie.Closed })));
|
|
1090
|
+
let A = E(() => {
|
|
1091
1091
|
var d;
|
|
1092
|
-
return (d =
|
|
1092
|
+
return (d = k(i)) == null ? void 0 : d.closest("form");
|
|
1093
1093
|
});
|
|
1094
1094
|
return ye(() => {
|
|
1095
|
-
|
|
1095
|
+
j([A], () => {
|
|
1096
1096
|
if (!A.value || e.defaultValue === void 0) return;
|
|
1097
1097
|
function d() {
|
|
1098
|
-
|
|
1098
|
+
h.change(e.defaultValue);
|
|
1099
1099
|
}
|
|
1100
1100
|
return A.value.addEventListener("reset", d), () => {
|
|
1101
1101
|
var f;
|
|
@@ -1103,181 +1103,181 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1103
1103
|
};
|
|
1104
1104
|
}, { immediate: !0 });
|
|
1105
1105
|
}), () => {
|
|
1106
|
-
var d, f,
|
|
1107
|
-
let { name:
|
|
1108
|
-
return Ee(
|
|
1106
|
+
var d, f, S;
|
|
1107
|
+
let { name: T, disabled: F, form: D, ...K } = e, Y = { open: l.value === 0, disabled: F, activeIndex: h.activeOptionIndex.value, activeOption: h.activeOptionIndex.value === null ? null : h.virtual.value ? h.virtual.value.options[(d = h.activeOptionIndex.value) != null ? d : 0] : (S = (f = h.options.value[h.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? S : null, value: V.value };
|
|
1108
|
+
return Ee(J, [...T != null && V.value != null ? Ht({ [T]: V.value }).map(([H, p2]) => Ee(O0, S0({ features: Nt.Hidden, key: H, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: D, disabled: F, name: H, value: p2 }))) : [], ve({ theirProps: { ...t, ...je(K, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: Y, slots: o, attrs: t, name: "Combobox" })]);
|
|
1109
1109
|
};
|
|
1110
1110
|
} });
|
|
1111
1111
|
ue({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1112
1112
|
var n;
|
|
1113
|
-
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`,
|
|
1113
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, a = he("ComboboxLabel");
|
|
1114
1114
|
function i() {
|
|
1115
|
-
var
|
|
1116
|
-
(
|
|
1115
|
+
var s;
|
|
1116
|
+
(s = k(a.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1117
1117
|
}
|
|
1118
1118
|
return () => {
|
|
1119
|
-
let
|
|
1120
|
-
return ve({ ourProps: u, theirProps: r, slot:
|
|
1119
|
+
let s = { open: a.comboboxState.value === 0, disabled: a.disabled.value }, { ...r } = e, u = { id: l, ref: a.labelRef, onClick: i };
|
|
1120
|
+
return ve({ ourProps: u, theirProps: r, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1121
1121
|
};
|
|
1122
1122
|
} });
|
|
1123
1123
|
let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1124
1124
|
var l;
|
|
1125
|
-
let
|
|
1125
|
+
let a = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i = he("ComboboxButton");
|
|
1126
1126
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1127
|
-
function
|
|
1128
|
-
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()),
|
|
1127
|
+
function s(c) {
|
|
1128
|
+
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), te(() => {
|
|
1129
1129
|
var p;
|
|
1130
|
-
return (p =
|
|
1130
|
+
return (p = k(i.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1131
1131
|
}));
|
|
1132
1132
|
}
|
|
1133
1133
|
function r(c) {
|
|
1134
1134
|
switch (c.key) {
|
|
1135
|
-
case
|
|
1136
|
-
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(),
|
|
1135
|
+
case q.ArrowDown:
|
|
1136
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), te(() => {
|
|
1137
1137
|
var p;
|
|
1138
1138
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1139
1139
|
});
|
|
1140
1140
|
return;
|
|
1141
|
-
case
|
|
1142
|
-
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(),
|
|
1143
|
-
i.value.value || i.goToOption(
|
|
1144
|
-
})),
|
|
1141
|
+
case q.ArrowUp:
|
|
1142
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), te(() => {
|
|
1143
|
+
i.value.value || i.goToOption(U.Last);
|
|
1144
|
+
})), te(() => {
|
|
1145
1145
|
var p;
|
|
1146
1146
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1147
1147
|
});
|
|
1148
1148
|
return;
|
|
1149
|
-
case
|
|
1149
|
+
case q.Escape:
|
|
1150
1150
|
if (i.comboboxState.value !== 0) return;
|
|
1151
|
-
c.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && c.stopPropagation(), i.closeCombobox(),
|
|
1151
|
+
c.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && c.stopPropagation(), i.closeCombobox(), te(() => {
|
|
1152
1152
|
var p;
|
|
1153
1153
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1154
1154
|
});
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
let u =
|
|
1158
|
+
let u = x0(E(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1159
1159
|
return () => {
|
|
1160
1160
|
var c, p;
|
|
1161
|
-
let
|
|
1162
|
-
return ve({ ourProps:
|
|
1161
|
+
let b = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...w } = e, m = { ref: i.buttonRef, id: a, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = k(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = k(i.labelRef)) == null ? void 0 : p.id, a].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: r, onClick: s };
|
|
1162
|
+
return ve({ ourProps: m, theirProps: w, slot: b, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1163
1163
|
};
|
|
1164
|
-
} }),
|
|
1165
|
-
var
|
|
1166
|
-
let i = (
|
|
1167
|
-
l({ el:
|
|
1164
|
+
} }), D0 = ue({ 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 }) {
|
|
1165
|
+
var a;
|
|
1166
|
+
let i = (a = e.id) != null ? a : `headlessui-combobox-input-${Le()}`, s = he("ComboboxInput"), r = E(() => at(k(s.inputRef))), u = { value: !1 };
|
|
1167
|
+
l({ el: s.inputRef, $el: s.inputRef });
|
|
1168
1168
|
function c() {
|
|
1169
|
-
|
|
1170
|
-
let
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
let p =
|
|
1174
|
-
var
|
|
1175
|
-
let M =
|
|
1176
|
-
return
|
|
1169
|
+
s.change(null);
|
|
1170
|
+
let y = k(s.optionsRef);
|
|
1171
|
+
y && (y.scrollTop = 0), s.goToOption(U.Nothing);
|
|
1172
|
+
}
|
|
1173
|
+
let p = E(() => {
|
|
1174
|
+
var y;
|
|
1175
|
+
let M = s.value.value;
|
|
1176
|
+
return k(s.inputRef) ? typeof e.displayValue < "u" && M !== void 0 ? (y = e.displayValue(M)) != null ? y : "" : typeof M == "string" ? M : "" : "";
|
|
1177
1177
|
});
|
|
1178
1178
|
ye(() => {
|
|
1179
|
-
|
|
1179
|
+
j([p, s.comboboxState, r], ([y, M], [g, h]) => {
|
|
1180
1180
|
if (u.value) return;
|
|
1181
|
-
let A =
|
|
1182
|
-
A && ((
|
|
1181
|
+
let A = k(s.inputRef);
|
|
1182
|
+
A && ((h === 0 && M === 1 || y !== g) && (A.value = y), requestAnimationFrame(() => {
|
|
1183
1183
|
var d;
|
|
1184
1184
|
if (u.value || !A || ((d = r.value) == null ? void 0 : d.activeElement) !== A) return;
|
|
1185
|
-
let { selectionStart: f, selectionEnd:
|
|
1186
|
-
Math.abs((
|
|
1185
|
+
let { selectionStart: f, selectionEnd: S } = A;
|
|
1186
|
+
Math.abs((S ?? 0) - (f ?? 0)) === 0 && f === 0 && A.setSelectionRange(A.value.length, A.value.length);
|
|
1187
1187
|
}));
|
|
1188
|
-
}, { immediate: !0 }),
|
|
1189
|
-
if (
|
|
1188
|
+
}, { immediate: !0 }), j([s.comboboxState], ([y], [M]) => {
|
|
1189
|
+
if (y === 0 && M === 1) {
|
|
1190
1190
|
if (u.value) return;
|
|
1191
|
-
let
|
|
1192
|
-
if (!
|
|
1193
|
-
let
|
|
1194
|
-
|
|
1191
|
+
let g = k(s.inputRef);
|
|
1192
|
+
if (!g) return;
|
|
1193
|
+
let h = g.value, { selectionStart: A, selectionEnd: d, selectionDirection: f } = g;
|
|
1194
|
+
g.value = "", g.value = h, f !== null ? g.setSelectionRange(A, d, f) : g.setSelectionRange(A, d);
|
|
1195
1195
|
}
|
|
1196
1196
|
});
|
|
1197
1197
|
});
|
|
1198
|
-
let
|
|
1199
|
-
function
|
|
1200
|
-
|
|
1198
|
+
let b = $(!1);
|
|
1199
|
+
function w() {
|
|
1200
|
+
b.value = !0;
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1203
|
-
|
|
1204
|
-
|
|
1202
|
+
function m() {
|
|
1203
|
+
De().nextFrame(() => {
|
|
1204
|
+
b.value = !1;
|
|
1205
1205
|
});
|
|
1206
1206
|
}
|
|
1207
|
-
let
|
|
1208
|
-
function
|
|
1209
|
-
switch (u.value = !0,
|
|
1207
|
+
let _ = l0();
|
|
1208
|
+
function P(y) {
|
|
1209
|
+
switch (u.value = !0, _(() => {
|
|
1210
1210
|
u.value = !1;
|
|
1211
|
-
}),
|
|
1212
|
-
case
|
|
1213
|
-
if (u.value = !1,
|
|
1214
|
-
if (
|
|
1215
|
-
|
|
1211
|
+
}), y.key) {
|
|
1212
|
+
case q.Enter:
|
|
1213
|
+
if (u.value = !1, s.comboboxState.value !== 0 || b.value) return;
|
|
1214
|
+
if (y.preventDefault(), y.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1215
|
+
s.closeCombobox();
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
|
-
|
|
1218
|
+
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1219
1219
|
break;
|
|
1220
|
-
case
|
|
1221
|
-
return u.value = !1,
|
|
1222
|
-
case
|
|
1223
|
-
return u.value = !1,
|
|
1224
|
-
|
|
1225
|
-
|
|
1220
|
+
case q.ArrowDown:
|
|
1221
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(U.Next), 1: () => s.openCombobox() });
|
|
1222
|
+
case q.ArrowUp:
|
|
1223
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(U.Previous), 1: () => {
|
|
1224
|
+
s.openCombobox(), te(() => {
|
|
1225
|
+
s.value.value || s.goToOption(U.Last);
|
|
1226
1226
|
});
|
|
1227
1227
|
} });
|
|
1228
|
-
case
|
|
1229
|
-
if (
|
|
1230
|
-
return u.value = !1,
|
|
1231
|
-
case
|
|
1232
|
-
return u.value = !1,
|
|
1233
|
-
case
|
|
1234
|
-
if (
|
|
1235
|
-
return u.value = !1,
|
|
1236
|
-
case
|
|
1237
|
-
return u.value = !1,
|
|
1238
|
-
case
|
|
1239
|
-
if (u.value = !1,
|
|
1240
|
-
|
|
1228
|
+
case q.Home:
|
|
1229
|
+
if (y.shiftKey) break;
|
|
1230
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(U.First);
|
|
1231
|
+
case q.PageUp:
|
|
1232
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(U.First);
|
|
1233
|
+
case q.End:
|
|
1234
|
+
if (y.shiftKey) break;
|
|
1235
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(U.Last);
|
|
1236
|
+
case q.PageDown:
|
|
1237
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(U.Last);
|
|
1238
|
+
case q.Escape:
|
|
1239
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1240
|
+
y.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && y.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && c(), s.closeCombobox();
|
|
1241
1241
|
break;
|
|
1242
|
-
case
|
|
1243
|
-
if (u.value = !1,
|
|
1244
|
-
|
|
1242
|
+
case q.Tab:
|
|
1243
|
+
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1244
|
+
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1245
1245
|
break;
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1249
|
-
o("change",
|
|
1248
|
+
function I(y) {
|
|
1249
|
+
o("change", y), s.nullable.value && s.mode.value === 0 && y.target.value === "" && c(), s.openCombobox();
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1252
|
-
var M,
|
|
1253
|
-
let A = (M =
|
|
1254
|
-
if (u.value = !1, !((
|
|
1251
|
+
function x(y) {
|
|
1252
|
+
var M, g, h;
|
|
1253
|
+
let A = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1254
|
+
if (u.value = !1, !((g = k(s.optionsRef)) != null && g.contains(A)) && !((h = k(s.buttonRef)) != null && h.contains(A)) && s.comboboxState.value === 0) return y.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? c() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1257
|
-
var M,
|
|
1258
|
-
let A = (M =
|
|
1259
|
-
(
|
|
1260
|
-
|
|
1256
|
+
function V(y) {
|
|
1257
|
+
var M, g, h;
|
|
1258
|
+
let A = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1259
|
+
(g = k(s.buttonRef)) != null && g.contains(A) || (h = k(s.optionsRef)) != null && h.contains(A) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), De().nextFrame(() => {
|
|
1260
|
+
s.setActivationTrigger(1);
|
|
1261
1261
|
}));
|
|
1262
1262
|
}
|
|
1263
|
-
let
|
|
1264
|
-
var
|
|
1265
|
-
return (
|
|
1263
|
+
let R = E(() => {
|
|
1264
|
+
var y, M, g, h;
|
|
1265
|
+
return (h = (g = (M = e.defaultValue) != null ? M : s.defaultValue.value !== void 0 ? (y = e.displayValue) == null ? void 0 : y.call(e, s.defaultValue.value) : null) != null ? g : s.defaultValue.value) != null ? h : "";
|
|
1266
1266
|
});
|
|
1267
1267
|
return () => {
|
|
1268
|
-
var
|
|
1269
|
-
let
|
|
1270
|
-
return ve({ ourProps:
|
|
1268
|
+
var y, M, g, h, A, d, f;
|
|
1269
|
+
let S = { open: s.comboboxState.value === 0 }, { displayValue: T, onChange: F, ...D } = e, K = { "aria-controls": (y = s.optionsRef.value) == null ? void 0 : y.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (M = s.options.value.find((Y) => !s.virtual.value.disabled(Y.dataRef.value) && s.compare(Y.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : M.id : (g = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : g.id, "aria-labelledby": (d = (h = k(s.labelRef)) == null ? void 0 : h.id) != null ? d : (A = k(s.buttonRef)) == null ? void 0 : A.id, "aria-autocomplete": "list", id: i, onCompositionstart: w, onCompositionend: m, onKeydown: P, onInput: I, onFocus: V, onBlur: x, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: R.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1270
|
+
return ve({ ourProps: K, theirProps: D, slot: S, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1271
1271
|
};
|
|
1272
|
-
} }),
|
|
1273
|
-
let l = he("ComboboxOptions"),
|
|
1272
|
+
} }), N0 = ue({ 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 }) {
|
|
1273
|
+
let l = he("ComboboxOptions"), a = `headlessui-combobox-options-${Le()}`;
|
|
1274
1274
|
n({ el: l.optionsRef, $el: l.optionsRef }), re(() => {
|
|
1275
1275
|
l.optionsPropsRef.value.static = e.static;
|
|
1276
1276
|
}), re(() => {
|
|
1277
1277
|
l.optionsPropsRef.value.hold = e.hold;
|
|
1278
1278
|
});
|
|
1279
|
-
let i =
|
|
1280
|
-
|
|
1279
|
+
let i = I0(), s = E(() => i !== null ? (i.value & Ie.Open) === Ie.Open : l.comboboxState.value === 0);
|
|
1280
|
+
w0({ container: E(() => k(l.optionsRef)), enabled: E(() => l.comboboxState.value === 0), accept(u) {
|
|
1281
1281
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1282
1282
|
}, walk(u) {
|
|
1283
1283
|
u.setAttribute("role", "none");
|
|
@@ -1287,58 +1287,58 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1287
1287
|
}
|
|
1288
1288
|
return () => {
|
|
1289
1289
|
var u, c, p;
|
|
1290
|
-
let
|
|
1291
|
-
return ve({ ourProps:
|
|
1290
|
+
let b = { open: l.comboboxState.value === 0 }, w = { "aria-labelledby": (p = (u = k(l.labelRef)) == null ? void 0 : u.id) != null ? p : (c = k(l.buttonRef)) == null ? void 0 : c.id, id: a, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: r }, m = je(e, ["hold"]);
|
|
1291
|
+
return ve({ ourProps: w, theirProps: m, slot: b, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(F0, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1292
1292
|
};
|
|
1293
|
-
} }),
|
|
1294
|
-
let l = he("ComboboxOption"),
|
|
1293
|
+
} }), B0 = ue({ 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 }) {
|
|
1294
|
+
let l = he("ComboboxOption"), a = `headlessui-combobox-option-${Le()}`, i = $(null), s = E(() => e.disabled);
|
|
1295
1295
|
n({ el: i, $el: i });
|
|
1296
|
-
let r =
|
|
1297
|
-
var
|
|
1298
|
-
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((
|
|
1299
|
-
}), u =
|
|
1300
|
-
ye(() => l.registerOption(
|
|
1301
|
-
let
|
|
1302
|
-
|
|
1296
|
+
let r = E(() => {
|
|
1297
|
+
var x;
|
|
1298
|
+
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((x = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : x.id) === a;
|
|
1299
|
+
}), u = E(() => l.isSelected(e.value)), c = Te(Wt, null), p = E(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: E(() => e.order) }));
|
|
1300
|
+
ye(() => l.registerOption(a, p)), nt(() => l.unregisterOption(a, r.value)), re(() => {
|
|
1301
|
+
let x = k(i);
|
|
1302
|
+
x && (c == null || c.value.measureElement(x));
|
|
1303
1303
|
}), re(() => {
|
|
1304
|
-
l.comboboxState.value === 0 && r.value && (l.virtual.value || l.activationTrigger.value !== 0 &&
|
|
1305
|
-
var
|
|
1306
|
-
return (
|
|
1304
|
+
l.comboboxState.value === 0 && r.value && (l.virtual.value || l.activationTrigger.value !== 0 && te(() => {
|
|
1305
|
+
var x, V;
|
|
1306
|
+
return (V = (x = k(i)) == null ? void 0 : x.scrollIntoView) == null ? void 0 : V.call(x, { block: "nearest" });
|
|
1307
1307
|
}));
|
|
1308
1308
|
});
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1311
|
-
var
|
|
1312
|
-
return (
|
|
1309
|
+
function b(x) {
|
|
1310
|
+
x.preventDefault(), x.button === jt.Left && (s.value || (l.selectOption(a), Pt() || requestAnimationFrame(() => {
|
|
1311
|
+
var V;
|
|
1312
|
+
return (V = k(l.inputRef)) == null ? void 0 : V.focus({ preventScroll: !0 });
|
|
1313
1313
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
var
|
|
1317
|
-
if (e.disabled || (
|
|
1318
|
-
let
|
|
1319
|
-
l.goToOption(
|
|
1315
|
+
function w() {
|
|
1316
|
+
var x;
|
|
1317
|
+
if (e.disabled || (x = l.virtual.value) != null && x.disabled(e.value)) return l.goToOption(U.Nothing);
|
|
1318
|
+
let V = l.calculateIndex(e.value);
|
|
1319
|
+
l.goToOption(U.Specific, V);
|
|
1320
1320
|
}
|
|
1321
|
-
let
|
|
1322
|
-
function
|
|
1323
|
-
|
|
1321
|
+
let m = y0();
|
|
1322
|
+
function _(x) {
|
|
1323
|
+
m.update(x);
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1326
|
-
var
|
|
1327
|
-
if (!
|
|
1328
|
-
let
|
|
1329
|
-
l.goToOption(
|
|
1325
|
+
function P(x) {
|
|
1326
|
+
var V;
|
|
1327
|
+
if (!m.wasMoved(x) || e.disabled || (V = l.virtual.value) != null && V.disabled(e.value) || r.value) return;
|
|
1328
|
+
let R = l.calculateIndex(e.value);
|
|
1329
|
+
l.goToOption(U.Specific, R, 0);
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1332
|
-
var
|
|
1333
|
-
|
|
1331
|
+
function I(x) {
|
|
1332
|
+
var V;
|
|
1333
|
+
m.wasMoved(x) && (e.disabled || (V = l.virtual.value) != null && V.disabled(e.value) || r.value && (l.optionsPropsRef.value.hold || l.goToOption(U.Nothing)));
|
|
1334
1334
|
}
|
|
1335
1335
|
return () => {
|
|
1336
|
-
let { disabled:
|
|
1337
|
-
return ve({ ourProps:
|
|
1336
|
+
let { disabled: x } = e, V = { active: r.value, selected: u.value, disabled: x }, R = { id: a, ref: i, role: "option", tabIndex: x === !0 ? void 0 : -1, "aria-disabled": x === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: b, onFocus: w, onPointerenter: _, onMouseenter: _, onPointermove: P, onMousemove: P, onPointerleave: I, onMouseleave: I }, y = je(e, ["order", "value"]);
|
|
1337
|
+
return ve({ ourProps: R, theirProps: y, slot: V, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1338
1338
|
};
|
|
1339
1339
|
} });
|
|
1340
|
-
function
|
|
1341
|
-
return
|
|
1340
|
+
function j0(e, o) {
|
|
1341
|
+
return C(), O("svg", {
|
|
1342
1342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1343
|
viewBox: "0 0 20 20",
|
|
1344
1344
|
fill: "currentColor",
|
|
@@ -1352,8 +1352,8 @@ function B0(e, o) {
|
|
|
1352
1352
|
})
|
|
1353
1353
|
]);
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return
|
|
1355
|
+
function H0(e, o) {
|
|
1356
|
+
return C(), O("svg", {
|
|
1357
1357
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1358
1358
|
viewBox: "0 0 20 20",
|
|
1359
1359
|
fill: "currentColor",
|
|
@@ -1367,8 +1367,8 @@ function j0(e, o) {
|
|
|
1367
1367
|
})
|
|
1368
1368
|
]);
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1371
|
-
return
|
|
1370
|
+
function z0(e, o) {
|
|
1371
|
+
return C(), O("svg", {
|
|
1372
1372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1373
1373
|
viewBox: "0 0 20 20",
|
|
1374
1374
|
fill: "currentColor",
|
|
@@ -1383,7 +1383,7 @@ function H0(e, o) {
|
|
|
1383
1383
|
]);
|
|
1384
1384
|
}
|
|
1385
1385
|
var Gt = !1;
|
|
1386
|
-
function
|
|
1386
|
+
function ke(e, o, t) {
|
|
1387
1387
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1388
1388
|
}
|
|
1389
1389
|
function Ke(e, o) {
|
|
@@ -1393,69 +1393,69 @@ function Ke(e, o) {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
delete e[o];
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function U0() {
|
|
1397
1397
|
return qt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1398
1398
|
}
|
|
1399
1399
|
function qt() {
|
|
1400
1400
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1401
1401
|
}
|
|
1402
|
-
const
|
|
1402
|
+
const Z0 = typeof Proxy == "function", W0 = "devtools-plugin:setup", G0 = "plugin:settings:set";
|
|
1403
1403
|
let be, Ye;
|
|
1404
|
-
function
|
|
1404
|
+
function q0() {
|
|
1405
1405
|
var e;
|
|
1406
1406
|
return be !== void 0 || (typeof window < "u" && window.performance ? (be = !0, Ye = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (be = !0, Ye = globalThis.perf_hooks.performance) : be = !1), be;
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return
|
|
1408
|
+
function J0() {
|
|
1409
|
+
return q0() ? Ye.now() : Date.now();
|
|
1410
1410
|
}
|
|
1411
|
-
class
|
|
1411
|
+
class K0 {
|
|
1412
1412
|
constructor(o, t) {
|
|
1413
1413
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1414
1414
|
const n = {};
|
|
1415
1415
|
if (o.settings)
|
|
1416
1416
|
for (const i in o.settings) {
|
|
1417
|
-
const
|
|
1418
|
-
n[i] =
|
|
1417
|
+
const s = o.settings[i];
|
|
1418
|
+
n[i] = s.defaultValue;
|
|
1419
1419
|
}
|
|
1420
1420
|
const l = `__vue-devtools-plugin-settings__${o.id}`;
|
|
1421
|
-
let
|
|
1421
|
+
let a = Object.assign({}, n);
|
|
1422
1422
|
try {
|
|
1423
|
-
const i = localStorage.getItem(l),
|
|
1424
|
-
Object.assign(
|
|
1423
|
+
const i = localStorage.getItem(l), s = JSON.parse(i);
|
|
1424
|
+
Object.assign(a, s);
|
|
1425
1425
|
} catch {
|
|
1426
1426
|
}
|
|
1427
1427
|
this.fallbacks = {
|
|
1428
1428
|
getSettings() {
|
|
1429
|
-
return
|
|
1429
|
+
return a;
|
|
1430
1430
|
},
|
|
1431
1431
|
setSettings(i) {
|
|
1432
1432
|
try {
|
|
1433
1433
|
localStorage.setItem(l, JSON.stringify(i));
|
|
1434
1434
|
} catch {
|
|
1435
1435
|
}
|
|
1436
|
-
|
|
1436
|
+
a = i;
|
|
1437
1437
|
},
|
|
1438
1438
|
now() {
|
|
1439
|
-
return
|
|
1439
|
+
return J0();
|
|
1440
1440
|
}
|
|
1441
|
-
}, t && t.on(
|
|
1442
|
-
i === this.plugin.id && this.fallbacks.setSettings(
|
|
1441
|
+
}, t && t.on(G0, (i, s) => {
|
|
1442
|
+
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1443
1443
|
}), this.proxiedOn = new Proxy({}, {
|
|
1444
|
-
get: (i,
|
|
1444
|
+
get: (i, s) => this.target ? this.target.on[s] : (...r) => {
|
|
1445
1445
|
this.onQueue.push({
|
|
1446
|
-
method:
|
|
1446
|
+
method: s,
|
|
1447
1447
|
args: r
|
|
1448
1448
|
});
|
|
1449
1449
|
}
|
|
1450
1450
|
}), this.proxiedTarget = new Proxy({}, {
|
|
1451
|
-
get: (i,
|
|
1452
|
-
method:
|
|
1451
|
+
get: (i, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...r) => (this.targetQueue.push({
|
|
1452
|
+
method: s,
|
|
1453
1453
|
args: r,
|
|
1454
1454
|
resolve: () => {
|
|
1455
1455
|
}
|
|
1456
|
-
}), this.fallbacks[
|
|
1456
|
+
}), this.fallbacks[s](...r)) : (...r) => new Promise((u) => {
|
|
1457
1457
|
this.targetQueue.push({
|
|
1458
|
-
method:
|
|
1458
|
+
method: s,
|
|
1459
1459
|
args: r,
|
|
1460
1460
|
resolve: u
|
|
1461
1461
|
});
|
|
@@ -1471,11 +1471,11 @@ class J0 {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
function Jt(e, o) {
|
|
1474
|
-
const t = e, n = qt(), l =
|
|
1475
|
-
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !
|
|
1476
|
-
l.emit(
|
|
1474
|
+
const t = e, n = qt(), l = U0(), a = Z0 && t.enableEarlyProxy;
|
|
1475
|
+
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
|
|
1476
|
+
l.emit(W0, e, o);
|
|
1477
1477
|
else {
|
|
1478
|
-
const i =
|
|
1478
|
+
const i = a ? new K0(t, l) : null;
|
|
1479
1479
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1480
1480
|
pluginDescriptor: t,
|
|
1481
1481
|
setupFn: o,
|
|
@@ -1496,12 +1496,12 @@ const $e = (e) => _e = e, Kt = process.env.NODE_ENV !== "production" ? Symbol("p
|
|
|
1496
1496
|
function pe(e) {
|
|
1497
1497
|
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
1498
1498
|
}
|
|
1499
|
-
var
|
|
1499
|
+
var le;
|
|
1500
1500
|
(function(e) {
|
|
1501
1501
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1502
|
-
})(
|
|
1503
|
-
const
|
|
1504
|
-
function
|
|
1502
|
+
})(le || (le = {}));
|
|
1503
|
+
const He = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && He, gt = 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 };
|
|
1504
|
+
function Y0(e, { autoBom: o = !1 } = {}) {
|
|
1505
1505
|
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;
|
|
1506
1506
|
}
|
|
1507
1507
|
function it(e, o, t) {
|
|
@@ -1529,18 +1529,18 @@ function Fe(e) {
|
|
|
1529
1529
|
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
|
-
const Pe = typeof navigator == "object" ? navigator : { userAgent: "" }, Qt = /Macintosh/.test(Pe.userAgent) && /AppleWebKit/.test(Pe.userAgent) && !/Safari/.test(Pe.userAgent), Xt =
|
|
1532
|
+
const Pe = typeof navigator == "object" ? navigator : { userAgent: "" }, Qt = /Macintosh/.test(Pe.userAgent) && /AppleWebKit/.test(Pe.userAgent) && !/Safari/.test(Pe.userAgent), Xt = He ? (
|
|
1533
1533
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
1534
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Qt ?
|
|
1534
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Qt ? Q0 : (
|
|
1535
1535
|
// Use msSaveOrOpenBlob as a second approach
|
|
1536
|
-
"msSaveOrOpenBlob" in Pe ?
|
|
1536
|
+
"msSaveOrOpenBlob" in Pe ? X0 : (
|
|
1537
1537
|
// Fallback to using FileReader and a popup
|
|
1538
|
-
|
|
1538
|
+
en
|
|
1539
1539
|
)
|
|
1540
1540
|
)
|
|
1541
1541
|
) : () => {
|
|
1542
1542
|
};
|
|
1543
|
-
function
|
|
1543
|
+
function Q0(e, o = "download", t) {
|
|
1544
1544
|
const n = document.createElement("a");
|
|
1545
1545
|
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Yt(n.href) ? it(e, o, t) : (n.target = "_blank", Fe(n)) : Fe(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1546
1546
|
URL.revokeObjectURL(n.href);
|
|
@@ -1548,7 +1548,7 @@ function Y0(e, o = "download", t) {
|
|
|
1548
1548
|
Fe(n);
|
|
1549
1549
|
}, 0));
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function X0(e, o = "download", t) {
|
|
1552
1552
|
if (typeof e == "string")
|
|
1553
1553
|
if (Yt(e))
|
|
1554
1554
|
it(e, o, t);
|
|
@@ -1559,28 +1559,28 @@ function Q0(e, o = "download", t) {
|
|
|
1559
1559
|
});
|
|
1560
1560
|
}
|
|
1561
1561
|
else
|
|
1562
|
-
navigator.msSaveOrOpenBlob(
|
|
1562
|
+
navigator.msSaveOrOpenBlob(Y0(e, t), o);
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function en(e, o, t, n) {
|
|
1565
1565
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1566
1566
|
return it(e, o, t);
|
|
1567
|
-
const l = e.type === "application/octet-stream",
|
|
1568
|
-
if ((i || l &&
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
let r =
|
|
1567
|
+
const l = e.type === "application/octet-stream", a = /constructor/i.test(String(gt.HTMLElement)) || "safari" in gt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1568
|
+
if ((i || l && a || Qt) && typeof FileReader < "u") {
|
|
1569
|
+
const s = new FileReader();
|
|
1570
|
+
s.onloadend = function() {
|
|
1571
|
+
let r = s.result;
|
|
1572
1572
|
if (typeof r != "string")
|
|
1573
1573
|
throw n = null, new Error("Wrong reader.result type");
|
|
1574
1574
|
r = i ? r : r.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = r : location.assign(r), n = null;
|
|
1575
|
-
},
|
|
1575
|
+
}, s.readAsDataURL(e);
|
|
1576
1576
|
} else {
|
|
1577
|
-
const
|
|
1578
|
-
n ? n.location.assign(
|
|
1579
|
-
URL.revokeObjectURL(
|
|
1577
|
+
const s = URL.createObjectURL(e);
|
|
1578
|
+
n ? n.location.assign(s) : location.href = s, n = null, setTimeout(function() {
|
|
1579
|
+
URL.revokeObjectURL(s);
|
|
1580
1580
|
}, 4e4);
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function z(e, o) {
|
|
1584
1584
|
const t = "🍍 " + e;
|
|
1585
1585
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1586
1586
|
}
|
|
@@ -1589,65 +1589,65 @@ function rt(e) {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
function e2() {
|
|
1591
1591
|
if (!("clipboard" in navigator))
|
|
1592
|
-
return
|
|
1592
|
+
return z("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1593
1593
|
}
|
|
1594
1594
|
function t2(e) {
|
|
1595
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
1595
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (z('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
1596
1596
|
}
|
|
1597
|
-
async function
|
|
1597
|
+
async function tn(e) {
|
|
1598
1598
|
if (!e2())
|
|
1599
1599
|
try {
|
|
1600
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
1600
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), z("Global state copied to clipboard.");
|
|
1601
1601
|
} catch (o) {
|
|
1602
1602
|
if (t2(o))
|
|
1603
1603
|
return;
|
|
1604
|
-
|
|
1604
|
+
z("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
async function
|
|
1607
|
+
async function nn(e) {
|
|
1608
1608
|
if (!e2())
|
|
1609
1609
|
try {
|
|
1610
|
-
n2(e, JSON.parse(await navigator.clipboard.readText())),
|
|
1610
|
+
n2(e, JSON.parse(await navigator.clipboard.readText())), z("Global state pasted from clipboard.");
|
|
1611
1611
|
} catch (o) {
|
|
1612
1612
|
if (t2(o))
|
|
1613
1613
|
return;
|
|
1614
|
-
|
|
1614
|
+
z("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1615
1615
|
}
|
|
1616
1616
|
}
|
|
1617
|
-
async function
|
|
1617
|
+
async function on(e) {
|
|
1618
1618
|
try {
|
|
1619
1619
|
Xt(new Blob([JSON.stringify(e.state.value)], {
|
|
1620
1620
|
type: "text/plain;charset=utf-8"
|
|
1621
1621
|
}), "pinia-state.json");
|
|
1622
1622
|
} catch (o) {
|
|
1623
|
-
|
|
1623
|
+
z("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
|
-
let
|
|
1627
|
-
function
|
|
1628
|
-
|
|
1626
|
+
let se;
|
|
1627
|
+
function ln() {
|
|
1628
|
+
se || (se = document.createElement("input"), se.type = "file", se.accept = ".json");
|
|
1629
1629
|
function e() {
|
|
1630
1630
|
return new Promise((o, t) => {
|
|
1631
|
-
|
|
1632
|
-
const n =
|
|
1631
|
+
se.onchange = async () => {
|
|
1632
|
+
const n = se.files;
|
|
1633
1633
|
if (!n)
|
|
1634
1634
|
return o(null);
|
|
1635
1635
|
const l = n.item(0);
|
|
1636
1636
|
return o(l ? { text: await l.text(), file: l } : null);
|
|
1637
|
-
},
|
|
1637
|
+
}, se.oncancel = () => o(null), se.onerror = t, se.click();
|
|
1638
1638
|
});
|
|
1639
1639
|
}
|
|
1640
1640
|
return e;
|
|
1641
1641
|
}
|
|
1642
|
-
async function
|
|
1642
|
+
async function sn(e) {
|
|
1643
1643
|
try {
|
|
1644
|
-
const t = await
|
|
1644
|
+
const t = await ln()();
|
|
1645
1645
|
if (!t)
|
|
1646
1646
|
return;
|
|
1647
1647
|
const { text: n, file: l } = t;
|
|
1648
|
-
n2(e, JSON.parse(n)),
|
|
1648
|
+
n2(e, JSON.parse(n)), z(`Global state imported from "${l.name}".`);
|
|
1649
1649
|
} catch (o) {
|
|
1650
|
-
|
|
1650
|
+
z("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
1653
|
function n2(e, o) {
|
|
@@ -1656,7 +1656,7 @@ function n2(e, o) {
|
|
|
1656
1656
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function ee(e) {
|
|
1660
1660
|
return {
|
|
1661
1661
|
_custom: {
|
|
1662
1662
|
display: e
|
|
@@ -1664,7 +1664,7 @@ function X(e) {
|
|
|
1664
1664
|
};
|
|
1665
1665
|
}
|
|
1666
1666
|
const o2 = "🍍 Pinia (root)", Qe = "_root";
|
|
1667
|
-
function
|
|
1667
|
+
function an(e) {
|
|
1668
1668
|
return rt(e) ? {
|
|
1669
1669
|
id: Qe,
|
|
1670
1670
|
label: o2
|
|
@@ -1673,21 +1673,21 @@ function sn(e) {
|
|
|
1673
1673
|
label: e.$id
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function rn(e) {
|
|
1677
1677
|
if (rt(e)) {
|
|
1678
1678
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1679
1679
|
return {
|
|
1680
|
-
state: t.map((
|
|
1680
|
+
state: t.map((a) => ({
|
|
1681
1681
|
editable: !0,
|
|
1682
|
-
key:
|
|
1683
|
-
value: e.state.value[
|
|
1682
|
+
key: a,
|
|
1683
|
+
value: e.state.value[a]
|
|
1684
1684
|
})),
|
|
1685
|
-
getters: t.filter((
|
|
1686
|
-
const i = n.get(
|
|
1685
|
+
getters: t.filter((a) => n.get(a)._getters).map((a) => {
|
|
1686
|
+
const i = n.get(a);
|
|
1687
1687
|
return {
|
|
1688
1688
|
editable: !1,
|
|
1689
|
-
key:
|
|
1690
|
-
value: i._getters.reduce((
|
|
1689
|
+
key: a,
|
|
1690
|
+
value: i._getters.reduce((s, r) => (s[r] = i[r], s), {})
|
|
1691
1691
|
};
|
|
1692
1692
|
})
|
|
1693
1693
|
};
|
|
@@ -1709,34 +1709,34 @@ function an(e) {
|
|
|
1709
1709
|
value: e[t]
|
|
1710
1710
|
}))), o;
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1712
|
+
function un(e) {
|
|
1713
1713
|
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), {
|
|
1714
1714
|
oldValue: {},
|
|
1715
1715
|
keys: [],
|
|
1716
1716
|
operations: [],
|
|
1717
1717
|
newValue: {}
|
|
1718
1718
|
}) : {
|
|
1719
|
-
operation:
|
|
1720
|
-
key:
|
|
1719
|
+
operation: ee(e.type),
|
|
1720
|
+
key: ee(e.key),
|
|
1721
1721
|
oldValue: e.oldValue,
|
|
1722
1722
|
newValue: e.newValue
|
|
1723
1723
|
} : {};
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function cn(e) {
|
|
1726
1726
|
switch (e) {
|
|
1727
|
-
case
|
|
1727
|
+
case le.direct:
|
|
1728
1728
|
return "mutation";
|
|
1729
|
-
case
|
|
1729
|
+
case le.patchFunction:
|
|
1730
1730
|
return "$patch";
|
|
1731
|
-
case
|
|
1731
|
+
case le.patchObject:
|
|
1732
1732
|
return "$patch";
|
|
1733
1733
|
default:
|
|
1734
1734
|
return "unknown";
|
|
1735
1735
|
}
|
|
1736
1736
|
}
|
|
1737
1737
|
let Ce = !0;
|
|
1738
|
-
const Re = [], ce = "pinia:mutations",
|
|
1739
|
-
function
|
|
1738
|
+
const Re = [], ce = "pinia:mutations", W = "pinia", { assign: dn } = Object, Ne = (e) => "🍍 " + e;
|
|
1739
|
+
function fn(e, o) {
|
|
1740
1740
|
Jt({
|
|
1741
1741
|
id: "dev.esm.pinia",
|
|
1742
1742
|
label: "Pinia 🍍",
|
|
@@ -1746,12 +1746,12 @@ function dn(e, o) {
|
|
|
1746
1746
|
componentStateTypes: Re,
|
|
1747
1747
|
app: e
|
|
1748
1748
|
}, (t) => {
|
|
1749
|
-
typeof t.now != "function" &&
|
|
1749
|
+
typeof t.now != "function" && z("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({
|
|
1750
1750
|
id: ce,
|
|
1751
1751
|
label: "Pinia 🍍",
|
|
1752
1752
|
color: 15064968
|
|
1753
1753
|
}), t.addInspector({
|
|
1754
|
-
id:
|
|
1754
|
+
id: W,
|
|
1755
1755
|
label: "Pinia 🍍",
|
|
1756
1756
|
icon: "storage",
|
|
1757
1757
|
treeFilterPlaceholder: "Search stores",
|
|
@@ -1759,28 +1759,28 @@ function dn(e, o) {
|
|
|
1759
1759
|
{
|
|
1760
1760
|
icon: "content_copy",
|
|
1761
1761
|
action: () => {
|
|
1762
|
-
|
|
1762
|
+
tn(o);
|
|
1763
1763
|
},
|
|
1764
1764
|
tooltip: "Serialize and copy the state"
|
|
1765
1765
|
},
|
|
1766
1766
|
{
|
|
1767
1767
|
icon: "content_paste",
|
|
1768
1768
|
action: async () => {
|
|
1769
|
-
await
|
|
1769
|
+
await nn(o), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1770
1770
|
},
|
|
1771
1771
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1772
1772
|
},
|
|
1773
1773
|
{
|
|
1774
1774
|
icon: "save",
|
|
1775
1775
|
action: () => {
|
|
1776
|
-
|
|
1776
|
+
on(o);
|
|
1777
1777
|
},
|
|
1778
1778
|
tooltip: "Save the state as a JSON file"
|
|
1779
1779
|
},
|
|
1780
1780
|
{
|
|
1781
1781
|
icon: "folder_open",
|
|
1782
1782
|
action: async () => {
|
|
1783
|
-
await
|
|
1783
|
+
await sn(o), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1784
1784
|
},
|
|
1785
1785
|
tooltip: "Import the state from a JSON file"
|
|
1786
1786
|
}
|
|
@@ -1791,41 +1791,41 @@ function dn(e, o) {
|
|
|
1791
1791
|
tooltip: 'Reset the state (with "$reset")',
|
|
1792
1792
|
action: (n) => {
|
|
1793
1793
|
const l = o._s.get(n);
|
|
1794
|
-
l ? typeof l.$reset != "function" ?
|
|
1794
|
+
l ? typeof l.$reset != "function" ? z(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), z(`Store "${n}" reset.`)) : z(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
1797
|
]
|
|
1798
1798
|
}), t.on.inspectComponent((n, l) => {
|
|
1799
|
-
const
|
|
1800
|
-
if (
|
|
1799
|
+
const a = n.componentInstance && n.componentInstance.proxy;
|
|
1800
|
+
if (a && a._pStores) {
|
|
1801
1801
|
const i = n.componentInstance.proxy._pStores;
|
|
1802
|
-
Object.values(i).forEach((
|
|
1802
|
+
Object.values(i).forEach((s) => {
|
|
1803
1803
|
n.instanceData.state.push({
|
|
1804
|
-
type:
|
|
1804
|
+
type: Ne(s.$id),
|
|
1805
1805
|
key: "state",
|
|
1806
1806
|
editable: !0,
|
|
1807
|
-
value:
|
|
1807
|
+
value: s._isOptionsAPI ? {
|
|
1808
1808
|
_custom: {
|
|
1809
|
-
value:
|
|
1809
|
+
value: X(s.$state),
|
|
1810
1810
|
actions: [
|
|
1811
1811
|
{
|
|
1812
1812
|
icon: "restore",
|
|
1813
1813
|
tooltip: "Reset the state of this store",
|
|
1814
|
-
action: () =>
|
|
1814
|
+
action: () => s.$reset()
|
|
1815
1815
|
}
|
|
1816
1816
|
]
|
|
1817
1817
|
}
|
|
1818
1818
|
} : (
|
|
1819
1819
|
// NOTE: workaround to unwrap transferred refs
|
|
1820
|
-
Object.keys(
|
|
1820
|
+
Object.keys(s.$state).reduce((r, u) => (r[u] = s.$state[u], r), {})
|
|
1821
1821
|
)
|
|
1822
|
-
}),
|
|
1823
|
-
type:
|
|
1822
|
+
}), s._getters && s._getters.length && n.instanceData.state.push({
|
|
1823
|
+
type: Ne(s.$id),
|
|
1824
1824
|
key: "getters",
|
|
1825
1825
|
editable: !1,
|
|
1826
|
-
value:
|
|
1826
|
+
value: s._getters.reduce((r, u) => {
|
|
1827
1827
|
try {
|
|
1828
|
-
r[u] =
|
|
1828
|
+
r[u] = s[u];
|
|
1829
1829
|
} catch (c) {
|
|
1830
1830
|
r[u] = c;
|
|
1831
1831
|
}
|
|
@@ -1835,42 +1835,42 @@ function dn(e, o) {
|
|
|
1835
1835
|
});
|
|
1836
1836
|
}
|
|
1837
1837
|
}), t.on.getInspectorTree((n) => {
|
|
1838
|
-
if (n.app === e && n.inspectorId ===
|
|
1838
|
+
if (n.app === e && n.inspectorId === W) {
|
|
1839
1839
|
let l = [o];
|
|
1840
|
-
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((
|
|
1840
|
+
l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((a) => "$id" in a ? a.$id.toLowerCase().includes(n.filter.toLowerCase()) : o2.toLowerCase().includes(n.filter.toLowerCase())) : l).map(an);
|
|
1841
1841
|
}
|
|
1842
1842
|
}), t.on.getInspectorState((n) => {
|
|
1843
|
-
if (n.app === e && n.inspectorId ===
|
|
1843
|
+
if (n.app === e && n.inspectorId === W) {
|
|
1844
1844
|
const l = n.nodeId === Qe ? o : o._s.get(n.nodeId);
|
|
1845
1845
|
if (!l)
|
|
1846
1846
|
return;
|
|
1847
|
-
l && (n.state =
|
|
1847
|
+
l && (n.state = rn(l));
|
|
1848
1848
|
}
|
|
1849
1849
|
}), t.on.editInspectorState((n, l) => {
|
|
1850
|
-
if (n.app === e && n.inspectorId ===
|
|
1851
|
-
const
|
|
1852
|
-
if (!
|
|
1853
|
-
return
|
|
1850
|
+
if (n.app === e && n.inspectorId === W) {
|
|
1851
|
+
const a = n.nodeId === Qe ? o : o._s.get(n.nodeId);
|
|
1852
|
+
if (!a)
|
|
1853
|
+
return z(`store "${n.nodeId}" not found`, "error");
|
|
1854
1854
|
const { path: i } = n;
|
|
1855
|
-
rt(
|
|
1855
|
+
rt(a) ? i.unshift("state") : (i.length !== 1 || !a._customProperties.has(i[0]) || i[0] in a.$state) && i.unshift("$state"), Ce = !1, n.set(a, i, n.state.value), Ce = !0;
|
|
1856
1856
|
}
|
|
1857
1857
|
}), t.on.editComponentState((n) => {
|
|
1858
1858
|
if (n.type.startsWith("🍍")) {
|
|
1859
|
-
const l = n.type.replace(/^🍍\s*/, ""),
|
|
1860
|
-
if (!
|
|
1861
|
-
return
|
|
1859
|
+
const l = n.type.replace(/^🍍\s*/, ""), a = o._s.get(l);
|
|
1860
|
+
if (!a)
|
|
1861
|
+
return z(`store "${l}" not found`, "error");
|
|
1862
1862
|
const { path: i } = n;
|
|
1863
1863
|
if (i[0] !== "state")
|
|
1864
|
-
return
|
|
1864
|
+
return z(`Invalid path for store "${l}":
|
|
1865
1865
|
${i}
|
|
1866
1866
|
Only state can be modified.`);
|
|
1867
|
-
i[0] = "$state", Ce = !1, n.set(
|
|
1867
|
+
i[0] = "$state", Ce = !1, n.set(a, i, n.state.value), Ce = !0;
|
|
1868
1868
|
}
|
|
1869
1869
|
});
|
|
1870
1870
|
});
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1873
|
-
Re.includes(
|
|
1872
|
+
function pn(e, o) {
|
|
1873
|
+
Re.includes(Ne(o.$id)) || Re.push(Ne(o.$id)), Jt({
|
|
1874
1874
|
id: "dev.esm.pinia",
|
|
1875
1875
|
label: "Pinia 🍍",
|
|
1876
1876
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
@@ -1892,7 +1892,7 @@ function fn(e, o) {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
}, (t) => {
|
|
1894
1894
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1895
|
-
o.$onAction(({ after: i, onError:
|
|
1895
|
+
o.$onAction(({ after: i, onError: s, name: r, args: u }) => {
|
|
1896
1896
|
const c = l2++;
|
|
1897
1897
|
t.addTimelineEvent({
|
|
1898
1898
|
layerId: ce,
|
|
@@ -1901,8 +1901,8 @@ function fn(e, o) {
|
|
|
1901
1901
|
title: "🛫 " + r,
|
|
1902
1902
|
subtitle: "start",
|
|
1903
1903
|
data: {
|
|
1904
|
-
store:
|
|
1905
|
-
action:
|
|
1904
|
+
store: ee(o.$id),
|
|
1905
|
+
action: ee(r),
|
|
1906
1906
|
args: u
|
|
1907
1907
|
},
|
|
1908
1908
|
groupId: c
|
|
@@ -1915,15 +1915,15 @@ function fn(e, o) {
|
|
|
1915
1915
|
title: "🛬 " + r,
|
|
1916
1916
|
subtitle: "end",
|
|
1917
1917
|
data: {
|
|
1918
|
-
store:
|
|
1919
|
-
action:
|
|
1918
|
+
store: ee(o.$id),
|
|
1919
|
+
action: ee(r),
|
|
1920
1920
|
args: u,
|
|
1921
1921
|
result: p
|
|
1922
1922
|
},
|
|
1923
1923
|
groupId: c
|
|
1924
1924
|
}
|
|
1925
1925
|
});
|
|
1926
|
-
}),
|
|
1926
|
+
}), s((p) => {
|
|
1927
1927
|
ie = void 0, t.addTimelineEvent({
|
|
1928
1928
|
layerId: ce,
|
|
1929
1929
|
event: {
|
|
@@ -1932,8 +1932,8 @@ function fn(e, o) {
|
|
|
1932
1932
|
title: "💥 " + r,
|
|
1933
1933
|
subtitle: "end",
|
|
1934
1934
|
data: {
|
|
1935
|
-
store:
|
|
1936
|
-
action:
|
|
1935
|
+
store: ee(o.$id),
|
|
1936
|
+
action: ee(r),
|
|
1937
1937
|
args: u,
|
|
1938
1938
|
error: p
|
|
1939
1939
|
},
|
|
@@ -1942,31 +1942,31 @@ function fn(e, o) {
|
|
|
1942
1942
|
});
|
|
1943
1943
|
});
|
|
1944
1944
|
}, !0), o._customProperties.forEach((i) => {
|
|
1945
|
-
|
|
1946
|
-
t.notifyComponentUpdate(), t.sendInspectorState(
|
|
1945
|
+
j(() => L(o[i]), (s, r) => {
|
|
1946
|
+
t.notifyComponentUpdate(), t.sendInspectorState(W), Ce && t.addTimelineEvent({
|
|
1947
1947
|
layerId: ce,
|
|
1948
1948
|
event: {
|
|
1949
1949
|
time: n(),
|
|
1950
1950
|
title: "Change",
|
|
1951
1951
|
subtitle: i,
|
|
1952
1952
|
data: {
|
|
1953
|
-
newValue:
|
|
1953
|
+
newValue: s,
|
|
1954
1954
|
oldValue: r
|
|
1955
1955
|
},
|
|
1956
1956
|
groupId: ie
|
|
1957
1957
|
}
|
|
1958
1958
|
});
|
|
1959
1959
|
}, { deep: !0 });
|
|
1960
|
-
}), o.$subscribe(({ events: i, type:
|
|
1961
|
-
if (t.notifyComponentUpdate(), t.sendInspectorState(
|
|
1960
|
+
}), o.$subscribe(({ events: i, type: s }, r) => {
|
|
1961
|
+
if (t.notifyComponentUpdate(), t.sendInspectorState(W), !Ce)
|
|
1962
1962
|
return;
|
|
1963
1963
|
const u = {
|
|
1964
1964
|
time: n(),
|
|
1965
|
-
title:
|
|
1966
|
-
data:
|
|
1965
|
+
title: cn(s),
|
|
1966
|
+
data: dn({ store: ee(o.$id) }, un(i)),
|
|
1967
1967
|
groupId: ie
|
|
1968
1968
|
};
|
|
1969
|
-
|
|
1969
|
+
s === le.patchFunction ? u.subtitle = "⤵️" : s === le.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
1970
1970
|
_custom: {
|
|
1971
1971
|
display: "DebuggerEvent",
|
|
1972
1972
|
type: "object",
|
|
@@ -1987,58 +1987,58 @@ function fn(e, o) {
|
|
|
1987
1987
|
title: "🔥 " + o.$id,
|
|
1988
1988
|
subtitle: "HMR update",
|
|
1989
1989
|
data: {
|
|
1990
|
-
store:
|
|
1991
|
-
info:
|
|
1990
|
+
store: ee(o.$id),
|
|
1991
|
+
info: ee("HMR update")
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
|
-
}), t.notifyComponentUpdate(), t.sendInspectorTree(
|
|
1994
|
+
}), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1995
1995
|
});
|
|
1996
|
-
const { $dispose:
|
|
1996
|
+
const { $dispose: a } = o;
|
|
1997
1997
|
o.$dispose = () => {
|
|
1998
|
-
|
|
1999
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(
|
|
1998
|
+
a(), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges && z(`Disposed "${o.$id}" store 🗑`);
|
|
1999
|
+
}, t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges && z(`"${o.$id}" store installed 🆕`);
|
|
2000
2000
|
});
|
|
2001
2001
|
}
|
|
2002
2002
|
let l2 = 0, ie;
|
|
2003
2003
|
function Ct(e, o, t) {
|
|
2004
|
-
const n = o.reduce((l,
|
|
2004
|
+
const n = o.reduce((l, a) => (l[a] = X(e)[a], l), {});
|
|
2005
2005
|
for (const l in n)
|
|
2006
2006
|
e[l] = function() {
|
|
2007
|
-
const
|
|
2007
|
+
const a = l2, i = t ? new Proxy(e, {
|
|
2008
2008
|
get(...r) {
|
|
2009
|
-
return ie =
|
|
2009
|
+
return ie = a, Reflect.get(...r);
|
|
2010
2010
|
},
|
|
2011
2011
|
set(...r) {
|
|
2012
|
-
return ie =
|
|
2012
|
+
return ie = a, Reflect.set(...r);
|
|
2013
2013
|
}
|
|
2014
2014
|
}) : e;
|
|
2015
|
-
ie =
|
|
2016
|
-
const
|
|
2017
|
-
return ie = void 0,
|
|
2015
|
+
ie = a;
|
|
2016
|
+
const s = n[l].apply(i, arguments);
|
|
2017
|
+
return ie = void 0, s;
|
|
2018
2018
|
};
|
|
2019
2019
|
}
|
|
2020
|
-
function
|
|
2020
|
+
function vn({ app: e, store: o, options: t }) {
|
|
2021
2021
|
if (o.$id.startsWith("__hot:"))
|
|
2022
2022
|
return;
|
|
2023
2023
|
o._isOptionsAPI = !!t.state, Ct(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2024
2024
|
const n = o._hotUpdate;
|
|
2025
|
-
|
|
2025
|
+
X(o)._hotUpdate = function(l) {
|
|
2026
2026
|
n.apply(this, arguments), Ct(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2027
|
-
},
|
|
2027
|
+
}, pn(
|
|
2028
2028
|
e,
|
|
2029
2029
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2030
2030
|
o
|
|
2031
2031
|
);
|
|
2032
2032
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const e =
|
|
2033
|
+
function hn() {
|
|
2034
|
+
const e = Tt(!0), o = e.run(() => $({}));
|
|
2035
2035
|
let t = [], n = [];
|
|
2036
2036
|
const l = fe({
|
|
2037
|
-
install(
|
|
2038
|
-
$e(l), l._a =
|
|
2037
|
+
install(a) {
|
|
2038
|
+
$e(l), l._a = a, a.provide(Kt, l), a.config.globalProperties.$pinia = l, Se && fn(a, l), n.forEach((i) => t.push(i)), n = [];
|
|
2039
2039
|
},
|
|
2040
|
-
use(
|
|
2041
|
-
return !this._a && !Gt ? n.push(
|
|
2040
|
+
use(a) {
|
|
2041
|
+
return !this._a && !Gt ? n.push(a) : t.push(a), this;
|
|
2042
2042
|
},
|
|
2043
2043
|
_p: t,
|
|
2044
2044
|
// it's actually undefined here
|
|
@@ -2048,7 +2048,7 @@ function vn() {
|
|
|
2048
2048
|
_s: /* @__PURE__ */ new Map(),
|
|
2049
2049
|
state: o
|
|
2050
2050
|
});
|
|
2051
|
-
return Se && typeof Proxy < "u" && l.use(
|
|
2051
|
+
return Se && typeof Proxy < "u" && l.use(vn), l;
|
|
2052
2052
|
}
|
|
2053
2053
|
function s2(e, o) {
|
|
2054
2054
|
for (const t in o) {
|
|
@@ -2065,8 +2065,8 @@ const a2 = () => {
|
|
|
2065
2065
|
function xt(e, o, t, n = a2) {
|
|
2066
2066
|
e.push(o);
|
|
2067
2067
|
const l = () => {
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2068
|
+
const a = e.indexOf(o);
|
|
2069
|
+
a > -1 && (e.splice(a, 1), n());
|
|
2070
2070
|
};
|
|
2071
2071
|
return !t && Mt() && tt(l), l;
|
|
2072
2072
|
}
|
|
@@ -2075,7 +2075,7 @@ function ge(e, ...o) {
|
|
|
2075
2075
|
t(...o);
|
|
2076
2076
|
});
|
|
2077
2077
|
}
|
|
2078
|
-
const
|
|
2078
|
+
const mn = (e) => e();
|
|
2079
2079
|
function Xe(e, o) {
|
|
2080
2080
|
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);
|
|
2081
2081
|
for (const t in o) {
|
|
@@ -2086,37 +2086,37 @@ function Xe(e, o) {
|
|
|
2086
2086
|
}
|
|
2087
2087
|
return e;
|
|
2088
2088
|
}
|
|
2089
|
-
const
|
|
2089
|
+
const bn = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2090
2090
|
/* istanbul ignore next */
|
|
2091
2091
|
Symbol()
|
|
2092
2092
|
);
|
|
2093
|
-
function
|
|
2094
|
-
return !pe(e) || !e.hasOwnProperty(
|
|
2093
|
+
function gn(e) {
|
|
2094
|
+
return !pe(e) || !e.hasOwnProperty(bn);
|
|
2095
2095
|
}
|
|
2096
|
-
const { assign:
|
|
2096
|
+
const { assign: Q } = Object;
|
|
2097
2097
|
function yt(e) {
|
|
2098
2098
|
return !!(xe(e) && e.effect);
|
|
2099
2099
|
}
|
|
2100
2100
|
function wt(e, o, t, n) {
|
|
2101
|
-
const { state: l, actions:
|
|
2101
|
+
const { state: l, actions: a, getters: i } = o, s = t.state.value[e];
|
|
2102
2102
|
let r;
|
|
2103
2103
|
function u() {
|
|
2104
|
-
!
|
|
2104
|
+
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2105
2105
|
const c = process.env.NODE_ENV !== "production" && n ? (
|
|
2106
2106
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2107
|
-
ct(
|
|
2107
|
+
ct($(l ? l() : {}).value)
|
|
2108
2108
|
) : ct(t.state.value[e]);
|
|
2109
|
-
return
|
|
2109
|
+
return Q(c, a, Object.keys(i || {}).reduce((p, b) => (process.env.NODE_ENV !== "production" && b in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${e}".`), p[b] = fe(E(() => {
|
|
2110
2110
|
$e(t);
|
|
2111
|
-
const
|
|
2112
|
-
return i[
|
|
2111
|
+
const w = t._s.get(e);
|
|
2112
|
+
return i[b].call(w, w);
|
|
2113
2113
|
})), p), {}));
|
|
2114
2114
|
}
|
|
2115
2115
|
return r = et(e, u, o, t, n, !0), r;
|
|
2116
2116
|
}
|
|
2117
|
-
function et(e, o, t = {}, n, l,
|
|
2117
|
+
function et(e, o, t = {}, n, l, a) {
|
|
2118
2118
|
let i;
|
|
2119
|
-
const
|
|
2119
|
+
const s = Q({ actions: {} }, t);
|
|
2120
2120
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2121
2121
|
throw new Error("Pinia destroyed");
|
|
2122
2122
|
const r = {
|
|
@@ -2124,34 +2124,34 @@ function et(e, o, t = {}, n, l, s) {
|
|
|
2124
2124
|
// flush: 'post',
|
|
2125
2125
|
};
|
|
2126
2126
|
process.env.NODE_ENV !== "production" && !Gt && (r.onTrigger = (d) => {
|
|
2127
|
-
u ?
|
|
2127
|
+
u ? w = d : u == !1 && !g._hotUpdating && (Array.isArray(w) ? w.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2128
2128
|
});
|
|
2129
|
-
let u, c, p = [],
|
|
2130
|
-
const
|
|
2131
|
-
!
|
|
2132
|
-
const
|
|
2133
|
-
let
|
|
2134
|
-
function
|
|
2129
|
+
let u, c, p = [], b = [], w;
|
|
2130
|
+
const m = n.state.value[e];
|
|
2131
|
+
!a && !m && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2132
|
+
const _ = $({});
|
|
2133
|
+
let P;
|
|
2134
|
+
function I(d) {
|
|
2135
2135
|
let f;
|
|
2136
|
-
u = c = !1, process.env.NODE_ENV !== "production" && (
|
|
2137
|
-
type:
|
|
2136
|
+
u = c = !1, process.env.NODE_ENV !== "production" && (w = []), typeof d == "function" ? (d(n.state.value[e]), f = {
|
|
2137
|
+
type: le.patchFunction,
|
|
2138
2138
|
storeId: e,
|
|
2139
|
-
events:
|
|
2139
|
+
events: w
|
|
2140
2140
|
}) : (Xe(n.state.value[e], d), f = {
|
|
2141
|
-
type:
|
|
2141
|
+
type: le.patchObject,
|
|
2142
2142
|
payload: d,
|
|
2143
2143
|
storeId: e,
|
|
2144
|
-
events:
|
|
2144
|
+
events: w
|
|
2145
2145
|
});
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2148
|
-
|
|
2146
|
+
const S = P = Symbol();
|
|
2147
|
+
te().then(() => {
|
|
2148
|
+
P === S && (u = !0);
|
|
2149
2149
|
}), c = !0, ge(p, f, n.state.value[e]);
|
|
2150
2150
|
}
|
|
2151
|
-
const
|
|
2152
|
-
const { state: f } = t,
|
|
2153
|
-
this.$patch((
|
|
2154
|
-
|
|
2151
|
+
const x = a ? function() {
|
|
2152
|
+
const { state: f } = t, S = f ? f() : {};
|
|
2153
|
+
this.$patch((T) => {
|
|
2154
|
+
Q(T, S);
|
|
2155
2155
|
});
|
|
2156
2156
|
} : (
|
|
2157
2157
|
/* istanbul ignore next */
|
|
@@ -2159,61 +2159,61 @@ function et(e, o, t = {}, n, l, s) {
|
|
|
2159
2159
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2160
2160
|
} : a2
|
|
2161
2161
|
);
|
|
2162
|
-
function
|
|
2163
|
-
i.stop(), p = [],
|
|
2162
|
+
function V() {
|
|
2163
|
+
i.stop(), p = [], b = [], n._s.delete(e);
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2165
|
+
function R(d, f) {
|
|
2166
2166
|
return function() {
|
|
2167
2167
|
$e(n);
|
|
2168
|
-
const
|
|
2169
|
-
function D(
|
|
2170
|
-
|
|
2168
|
+
const S = Array.from(arguments), T = [], F = [];
|
|
2169
|
+
function D(H) {
|
|
2170
|
+
T.push(H);
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2173
|
-
|
|
2172
|
+
function K(H) {
|
|
2173
|
+
F.push(H);
|
|
2174
2174
|
}
|
|
2175
|
-
ge(
|
|
2176
|
-
args:
|
|
2175
|
+
ge(b, {
|
|
2176
|
+
args: S,
|
|
2177
2177
|
name: d,
|
|
2178
|
-
store:
|
|
2178
|
+
store: g,
|
|
2179
2179
|
after: D,
|
|
2180
|
-
onError:
|
|
2180
|
+
onError: K
|
|
2181
2181
|
});
|
|
2182
|
-
let
|
|
2182
|
+
let Y;
|
|
2183
2183
|
try {
|
|
2184
|
-
|
|
2185
|
-
} catch (
|
|
2186
|
-
throw ge(
|
|
2184
|
+
Y = f.apply(this && this.$id === e ? this : g, S);
|
|
2185
|
+
} catch (H) {
|
|
2186
|
+
throw ge(F, H), H;
|
|
2187
2187
|
}
|
|
2188
|
-
return
|
|
2188
|
+
return Y instanceof Promise ? Y.then((H) => (ge(T, H), H)).catch((H) => (ge(F, H), Promise.reject(H))) : (ge(T, Y), Y);
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
|
-
const
|
|
2191
|
+
const y = /* @__PURE__ */ fe({
|
|
2192
2192
|
actions: {},
|
|
2193
2193
|
getters: {},
|
|
2194
2194
|
state: [],
|
|
2195
|
-
hotState:
|
|
2195
|
+
hotState: _
|
|
2196
2196
|
}), M = {
|
|
2197
2197
|
_p: n,
|
|
2198
2198
|
// _s: scope,
|
|
2199
2199
|
$id: e,
|
|
2200
|
-
$onAction: xt.bind(null,
|
|
2201
|
-
$patch:
|
|
2202
|
-
$reset:
|
|
2200
|
+
$onAction: xt.bind(null, b),
|
|
2201
|
+
$patch: I,
|
|
2202
|
+
$reset: x,
|
|
2203
2203
|
$subscribe(d, f = {}) {
|
|
2204
|
-
const
|
|
2204
|
+
const S = xt(p, d, f.detached, () => T()), T = i.run(() => j(() => n.state.value[e], (F) => {
|
|
2205
2205
|
(f.flush === "sync" ? c : u) && d({
|
|
2206
2206
|
storeId: e,
|
|
2207
|
-
type:
|
|
2208
|
-
events:
|
|
2209
|
-
},
|
|
2210
|
-
},
|
|
2211
|
-
return
|
|
2207
|
+
type: le.direct,
|
|
2208
|
+
events: w
|
|
2209
|
+
}, F);
|
|
2210
|
+
}, Q({}, r, f)));
|
|
2211
|
+
return S;
|
|
2212
2212
|
},
|
|
2213
|
-
$dispose:
|
|
2214
|
-
},
|
|
2213
|
+
$dispose: V
|
|
2214
|
+
}, g = $t(process.env.NODE_ENV !== "production" || Se ? Q(
|
|
2215
2215
|
{
|
|
2216
|
-
_hmrPayload:
|
|
2216
|
+
_hmrPayload: y,
|
|
2217
2217
|
_customProperties: fe(/* @__PURE__ */ new Set())
|
|
2218
2218
|
// devtools custom properties
|
|
2219
2219
|
},
|
|
@@ -2221,58 +2221,58 @@ function et(e, o, t = {}, n, l, s) {
|
|
|
2221
2221
|
// must be added later
|
|
2222
2222
|
// setupStore
|
|
2223
2223
|
) : M);
|
|
2224
|
-
n._s.set(e,
|
|
2225
|
-
const A = (n._a && n._a.runWithContext ||
|
|
2224
|
+
n._s.set(e, g);
|
|
2225
|
+
const A = (n._a && n._a.runWithContext || mn)(() => n._e.run(() => (i = Tt()).run(o)));
|
|
2226
2226
|
for (const d in A) {
|
|
2227
2227
|
const f = A[d];
|
|
2228
2228
|
if (xe(f) && !yt(f) || lt(f))
|
|
2229
|
-
process.env.NODE_ENV !== "production" && l ?
|
|
2229
|
+
process.env.NODE_ENV !== "production" && l ? ke(_.value, d, Ge(A, d)) : a || (m && gn(f) && (xe(f) ? f.value = m[d] : Xe(f, m[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && y.state.push(d);
|
|
2230
2230
|
else if (typeof f == "function") {
|
|
2231
|
-
const
|
|
2232
|
-
A[d] =
|
|
2233
|
-
} else process.env.NODE_ENV !== "production" && yt(f) && (
|
|
2231
|
+
const S = process.env.NODE_ENV !== "production" && l ? f : R(d, f);
|
|
2232
|
+
A[d] = S, process.env.NODE_ENV !== "production" && (y.actions[d] = f), s.actions[d] = f;
|
|
2233
|
+
} else process.env.NODE_ENV !== "production" && yt(f) && (y.getters[d] = a ? (
|
|
2234
2234
|
// @ts-expect-error
|
|
2235
2235
|
t.getters[d]
|
|
2236
|
-
) : f,
|
|
2236
|
+
) : f, He && (A._getters || // @ts-expect-error: same
|
|
2237
2237
|
(A._getters = fe([]))).push(d));
|
|
2238
2238
|
}
|
|
2239
|
-
if (
|
|
2240
|
-
get: () => process.env.NODE_ENV !== "production" && l ?
|
|
2239
|
+
if (Q(g, A), Q(X(g), A), Object.defineProperty(g, "$state", {
|
|
2240
|
+
get: () => process.env.NODE_ENV !== "production" && l ? _.value : n.state.value[e],
|
|
2241
2241
|
set: (d) => {
|
|
2242
2242
|
if (process.env.NODE_ENV !== "production" && l)
|
|
2243
2243
|
throw new Error("cannot set hotState");
|
|
2244
|
-
|
|
2245
|
-
|
|
2244
|
+
I((f) => {
|
|
2245
|
+
Q(f, d);
|
|
2246
2246
|
});
|
|
2247
2247
|
}
|
|
2248
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
2249
|
-
|
|
2250
|
-
if (f in
|
|
2251
|
-
const
|
|
2252
|
-
typeof
|
|
2248
|
+
}), process.env.NODE_ENV !== "production" && (g._hotUpdate = fe((d) => {
|
|
2249
|
+
g._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2250
|
+
if (f in g.$state) {
|
|
2251
|
+
const S = d.$state[f], T = g.$state[f];
|
|
2252
|
+
typeof S == "object" && pe(S) && pe(T) ? s2(S, T) : d.$state[f] = T;
|
|
2253
2253
|
}
|
|
2254
|
-
|
|
2255
|
-
}), Object.keys(
|
|
2256
|
-
f in d.$state || Ke(
|
|
2257
|
-
}), u = !1, c = !1, n.state.value[e] = Ge(d._hmrPayload, "hotState"), c = !0,
|
|
2254
|
+
ke(g, f, Ge(d.$state, f));
|
|
2255
|
+
}), Object.keys(g.$state).forEach((f) => {
|
|
2256
|
+
f in d.$state || Ke(g, f);
|
|
2257
|
+
}), u = !1, c = !1, n.state.value[e] = Ge(d._hmrPayload, "hotState"), c = !0, te().then(() => {
|
|
2258
2258
|
u = !0;
|
|
2259
2259
|
});
|
|
2260
2260
|
for (const f in d._hmrPayload.actions) {
|
|
2261
|
-
const
|
|
2262
|
-
|
|
2261
|
+
const S = d[f];
|
|
2262
|
+
ke(g, f, R(f, S));
|
|
2263
2263
|
}
|
|
2264
2264
|
for (const f in d._hmrPayload.getters) {
|
|
2265
|
-
const
|
|
2265
|
+
const S = d._hmrPayload.getters[f], T = a ? (
|
|
2266
2266
|
// special handling of options api
|
|
2267
|
-
|
|
2268
|
-
) :
|
|
2269
|
-
|
|
2267
|
+
E(() => ($e(n), S.call(g, g)))
|
|
2268
|
+
) : S;
|
|
2269
|
+
ke(g, f, T);
|
|
2270
2270
|
}
|
|
2271
|
-
Object.keys(
|
|
2272
|
-
f in d._hmrPayload.getters || Ke(
|
|
2273
|
-
}), Object.keys(
|
|
2274
|
-
f in d._hmrPayload.actions || Ke(
|
|
2275
|
-
}),
|
|
2271
|
+
Object.keys(g._hmrPayload.getters).forEach((f) => {
|
|
2272
|
+
f in d._hmrPayload.getters || Ke(g, f);
|
|
2273
|
+
}), Object.keys(g._hmrPayload.actions).forEach((f) => {
|
|
2274
|
+
f in d._hmrPayload.actions || Ke(g, f);
|
|
2275
|
+
}), g._hmrPayload = d._hmrPayload, g._getters = d._getters, g._hotUpdating = !1;
|
|
2276
2276
|
})), Se) {
|
|
2277
2277
|
const d = {
|
|
2278
2278
|
writable: !0,
|
|
@@ -2281,65 +2281,73 @@ function et(e, o, t = {}, n, l, s) {
|
|
|
2281
2281
|
enumerable: !1
|
|
2282
2282
|
};
|
|
2283
2283
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((f) => {
|
|
2284
|
-
Object.defineProperty(
|
|
2284
|
+
Object.defineProperty(g, f, Q({ value: g[f] }, d));
|
|
2285
2285
|
});
|
|
2286
2286
|
}
|
|
2287
2287
|
return n._p.forEach((d) => {
|
|
2288
2288
|
if (Se) {
|
|
2289
2289
|
const f = i.run(() => d({
|
|
2290
|
-
store:
|
|
2290
|
+
store: g,
|
|
2291
2291
|
app: n._a,
|
|
2292
2292
|
pinia: n,
|
|
2293
|
-
options:
|
|
2293
|
+
options: s
|
|
2294
2294
|
}));
|
|
2295
|
-
Object.keys(f || {}).forEach((
|
|
2295
|
+
Object.keys(f || {}).forEach((S) => g._customProperties.add(S)), Q(g, f);
|
|
2296
2296
|
} else
|
|
2297
|
-
|
|
2298
|
-
store:
|
|
2297
|
+
Q(g, i.run(() => d({
|
|
2298
|
+
store: g,
|
|
2299
2299
|
app: n._a,
|
|
2300
2300
|
pinia: n,
|
|
2301
|
-
options:
|
|
2301
|
+
options: s
|
|
2302
2302
|
})));
|
|
2303
|
-
}), process.env.NODE_ENV !== "production" &&
|
|
2303
|
+
}), process.env.NODE_ENV !== "production" && g.$state && typeof g.$state == "object" && typeof g.$state.constructor == "function" && !g.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2304
2304
|
state: () => new MyClass()
|
|
2305
|
-
Found in store "${
|
|
2305
|
+
Found in store "${g.$id}".`), m && a && t.hydrate && t.hydrate(g.$state, m), u = !0, c = !0, g;
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2307
|
+
function ze(e, o, t) {
|
|
2308
2308
|
let n, l;
|
|
2309
|
-
const
|
|
2309
|
+
const a = typeof o == "function";
|
|
2310
2310
|
if (typeof e == "string")
|
|
2311
|
-
n = e, l =
|
|
2311
|
+
n = e, l = a ? t : o;
|
|
2312
2312
|
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2313
2313
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2314
|
-
function i(
|
|
2315
|
-
const u =
|
|
2316
|
-
if (
|
|
2314
|
+
function i(s, r) {
|
|
2315
|
+
const u = h2();
|
|
2316
|
+
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2317
2317
|
// pinia instance with getActivePinia()
|
|
2318
|
-
(process.env.NODE_ENV === "test" && _e && _e._testing ? null :
|
|
2318
|
+
(process.env.NODE_ENV === "test" && _e && _e._testing ? null : s) || (u ? Te(Kt, null) : null), s && $e(s), process.env.NODE_ENV !== "production" && !_e)
|
|
2319
2319
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2320
2320
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2321
2321
|
This will fail in production.`);
|
|
2322
|
-
|
|
2323
|
-
const c =
|
|
2322
|
+
s = _e, s._s.has(n) || (a ? et(n, o, l, s) : wt(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2323
|
+
const c = s._s.get(n);
|
|
2324
2324
|
if (process.env.NODE_ENV !== "production" && r) {
|
|
2325
|
-
const p = "__hot:" + n,
|
|
2326
|
-
r._hotUpdate(
|
|
2325
|
+
const p = "__hot:" + n, b = a ? et(p, o, l, s, !0) : wt(p, Q({}, l), s, !0);
|
|
2326
|
+
r._hotUpdate(b), delete s.state.value[p], s._s.delete(p);
|
|
2327
2327
|
}
|
|
2328
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2328
|
+
if (process.env.NODE_ENV !== "production" && He) {
|
|
2329
2329
|
const p = Lt();
|
|
2330
2330
|
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2331
2331
|
!r) {
|
|
2332
|
-
const
|
|
2333
|
-
|
|
2332
|
+
const b = p.proxy, w = "_pStores" in b ? b._pStores : b._pStores = {};
|
|
2333
|
+
w[n] = c;
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
2336
2336
|
return c;
|
|
2337
2337
|
}
|
|
2338
2338
|
return i.$id = n, i;
|
|
2339
2339
|
}
|
|
2340
|
-
const
|
|
2340
|
+
const Me = ze("loader", () => {
|
|
2341
|
+
const e = $({
|
|
2342
|
+
translation: !1,
|
|
2343
|
+
aiExplanation: !1
|
|
2344
|
+
});
|
|
2345
|
+
return { loadingStates: e, setLoading: (n, l) => {
|
|
2346
|
+
e.value[n] = l;
|
|
2347
|
+
}, isLoading: (n) => e.value[n] };
|
|
2348
|
+
}), _t = {
|
|
2341
2349
|
__name: "Select",
|
|
2342
|
-
props: /* @__PURE__ */
|
|
2350
|
+
props: /* @__PURE__ */ m2({
|
|
2343
2351
|
languages: {
|
|
2344
2352
|
type: Object,
|
|
2345
2353
|
required: !0
|
|
@@ -2350,55 +2358,55 @@ const ze = He("loader", () => ({ loading: O(!1) })), _t = {
|
|
|
2350
2358
|
}),
|
|
2351
2359
|
emits: ["update:modelValue"],
|
|
2352
2360
|
setup(e) {
|
|
2353
|
-
const o =
|
|
2361
|
+
const o = Me(), t = e, n = b2(e, "modelValue"), l = $(""), a = $(null), i = E(() => Object.entries(t.languages).filter(
|
|
2354
2362
|
([, r]) => r.toLowerCase().includes(l.value.toLowerCase())
|
|
2355
|
-
)),
|
|
2356
|
-
r.target.value = "", l.value = "",
|
|
2363
|
+
)), s = (r) => {
|
|
2364
|
+
r.target.value = "", l.value = "", a.value && a.value.$el.click();
|
|
2357
2365
|
};
|
|
2358
|
-
return (r, u) => (
|
|
2366
|
+
return (r, u) => (C(), G(L(P0), {
|
|
2359
2367
|
modelValue: n.value,
|
|
2360
2368
|
"onUpdate:modelValue": u[3] || (u[3] = (c) => n.value = c),
|
|
2361
|
-
disabled:
|
|
2369
|
+
disabled: L(o).loading,
|
|
2362
2370
|
as: "div",
|
|
2363
2371
|
class: "relative mt-1"
|
|
2364
2372
|
}, {
|
|
2365
|
-
default:
|
|
2366
|
-
N(
|
|
2373
|
+
default: Ae(() => [
|
|
2374
|
+
N(L(D0), {
|
|
2367
2375
|
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",
|
|
2368
2376
|
onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
|
|
2369
2377
|
displayValue: (c) => e.languages[c],
|
|
2370
|
-
onFocus: u[1] || (u[1] = (c) =>
|
|
2378
|
+
onFocus: u[1] || (u[1] = (c) => s(c))
|
|
2371
2379
|
}, null, 8, ["displayValue"]),
|
|
2372
|
-
N(
|
|
2380
|
+
N(L(R0), {
|
|
2373
2381
|
ref_key: "btnSelect",
|
|
2374
|
-
ref:
|
|
2382
|
+
ref: a,
|
|
2375
2383
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
2376
2384
|
}, {
|
|
2377
|
-
default:
|
|
2378
|
-
N(
|
|
2385
|
+
default: Ae(() => [
|
|
2386
|
+
N(L(H0), {
|
|
2379
2387
|
class: "h-5 w-5 text-gray-400",
|
|
2380
2388
|
"aria-hidden": "true",
|
|
2381
|
-
onClick: u[2] || (u[2] = (c) =>
|
|
2389
|
+
onClick: u[2] || (u[2] = (c) => s(c))
|
|
2382
2390
|
})
|
|
2383
2391
|
]),
|
|
2384
2392
|
_: 1
|
|
2385
2393
|
}, 512),
|
|
2386
|
-
N(
|
|
2387
|
-
default:
|
|
2388
|
-
(
|
|
2394
|
+
N(L(N0), { 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" }, {
|
|
2395
|
+
default: Ae(() => [
|
|
2396
|
+
(C(!0), O(J, null, oe(i.value, ([c, p]) => (C(), G(L(B0), {
|
|
2389
2397
|
key: c,
|
|
2390
2398
|
value: c
|
|
2391
2399
|
}, {
|
|
2392
|
-
default:
|
|
2400
|
+
default: Ae(({ active: b, selected: w }) => [
|
|
2393
2401
|
v("li", {
|
|
2394
|
-
class:
|
|
2402
|
+
class: B([
|
|
2395
2403
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
2396
|
-
|
|
2404
|
+
b ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
2397
2405
|
])
|
|
2398
2406
|
}, [
|
|
2399
2407
|
v("span", {
|
|
2400
|
-
class:
|
|
2401
|
-
},
|
|
2408
|
+
class: B(["block truncate", w && "font-semibold"])
|
|
2409
|
+
}, ne(p), 3)
|
|
2402
2410
|
], 2)
|
|
2403
2411
|
]),
|
|
2404
2412
|
_: 2
|
|
@@ -2410,19 +2418,19 @@ const ze = He("loader", () => ({ loading: O(!1) })), _t = {
|
|
|
2410
2418
|
_: 1
|
|
2411
2419
|
}, 8, ["modelValue", "disabled"]));
|
|
2412
2420
|
}
|
|
2413
|
-
}, i2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%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",
|
|
2421
|
+
}, i2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%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", Cn = ["disabled"], xn = /* @__PURE__ */ v("img", {
|
|
2414
2422
|
src: i2,
|
|
2415
2423
|
alt: "swap",
|
|
2416
2424
|
class: "w-4"
|
|
2417
|
-
}, null, -1),
|
|
2418
|
-
|
|
2419
|
-
],
|
|
2425
|
+
}, null, -1), yn = [
|
|
2426
|
+
xn
|
|
2427
|
+
], wn = ["disabled"], _n = /* @__PURE__ */ v("img", {
|
|
2420
2428
|
src: i2,
|
|
2421
2429
|
alt: "swap",
|
|
2422
2430
|
class: "w-4"
|
|
2423
|
-
}, null, -1),
|
|
2424
|
-
|
|
2425
|
-
],
|
|
2431
|
+
}, null, -1), Sn = [
|
|
2432
|
+
_n
|
|
2433
|
+
], En = {
|
|
2426
2434
|
__name: "SwapBtn",
|
|
2427
2435
|
props: {
|
|
2428
2436
|
isBidirect: {
|
|
@@ -2432,22 +2440,22 @@ const ze = He("loader", () => ({ loading: O(!1) })), _t = {
|
|
|
2432
2440
|
},
|
|
2433
2441
|
emits: ["swap"],
|
|
2434
2442
|
setup(e, { emit: o }) {
|
|
2435
|
-
const t =
|
|
2436
|
-
return (
|
|
2443
|
+
const t = Me(), n = E(() => t.isLoading("translation")), l = o;
|
|
2444
|
+
return (a, i) => e.isBidirect ? (C(), O("button", {
|
|
2437
2445
|
key: 1,
|
|
2438
|
-
onClick:
|
|
2439
|
-
disabled:
|
|
2440
|
-
},
|
|
2446
|
+
onClick: i[0] || (i[0] = (s) => l("swap")),
|
|
2447
|
+
disabled: n.value
|
|
2448
|
+
}, Sn, 8, wn)) : (C(), O("button", {
|
|
2441
2449
|
key: 0,
|
|
2442
|
-
disabled:
|
|
2443
|
-
},
|
|
2450
|
+
disabled: n.value
|
|
2451
|
+
}, yn, 8, Cn));
|
|
2444
2452
|
}
|
|
2445
|
-
}, Ue =
|
|
2446
|
-
const e =
|
|
2453
|
+
}, Ue = ze("language", () => {
|
|
2454
|
+
const e = $("auto"), o = $("en"), t = $({
|
|
2447
2455
|
src: [],
|
|
2448
2456
|
target: []
|
|
2449
|
-
}), n =
|
|
2450
|
-
function
|
|
2457
|
+
}), n = E(() => t.value.src[e.value]), l = E(() => t.value.target[o.value]);
|
|
2458
|
+
function a(r, u) {
|
|
2451
2459
|
e.value = r == null ? void 0 : r.src, o.value = r == null ? void 0 : r.target, t.value = u;
|
|
2452
2460
|
}
|
|
2453
2461
|
function i() {
|
|
@@ -2455,41 +2463,41 @@ const ze = He("loader", () => ({ loading: O(!1) })), _t = {
|
|
|
2455
2463
|
const r = e.value;
|
|
2456
2464
|
e.value = o.value, o.value = r;
|
|
2457
2465
|
}
|
|
2458
|
-
function
|
|
2466
|
+
function s(r) {
|
|
2459
2467
|
return t.value.src[r] || t.value.target[r];
|
|
2460
2468
|
}
|
|
2461
|
-
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init:
|
|
2462
|
-
}),
|
|
2469
|
+
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: a, swap: i, getLabel: s };
|
|
2470
|
+
}), On = {
|
|
2463
2471
|
key: 0,
|
|
2464
2472
|
class: "flex"
|
|
2465
|
-
},
|
|
2473
|
+
}, In = {
|
|
2466
2474
|
__name: "Selects",
|
|
2467
2475
|
setup(e) {
|
|
2468
2476
|
const o = Ue();
|
|
2469
2477
|
function t() {
|
|
2470
2478
|
o.swap();
|
|
2471
2479
|
}
|
|
2472
|
-
return (n, l) =>
|
|
2480
|
+
return (n, l) => L(o).languages ? (C(), O("div", On, [
|
|
2473
2481
|
N(_t, {
|
|
2474
|
-
modelValue:
|
|
2475
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
2476
|
-
languages:
|
|
2482
|
+
modelValue: L(o).src,
|
|
2483
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => L(o).src = a),
|
|
2484
|
+
languages: L(o).languages.src,
|
|
2477
2485
|
class: "grow"
|
|
2478
2486
|
}, null, 8, ["modelValue", "languages"]),
|
|
2479
|
-
N(
|
|
2480
|
-
isBidirect:
|
|
2487
|
+
N(En, {
|
|
2488
|
+
isBidirect: L(o).src !== "auto",
|
|
2481
2489
|
class: "grow-0 mx-3",
|
|
2482
2490
|
onSwap: t
|
|
2483
2491
|
}, null, 8, ["isBidirect"]),
|
|
2484
2492
|
N(_t, {
|
|
2485
|
-
modelValue:
|
|
2486
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
2487
|
-
languages:
|
|
2493
|
+
modelValue: L(o).target,
|
|
2494
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => L(o).target = a),
|
|
2495
|
+
languages: L(o).languages.target,
|
|
2488
2496
|
class: "grow"
|
|
2489
2497
|
}, null, 8, ["modelValue", "languages"])
|
|
2490
|
-
])) :
|
|
2498
|
+
])) : Z("", !0);
|
|
2491
2499
|
}
|
|
2492
|
-
},
|
|
2500
|
+
}, $n = {
|
|
2493
2501
|
INPUT_MAX_LENGTH: 5e3,
|
|
2494
2502
|
INPUT_DEBOUNCE: 500
|
|
2495
2503
|
}, Ze = (e, o) => {
|
|
@@ -2497,12 +2505,12 @@ const ze = He("loader", () => ({ loading: O(!1) })), _t = {
|
|
|
2497
2505
|
for (const [n, l] of o)
|
|
2498
2506
|
t[n] = l;
|
|
2499
2507
|
return t;
|
|
2500
|
-
},
|
|
2501
|
-
function
|
|
2502
|
-
return
|
|
2508
|
+
}, Tn = {}, Ln = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2509
|
+
function Mn(e, o) {
|
|
2510
|
+
return C(), O("span", Ln);
|
|
2503
2511
|
}
|
|
2504
|
-
const
|
|
2505
|
-
const e =
|
|
2512
|
+
const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
2513
|
+
const e = $({
|
|
2506
2514
|
src: null,
|
|
2507
2515
|
target: null
|
|
2508
2516
|
});
|
|
@@ -2525,7 +2533,7 @@ const Mn = /* @__PURE__ */ Ze($n, [["render", Ln]]), r2 = He("tts", () => {
|
|
|
2525
2533
|
get: t,
|
|
2526
2534
|
reset: n
|
|
2527
2535
|
};
|
|
2528
|
-
}),
|
|
2536
|
+
}), An = "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", Vn = "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", kn = ["disabled"], Fn = ["src"], Pn = ["src"], Rn = {
|
|
2529
2537
|
__name: "SpeakBtn",
|
|
2530
2538
|
props: {
|
|
2531
2539
|
type: {
|
|
@@ -2536,11 +2544,11 @@ const Mn = /* @__PURE__ */ Ze($n, [["render", Ln]]), r2 = He("tts", () => {
|
|
|
2536
2544
|
},
|
|
2537
2545
|
emits: ["loadTTS"],
|
|
2538
2546
|
setup(e, { emit: o }) {
|
|
2539
|
-
const t =
|
|
2540
|
-
|
|
2541
|
-
|
|
2547
|
+
const t = u2(), n = e, l = o, a = E(() => t.tts[n.type]), i = $(!1), s = new Audio();
|
|
2548
|
+
j(
|
|
2549
|
+
a,
|
|
2542
2550
|
() => {
|
|
2543
|
-
if (!
|
|
2551
|
+
if (!a.value) {
|
|
2544
2552
|
i.value = !1;
|
|
2545
2553
|
return;
|
|
2546
2554
|
}
|
|
@@ -2548,38 +2556,38 @@ const Mn = /* @__PURE__ */ Ze($n, [["render", Ln]]), r2 = He("tts", () => {
|
|
|
2548
2556
|
},
|
|
2549
2557
|
{ immediate: !0 }
|
|
2550
2558
|
), nt(() => {
|
|
2551
|
-
c(),
|
|
2559
|
+
c(), s.src = "";
|
|
2552
2560
|
});
|
|
2553
2561
|
function r() {
|
|
2554
|
-
if (
|
|
2562
|
+
if (a.value) {
|
|
2555
2563
|
u();
|
|
2556
2564
|
return;
|
|
2557
2565
|
}
|
|
2558
2566
|
i.value = !0, l("loadTTS");
|
|
2559
2567
|
}
|
|
2560
2568
|
function u() {
|
|
2561
|
-
|
|
2569
|
+
a.value && (s.src = a.value, i.value = !0, s.play().catch(() => {
|
|
2562
2570
|
i.value = !1;
|
|
2563
2571
|
}));
|
|
2564
2572
|
}
|
|
2565
2573
|
function c() {
|
|
2566
|
-
|
|
2574
|
+
s.pause(), s.currentTime = 0, i.value = !1;
|
|
2567
2575
|
}
|
|
2568
|
-
return
|
|
2576
|
+
return s.onended = () => {
|
|
2569
2577
|
i.value = !1;
|
|
2570
|
-
}, (p,
|
|
2578
|
+
}, (p, b) => i.value ? (C(), O("button", {
|
|
2571
2579
|
key: 1,
|
|
2572
2580
|
class: "btn btn-xs btn-circle",
|
|
2573
2581
|
onClick: dt(c, ["prevent"])
|
|
2574
2582
|
}, [
|
|
2575
2583
|
v("img", {
|
|
2576
|
-
src:
|
|
2584
|
+
src: L(Vn),
|
|
2577
2585
|
alt: "Stop",
|
|
2578
2586
|
class: "w-4 transition-all duration-200"
|
|
2579
|
-
}, null, 8,
|
|
2580
|
-
])) : (
|
|
2587
|
+
}, null, 8, Pn)
|
|
2588
|
+
])) : (C(), O("button", {
|
|
2581
2589
|
key: 0,
|
|
2582
|
-
class:
|
|
2590
|
+
class: B(["btn btn-xs btn-circle", [
|
|
2583
2591
|
{ "btn-ghost": !e.disabled },
|
|
2584
2592
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2585
2593
|
]]),
|
|
@@ -2587,114 +2595,124 @@ const Mn = /* @__PURE__ */ Ze($n, [["render", Ln]]), r2 = He("tts", () => {
|
|
|
2587
2595
|
onClick: dt(r, ["prevent"])
|
|
2588
2596
|
}, [
|
|
2589
2597
|
v("img", {
|
|
2590
|
-
src:
|
|
2598
|
+
src: L(An),
|
|
2591
2599
|
alt: "Play",
|
|
2592
|
-
class:
|
|
2593
|
-
}, null, 10,
|
|
2594
|
-
], 10,
|
|
2600
|
+
class: B(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2601
|
+
}, null, 10, Fn)
|
|
2602
|
+
], 10, kn));
|
|
2595
2603
|
}
|
|
2596
|
-
}, 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%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", Nn =
|
|
2604
|
+
}, 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%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", Nn = {
|
|
2605
|
+
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2606
|
+
"data-tip": "Clear"
|
|
2607
|
+
}, Bn = ["disabled"], jn = ["src"], Hn = {
|
|
2597
2608
|
__name: "ClearBtn",
|
|
2598
2609
|
props: {
|
|
2599
2610
|
disabled: Boolean
|
|
2600
2611
|
},
|
|
2601
2612
|
setup(e) {
|
|
2602
|
-
return (o, t) => (
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2613
|
+
return (o, t) => (C(), O("div", Nn, [
|
|
2614
|
+
v("button", {
|
|
2615
|
+
class: B(["btn btn-xs btn-circle", [
|
|
2616
|
+
{ "btn-ghost": !e.disabled },
|
|
2617
|
+
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2618
|
+
]]),
|
|
2619
|
+
disabled: e.disabled
|
|
2620
|
+
}, [
|
|
2621
|
+
v("img", {
|
|
2622
|
+
src: L(Dn),
|
|
2623
|
+
alt: "Clear",
|
|
2624
|
+
class: B(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2625
|
+
}, null, 10, jn)
|
|
2626
|
+
], 10, Bn)
|
|
2627
|
+
]));
|
|
2615
2628
|
}
|
|
2616
|
-
},
|
|
2629
|
+
}, zn = "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", Un = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", Zn = {
|
|
2630
|
+
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2631
|
+
"data-tip": "Favorite"
|
|
2632
|
+
}, Wn = ["disabled"], Gn = ["src"], qn = {
|
|
2617
2633
|
__name: "FavoriteBtn",
|
|
2618
2634
|
props: {
|
|
2619
2635
|
disabled: Boolean,
|
|
2620
2636
|
isFilled: Boolean
|
|
2621
2637
|
},
|
|
2622
2638
|
setup(e) {
|
|
2623
|
-
return (o, t) => (
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2639
|
+
return (o, t) => (C(), O("div", Zn, [
|
|
2640
|
+
v("button", {
|
|
2641
|
+
class: B(["btn btn-xs btn-circle", [
|
|
2642
|
+
{ "btn-ghost": !e.disabled },
|
|
2643
|
+
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2644
|
+
]]),
|
|
2645
|
+
disabled: e.disabled
|
|
2646
|
+
}, [
|
|
2647
|
+
v("img", {
|
|
2648
|
+
src: e.isFilled ? L(zn) : L(Un),
|
|
2649
|
+
alt: "Favorite",
|
|
2650
|
+
class: B(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2651
|
+
}, null, 10, Gn)
|
|
2652
|
+
], 10, Wn)
|
|
2653
|
+
]));
|
|
2636
2654
|
}
|
|
2637
|
-
},
|
|
2655
|
+
}, Jn = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='%23FFC857'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='%23FFC857'/%3e%3ccircle%20cx='3.5'%20cy='3.5'%20r='1.5'%20fill='%23FFC857'/%3e%3cellipse%20cx='4.5'%20cy='10'%20rx='0.5'%20ry='1'%20fill='%23FFC857'/%3e%3cpath%20d='M3.5%201L4.79904%202.5H2.20096L3.5%201Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6%203.5L4.5%204.79904L4.5%202.20096L6%203.5Z'%20fill='%23FFC857'/%3e%3cpath%20d='M10.3697%206.67832L8.22108%207.01422L9.5776%204.65296L10.3697%206.67832Z'%20fill='%23FFC857'/%3e%3cpath%20d='M8.27756%205.34149L10.768%206.00067L9.11199%207.77878L8.27756%205.34149Z'%20fill='%23FFC857'/%3e%3cpath%20d='M1%203.5L2.5%202.20096L2.5%204.79904L1%203.5Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.5%206L2.20096%204.5L4.79904%204.5L3.5%206Z'%20fill='%23FFC857'/%3e%3ccircle%20cx='9'%20cy='6'%20r='1'%20fill='%23FFC857'/%3e%3cpath%20d='M5.49718%209.92495L4.03391%2010.4693L3.96891%209.60573L5.49718%209.92495Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.54089%209.71696L5.10212%209.72621L4.857%2010.5568L3.54089%209.71696Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.50071%209.96247L5.0159%209.58606L4.9834%2010.4515L3.50071%209.96247Z'%20fill='%23FFC857'/%3e%3c/svg%3e", Kn = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='%23FFC857'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='%23FFC857'/%3e%3c/svg%3e", Yn = {
|
|
2656
|
+
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2657
|
+
"data-tip": "AI Translate"
|
|
2658
|
+
}, Qn = ["disabled"], Xn = ["src"], c2 = {
|
|
2638
2659
|
__name: "AIBtn",
|
|
2639
2660
|
props: {
|
|
2640
2661
|
disabled: Boolean,
|
|
2641
2662
|
isFilled: Boolean
|
|
2642
2663
|
},
|
|
2643
2664
|
setup(e) {
|
|
2644
|
-
return (o, t) => (
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2665
|
+
return (o, t) => (C(), O("div", Yn, [
|
|
2666
|
+
v("button", {
|
|
2667
|
+
class: B(["btn btn-xs btn-circle", [
|
|
2668
|
+
{ "btn-ghost": !e.disabled },
|
|
2669
|
+
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2670
|
+
]]),
|
|
2671
|
+
disabled: e.disabled
|
|
2672
|
+
}, [
|
|
2673
|
+
v("img", {
|
|
2674
|
+
src: e.isFilled ? L(Jn) : L(Kn),
|
|
2675
|
+
alt: "AI",
|
|
2676
|
+
class: B(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2677
|
+
}, null, 10, Xn)
|
|
2678
|
+
], 10, Qn)
|
|
2679
|
+
]));
|
|
2657
2680
|
}
|
|
2658
|
-
},
|
|
2681
|
+
}, eo = "data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.9023%203.26667L10.8093%200.1C10.7767%200.0666667%2010.7116%200%2010.5814%200H3.74419C3.12558%200%202.60465%200.533333%202.60465%201.16667V2.66667H1.13953C0.52093%202.66667%200%203.2%200%203.83333V14.8667C0%2015.4667%200.52093%2016%201.13953%2016H10.2558C10.8744%2016%2011.3953%2015.4667%2011.3953%2014.8333V13.3333H12.8605C13.4791%2013.3333%2014%2012.8%2014%2012.1667V3.5C14%203.4%2013.9674%203.3%2013.9023%203.26667ZM12.893%203.16667H11.3954C11.1349%203.16667%2010.907%202.93333%2010.907%202.66667V1.13333L12.893%203.16667ZM10.2558%2015.3333H1.13953C0.87907%2015.3333%200.651163%2015.1%200.651163%2014.8333V3.83333C0.651163%203.53333%200.87907%203.33333%201.13953%203.33333H7.68372V5.33333C7.68372%205.96667%208.20465%206.5%208.82326%206.5H10.7767V14.8667C10.7442%2015.1%2010.5488%2015.3333%2010.2558%2015.3333ZM9.31163%204.8L10.2884%205.8H8.7907C8.53023%205.8%208.30233%205.56667%208.30233%205.3V3.76667L9.31163%204.8ZM12.8605%2012.6667H11.3953V6.13333C11.3953%206.06667%2011.3628%205.96667%2011.2977%205.9L8.20465%202.73333C8.17209%202.7%208.07442%202.66667%208.0093%202.66667H3.25581V1.16667C3.25581%200.9%203.45116%200.666666%203.74419%200.666666H10.2558V2.66667C10.2558%203.3%2010.7767%203.83333%2011.3954%203.83333H13.3488V12.2C13.3488%2012.4667%2013.1209%2012.6667%2012.8605%2012.6667Z'%20fill='%231A1F2A'/%3e%3c/svg%3e", to = ["data-tip"], no = ["disabled"], oo = ["src"], lo = {
|
|
2659
2682
|
__name: "CopyBtn",
|
|
2660
2683
|
props: {
|
|
2661
2684
|
disabled: Boolean
|
|
2662
2685
|
},
|
|
2663
2686
|
setup(e) {
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2687
|
+
const o = $("Copy"), t = () => {
|
|
2688
|
+
o.value = "Copied", setTimeout(() => {
|
|
2689
|
+
o.value = "Copy";
|
|
2690
|
+
}, 1e3);
|
|
2691
|
+
};
|
|
2692
|
+
return (n, l) => (C(), O("div", {
|
|
2693
|
+
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2694
|
+
"data-tip": o.value
|
|
2670
2695
|
}, [
|
|
2671
|
-
v("
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
},
|
|
2696
|
+
v("button", {
|
|
2697
|
+
class: B(["btn btn-xs btn-circle", [
|
|
2698
|
+
{ "btn-ghost": !e.disabled },
|
|
2699
|
+
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2700
|
+
]]),
|
|
2701
|
+
disabled: e.disabled,
|
|
2702
|
+
onClick: t
|
|
2703
|
+
}, [
|
|
2704
|
+
v("img", {
|
|
2705
|
+
src: L(eo),
|
|
2706
|
+
alt: "Copy",
|
|
2707
|
+
class: B(["w-3 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2708
|
+
}, null, 10, oo)
|
|
2709
|
+
], 10, no)
|
|
2710
|
+
], 8, to));
|
|
2711
|
+
}
|
|
2712
|
+
}, so = { class: "flex flex-row px-2 pr-10 pt-1 items-center bg-transparent relative" }, ao = { class: "ml-1 text-sm text-gray-600" }, io = {
|
|
2679
2713
|
key: 0,
|
|
2680
2714
|
class: "italic"
|
|
2681
|
-
},
|
|
2682
|
-
key: 0,
|
|
2683
|
-
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2684
|
-
"data-tip": "Clear"
|
|
2685
|
-
}, ao = {
|
|
2686
|
-
key: 1,
|
|
2687
|
-
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2688
|
-
"data-tip": "AI Translate"
|
|
2689
|
-
}, io = {
|
|
2690
|
-
key: 2,
|
|
2691
|
-
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2692
|
-
"data-tip": "Favorite"
|
|
2693
|
-
}, ro = {
|
|
2694
|
-
key: 3,
|
|
2695
|
-
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
2696
|
-
"data-tip": "Copy"
|
|
2697
|
-
}, uo = {
|
|
2715
|
+
}, ro = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, uo = {
|
|
2698
2716
|
__name: "TranslationBtnGroup",
|
|
2699
2717
|
props: {
|
|
2700
2718
|
loading: {
|
|
@@ -2754,66 +2772,62 @@ const Mn = /* @__PURE__ */ Ze($n, [["render", Ln]]), r2 = He("tts", () => {
|
|
|
2754
2772
|
emits: ["clear", "favorite", "loadTTS", "aiTranslate", "copy"],
|
|
2755
2773
|
setup(e, { emit: o }) {
|
|
2756
2774
|
const t = e, n = o;
|
|
2757
|
-
return (l,
|
|
2758
|
-
t.src ? (
|
|
2775
|
+
return (l, a) => (C(), O("div", so, [
|
|
2776
|
+
t.src ? (C(), G(Rn, {
|
|
2759
2777
|
key: 0,
|
|
2760
2778
|
type: t.type,
|
|
2761
|
-
onLoadTTS:
|
|
2762
|
-
}, null, 8, ["type"])) :
|
|
2763
|
-
v("div",
|
|
2764
|
-
|
|
2765
|
-
e.phonetic ? (
|
|
2779
|
+
onLoadTTS: a[0] || (a[0] = (i) => n("loadTTS"))
|
|
2780
|
+
}, null, 8, ["type"])) : Z("", !0),
|
|
2781
|
+
v("div", ao, [
|
|
2782
|
+
g2(ne(e.srcLabel) + " ", 1),
|
|
2783
|
+
e.phonetic ? (C(), O("span", io, "- [" + ne(t.phonetic) + "]", 1)) : Z("", !0)
|
|
2766
2784
|
]),
|
|
2767
|
-
t.loading ? (
|
|
2785
|
+
t.loading ? (C(), G(r2, {
|
|
2768
2786
|
key: 1,
|
|
2769
2787
|
class: "absolute right-6 top-2"
|
|
2770
|
-
})) :
|
|
2771
|
-
v("div",
|
|
2772
|
-
e.hasClearBtn && e.src ? (
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
onClick: s[4] || (s[4] = (i) => n("copy")),
|
|
2795
|
-
disabled: e.loading
|
|
2796
|
-
}, null, 8, ["disabled"])
|
|
2797
|
-
])) : W("", !0)
|
|
2788
|
+
})) : Z("", !0),
|
|
2789
|
+
v("div", ro, [
|
|
2790
|
+
e.hasClearBtn && e.src ? (C(), G(Hn, {
|
|
2791
|
+
key: 0,
|
|
2792
|
+
onClick: a[1] || (a[1] = (i) => n("clear")),
|
|
2793
|
+
disabled: e.loading
|
|
2794
|
+
}, null, 8, ["disabled"])) : Z("", !0),
|
|
2795
|
+
e.src && !e.hasDictionary && e.hasAIBtn ? (C(), G(c2, {
|
|
2796
|
+
key: 1,
|
|
2797
|
+
isFilled: e.isAITranslate,
|
|
2798
|
+
onClick: a[2] || (a[2] = (i) => n("aiTranslate")),
|
|
2799
|
+
disabled: e.loading
|
|
2800
|
+
}, null, 8, ["isFilled", "disabled"])) : Z("", !0),
|
|
2801
|
+
e.src && e.hasFavoriteBtn ? (C(), G(qn, {
|
|
2802
|
+
key: 2,
|
|
2803
|
+
isFilled: e.isFavorite,
|
|
2804
|
+
onClick: a[3] || (a[3] = (i) => n("favorite")),
|
|
2805
|
+
disabled: e.loading
|
|
2806
|
+
}, null, 8, ["isFilled", "disabled"])) : Z("", !0),
|
|
2807
|
+
e.src && e.hasCopyBtn ? (C(), G(lo, {
|
|
2808
|
+
key: 3,
|
|
2809
|
+
onClick: a[4] || (a[4] = (i) => n("copy")),
|
|
2810
|
+
disabled: e.loading
|
|
2811
|
+
}, null, 8, ["disabled"])) : Z("", !0)
|
|
2798
2812
|
])
|
|
2799
2813
|
]));
|
|
2800
2814
|
}
|
|
2801
|
-
},
|
|
2802
|
-
const e =
|
|
2815
|
+
}, d2 = /* @__PURE__ */ Ze(uo, [["__scopeId", "data-v-c9ef8858"]]), me = ze("translation", () => {
|
|
2816
|
+
const e = $(null), o = $(null), t = $(null), n = $({
|
|
2803
2817
|
src: null,
|
|
2804
2818
|
target: null
|
|
2805
|
-
}), l =
|
|
2819
|
+
}), l = $(null), a = $([]), i = $([]), s = $([]), r = $([]), u = $({
|
|
2806
2820
|
src: null,
|
|
2807
2821
|
target: null
|
|
2808
|
-
}), c = Ue(), p =
|
|
2809
|
-
function
|
|
2810
|
-
e.value =
|
|
2822
|
+
}), c = Ue(), p = E(() => c.getLabel(e.value)), b = E(() => c.getLabel(o.value));
|
|
2823
|
+
function w(_) {
|
|
2824
|
+
e.value = _.src, o.value = _.target, t.value = _.text, n.value = _.phonetic, l.value = _.result, a.value = _.dictionary, i.value = _.definitions, s.value = _.synonyms, r.value = _.examples, u.value = _.tts;
|
|
2811
2825
|
}
|
|
2812
|
-
function
|
|
2826
|
+
function m() {
|
|
2813
2827
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2814
2828
|
src: null,
|
|
2815
2829
|
target: null
|
|
2816
|
-
}, l.value = null,
|
|
2830
|
+
}, l.value = null, a.value = [], i.value = [], s.value = [], r.value = [], u.value = {
|
|
2817
2831
|
src: null,
|
|
2818
2832
|
target: null
|
|
2819
2833
|
};
|
|
@@ -2822,24 +2836,24 @@ const Mn = /* @__PURE__ */ Ze($n, [["render", Ln]]), r2 = He("tts", () => {
|
|
|
2822
2836
|
src: e,
|
|
2823
2837
|
srcLabel: p,
|
|
2824
2838
|
target: o,
|
|
2825
|
-
targetLabel:
|
|
2839
|
+
targetLabel: b,
|
|
2826
2840
|
phonetic: n,
|
|
2827
2841
|
text: t,
|
|
2828
2842
|
result: l,
|
|
2829
|
-
dictionary:
|
|
2843
|
+
dictionary: a,
|
|
2830
2844
|
definitions: i,
|
|
2831
|
-
synonyms:
|
|
2845
|
+
synonyms: s,
|
|
2832
2846
|
examples: r,
|
|
2833
2847
|
tts: u,
|
|
2834
|
-
init:
|
|
2835
|
-
reset:
|
|
2848
|
+
init: w,
|
|
2849
|
+
reset: m
|
|
2836
2850
|
};
|
|
2837
2851
|
});
|
|
2838
2852
|
function co(e) {
|
|
2839
2853
|
return Mt() ? (tt(e), !0) : !1;
|
|
2840
2854
|
}
|
|
2841
|
-
function
|
|
2842
|
-
return typeof e == "function" ? e() :
|
|
2855
|
+
function Be(e) {
|
|
2856
|
+
return typeof e == "function" ? e() : L(e);
|
|
2843
2857
|
}
|
|
2844
2858
|
const fo = typeof window < "u" && typeof document < "u";
|
|
2845
2859
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -2847,24 +2861,24 @@ const St = () => {
|
|
|
2847
2861
|
};
|
|
2848
2862
|
function po(e, o) {
|
|
2849
2863
|
function t(...n) {
|
|
2850
|
-
return new Promise((l,
|
|
2851
|
-
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(
|
|
2864
|
+
return new Promise((l, a) => {
|
|
2865
|
+
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(a);
|
|
2852
2866
|
});
|
|
2853
2867
|
}
|
|
2854
2868
|
return t;
|
|
2855
2869
|
}
|
|
2856
2870
|
function vo(e, o = {}) {
|
|
2857
2871
|
let t, n, l = St;
|
|
2858
|
-
const
|
|
2859
|
-
clearTimeout(
|
|
2872
|
+
const a = (s) => {
|
|
2873
|
+
clearTimeout(s), l(), l = St;
|
|
2860
2874
|
};
|
|
2861
|
-
return (
|
|
2862
|
-
const r =
|
|
2863
|
-
return t &&
|
|
2875
|
+
return (s) => {
|
|
2876
|
+
const r = Be(e), u = Be(o.maxWait);
|
|
2877
|
+
return t && a(t), r <= 0 || u !== void 0 && u <= 0 ? (n && (a(n), n = null), Promise.resolve(s())) : new Promise((c, p) => {
|
|
2864
2878
|
l = o.rejectOnCancel ? p : c, u && !n && (n = setTimeout(() => {
|
|
2865
|
-
t &&
|
|
2879
|
+
t && a(t), n = null, c(s());
|
|
2866
2880
|
}, u)), t = setTimeout(() => {
|
|
2867
|
-
n &&
|
|
2881
|
+
n && a(n), n = null, c(s());
|
|
2868
2882
|
}, r);
|
|
2869
2883
|
});
|
|
2870
2884
|
};
|
|
@@ -2877,57 +2891,57 @@ function ho(e, o = 200, t = {}) {
|
|
|
2877
2891
|
}
|
|
2878
2892
|
function Et(e) {
|
|
2879
2893
|
var o;
|
|
2880
|
-
const t =
|
|
2894
|
+
const t = Be(e);
|
|
2881
2895
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2882
2896
|
}
|
|
2883
2897
|
const mo = fo ? window : void 0;
|
|
2884
2898
|
function bo() {
|
|
2885
|
-
const e =
|
|
2899
|
+
const e = $(!1), o = Lt();
|
|
2886
2900
|
return o && ye(() => {
|
|
2887
2901
|
e.value = !0;
|
|
2888
2902
|
}, o), e;
|
|
2889
2903
|
}
|
|
2890
2904
|
function go(e) {
|
|
2891
2905
|
const o = bo();
|
|
2892
|
-
return
|
|
2906
|
+
return E(() => (o.value, !!e()));
|
|
2893
2907
|
}
|
|
2894
2908
|
function Co(e, o, t = {}) {
|
|
2895
2909
|
const { window: n = mo, ...l } = t;
|
|
2896
|
-
let
|
|
2897
|
-
const i = go(() => n && "ResizeObserver" in n),
|
|
2898
|
-
|
|
2899
|
-
}, r =
|
|
2910
|
+
let a;
|
|
2911
|
+
const i = go(() => n && "ResizeObserver" in n), s = () => {
|
|
2912
|
+
a && (a.disconnect(), a = void 0);
|
|
2913
|
+
}, r = E(() => Array.isArray(e) ? e.map((p) => Et(p)) : [Et(e)]), u = j(
|
|
2900
2914
|
r,
|
|
2901
2915
|
(p) => {
|
|
2902
|
-
if (
|
|
2903
|
-
|
|
2904
|
-
for (const
|
|
2905
|
-
|
|
2916
|
+
if (s(), i.value && n) {
|
|
2917
|
+
a = new ResizeObserver(o);
|
|
2918
|
+
for (const b of p)
|
|
2919
|
+
b && a.observe(b, l);
|
|
2906
2920
|
}
|
|
2907
2921
|
},
|
|
2908
2922
|
{ immediate: !0, flush: "post" }
|
|
2909
2923
|
), c = () => {
|
|
2910
|
-
|
|
2924
|
+
s(), u();
|
|
2911
2925
|
};
|
|
2912
2926
|
return co(c), {
|
|
2913
2927
|
isSupported: i,
|
|
2914
2928
|
stop: c
|
|
2915
2929
|
};
|
|
2916
2930
|
}
|
|
2917
|
-
function
|
|
2931
|
+
function f2(e) {
|
|
2918
2932
|
var o;
|
|
2919
|
-
const t =
|
|
2933
|
+
const t = $(e == null ? void 0 : e.element), n = $(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", a = $(1);
|
|
2920
2934
|
function i() {
|
|
2921
|
-
var
|
|
2935
|
+
var s;
|
|
2922
2936
|
if (!t.value)
|
|
2923
2937
|
return;
|
|
2924
2938
|
let r = "";
|
|
2925
|
-
t.value.style[l] = "1px",
|
|
2939
|
+
t.value.style[l] = "1px", a.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Be(e.styleTarget).style[l] = `${a.value}px` : r = `${a.value}px`, t.value.style[l] = r;
|
|
2926
2940
|
}
|
|
2927
|
-
return
|
|
2928
|
-
var
|
|
2929
|
-
return (
|
|
2930
|
-
}), Co(t, () => i()), e != null && e.watch &&
|
|
2941
|
+
return j([n, t], () => te(i), { immediate: !0 }), j(a, () => {
|
|
2942
|
+
var s;
|
|
2943
|
+
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2944
|
+
}), Co(t, () => i()), e != null && e.watch && j(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2931
2945
|
textarea: t,
|
|
2932
2946
|
input: n,
|
|
2933
2947
|
triggerResize: i
|
|
@@ -2943,53 +2957,53 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
2943
2957
|
},
|
|
2944
2958
|
emits: ["change", "clear", "loadTTS"],
|
|
2945
2959
|
setup(e, { emit: o }) {
|
|
2946
|
-
const t = me(), n = e, l =
|
|
2947
|
-
var
|
|
2948
|
-
return (
|
|
2949
|
-
}), { textarea: r } =
|
|
2960
|
+
const t = me(), n = e, l = $(""), a = E(() => t.src), i = E(() => t.srcLabel), s = E(() => {
|
|
2961
|
+
var m;
|
|
2962
|
+
return (m = t.phonetic) == null ? void 0 : m.src;
|
|
2963
|
+
}), { textarea: r } = f2({ input: l, styleProp: "minHeight" }), u = o, c = ho(() => {
|
|
2950
2964
|
u("change", l.value);
|
|
2951
|
-
},
|
|
2965
|
+
}, $n.INPUT_DEBOUNCE);
|
|
2952
2966
|
function p() {
|
|
2953
2967
|
if (!l.value) {
|
|
2954
|
-
|
|
2968
|
+
b();
|
|
2955
2969
|
return;
|
|
2956
2970
|
}
|
|
2957
2971
|
c();
|
|
2958
2972
|
}
|
|
2959
|
-
function
|
|
2973
|
+
function b() {
|
|
2960
2974
|
u("clear"), l.value = "", r.value.focus();
|
|
2961
2975
|
}
|
|
2962
|
-
async function
|
|
2963
|
-
await
|
|
2976
|
+
async function w() {
|
|
2977
|
+
await te(), r.value.select();
|
|
2964
2978
|
}
|
|
2965
|
-
return
|
|
2979
|
+
return j(
|
|
2966
2980
|
() => n.text,
|
|
2967
|
-
(
|
|
2968
|
-
l.value !==
|
|
2981
|
+
(m) => {
|
|
2982
|
+
l.value !== m && w(), l.value = m;
|
|
2969
2983
|
}
|
|
2970
|
-
), (
|
|
2971
|
-
N(
|
|
2972
|
-
src:
|
|
2984
|
+
), (m, _) => (C(), O("div", xo, [
|
|
2985
|
+
N(d2, {
|
|
2986
|
+
src: a.value,
|
|
2973
2987
|
srcLabel: i.value,
|
|
2974
2988
|
type: "src",
|
|
2975
|
-
phonetic:
|
|
2989
|
+
phonetic: s.value,
|
|
2976
2990
|
hasClearBtn: !0,
|
|
2977
|
-
onClear:
|
|
2978
|
-
onLoadTTS:
|
|
2991
|
+
onClear: b,
|
|
2992
|
+
onLoadTTS: _[0] || (_[0] = (P) => u("loadTTS")),
|
|
2979
2993
|
class: "mb-2"
|
|
2980
2994
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
2981
|
-
|
|
2995
|
+
At(v("textarea", {
|
|
2982
2996
|
ref_key: "textarea",
|
|
2983
2997
|
ref: r,
|
|
2984
|
-
"onUpdate:modelValue":
|
|
2985
|
-
class: "w-full outline-none px-5 pr-8 bg-transparent text-gray-800
|
|
2998
|
+
"onUpdate:modelValue": _[1] || (_[1] = (P) => l.value = P),
|
|
2999
|
+
class: "w-full outline-none px-5 pr-8 bg-transparent text-gray-800 resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
2986
3000
|
autofocus: "",
|
|
2987
3001
|
rows: "2",
|
|
2988
3002
|
onInput: p,
|
|
2989
|
-
onFocus:
|
|
3003
|
+
onFocus: w
|
|
2990
3004
|
}, null, 544), [
|
|
2991
3005
|
[
|
|
2992
|
-
|
|
3006
|
+
Vt,
|
|
2993
3007
|
l.value,
|
|
2994
3008
|
void 0,
|
|
2995
3009
|
{ trim: !0 }
|
|
@@ -2997,10 +3011,10 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
2997
3011
|
])
|
|
2998
3012
|
]));
|
|
2999
3013
|
}
|
|
3000
|
-
}, wo = /* @__PURE__ */ Ze(yo, [["__scopeId", "data-v-
|
|
3014
|
+
}, wo = /* @__PURE__ */ Ze(yo, [["__scopeId", "data-v-3d7638d0"]]), _o = (e) => (C2("data-v-7edf5093"), e = e(), x2(), e), So = { class: "bg-white relative z-10 rounded-md h-full" }, Eo = { class: "bg-transparent" }, Oo = {
|
|
3001
3015
|
key: 0,
|
|
3002
3016
|
class: "w-full flex items-center justify-end absolute -bottom-6 left-2 right-0 px-2 z-20"
|
|
3003
|
-
},
|
|
3017
|
+
}, Io = /* @__PURE__ */ _o(() => /* @__PURE__ */ v("span", { class: "text-sm text-gray-600" }, " Powered by Ddict AI ", -1)), $o = {
|
|
3004
3018
|
__name: "TranslationResult",
|
|
3005
3019
|
props: {
|
|
3006
3020
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -3010,113 +3024,113 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3010
3024
|
},
|
|
3011
3025
|
emits: ["loadTTS", "favorite", "aiTranslate", "copy"],
|
|
3012
3026
|
setup(e, { emit: o }) {
|
|
3013
|
-
const t = me(), n =
|
|
3014
|
-
var
|
|
3015
|
-
return (
|
|
3016
|
-
}),
|
|
3017
|
-
var
|
|
3018
|
-
return (
|
|
3019
|
-
}), r =
|
|
3020
|
-
return (
|
|
3021
|
-
class:
|
|
3027
|
+
const t = me(), n = E(() => t.result), l = E(() => t.target), a = E(() => t.targetLabel), i = E(() => {
|
|
3028
|
+
var w;
|
|
3029
|
+
return (w = t.phonetic) == null ? void 0 : w.target;
|
|
3030
|
+
}), s = E(() => {
|
|
3031
|
+
var w;
|
|
3032
|
+
return !!((w = t.dictionary) != null && w.length);
|
|
3033
|
+
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } = f2({ input: n, styleProp: "minHeight" }), b = o;
|
|
3034
|
+
return (w, m) => (C(), O("div", {
|
|
3035
|
+
class: B([
|
|
3022
3036
|
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
3023
3037
|
{
|
|
3024
|
-
"bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient border border-white": e.isAITranslate && !
|
|
3038
|
+
"bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient border border-white": e.isAITranslate && !u.value
|
|
3025
3039
|
}
|
|
3026
3040
|
])
|
|
3027
3041
|
}, [
|
|
3028
3042
|
v("div", So, [
|
|
3029
|
-
N(
|
|
3030
|
-
loading:
|
|
3043
|
+
N(d2, {
|
|
3044
|
+
loading: u.value,
|
|
3031
3045
|
src: l.value,
|
|
3032
|
-
srcLabel:
|
|
3046
|
+
srcLabel: a.value,
|
|
3033
3047
|
type: "target",
|
|
3034
3048
|
hasFavoriteBtn: e.isFavoriteFeatureEnabled,
|
|
3035
3049
|
hasAIBtn: e.isAITranslateFeatureEnabled,
|
|
3036
3050
|
hasCopyBtn: !0,
|
|
3037
3051
|
isFavorite: e.isFavorite,
|
|
3038
3052
|
isAITranslate: e.isAITranslate,
|
|
3039
|
-
hasDictionary:
|
|
3053
|
+
hasDictionary: s.value,
|
|
3040
3054
|
phonetic: i.value,
|
|
3041
|
-
onFavorite: m[0] || (m[0] = (
|
|
3042
|
-
onLoadTTS: m[1] || (m[1] = (
|
|
3043
|
-
onAiTranslate: m[2] || (m[2] = (
|
|
3044
|
-
onCopy: m[3] || (m[3] = (
|
|
3055
|
+
onFavorite: m[0] || (m[0] = (_) => b("favorite")),
|
|
3056
|
+
onLoadTTS: m[1] || (m[1] = (_) => b("loadTTS")),
|
|
3057
|
+
onAiTranslate: m[2] || (m[2] = (_) => b("aiTranslate")),
|
|
3058
|
+
onCopy: m[3] || (m[3] = (_) => b("copy")),
|
|
3045
3059
|
class: "mb-2"
|
|
3046
3060
|
}, null, 8, ["loading", "src", "srcLabel", "hasFavoriteBtn", "hasAIBtn", "isFavorite", "isAITranslate", "hasDictionary", "phonetic"]),
|
|
3047
3061
|
v("div", Eo, [
|
|
3048
|
-
|
|
3062
|
+
At(v("textarea", {
|
|
3049
3063
|
ref_key: "textarea",
|
|
3050
|
-
ref:
|
|
3051
|
-
"onUpdate:modelValue": m[4] || (m[4] = (
|
|
3052
|
-
class: "w-full outline-none px-5 pr-8 bg-transparent text-gray-800
|
|
3064
|
+
ref: c,
|
|
3065
|
+
"onUpdate:modelValue": m[4] || (m[4] = (_) => xe(p) ? p.value = _ : null),
|
|
3066
|
+
class: "w-full outline-none px-5 pr-8 bg-transparent text-gray-800 resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
3053
3067
|
readonly: "",
|
|
3054
3068
|
rows: "2",
|
|
3055
3069
|
spellcheck: "false"
|
|
3056
3070
|
}, null, 512), [
|
|
3057
|
-
[
|
|
3071
|
+
[Vt, L(p)]
|
|
3058
3072
|
])
|
|
3059
3073
|
])
|
|
3060
3074
|
]),
|
|
3061
|
-
e.isAITranslate ? (
|
|
3062
|
-
|
|
3063
|
-
N(
|
|
3064
|
-
])) :
|
|
3075
|
+
e.isAITranslate ? (C(), O("div", Oo, [
|
|
3076
|
+
Io,
|
|
3077
|
+
N(c2, { disabled: "" })
|
|
3078
|
+
])) : Z("", !0)
|
|
3065
3079
|
], 2));
|
|
3066
3080
|
}
|
|
3067
|
-
},
|
|
3081
|
+
}, To = /* @__PURE__ */ Ze($o, [["__scopeId", "data-v-7edf5093"]]), Lo = { class: "btn btn-sm btn-circle btn-ghost" }, We = {
|
|
3068
3082
|
__name: "ToggleBtn",
|
|
3069
3083
|
props: {
|
|
3070
3084
|
isExpanded: Boolean
|
|
3071
3085
|
},
|
|
3072
3086
|
setup(e) {
|
|
3073
3087
|
const o = e;
|
|
3074
|
-
return (t, n) => (
|
|
3075
|
-
o.isExpanded ? (
|
|
3088
|
+
return (t, n) => (C(), O("button", Lo, [
|
|
3089
|
+
o.isExpanded ? (C(), G(L(z0), {
|
|
3076
3090
|
key: 0,
|
|
3077
3091
|
class: "w-7 text-gray-400"
|
|
3078
|
-
})) : (
|
|
3092
|
+
})) : (C(), G(L(j0), {
|
|
3079
3093
|
key: 1,
|
|
3080
3094
|
class: "w-7 text-gray-400"
|
|
3081
3095
|
}))
|
|
3082
3096
|
]));
|
|
3083
3097
|
}
|
|
3084
|
-
}, Mo = { class: "card border bg-white rounded-lg" },
|
|
3098
|
+
}, Mo = { class: "card border bg-white rounded-lg" }, Ao = { class: "card-body px-4 py-2 gap-0" }, Vo = { class: "flex justify-between items-center" }, ko = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), Fo = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Po = { class: "list-none list-inside" }, Ro = ["onClick"], Do = { class: "text-base font-normal text-gray-800 leading-4" }, No = {
|
|
3085
3099
|
__name: "Dictionary",
|
|
3086
3100
|
emits: ["translate"],
|
|
3087
3101
|
setup(e, { emit: o }) {
|
|
3088
|
-
const t =
|
|
3102
|
+
const t = $(!0), n = me(), l = Ue(), a = E(() => n.dictionary), i = o, s = () => {
|
|
3089
3103
|
t.value = !t.value;
|
|
3090
3104
|
}, r = (u) => {
|
|
3091
3105
|
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
3092
3106
|
};
|
|
3093
|
-
return (u, c) => (
|
|
3094
|
-
v("div",
|
|
3095
|
-
v("div",
|
|
3096
|
-
|
|
3107
|
+
return (u, c) => (C(), O("div", Mo, [
|
|
3108
|
+
v("div", Ao, [
|
|
3109
|
+
v("div", Vo, [
|
|
3110
|
+
ko,
|
|
3097
3111
|
N(We, {
|
|
3098
3112
|
isExpanded: t.value,
|
|
3099
|
-
onClick:
|
|
3113
|
+
onClick: s
|
|
3100
3114
|
}, null, 8, ["isExpanded"])
|
|
3101
3115
|
]),
|
|
3102
3116
|
v("div", {
|
|
3103
|
-
class:
|
|
3117
|
+
class: B(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3104
3118
|
}, [
|
|
3105
3119
|
v("ul", null, [
|
|
3106
|
-
(
|
|
3107
|
-
key: `${p.pos}-${
|
|
3120
|
+
(C(!0), O(J, null, oe(a.value, (p, b) => (C(), O("li", {
|
|
3121
|
+
key: `${p.pos}-${b}`,
|
|
3108
3122
|
class: "mb-2"
|
|
3109
3123
|
}, [
|
|
3110
|
-
v("h5",
|
|
3111
|
-
v("ul",
|
|
3112
|
-
(
|
|
3113
|
-
key: `${
|
|
3124
|
+
v("h5", Fo, ne(p.pos), 1),
|
|
3125
|
+
v("ul", Po, [
|
|
3126
|
+
(C(!0), O(J, null, oe(p.items, (w, m) => (C(), O("li", {
|
|
3127
|
+
key: `${w.word}-${m}`
|
|
3114
3128
|
}, [
|
|
3115
3129
|
v("span", {
|
|
3116
3130
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3117
|
-
onClick: (
|
|
3118
|
-
},
|
|
3119
|
-
v("small", Do, " - " +
|
|
3131
|
+
onClick: (_) => r(w.word)
|
|
3132
|
+
}, ne(w.word), 9, Ro),
|
|
3133
|
+
v("small", Do, " - " + ne(w.reverse_translation.join(", ")), 1)
|
|
3120
3134
|
]))), 128))
|
|
3121
3135
|
])
|
|
3122
3136
|
]))), 128))
|
|
@@ -3131,10 +3145,10 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3131
3145
|
}, qo = {
|
|
3132
3146
|
__name: "Definition",
|
|
3133
3147
|
setup(e) {
|
|
3134
|
-
const o =
|
|
3148
|
+
const o = $(!0), t = me(), n = E(() => t.definitions), l = () => {
|
|
3135
3149
|
o.value = !o.value;
|
|
3136
3150
|
};
|
|
3137
|
-
return (
|
|
3151
|
+
return (a, i) => (C(), O("div", Bo, [
|
|
3138
3152
|
v("div", jo, [
|
|
3139
3153
|
v("div", Ho, [
|
|
3140
3154
|
zo,
|
|
@@ -3144,22 +3158,22 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3144
3158
|
}, null, 8, ["isExpanded"])
|
|
3145
3159
|
]),
|
|
3146
3160
|
v("div", {
|
|
3147
|
-
class:
|
|
3161
|
+
class: B(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3148
3162
|
}, [
|
|
3149
3163
|
v("ul", null, [
|
|
3150
|
-
(
|
|
3151
|
-
key: `${
|
|
3164
|
+
(C(!0), O(J, null, oe(n.value, (s, r) => (C(), O("li", {
|
|
3165
|
+
key: `${s.pos}-${r}`,
|
|
3152
3166
|
class: "mb-2"
|
|
3153
3167
|
}, [
|
|
3154
|
-
v("h5", Uo,
|
|
3168
|
+
v("h5", Uo, ne(s.pos), 1),
|
|
3155
3169
|
v("ul", Zo, [
|
|
3156
|
-
(
|
|
3170
|
+
(C(!0), O(J, null, oe(s.items, (u, c) => (C(), O("li", {
|
|
3157
3171
|
key: `${u.gloss}-${c}`,
|
|
3158
3172
|
class: "mb-1"
|
|
3159
3173
|
}, [
|
|
3160
|
-
v("span", null,
|
|
3174
|
+
v("span", null, ne(u.gloss), 1),
|
|
3161
3175
|
Wo,
|
|
3162
|
-
u.example ? (
|
|
3176
|
+
u.example ? (C(), O("small", Go, '"' + ne(u.example) + '"', 1)) : Z("", !0)
|
|
3163
3177
|
]))), 128))
|
|
3164
3178
|
])
|
|
3165
3179
|
]))), 128))
|
|
@@ -3168,13 +3182,13 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3168
3182
|
])
|
|
3169
3183
|
]));
|
|
3170
3184
|
}
|
|
3171
|
-
}, Jo = { class: "card border bg-white rounded-lg" }, Ko = { class: "card-body px-4 py-2 gap-0" }, Yo = { class: "flex justify-between items-center" }, Qo = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), Xo = { class: "text-textCustom list-decimal list-outside ml-7
|
|
3185
|
+
}, Jo = { class: "card border bg-white rounded-lg" }, Ko = { class: "card-body px-4 py-2 gap-0" }, Yo = { class: "flex justify-between items-center" }, Qo = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), Xo = { class: "text-textCustom list-decimal list-outside ml-7 my-2" }, el = ["innerHTML"], tl = {
|
|
3172
3186
|
__name: "Example",
|
|
3173
3187
|
setup(e) {
|
|
3174
|
-
const o =
|
|
3188
|
+
const o = $(!0), t = me(), n = E(() => t.examples), l = () => {
|
|
3175
3189
|
o.value = !o.value;
|
|
3176
3190
|
};
|
|
3177
|
-
return (
|
|
3191
|
+
return (a, i) => (C(), O("div", Jo, [
|
|
3178
3192
|
v("div", Ko, [
|
|
3179
3193
|
v("div", Yo, [
|
|
3180
3194
|
Qo,
|
|
@@ -3184,12 +3198,12 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3184
3198
|
}, null, 8, ["isExpanded"])
|
|
3185
3199
|
]),
|
|
3186
3200
|
v("div", {
|
|
3187
|
-
class:
|
|
3201
|
+
class: B(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3188
3202
|
}, [
|
|
3189
3203
|
v("ul", Xo, [
|
|
3190
|
-
(
|
|
3191
|
-
key: `${
|
|
3192
|
-
innerHTML:
|
|
3204
|
+
(C(!0), O(J, null, oe(n.value, (s, r) => (C(), O("li", {
|
|
3205
|
+
key: `${s.definition_id}-${r}`,
|
|
3206
|
+
innerHTML: s
|
|
3193
3207
|
}, null, 8, el))), 128))
|
|
3194
3208
|
])
|
|
3195
3209
|
], 2)
|
|
@@ -3200,12 +3214,12 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3200
3214
|
__name: "Synonyms",
|
|
3201
3215
|
emits: ["translate"],
|
|
3202
3216
|
setup(e, { emit: o }) {
|
|
3203
|
-
const t =
|
|
3217
|
+
const t = $(!0), n = me(), l = E(() => n.synonyms), a = o, i = () => {
|
|
3204
3218
|
t.value = !t.value;
|
|
3205
|
-
},
|
|
3206
|
-
|
|
3219
|
+
}, s = (r) => {
|
|
3220
|
+
a("translate", r), window.scrollTo(0, 0);
|
|
3207
3221
|
};
|
|
3208
|
-
return (r, u) => (
|
|
3222
|
+
return (r, u) => (C(), O("div", nl, [
|
|
3209
3223
|
v("div", ol, [
|
|
3210
3224
|
v("div", ll, [
|
|
3211
3225
|
sl,
|
|
@@ -3215,25 +3229,25 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3215
3229
|
}, null, 8, ["isExpanded"])
|
|
3216
3230
|
]),
|
|
3217
3231
|
v("div", {
|
|
3218
|
-
class:
|
|
3232
|
+
class: B(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3219
3233
|
}, [
|
|
3220
3234
|
v("ul", null, [
|
|
3221
|
-
(
|
|
3235
|
+
(C(!0), O(J, null, oe(l.value, (c, p) => (C(), O("li", {
|
|
3222
3236
|
key: `${c.pos}-${p}`,
|
|
3223
3237
|
class: "mb-2"
|
|
3224
3238
|
}, [
|
|
3225
|
-
v("h5", al,
|
|
3239
|
+
v("h5", al, ne(c.pos), 1),
|
|
3226
3240
|
v("ul", il, [
|
|
3227
|
-
(
|
|
3228
|
-
key: `${
|
|
3241
|
+
(C(!0), O(J, null, oe(c.items, (b, w) => (C(), O("li", {
|
|
3242
|
+
key: `${b.word}-${w}`,
|
|
3229
3243
|
class: "mb-2"
|
|
3230
3244
|
}, [
|
|
3231
3245
|
v("div", rl, [
|
|
3232
|
-
(
|
|
3233
|
-
key: `${
|
|
3246
|
+
(C(!0), O(J, null, oe(b.synonym, (m, _) => (C(), O("span", {
|
|
3247
|
+
key: `${m}-${_}`,
|
|
3234
3248
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3235
|
-
onClick: (
|
|
3236
|
-
},
|
|
3249
|
+
onClick: (P) => s(m)
|
|
3250
|
+
}, ne(m), 9, ul))), 128))
|
|
3237
3251
|
])
|
|
3238
3252
|
]))), 128))
|
|
3239
3253
|
])
|
|
@@ -3243,23 +3257,110 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3243
3257
|
])
|
|
3244
3258
|
]));
|
|
3245
3259
|
}
|
|
3260
|
+
}, dl = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20fill='%23FFC857'%20d='M12%207a5%205%200%200%200-2%209.584V19h4v-2.416A5.001%205.001%200%200%200%2012%207z'/%3e%3cpath%20stroke='%23FFC857'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e", fl = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20stroke='%23FFC857'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e", pl = ["disabled"], vl = ["src"], hl = {
|
|
3261
|
+
__name: "ChevronAIBtn",
|
|
3262
|
+
props: {
|
|
3263
|
+
disabled: Boolean,
|
|
3264
|
+
isExpanded: Boolean
|
|
3265
|
+
},
|
|
3266
|
+
setup(e) {
|
|
3267
|
+
return (o, t) => (C(), O("button", {
|
|
3268
|
+
class: B(["btn btn-sm btn-circle", [
|
|
3269
|
+
{ "btn-ghost": !e.disabled },
|
|
3270
|
+
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
3271
|
+
]]),
|
|
3272
|
+
disabled: e.disabled
|
|
3273
|
+
}, [
|
|
3274
|
+
v("img", {
|
|
3275
|
+
src: e.isExpanded ? L(dl) : L(fl),
|
|
3276
|
+
alt: "AI",
|
|
3277
|
+
class: B(["w-6 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
3278
|
+
}, null, 10, vl)
|
|
3279
|
+
], 10, pl));
|
|
3280
|
+
}
|
|
3281
|
+
}, ml = { class: "card-body bg-white px-4 py-2 gap-0 relative z-10 rounded-md" }, bl = { class: "flex justify-between items-center" }, gl = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "AI Summary", -1), Cl = { class: "flex items-center" }, xl = {
|
|
3282
|
+
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor 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%] before:!text-xs before:!py-1 before:!px-2",
|
|
3283
|
+
"data-tip": "AI Summarize"
|
|
3284
|
+
}, yl = {
|
|
3285
|
+
key: 0,
|
|
3286
|
+
class: "text-textCustom list-none list-outside my-2"
|
|
3287
|
+
}, wl = ["innerHTML"], _l = {
|
|
3288
|
+
__name: "AIExplanation",
|
|
3289
|
+
props: {
|
|
3290
|
+
isAIExplain: {
|
|
3291
|
+
type: Boolean,
|
|
3292
|
+
default: !1,
|
|
3293
|
+
required: !0
|
|
3294
|
+
},
|
|
3295
|
+
explanation: {
|
|
3296
|
+
type: Object,
|
|
3297
|
+
required: !0
|
|
3298
|
+
}
|
|
3299
|
+
},
|
|
3300
|
+
emits: ["aiExplain"],
|
|
3301
|
+
setup(e, { emit: o }) {
|
|
3302
|
+
const t = Me(), n = E(() => t.isLoading("aiExplanation")), l = o, a = () => {
|
|
3303
|
+
l("aiExplain");
|
|
3304
|
+
};
|
|
3305
|
+
return (i, s) => {
|
|
3306
|
+
var r, u;
|
|
3307
|
+
return C(), O("div", {
|
|
3308
|
+
class: B(["card border bg-white rounded-lg mb-8", [
|
|
3309
|
+
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
3310
|
+
{
|
|
3311
|
+
"bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient border border-white": e.isAIExplain
|
|
3312
|
+
}
|
|
3313
|
+
]])
|
|
3314
|
+
}, [
|
|
3315
|
+
v("div", ml, [
|
|
3316
|
+
v("div", bl, [
|
|
3317
|
+
gl,
|
|
3318
|
+
v("div", Cl, [
|
|
3319
|
+
n.value ? (C(), G(r2, { key: 0 })) : Z("", !0),
|
|
3320
|
+
v("div", xl, [
|
|
3321
|
+
N(hl, {
|
|
3322
|
+
isExpanded: e.isAIExplain,
|
|
3323
|
+
disabled: n.value,
|
|
3324
|
+
onClick: a
|
|
3325
|
+
}, null, 8, ["isExpanded", "disabled"])
|
|
3326
|
+
])
|
|
3327
|
+
])
|
|
3328
|
+
]),
|
|
3329
|
+
v("div", {
|
|
3330
|
+
class: B(["overflow-hidden transition-all duration-300 ease-in-out", e.isAIExplain ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3331
|
+
}, [
|
|
3332
|
+
(r = e.explanation) != null && r.result ? (C(), O("ul", yl, [
|
|
3333
|
+
(C(!0), O(J, null, oe(((u = e.explanation) == null ? void 0 : u.result.split(`
|
|
3334
|
+
`)) || [], (c, p) => (C(), O("li", {
|
|
3335
|
+
key: `${c}-${p}`,
|
|
3336
|
+
innerHTML: c
|
|
3337
|
+
}, null, 8, wl))), 128))
|
|
3338
|
+
])) : Z("", !0)
|
|
3339
|
+
], 2)
|
|
3340
|
+
])
|
|
3341
|
+
], 2);
|
|
3342
|
+
};
|
|
3343
|
+
}
|
|
3246
3344
|
};
|
|
3247
|
-
function
|
|
3345
|
+
function Sl() {
|
|
3248
3346
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3249
3347
|
}
|
|
3250
|
-
function
|
|
3348
|
+
function El() {
|
|
3251
3349
|
document.documentElement.removeAttribute("dir");
|
|
3252
3350
|
}
|
|
3253
3351
|
const Ot = {
|
|
3254
|
-
supportRTL:
|
|
3255
|
-
removeRTL:
|
|
3256
|
-
},
|
|
3352
|
+
supportRTL: Sl,
|
|
3353
|
+
removeRTL: El
|
|
3354
|
+
}, Ol = ["ar", "fa", "iw", "yi", "ur", "pa"], Il = { class: "bg-white min-h-screen flex flex-col" }, $l = { class: "py-2 px-5 shadow-lg" }, Tl = { class: "px-5 flex-grow" }, Ll = { class: "flex flex-col lg:flex-row lg:gap-2 mb-6" }, Ml = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, Al = /* @__PURE__ */ v("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), Vl = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, kl = {
|
|
3257
3355
|
key: 0,
|
|
3258
3356
|
class: "w-full my-4"
|
|
3259
|
-
},
|
|
3357
|
+
}, Fl = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Pl = {
|
|
3358
|
+
key: 1,
|
|
3359
|
+
class: "w-full my-4"
|
|
3360
|
+
}, Rl = {
|
|
3260
3361
|
key: 1,
|
|
3261
3362
|
class: "text-textCustom italic font-medium"
|
|
3262
|
-
},
|
|
3363
|
+
}, Bl = {
|
|
3263
3364
|
__name: "Popup",
|
|
3264
3365
|
props: {
|
|
3265
3366
|
opt: {
|
|
@@ -3274,6 +3375,10 @@ const Ot = {
|
|
|
3274
3375
|
type: Object,
|
|
3275
3376
|
default: null
|
|
3276
3377
|
},
|
|
3378
|
+
explanation: {
|
|
3379
|
+
type: Object,
|
|
3380
|
+
default: null
|
|
3381
|
+
},
|
|
3277
3382
|
tts: {
|
|
3278
3383
|
type: Object,
|
|
3279
3384
|
default: null
|
|
@@ -3293,6 +3398,14 @@ const Ot = {
|
|
|
3293
3398
|
isAITranslate: {
|
|
3294
3399
|
type: Boolean,
|
|
3295
3400
|
default: !1
|
|
3401
|
+
},
|
|
3402
|
+
isAIExplain: {
|
|
3403
|
+
type: Boolean,
|
|
3404
|
+
default: !1
|
|
3405
|
+
},
|
|
3406
|
+
aiExplainMinLength: {
|
|
3407
|
+
type: Number,
|
|
3408
|
+
default: 0
|
|
3296
3409
|
}
|
|
3297
3410
|
},
|
|
3298
3411
|
emits: [
|
|
@@ -3305,21 +3418,28 @@ const Ot = {
|
|
|
3305
3418
|
"loadTTS",
|
|
3306
3419
|
"favorite",
|
|
3307
3420
|
"aiTranslate",
|
|
3421
|
+
"aiExplain",
|
|
3308
3422
|
"copy"
|
|
3309
3423
|
],
|
|
3310
3424
|
setup(e, { emit: o }) {
|
|
3311
|
-
const t =
|
|
3312
|
-
const I =
|
|
3313
|
-
|
|
3425
|
+
const t = hn(), n = me(t), l = u2(t), a = Ue(t), i = Me(t), s = e, r = o, u = $(""), c = () => {
|
|
3426
|
+
const I = s.opt.target;
|
|
3427
|
+
Ol.includes(I) ? Ot.supportRTL() : Ot.removeRTL();
|
|
3314
3428
|
};
|
|
3315
|
-
|
|
3316
|
-
() =>
|
|
3429
|
+
j(
|
|
3430
|
+
() => s.translation,
|
|
3317
3431
|
(I) => {
|
|
3318
|
-
|
|
3432
|
+
i.setLoading("translation", !1), I && (u.value = I.text, n.init(I), l.reset());
|
|
3319
3433
|
},
|
|
3320
3434
|
{ immediate: !0 }
|
|
3321
|
-
),
|
|
3322
|
-
() =>
|
|
3435
|
+
), j(
|
|
3436
|
+
[() => s.explanation, () => s.isAIExplain],
|
|
3437
|
+
([I]) => {
|
|
3438
|
+
I != null && I.result && i.setLoading("aiExplanation", !1);
|
|
3439
|
+
},
|
|
3440
|
+
{ immediate: !0, deep: !0 }
|
|
3441
|
+
), j(
|
|
3442
|
+
() => s.tts,
|
|
3323
3443
|
(I) => {
|
|
3324
3444
|
if (!I) {
|
|
3325
3445
|
l.reset();
|
|
@@ -3328,92 +3448,102 @@ const Ot = {
|
|
|
3328
3448
|
l.set(I);
|
|
3329
3449
|
},
|
|
3330
3450
|
{ immediate: !0 }
|
|
3331
|
-
),
|
|
3332
|
-
|
|
3333
|
-
}),
|
|
3334
|
-
r("opt", { src: I, target:
|
|
3451
|
+
), j([() => s.opt, () => s.languages], ([I, x]) => {
|
|
3452
|
+
a.init(I, x), c();
|
|
3453
|
+
}), j([() => a.src, () => a.target], ([I, x]) => {
|
|
3454
|
+
r("opt", { src: I, target: x }), m(u.value);
|
|
3335
3455
|
}), ye(() => {
|
|
3336
|
-
|
|
3456
|
+
a.init(s.opt, s.languages), c();
|
|
3337
3457
|
});
|
|
3338
3458
|
function p() {
|
|
3339
|
-
u.value = "",
|
|
3459
|
+
u.value = "", s.isAITranslate && _(), n.reset();
|
|
3340
3460
|
}
|
|
3341
|
-
function
|
|
3342
|
-
|
|
3461
|
+
function b(I) {
|
|
3462
|
+
m(I);
|
|
3343
3463
|
}
|
|
3344
|
-
function
|
|
3345
|
-
const
|
|
3346
|
-
r("loadTTS", { type: I, data:
|
|
3464
|
+
function w(I) {
|
|
3465
|
+
const x = I === "src" ? n.text : n.result;
|
|
3466
|
+
r("loadTTS", { type: I, data: x });
|
|
3347
3467
|
}
|
|
3348
|
-
function
|
|
3349
|
-
I && (u.value = I, i.
|
|
3350
|
-
src:
|
|
3351
|
-
target:
|
|
3468
|
+
function m(I, x = a.src, V = a.target) {
|
|
3469
|
+
I && (u.value = I, i.setLoading("translation", !0), r("translate", {
|
|
3470
|
+
src: x,
|
|
3471
|
+
target: V,
|
|
3352
3472
|
text: I
|
|
3353
3473
|
}));
|
|
3354
3474
|
}
|
|
3355
|
-
function
|
|
3356
|
-
|
|
3475
|
+
function _() {
|
|
3476
|
+
s.isAITranslate || i.setLoading("translation", !0), r("aiTranslate");
|
|
3477
|
+
}
|
|
3478
|
+
function P() {
|
|
3479
|
+
s.isAIExplain || i.setLoading("aiExplanation", !0), r("aiExplain");
|
|
3357
3480
|
}
|
|
3358
|
-
return (I,
|
|
3359
|
-
var
|
|
3360
|
-
return
|
|
3361
|
-
v("div",
|
|
3362
|
-
N(
|
|
3363
|
-
onReader:
|
|
3364
|
-
onSettings:
|
|
3365
|
-
onFullScreen:
|
|
3366
|
-
onStarList:
|
|
3481
|
+
return (I, x) => {
|
|
3482
|
+
var V, R, y, M, g;
|
|
3483
|
+
return C(), O("div", Il, [
|
|
3484
|
+
v("div", $l, [
|
|
3485
|
+
N(j2, {
|
|
3486
|
+
onReader: x[0] || (x[0] = (h) => r("reader")),
|
|
3487
|
+
onSettings: x[1] || (x[1] = (h) => r("settings")),
|
|
3488
|
+
onFullScreen: x[2] || (x[2] = (h) => r("fullscreen")),
|
|
3489
|
+
onStarList: x[3] || (x[3] = (h) => r("starList"))
|
|
3367
3490
|
})
|
|
3368
3491
|
]),
|
|
3369
|
-
v("div",
|
|
3370
|
-
N(
|
|
3371
|
-
v("div",
|
|
3372
|
-
v("div",
|
|
3492
|
+
v("div", Tl, [
|
|
3493
|
+
N(In, { class: "my-4" }),
|
|
3494
|
+
v("div", Ll, [
|
|
3495
|
+
v("div", Ml, [
|
|
3373
3496
|
N(wo, {
|
|
3374
3497
|
text: u.value,
|
|
3375
|
-
onChange:
|
|
3498
|
+
onChange: b,
|
|
3376
3499
|
onClear: p,
|
|
3377
|
-
onLoadTTS:
|
|
3500
|
+
onLoadTTS: x[4] || (x[4] = (h) => w("src")),
|
|
3378
3501
|
class: "flex-grow flex flex-col"
|
|
3379
3502
|
}, null, 8, ["text"])
|
|
3380
3503
|
]),
|
|
3381
|
-
|
|
3382
|
-
v("div",
|
|
3383
|
-
N(
|
|
3504
|
+
Al,
|
|
3505
|
+
v("div", Vl, [
|
|
3506
|
+
N(To, {
|
|
3384
3507
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3385
3508
|
isAITranslateFeatureEnabled: e.isAITranslateFeatureEnabled,
|
|
3386
3509
|
isAITranslate: e.isAITranslate,
|
|
3387
3510
|
isFavorite: e.isFavorite,
|
|
3388
|
-
onCopy:
|
|
3389
|
-
onAiTranslate:
|
|
3390
|
-
onFavorite:
|
|
3391
|
-
onLoadTTS:
|
|
3511
|
+
onCopy: x[5] || (x[5] = (h) => r("copy")),
|
|
3512
|
+
onAiTranslate: _,
|
|
3513
|
+
onFavorite: x[6] || (x[6] = (h) => r("favorite")),
|
|
3514
|
+
onLoadTTS: x[7] || (x[7] = (h) => w("target")),
|
|
3392
3515
|
class: "flex-grow flex flex-col"
|
|
3393
3516
|
}, null, 8, ["isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isAITranslate", "isFavorite"])
|
|
3394
3517
|
])
|
|
3395
3518
|
]),
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
(
|
|
3519
|
+
s.translation ? (C(), O(J, { key: 0 }, [
|
|
3520
|
+
((V = L(n).result) == null ? void 0 : V.length) > e.aiExplainMinLength ? (C(), O("div", kl, [
|
|
3521
|
+
N(_l, {
|
|
3522
|
+
isAIExplain: e.isAIExplain,
|
|
3523
|
+
explanation: e.explanation,
|
|
3524
|
+
onAiExplain: P
|
|
3525
|
+
}, null, 8, ["isAIExplain", "explanation"])
|
|
3526
|
+
])) : Z("", !0),
|
|
3527
|
+
v("div", Fl, [
|
|
3528
|
+
(R = L(n).dictionary) != null && R.length ? (C(), G(No, {
|
|
3399
3529
|
key: 0,
|
|
3400
|
-
onTranslate:
|
|
3401
|
-
})) :
|
|
3402
|
-
(
|
|
3403
|
-
(
|
|
3530
|
+
onTranslate: m
|
|
3531
|
+
})) : Z("", !0),
|
|
3532
|
+
(y = L(n).definitions) != null && y.length ? (C(), G(qo, { key: 1 })) : Z("", !0),
|
|
3533
|
+
(M = L(n).synonyms) != null && M.length ? (C(), G(cl, {
|
|
3404
3534
|
key: 2,
|
|
3405
|
-
onTranslate:
|
|
3406
|
-
})) :
|
|
3535
|
+
onTranslate: m
|
|
3536
|
+
})) : Z("", !0)
|
|
3407
3537
|
]),
|
|
3408
|
-
(g =
|
|
3538
|
+
(g = L(n).examples) != null && g.length ? (C(), O("div", Pl, [
|
|
3409
3539
|
N(tl)
|
|
3410
|
-
])) :
|
|
3411
|
-
], 64)) : (
|
|
3540
|
+
])) : Z("", !0)
|
|
3541
|
+
], 64)) : (C(), O("span", Rl, "Service unavailable"))
|
|
3412
3542
|
])
|
|
3413
3543
|
]);
|
|
3414
3544
|
};
|
|
3415
3545
|
}
|
|
3416
3546
|
};
|
|
3417
3547
|
export {
|
|
3418
|
-
|
|
3548
|
+
Bl as default
|
|
3419
3549
|
};
|