@ddict/popup 1.3.0 → 1.3.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/popup.css +1 -1
- package/dist/popup.es.js +611 -595
- package/dist/popup.umd.js +8 -8
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,82 +1,95 @@
|
|
|
1
|
-
import { openBlock as m, createElementBlock as O, createElementVNode as v, computed as E, unref as L, shallowRef as
|
|
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" }, $2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
1
|
+
import { openBlock as m, createElementBlock as O, createElementVNode as v, computed as E, unref as L, shallowRef as h2, watch as N, triggerRef as ct, onScopeDispose as nt, ref as $, onUnmounted as ot, inject as Te, watchEffect as re, onMounted as ve, cloneVNode as It, h as Ee, Fragment as G, defineComponent as ue, provide as lt, reactive as Tt, nextTick as oe, toRaw as ee, effectScope as Lt, markRaw as fe, hasInjectionContext as m2, getCurrentInstance as Mt, isRef as ye, isReactive as st, toRef as qe, getCurrentScope as kt, toRefs as dt, mergeModels as b2, useModel as g2, createBlock as q, withCtx as ke, createVNode as B, renderList as te, normalizeClass as j, toDisplayString as K, createCommentVNode as H, withModifiers as ft, createTextVNode as C2, withDirectives as At, vModelText as Vt, pushScopeId as x2, popScopeId as y2 } from "vue";
|
|
2
|
+
const w2 = "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", _2 = "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", 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%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", 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='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", O2 = "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", $2 = { class: "flex justify-between" }, I2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ v("img", {
|
|
4
|
-
src:
|
|
4
|
+
src: w2,
|
|
5
5
|
alt: "Vue logo",
|
|
6
6
|
class: "w-24"
|
|
7
7
|
})
|
|
8
|
-
], -1),
|
|
8
|
+
], -1), T2 = { class: "flex" }, L2 = {
|
|
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
|
+
}, M2 = /* @__PURE__ */ v("img", {
|
|
12
|
+
src: _2,
|
|
13
13
|
alt: "Star list",
|
|
14
14
|
class: "w-7"
|
|
15
|
-
}, null, -1),
|
|
16
|
-
|
|
17
|
-
],
|
|
15
|
+
}, null, -1), k2 = [
|
|
16
|
+
M2
|
|
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
|
-
},
|
|
21
|
-
src:
|
|
20
|
+
}, V2 = /* @__PURE__ */ v("img", {
|
|
21
|
+
src: S2,
|
|
22
22
|
alt: "Reader",
|
|
23
23
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
25
|
-
|
|
26
|
-
],
|
|
24
|
+
}, null, -1), F2 = [
|
|
25
|
+
V2
|
|
26
|
+
], R2 = {
|
|
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: E2,
|
|
31
31
|
alt: "Full screen",
|
|
32
32
|
class: "w-7"
|
|
33
|
-
}, null, -1),
|
|
33
|
+
}, null, -1), D2 = [
|
|
34
34
|
P2
|
|
35
|
-
],
|
|
35
|
+
], N2 = {
|
|
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
|
+
}, B2 = /* @__PURE__ */ v("img", {
|
|
39
|
+
src: O2,
|
|
40
40
|
alt: "Setting",
|
|
41
41
|
class: "w-7"
|
|
42
|
-
}, null, -1),
|
|
43
|
-
|
|
44
|
-
],
|
|
42
|
+
}, null, -1), j2 = [
|
|
43
|
+
B2
|
|
44
|
+
], H2 = {
|
|
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) => (m(), O("div",
|
|
50
|
-
|
|
51
|
-
v("div",
|
|
52
|
-
v("div",
|
|
49
|
+
return (n, l) => (m(), O("div", $2, [
|
|
50
|
+
I2,
|
|
51
|
+
v("div", T2, [
|
|
52
|
+
v("div", L2, [
|
|
53
53
|
v("button", {
|
|
54
54
|
class: "btn btn-ghost btn-circle",
|
|
55
55
|
onClick: l[0] || (l[0] = (a) => t("starList"))
|
|
56
|
-
},
|
|
56
|
+
}, k2)
|
|
57
57
|
]),
|
|
58
|
-
v("div",
|
|
58
|
+
v("div", A2, [
|
|
59
59
|
v("button", {
|
|
60
60
|
class: "btn btn-ghost btn-circle",
|
|
61
61
|
onClick: l[1] || (l[1] = (a) => t("reader"))
|
|
62
|
-
},
|
|
62
|
+
}, F2)
|
|
63
63
|
]),
|
|
64
|
-
v("div",
|
|
64
|
+
v("div", R2, [
|
|
65
65
|
v("button", {
|
|
66
66
|
class: "btn btn-ghost btn-circle",
|
|
67
67
|
onClick: l[2] || (l[2] = (a) => t("fullScreen"))
|
|
68
|
-
},
|
|
68
|
+
}, D2)
|
|
69
69
|
]),
|
|
70
|
-
v("div",
|
|
70
|
+
v("div", N2, [
|
|
71
71
|
v("button", {
|
|
72
72
|
class: "btn btn-ghost btn-circle",
|
|
73
73
|
onClick: l[3] || (l[3] = (a) => t("settings"))
|
|
74
|
-
},
|
|
74
|
+
}, j2)
|
|
75
75
|
])
|
|
76
76
|
])
|
|
77
77
|
]));
|
|
78
78
|
}
|
|
79
|
+
}, Ae = {
|
|
80
|
+
isRTL: z2,
|
|
81
|
+
setLocalStorage: U2,
|
|
82
|
+
getLocalStorage: Z2
|
|
79
83
|
};
|
|
84
|
+
function z2(e) {
|
|
85
|
+
return ["ar", "fa", "iw", "yi", "ur", "pa"].indexOf(e) > -1;
|
|
86
|
+
}
|
|
87
|
+
function U2(e, o) {
|
|
88
|
+
localStorage.setItem(e, JSON.stringify(o));
|
|
89
|
+
}
|
|
90
|
+
function Z2(e) {
|
|
91
|
+
return JSON.parse(localStorage.getItem(e));
|
|
92
|
+
}
|
|
80
93
|
function we(e, o, t) {
|
|
81
94
|
let n = t.initialDeps ?? [], l;
|
|
82
95
|
return () => {
|
|
@@ -89,13 +102,13 @@ function we(e, o, t) {
|
|
|
89
102
|
n = c;
|
|
90
103
|
let g;
|
|
91
104
|
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()), l = o(...c), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
92
|
-
const w = Math.round((Date.now() - u) * 100) / 100, b = Math.round((Date.now() - g) * 100) / 100, _ = b / 16,
|
|
105
|
+
const w = Math.round((Date.now() - u) * 100) / 100, b = Math.round((Date.now() - g) * 100) / 100, _ = b / 16, R = (I, x) => {
|
|
93
106
|
for (I = String(I); I.length < x; )
|
|
94
107
|
I = " " + I;
|
|
95
108
|
return I;
|
|
96
109
|
};
|
|
97
110
|
console.info(
|
|
98
|
-
`%c⏱ ${
|
|
111
|
+
`%c⏱ ${R(b, 5)} /${R(w, 5)} ms`,
|
|
99
112
|
`
|
|
100
113
|
font-size: .6rem;
|
|
101
114
|
font-weight: bold;
|
|
@@ -109,22 +122,22 @@ function we(e, o, t) {
|
|
|
109
122
|
return (r = t == null ? void 0 : t.onChange) == null || r.call(t, l), l;
|
|
110
123
|
};
|
|
111
124
|
}
|
|
112
|
-
function
|
|
125
|
+
function Je(e, o) {
|
|
113
126
|
if (e === void 0)
|
|
114
127
|
throw new Error("Unexpected undefined");
|
|
115
128
|
return e;
|
|
116
129
|
}
|
|
117
|
-
const
|
|
130
|
+
const W2 = (e, o) => Math.abs(e - o) < 1, G2 = (e, o, t) => {
|
|
118
131
|
let n;
|
|
119
132
|
return function(...l) {
|
|
120
133
|
e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
|
|
121
134
|
};
|
|
122
|
-
},
|
|
135
|
+
}, q2 = (e) => e, J2 = (e) => {
|
|
123
136
|
const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
|
|
124
137
|
for (let l = o; l <= t; l++)
|
|
125
138
|
n.push(l);
|
|
126
139
|
return n;
|
|
127
|
-
},
|
|
140
|
+
}, K2 = (e, o) => {
|
|
128
141
|
const t = e.scrollElement;
|
|
129
142
|
if (!t)
|
|
130
143
|
return;
|
|
@@ -152,9 +165,9 @@ const H2 = (e, o) => Math.abs(e - o) < 1, z2 = (e, o, t) => {
|
|
|
152
165
|
return a.observe(t, { box: "border-box" }), () => {
|
|
153
166
|
a.unobserve(t);
|
|
154
167
|
};
|
|
155
|
-
},
|
|
168
|
+
}, pt = {
|
|
156
169
|
passive: !0
|
|
157
|
-
},
|
|
170
|
+
}, Y2 = typeof window > "u" ? !0 : "onscrollend" in window, Q2 = (e, o) => {
|
|
158
171
|
const t = e.scrollElement;
|
|
159
172
|
if (!t)
|
|
160
173
|
return;
|
|
@@ -162,8 +175,8 @@ const H2 = (e, o) => Math.abs(e - o) < 1, z2 = (e, o, t) => {
|
|
|
162
175
|
if (!n)
|
|
163
176
|
return;
|
|
164
177
|
let l = 0;
|
|
165
|
-
const a =
|
|
166
|
-
} :
|
|
178
|
+
const a = Y2 ? () => {
|
|
179
|
+
} : G2(
|
|
167
180
|
n,
|
|
168
181
|
() => {
|
|
169
182
|
o(l, !1);
|
|
@@ -172,10 +185,10 @@ const H2 = (e, o) => Math.abs(e - o) < 1, z2 = (e, o, t) => {
|
|
|
172
185
|
), i = (u) => () => {
|
|
173
186
|
l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], a(), o(l, u);
|
|
174
187
|
}, s = i(!0), r = i(!1);
|
|
175
|
-
return r(), t.addEventListener("scroll", s,
|
|
188
|
+
return r(), t.addEventListener("scroll", s, pt), t.addEventListener("scrollend", r, pt), () => {
|
|
176
189
|
t.removeEventListener("scroll", s), t.removeEventListener("scrollend", r);
|
|
177
190
|
};
|
|
178
|
-
},
|
|
191
|
+
}, X2 = (e, o, t) => {
|
|
179
192
|
if (o != null && o.borderBoxSize) {
|
|
180
193
|
const n = o.borderBoxSize[0];
|
|
181
194
|
if (n)
|
|
@@ -186,7 +199,7 @@ const H2 = (e, o) => Math.abs(e - o) < 1, z2 = (e, o, t) => {
|
|
|
186
199
|
return Math.round(
|
|
187
200
|
e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
|
|
188
201
|
);
|
|
189
|
-
},
|
|
202
|
+
}, e0 = (e, {
|
|
190
203
|
adjustments: o = 0,
|
|
191
204
|
behavior: t
|
|
192
205
|
}, n) => {
|
|
@@ -197,7 +210,7 @@ const H2 = (e, o) => Math.abs(e - o) < 1, z2 = (e, o, t) => {
|
|
|
197
210
|
behavior: t
|
|
198
211
|
});
|
|
199
212
|
};
|
|
200
|
-
class
|
|
213
|
+
class t0 {
|
|
201
214
|
constructor(o) {
|
|
202
215
|
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
216
|
let t = null;
|
|
@@ -232,11 +245,11 @@ class Y2 {
|
|
|
232
245
|
scrollPaddingStart: 0,
|
|
233
246
|
scrollPaddingEnd: 0,
|
|
234
247
|
horizontal: !1,
|
|
235
|
-
getItemKey:
|
|
236
|
-
rangeExtractor:
|
|
248
|
+
getItemKey: q2,
|
|
249
|
+
rangeExtractor: J2,
|
|
237
250
|
onChange: () => {
|
|
238
251
|
},
|
|
239
|
-
measureElement:
|
|
252
|
+
measureElement: X2,
|
|
240
253
|
initialRect: { width: 0, height: 0 },
|
|
241
254
|
scrollMargin: 0,
|
|
242
255
|
gap: 0,
|
|
@@ -326,18 +339,18 @@ class Y2 {
|
|
|
326
339
|
const c = this.measurementsCache.slice(0, u);
|
|
327
340
|
for (let p = u; p < t; p++) {
|
|
328
341
|
let g = (r = this.measurementsCache[p]) == null ? void 0 : r.measureElement;
|
|
329
|
-
g || (g = (
|
|
342
|
+
g || (g = (P) => {
|
|
330
343
|
const y = a(p), M = this.elementsCache.get(y);
|
|
331
|
-
if (!
|
|
344
|
+
if (!P) {
|
|
332
345
|
M && (this.observer.unobserve(M), this.elementsCache.delete(y));
|
|
333
346
|
return;
|
|
334
347
|
}
|
|
335
|
-
M !==
|
|
348
|
+
M !== P && (M && this.observer.unobserve(M), this.observer.observe(P), this.elementsCache.set(y, P)), P.isConnected && this.resizeItem(
|
|
336
349
|
p,
|
|
337
|
-
this.options.measureElement(
|
|
350
|
+
this.options.measureElement(P, void 0, this)
|
|
338
351
|
);
|
|
339
352
|
});
|
|
340
|
-
const w = a(p), b = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), _ = b ? b.end + this.options.gap : n + l,
|
|
353
|
+
const w = a(p), b = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), _ = b ? b.end + this.options.gap : n + l, R = s.get(w), I = typeof R == "number" ? R : this.options.estimateSize(p), x = _ + I, A = b ? b.lane : p % this.options.lanes;
|
|
341
354
|
c[p] = {
|
|
342
355
|
index: p,
|
|
343
356
|
start: _,
|
|
@@ -356,7 +369,7 @@ class Y2 {
|
|
|
356
369
|
}
|
|
357
370
|
), this.calculateRange = we(
|
|
358
371
|
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
359
|
-
(t, n, l) => this.range = t.length > 0 && n > 0 ?
|
|
372
|
+
(t, n, l) => this.range = t.length > 0 && n > 0 ? n0({
|
|
360
373
|
measurements: t,
|
|
361
374
|
outerSize: n,
|
|
362
375
|
scrollOffset: l
|
|
@@ -425,11 +438,11 @@ class Y2 {
|
|
|
425
438
|
), this.getVirtualItemForOffset = (t) => {
|
|
426
439
|
const n = this.getMeasurements();
|
|
427
440
|
if (n.length !== 0)
|
|
428
|
-
return
|
|
429
|
-
n[
|
|
441
|
+
return Je(
|
|
442
|
+
n[Ft(
|
|
430
443
|
0,
|
|
431
444
|
n.length - 1,
|
|
432
|
-
(l) =>
|
|
445
|
+
(l) => Je(n[l]).start,
|
|
433
446
|
t
|
|
434
447
|
)]
|
|
435
448
|
);
|
|
@@ -473,10 +486,10 @@ class Y2 {
|
|
|
473
486
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
474
487
|
this.options.getItemKey(t)
|
|
475
488
|
)) {
|
|
476
|
-
const [u] =
|
|
489
|
+
const [u] = Je(
|
|
477
490
|
this.getOffsetForIndex(t, s)
|
|
478
491
|
);
|
|
479
|
-
|
|
492
|
+
W2(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
|
|
480
493
|
} else
|
|
481
494
|
this.scrollToIndex(t, { align: s, behavior: l });
|
|
482
495
|
}));
|
|
@@ -505,7 +518,7 @@ class Y2 {
|
|
|
505
518
|
}, this.setOptions(o);
|
|
506
519
|
}
|
|
507
520
|
}
|
|
508
|
-
const
|
|
521
|
+
const Ft = (e, o, t, n) => {
|
|
509
522
|
for (; e <= o; ) {
|
|
510
523
|
const l = (e + o) / 2 | 0, a = t(l);
|
|
511
524
|
if (a < n)
|
|
@@ -517,19 +530,19 @@ const Vt = (e, o, t, n) => {
|
|
|
517
530
|
}
|
|
518
531
|
return e > 0 ? e - 1 : 0;
|
|
519
532
|
};
|
|
520
|
-
function
|
|
533
|
+
function n0({
|
|
521
534
|
measurements: e,
|
|
522
535
|
outerSize: o,
|
|
523
536
|
scrollOffset: t
|
|
524
537
|
}) {
|
|
525
|
-
const n = e.length - 1, a =
|
|
538
|
+
const n = e.length - 1, a = Ft(0, n, (s) => e[s].start, t);
|
|
526
539
|
let i = a;
|
|
527
540
|
for (; i < n && e[i].end < t + o; )
|
|
528
541
|
i++;
|
|
529
542
|
return { startIndex: a, endIndex: i };
|
|
530
543
|
}
|
|
531
|
-
function
|
|
532
|
-
const o = new
|
|
544
|
+
function o0(e) {
|
|
545
|
+
const o = new t0(L(e)), t = h2(o), n = o._didMount();
|
|
533
546
|
return N(
|
|
534
547
|
() => L(e).getScrollElement(),
|
|
535
548
|
(l) => {
|
|
@@ -545,37 +558,37 @@ function X2(e) {
|
|
|
545
558
|
...l,
|
|
546
559
|
onChange: (a, i) => {
|
|
547
560
|
var s;
|
|
548
|
-
|
|
561
|
+
ct(t), (s = l.onChange) == null || s.call(l, a, i);
|
|
549
562
|
}
|
|
550
|
-
}), o._willUpdate(),
|
|
563
|
+
}), o._willUpdate(), ct(t);
|
|
551
564
|
},
|
|
552
565
|
{
|
|
553
566
|
immediate: !0
|
|
554
567
|
}
|
|
555
|
-
),
|
|
568
|
+
), nt(n), t;
|
|
556
569
|
}
|
|
557
|
-
function
|
|
558
|
-
return
|
|
570
|
+
function l0(e) {
|
|
571
|
+
return o0(
|
|
559
572
|
E(() => ({
|
|
560
|
-
observeElementRect:
|
|
561
|
-
observeElementOffset:
|
|
562
|
-
scrollToFn:
|
|
573
|
+
observeElementRect: K2,
|
|
574
|
+
observeElementOffset: Q2,
|
|
575
|
+
scrollToFn: e0,
|
|
563
576
|
...L(e)
|
|
564
577
|
}))
|
|
565
578
|
);
|
|
566
579
|
}
|
|
567
|
-
function
|
|
580
|
+
function s0(e, o, t) {
|
|
568
581
|
let n = $(t == null ? void 0 : t.value), l = E(() => e.value !== void 0);
|
|
569
582
|
return [E(() => l.value ? e.value : n.value), function(a) {
|
|
570
583
|
return l.value || (n.value = a), o == null ? void 0 : o(a);
|
|
571
584
|
}];
|
|
572
585
|
}
|
|
573
|
-
function
|
|
586
|
+
function a0(e) {
|
|
574
587
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
|
|
575
588
|
throw o;
|
|
576
589
|
}));
|
|
577
590
|
}
|
|
578
|
-
function
|
|
591
|
+
function Ne() {
|
|
579
592
|
let e = [], o = { addEventListener(t, n, l, a) {
|
|
580
593
|
return t.addEventListener(n, l, a), o.add(() => t.removeEventListener(n, l, a));
|
|
581
594
|
}, requestAnimationFrame(...t) {
|
|
@@ -590,7 +603,7 @@ function De() {
|
|
|
590
603
|
o.add(() => clearTimeout(n));
|
|
591
604
|
}, microTask(...t) {
|
|
592
605
|
let n = { current: !0 };
|
|
593
|
-
return
|
|
606
|
+
return a0(() => {
|
|
594
607
|
n.current && t[0]();
|
|
595
608
|
}), o.add(() => {
|
|
596
609
|
n.current = !1;
|
|
@@ -601,7 +614,7 @@ function De() {
|
|
|
601
614
|
Object.assign(t.style, { [n]: a });
|
|
602
615
|
});
|
|
603
616
|
}, group(t) {
|
|
604
|
-
let n =
|
|
617
|
+
let n = Ne();
|
|
605
618
|
return t(n), this.add(() => n.dispose());
|
|
606
619
|
}, add(t) {
|
|
607
620
|
return e.push(t), () => {
|
|
@@ -613,19 +626,19 @@ function De() {
|
|
|
613
626
|
} };
|
|
614
627
|
return o;
|
|
615
628
|
}
|
|
616
|
-
function
|
|
617
|
-
let e =
|
|
618
|
-
return
|
|
629
|
+
function i0() {
|
|
630
|
+
let e = Ne();
|
|
631
|
+
return ot(() => e.dispose()), e;
|
|
619
632
|
}
|
|
620
|
-
function
|
|
621
|
-
let e =
|
|
633
|
+
function r0() {
|
|
634
|
+
let e = i0();
|
|
622
635
|
return (o) => {
|
|
623
636
|
e.dispose(), e.nextFrame(o);
|
|
624
637
|
};
|
|
625
638
|
}
|
|
626
|
-
let
|
|
639
|
+
let u0 = Symbol("headlessui.useid"), c0 = 0;
|
|
627
640
|
function Le() {
|
|
628
|
-
return Te(
|
|
641
|
+
return Te(u0, () => `${++c0}`)();
|
|
629
642
|
}
|
|
630
643
|
function V(e) {
|
|
631
644
|
var o;
|
|
@@ -641,10 +654,10 @@ function ae(e, o, ...t) {
|
|
|
641
654
|
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
655
|
throw Error.captureStackTrace && Error.captureStackTrace(n, ae), n;
|
|
643
656
|
}
|
|
644
|
-
var
|
|
645
|
-
let
|
|
657
|
+
var d0 = Object.defineProperty, f0 = (e, o, t) => o in e ? d0(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, vt = (e, o, t) => (f0(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
658
|
+
let p0 = class {
|
|
646
659
|
constructor() {
|
|
647
|
-
|
|
660
|
+
vt(this, "current", this.detect()), vt(this, "currentId", 0);
|
|
648
661
|
}
|
|
649
662
|
set(o) {
|
|
650
663
|
this.current !== o && (this.currentId = 0, this.current = o);
|
|
@@ -664,9 +677,9 @@ let u0 = class {
|
|
|
664
677
|
detect() {
|
|
665
678
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
666
679
|
}
|
|
667
|
-
},
|
|
668
|
-
function
|
|
669
|
-
if (
|
|
680
|
+
}, at = new p0();
|
|
681
|
+
function it(e) {
|
|
682
|
+
if (at.isServer) return null;
|
|
670
683
|
if (e instanceof Node) return e.ownerDocument;
|
|
671
684
|
if (e != null && e.hasOwnProperty("value")) {
|
|
672
685
|
let o = V(e);
|
|
@@ -674,28 +687,28 @@ function at(e) {
|
|
|
674
687
|
}
|
|
675
688
|
return document;
|
|
676
689
|
}
|
|
677
|
-
let
|
|
678
|
-
var
|
|
679
|
-
function
|
|
690
|
+
let ht = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
691
|
+
var v0 = ((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))(v0 || {}), h0 = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(h0 || {}), m0 = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(m0 || {}), Rt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Rt || {});
|
|
692
|
+
function b0(e, o = 0) {
|
|
680
693
|
var t;
|
|
681
|
-
return e === ((t =
|
|
682
|
-
return e.matches(
|
|
694
|
+
return e === ((t = it(e)) == null ? void 0 : t.body) ? !1 : ae(o, { 0() {
|
|
695
|
+
return e.matches(ht);
|
|
683
696
|
}, 1() {
|
|
684
697
|
let n = e;
|
|
685
698
|
for (; n !== null; ) {
|
|
686
|
-
if (n.matches(
|
|
699
|
+
if (n.matches(ht)) return !0;
|
|
687
700
|
n = n.parentElement;
|
|
688
701
|
}
|
|
689
702
|
return !1;
|
|
690
703
|
} });
|
|
691
704
|
}
|
|
692
|
-
var
|
|
705
|
+
var g0 = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(g0 || {});
|
|
693
706
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
694
707
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
695
708
|
}, !0), document.addEventListener("click", (e) => {
|
|
696
709
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
697
710
|
}, !0));
|
|
698
|
-
function
|
|
711
|
+
function C0(e, o = (t) => t) {
|
|
699
712
|
return e.slice().sort((t, n) => {
|
|
700
713
|
let l = o(t), a = o(n);
|
|
701
714
|
if (l === null || a === null) return 0;
|
|
@@ -703,26 +716,26 @@ function h0(e, o = (t) => t) {
|
|
|
703
716
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
704
717
|
});
|
|
705
718
|
}
|
|
706
|
-
function
|
|
719
|
+
function x0() {
|
|
707
720
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
708
721
|
}
|
|
709
|
-
function
|
|
722
|
+
function y0() {
|
|
710
723
|
return /Android/gi.test(window.navigator.userAgent);
|
|
711
724
|
}
|
|
712
725
|
function Pt() {
|
|
713
|
-
return
|
|
726
|
+
return x0() || y0();
|
|
714
727
|
}
|
|
715
|
-
function
|
|
716
|
-
|
|
728
|
+
function Ve(e, o, t) {
|
|
729
|
+
at.isServer || re((n) => {
|
|
717
730
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
718
731
|
});
|
|
719
732
|
}
|
|
720
|
-
function
|
|
721
|
-
|
|
733
|
+
function w0(e, o, t) {
|
|
734
|
+
at.isServer || re((n) => {
|
|
722
735
|
window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
|
|
723
736
|
});
|
|
724
737
|
}
|
|
725
|
-
function
|
|
738
|
+
function _0(e, o, t = E(() => !0)) {
|
|
726
739
|
function n(a, i) {
|
|
727
740
|
if (!t.value || a.defaultPrevented) return;
|
|
728
741
|
let s = i(a);
|
|
@@ -735,86 +748,86 @@ function C0(e, o, t = E(() => !0)) {
|
|
|
735
748
|
let c = u instanceof HTMLElement ? u : V(u);
|
|
736
749
|
if (c != null && c.contains(s) || a.composed && a.composedPath().includes(c)) return;
|
|
737
750
|
}
|
|
738
|
-
return !
|
|
751
|
+
return !b0(s, Rt.Loose) && s.tabIndex !== -1 && a.preventDefault(), o(a, s);
|
|
739
752
|
}
|
|
740
753
|
let l = $(null);
|
|
741
|
-
|
|
754
|
+
Ve("pointerdown", (a) => {
|
|
742
755
|
var i, s;
|
|
743
756
|
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
744
|
-
}, !0),
|
|
757
|
+
}, !0), Ve("mousedown", (a) => {
|
|
745
758
|
var i, s;
|
|
746
759
|
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
747
|
-
}, !0),
|
|
760
|
+
}, !0), Ve("click", (a) => {
|
|
748
761
|
Pt() || l.value && (n(a, () => l.value), l.value = null);
|
|
749
|
-
}, !0),
|
|
762
|
+
}, !0), Ve("touchend", (a) => n(a, () => a.target instanceof HTMLElement ? a.target : null), !0), w0("blur", (a) => n(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
750
763
|
}
|
|
751
|
-
function
|
|
764
|
+
function mt(e, o) {
|
|
752
765
|
if (e) return e;
|
|
753
766
|
let t = o ?? "button";
|
|
754
767
|
if (typeof t == "string" && t.toLowerCase() === "button") return "button";
|
|
755
768
|
}
|
|
756
|
-
function
|
|
757
|
-
let t = $(
|
|
769
|
+
function S0(e, o) {
|
|
770
|
+
let t = $(mt(e.value.type, e.value.as));
|
|
758
771
|
return ve(() => {
|
|
759
|
-
t.value =
|
|
772
|
+
t.value = mt(e.value.type, e.value.as);
|
|
760
773
|
}), re(() => {
|
|
761
774
|
var n;
|
|
762
775
|
t.value || V(o) && V(o) instanceof HTMLButtonElement && !((n = V(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
763
776
|
}), t;
|
|
764
777
|
}
|
|
765
|
-
function
|
|
778
|
+
function bt(e) {
|
|
766
779
|
return [e.screenX, e.screenY];
|
|
767
780
|
}
|
|
768
|
-
function
|
|
781
|
+
function E0() {
|
|
769
782
|
let e = $([-1, -1]);
|
|
770
783
|
return { wasMoved(o) {
|
|
771
|
-
let t =
|
|
784
|
+
let t = bt(o);
|
|
772
785
|
return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
|
|
773
786
|
}, update(o) {
|
|
774
|
-
e.value =
|
|
787
|
+
e.value = bt(o);
|
|
775
788
|
} };
|
|
776
789
|
}
|
|
777
|
-
function
|
|
790
|
+
function O0({ container: e, accept: o, walk: t, enabled: n }) {
|
|
778
791
|
re(() => {
|
|
779
792
|
let l = e.value;
|
|
780
793
|
if (!l || n !== void 0 && !n.value) return;
|
|
781
|
-
let a =
|
|
794
|
+
let a = it(e);
|
|
782
795
|
if (!a) return;
|
|
783
796
|
let i = Object.assign((r) => o(r), { acceptNode: o }), s = a.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
784
797
|
for (; s.nextNode(); ) t(s.currentNode);
|
|
785
798
|
});
|
|
786
799
|
}
|
|
787
|
-
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}),
|
|
800
|
+
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
801
|
function he({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
789
802
|
var a;
|
|
790
|
-
let i =
|
|
791
|
-
if (e || o & 2 && i.static) return
|
|
803
|
+
let i = Nt(n, t), s = Object.assign(l, { props: i });
|
|
804
|
+
if (e || o & 2 && i.static) return Ke(s);
|
|
792
805
|
if (o & 1) {
|
|
793
806
|
let r = (a = i.unmount) == null || a ? 0 : 1;
|
|
794
807
|
return ae(r, { 0() {
|
|
795
808
|
return null;
|
|
796
809
|
}, 1() {
|
|
797
|
-
return
|
|
810
|
+
return Ke({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
798
811
|
} });
|
|
799
812
|
}
|
|
800
|
-
return
|
|
813
|
+
return Ke(s);
|
|
801
814
|
}
|
|
802
|
-
function
|
|
815
|
+
function Ke({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
803
816
|
var a, i;
|
|
804
|
-
let { as: s, ...r } =
|
|
817
|
+
let { as: s, ...r } = He(e, ["unmount", "static"]), u = (a = t.default) == null ? void 0 : a.call(t, n), c = {};
|
|
805
818
|
if (n) {
|
|
806
819
|
let p = !1, g = [];
|
|
807
820
|
for (let [w, b] of Object.entries(n)) typeof b == "boolean" && (p = !0), b === !0 && g.push(w);
|
|
808
821
|
p && (c["data-headlessui-state"] = g.join(" "));
|
|
809
822
|
}
|
|
810
823
|
if (s === "template") {
|
|
811
|
-
if (u =
|
|
824
|
+
if (u = Dt(u ?? []), Object.keys(r).length > 0 || Object.keys(o).length > 0) {
|
|
812
825
|
let [p, ...g] = u ?? [];
|
|
813
|
-
if (!
|
|
826
|
+
if (!T0(p) || g.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(r).concat(Object.keys(o)).map((_) => _.trim()).filter((_, R, I) => I.indexOf(_) === R).sort((_, R) => _.localeCompare(R)).map((_) => ` - ${_}`).join(`
|
|
814
827
|
`), "", "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
828
|
`)].join(`
|
|
816
829
|
`));
|
|
817
|
-
let w =
|
|
830
|
+
let w = Nt((i = p.props) != null ? i : {}, r, c), b = It(p, w, !0);
|
|
818
831
|
for (let _ in w) _.startsWith("on") && (b.props || (b.props = {}), b.props[_] = w[_]);
|
|
819
832
|
return b;
|
|
820
833
|
}
|
|
@@ -822,10 +835,10 @@ function Je({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
|
822
835
|
}
|
|
823
836
|
return Ee(s, Object.assign({}, r, c), { default: () => u });
|
|
824
837
|
}
|
|
825
|
-
function
|
|
826
|
-
return e.flatMap((o) => o.type === G ?
|
|
838
|
+
function Dt(e) {
|
|
839
|
+
return e.flatMap((o) => o.type === G ? Dt(o.children) : [o]);
|
|
827
840
|
}
|
|
828
|
-
function
|
|
841
|
+
function Nt(...e) {
|
|
829
842
|
if (e.length === 0) return {};
|
|
830
843
|
if (e.length === 1) return e[0];
|
|
831
844
|
let o = {}, t = {};
|
|
@@ -840,53 +853,53 @@ function Dt(...e) {
|
|
|
840
853
|
} });
|
|
841
854
|
return o;
|
|
842
855
|
}
|
|
843
|
-
function
|
|
856
|
+
function I0(e) {
|
|
844
857
|
let o = Object.assign({}, e);
|
|
845
858
|
for (let t in o) o[t] === void 0 && delete o[t];
|
|
846
859
|
return o;
|
|
847
860
|
}
|
|
848
|
-
function
|
|
861
|
+
function He(e, o = []) {
|
|
849
862
|
let t = Object.assign({}, e);
|
|
850
863
|
for (let n of o) n in t && delete t[n];
|
|
851
864
|
return t;
|
|
852
865
|
}
|
|
853
|
-
function
|
|
866
|
+
function T0(e) {
|
|
854
867
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
855
868
|
}
|
|
856
|
-
var
|
|
857
|
-
let
|
|
869
|
+
var Bt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Bt || {});
|
|
870
|
+
let L0 = ue({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
|
|
858
871
|
return () => {
|
|
859
872
|
var n;
|
|
860
873
|
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
874
|
return he({ ourProps: i, theirProps: a, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
862
875
|
};
|
|
863
|
-
} }),
|
|
876
|
+
} }), jt = Symbol("Context");
|
|
864
877
|
var $e = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))($e || {});
|
|
865
|
-
function
|
|
866
|
-
return Te(
|
|
878
|
+
function M0() {
|
|
879
|
+
return Te(jt, null);
|
|
867
880
|
}
|
|
868
|
-
function
|
|
869
|
-
|
|
881
|
+
function k0(e) {
|
|
882
|
+
lt(jt, e);
|
|
870
883
|
}
|
|
871
|
-
var J = ((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))(J || {}),
|
|
872
|
-
function
|
|
884
|
+
var J = ((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))(J || {}), Ht = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Ht || {});
|
|
885
|
+
function A0(e) {
|
|
873
886
|
function o() {
|
|
874
887
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
875
888
|
}
|
|
876
889
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
|
|
877
890
|
}
|
|
878
891
|
let de = [];
|
|
879
|
-
|
|
892
|
+
A0(() => {
|
|
880
893
|
function e(o) {
|
|
881
894
|
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
895
|
}
|
|
883
896
|
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
897
|
});
|
|
885
|
-
function
|
|
898
|
+
function V0(e) {
|
|
886
899
|
throw new Error("Unexpected object: " + e);
|
|
887
900
|
}
|
|
888
901
|
var Z = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(Z || {});
|
|
889
|
-
function
|
|
902
|
+
function gt(e, o) {
|
|
890
903
|
let t = o.resolveItems();
|
|
891
904
|
if (t.length <= 0) return null;
|
|
892
905
|
let n = o.resolveActiveIndex(), l = n ?? -1;
|
|
@@ -915,40 +928,40 @@ function bt(e, o) {
|
|
|
915
928
|
case 5:
|
|
916
929
|
return null;
|
|
917
930
|
default:
|
|
918
|
-
|
|
931
|
+
V0(e);
|
|
919
932
|
}
|
|
920
933
|
}
|
|
921
|
-
function
|
|
922
|
-
for (let [n, l] of Object.entries(e))
|
|
934
|
+
function zt(e = {}, o = null, t = []) {
|
|
935
|
+
for (let [n, l] of Object.entries(e)) Zt(t, Ut(o, n), l);
|
|
923
936
|
return t;
|
|
924
937
|
}
|
|
925
|
-
function
|
|
938
|
+
function Ut(e, o) {
|
|
926
939
|
return e ? e + "[" + o + "]" : o;
|
|
927
940
|
}
|
|
928
|
-
function
|
|
929
|
-
if (Array.isArray(t)) for (let [n, l] of t.entries())
|
|
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, ""]) :
|
|
941
|
+
function Zt(e, o, t) {
|
|
942
|
+
if (Array.isArray(t)) for (let [n, l] of t.entries()) Zt(e, Ut(o, n.toString()), l);
|
|
943
|
+
else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : zt(t, o, e);
|
|
931
944
|
}
|
|
932
|
-
function
|
|
945
|
+
function F0(e, o) {
|
|
933
946
|
return e === o;
|
|
934
947
|
}
|
|
935
|
-
var
|
|
936
|
-
let
|
|
948
|
+
var R0 = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(R0 || {}), P0 = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(P0 || {}), D0 = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(D0 || {});
|
|
949
|
+
let Wt = Symbol("ComboboxContext");
|
|
937
950
|
function me(e) {
|
|
938
|
-
let o = Te(
|
|
951
|
+
let o = Te(Wt, null);
|
|
939
952
|
if (o === null) {
|
|
940
953
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
941
954
|
throw Error.captureStackTrace && Error.captureStackTrace(t, me), t;
|
|
942
955
|
}
|
|
943
956
|
return o;
|
|
944
957
|
}
|
|
945
|
-
let
|
|
958
|
+
let Gt = Symbol("VirtualContext"), N0 = ue({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
946
959
|
let t = me("VirtualProvider"), n = E(() => {
|
|
947
960
|
let s = V(t.optionsRef);
|
|
948
961
|
if (!s) return { start: 0, end: 0 };
|
|
949
962
|
let r = window.getComputedStyle(s);
|
|
950
963
|
return { start: parseFloat(r.paddingBlockStart || r.paddingTop), end: parseFloat(r.paddingBlockEnd || r.paddingBottom) };
|
|
951
|
-
}), l =
|
|
964
|
+
}), l = l0(E(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
952
965
|
return 40;
|
|
953
966
|
}, getScrollElement() {
|
|
954
967
|
return V(t.optionsRef);
|
|
@@ -958,19 +971,19 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
958
971
|
}), i = $(0);
|
|
959
972
|
return N([a], () => {
|
|
960
973
|
i.value += 1;
|
|
961
|
-
}),
|
|
974
|
+
}), lt(Gt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
962
975
|
if (s) {
|
|
963
976
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
964
977
|
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
965
978
|
}
|
|
966
|
-
} }, l.value.getVirtualItems().map((s) =>
|
|
967
|
-
} }),
|
|
979
|
+
} }, 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" } })))];
|
|
980
|
+
} }), B0 = 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
981
|
let l = $(1), a = $(null), i = $(null), s = $(null), r = $(null), u = $({ static: !1, hold: !1 }), c = $([]), p = $(null), g = $(2), w = $(!1);
|
|
969
982
|
function b(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, Y) => D.dataRef.order.value - Y.dataRef.order.value) :
|
|
983
|
+
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, Y) => D.dataRef.order.value - Y.dataRef.order.value) : C0(S, (D) => V(D.dataRef.domRef)), F = f ? T.indexOf(f) : null;
|
|
971
984
|
return F === -1 && (F = null), { options: T, activeOptionIndex: F };
|
|
972
985
|
}
|
|
973
|
-
let _ = E(() => e.multiple ? 1 : 0),
|
|
986
|
+
let _ = E(() => e.multiple ? 1 : 0), R = E(() => e.nullable), [I, x] = s0(E(() => e.modelValue), (d) => n("update:modelValue", d), E(() => e.defaultValue)), A = E(() => I.value === void 0 ? ae(_.value, { 1: [], 0: void 0 }) : I.value), P = null, y = null;
|
|
974
987
|
function M(d) {
|
|
975
988
|
return ae(_.value, { 0() {
|
|
976
989
|
return x == null ? void 0 : x(d);
|
|
@@ -992,10 +1005,10 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
992
1005
|
let S = e.by;
|
|
993
1006
|
return (d == null ? void 0 : d[S]) === (f == null ? void 0 : f[S]);
|
|
994
1007
|
}
|
|
995
|
-
return e.by === null ?
|
|
1008
|
+
return e.by === null ? F0(d, f) : e.by(d, f);
|
|
996
1009
|
}, calculateIndex(d) {
|
|
997
1010
|
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:
|
|
1011
|
+
}, defaultValue: E(() => e.defaultValue), nullable: R, immediate: E(() => !1), virtual: E(() => null), inputRef: i, labelRef: a, buttonRef: s, optionsRef: r, disabled: E(() => e.disabled), options: c, change(d) {
|
|
999
1012
|
x(d);
|
|
1000
1013
|
}, activeOptionIndex: E(() => {
|
|
1001
1014
|
if (w.value && p.value === null && (h.virtual.value ? h.virtual.value.options.length > 0 : c.value.length > 0)) {
|
|
@@ -1023,10 +1036,10 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1023
1036
|
}, setActivationTrigger(d) {
|
|
1024
1037
|
g.value = d;
|
|
1025
1038
|
}, goToOption(d, f, S) {
|
|
1026
|
-
w.value = !1,
|
|
1039
|
+
w.value = !1, P !== null && cancelAnimationFrame(P), P = requestAnimationFrame(() => {
|
|
1027
1040
|
if (e.disabled || r.value && !u.value.static && l.value === 1) return;
|
|
1028
1041
|
if (h.virtual.value) {
|
|
1029
|
-
p.value = d === Z.Specific ? f :
|
|
1042
|
+
p.value = d === Z.Specific ? f : gt({ focus: d }, { resolveItems: () => h.virtual.value.options, resolveActiveIndex: () => {
|
|
1030
1043
|
var D, Y;
|
|
1031
1044
|
return (Y = (D = h.activeOptionIndex.value) != null ? D : h.virtual.value.options.findIndex((Q) => {
|
|
1032
1045
|
var z;
|
|
@@ -1042,7 +1055,7 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1042
1055
|
let D = T.options.findIndex((Y) => !Y.dataRef.disabled);
|
|
1043
1056
|
D !== -1 && (T.activeOptionIndex = D);
|
|
1044
1057
|
}
|
|
1045
|
-
let F = d === Z.Specific ? f :
|
|
1058
|
+
let F = d === Z.Specific ? f : gt({ focus: d }, { resolveItems: () => T.options, resolveActiveIndex: () => T.activeOptionIndex, resolveId: (D) => D.id, resolveDisabled: (D) => D.dataRef.disabled });
|
|
1046
1059
|
p.value = F, g.value = S ?? 2, c.value = T.options;
|
|
1047
1060
|
});
|
|
1048
1061
|
}, selectOption(d) {
|
|
@@ -1060,7 +1073,7 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1060
1073
|
h.goToOption(Z.Specific, h.activeOptionIndex.value);
|
|
1061
1074
|
}
|
|
1062
1075
|
}, registerOption(d, f) {
|
|
1063
|
-
let S =
|
|
1076
|
+
let S = Tt({ id: d, dataRef: f });
|
|
1064
1077
|
if (h.virtual.value) {
|
|
1065
1078
|
c.value.push(S);
|
|
1066
1079
|
return;
|
|
@@ -1072,7 +1085,7 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1072
1085
|
c.value = F.options, p.value = F.activeOptionIndex;
|
|
1073
1086
|
}));
|
|
1074
1087
|
}, unregisterOption(d, f) {
|
|
1075
|
-
if (
|
|
1088
|
+
if (P !== null && cancelAnimationFrame(P), f && (w.value = !0), h.virtual.value) {
|
|
1076
1089
|
c.value = c.value.filter((T) => T.id !== d);
|
|
1077
1090
|
return;
|
|
1078
1091
|
}
|
|
@@ -1086,7 +1099,7 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1086
1099
|
}, isActive(d) {
|
|
1087
1100
|
return p.value === h.calculateIndex(d);
|
|
1088
1101
|
} };
|
|
1089
|
-
|
|
1102
|
+
_0([i, s, r], () => h.closeCombobox(), E(() => l.value === 0)), lt(Wt, h), k0(E(() => ae(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1090
1103
|
let k = E(() => {
|
|
1091
1104
|
var d;
|
|
1092
1105
|
return (d = V(i)) == null ? void 0 : d.closest("form");
|
|
@@ -1105,7 +1118,7 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1105
1118
|
}), () => {
|
|
1106
1119
|
var d, f, S;
|
|
1107
1120
|
let { name: T, disabled: F, form: D, ...Y } = e, Q = { 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: A.value };
|
|
1108
|
-
return Ee(G, [...T != null && A.value != null ?
|
|
1121
|
+
return Ee(G, [...T != null && A.value != null ? zt({ [T]: A.value }).map(([z, v2]) => Ee(L0, I0({ features: Bt.Hidden, key: z, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: D, disabled: F, name: z, value: v2 }))) : [], he({ theirProps: { ...t, ...He(Y, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: Q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1109
1122
|
};
|
|
1110
1123
|
} });
|
|
1111
1124
|
ue({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
@@ -1120,7 +1133,7 @@ ue({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "lab
|
|
|
1120
1133
|
return he({ ourProps: u, theirProps: r, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1121
1134
|
};
|
|
1122
1135
|
} });
|
|
1123
|
-
let
|
|
1136
|
+
let j0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1124
1137
|
var l;
|
|
1125
1138
|
let a = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i = me("ComboboxButton");
|
|
1126
1139
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
@@ -1155,15 +1168,15 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1155
1168
|
return;
|
|
1156
1169
|
}
|
|
1157
1170
|
}
|
|
1158
|
-
let u =
|
|
1171
|
+
let u = S0(E(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1159
1172
|
return () => {
|
|
1160
1173
|
var c, p;
|
|
1161
1174
|
let g = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...w } = e, b = { ref: i.buttonRef, id: a, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = V(i.optionsRef)) == null ? void 0 : c.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(p = V(i.labelRef)) == null ? void 0 : p.id, a].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: r, onClick: s };
|
|
1162
1175
|
return he({ ourProps: b, theirProps: w, slot: g, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1163
1176
|
};
|
|
1164
|
-
} }),
|
|
1177
|
+
} }), H0 = 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
1178
|
var a;
|
|
1166
|
-
let i = (a = e.id) != null ? a : `headlessui-combobox-input-${Le()}`, s = me("ComboboxInput"), r = E(() =>
|
|
1179
|
+
let i = (a = e.id) != null ? a : `headlessui-combobox-input-${Le()}`, s = me("ComboboxInput"), r = E(() => it(V(s.inputRef))), u = { value: !1 };
|
|
1167
1180
|
l({ el: s.inputRef, $el: s.inputRef });
|
|
1168
1181
|
function c() {
|
|
1169
1182
|
s.change(null);
|
|
@@ -1200,12 +1213,12 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1200
1213
|
g.value = !0;
|
|
1201
1214
|
}
|
|
1202
1215
|
function b() {
|
|
1203
|
-
|
|
1216
|
+
Ne().nextFrame(() => {
|
|
1204
1217
|
g.value = !1;
|
|
1205
1218
|
});
|
|
1206
1219
|
}
|
|
1207
|
-
let _ =
|
|
1208
|
-
function
|
|
1220
|
+
let _ = r0();
|
|
1221
|
+
function R(y) {
|
|
1209
1222
|
switch (u.value = !0, _(() => {
|
|
1210
1223
|
u.value = !1;
|
|
1211
1224
|
}), y.key) {
|
|
@@ -1256,28 +1269,28 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1256
1269
|
function A(y) {
|
|
1257
1270
|
var M, C, h;
|
|
1258
1271
|
let k = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1259
|
-
(C = V(s.buttonRef)) != null && C.contains(k) || (h = V(s.optionsRef)) != null && h.contains(k) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(),
|
|
1272
|
+
(C = V(s.buttonRef)) != null && C.contains(k) || (h = V(s.optionsRef)) != null && h.contains(k) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), Ne().nextFrame(() => {
|
|
1260
1273
|
s.setActivationTrigger(1);
|
|
1261
1274
|
}));
|
|
1262
1275
|
}
|
|
1263
|
-
let
|
|
1276
|
+
let P = E(() => {
|
|
1264
1277
|
var y, M, C, h;
|
|
1265
1278
|
return (h = (C = (M = e.defaultValue) != null ? M : s.defaultValue.value !== void 0 ? (y = e.displayValue) == null ? void 0 : y.call(e, s.defaultValue.value) : null) != null ? C : s.defaultValue.value) != null ? h : "";
|
|
1266
1279
|
});
|
|
1267
1280
|
return () => {
|
|
1268
1281
|
var y, M, C, h, k, d, f;
|
|
1269
|
-
let S = { open: s.comboboxState.value === 0 }, { displayValue: T, onChange: F, ...D } = e, Y = { "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((Q) => !s.virtual.value.disabled(Q.dataRef.value) && s.compare(Q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : M.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (h = V(s.labelRef)) == null ? void 0 : h.id) != null ? d : (k = V(s.buttonRef)) == null ? void 0 : k.id, "aria-autocomplete": "list", id: i, onCompositionstart: w, onCompositionend: b, onKeydown:
|
|
1282
|
+
let S = { open: s.comboboxState.value === 0 }, { displayValue: T, onChange: F, ...D } = e, Y = { "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((Q) => !s.virtual.value.disabled(Q.dataRef.value) && s.compare(Q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : M.id : (C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id, "aria-labelledby": (d = (h = V(s.labelRef)) == null ? void 0 : h.id) != null ? d : (k = V(s.buttonRef)) == null ? void 0 : k.id, "aria-autocomplete": "list", id: i, onCompositionstart: w, onCompositionend: b, onKeydown: R, onInput: I, onFocus: A, onBlur: x, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: P.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1270
1283
|
return he({ ourProps: Y, theirProps: D, slot: S, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1271
1284
|
};
|
|
1272
|
-
} }),
|
|
1285
|
+
} }), z0 = 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
1286
|
let l = me("ComboboxOptions"), a = `headlessui-combobox-options-${Le()}`;
|
|
1274
1287
|
n({ el: l.optionsRef, $el: l.optionsRef }), re(() => {
|
|
1275
1288
|
l.optionsPropsRef.value.static = e.static;
|
|
1276
1289
|
}), re(() => {
|
|
1277
1290
|
l.optionsPropsRef.value.hold = e.hold;
|
|
1278
1291
|
});
|
|
1279
|
-
let i =
|
|
1280
|
-
|
|
1292
|
+
let i = M0(), s = E(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1293
|
+
O0({ container: E(() => V(l.optionsRef)), enabled: E(() => l.comboboxState.value === 0), accept(u) {
|
|
1281
1294
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1282
1295
|
}, walk(u) {
|
|
1283
1296
|
u.setAttribute("role", "none");
|
|
@@ -1287,17 +1300,17 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1287
1300
|
}
|
|
1288
1301
|
return () => {
|
|
1289
1302
|
var u, c, p;
|
|
1290
|
-
let g = { open: l.comboboxState.value === 0 }, w = { "aria-labelledby": (p = (u = V(l.labelRef)) == null ? void 0 : u.id) != null ? p : (c = V(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 }, b =
|
|
1291
|
-
return he({ ourProps: w, theirProps: b, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(
|
|
1303
|
+
let g = { open: l.comboboxState.value === 0 }, w = { "aria-labelledby": (p = (u = V(l.labelRef)) == null ? void 0 : u.id) != null ? p : (c = V(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 }, b = He(e, ["hold"]);
|
|
1304
|
+
return he({ ourProps: w, theirProps: b, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(N0, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1292
1305
|
};
|
|
1293
|
-
} }),
|
|
1306
|
+
} }), U0 = 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
1307
|
let l = me("ComboboxOption"), a = `headlessui-combobox-option-${Le()}`, i = $(null), s = E(() => e.disabled);
|
|
1295
1308
|
n({ el: i, $el: i });
|
|
1296
1309
|
let r = E(() => {
|
|
1297
1310
|
var x;
|
|
1298
1311
|
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(
|
|
1300
|
-
ve(() => l.registerOption(a, p)),
|
|
1312
|
+
}), u = E(() => l.isSelected(e.value)), c = Te(Gt, null), p = E(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: E(() => e.order) }));
|
|
1313
|
+
ve(() => l.registerOption(a, p)), ot(() => l.unregisterOption(a, r.value)), re(() => {
|
|
1301
1314
|
let x = V(i);
|
|
1302
1315
|
x && (c == null || c.value.measureElement(x));
|
|
1303
1316
|
}), re(() => {
|
|
@@ -1307,7 +1320,7 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1307
1320
|
}));
|
|
1308
1321
|
});
|
|
1309
1322
|
function g(x) {
|
|
1310
|
-
x.preventDefault(), x.button ===
|
|
1323
|
+
x.preventDefault(), x.button === Ht.Left && (s.value || (l.selectOption(a), Pt() || requestAnimationFrame(() => {
|
|
1311
1324
|
var A;
|
|
1312
1325
|
return (A = V(l.inputRef)) == null ? void 0 : A.focus({ preventScroll: !0 });
|
|
1313
1326
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
@@ -1318,26 +1331,26 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1318
1331
|
let A = l.calculateIndex(e.value);
|
|
1319
1332
|
l.goToOption(Z.Specific, A);
|
|
1320
1333
|
}
|
|
1321
|
-
let b =
|
|
1334
|
+
let b = E0();
|
|
1322
1335
|
function _(x) {
|
|
1323
1336
|
b.update(x);
|
|
1324
1337
|
}
|
|
1325
|
-
function
|
|
1338
|
+
function R(x) {
|
|
1326
1339
|
var A;
|
|
1327
1340
|
if (!b.wasMoved(x) || e.disabled || (A = l.virtual.value) != null && A.disabled(e.value) || r.value) return;
|
|
1328
|
-
let
|
|
1329
|
-
l.goToOption(Z.Specific,
|
|
1341
|
+
let P = l.calculateIndex(e.value);
|
|
1342
|
+
l.goToOption(Z.Specific, P, 0);
|
|
1330
1343
|
}
|
|
1331
1344
|
function I(x) {
|
|
1332
1345
|
var A;
|
|
1333
1346
|
b.wasMoved(x) && (e.disabled || (A = l.virtual.value) != null && A.disabled(e.value) || r.value && (l.optionsPropsRef.value.hold || l.goToOption(Z.Nothing)));
|
|
1334
1347
|
}
|
|
1335
1348
|
return () => {
|
|
1336
|
-
let { disabled: x } = e, A = { active: r.value, selected: u.value, disabled: x },
|
|
1337
|
-
return he({ ourProps:
|
|
1349
|
+
let { disabled: x } = e, A = { active: r.value, selected: u.value, disabled: x }, P = { 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: g, onFocus: w, onPointerenter: _, onMouseenter: _, onPointermove: R, onMousemove: R, onPointerleave: I, onMouseleave: I }, y = He(e, ["order", "value"]);
|
|
1350
|
+
return he({ ourProps: P, theirProps: y, slot: A, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1338
1351
|
};
|
|
1339
1352
|
} });
|
|
1340
|
-
function
|
|
1353
|
+
function Z0(e, o) {
|
|
1341
1354
|
return m(), O("svg", {
|
|
1342
1355
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1356
|
viewBox: "0 0 20 20",
|
|
@@ -1352,7 +1365,7 @@ function j0(e, o) {
|
|
|
1352
1365
|
})
|
|
1353
1366
|
]);
|
|
1354
1367
|
}
|
|
1355
|
-
function
|
|
1368
|
+
function W0(e, o) {
|
|
1356
1369
|
return m(), O("svg", {
|
|
1357
1370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1358
1371
|
viewBox: "0 0 20 20",
|
|
@@ -1367,7 +1380,7 @@ function H0(e, o) {
|
|
|
1367
1380
|
})
|
|
1368
1381
|
]);
|
|
1369
1382
|
}
|
|
1370
|
-
function
|
|
1383
|
+
function G0(e, o) {
|
|
1371
1384
|
return m(), O("svg", {
|
|
1372
1385
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1373
1386
|
viewBox: "0 0 20 20",
|
|
@@ -1382,33 +1395,33 @@ function z0(e, o) {
|
|
|
1382
1395
|
})
|
|
1383
1396
|
]);
|
|
1384
1397
|
}
|
|
1385
|
-
var
|
|
1386
|
-
function
|
|
1398
|
+
var qt = !1;
|
|
1399
|
+
function Fe(e, o, t) {
|
|
1387
1400
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1388
1401
|
}
|
|
1389
|
-
function
|
|
1402
|
+
function Ye(e, o) {
|
|
1390
1403
|
if (Array.isArray(e)) {
|
|
1391
1404
|
e.splice(o, 1);
|
|
1392
1405
|
return;
|
|
1393
1406
|
}
|
|
1394
1407
|
delete e[o];
|
|
1395
1408
|
}
|
|
1396
|
-
function
|
|
1397
|
-
return
|
|
1409
|
+
function q0() {
|
|
1410
|
+
return Jt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
1398
1411
|
}
|
|
1399
|
-
function
|
|
1412
|
+
function Jt() {
|
|
1400
1413
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1401
1414
|
}
|
|
1402
|
-
const
|
|
1403
|
-
let ge,
|
|
1404
|
-
function
|
|
1415
|
+
const J0 = typeof Proxy == "function", K0 = "devtools-plugin:setup", Y0 = "plugin:settings:set";
|
|
1416
|
+
let ge, Qe;
|
|
1417
|
+
function Q0() {
|
|
1405
1418
|
var e;
|
|
1406
|
-
return ge !== void 0 || (typeof window < "u" && window.performance ? (ge = !0,
|
|
1419
|
+
return ge !== void 0 || (typeof window < "u" && window.performance ? (ge = !0, Qe = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ge = !0, Qe = globalThis.perf_hooks.performance) : ge = !1), ge;
|
|
1407
1420
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return
|
|
1421
|
+
function X0() {
|
|
1422
|
+
return Q0() ? Qe.now() : Date.now();
|
|
1410
1423
|
}
|
|
1411
|
-
class
|
|
1424
|
+
class en {
|
|
1412
1425
|
constructor(o, t) {
|
|
1413
1426
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
|
|
1414
1427
|
const n = {};
|
|
@@ -1436,9 +1449,9 @@ class K0 {
|
|
|
1436
1449
|
a = i;
|
|
1437
1450
|
},
|
|
1438
1451
|
now() {
|
|
1439
|
-
return
|
|
1452
|
+
return X0();
|
|
1440
1453
|
}
|
|
1441
|
-
}, t && t.on(
|
|
1454
|
+
}, t && t.on(Y0, (i, s) => {
|
|
1442
1455
|
i === this.plugin.id && this.fallbacks.setSettings(s);
|
|
1443
1456
|
}), this.proxiedOn = new Proxy({}, {
|
|
1444
1457
|
get: (i, s) => this.target ? this.target.on[s] : (...r) => {
|
|
@@ -1470,12 +1483,12 @@ class K0 {
|
|
|
1470
1483
|
t.resolve(await this.target[t.method](...t.args));
|
|
1471
1484
|
}
|
|
1472
1485
|
}
|
|
1473
|
-
function
|
|
1474
|
-
const t = e, n =
|
|
1486
|
+
function Kt(e, o) {
|
|
1487
|
+
const t = e, n = Jt(), l = q0(), a = J0 && t.enableEarlyProxy;
|
|
1475
1488
|
if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
|
|
1476
|
-
l.emit(
|
|
1489
|
+
l.emit(K0, e, o);
|
|
1477
1490
|
else {
|
|
1478
|
-
const i = a ? new
|
|
1491
|
+
const i = a ? new en(t, l) : null;
|
|
1479
1492
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
1480
1493
|
pluginDescriptor: t,
|
|
1481
1494
|
setupFn: o,
|
|
@@ -1489,7 +1502,7 @@ function Jt(e, o) {
|
|
|
1489
1502
|
* @license MIT
|
|
1490
1503
|
*/
|
|
1491
1504
|
let _e;
|
|
1492
|
-
const Ie = (e) => _e = e,
|
|
1505
|
+
const Ie = (e) => _e = e, Yt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1493
1506
|
/* istanbul ignore next */
|
|
1494
1507
|
Symbol()
|
|
1495
1508
|
);
|
|
@@ -1500,19 +1513,19 @@ var le;
|
|
|
1500
1513
|
(function(e) {
|
|
1501
1514
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
1502
1515
|
})(le || (le = {}));
|
|
1503
|
-
const
|
|
1504
|
-
function
|
|
1516
|
+
const ze = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && ze, Ct = 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 };
|
|
1517
|
+
function tn(e, { autoBom: o = !1 } = {}) {
|
|
1505
1518
|
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
1519
|
}
|
|
1507
|
-
function
|
|
1520
|
+
function rt(e, o, t) {
|
|
1508
1521
|
const n = new XMLHttpRequest();
|
|
1509
1522
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
1510
|
-
|
|
1523
|
+
e2(n.response, o, t);
|
|
1511
1524
|
}, n.onerror = function() {
|
|
1512
1525
|
console.error("could not download file");
|
|
1513
1526
|
}, n.send();
|
|
1514
1527
|
}
|
|
1515
|
-
function
|
|
1528
|
+
function Qt(e) {
|
|
1516
1529
|
const o = new XMLHttpRequest();
|
|
1517
1530
|
o.open("HEAD", e, !1);
|
|
1518
1531
|
try {
|
|
@@ -1521,7 +1534,7 @@ function Yt(e) {
|
|
|
1521
1534
|
}
|
|
1522
1535
|
return o.status >= 200 && o.status <= 299;
|
|
1523
1536
|
}
|
|
1524
|
-
function
|
|
1537
|
+
function Re(e) {
|
|
1525
1538
|
try {
|
|
1526
1539
|
e.dispatchEvent(new MouseEvent("click"));
|
|
1527
1540
|
} catch {
|
|
@@ -1529,43 +1542,43 @@ function Fe(e) {
|
|
|
1529
1542
|
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
1530
1543
|
}
|
|
1531
1544
|
}
|
|
1532
|
-
const Pe = typeof navigator == "object" ? navigator : { userAgent: "" },
|
|
1545
|
+
const Pe = typeof navigator == "object" ? navigator : { userAgent: "" }, Xt = /Macintosh/.test(Pe.userAgent) && /AppleWebKit/.test(Pe.userAgent) && !/Safari/.test(Pe.userAgent), e2 = ze ? (
|
|
1533
1546
|
// 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 && !
|
|
1547
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Xt ? nn : (
|
|
1535
1548
|
// Use msSaveOrOpenBlob as a second approach
|
|
1536
|
-
"msSaveOrOpenBlob" in Pe ?
|
|
1549
|
+
"msSaveOrOpenBlob" in Pe ? on : (
|
|
1537
1550
|
// Fallback to using FileReader and a popup
|
|
1538
|
-
|
|
1551
|
+
ln
|
|
1539
1552
|
)
|
|
1540
1553
|
)
|
|
1541
1554
|
) : () => {
|
|
1542
1555
|
};
|
|
1543
|
-
function
|
|
1556
|
+
function nn(e, o = "download", t) {
|
|
1544
1557
|
const n = document.createElement("a");
|
|
1545
|
-
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ?
|
|
1558
|
+
n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Qt(n.href) ? rt(e, o, t) : (n.target = "_blank", Re(n)) : Re(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
1546
1559
|
URL.revokeObjectURL(n.href);
|
|
1547
1560
|
}, 4e4), setTimeout(function() {
|
|
1548
|
-
|
|
1561
|
+
Re(n);
|
|
1549
1562
|
}, 0));
|
|
1550
1563
|
}
|
|
1551
|
-
function
|
|
1564
|
+
function on(e, o = "download", t) {
|
|
1552
1565
|
if (typeof e == "string")
|
|
1553
|
-
if (
|
|
1554
|
-
|
|
1566
|
+
if (Qt(e))
|
|
1567
|
+
rt(e, o, t);
|
|
1555
1568
|
else {
|
|
1556
1569
|
const n = document.createElement("a");
|
|
1557
1570
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
1558
|
-
|
|
1571
|
+
Re(n);
|
|
1559
1572
|
});
|
|
1560
1573
|
}
|
|
1561
1574
|
else
|
|
1562
|
-
navigator.msSaveOrOpenBlob(
|
|
1575
|
+
navigator.msSaveOrOpenBlob(tn(e, t), o);
|
|
1563
1576
|
}
|
|
1564
|
-
function
|
|
1577
|
+
function ln(e, o, t, n) {
|
|
1565
1578
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
1566
|
-
return
|
|
1567
|
-
const l = e.type === "application/octet-stream", a = /constructor/i.test(String(
|
|
1568
|
-
if ((i || l && a ||
|
|
1579
|
+
return rt(e, o, t);
|
|
1580
|
+
const l = e.type === "application/octet-stream", a = /constructor/i.test(String(Ct.HTMLElement)) || "safari" in Ct, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1581
|
+
if ((i || l && a || Xt) && typeof FileReader < "u") {
|
|
1569
1582
|
const s = new FileReader();
|
|
1570
1583
|
s.onloadend = function() {
|
|
1571
1584
|
let r = s.result;
|
|
@@ -1584,39 +1597,39 @@ function U(e, o) {
|
|
|
1584
1597
|
const t = "🍍 " + e;
|
|
1585
1598
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1586
1599
|
}
|
|
1587
|
-
function
|
|
1600
|
+
function ut(e) {
|
|
1588
1601
|
return "_a" in e && "install" in e;
|
|
1589
1602
|
}
|
|
1590
|
-
function
|
|
1603
|
+
function t2() {
|
|
1591
1604
|
if (!("clipboard" in navigator))
|
|
1592
1605
|
return U("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1593
1606
|
}
|
|
1594
|
-
function
|
|
1607
|
+
function n2(e) {
|
|
1595
1608
|
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (U('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
1596
1609
|
}
|
|
1597
|
-
async function
|
|
1598
|
-
if (!
|
|
1610
|
+
async function sn(e) {
|
|
1611
|
+
if (!t2())
|
|
1599
1612
|
try {
|
|
1600
1613
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), U("Global state copied to clipboard.");
|
|
1601
1614
|
} catch (o) {
|
|
1602
|
-
if (
|
|
1615
|
+
if (n2(o))
|
|
1603
1616
|
return;
|
|
1604
1617
|
U("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1605
1618
|
}
|
|
1606
1619
|
}
|
|
1607
|
-
async function
|
|
1608
|
-
if (!
|
|
1620
|
+
async function an(e) {
|
|
1621
|
+
if (!t2())
|
|
1609
1622
|
try {
|
|
1610
|
-
|
|
1623
|
+
o2(e, JSON.parse(await navigator.clipboard.readText())), U("Global state pasted from clipboard.");
|
|
1611
1624
|
} catch (o) {
|
|
1612
|
-
if (
|
|
1625
|
+
if (n2(o))
|
|
1613
1626
|
return;
|
|
1614
1627
|
U("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1615
1628
|
}
|
|
1616
1629
|
}
|
|
1617
|
-
async function
|
|
1630
|
+
async function rn(e) {
|
|
1618
1631
|
try {
|
|
1619
|
-
|
|
1632
|
+
e2(new Blob([JSON.stringify(e.state.value)], {
|
|
1620
1633
|
type: "text/plain;charset=utf-8"
|
|
1621
1634
|
}), "pinia-state.json");
|
|
1622
1635
|
} catch (o) {
|
|
@@ -1624,7 +1637,7 @@ async function on(e) {
|
|
|
1624
1637
|
}
|
|
1625
1638
|
}
|
|
1626
1639
|
let se;
|
|
1627
|
-
function
|
|
1640
|
+
function un() {
|
|
1628
1641
|
se || (se = document.createElement("input"), se.type = "file", se.accept = ".json");
|
|
1629
1642
|
function e() {
|
|
1630
1643
|
return new Promise((o, t) => {
|
|
@@ -1639,18 +1652,18 @@ function ln() {
|
|
|
1639
1652
|
}
|
|
1640
1653
|
return e;
|
|
1641
1654
|
}
|
|
1642
|
-
async function
|
|
1655
|
+
async function cn(e) {
|
|
1643
1656
|
try {
|
|
1644
|
-
const t = await
|
|
1657
|
+
const t = await un()();
|
|
1645
1658
|
if (!t)
|
|
1646
1659
|
return;
|
|
1647
1660
|
const { text: n, file: l } = t;
|
|
1648
|
-
|
|
1661
|
+
o2(e, JSON.parse(n)), U(`Global state imported from "${l.name}".`);
|
|
1649
1662
|
} catch (o) {
|
|
1650
1663
|
U("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1651
1664
|
}
|
|
1652
1665
|
}
|
|
1653
|
-
function
|
|
1666
|
+
function o2(e, o) {
|
|
1654
1667
|
for (const t in o) {
|
|
1655
1668
|
const n = e.state.value[t];
|
|
1656
1669
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
@@ -1663,18 +1676,18 @@ function ne(e) {
|
|
|
1663
1676
|
}
|
|
1664
1677
|
};
|
|
1665
1678
|
}
|
|
1666
|
-
const
|
|
1667
|
-
function
|
|
1668
|
-
return
|
|
1669
|
-
id:
|
|
1670
|
-
label:
|
|
1679
|
+
const l2 = "🍍 Pinia (root)", Xe = "_root";
|
|
1680
|
+
function dn(e) {
|
|
1681
|
+
return ut(e) ? {
|
|
1682
|
+
id: Xe,
|
|
1683
|
+
label: l2
|
|
1671
1684
|
} : {
|
|
1672
1685
|
id: e.$id,
|
|
1673
1686
|
label: e.$id
|
|
1674
1687
|
};
|
|
1675
1688
|
}
|
|
1676
|
-
function
|
|
1677
|
-
if (
|
|
1689
|
+
function fn(e) {
|
|
1690
|
+
if (ut(e)) {
|
|
1678
1691
|
const t = Array.from(e._s.keys()), n = e._s;
|
|
1679
1692
|
return {
|
|
1680
1693
|
state: t.map((a) => ({
|
|
@@ -1709,7 +1722,7 @@ function rn(e) {
|
|
|
1709
1722
|
value: e[t]
|
|
1710
1723
|
}))), o;
|
|
1711
1724
|
}
|
|
1712
|
-
function
|
|
1725
|
+
function pn(e) {
|
|
1713
1726
|
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
1727
|
oldValue: {},
|
|
1715
1728
|
keys: [],
|
|
@@ -1722,7 +1735,7 @@ function un(e) {
|
|
|
1722
1735
|
newValue: e.newValue
|
|
1723
1736
|
} : {};
|
|
1724
1737
|
}
|
|
1725
|
-
function
|
|
1738
|
+
function vn(e) {
|
|
1726
1739
|
switch (e) {
|
|
1727
1740
|
case le.direct:
|
|
1728
1741
|
return "mutation";
|
|
@@ -1735,15 +1748,15 @@ function cn(e) {
|
|
|
1735
1748
|
}
|
|
1736
1749
|
}
|
|
1737
1750
|
let xe = !0;
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1740
|
-
|
|
1751
|
+
const De = [], ce = "pinia:mutations", W = "pinia", { assign: hn } = Object, Be = (e) => "🍍 " + e;
|
|
1752
|
+
function mn(e, o) {
|
|
1753
|
+
Kt({
|
|
1741
1754
|
id: "dev.esm.pinia",
|
|
1742
1755
|
label: "Pinia 🍍",
|
|
1743
1756
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1744
1757
|
packageName: "pinia",
|
|
1745
1758
|
homepage: "https://pinia.vuejs.org",
|
|
1746
|
-
componentStateTypes:
|
|
1759
|
+
componentStateTypes: De,
|
|
1747
1760
|
app: e
|
|
1748
1761
|
}, (t) => {
|
|
1749
1762
|
typeof t.now != "function" && U("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({
|
|
@@ -1759,28 +1772,28 @@ function fn(e, o) {
|
|
|
1759
1772
|
{
|
|
1760
1773
|
icon: "content_copy",
|
|
1761
1774
|
action: () => {
|
|
1762
|
-
|
|
1775
|
+
sn(o);
|
|
1763
1776
|
},
|
|
1764
1777
|
tooltip: "Serialize and copy the state"
|
|
1765
1778
|
},
|
|
1766
1779
|
{
|
|
1767
1780
|
icon: "content_paste",
|
|
1768
1781
|
action: async () => {
|
|
1769
|
-
await
|
|
1782
|
+
await an(o), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1770
1783
|
},
|
|
1771
1784
|
tooltip: "Replace the state with the content of your clipboard"
|
|
1772
1785
|
},
|
|
1773
1786
|
{
|
|
1774
1787
|
icon: "save",
|
|
1775
1788
|
action: () => {
|
|
1776
|
-
|
|
1789
|
+
rn(o);
|
|
1777
1790
|
},
|
|
1778
1791
|
tooltip: "Save the state as a JSON file"
|
|
1779
1792
|
},
|
|
1780
1793
|
{
|
|
1781
1794
|
icon: "folder_open",
|
|
1782
1795
|
action: async () => {
|
|
1783
|
-
await
|
|
1796
|
+
await cn(o), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1784
1797
|
},
|
|
1785
1798
|
tooltip: "Import the state from a JSON file"
|
|
1786
1799
|
}
|
|
@@ -1801,7 +1814,7 @@ function fn(e, o) {
|
|
|
1801
1814
|
const i = n.componentInstance.proxy._pStores;
|
|
1802
1815
|
Object.values(i).forEach((s) => {
|
|
1803
1816
|
n.instanceData.state.push({
|
|
1804
|
-
type:
|
|
1817
|
+
type: Be(s.$id),
|
|
1805
1818
|
key: "state",
|
|
1806
1819
|
editable: !0,
|
|
1807
1820
|
value: s._isOptionsAPI ? {
|
|
@@ -1820,7 +1833,7 @@ function fn(e, o) {
|
|
|
1820
1833
|
Object.keys(s.$state).reduce((r, u) => (r[u] = s.$state[u], r), {})
|
|
1821
1834
|
)
|
|
1822
1835
|
}), s._getters && s._getters.length && n.instanceData.state.push({
|
|
1823
|
-
type:
|
|
1836
|
+
type: Be(s.$id),
|
|
1824
1837
|
key: "getters",
|
|
1825
1838
|
editable: !1,
|
|
1826
1839
|
value: s._getters.reduce((r, u) => {
|
|
@@ -1837,22 +1850,22 @@ function fn(e, o) {
|
|
|
1837
1850
|
}), t.on.getInspectorTree((n) => {
|
|
1838
1851
|
if (n.app === e && n.inspectorId === W) {
|
|
1839
1852
|
let l = [o];
|
|
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()) :
|
|
1853
|
+
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()) : l2.toLowerCase().includes(n.filter.toLowerCase())) : l).map(dn);
|
|
1841
1854
|
}
|
|
1842
1855
|
}), t.on.getInspectorState((n) => {
|
|
1843
1856
|
if (n.app === e && n.inspectorId === W) {
|
|
1844
|
-
const l = n.nodeId ===
|
|
1857
|
+
const l = n.nodeId === Xe ? o : o._s.get(n.nodeId);
|
|
1845
1858
|
if (!l)
|
|
1846
1859
|
return;
|
|
1847
|
-
l && (n.state =
|
|
1860
|
+
l && (n.state = fn(l));
|
|
1848
1861
|
}
|
|
1849
1862
|
}), t.on.editInspectorState((n, l) => {
|
|
1850
1863
|
if (n.app === e && n.inspectorId === W) {
|
|
1851
|
-
const a = n.nodeId ===
|
|
1864
|
+
const a = n.nodeId === Xe ? o : o._s.get(n.nodeId);
|
|
1852
1865
|
if (!a)
|
|
1853
1866
|
return U(`store "${n.nodeId}" not found`, "error");
|
|
1854
1867
|
const { path: i } = n;
|
|
1855
|
-
|
|
1868
|
+
ut(a) ? i.unshift("state") : (i.length !== 1 || !a._customProperties.has(i[0]) || i[0] in a.$state) && i.unshift("$state"), xe = !1, n.set(a, i, n.state.value), xe = !0;
|
|
1856
1869
|
}
|
|
1857
1870
|
}), t.on.editComponentState((n) => {
|
|
1858
1871
|
if (n.type.startsWith("🍍")) {
|
|
@@ -1869,14 +1882,14 @@ Only state can be modified.`);
|
|
|
1869
1882
|
});
|
|
1870
1883
|
});
|
|
1871
1884
|
}
|
|
1872
|
-
function
|
|
1873
|
-
|
|
1885
|
+
function bn(e, o) {
|
|
1886
|
+
De.includes(Be(o.$id)) || De.push(Be(o.$id)), Kt({
|
|
1874
1887
|
id: "dev.esm.pinia",
|
|
1875
1888
|
label: "Pinia 🍍",
|
|
1876
1889
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
1877
1890
|
packageName: "pinia",
|
|
1878
1891
|
homepage: "https://pinia.vuejs.org",
|
|
1879
|
-
componentStateTypes:
|
|
1892
|
+
componentStateTypes: De,
|
|
1880
1893
|
app: e,
|
|
1881
1894
|
settings: {
|
|
1882
1895
|
logStoreChanges: {
|
|
@@ -1893,7 +1906,7 @@ function pn(e, o) {
|
|
|
1893
1906
|
}, (t) => {
|
|
1894
1907
|
const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
|
|
1895
1908
|
o.$onAction(({ after: i, onError: s, name: r, args: u }) => {
|
|
1896
|
-
const c =
|
|
1909
|
+
const c = s2++;
|
|
1897
1910
|
t.addTimelineEvent({
|
|
1898
1911
|
layerId: ce,
|
|
1899
1912
|
event: {
|
|
@@ -1962,8 +1975,8 @@ function pn(e, o) {
|
|
|
1962
1975
|
return;
|
|
1963
1976
|
const u = {
|
|
1964
1977
|
time: n(),
|
|
1965
|
-
title:
|
|
1966
|
-
data:
|
|
1978
|
+
title: vn(s),
|
|
1979
|
+
data: hn({ store: ne(o.$id) }, pn(i)),
|
|
1967
1980
|
groupId: ie
|
|
1968
1981
|
};
|
|
1969
1982
|
s === le.patchFunction ? u.subtitle = "⤵️" : s === le.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
@@ -1999,12 +2012,12 @@ function pn(e, o) {
|
|
|
1999
2012
|
}, t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges && U(`"${o.$id}" store installed 🆕`);
|
|
2000
2013
|
});
|
|
2001
2014
|
}
|
|
2002
|
-
let
|
|
2003
|
-
function
|
|
2015
|
+
let s2 = 0, ie;
|
|
2016
|
+
function xt(e, o, t) {
|
|
2004
2017
|
const n = o.reduce((l, a) => (l[a] = ee(e)[a], l), {});
|
|
2005
2018
|
for (const l in n)
|
|
2006
2019
|
e[l] = function() {
|
|
2007
|
-
const a =
|
|
2020
|
+
const a = s2, i = t ? new Proxy(e, {
|
|
2008
2021
|
get(...r) {
|
|
2009
2022
|
return ie = a, Reflect.get(...r);
|
|
2010
2023
|
},
|
|
@@ -2017,28 +2030,28 @@ function Ct(e, o, t) {
|
|
|
2017
2030
|
return ie = void 0, s;
|
|
2018
2031
|
};
|
|
2019
2032
|
}
|
|
2020
|
-
function
|
|
2033
|
+
function gn({ app: e, store: o, options: t }) {
|
|
2021
2034
|
if (o.$id.startsWith("__hot:"))
|
|
2022
2035
|
return;
|
|
2023
|
-
o._isOptionsAPI = !!t.state,
|
|
2036
|
+
o._isOptionsAPI = !!t.state, xt(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2024
2037
|
const n = o._hotUpdate;
|
|
2025
2038
|
ee(o)._hotUpdate = function(l) {
|
|
2026
|
-
n.apply(this, arguments),
|
|
2027
|
-
},
|
|
2039
|
+
n.apply(this, arguments), xt(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2040
|
+
}, bn(
|
|
2028
2041
|
e,
|
|
2029
2042
|
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
2030
2043
|
o
|
|
2031
2044
|
);
|
|
2032
2045
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const e =
|
|
2046
|
+
function Cn() {
|
|
2047
|
+
const e = Lt(!0), o = e.run(() => $({}));
|
|
2035
2048
|
let t = [], n = [];
|
|
2036
2049
|
const l = fe({
|
|
2037
2050
|
install(a) {
|
|
2038
|
-
Ie(l), l._a = a, a.provide(
|
|
2051
|
+
Ie(l), l._a = a, a.provide(Yt, l), a.config.globalProperties.$pinia = l, Se && mn(a, l), n.forEach((i) => t.push(i)), n = [];
|
|
2039
2052
|
},
|
|
2040
2053
|
use(a) {
|
|
2041
|
-
return !this._a && !
|
|
2054
|
+
return !this._a && !qt ? n.push(a) : t.push(a), this;
|
|
2042
2055
|
},
|
|
2043
2056
|
_p: t,
|
|
2044
2057
|
// it's actually undefined here
|
|
@@ -2048,73 +2061,73 @@ function hn() {
|
|
|
2048
2061
|
_s: /* @__PURE__ */ new Map(),
|
|
2049
2062
|
state: o
|
|
2050
2063
|
});
|
|
2051
|
-
return Se && typeof Proxy < "u" && l.use(
|
|
2064
|
+
return Se && typeof Proxy < "u" && l.use(gn), l;
|
|
2052
2065
|
}
|
|
2053
|
-
function
|
|
2066
|
+
function a2(e, o) {
|
|
2054
2067
|
for (const t in o) {
|
|
2055
2068
|
const n = o[t];
|
|
2056
2069
|
if (!(t in e))
|
|
2057
2070
|
continue;
|
|
2058
2071
|
const l = e[t];
|
|
2059
|
-
pe(l) && pe(n) && !ye(n) && !
|
|
2072
|
+
pe(l) && pe(n) && !ye(n) && !st(n) ? e[t] = a2(l, n) : e[t] = n;
|
|
2060
2073
|
}
|
|
2061
2074
|
return e;
|
|
2062
2075
|
}
|
|
2063
|
-
const
|
|
2076
|
+
const i2 = () => {
|
|
2064
2077
|
};
|
|
2065
|
-
function
|
|
2078
|
+
function yt(e, o, t, n = i2) {
|
|
2066
2079
|
e.push(o);
|
|
2067
2080
|
const l = () => {
|
|
2068
2081
|
const a = e.indexOf(o);
|
|
2069
2082
|
a > -1 && (e.splice(a, 1), n());
|
|
2070
2083
|
};
|
|
2071
|
-
return !t &&
|
|
2084
|
+
return !t && kt() && nt(l), l;
|
|
2072
2085
|
}
|
|
2073
2086
|
function Ce(e, ...o) {
|
|
2074
2087
|
e.slice().forEach((t) => {
|
|
2075
2088
|
t(...o);
|
|
2076
2089
|
});
|
|
2077
2090
|
}
|
|
2078
|
-
const
|
|
2079
|
-
function
|
|
2091
|
+
const xn = (e) => e();
|
|
2092
|
+
function et(e, o) {
|
|
2080
2093
|
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
2094
|
for (const t in o) {
|
|
2082
2095
|
if (!o.hasOwnProperty(t))
|
|
2083
2096
|
continue;
|
|
2084
2097
|
const n = o[t], l = e[t];
|
|
2085
|
-
pe(l) && pe(n) && e.hasOwnProperty(t) && !ye(n) && !
|
|
2098
|
+
pe(l) && pe(n) && e.hasOwnProperty(t) && !ye(n) && !st(n) ? e[t] = et(l, n) : e[t] = n;
|
|
2086
2099
|
}
|
|
2087
2100
|
return e;
|
|
2088
2101
|
}
|
|
2089
|
-
const
|
|
2102
|
+
const yn = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
2090
2103
|
/* istanbul ignore next */
|
|
2091
2104
|
Symbol()
|
|
2092
2105
|
);
|
|
2093
|
-
function
|
|
2094
|
-
return !pe(e) || !e.hasOwnProperty(
|
|
2106
|
+
function wn(e) {
|
|
2107
|
+
return !pe(e) || !e.hasOwnProperty(yn);
|
|
2095
2108
|
}
|
|
2096
2109
|
const { assign: X } = Object;
|
|
2097
|
-
function
|
|
2110
|
+
function wt(e) {
|
|
2098
2111
|
return !!(ye(e) && e.effect);
|
|
2099
2112
|
}
|
|
2100
|
-
function
|
|
2113
|
+
function _t(e, o, t, n) {
|
|
2101
2114
|
const { state: l, actions: a, getters: i } = o, s = t.state.value[e];
|
|
2102
2115
|
let r;
|
|
2103
2116
|
function u() {
|
|
2104
2117
|
!s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
|
|
2105
2118
|
const c = process.env.NODE_ENV !== "production" && n ? (
|
|
2106
2119
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2107
|
-
|
|
2108
|
-
) :
|
|
2120
|
+
dt($(l ? l() : {}).value)
|
|
2121
|
+
) : dt(t.state.value[e]);
|
|
2109
2122
|
return X(c, a, Object.keys(i || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = fe(E(() => {
|
|
2110
2123
|
Ie(t);
|
|
2111
2124
|
const w = t._s.get(e);
|
|
2112
2125
|
return i[g].call(w, w);
|
|
2113
2126
|
})), p), {}));
|
|
2114
2127
|
}
|
|
2115
|
-
return r =
|
|
2128
|
+
return r = tt(e, u, o, t, n, !0), r;
|
|
2116
2129
|
}
|
|
2117
|
-
function
|
|
2130
|
+
function tt(e, o, t = {}, n, l, a) {
|
|
2118
2131
|
let i;
|
|
2119
2132
|
const s = X({ actions: {} }, t);
|
|
2120
2133
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
@@ -2123,29 +2136,29 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2123
2136
|
deep: !0
|
|
2124
2137
|
// flush: 'post',
|
|
2125
2138
|
};
|
|
2126
|
-
process.env.NODE_ENV !== "production" && !
|
|
2139
|
+
process.env.NODE_ENV !== "production" && !qt && (r.onTrigger = (d) => {
|
|
2127
2140
|
u ? w = d : u == !1 && !C._hotUpdating && (Array.isArray(w) ? w.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
2128
2141
|
});
|
|
2129
2142
|
let u, c, p = [], g = [], w;
|
|
2130
2143
|
const b = n.state.value[e];
|
|
2131
2144
|
!a && !b && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2132
2145
|
const _ = $({});
|
|
2133
|
-
let
|
|
2146
|
+
let R;
|
|
2134
2147
|
function I(d) {
|
|
2135
2148
|
let f;
|
|
2136
2149
|
u = c = !1, process.env.NODE_ENV !== "production" && (w = []), typeof d == "function" ? (d(n.state.value[e]), f = {
|
|
2137
2150
|
type: le.patchFunction,
|
|
2138
2151
|
storeId: e,
|
|
2139
2152
|
events: w
|
|
2140
|
-
}) : (
|
|
2153
|
+
}) : (et(n.state.value[e], d), f = {
|
|
2141
2154
|
type: le.patchObject,
|
|
2142
2155
|
payload: d,
|
|
2143
2156
|
storeId: e,
|
|
2144
2157
|
events: w
|
|
2145
2158
|
});
|
|
2146
|
-
const S =
|
|
2159
|
+
const S = R = Symbol();
|
|
2147
2160
|
oe().then(() => {
|
|
2148
|
-
|
|
2161
|
+
R === S && (u = !0);
|
|
2149
2162
|
}), c = !0, Ce(p, f, n.state.value[e]);
|
|
2150
2163
|
}
|
|
2151
2164
|
const x = a ? function() {
|
|
@@ -2157,12 +2170,12 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2157
2170
|
/* istanbul ignore next */
|
|
2158
2171
|
process.env.NODE_ENV !== "production" ? () => {
|
|
2159
2172
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2160
|
-
} :
|
|
2173
|
+
} : i2
|
|
2161
2174
|
);
|
|
2162
2175
|
function A() {
|
|
2163
2176
|
i.stop(), p = [], g = [], n._s.delete(e);
|
|
2164
2177
|
}
|
|
2165
|
-
function
|
|
2178
|
+
function P(d, f) {
|
|
2166
2179
|
return function() {
|
|
2167
2180
|
Ie(n);
|
|
2168
2181
|
const S = Array.from(arguments), T = [], F = [];
|
|
@@ -2197,11 +2210,11 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2197
2210
|
_p: n,
|
|
2198
2211
|
// _s: scope,
|
|
2199
2212
|
$id: e,
|
|
2200
|
-
$onAction:
|
|
2213
|
+
$onAction: yt.bind(null, g),
|
|
2201
2214
|
$patch: I,
|
|
2202
2215
|
$reset: x,
|
|
2203
2216
|
$subscribe(d, f = {}) {
|
|
2204
|
-
const S =
|
|
2217
|
+
const S = yt(p, d, f.detached, () => T()), T = i.run(() => N(() => n.state.value[e], (F) => {
|
|
2205
2218
|
(f.flush === "sync" ? c : u) && d({
|
|
2206
2219
|
storeId: e,
|
|
2207
2220
|
type: le.direct,
|
|
@@ -2211,7 +2224,7 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2211
2224
|
return S;
|
|
2212
2225
|
},
|
|
2213
2226
|
$dispose: A
|
|
2214
|
-
}, C =
|
|
2227
|
+
}, C = Tt(process.env.NODE_ENV !== "production" || Se ? X(
|
|
2215
2228
|
{
|
|
2216
2229
|
_hmrPayload: y,
|
|
2217
2230
|
_customProperties: fe(/* @__PURE__ */ new Set())
|
|
@@ -2222,18 +2235,18 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2222
2235
|
// setupStore
|
|
2223
2236
|
) : M);
|
|
2224
2237
|
n._s.set(e, C);
|
|
2225
|
-
const k = (n._a && n._a.runWithContext ||
|
|
2238
|
+
const k = (n._a && n._a.runWithContext || xn)(() => n._e.run(() => (i = Lt()).run(o)));
|
|
2226
2239
|
for (const d in k) {
|
|
2227
2240
|
const f = k[d];
|
|
2228
|
-
if (ye(f) && !
|
|
2229
|
-
process.env.NODE_ENV !== "production" && l ?
|
|
2241
|
+
if (ye(f) && !wt(f) || st(f))
|
|
2242
|
+
process.env.NODE_ENV !== "production" && l ? Fe(_.value, d, qe(k, d)) : a || (b && wn(f) && (ye(f) ? f.value = b[d] : et(f, b[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && y.state.push(d);
|
|
2230
2243
|
else if (typeof f == "function") {
|
|
2231
|
-
const S = process.env.NODE_ENV !== "production" && l ? f :
|
|
2244
|
+
const S = process.env.NODE_ENV !== "production" && l ? f : P(d, f);
|
|
2232
2245
|
k[d] = S, process.env.NODE_ENV !== "production" && (y.actions[d] = f), s.actions[d] = f;
|
|
2233
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
2246
|
+
} else process.env.NODE_ENV !== "production" && wt(f) && (y.getters[d] = a ? (
|
|
2234
2247
|
// @ts-expect-error
|
|
2235
2248
|
t.getters[d]
|
|
2236
|
-
) : f,
|
|
2249
|
+
) : f, ze && (k._getters || // @ts-expect-error: same
|
|
2237
2250
|
(k._getters = fe([]))).push(d));
|
|
2238
2251
|
}
|
|
2239
2252
|
if (X(C, k), X(ee(C), k), Object.defineProperty(C, "$state", {
|
|
@@ -2249,29 +2262,29 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2249
2262
|
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2250
2263
|
if (f in C.$state) {
|
|
2251
2264
|
const S = d.$state[f], T = C.$state[f];
|
|
2252
|
-
typeof S == "object" && pe(S) && pe(T) ?
|
|
2265
|
+
typeof S == "object" && pe(S) && pe(T) ? a2(S, T) : d.$state[f] = T;
|
|
2253
2266
|
}
|
|
2254
|
-
|
|
2267
|
+
Fe(C, f, qe(d.$state, f));
|
|
2255
2268
|
}), Object.keys(C.$state).forEach((f) => {
|
|
2256
|
-
f in d.$state ||
|
|
2257
|
-
}), u = !1, c = !1, n.state.value[e] =
|
|
2269
|
+
f in d.$state || Ye(C, f);
|
|
2270
|
+
}), u = !1, c = !1, n.state.value[e] = qe(d._hmrPayload, "hotState"), c = !0, oe().then(() => {
|
|
2258
2271
|
u = !0;
|
|
2259
2272
|
});
|
|
2260
2273
|
for (const f in d._hmrPayload.actions) {
|
|
2261
2274
|
const S = d[f];
|
|
2262
|
-
|
|
2275
|
+
Fe(C, f, P(f, S));
|
|
2263
2276
|
}
|
|
2264
2277
|
for (const f in d._hmrPayload.getters) {
|
|
2265
2278
|
const S = d._hmrPayload.getters[f], T = a ? (
|
|
2266
2279
|
// special handling of options api
|
|
2267
2280
|
E(() => (Ie(n), S.call(C, C)))
|
|
2268
2281
|
) : S;
|
|
2269
|
-
|
|
2282
|
+
Fe(C, f, T);
|
|
2270
2283
|
}
|
|
2271
2284
|
Object.keys(C._hmrPayload.getters).forEach((f) => {
|
|
2272
|
-
f in d._hmrPayload.getters ||
|
|
2285
|
+
f in d._hmrPayload.getters || Ye(C, f);
|
|
2273
2286
|
}), Object.keys(C._hmrPayload.actions).forEach((f) => {
|
|
2274
|
-
f in d._hmrPayload.actions ||
|
|
2287
|
+
f in d._hmrPayload.actions || Ye(C, f);
|
|
2275
2288
|
}), C._hmrPayload = d._hmrPayload, C._getters = d._getters, C._hotUpdating = !1;
|
|
2276
2289
|
})), Se) {
|
|
2277
2290
|
const d = {
|
|
@@ -2304,7 +2317,7 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2304
2317
|
state: () => new MyClass()
|
|
2305
2318
|
Found in store "${C.$id}".`), b && a && t.hydrate && t.hydrate(C.$state, b), u = !0, c = !0, C;
|
|
2306
2319
|
}
|
|
2307
|
-
function
|
|
2320
|
+
function Ue(e, o, t) {
|
|
2308
2321
|
let n, l;
|
|
2309
2322
|
const a = typeof o == "function";
|
|
2310
2323
|
if (typeof e == "string")
|
|
@@ -2312,21 +2325,21 @@ function ze(e, o, t) {
|
|
|
2312
2325
|
else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
|
|
2313
2326
|
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
|
|
2314
2327
|
function i(s, r) {
|
|
2315
|
-
const u =
|
|
2328
|
+
const u = m2();
|
|
2316
2329
|
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2317
2330
|
// pinia instance with getActivePinia()
|
|
2318
|
-
(process.env.NODE_ENV === "test" && _e && _e._testing ? null : s) || (u ? Te(
|
|
2331
|
+
(process.env.NODE_ENV === "test" && _e && _e._testing ? null : s) || (u ? Te(Yt, null) : null), s && Ie(s), process.env.NODE_ENV !== "production" && !_e)
|
|
2319
2332
|
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
2333
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2321
2334
|
This will fail in production.`);
|
|
2322
|
-
s = _e, s._s.has(n) || (a ?
|
|
2335
|
+
s = _e, s._s.has(n) || (a ? tt(n, o, l, s) : _t(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2323
2336
|
const c = s._s.get(n);
|
|
2324
2337
|
if (process.env.NODE_ENV !== "production" && r) {
|
|
2325
|
-
const p = "__hot:" + n, g = a ?
|
|
2338
|
+
const p = "__hot:" + n, g = a ? tt(p, o, l, s, !0) : _t(p, X({}, l), s, !0);
|
|
2326
2339
|
r._hotUpdate(g), delete s.state.value[p], s._s.delete(p);
|
|
2327
2340
|
}
|
|
2328
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
2329
|
-
const p =
|
|
2341
|
+
if (process.env.NODE_ENV !== "production" && ze) {
|
|
2342
|
+
const p = Mt();
|
|
2330
2343
|
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2331
2344
|
!r) {
|
|
2332
2345
|
const g = p.proxy, w = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
@@ -2337,7 +2350,7 @@ This will fail in production.`);
|
|
|
2337
2350
|
}
|
|
2338
2351
|
return i.$id = n, i;
|
|
2339
2352
|
}
|
|
2340
|
-
const Me =
|
|
2353
|
+
const Me = Ue("loader", () => {
|
|
2341
2354
|
const e = $({
|
|
2342
2355
|
translation: !1,
|
|
2343
2356
|
aiExplanation: !1
|
|
@@ -2345,9 +2358,9 @@ const Me = ze("loader", () => {
|
|
|
2345
2358
|
return { loadingStates: e, setLoading: (n, l) => {
|
|
2346
2359
|
e.value[n] = l;
|
|
2347
2360
|
}, isLoading: (n) => e.value[n] };
|
|
2348
|
-
}),
|
|
2361
|
+
}), St = {
|
|
2349
2362
|
__name: "Select",
|
|
2350
|
-
props: /* @__PURE__ */
|
|
2363
|
+
props: /* @__PURE__ */ b2({
|
|
2351
2364
|
languages: {
|
|
2352
2365
|
type: Object,
|
|
2353
2366
|
required: !0
|
|
@@ -2358,12 +2371,12 @@ const Me = ze("loader", () => {
|
|
|
2358
2371
|
}),
|
|
2359
2372
|
emits: ["update:modelValue"],
|
|
2360
2373
|
setup(e) {
|
|
2361
|
-
const o = Me(), t = e, n =
|
|
2374
|
+
const o = Me(), t = e, n = g2(e, "modelValue"), l = $(""), a = $(null), i = E(() => Object.entries(t.languages).filter(
|
|
2362
2375
|
([, r]) => r.toLowerCase().includes(l.value.toLowerCase())
|
|
2363
2376
|
)), s = (r) => {
|
|
2364
2377
|
r.target.value = "", l.value = "", a.value && a.value.$el.click();
|
|
2365
2378
|
};
|
|
2366
|
-
return (r, u) => (m(), q(L(
|
|
2379
|
+
return (r, u) => (m(), q(L(B0), {
|
|
2367
2380
|
modelValue: n.value,
|
|
2368
2381
|
"onUpdate:modelValue": u[3] || (u[3] = (c) => n.value = c),
|
|
2369
2382
|
disabled: L(o).loading,
|
|
@@ -2371,19 +2384,19 @@ const Me = ze("loader", () => {
|
|
|
2371
2384
|
class: "relative mt-1"
|
|
2372
2385
|
}, {
|
|
2373
2386
|
default: ke(() => [
|
|
2374
|
-
B(L(
|
|
2387
|
+
B(L(H0), {
|
|
2375
2388
|
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",
|
|
2376
2389
|
onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
|
|
2377
2390
|
displayValue: (c) => e.languages[c],
|
|
2378
2391
|
onFocus: u[1] || (u[1] = (c) => s(c))
|
|
2379
2392
|
}, null, 8, ["displayValue"]),
|
|
2380
|
-
B(L(
|
|
2393
|
+
B(L(j0), {
|
|
2381
2394
|
ref_key: "btnSelect",
|
|
2382
2395
|
ref: a,
|
|
2383
2396
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
2384
2397
|
}, {
|
|
2385
2398
|
default: ke(() => [
|
|
2386
|
-
B(L(
|
|
2399
|
+
B(L(W0), {
|
|
2387
2400
|
class: "h-5 w-5 text-gray-400",
|
|
2388
2401
|
"aria-hidden": "true",
|
|
2389
2402
|
onClick: u[2] || (u[2] = (c) => s(c))
|
|
@@ -2391,9 +2404,9 @@ const Me = ze("loader", () => {
|
|
|
2391
2404
|
]),
|
|
2392
2405
|
_: 1
|
|
2393
2406
|
}, 512),
|
|
2394
|
-
B(L(
|
|
2407
|
+
B(L(z0), { 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
2408
|
default: ke(() => [
|
|
2396
|
-
(m(!0), O(G, null, te(i.value, ([c, p]) => (m(), q(L(
|
|
2409
|
+
(m(!0), O(G, null, te(i.value, ([c, p]) => (m(), q(L(U0), {
|
|
2397
2410
|
key: c,
|
|
2398
2411
|
value: c
|
|
2399
2412
|
}, {
|
|
@@ -2418,19 +2431,19 @@ const Me = ze("loader", () => {
|
|
|
2418
2431
|
_: 1
|
|
2419
2432
|
}, 8, ["modelValue", "disabled"]));
|
|
2420
2433
|
}
|
|
2421
|
-
},
|
|
2422
|
-
src:
|
|
2434
|
+
}, r2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='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", _n = ["disabled"], Sn = /* @__PURE__ */ v("img", {
|
|
2435
|
+
src: r2,
|
|
2423
2436
|
alt: "swap",
|
|
2424
2437
|
class: "w-4"
|
|
2425
|
-
}, null, -1),
|
|
2426
|
-
|
|
2427
|
-
],
|
|
2428
|
-
src:
|
|
2438
|
+
}, null, -1), En = [
|
|
2439
|
+
Sn
|
|
2440
|
+
], On = ["disabled"], $n = /* @__PURE__ */ v("img", {
|
|
2441
|
+
src: r2,
|
|
2429
2442
|
alt: "swap",
|
|
2430
2443
|
class: "w-4"
|
|
2431
|
-
}, null, -1),
|
|
2432
|
-
|
|
2433
|
-
],
|
|
2444
|
+
}, null, -1), In = [
|
|
2445
|
+
$n
|
|
2446
|
+
], Tn = {
|
|
2434
2447
|
__name: "SwapBtn",
|
|
2435
2448
|
props: {
|
|
2436
2449
|
isBidirect: {
|
|
@@ -2445,12 +2458,12 @@ const Me = ze("loader", () => {
|
|
|
2445
2458
|
key: 1,
|
|
2446
2459
|
onClick: i[0] || (i[0] = (s) => l("swap")),
|
|
2447
2460
|
disabled: n.value
|
|
2448
|
-
},
|
|
2461
|
+
}, In, 8, On)) : (m(), O("button", {
|
|
2449
2462
|
key: 0,
|
|
2450
2463
|
disabled: n.value
|
|
2451
|
-
},
|
|
2464
|
+
}, En, 8, _n));
|
|
2452
2465
|
}
|
|
2453
|
-
},
|
|
2466
|
+
}, Ze = Ue("language", () => {
|
|
2454
2467
|
const e = $("auto"), o = $("en"), t = $({
|
|
2455
2468
|
src: [],
|
|
2456
2469
|
target: []
|
|
@@ -2467,87 +2480,87 @@ const Me = ze("loader", () => {
|
|
|
2467
2480
|
return t.value.src[r] || t.value.target[r];
|
|
2468
2481
|
}
|
|
2469
2482
|
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: a, swap: i, getLabel: s };
|
|
2470
|
-
}),
|
|
2483
|
+
}), Ln = {
|
|
2471
2484
|
key: 0,
|
|
2472
2485
|
class: "flex flex-col"
|
|
2473
|
-
},
|
|
2486
|
+
}, Mn = { class: "flex" }, kn = { class: "grow flex flex-col" }, An = {
|
|
2474
2487
|
key: 0,
|
|
2475
2488
|
class: "flex mt-1 space-x-1"
|
|
2476
|
-
},
|
|
2489
|
+
}, Vn = ["onClick"], Fn = { class: "grow flex flex-col" }, Rn = {
|
|
2477
2490
|
key: 0,
|
|
2478
2491
|
class: "flex mt-1 space-x-1"
|
|
2479
|
-
},
|
|
2492
|
+
}, Pn = ["onClick"], Dn = {
|
|
2480
2493
|
__name: "Selects",
|
|
2481
2494
|
setup(e) {
|
|
2482
|
-
const o =
|
|
2495
|
+
const o = Ze(), t = $([]), n = $([]);
|
|
2483
2496
|
function l() {
|
|
2484
2497
|
o.swap();
|
|
2485
2498
|
}
|
|
2486
2499
|
return ve(() => {
|
|
2487
|
-
|
|
2500
|
+
t.value = Ae.getLocalStorage("recentSrc") || [], n.value = Ae.getLocalStorage("recentTarget") || [];
|
|
2488
2501
|
}), N(
|
|
2489
2502
|
() => o.src,
|
|
2490
2503
|
(a) => {
|
|
2491
|
-
t.value.includes(a) || (t.value.unshift(a), t.value = t.value.slice(0, 3));
|
|
2504
|
+
t.value.includes(a) || (t.value.unshift(a), t.value = t.value.slice(0, 3), Ae.setLocalStorage("recentSrc", t.value));
|
|
2492
2505
|
}
|
|
2493
2506
|
), N(
|
|
2494
2507
|
() => o.target,
|
|
2495
2508
|
(a) => {
|
|
2496
|
-
n.value.includes(a) || (n.value.unshift(a), n.value = n.value.slice(0, 3));
|
|
2509
|
+
n.value.includes(a) || (n.value.unshift(a), n.value = n.value.slice(0, 3), Ae.setLocalStorage("recentTarget", n.value));
|
|
2497
2510
|
}
|
|
2498
|
-
), (a, i) => L(o).languages ? (m(), O("div",
|
|
2499
|
-
v("div",
|
|
2500
|
-
v("div",
|
|
2501
|
-
B(
|
|
2511
|
+
), (a, i) => L(o).languages ? (m(), O("div", Ln, [
|
|
2512
|
+
v("div", Mn, [
|
|
2513
|
+
v("div", kn, [
|
|
2514
|
+
B(St, {
|
|
2502
2515
|
modelValue: L(o).src,
|
|
2503
2516
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => L(o).src = s),
|
|
2504
2517
|
languages: L(o).languages.src,
|
|
2505
2518
|
class: "grow"
|
|
2506
2519
|
}, null, 8, ["modelValue", "languages"]),
|
|
2507
|
-
t.value.length > 0 ? (m(), O("div",
|
|
2520
|
+
t.value.length > 0 ? (m(), O("div", An, [
|
|
2508
2521
|
(m(!0), O(G, null, te(t.value, (s) => (m(), O("button", {
|
|
2509
2522
|
key: s,
|
|
2510
2523
|
class: "px-2 py-0.5 bg-baseColor border border-primaryColor text-primaryColor text-xs rounded-full hover:bg-primaryColor hover:text-baseColor transition-colors duration-200",
|
|
2511
2524
|
onClick: (r) => L(o).src = s
|
|
2512
|
-
}, K(L(o).languages.src[s]), 9,
|
|
2525
|
+
}, K(L(o).languages.src[s]), 9, Vn))), 128))
|
|
2513
2526
|
])) : H("", !0)
|
|
2514
2527
|
]),
|
|
2515
|
-
B(
|
|
2528
|
+
B(Tn, {
|
|
2516
2529
|
isBidirect: L(o).src !== "auto",
|
|
2517
2530
|
class: "grow-0 mx-3 mt-4 self-start",
|
|
2518
2531
|
onSwap: l
|
|
2519
2532
|
}, null, 8, ["isBidirect"]),
|
|
2520
|
-
v("div",
|
|
2521
|
-
B(
|
|
2533
|
+
v("div", Fn, [
|
|
2534
|
+
B(St, {
|
|
2522
2535
|
modelValue: L(o).target,
|
|
2523
2536
|
"onUpdate:modelValue": i[1] || (i[1] = (s) => L(o).target = s),
|
|
2524
2537
|
languages: L(o).languages.target,
|
|
2525
2538
|
class: "grow"
|
|
2526
2539
|
}, null, 8, ["modelValue", "languages"]),
|
|
2527
|
-
n.value.length > 0 ? (m(), O("div",
|
|
2540
|
+
n.value.length > 0 ? (m(), O("div", Rn, [
|
|
2528
2541
|
(m(!0), O(G, null, te(n.value, (s) => (m(), O("button", {
|
|
2529
2542
|
key: s,
|
|
2530
2543
|
class: "px-2 py-0.5 bg-baseColor border border-primaryColor text-primaryColor text-xs rounded-full hover:bg-primaryColor hover:text-baseColor transition-colors duration-200",
|
|
2531
2544
|
onClick: (r) => L(o).target = s
|
|
2532
|
-
}, K(L(o).languages.target[s]), 9,
|
|
2545
|
+
}, K(L(o).languages.target[s]), 9, Pn))), 128))
|
|
2533
2546
|
])) : H("", !0)
|
|
2534
2547
|
])
|
|
2535
2548
|
])
|
|
2536
2549
|
])) : H("", !0);
|
|
2537
2550
|
}
|
|
2538
|
-
},
|
|
2551
|
+
}, Nn = {
|
|
2539
2552
|
INPUT_MAX_LENGTH: 5e3,
|
|
2540
2553
|
INPUT_DEBOUNCE: 500
|
|
2541
|
-
},
|
|
2554
|
+
}, We = (e, o) => {
|
|
2542
2555
|
const t = e.__vccOpts || e;
|
|
2543
2556
|
for (const [n, l] of o)
|
|
2544
2557
|
t[n] = l;
|
|
2545
2558
|
return t;
|
|
2546
|
-
},
|
|
2547
|
-
function
|
|
2548
|
-
return m(), O("span",
|
|
2559
|
+
}, Bn = {}, jn = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2560
|
+
function Hn(e, o) {
|
|
2561
|
+
return m(), O("span", jn);
|
|
2549
2562
|
}
|
|
2550
|
-
const
|
|
2563
|
+
const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
2551
2564
|
const e = $({
|
|
2552
2565
|
src: null,
|
|
2553
2566
|
target: null
|
|
@@ -2571,7 +2584,7 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2571
2584
|
get: t,
|
|
2572
2585
|
reset: n
|
|
2573
2586
|
};
|
|
2574
|
-
}),
|
|
2587
|
+
}), 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='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", Un = "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", Zn = ["disabled"], Wn = ["src"], Gn = ["src"], qn = {
|
|
2575
2588
|
__name: "SpeakBtn",
|
|
2576
2589
|
props: {
|
|
2577
2590
|
type: {
|
|
@@ -2582,7 +2595,7 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2582
2595
|
},
|
|
2583
2596
|
emits: ["loadTTS"],
|
|
2584
2597
|
setup(e, { emit: o }) {
|
|
2585
|
-
const t =
|
|
2598
|
+
const t = c2(), n = e, l = o, a = E(() => t.tts[n.type]), i = $(!1), s = new Audio();
|
|
2586
2599
|
N(
|
|
2587
2600
|
a,
|
|
2588
2601
|
() => {
|
|
@@ -2593,7 +2606,7 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2593
2606
|
u();
|
|
2594
2607
|
},
|
|
2595
2608
|
{ immediate: !0 }
|
|
2596
|
-
),
|
|
2609
|
+
), ot(() => {
|
|
2597
2610
|
c(), s.src = "";
|
|
2598
2611
|
});
|
|
2599
2612
|
function r() {
|
|
@@ -2616,13 +2629,13 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2616
2629
|
}, (p, g) => i.value ? (m(), O("button", {
|
|
2617
2630
|
key: 1,
|
|
2618
2631
|
class: "btn btn-xs btn-circle",
|
|
2619
|
-
onClick:
|
|
2632
|
+
onClick: ft(c, ["prevent"])
|
|
2620
2633
|
}, [
|
|
2621
2634
|
v("img", {
|
|
2622
|
-
src: L(
|
|
2635
|
+
src: L(Un),
|
|
2623
2636
|
alt: "Stop",
|
|
2624
2637
|
class: "w-4 transition-all duration-200"
|
|
2625
|
-
}, null, 8,
|
|
2638
|
+
}, null, 8, Gn)
|
|
2626
2639
|
])) : (m(), O("button", {
|
|
2627
2640
|
key: 0,
|
|
2628
2641
|
class: j(["btn btn-xs btn-circle", [
|
|
@@ -2630,25 +2643,25 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2630
2643
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2631
2644
|
]]),
|
|
2632
2645
|
disabled: e.disabled,
|
|
2633
|
-
onClick:
|
|
2646
|
+
onClick: ft(r, ["prevent"])
|
|
2634
2647
|
}, [
|
|
2635
2648
|
v("img", {
|
|
2636
|
-
src: L(
|
|
2649
|
+
src: L(zn),
|
|
2637
2650
|
alt: "Play",
|
|
2638
2651
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2639
|
-
}, null, 10,
|
|
2640
|
-
], 10,
|
|
2652
|
+
}, null, 10, Wn)
|
|
2653
|
+
], 10, Zn));
|
|
2641
2654
|
}
|
|
2642
|
-
},
|
|
2655
|
+
}, Jn = "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", Kn = {
|
|
2643
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",
|
|
2644
2657
|
"data-tip": "Clear"
|
|
2645
|
-
},
|
|
2658
|
+
}, Yn = ["disabled"], Qn = ["src"], Xn = {
|
|
2646
2659
|
__name: "ClearBtn",
|
|
2647
2660
|
props: {
|
|
2648
2661
|
disabled: Boolean
|
|
2649
2662
|
},
|
|
2650
2663
|
setup(e) {
|
|
2651
|
-
return (o, t) => (m(), O("div",
|
|
2664
|
+
return (o, t) => (m(), O("div", Kn, [
|
|
2652
2665
|
v("button", {
|
|
2653
2666
|
class: j(["btn btn-xs btn-circle", [
|
|
2654
2667
|
{ "btn-ghost": !e.disabled },
|
|
@@ -2657,24 +2670,24 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2657
2670
|
disabled: e.disabled
|
|
2658
2671
|
}, [
|
|
2659
2672
|
v("img", {
|
|
2660
|
-
src: L(
|
|
2673
|
+
src: L(Jn),
|
|
2661
2674
|
alt: "Clear",
|
|
2662
2675
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2663
|
-
}, null, 10,
|
|
2664
|
-
], 10,
|
|
2676
|
+
}, null, 10, Qn)
|
|
2677
|
+
], 10, Yn)
|
|
2665
2678
|
]));
|
|
2666
2679
|
}
|
|
2667
|
-
},
|
|
2680
|
+
}, eo = "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", to = "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", no = {
|
|
2668
2681
|
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",
|
|
2669
2682
|
"data-tip": "Favorite"
|
|
2670
|
-
},
|
|
2683
|
+
}, oo = ["disabled"], lo = ["src"], so = {
|
|
2671
2684
|
__name: "FavoriteBtn",
|
|
2672
2685
|
props: {
|
|
2673
2686
|
disabled: Boolean,
|
|
2674
2687
|
isFilled: Boolean
|
|
2675
2688
|
},
|
|
2676
2689
|
setup(e) {
|
|
2677
|
-
return (o, t) => (m(), O("div",
|
|
2690
|
+
return (o, t) => (m(), O("div", no, [
|
|
2678
2691
|
v("button", {
|
|
2679
2692
|
class: j(["btn btn-xs btn-circle", [
|
|
2680
2693
|
{ "btn-ghost": !e.disabled },
|
|
@@ -2683,24 +2696,24 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2683
2696
|
disabled: e.disabled
|
|
2684
2697
|
}, [
|
|
2685
2698
|
v("img", {
|
|
2686
|
-
src: e.isFilled ? L(
|
|
2699
|
+
src: e.isFilled ? L(eo) : L(to),
|
|
2687
2700
|
alt: "Favorite",
|
|
2688
2701
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2689
|
-
}, null, 10,
|
|
2690
|
-
], 10,
|
|
2702
|
+
}, null, 10, lo)
|
|
2703
|
+
], 10, oo)
|
|
2691
2704
|
]));
|
|
2692
2705
|
}
|
|
2693
|
-
},
|
|
2706
|
+
}, ao = "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", io = "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", ro = {
|
|
2694
2707
|
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",
|
|
2695
2708
|
"data-tip": "AI Translate"
|
|
2696
|
-
},
|
|
2709
|
+
}, uo = ["disabled"], co = ["src"], d2 = {
|
|
2697
2710
|
__name: "AIBtn",
|
|
2698
2711
|
props: {
|
|
2699
2712
|
disabled: Boolean,
|
|
2700
2713
|
isFilled: Boolean
|
|
2701
2714
|
},
|
|
2702
2715
|
setup(e) {
|
|
2703
|
-
return (o, t) => (m(), O("div",
|
|
2716
|
+
return (o, t) => (m(), O("div", ro, [
|
|
2704
2717
|
v("button", {
|
|
2705
2718
|
class: j(["btn btn-xs btn-circle", [
|
|
2706
2719
|
{ "btn-ghost": !e.disabled },
|
|
@@ -2709,14 +2722,14 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2709
2722
|
disabled: e.disabled
|
|
2710
2723
|
}, [
|
|
2711
2724
|
v("img", {
|
|
2712
|
-
src: e.isFilled ? L(
|
|
2725
|
+
src: e.isFilled ? L(ao) : L(io),
|
|
2713
2726
|
alt: "AI",
|
|
2714
2727
|
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2715
|
-
}, null, 10,
|
|
2716
|
-
], 10,
|
|
2728
|
+
}, null, 10, co)
|
|
2729
|
+
], 10, uo)
|
|
2717
2730
|
]));
|
|
2718
2731
|
}
|
|
2719
|
-
},
|
|
2732
|
+
}, fo = "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", po = ["data-tip"], vo = ["disabled"], ho = ["src"], mo = {
|
|
2720
2733
|
__name: "CopyBtn",
|
|
2721
2734
|
props: {
|
|
2722
2735
|
disabled: Boolean
|
|
@@ -2740,17 +2753,17 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2740
2753
|
onClick: t
|
|
2741
2754
|
}, [
|
|
2742
2755
|
v("img", {
|
|
2743
|
-
src: L(
|
|
2756
|
+
src: L(fo),
|
|
2744
2757
|
alt: "Copy",
|
|
2745
2758
|
class: j(["w-3 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2746
|
-
}, null, 10,
|
|
2747
|
-
], 10,
|
|
2748
|
-
], 8,
|
|
2759
|
+
}, null, 10, ho)
|
|
2760
|
+
], 10, vo)
|
|
2761
|
+
], 8, po));
|
|
2749
2762
|
}
|
|
2750
|
-
},
|
|
2763
|
+
}, bo = { class: "flex flex-row px-2 pr-10 pt-1 items-center bg-transparent relative" }, go = { class: "ml-1 text-sm text-gray-600" }, Co = {
|
|
2751
2764
|
key: 0,
|
|
2752
2765
|
class: "italic"
|
|
2753
|
-
},
|
|
2766
|
+
}, xo = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, yo = {
|
|
2754
2767
|
__name: "TranslationBtnGroup",
|
|
2755
2768
|
props: {
|
|
2756
2769
|
loading: {
|
|
@@ -2810,39 +2823,39 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2810
2823
|
emits: ["clear", "favorite", "loadTTS", "aiTranslate", "copy"],
|
|
2811
2824
|
setup(e, { emit: o }) {
|
|
2812
2825
|
const t = e, n = o;
|
|
2813
|
-
return (l, a) => (m(), O("div",
|
|
2814
|
-
t.src ? (m(), q(
|
|
2826
|
+
return (l, a) => (m(), O("div", bo, [
|
|
2827
|
+
t.src ? (m(), q(qn, {
|
|
2815
2828
|
key: 0,
|
|
2816
2829
|
type: t.type,
|
|
2817
2830
|
onLoadTTS: a[0] || (a[0] = (i) => n("loadTTS"))
|
|
2818
2831
|
}, null, 8, ["type"])) : H("", !0),
|
|
2819
|
-
v("div",
|
|
2820
|
-
|
|
2821
|
-
e.phonetic ? (m(), O("span",
|
|
2832
|
+
v("div", go, [
|
|
2833
|
+
C2(K(e.srcLabel) + " ", 1),
|
|
2834
|
+
e.phonetic ? (m(), O("span", Co, "- [" + K(t.phonetic) + "]", 1)) : H("", !0)
|
|
2822
2835
|
]),
|
|
2823
|
-
t.loading ? (m(), q(
|
|
2836
|
+
t.loading ? (m(), q(u2, {
|
|
2824
2837
|
key: 1,
|
|
2825
2838
|
class: "absolute right-6 top-2"
|
|
2826
2839
|
})) : H("", !0),
|
|
2827
|
-
v("div",
|
|
2828
|
-
e.hasClearBtn && e.src ? (m(), q(
|
|
2840
|
+
v("div", xo, [
|
|
2841
|
+
e.hasClearBtn && e.src ? (m(), q(Xn, {
|
|
2829
2842
|
key: 0,
|
|
2830
2843
|
onClick: a[1] || (a[1] = (i) => n("clear")),
|
|
2831
2844
|
disabled: e.loading
|
|
2832
2845
|
}, null, 8, ["disabled"])) : H("", !0),
|
|
2833
|
-
e.src && !e.hasDictionary && e.hasAIBtn ? (m(), q(
|
|
2846
|
+
e.src && !e.hasDictionary && e.hasAIBtn ? (m(), q(d2, {
|
|
2834
2847
|
key: 1,
|
|
2835
2848
|
isFilled: e.isAITranslate,
|
|
2836
2849
|
onClick: a[2] || (a[2] = (i) => n("aiTranslate")),
|
|
2837
2850
|
disabled: e.loading
|
|
2838
2851
|
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2839
|
-
e.src && e.hasFavoriteBtn ? (m(), q(
|
|
2852
|
+
e.src && e.hasFavoriteBtn ? (m(), q(so, {
|
|
2840
2853
|
key: 2,
|
|
2841
2854
|
isFilled: e.isFavorite,
|
|
2842
2855
|
onClick: a[3] || (a[3] = (i) => n("favorite")),
|
|
2843
2856
|
disabled: e.loading
|
|
2844
2857
|
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2845
|
-
e.src && e.hasCopyBtn ? (m(), q(
|
|
2858
|
+
e.src && e.hasCopyBtn ? (m(), q(mo, {
|
|
2846
2859
|
key: 3,
|
|
2847
2860
|
onClick: a[4] || (a[4] = (i) => n("copy")),
|
|
2848
2861
|
disabled: e.loading
|
|
@@ -2850,14 +2863,14 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2850
2863
|
])
|
|
2851
2864
|
]));
|
|
2852
2865
|
}
|
|
2853
|
-
},
|
|
2866
|
+
}, f2 = /* @__PURE__ */ We(yo, [["__scopeId", "data-v-c9ef8858"]]), be = Ue("translation", () => {
|
|
2854
2867
|
const e = $(null), o = $(null), t = $(null), n = $({
|
|
2855
2868
|
src: null,
|
|
2856
2869
|
target: null
|
|
2857
2870
|
}), l = $(null), a = $([]), i = $([]), s = $([]), r = $([]), u = $({
|
|
2858
2871
|
src: null,
|
|
2859
2872
|
target: null
|
|
2860
|
-
}), c =
|
|
2873
|
+
}), c = Ze(), p = E(() => c.getLabel(e.value)), g = E(() => c.getLabel(o.value));
|
|
2861
2874
|
function w(_) {
|
|
2862
2875
|
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;
|
|
2863
2876
|
}
|
|
@@ -2887,17 +2900,17 @@ const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
|
2887
2900
|
reset: b
|
|
2888
2901
|
};
|
|
2889
2902
|
});
|
|
2890
|
-
function
|
|
2891
|
-
return
|
|
2903
|
+
function wo(e) {
|
|
2904
|
+
return kt() ? (nt(e), !0) : !1;
|
|
2892
2905
|
}
|
|
2893
|
-
function
|
|
2906
|
+
function je(e) {
|
|
2894
2907
|
return typeof e == "function" ? e() : L(e);
|
|
2895
2908
|
}
|
|
2896
|
-
const
|
|
2909
|
+
const _o = typeof window < "u" && typeof document < "u";
|
|
2897
2910
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2898
|
-
const
|
|
2911
|
+
const Et = () => {
|
|
2899
2912
|
};
|
|
2900
|
-
function
|
|
2913
|
+
function So(e, o) {
|
|
2901
2914
|
function t(...n) {
|
|
2902
2915
|
return new Promise((l, a) => {
|
|
2903
2916
|
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(a);
|
|
@@ -2905,13 +2918,13 @@ function xo(e, o) {
|
|
|
2905
2918
|
}
|
|
2906
2919
|
return t;
|
|
2907
2920
|
}
|
|
2908
|
-
function
|
|
2909
|
-
let t, n, l =
|
|
2921
|
+
function Eo(e, o = {}) {
|
|
2922
|
+
let t, n, l = Et;
|
|
2910
2923
|
const a = (s) => {
|
|
2911
|
-
clearTimeout(s), l(), l =
|
|
2924
|
+
clearTimeout(s), l(), l = Et;
|
|
2912
2925
|
};
|
|
2913
2926
|
return (s) => {
|
|
2914
|
-
const r =
|
|
2927
|
+
const r = je(e), u = je(o.maxWait);
|
|
2915
2928
|
return t && a(t), r <= 0 || u !== void 0 && u <= 0 ? (n && (a(n), n = null), Promise.resolve(s())) : new Promise((c, p) => {
|
|
2916
2929
|
l = o.rejectOnCancel ? p : c, u && !n && (n = setTimeout(() => {
|
|
2917
2930
|
t && a(t), n = null, c(s());
|
|
@@ -2921,34 +2934,34 @@ function yo(e, o = {}) {
|
|
|
2921
2934
|
});
|
|
2922
2935
|
};
|
|
2923
2936
|
}
|
|
2924
|
-
function
|
|
2925
|
-
return
|
|
2926
|
-
|
|
2937
|
+
function Oo(e, o = 200, t = {}) {
|
|
2938
|
+
return So(
|
|
2939
|
+
Eo(o, t),
|
|
2927
2940
|
e
|
|
2928
2941
|
);
|
|
2929
2942
|
}
|
|
2930
|
-
function
|
|
2943
|
+
function Ot(e) {
|
|
2931
2944
|
var o;
|
|
2932
|
-
const t =
|
|
2945
|
+
const t = je(e);
|
|
2933
2946
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2934
2947
|
}
|
|
2935
|
-
const
|
|
2936
|
-
function
|
|
2937
|
-
const e = $(!1), o =
|
|
2948
|
+
const $o = _o ? window : void 0;
|
|
2949
|
+
function Io() {
|
|
2950
|
+
const e = $(!1), o = Mt();
|
|
2938
2951
|
return o && ve(() => {
|
|
2939
2952
|
e.value = !0;
|
|
2940
2953
|
}, o), e;
|
|
2941
2954
|
}
|
|
2942
|
-
function
|
|
2943
|
-
const o =
|
|
2955
|
+
function To(e) {
|
|
2956
|
+
const o = Io();
|
|
2944
2957
|
return E(() => (o.value, !!e()));
|
|
2945
2958
|
}
|
|
2946
|
-
function
|
|
2947
|
-
const { window: n =
|
|
2959
|
+
function Lo(e, o, t = {}) {
|
|
2960
|
+
const { window: n = $o, ...l } = t;
|
|
2948
2961
|
let a;
|
|
2949
|
-
const i =
|
|
2962
|
+
const i = To(() => n && "ResizeObserver" in n), s = () => {
|
|
2950
2963
|
a && (a.disconnect(), a = void 0);
|
|
2951
|
-
}, r = E(() => Array.isArray(e) ? e.map((p) =>
|
|
2964
|
+
}, r = E(() => Array.isArray(e) ? e.map((p) => Ot(p)) : [Ot(e)]), u = N(
|
|
2952
2965
|
r,
|
|
2953
2966
|
(p) => {
|
|
2954
2967
|
if (s(), i.value && n) {
|
|
@@ -2961,12 +2974,12 @@ function Oo(e, o, t = {}) {
|
|
|
2961
2974
|
), c = () => {
|
|
2962
2975
|
s(), u();
|
|
2963
2976
|
};
|
|
2964
|
-
return
|
|
2977
|
+
return wo(c), {
|
|
2965
2978
|
isSupported: i,
|
|
2966
2979
|
stop: c
|
|
2967
2980
|
};
|
|
2968
2981
|
}
|
|
2969
|
-
function
|
|
2982
|
+
function p2(e) {
|
|
2970
2983
|
var o;
|
|
2971
2984
|
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);
|
|
2972
2985
|
function i() {
|
|
@@ -2974,18 +2987,18 @@ function f2(e) {
|
|
|
2974
2987
|
if (!t.value)
|
|
2975
2988
|
return;
|
|
2976
2989
|
let r = "";
|
|
2977
|
-
t.value.style[l] = "1px", a.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ?
|
|
2990
|
+
t.value.style[l] = "1px", a.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? je(e.styleTarget).style[l] = `${a.value}px` : r = `${a.value}px`, t.value.style[l] = r;
|
|
2978
2991
|
}
|
|
2979
2992
|
return N([n, t], () => oe(i), { immediate: !0 }), N(a, () => {
|
|
2980
2993
|
var s;
|
|
2981
2994
|
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2982
|
-
}),
|
|
2995
|
+
}), Lo(t, () => i()), e != null && e.watch && N(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2983
2996
|
textarea: t,
|
|
2984
2997
|
input: n,
|
|
2985
2998
|
triggerResize: i
|
|
2986
2999
|
};
|
|
2987
3000
|
}
|
|
2988
|
-
const
|
|
3001
|
+
const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
2989
3002
|
__name: "TranslationInput",
|
|
2990
3003
|
props: {
|
|
2991
3004
|
text: {
|
|
@@ -2998,9 +3011,9 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
2998
3011
|
const t = be(), n = e, l = $(""), a = E(() => t.src), i = E(() => t.srcLabel), s = E(() => {
|
|
2999
3012
|
var b;
|
|
3000
3013
|
return (b = t.phonetic) == null ? void 0 : b.src;
|
|
3001
|
-
}), { textarea: r } =
|
|
3014
|
+
}), { textarea: r } = p2({ input: l, styleProp: "minHeight" }), u = o, c = Oo(() => {
|
|
3002
3015
|
u("change", l.value);
|
|
3003
|
-
},
|
|
3016
|
+
}, Nn.INPUT_DEBOUNCE);
|
|
3004
3017
|
function p() {
|
|
3005
3018
|
if (!l.value) {
|
|
3006
3019
|
g();
|
|
@@ -3019,21 +3032,21 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3019
3032
|
(b) => {
|
|
3020
3033
|
l.value !== b && w(), l.value = b;
|
|
3021
3034
|
}
|
|
3022
|
-
), (b, _) => (m(), O("div",
|
|
3023
|
-
B(
|
|
3035
|
+
), (b, _) => (m(), O("div", Mo, [
|
|
3036
|
+
B(f2, {
|
|
3024
3037
|
src: a.value,
|
|
3025
3038
|
srcLabel: i.value,
|
|
3026
3039
|
type: "src",
|
|
3027
3040
|
phonetic: s.value,
|
|
3028
3041
|
hasClearBtn: !0,
|
|
3029
3042
|
onClear: g,
|
|
3030
|
-
onLoadTTS: _[0] || (_[0] = (
|
|
3043
|
+
onLoadTTS: _[0] || (_[0] = (R) => u("loadTTS")),
|
|
3031
3044
|
class: "mb-2"
|
|
3032
3045
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
3033
|
-
|
|
3046
|
+
At(v("textarea", {
|
|
3034
3047
|
ref_key: "textarea",
|
|
3035
3048
|
ref: r,
|
|
3036
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
3049
|
+
"onUpdate:modelValue": _[1] || (_[1] = (R) => l.value = R),
|
|
3037
3050
|
class: "w-full outline-none px-5 pr-8 bg-transparent text-gray-800 resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
3038
3051
|
autofocus: "",
|
|
3039
3052
|
rows: "2",
|
|
@@ -3041,7 +3054,7 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3041
3054
|
onFocus: w
|
|
3042
3055
|
}, null, 544), [
|
|
3043
3056
|
[
|
|
3044
|
-
|
|
3057
|
+
Vt,
|
|
3045
3058
|
l.value,
|
|
3046
3059
|
void 0,
|
|
3047
3060
|
{ trim: !0 }
|
|
@@ -3049,10 +3062,10 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3049
3062
|
])
|
|
3050
3063
|
]));
|
|
3051
3064
|
}
|
|
3052
|
-
},
|
|
3065
|
+
}, Ao = /* @__PURE__ */ We(ko, [["__scopeId", "data-v-3d7638d0"]]), Vo = (e) => (x2("data-v-7c33874e"), e = e(), y2(), e), Fo = { class: "bg-white relative z-10 rounded-md h-full" }, Ro = { class: "bg-transparent" }, Po = {
|
|
3053
3066
|
key: 0,
|
|
3054
|
-
class: "w-full flex items-center justify-end absolute -bottom-
|
|
3055
|
-
},
|
|
3067
|
+
class: "w-full flex items-center justify-end absolute -bottom-8 left-2 right-0 px-2 z-20"
|
|
3068
|
+
}, Do = /* @__PURE__ */ Vo(() => /* @__PURE__ */ v("span", { class: "text-sm text-gray-600" }, " Powered by Ddict AI ", -1)), No = {
|
|
3056
3069
|
__name: "TranslationResult",
|
|
3057
3070
|
props: {
|
|
3058
3071
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -3068,7 +3081,7 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3068
3081
|
}), s = E(() => {
|
|
3069
3082
|
var w;
|
|
3070
3083
|
return !!((w = t.dictionary) != null && w.length);
|
|
3071
|
-
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } =
|
|
3084
|
+
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } = p2({ input: n, styleProp: "minHeight" }), g = o;
|
|
3072
3085
|
return (w, b) => (m(), O("div", {
|
|
3073
3086
|
class: j([
|
|
3074
3087
|
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
@@ -3077,8 +3090,8 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3077
3090
|
}
|
|
3078
3091
|
])
|
|
3079
3092
|
}, [
|
|
3080
|
-
v("div",
|
|
3081
|
-
B(
|
|
3093
|
+
v("div", Fo, [
|
|
3094
|
+
B(f2, {
|
|
3082
3095
|
loading: u.value,
|
|
3083
3096
|
src: l.value,
|
|
3084
3097
|
srcLabel: a.value,
|
|
@@ -3096,8 +3109,8 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3096
3109
|
onCopy: b[3] || (b[3] = (_) => g("copy")),
|
|
3097
3110
|
class: "mb-2"
|
|
3098
3111
|
}, null, 8, ["loading", "src", "srcLabel", "hasFavoriteBtn", "hasAIBtn", "isFavorite", "isAITranslate", "hasDictionary", "phonetic"]),
|
|
3099
|
-
v("div",
|
|
3100
|
-
|
|
3112
|
+
v("div", Ro, [
|
|
3113
|
+
At(v("textarea", {
|
|
3101
3114
|
ref_key: "textarea",
|
|
3102
3115
|
ref: c,
|
|
3103
3116
|
"onUpdate:modelValue": b[4] || (b[4] = (_) => ye(p) ? p.value = _ : null),
|
|
@@ -3106,47 +3119,50 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3106
3119
|
rows: "2",
|
|
3107
3120
|
spellcheck: "false"
|
|
3108
3121
|
}, null, 512), [
|
|
3109
|
-
[
|
|
3122
|
+
[Vt, L(p)]
|
|
3110
3123
|
])
|
|
3111
3124
|
])
|
|
3112
3125
|
]),
|
|
3113
|
-
e.isAITranslate ? (m(), O("div",
|
|
3114
|
-
|
|
3115
|
-
B(
|
|
3126
|
+
e.isAITranslate ? (m(), O("div", Po, [
|
|
3127
|
+
Do,
|
|
3128
|
+
B(d2, {
|
|
3129
|
+
disabled: "",
|
|
3130
|
+
isFilled: ""
|
|
3131
|
+
})
|
|
3116
3132
|
])) : H("", !0)
|
|
3117
3133
|
], 2));
|
|
3118
3134
|
}
|
|
3119
|
-
},
|
|
3135
|
+
}, Bo = /* @__PURE__ */ We(No, [["__scopeId", "data-v-7c33874e"]]), jo = { class: "btn btn-sm btn-circle btn-ghost" }, Ge = {
|
|
3120
3136
|
__name: "ToggleBtn",
|
|
3121
3137
|
props: {
|
|
3122
3138
|
isExpanded: Boolean
|
|
3123
3139
|
},
|
|
3124
3140
|
setup(e) {
|
|
3125
3141
|
const o = e;
|
|
3126
|
-
return (t, n) => (m(), O("button",
|
|
3127
|
-
o.isExpanded ? (m(), q(L(
|
|
3142
|
+
return (t, n) => (m(), O("button", jo, [
|
|
3143
|
+
o.isExpanded ? (m(), q(L(G0), {
|
|
3128
3144
|
key: 0,
|
|
3129
3145
|
class: "w-7 text-gray-400"
|
|
3130
|
-
})) : (m(), q(L(
|
|
3146
|
+
})) : (m(), q(L(Z0), {
|
|
3131
3147
|
key: 1,
|
|
3132
3148
|
class: "w-7 text-gray-400"
|
|
3133
3149
|
}))
|
|
3134
3150
|
]));
|
|
3135
3151
|
}
|
|
3136
|
-
},
|
|
3152
|
+
}, Ho = { class: "card border bg-white rounded-lg" }, zo = { class: "card-body px-4 py-2 gap-0" }, Uo = { class: "flex justify-between items-center" }, Zo = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), Wo = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Go = { class: "list-none list-inside" }, qo = ["onClick"], Jo = { class: "text-base font-normal text-gray-800 leading-4" }, Ko = {
|
|
3137
3153
|
__name: "Dictionary",
|
|
3138
3154
|
emits: ["translate"],
|
|
3139
3155
|
setup(e, { emit: o }) {
|
|
3140
|
-
const t = $(!0), n = be(), l =
|
|
3156
|
+
const t = $(!0), n = be(), l = Ze(), a = E(() => n.dictionary), i = o, s = () => {
|
|
3141
3157
|
t.value = !t.value;
|
|
3142
3158
|
}, r = (u) => {
|
|
3143
3159
|
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
3144
3160
|
};
|
|
3145
|
-
return (u, c) => (m(), O("div",
|
|
3146
|
-
v("div",
|
|
3147
|
-
v("div",
|
|
3148
|
-
|
|
3149
|
-
B(
|
|
3161
|
+
return (u, c) => (m(), O("div", Ho, [
|
|
3162
|
+
v("div", zo, [
|
|
3163
|
+
v("div", Uo, [
|
|
3164
|
+
Zo,
|
|
3165
|
+
B(Ge, {
|
|
3150
3166
|
isExpanded: t.value,
|
|
3151
3167
|
onClick: s
|
|
3152
3168
|
}, null, 8, ["isExpanded"])
|
|
@@ -3159,16 +3175,16 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3159
3175
|
key: `${p.pos}-${g}`,
|
|
3160
3176
|
class: "mb-2"
|
|
3161
3177
|
}, [
|
|
3162
|
-
v("h5",
|
|
3163
|
-
v("ul",
|
|
3178
|
+
v("h5", Wo, K(p.pos), 1),
|
|
3179
|
+
v("ul", Go, [
|
|
3164
3180
|
(m(!0), O(G, null, te(p.items, (w, b) => (m(), O("li", {
|
|
3165
3181
|
key: `${w.word}-${b}`
|
|
3166
3182
|
}, [
|
|
3167
3183
|
v("span", {
|
|
3168
3184
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3169
3185
|
onClick: (_) => r(w.word)
|
|
3170
|
-
}, K(w.word), 9,
|
|
3171
|
-
v("small",
|
|
3186
|
+
}, K(w.word), 9, qo),
|
|
3187
|
+
v("small", Jo, " - " + K(w.reverse_translation.join(", ")), 1)
|
|
3172
3188
|
]))), 128))
|
|
3173
3189
|
])
|
|
3174
3190
|
]))), 128))
|
|
@@ -3177,20 +3193,20 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3177
3193
|
])
|
|
3178
3194
|
]));
|
|
3179
3195
|
}
|
|
3180
|
-
},
|
|
3196
|
+
}, Yo = { class: "card border bg-white rounded-lg" }, Qo = { class: "card-body px-4 py-2 gap-0" }, Xo = { class: "flex justify-between items-center" }, el = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), tl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, nl = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, ol = /* @__PURE__ */ v("br", null, null, -1), ll = {
|
|
3181
3197
|
key: 0,
|
|
3182
3198
|
class: "italic"
|
|
3183
|
-
},
|
|
3199
|
+
}, sl = {
|
|
3184
3200
|
__name: "Definition",
|
|
3185
3201
|
setup(e) {
|
|
3186
3202
|
const o = $(!0), t = be(), n = E(() => t.definitions), l = () => {
|
|
3187
3203
|
o.value = !o.value;
|
|
3188
3204
|
};
|
|
3189
|
-
return (a, i) => (m(), O("div",
|
|
3190
|
-
v("div",
|
|
3191
|
-
v("div",
|
|
3192
|
-
|
|
3193
|
-
B(
|
|
3205
|
+
return (a, i) => (m(), O("div", Yo, [
|
|
3206
|
+
v("div", Qo, [
|
|
3207
|
+
v("div", Xo, [
|
|
3208
|
+
el,
|
|
3209
|
+
B(Ge, {
|
|
3194
3210
|
isExpanded: o.value,
|
|
3195
3211
|
onClick: l
|
|
3196
3212
|
}, null, 8, ["isExpanded"])
|
|
@@ -3203,15 +3219,15 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3203
3219
|
key: `${s.pos}-${r}`,
|
|
3204
3220
|
class: "mb-2"
|
|
3205
3221
|
}, [
|
|
3206
|
-
v("h5",
|
|
3207
|
-
v("ul",
|
|
3222
|
+
v("h5", tl, K(s.pos), 1),
|
|
3223
|
+
v("ul", nl, [
|
|
3208
3224
|
(m(!0), O(G, null, te(s.items, (u, c) => (m(), O("li", {
|
|
3209
3225
|
key: `${u.gloss}-${c}`,
|
|
3210
3226
|
class: "mb-1"
|
|
3211
3227
|
}, [
|
|
3212
3228
|
v("span", null, K(u.gloss), 1),
|
|
3213
|
-
|
|
3214
|
-
u.example ? (m(), O("small",
|
|
3229
|
+
ol,
|
|
3230
|
+
u.example ? (m(), O("small", ll, '"' + K(u.example) + '"', 1)) : H("", !0)
|
|
3215
3231
|
]))), 128))
|
|
3216
3232
|
])
|
|
3217
3233
|
]))), 128))
|
|
@@ -3220,17 +3236,17 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3220
3236
|
])
|
|
3221
3237
|
]));
|
|
3222
3238
|
}
|
|
3223
|
-
},
|
|
3239
|
+
}, al = { class: "card border bg-white rounded-lg" }, il = { class: "card-body px-4 py-2 gap-0" }, rl = { class: "flex justify-between items-center" }, ul = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), cl = { class: "text-textCustom list-decimal list-outside ml-7 my-2" }, dl = ["innerHTML"], fl = {
|
|
3224
3240
|
__name: "Example",
|
|
3225
3241
|
setup(e) {
|
|
3226
3242
|
const o = $(!0), t = be(), n = E(() => t.examples), l = () => {
|
|
3227
3243
|
o.value = !o.value;
|
|
3228
3244
|
};
|
|
3229
|
-
return (a, i) => (m(), O("div",
|
|
3230
|
-
v("div",
|
|
3231
|
-
v("div",
|
|
3232
|
-
|
|
3233
|
-
B(
|
|
3245
|
+
return (a, i) => (m(), O("div", al, [
|
|
3246
|
+
v("div", il, [
|
|
3247
|
+
v("div", rl, [
|
|
3248
|
+
ul,
|
|
3249
|
+
B(Ge, {
|
|
3234
3250
|
isExpanded: o.value,
|
|
3235
3251
|
onClick: l
|
|
3236
3252
|
}, null, 8, ["isExpanded"])
|
|
@@ -3238,17 +3254,17 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3238
3254
|
v("div", {
|
|
3239
3255
|
class: j(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3240
3256
|
}, [
|
|
3241
|
-
v("ul",
|
|
3257
|
+
v("ul", cl, [
|
|
3242
3258
|
(m(!0), O(G, null, te(n.value, (s, r) => (m(), O("li", {
|
|
3243
3259
|
key: `${s.definition_id}-${r}`,
|
|
3244
3260
|
innerHTML: s
|
|
3245
|
-
}, null, 8,
|
|
3261
|
+
}, null, 8, dl))), 128))
|
|
3246
3262
|
])
|
|
3247
3263
|
], 2)
|
|
3248
3264
|
])
|
|
3249
3265
|
]));
|
|
3250
3266
|
}
|
|
3251
|
-
},
|
|
3267
|
+
}, pl = { class: "card border bg-white rounded-lg" }, vl = { class: "card-body px-4 py-2 gap-0" }, hl = { class: "flex justify-between items-center" }, ml = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), bl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, gl = { class: "list-none list-inside" }, Cl = { class: "flex flex-wrap" }, xl = ["onClick"], yl = {
|
|
3252
3268
|
__name: "Synonyms",
|
|
3253
3269
|
emits: ["translate"],
|
|
3254
3270
|
setup(e, { emit: o }) {
|
|
@@ -3257,11 +3273,11 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3257
3273
|
}, s = (r) => {
|
|
3258
3274
|
a("translate", r), window.scrollTo(0, 0);
|
|
3259
3275
|
};
|
|
3260
|
-
return (r, u) => (m(), O("div",
|
|
3261
|
-
v("div",
|
|
3262
|
-
v("div",
|
|
3263
|
-
|
|
3264
|
-
B(
|
|
3276
|
+
return (r, u) => (m(), O("div", pl, [
|
|
3277
|
+
v("div", vl, [
|
|
3278
|
+
v("div", hl, [
|
|
3279
|
+
ml,
|
|
3280
|
+
B(Ge, {
|
|
3265
3281
|
isExpanded: t.value,
|
|
3266
3282
|
onClick: i
|
|
3267
3283
|
}, null, 8, ["isExpanded"])
|
|
@@ -3274,18 +3290,18 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3274
3290
|
key: `${c.pos}-${p}`,
|
|
3275
3291
|
class: "mb-2"
|
|
3276
3292
|
}, [
|
|
3277
|
-
v("h5",
|
|
3278
|
-
v("ul",
|
|
3293
|
+
v("h5", bl, K(c.pos), 1),
|
|
3294
|
+
v("ul", gl, [
|
|
3279
3295
|
(m(!0), O(G, null, te(c.items, (g, w) => (m(), O("li", {
|
|
3280
3296
|
key: `${g.word}-${w}`,
|
|
3281
3297
|
class: "mb-2"
|
|
3282
3298
|
}, [
|
|
3283
|
-
v("div",
|
|
3299
|
+
v("div", Cl, [
|
|
3284
3300
|
(m(!0), O(G, null, te(g.synonym, (b, _) => (m(), O("span", {
|
|
3285
3301
|
key: `${b}-${_}`,
|
|
3286
3302
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3287
|
-
onClick: (
|
|
3288
|
-
}, K(b), 9,
|
|
3303
|
+
onClick: (R) => s(b)
|
|
3304
|
+
}, K(b), 9, xl))), 128))
|
|
3289
3305
|
])
|
|
3290
3306
|
]))), 128))
|
|
3291
3307
|
])
|
|
@@ -3295,7 +3311,7 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3295
3311
|
])
|
|
3296
3312
|
]));
|
|
3297
3313
|
}
|
|
3298
|
-
},
|
|
3314
|
+
}, wl = "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", _l = "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", Sl = ["disabled"], El = ["src"], Ol = {
|
|
3299
3315
|
__name: "ChevronAIBtn",
|
|
3300
3316
|
props: {
|
|
3301
3317
|
disabled: Boolean,
|
|
@@ -3310,19 +3326,19 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3310
3326
|
disabled: e.disabled
|
|
3311
3327
|
}, [
|
|
3312
3328
|
v("img", {
|
|
3313
|
-
src: e.isExpanded ? L(
|
|
3329
|
+
src: e.isExpanded ? L(wl) : L(_l),
|
|
3314
3330
|
alt: "AI",
|
|
3315
3331
|
class: j(["w-6 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
3316
|
-
}, null, 10,
|
|
3317
|
-
], 10,
|
|
3332
|
+
}, null, 10, El)
|
|
3333
|
+
], 10, Sl));
|
|
3318
3334
|
}
|
|
3319
|
-
},
|
|
3335
|
+
}, $l = { class: "card-body bg-white px-4 py-2 gap-0 relative z-10 rounded-md" }, Il = { class: "flex justify-between items-center" }, Tl = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "AI Summary", -1), Ll = { class: "flex items-center" }, Ml = {
|
|
3320
3336
|
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",
|
|
3321
3337
|
"data-tip": "AI Summarize"
|
|
3322
|
-
},
|
|
3338
|
+
}, kl = {
|
|
3323
3339
|
key: 0,
|
|
3324
3340
|
class: "text-textCustom list-none list-outside my-2"
|
|
3325
|
-
},
|
|
3341
|
+
}, Al = ["innerHTML"], Vl = {
|
|
3326
3342
|
__name: "AIExplanation",
|
|
3327
3343
|
props: {
|
|
3328
3344
|
isAIExplain: {
|
|
@@ -3350,13 +3366,13 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3350
3366
|
}
|
|
3351
3367
|
]])
|
|
3352
3368
|
}, [
|
|
3353
|
-
v("div",
|
|
3354
|
-
v("div",
|
|
3355
|
-
|
|
3356
|
-
v("div",
|
|
3357
|
-
n.value ? (m(), q(
|
|
3358
|
-
v("div",
|
|
3359
|
-
B(
|
|
3369
|
+
v("div", $l, [
|
|
3370
|
+
v("div", Il, [
|
|
3371
|
+
Tl,
|
|
3372
|
+
v("div", Ll, [
|
|
3373
|
+
n.value ? (m(), q(u2, { key: 0 })) : H("", !0),
|
|
3374
|
+
v("div", Ml, [
|
|
3375
|
+
B(Ol, {
|
|
3360
3376
|
isExpanded: e.isAIExplain,
|
|
3361
3377
|
disabled: n.value,
|
|
3362
3378
|
onClick: a
|
|
@@ -3367,12 +3383,12 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3367
3383
|
v("div", {
|
|
3368
3384
|
class: j(["overflow-hidden transition-all duration-300 ease-in-out", e.isAIExplain ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3369
3385
|
}, [
|
|
3370
|
-
(r = e.explanation) != null && r.result ? (m(), O("ul",
|
|
3386
|
+
(r = e.explanation) != null && r.result ? (m(), O("ul", kl, [
|
|
3371
3387
|
(m(!0), O(G, null, te(((u = e.explanation) == null ? void 0 : u.result.split(`
|
|
3372
3388
|
`)) || [], (c, p) => (m(), O("li", {
|
|
3373
3389
|
key: `${c}-${p}`,
|
|
3374
3390
|
innerHTML: c
|
|
3375
|
-
}, null, 8,
|
|
3391
|
+
}, null, 8, Al))), 128))
|
|
3376
3392
|
])) : H("", !0)
|
|
3377
3393
|
], 2)
|
|
3378
3394
|
])
|
|
@@ -3380,25 +3396,25 @@ const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
|
3380
3396
|
};
|
|
3381
3397
|
}
|
|
3382
3398
|
};
|
|
3383
|
-
function
|
|
3399
|
+
function Fl() {
|
|
3384
3400
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3385
3401
|
}
|
|
3386
|
-
function
|
|
3402
|
+
function Rl() {
|
|
3387
3403
|
document.documentElement.removeAttribute("dir");
|
|
3388
3404
|
}
|
|
3389
|
-
const
|
|
3390
|
-
supportRTL:
|
|
3391
|
-
removeRTL:
|
|
3392
|
-
},
|
|
3405
|
+
const $t = {
|
|
3406
|
+
supportRTL: Fl,
|
|
3407
|
+
removeRTL: Rl
|
|
3408
|
+
}, Pl = ["ar", "fa", "iw", "yi", "ur", "pa"], Dl = { class: "bg-white min-h-screen flex flex-col" }, Nl = { class: "py-2 px-5 shadow-lg" }, Bl = { class: "px-5 flex-grow" }, jl = { class: "flex flex-col lg:flex-row lg:gap-2 mb-6" }, Hl = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, zl = /* @__PURE__ */ v("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), Ul = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, Zl = {
|
|
3393
3409
|
key: 0,
|
|
3394
3410
|
class: "w-full my-4"
|
|
3395
|
-
},
|
|
3411
|
+
}, Wl = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Gl = {
|
|
3396
3412
|
key: 1,
|
|
3397
3413
|
class: "w-full my-4"
|
|
3398
|
-
},
|
|
3414
|
+
}, ql = {
|
|
3399
3415
|
key: 1,
|
|
3400
3416
|
class: "text-textCustom italic font-medium"
|
|
3401
|
-
},
|
|
3417
|
+
}, Yl = {
|
|
3402
3418
|
__name: "Popup",
|
|
3403
3419
|
props: {
|
|
3404
3420
|
opt: {
|
|
@@ -3460,9 +3476,9 @@ const Ot = {
|
|
|
3460
3476
|
"copy"
|
|
3461
3477
|
],
|
|
3462
3478
|
setup(e, { emit: o }) {
|
|
3463
|
-
const t =
|
|
3479
|
+
const t = Cn(), n = be(t), l = c2(t), a = Ze(t), i = Me(t), s = e, r = o, u = $(""), c = () => {
|
|
3464
3480
|
const I = s.opt.target;
|
|
3465
|
-
|
|
3481
|
+
Pl.includes(I) ? $t.supportRTL() : $t.removeRTL();
|
|
3466
3482
|
};
|
|
3467
3483
|
N(
|
|
3468
3484
|
() => s.translation,
|
|
@@ -3513,25 +3529,25 @@ const Ot = {
|
|
|
3513
3529
|
function _() {
|
|
3514
3530
|
s.isAITranslate || i.setLoading("translation", !0), r("aiTranslate");
|
|
3515
3531
|
}
|
|
3516
|
-
function
|
|
3532
|
+
function R() {
|
|
3517
3533
|
s.isAIExplain || i.setLoading("aiExplanation", !0), r("aiExplain");
|
|
3518
3534
|
}
|
|
3519
3535
|
return (I, x) => {
|
|
3520
|
-
var A,
|
|
3521
|
-
return m(), O("div",
|
|
3522
|
-
v("div",
|
|
3523
|
-
B(
|
|
3536
|
+
var A, P, y, M, C;
|
|
3537
|
+
return m(), O("div", Dl, [
|
|
3538
|
+
v("div", Nl, [
|
|
3539
|
+
B(H2, {
|
|
3524
3540
|
onReader: x[0] || (x[0] = (h) => r("reader")),
|
|
3525
3541
|
onSettings: x[1] || (x[1] = (h) => r("settings")),
|
|
3526
3542
|
onFullScreen: x[2] || (x[2] = (h) => r("fullscreen")),
|
|
3527
3543
|
onStarList: x[3] || (x[3] = (h) => r("starList"))
|
|
3528
3544
|
})
|
|
3529
3545
|
]),
|
|
3530
|
-
v("div",
|
|
3531
|
-
B(
|
|
3532
|
-
v("div",
|
|
3533
|
-
v("div",
|
|
3534
|
-
B(
|
|
3546
|
+
v("div", Bl, [
|
|
3547
|
+
B(Dn, { class: "mt-3 mb-0" }),
|
|
3548
|
+
v("div", jl, [
|
|
3549
|
+
v("div", Hl, [
|
|
3550
|
+
B(Ao, {
|
|
3535
3551
|
text: u.value,
|
|
3536
3552
|
onChange: g,
|
|
3537
3553
|
onClear: p,
|
|
@@ -3539,9 +3555,9 @@ const Ot = {
|
|
|
3539
3555
|
class: "flex-grow flex flex-col"
|
|
3540
3556
|
}, null, 8, ["text"])
|
|
3541
3557
|
]),
|
|
3542
|
-
|
|
3543
|
-
v("div",
|
|
3544
|
-
B(
|
|
3558
|
+
zl,
|
|
3559
|
+
v("div", Ul, [
|
|
3560
|
+
B(Bo, {
|
|
3545
3561
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3546
3562
|
isAITranslateFeatureEnabled: e.isAITranslateFeatureEnabled,
|
|
3547
3563
|
isAITranslate: e.isAITranslate,
|
|
@@ -3555,33 +3571,33 @@ const Ot = {
|
|
|
3555
3571
|
])
|
|
3556
3572
|
]),
|
|
3557
3573
|
s.translation ? (m(), O(G, { key: 0 }, [
|
|
3558
|
-
((A = L(n).result) == null ? void 0 : A.length) > e.aiExplainMinLength ? (m(), O("div",
|
|
3559
|
-
B(
|
|
3574
|
+
((A = L(n).result) == null ? void 0 : A.length) > e.aiExplainMinLength ? (m(), O("div", Zl, [
|
|
3575
|
+
B(Vl, {
|
|
3560
3576
|
isAIExplain: e.isAIExplain,
|
|
3561
3577
|
explanation: e.explanation,
|
|
3562
|
-
onAiExplain:
|
|
3578
|
+
onAiExplain: R
|
|
3563
3579
|
}, null, 8, ["isAIExplain", "explanation"])
|
|
3564
3580
|
])) : H("", !0),
|
|
3565
|
-
v("div",
|
|
3566
|
-
(
|
|
3581
|
+
v("div", Wl, [
|
|
3582
|
+
(P = L(n).dictionary) != null && P.length ? (m(), q(Ko, {
|
|
3567
3583
|
key: 0,
|
|
3568
3584
|
onTranslate: b
|
|
3569
3585
|
})) : H("", !0),
|
|
3570
|
-
(y = L(n).definitions) != null && y.length ? (m(), q(
|
|
3571
|
-
(M = L(n).synonyms) != null && M.length ? (m(), q(
|
|
3586
|
+
(y = L(n).definitions) != null && y.length ? (m(), q(sl, { key: 1 })) : H("", !0),
|
|
3587
|
+
(M = L(n).synonyms) != null && M.length ? (m(), q(yl, {
|
|
3572
3588
|
key: 2,
|
|
3573
3589
|
onTranslate: b
|
|
3574
3590
|
})) : H("", !0)
|
|
3575
3591
|
]),
|
|
3576
|
-
(C = L(n).examples) != null && C.length ? (m(), O("div",
|
|
3577
|
-
B(
|
|
3592
|
+
(C = L(n).examples) != null && C.length ? (m(), O("div", Gl, [
|
|
3593
|
+
B(fl)
|
|
3578
3594
|
])) : H("", !0)
|
|
3579
|
-
], 64)) : (m(), O("span",
|
|
3595
|
+
], 64)) : (m(), O("span", ql, "Service unavailable"))
|
|
3580
3596
|
])
|
|
3581
3597
|
]);
|
|
3582
3598
|
};
|
|
3583
3599
|
}
|
|
3584
3600
|
};
|
|
3585
3601
|
export {
|
|
3586
|
-
|
|
3602
|
+
Yl as default
|
|
3587
3603
|
};
|