@ddict/popup 1.2.1 → 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 +979 -925
- 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
|
|
2
|
-
const y2 = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%200%2096%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.151%208.94498H35.7256V23.055H40.151C44.7473%2023.055%2047.826%2020.0825%2047.826%2015.9795C47.8267%2011.8093%2044.7678%208.94498%2040.151%208.94498ZM40.1312%2021.025H37.993V10.9974H40.1312C43.4217%2010.9974%2045.4972%2012.9846%2045.4972%2015.9795C45.4965%2018.9296%2043.4012%2021.025%2040.1312%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M54.5158%208.94498H50.0903V23.055H54.5158C59.1121%2023.055%2062.1908%2020.0825%2062.1908%2015.9795C62.1914%2011.8093%2059.1351%208.94498%2054.5158%208.94498ZM54.496%2021.025H52.3578V10.9974H54.496C57.789%2010.9974%2059.8619%2012.9846%2059.8619%2015.9795C59.8613%2018.9296%2057.766%2021.025%2054.496%2021.025Z'%20fill='%233B5695'/%3e%3cpath%20d='M66.7237%208.94498H64.4575V23.055H66.7237V8.94498Z'%20fill='%233B5695'/%3e%3cpath%20d='M76.4301%2010.7837C78.29%2010.7837%2079.7436%2011.6603%2080.7487%2013.2207L82.4589%2011.9591C81.2401%209.97057%2078.9957%208.70953%2076.409%208.70953C72.3898%208.64555%2068.9048%2011.9591%2068.9906%2016C68.9048%2020.0403%2072.3898%2023.3544%2076.409%2023.2905C79.0385%2023.2905%2081.2618%2022.0294%2082.4589%2020.0409L80.7487%2018.7793C79.7436%2020.3397%2078.29%2021.2163%2076.4301%2021.2163C73.544%2021.2163%2071.3418%2018.993%2071.3418%2016C71.3418%2013.007%2073.5433%2010.7837%2076.4301%2010.7837Z'%20fill='%233B5695'/%3e%3cpath%20d='M83.3135%208.94498V10.9757H88.0595V23.055H90.3256V10.9757H95.0934V8.94498H83.3135Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.66351%204.7121H4.604V15.4427L6.87208%2013.3839V6.79143H8.64559C11.4639%206.79143%2013.2835%208.47857%2013.2835%2011.0877C13.2835%2013.6916%2011.421%2015.4427%208.64559%2015.4427H4.604V17.5016H8.66351C12.7531%2017.5016%2015.6098%2014.8644%2015.6098%2011.0877C15.6104%207.27575%2012.8196%204.7121%208.66351%204.7121Z'%20fill='%233B5695'/%3e%3cpath%20d='M26.2425%209.25528H21.5502L20.7537%2014.293L21.4523%2014.3308L21.4069%2014.7294C21.3916%2014.8656%2021.3289%2015.0448%2021.112%2015.1734C21.1017%2015.9399%2021.0845%2017.0493%2020.9706%2018.1766H26.5937V19.8586H21.4677C22.4133%2022.9424%2024.1254%2024.9648%2026.5611%2025.8669L27.1536%2026.0864L26.6795%2026.5048C26.4875%2026.6737%2026.2182%2027.0141%2026.0896%2027.2489L25.9258%2027.5438L25.6155%2027.4152C23.167%2026.4095%2021.4223%2024.4926%2020.2905%2021.563C19.3602%2024.3365%2017.5797%2026.2553%2014.8592%2027.428L14.5438%2027.5617L14.3775%2027.2642C14.2764%2027.08%2014.0294%2026.7876%2013.8151%2026.5989L13.3564%2026.1951L13.9239%2025.9655C16.4555%2024.9392%2018.064%2023.1414%2018.8228%2020.4837C19.6647%2019.8381%2020.2099%2018.8221%2020.2169%2017.6801V4.53231C20.2169%202.58349%2018.6334%201%2016.6846%201H3.53487C1.58349%201%200%202.58349%200%204.53231V17.6795C0%2019.6283%201.58349%2021.2143%203.53487%2021.2143H8.25528V27.2431C8.25528%2029.3135%209.93986%2031%2012.0096%2031H26.2431C28.3161%2031%2029.9974%2029.3129%2029.9974%2027.2431V13.0096C29.9974%2010.9392%2028.3154%209.25528%2026.2425%209.25528ZM3.53487%2019.4517C2.55662%2019.4517%201.762%2018.6603%201.762%2017.6788V4.53231C1.762%203.55662%202.55598%202.762%203.53487%202.762H16.6839C17.6571%202.762%2018.4517%203.55598%2018.4517%204.53231V17.6795C18.4517%2017.778%2018.444%2017.8733%2018.4267%2017.9667C18.3941%2018.1811%2018.3231%2018.38%2018.215%2018.5592C17.9149%2019.0934%2017.3372%2019.4517%2016.6846%2019.4517H3.53487Z'%20fill='%233B5695'/%3e%3c/svg%3e", w2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%20fill='%233B5695'%20class='bi%20bi-list-stars%20fill-primaryColor'%3e%3cpath%20fill-rule='evenodd'%20d='M5%2011.5a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5zm0-4a.5.5%200%200%201%20.5-.5h9a.5.5%200%200%201%200%201h-9a.5.5%200%200%201-.5-.5z'/%3e%3cpath%20d='M2.242%202.194a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.256-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53zm0%204a.27.27%200%200%201%20.516%200l.162.53c.035.115.14.194.258.194h.551c.259%200%20.37.333.164.493l-.468.363a.277.277%200%200%200-.094.3l.173.569c.078.255-.213.462-.423.3l-.417-.324a.267.267%200%200%200-.328%200l-.417.323c-.21.163-.5-.043-.423-.299l.173-.57a.277.277%200%200%200-.094-.299l-.468-.363c-.206-.16-.095-.493.164-.493h.55a.271.271%200%200%200%20.259-.194l.162-.53z'/%3e%3c/svg%3e", _2 = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%203.25C5.25736%203.25%204.25%204.25736%204.25%205.5H3.5H2.75C2.75%203.42893%204.42893%201.75%206.5%201.75H17.5C17.9142%201.75%2018.25%202.08579%2018.25%202.5V15.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25H6.5C5.26293%2016.25%204.25%2017.2576%204.25%2018.5C4.25%2018.9142%203.91421%2019.25%203.5%2019.25C3.08579%2019.25%202.75%2018.9142%202.75%2018.5V5.5C2.75%205.49993%202.75%205.5%203.5%205.5C4.25%205.5%204.25%205.49993%204.25%205.5V15.5017C4.87779%2015.0296%205.65755%2014.75%206.5%2014.75H16.75V3.25H6.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.5%202.75C20.9142%202.75%2021.25%203.08579%2021.25%203.5V21.5C21.25%2021.9142%2020.9142%2022.25%2020.5%2022.25H6.5C4.42893%2022.25%202.75%2020.5711%202.75%2018.5C2.75%2016.4289%204.42893%2014.75%206.5%2014.75H17.4995C17.4996%2014.75%2017.5%2014.75%2017.5%2015.5C17.5%2016.25%2017.5001%2016.25%2017.5%2016.25H6.5C5.25736%2016.25%204.25%2017.2574%204.25%2018.5C4.25%2019.7426%205.25736%2020.75%206.5%2020.75H19.75V3.5C19.75%203.08579%2020.0858%202.75%2020.5%202.75ZM18.25%2015.5C18.25%2015.9142%2017.9142%2016.25%2017.5%2016.25V15.5L17.4995%2014.75C17.9137%2014.75%2018.25%2015.0858%2018.25%2015.5Z'%20fill='%233B5695'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.25%2018.5C6.25%2018.0858%206.58579%2017.75%207%2017.75H17C17.4142%2017.75%2017.75%2018.0858%2017.75%2018.5C17.75%2018.9142%2017.4142%2019.25%2017%2019.25H7C6.58579%2019.25%206.25%2018.9142%206.25%2018.5Z'%20fill='%233B5695'/%3e%3c/svg%3e", S2 = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.467%202.47236C2.75841%202.17799%203.23328%202.17559%203.52764%202.467L8.52765%207.41675C8.82201%207.70816%208.82441%208.18303%208.533%208.4774C8.24159%208.77176%207.76672%208.77416%207.47235%208.48275L2.47236%203.533C2.17799%203.24159%202.17559%202.76672%202.467%202.47236Z'%20fill='%233B5695'/%3e%3cpath%20d='M8.533%2015.4724C8.82441%2015.7667%208.82201%2016.2416%208.52765%2016.533L3.52765%2021.4828C3.23328%2021.7742%202.75841%2021.7718%202.467%2021.4774C2.17559%2021.183%202.17799%2020.7082%202.47236%2020.4167L7.47235%2015.467C7.76672%2015.1756%208.24159%2015.178%208.533%2015.4724Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.52%2015.4697C15.8129%2015.1768%2016.2877%2015.1768%2016.5806%2015.4697L21.5304%2020.4194C21.8233%2020.7123%2021.8233%2021.1872%2021.5304%2021.4801C21.2375%2021.773%2020.7626%2021.773%2020.4697%2021.4801L15.52%2016.5303C15.2271%2016.2374%2015.2271%2015.7626%2015.52%2015.4697Z'%20fill='%233B5695'/%3e%3cpath%20d='M21.4801%202.46967C21.773%202.76256%2021.773%203.23744%2021.4801%203.53033L16.5303%208.48008C16.2374%208.77297%2015.7626%208.77297%2015.4697%208.48008C15.1768%208.18719%2015.1768%207.71231%2015.4697%207.41942L20.4194%202.46967C20.7123%202.17678%2021.1872%202.17678%2021.4801%202.46967Z'%20fill='%233B5695'/%3e%3cpath%20d='M15.75%203C15.75%202.58579%2016.0858%202.25%2016.5%202.25H21C21.4142%202.25%2021.75%202.58579%2021.75%203V7.5C21.75%207.91421%2021.4142%208.25%2021%208.25C20.5858%208.25%2020.25%207.91421%2020.25%207.5V3.75H16.5C16.0858%203.75%2015.75%203.41421%2015.75%203Z'%20fill='%233B5695'/%3e%3cpath%20d='M21%2015.75C21.4142%2015.75%2021.75%2016.0858%2021.75%2016.5V21C21.75%2021.4142%2021.4142%2021.75%2021%2021.75H16.5C16.0858%2021.75%2015.75%2021.4142%2015.75%2021C15.75%2020.5858%2016.0858%2020.25%2016.5%2020.25H20.25V16.5C20.25%2016.0858%2020.5858%2015.75%2021%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M3%2015.75C3.41421%2015.75%203.75%2016.0858%203.75%2016.5V20.25H7.5C7.91421%2020.25%208.25%2020.5858%208.25%2021C8.25%2021.4142%207.91421%2021.75%207.5%2021.75H3C2.58579%2021.75%202.25%2021.4142%202.25%2021V16.5C2.25%2016.0858%202.58579%2015.75%203%2015.75Z'%20fill='%233B5695'/%3e%3cpath%20d='M2.25%203C2.25%202.58579%202.58579%202.25%203%202.25H7.5C7.91421%202.25%208.25%202.58579%208.25%203C8.25%203.41421%207.91421%203.75%207.5%203.75H3.75V7.5C3.75%207.91421%203.41421%208.25%203%208.25C2.58579%208.25%202.25%207.91421%202.25%207.5V3Z'%20fill='%233B5695'/%3e%3c/svg%3e", E2 = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%233B5695'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%233B5695'/%3e%3c/svg%3e", O2 = { class: "flex justify-between" }, I2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
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
|
-
|
|
15
|
+
}, null, -1), k2 = [
|
|
16
|
+
M2
|
|
17
17
|
], A2 = {
|
|
18
18
|
class: "tooltip tooltip-bottom before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]",
|
|
19
19
|
"data-tip": "Reader"
|
|
20
20
|
}, V2 = /* @__PURE__ */ v("img", {
|
|
21
|
-
src:
|
|
21
|
+
src: S2,
|
|
22
22
|
alt: "Reader",
|
|
23
23
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
24
|
+
}, null, -1), F2 = [
|
|
25
25
|
V2
|
|
26
|
-
],
|
|
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) => (
|
|
49
|
+
return (n, l) => (m(), O("div", $2, [
|
|
50
50
|
I2,
|
|
51
|
-
v("div",
|
|
52
|
-
v("div",
|
|
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
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 () => {
|
|
@@ -84,18 +97,18 @@ function we(e, o, t) {
|
|
|
84
97
|
let u;
|
|
85
98
|
t.key && ((a = t.debug) != null && a.call(t)) && (u = Date.now());
|
|
86
99
|
const c = e();
|
|
87
|
-
if (!(c.length !== n.length || c.some((w,
|
|
100
|
+
if (!(c.length !== n.length || c.some((w, b) => n[b] !== w)))
|
|
88
101
|
return l;
|
|
89
102
|
n = c;
|
|
90
|
-
let
|
|
91
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
92
|
-
const w = Math.round((Date.now() - u) * 100) / 100,
|
|
103
|
+
let g;
|
|
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))) {
|
|
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,
|
|
@@ -325,27 +338,27 @@ class Y2 {
|
|
|
325
338
|
this.pendingMeasuredCacheIndexes = [];
|
|
326
339
|
const c = this.measurementsCache.slice(0, u);
|
|
327
340
|
for (let p = u; p < t; p++) {
|
|
328
|
-
let
|
|
329
|
-
|
|
341
|
+
let g = (r = this.measurementsCache[p]) == null ? void 0 : r.measureElement;
|
|
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),
|
|
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: _,
|
|
344
357
|
size: I,
|
|
345
358
|
end: x,
|
|
346
359
|
key: w,
|
|
347
|
-
lane:
|
|
348
|
-
measureElement:
|
|
360
|
+
lane: A,
|
|
361
|
+
measureElement: g
|
|
349
362
|
};
|
|
350
363
|
}
|
|
351
364
|
return this.measurementsCache = c, c;
|
|
@@ -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,20 +530,20 @@ const kt = (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
|
|
533
|
-
return
|
|
544
|
+
function o0(e) {
|
|
545
|
+
const o = new t0(L(e)), t = h2(o), n = o._didMount();
|
|
546
|
+
return N(
|
|
534
547
|
() => L(e).getScrollElement(),
|
|
535
548
|
(l) => {
|
|
536
549
|
l && o._willUpdate();
|
|
@@ -538,44 +551,44 @@ function X2(e) {
|
|
|
538
551
|
{
|
|
539
552
|
immediate: !0
|
|
540
553
|
}
|
|
541
|
-
),
|
|
554
|
+
), N(
|
|
542
555
|
() => L(e),
|
|
543
556
|
(l) => {
|
|
544
557
|
o.setOptions({
|
|
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,21 +626,21 @@ 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
|
-
function
|
|
643
|
+
function V(e) {
|
|
631
644
|
var o;
|
|
632
645
|
if (e == null || e.value == null) return null;
|
|
633
646
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
@@ -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,38 +677,38 @@ 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
|
-
let o =
|
|
685
|
+
let o = V(e);
|
|
673
686
|
if (o) return o.ownerDocument;
|
|
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
728
|
function Ve(e, o, t) {
|
|
716
|
-
|
|
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);
|
|
@@ -732,10 +745,10 @@ function C0(e, o, t = E(() => !0)) {
|
|
|
732
745
|
}(e);
|
|
733
746
|
for (let u of r) {
|
|
734
747
|
if (u === null) continue;
|
|
735
|
-
let c = u instanceof HTMLElement ? u :
|
|
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) => {
|
|
@@ -746,86 +759,86 @@ function C0(e, o, t = E(() => !0)) {
|
|
|
746
759
|
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
747
760
|
}, !0), Ve("click", (a) => {
|
|
748
761
|
Pt() || l.value && (n(a, () => l.value), l.value = null);
|
|
749
|
-
}, !0), Ve("touchend", (a) => n(a, () => a.target instanceof HTMLElement ? a.target : null), !0),
|
|
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 = $(
|
|
758
|
-
return
|
|
759
|
-
t.value =
|
|
769
|
+
function S0(e, o) {
|
|
770
|
+
let t = $(mt(e.value.type, e.value.as));
|
|
771
|
+
return ve(() => {
|
|
772
|
+
t.value = mt(e.value.type, e.value.as);
|
|
760
773
|
}), re(() => {
|
|
761
774
|
var n;
|
|
762
|
-
t.value ||
|
|
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 || {}),
|
|
788
|
-
function
|
|
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 || {});
|
|
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
|
-
let p = !1,
|
|
807
|
-
for (let [w,
|
|
808
|
-
p && (c["data-headlessui-state"] =
|
|
819
|
+
let p = !1, g = [];
|
|
820
|
+
for (let [w, b] of Object.entries(n)) typeof b == "boolean" && (p = !0), b === !0 && g.push(w);
|
|
821
|
+
p && (c["data-headlessui-state"] = g.join(" "));
|
|
809
822
|
}
|
|
810
823
|
if (s === "template") {
|
|
811
|
-
if (u =
|
|
812
|
-
let [p, ...
|
|
813
|
-
if (!
|
|
824
|
+
if (u = Dt(u ?? []), Object.keys(r).length > 0 || Object.keys(o).length > 0) {
|
|
825
|
+
let [p, ...g] = u ?? [];
|
|
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 =
|
|
818
|
-
for (let _ in w) _.startsWith("on") && (
|
|
819
|
-
return
|
|
830
|
+
let w = Nt((i = p.props) != null ? i : {}, r, c), b = It(p, w, !0);
|
|
831
|
+
for (let _ in w) _.startsWith("on") && (b.props || (b.props = {}), b.props[_] = w[_]);
|
|
832
|
+
return b;
|
|
820
833
|
}
|
|
821
834
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
822
835
|
}
|
|
823
836
|
return Ee(s, Object.assign({}, r, c), { default: () => u });
|
|
824
837
|
}
|
|
825
|
-
function
|
|
826
|
-
return e.flatMap((o) => o.type ===
|
|
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
|
-
return
|
|
874
|
+
return he({ ourProps: i, theirProps: a, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
862
875
|
};
|
|
863
|
-
} }),
|
|
864
|
-
var
|
|
865
|
-
function
|
|
866
|
-
return Te(
|
|
876
|
+
} }), jt = Symbol("Context");
|
|
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 || {});
|
|
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
|
|
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
|
-
var
|
|
889
|
-
function
|
|
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 || {});
|
|
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,87 +928,87 @@ 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
|
|
937
|
-
function
|
|
938
|
-
let o = Te(
|
|
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");
|
|
950
|
+
function me(e) {
|
|
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
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t,
|
|
954
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, me), t;
|
|
942
955
|
}
|
|
943
956
|
return o;
|
|
944
957
|
}
|
|
945
|
-
let
|
|
946
|
-
let t =
|
|
947
|
-
let s =
|
|
958
|
+
let Gt = Symbol("VirtualContext"), N0 = ue({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
959
|
+
let t = me("VirtualProvider"), n = E(() => {
|
|
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
|
-
return
|
|
967
|
+
return V(t.optionsRef);
|
|
955
968
|
}, overscan: 12 }))), a = E(() => {
|
|
956
969
|
var s;
|
|
957
970
|
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
958
971
|
}), i = $(0);
|
|
959
|
-
return
|
|
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
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" } })))];
|
|
967
|
-
} }),
|
|
968
|
-
let l = $(1), a = $(null), i = $(null), s = $(null), r = $(null), u = $({ static: !1, hold: !1 }), c = $([]), p = $(null),
|
|
969
|
-
function
|
|
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,
|
|
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 }) {
|
|
981
|
+
let l = $(1), a = $(null), i = $(null), s = $(null), r = $(null), u = $({ static: !1, hold: !1 }), c = $([]), p = $(null), g = $(2), w = $(!1);
|
|
982
|
+
function b(d = (f) => f) {
|
|
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);
|
|
977
990
|
}, 1: () => {
|
|
978
|
-
let f =
|
|
991
|
+
let f = ee(h.value.value).slice(), S = ee(d), T = f.findIndex((F) => h.compare(S, ee(F)));
|
|
979
992
|
return T === -1 ? f.push(S) : f.splice(T, 1), x == null ? void 0 : x(f);
|
|
980
993
|
} });
|
|
981
994
|
}
|
|
982
|
-
let
|
|
995
|
+
let C = E(() => {
|
|
983
996
|
});
|
|
984
|
-
|
|
997
|
+
N([C], ([d], [f]) => {
|
|
985
998
|
if (h.virtual.value && d && f && p.value !== null) {
|
|
986
999
|
let S = d.indexOf(f[p.value]);
|
|
987
1000
|
S !== -1 ? p.value = S : p.value = null;
|
|
988
1001
|
}
|
|
989
1002
|
});
|
|
990
|
-
let h = { comboboxState: l, value:
|
|
1003
|
+
let h = { comboboxState: l, value: A, mode: _, compare(d, f) {
|
|
991
1004
|
if (typeof e.by == "string") {
|
|
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)) {
|
|
@@ -1010,7 +1023,7 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1010
1023
|
if (d !== -1) return d;
|
|
1011
1024
|
}
|
|
1012
1025
|
return p.value;
|
|
1013
|
-
}), activationTrigger:
|
|
1026
|
+
}), activationTrigger: g, optionsPropsRef: u, closeCombobox() {
|
|
1014
1027
|
w.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, p.value = null);
|
|
1015
1028
|
}, openCombobox() {
|
|
1016
1029
|
if (w.value = !0, !e.disabled && l.value !== 0) {
|
|
@@ -1021,29 +1034,29 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1021
1034
|
l.value = 0;
|
|
1022
1035
|
}
|
|
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 ===
|
|
1030
|
-
var D,
|
|
1031
|
-
return (
|
|
1032
|
-
var
|
|
1033
|
-
return !((
|
|
1034
|
-
})) != null ?
|
|
1042
|
+
p.value = d === Z.Specific ? f : gt({ focus: d }, { resolveItems: () => h.virtual.value.options, resolveActiveIndex: () => {
|
|
1043
|
+
var D, Y;
|
|
1044
|
+
return (Y = (D = h.activeOptionIndex.value) != null ? D : h.virtual.value.options.findIndex((Q) => {
|
|
1045
|
+
var z;
|
|
1046
|
+
return !((z = h.virtual.value) != null && z.disabled(Q));
|
|
1047
|
+
})) != null ? Y : null;
|
|
1035
1048
|
}, resolveDisabled: (D) => h.virtual.value.disabled(D), resolveId() {
|
|
1036
1049
|
throw new Error("Function not implemented.");
|
|
1037
|
-
} }),
|
|
1050
|
+
} }), g.value = S ?? 2;
|
|
1038
1051
|
return;
|
|
1039
1052
|
}
|
|
1040
|
-
let T =
|
|
1053
|
+
let T = b();
|
|
1041
1054
|
if (T.activeOptionIndex === null) {
|
|
1042
|
-
let D = T.options.findIndex((
|
|
1055
|
+
let D = T.options.findIndex((Y) => !Y.dataRef.disabled);
|
|
1043
1056
|
D !== -1 && (T.activeOptionIndex = D);
|
|
1044
1057
|
}
|
|
1045
|
-
let F = d ===
|
|
1046
|
-
p.value = 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 });
|
|
1059
|
+
p.value = F, g.value = S ?? 2, c.value = T.options;
|
|
1047
1060
|
});
|
|
1048
1061
|
}, selectOption(d) {
|
|
1049
1062
|
let f = c.value.find((T) => T.id === d);
|
|
@@ -1057,189 +1070,189 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1057
1070
|
let { dataRef: d } = c.value[h.activeOptionIndex.value];
|
|
1058
1071
|
M(d.value);
|
|
1059
1072
|
}
|
|
1060
|
-
h.goToOption(
|
|
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;
|
|
1067
1080
|
}
|
|
1068
1081
|
y && cancelAnimationFrame(y);
|
|
1069
|
-
let T =
|
|
1070
|
-
p.value === null && h.isSelected(f.value.value) && (T.activeOptionIndex = T.options.indexOf(S)), c.value = T.options, p.value = T.activeOptionIndex,
|
|
1071
|
-
let F =
|
|
1082
|
+
let T = b((F) => (F.push(S), F));
|
|
1083
|
+
p.value === null && h.isSelected(f.value.value) && (T.activeOptionIndex = T.options.indexOf(S)), c.value = T.options, p.value = T.activeOptionIndex, g.value = 2, T.options.some((F) => !V(F.dataRef.domRef)) && (y = requestAnimationFrame(() => {
|
|
1084
|
+
let F = b();
|
|
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
|
}
|
|
1079
|
-
let S =
|
|
1092
|
+
let S = b((T) => {
|
|
1080
1093
|
let F = T.findIndex((D) => D.id === d);
|
|
1081
1094
|
return F !== -1 && T.splice(F, 1), T;
|
|
1082
1095
|
});
|
|
1083
|
-
c.value = S.options, p.value = S.activeOptionIndex,
|
|
1096
|
+
c.value = S.options, p.value = S.activeOptionIndex, g.value = 2;
|
|
1084
1097
|
}, isSelected(d) {
|
|
1085
|
-
return ae(_.value, { 0: () => h.compare(
|
|
1098
|
+
return ae(_.value, { 0: () => h.compare(ee(h.value.value), ee(d)), 1: () => ee(h.value.value).some((f) => h.compare(ee(f), ee(d))) });
|
|
1086
1099
|
}, isActive(d) {
|
|
1087
1100
|
return p.value === h.calculateIndex(d);
|
|
1088
1101
|
} };
|
|
1089
|
-
|
|
1090
|
-
let
|
|
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 })));
|
|
1103
|
+
let k = E(() => {
|
|
1091
1104
|
var d;
|
|
1092
|
-
return (d =
|
|
1105
|
+
return (d = V(i)) == null ? void 0 : d.closest("form");
|
|
1093
1106
|
});
|
|
1094
|
-
return
|
|
1095
|
-
|
|
1096
|
-
if (!
|
|
1107
|
+
return ve(() => {
|
|
1108
|
+
N([k], () => {
|
|
1109
|
+
if (!k.value || e.defaultValue === void 0) return;
|
|
1097
1110
|
function d() {
|
|
1098
1111
|
h.change(e.defaultValue);
|
|
1099
1112
|
}
|
|
1100
|
-
return
|
|
1113
|
+
return k.value.addEventListener("reset", d), () => {
|
|
1101
1114
|
var f;
|
|
1102
|
-
(f =
|
|
1115
|
+
(f = k.value) == null || f.removeEventListener("reset", d);
|
|
1103
1116
|
};
|
|
1104
1117
|
}, { immediate: !0 });
|
|
1105
1118
|
}), () => {
|
|
1106
1119
|
var d, f, S;
|
|
1107
|
-
let { name: T, disabled: F, form: D, ...
|
|
1108
|
-
return Ee(
|
|
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 };
|
|
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 }) {
|
|
1112
1125
|
var n;
|
|
1113
|
-
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, a =
|
|
1126
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, a = me("ComboboxLabel");
|
|
1114
1127
|
function i() {
|
|
1115
1128
|
var s;
|
|
1116
|
-
(s =
|
|
1129
|
+
(s = V(a.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1117
1130
|
}
|
|
1118
1131
|
return () => {
|
|
1119
1132
|
let s = { open: a.comboboxState.value === 0, disabled: a.disabled.value }, { ...r } = e, u = { id: l, ref: a.labelRef, onClick: i };
|
|
1120
|
-
return
|
|
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
|
-
let a = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i =
|
|
1138
|
+
let a = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i = me("ComboboxButton");
|
|
1126
1139
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1127
1140
|
function s(c) {
|
|
1128
|
-
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()),
|
|
1141
|
+
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), oe(() => {
|
|
1129
1142
|
var p;
|
|
1130
|
-
return (p =
|
|
1143
|
+
return (p = V(i.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1131
1144
|
}));
|
|
1132
1145
|
}
|
|
1133
1146
|
function r(c) {
|
|
1134
1147
|
switch (c.key) {
|
|
1135
|
-
case
|
|
1136
|
-
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(),
|
|
1148
|
+
case J.ArrowDown:
|
|
1149
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), oe(() => {
|
|
1137
1150
|
var p;
|
|
1138
1151
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1139
1152
|
});
|
|
1140
1153
|
return;
|
|
1141
|
-
case
|
|
1142
|
-
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(),
|
|
1143
|
-
i.value.value || i.goToOption(
|
|
1144
|
-
})),
|
|
1154
|
+
case J.ArrowUp:
|
|
1155
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), oe(() => {
|
|
1156
|
+
i.value.value || i.goToOption(Z.Last);
|
|
1157
|
+
})), oe(() => {
|
|
1145
1158
|
var p;
|
|
1146
1159
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1147
1160
|
});
|
|
1148
1161
|
return;
|
|
1149
|
-
case
|
|
1162
|
+
case J.Escape:
|
|
1150
1163
|
if (i.comboboxState.value !== 0) return;
|
|
1151
|
-
c.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && c.stopPropagation(), i.closeCombobox(),
|
|
1164
|
+
c.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && c.stopPropagation(), i.closeCombobox(), oe(() => {
|
|
1152
1165
|
var p;
|
|
1153
1166
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1154
1167
|
});
|
|
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
|
-
let
|
|
1162
|
-
return
|
|
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 };
|
|
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 =
|
|
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);
|
|
1170
|
-
let y =
|
|
1171
|
-
y && (y.scrollTop = 0), s.goToOption(
|
|
1183
|
+
let y = V(s.optionsRef);
|
|
1184
|
+
y && (y.scrollTop = 0), s.goToOption(Z.Nothing);
|
|
1172
1185
|
}
|
|
1173
1186
|
let p = E(() => {
|
|
1174
1187
|
var y;
|
|
1175
1188
|
let M = s.value.value;
|
|
1176
|
-
return
|
|
1189
|
+
return V(s.inputRef) ? typeof e.displayValue < "u" && M !== void 0 ? (y = e.displayValue(M)) != null ? y : "" : typeof M == "string" ? M : "" : "";
|
|
1177
1190
|
});
|
|
1178
|
-
|
|
1179
|
-
|
|
1191
|
+
ve(() => {
|
|
1192
|
+
N([p, s.comboboxState, r], ([y, M], [C, h]) => {
|
|
1180
1193
|
if (u.value) return;
|
|
1181
|
-
let
|
|
1182
|
-
|
|
1194
|
+
let k = V(s.inputRef);
|
|
1195
|
+
k && ((h === 0 && M === 1 || y !== C) && (k.value = y), requestAnimationFrame(() => {
|
|
1183
1196
|
var d;
|
|
1184
|
-
if (u.value || !
|
|
1185
|
-
let { selectionStart: f, selectionEnd: S } =
|
|
1186
|
-
Math.abs((S ?? 0) - (f ?? 0)) === 0 && f === 0 &&
|
|
1197
|
+
if (u.value || !k || ((d = r.value) == null ? void 0 : d.activeElement) !== k) return;
|
|
1198
|
+
let { selectionStart: f, selectionEnd: S } = k;
|
|
1199
|
+
Math.abs((S ?? 0) - (f ?? 0)) === 0 && f === 0 && k.setSelectionRange(k.value.length, k.value.length);
|
|
1187
1200
|
}));
|
|
1188
|
-
}, { immediate: !0 }),
|
|
1201
|
+
}, { immediate: !0 }), N([s.comboboxState], ([y], [M]) => {
|
|
1189
1202
|
if (y === 0 && M === 1) {
|
|
1190
1203
|
if (u.value) return;
|
|
1191
|
-
let
|
|
1192
|
-
if (!
|
|
1193
|
-
let h =
|
|
1194
|
-
|
|
1204
|
+
let C = V(s.inputRef);
|
|
1205
|
+
if (!C) return;
|
|
1206
|
+
let h = C.value, { selectionStart: k, selectionEnd: d, selectionDirection: f } = C;
|
|
1207
|
+
C.value = "", C.value = h, f !== null ? C.setSelectionRange(k, d, f) : C.setSelectionRange(k, d);
|
|
1195
1208
|
}
|
|
1196
1209
|
});
|
|
1197
1210
|
});
|
|
1198
|
-
let
|
|
1211
|
+
let g = $(!1);
|
|
1199
1212
|
function w() {
|
|
1200
|
-
|
|
1213
|
+
g.value = !0;
|
|
1201
1214
|
}
|
|
1202
|
-
function
|
|
1203
|
-
|
|
1204
|
-
|
|
1215
|
+
function b() {
|
|
1216
|
+
Ne().nextFrame(() => {
|
|
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) {
|
|
1212
|
-
case
|
|
1213
|
-
if (u.value = !1, s.comboboxState.value !== 0 ||
|
|
1225
|
+
case J.Enter:
|
|
1226
|
+
if (u.value = !1, s.comboboxState.value !== 0 || g.value) return;
|
|
1214
1227
|
if (y.preventDefault(), y.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1215
1228
|
s.closeCombobox();
|
|
1216
1229
|
return;
|
|
1217
1230
|
}
|
|
1218
1231
|
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1219
1232
|
break;
|
|
1220
|
-
case
|
|
1221
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(
|
|
1222
|
-
case
|
|
1223
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(
|
|
1224
|
-
s.openCombobox(),
|
|
1225
|
-
s.value.value || s.goToOption(
|
|
1233
|
+
case J.ArrowDown:
|
|
1234
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(Z.Next), 1: () => s.openCombobox() });
|
|
1235
|
+
case J.ArrowUp:
|
|
1236
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(Z.Previous), 1: () => {
|
|
1237
|
+
s.openCombobox(), oe(() => {
|
|
1238
|
+
s.value.value || s.goToOption(Z.Last);
|
|
1226
1239
|
});
|
|
1227
1240
|
} });
|
|
1228
|
-
case
|
|
1241
|
+
case J.Home:
|
|
1229
1242
|
if (y.shiftKey) break;
|
|
1230
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1231
|
-
case
|
|
1232
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1233
|
-
case
|
|
1243
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.First);
|
|
1244
|
+
case J.PageUp:
|
|
1245
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.First);
|
|
1246
|
+
case J.End:
|
|
1234
1247
|
if (y.shiftKey) break;
|
|
1235
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1236
|
-
case
|
|
1237
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1238
|
-
case
|
|
1248
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.Last);
|
|
1249
|
+
case J.PageDown:
|
|
1250
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.Last);
|
|
1251
|
+
case J.Escape:
|
|
1239
1252
|
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1240
1253
|
y.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && y.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && c(), s.closeCombobox();
|
|
1241
1254
|
break;
|
|
1242
|
-
case
|
|
1255
|
+
case J.Tab:
|
|
1243
1256
|
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1244
1257
|
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1245
1258
|
break;
|
|
@@ -1249,35 +1262,35 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1249
1262
|
o("change", y), s.nullable.value && s.mode.value === 0 && y.target.value === "" && c(), s.openCombobox();
|
|
1250
1263
|
}
|
|
1251
1264
|
function x(y) {
|
|
1252
|
-
var M,
|
|
1253
|
-
let
|
|
1254
|
-
if (u.value = !1, !((
|
|
1255
|
-
}
|
|
1256
|
-
function
|
|
1257
|
-
var M,
|
|
1258
|
-
let
|
|
1259
|
-
(
|
|
1265
|
+
var M, C, h;
|
|
1266
|
+
let k = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1267
|
+
if (u.value = !1, !((C = V(s.optionsRef)) != null && C.contains(k)) && !((h = V(s.buttonRef)) != null && h.contains(k)) && s.comboboxState.value === 0) return y.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? c() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
|
|
1268
|
+
}
|
|
1269
|
+
function A(y) {
|
|
1270
|
+
var M, C, h;
|
|
1271
|
+
let k = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
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
|
|
1264
|
-
var y, M,
|
|
1265
|
-
return (h = (
|
|
1276
|
+
let P = E(() => {
|
|
1277
|
+
var y, M, C, h;
|
|
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
|
-
var y, M,
|
|
1269
|
-
let S = { open: s.comboboxState.value === 0 }, { displayValue: T, onChange: F, ...D } = e,
|
|
1270
|
-
return
|
|
1281
|
+
var y, M, C, h, k, d, f;
|
|
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 };
|
|
1283
|
+
return he({ ourProps: Y, theirProps: D, slot: S, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1271
1284
|
};
|
|
1272
|
-
} }),
|
|
1273
|
-
let l =
|
|
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 }) {
|
|
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,58 +1300,58 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1287
1300
|
}
|
|
1288
1301
|
return () => {
|
|
1289
1302
|
var u, c, p;
|
|
1290
|
-
let
|
|
1291
|
-
return
|
|
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
|
-
} }),
|
|
1294
|
-
let l =
|
|
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 }) {
|
|
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
|
-
|
|
1301
|
-
let x =
|
|
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(() => {
|
|
1314
|
+
let x = V(i);
|
|
1302
1315
|
x && (c == null || c.value.measureElement(x));
|
|
1303
1316
|
}), re(() => {
|
|
1304
|
-
l.comboboxState.value === 0 && r.value && (l.virtual.value || l.activationTrigger.value !== 0 &&
|
|
1305
|
-
var x,
|
|
1306
|
-
return (
|
|
1317
|
+
l.comboboxState.value === 0 && r.value && (l.virtual.value || l.activationTrigger.value !== 0 && oe(() => {
|
|
1318
|
+
var x, A;
|
|
1319
|
+
return (A = (x = V(i)) == null ? void 0 : x.scrollIntoView) == null ? void 0 : A.call(x, { block: "nearest" });
|
|
1307
1320
|
}));
|
|
1308
1321
|
});
|
|
1309
|
-
function
|
|
1310
|
-
x.preventDefault(), x.button ===
|
|
1311
|
-
var
|
|
1312
|
-
return (
|
|
1322
|
+
function g(x) {
|
|
1323
|
+
x.preventDefault(), x.button === Ht.Left && (s.value || (l.selectOption(a), Pt() || requestAnimationFrame(() => {
|
|
1324
|
+
var A;
|
|
1325
|
+
return (A = V(l.inputRef)) == null ? void 0 : A.focus({ preventScroll: !0 });
|
|
1313
1326
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1314
1327
|
}
|
|
1315
1328
|
function w() {
|
|
1316
1329
|
var x;
|
|
1317
|
-
if (e.disabled || (x = l.virtual.value) != null && x.disabled(e.value)) return l.goToOption(
|
|
1318
|
-
let
|
|
1319
|
-
l.goToOption(
|
|
1330
|
+
if (e.disabled || (x = l.virtual.value) != null && x.disabled(e.value)) return l.goToOption(Z.Nothing);
|
|
1331
|
+
let A = l.calculateIndex(e.value);
|
|
1332
|
+
l.goToOption(Z.Specific, A);
|
|
1320
1333
|
}
|
|
1321
|
-
let
|
|
1334
|
+
let b = E0();
|
|
1322
1335
|
function _(x) {
|
|
1323
|
-
|
|
1336
|
+
b.update(x);
|
|
1324
1337
|
}
|
|
1325
|
-
function
|
|
1326
|
-
var
|
|
1327
|
-
if (!
|
|
1328
|
-
let
|
|
1329
|
-
l.goToOption(
|
|
1338
|
+
function R(x) {
|
|
1339
|
+
var A;
|
|
1340
|
+
if (!b.wasMoved(x) || e.disabled || (A = l.virtual.value) != null && A.disabled(e.value) || r.value) return;
|
|
1341
|
+
let P = l.calculateIndex(e.value);
|
|
1342
|
+
l.goToOption(Z.Specific, P, 0);
|
|
1330
1343
|
}
|
|
1331
1344
|
function I(x) {
|
|
1332
|
-
var
|
|
1333
|
-
|
|
1345
|
+
var A;
|
|
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,
|
|
1337
|
-
return
|
|
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
|
|
1341
|
-
return
|
|
1353
|
+
function Z0(e, o) {
|
|
1354
|
+
return m(), O("svg", {
|
|
1342
1355
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1356
|
viewBox: "0 0 20 20",
|
|
1344
1357
|
fill: "currentColor",
|
|
@@ -1352,8 +1365,8 @@ function j0(e, o) {
|
|
|
1352
1365
|
})
|
|
1353
1366
|
]);
|
|
1354
1367
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return
|
|
1368
|
+
function W0(e, o) {
|
|
1369
|
+
return m(), O("svg", {
|
|
1357
1370
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1358
1371
|
viewBox: "0 0 20 20",
|
|
1359
1372
|
fill: "currentColor",
|
|
@@ -1367,8 +1380,8 @@ function H0(e, o) {
|
|
|
1367
1380
|
})
|
|
1368
1381
|
]);
|
|
1369
1382
|
}
|
|
1370
|
-
function
|
|
1371
|
-
return
|
|
1383
|
+
function G0(e, o) {
|
|
1384
|
+
return m(), O("svg", {
|
|
1372
1385
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1373
1386
|
viewBox: "0 0 20 20",
|
|
1374
1387
|
fill: "currentColor",
|
|
@@ -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
|
|
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
|
|
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
|
|
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;
|
|
@@ -1580,51 +1593,51 @@ function en(e, o, t, n) {
|
|
|
1580
1593
|
}, 4e4);
|
|
1581
1594
|
}
|
|
1582
1595
|
}
|
|
1583
|
-
function
|
|
1596
|
+
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
|
-
return
|
|
1605
|
+
return U("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1593
1606
|
}
|
|
1594
|
-
function
|
|
1595
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
1607
|
+
function n2(e) {
|
|
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
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
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) {
|
|
1623
|
-
|
|
1636
|
+
U("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
|
|
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,42 +1652,42 @@ 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];
|
|
1657
1670
|
}
|
|
1658
1671
|
}
|
|
1659
|
-
function
|
|
1672
|
+
function ne(e) {
|
|
1660
1673
|
return {
|
|
1661
1674
|
_custom: {
|
|
1662
1675
|
display: 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,20 +1722,20 @@ 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: [],
|
|
1716
1729
|
operations: [],
|
|
1717
1730
|
newValue: {}
|
|
1718
1731
|
}) : {
|
|
1719
|
-
operation:
|
|
1720
|
-
key:
|
|
1732
|
+
operation: ne(e.type),
|
|
1733
|
+
key: ne(e.key),
|
|
1721
1734
|
oldValue: e.oldValue,
|
|
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";
|
|
@@ -1734,19 +1747,19 @@ function cn(e) {
|
|
|
1734
1747
|
return "unknown";
|
|
1735
1748
|
}
|
|
1736
1749
|
}
|
|
1737
|
-
let
|
|
1738
|
-
const
|
|
1739
|
-
function
|
|
1740
|
-
|
|
1750
|
+
let xe = !0;
|
|
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
|
-
typeof t.now != "function" &&
|
|
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({
|
|
1750
1763
|
id: ce,
|
|
1751
1764
|
label: "Pinia 🍍",
|
|
1752
1765
|
color: 15064968
|
|
@@ -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
|
}
|
|
@@ -1791,7 +1804,7 @@ function fn(e, o) {
|
|
|
1791
1804
|
tooltip: 'Reset the state (with "$reset")',
|
|
1792
1805
|
action: (n) => {
|
|
1793
1806
|
const l = o._s.get(n);
|
|
1794
|
-
l ? typeof l.$reset != "function" ?
|
|
1807
|
+
l ? typeof l.$reset != "function" ? U(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), U(`Store "${n}" reset.`)) : U(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1795
1808
|
}
|
|
1796
1809
|
}
|
|
1797
1810
|
]
|
|
@@ -1801,12 +1814,12 @@ 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 ? {
|
|
1808
1821
|
_custom: {
|
|
1809
|
-
value:
|
|
1822
|
+
value: ee(s.$state),
|
|
1810
1823
|
actions: [
|
|
1811
1824
|
{
|
|
1812
1825
|
icon: "restore",
|
|
@@ -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,46 +1850,46 @@ 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
|
-
return
|
|
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("🍍")) {
|
|
1859
1872
|
const l = n.type.replace(/^🍍\s*/, ""), a = o._s.get(l);
|
|
1860
1873
|
if (!a)
|
|
1861
|
-
return
|
|
1874
|
+
return U(`store "${l}" not found`, "error");
|
|
1862
1875
|
const { path: i } = n;
|
|
1863
1876
|
if (i[0] !== "state")
|
|
1864
|
-
return
|
|
1877
|
+
return U(`Invalid path for store "${l}":
|
|
1865
1878
|
${i}
|
|
1866
1879
|
Only state can be modified.`);
|
|
1867
|
-
i[0] = "$state",
|
|
1880
|
+
i[0] = "$state", xe = !1, n.set(a, i, n.state.value), xe = !0;
|
|
1868
1881
|
}
|
|
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: {
|
|
@@ -1901,8 +1914,8 @@ function pn(e, o) {
|
|
|
1901
1914
|
title: "🛫 " + r,
|
|
1902
1915
|
subtitle: "start",
|
|
1903
1916
|
data: {
|
|
1904
|
-
store:
|
|
1905
|
-
action:
|
|
1917
|
+
store: ne(o.$id),
|
|
1918
|
+
action: ne(r),
|
|
1906
1919
|
args: u
|
|
1907
1920
|
},
|
|
1908
1921
|
groupId: c
|
|
@@ -1915,8 +1928,8 @@ function pn(e, o) {
|
|
|
1915
1928
|
title: "🛬 " + r,
|
|
1916
1929
|
subtitle: "end",
|
|
1917
1930
|
data: {
|
|
1918
|
-
store:
|
|
1919
|
-
action:
|
|
1931
|
+
store: ne(o.$id),
|
|
1932
|
+
action: ne(r),
|
|
1920
1933
|
args: u,
|
|
1921
1934
|
result: p
|
|
1922
1935
|
},
|
|
@@ -1932,8 +1945,8 @@ function pn(e, o) {
|
|
|
1932
1945
|
title: "💥 " + r,
|
|
1933
1946
|
subtitle: "end",
|
|
1934
1947
|
data: {
|
|
1935
|
-
store:
|
|
1936
|
-
action:
|
|
1948
|
+
store: ne(o.$id),
|
|
1949
|
+
action: ne(r),
|
|
1937
1950
|
args: u,
|
|
1938
1951
|
error: p
|
|
1939
1952
|
},
|
|
@@ -1942,8 +1955,8 @@ function pn(e, o) {
|
|
|
1942
1955
|
});
|
|
1943
1956
|
});
|
|
1944
1957
|
}, !0), o._customProperties.forEach((i) => {
|
|
1945
|
-
|
|
1946
|
-
t.notifyComponentUpdate(), t.sendInspectorState(W),
|
|
1958
|
+
N(() => L(o[i]), (s, r) => {
|
|
1959
|
+
t.notifyComponentUpdate(), t.sendInspectorState(W), xe && t.addTimelineEvent({
|
|
1947
1960
|
layerId: ce,
|
|
1948
1961
|
event: {
|
|
1949
1962
|
time: n(),
|
|
@@ -1958,12 +1971,12 @@ function pn(e, o) {
|
|
|
1958
1971
|
});
|
|
1959
1972
|
}, { deep: !0 });
|
|
1960
1973
|
}), o.$subscribe(({ events: i, type: s }, r) => {
|
|
1961
|
-
if (t.notifyComponentUpdate(), t.sendInspectorState(W), !
|
|
1974
|
+
if (t.notifyComponentUpdate(), t.sendInspectorState(W), !xe)
|
|
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)"] = {
|
|
@@ -1987,24 +2000,24 @@ function pn(e, o) {
|
|
|
1987
2000
|
title: "🔥 " + o.$id,
|
|
1988
2001
|
subtitle: "HMR update",
|
|
1989
2002
|
data: {
|
|
1990
|
-
store:
|
|
1991
|
-
info:
|
|
2003
|
+
store: ne(o.$id),
|
|
2004
|
+
info: ne("HMR update")
|
|
1992
2005
|
}
|
|
1993
2006
|
}
|
|
1994
2007
|
}), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1995
2008
|
});
|
|
1996
2009
|
const { $dispose: a } = o;
|
|
1997
2010
|
o.$dispose = () => {
|
|
1998
|
-
a(), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges &&
|
|
1999
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges &&
|
|
2011
|
+
a(), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges && U(`Disposed "${o.$id}" store 🗑`);
|
|
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
|
|
2004
|
-
const n = o.reduce((l, a) => (l[a] =
|
|
2015
|
+
let s2 = 0, ie;
|
|
2016
|
+
function xt(e, o, t) {
|
|
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
|
-
|
|
2026
|
-
n.apply(this, arguments),
|
|
2027
|
-
},
|
|
2038
|
+
ee(o)._hotUpdate = function(l) {
|
|
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
|
-
|
|
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,144 +2061,144 @@ 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) && !
|
|
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
|
-
function
|
|
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) && !
|
|
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
|
-
const { assign:
|
|
2097
|
-
function
|
|
2098
|
-
return !!(
|
|
2109
|
+
const { assign: X } = Object;
|
|
2110
|
+
function wt(e) {
|
|
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
|
-
) :
|
|
2109
|
-
return
|
|
2110
|
-
|
|
2120
|
+
dt($(l ? l() : {}).value)
|
|
2121
|
+
) : dt(t.state.value[e]);
|
|
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(() => {
|
|
2123
|
+
Ie(t);
|
|
2111
2124
|
const w = t._s.get(e);
|
|
2112
|
-
return i[
|
|
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
|
-
const s =
|
|
2132
|
+
const s = X({ actions: {} }, t);
|
|
2120
2133
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2121
2134
|
throw new Error("Pinia destroyed");
|
|
2122
2135
|
const r = {
|
|
2123
2136
|
deep: !0
|
|
2124
2137
|
// flush: 'post',
|
|
2125
2138
|
};
|
|
2126
|
-
process.env.NODE_ENV !== "production" && !
|
|
2127
|
-
u ? w = d : u == !1 && !
|
|
2139
|
+
process.env.NODE_ENV !== "production" && !qt && (r.onTrigger = (d) => {
|
|
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
|
-
let u, c, p = [],
|
|
2130
|
-
const
|
|
2131
|
-
!a && !
|
|
2142
|
+
let u, c, p = [], g = [], w;
|
|
2143
|
+
const b = n.state.value[e];
|
|
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 =
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
}), c = !0,
|
|
2159
|
+
const S = R = Symbol();
|
|
2160
|
+
oe().then(() => {
|
|
2161
|
+
R === S && (u = !0);
|
|
2162
|
+
}), c = !0, Ce(p, f, n.state.value[e]);
|
|
2150
2163
|
}
|
|
2151
2164
|
const x = a ? function() {
|
|
2152
2165
|
const { state: f } = t, S = f ? f() : {};
|
|
2153
2166
|
this.$patch((T) => {
|
|
2154
|
-
|
|
2167
|
+
X(T, S);
|
|
2155
2168
|
});
|
|
2156
2169
|
} : (
|
|
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
|
-
function
|
|
2163
|
-
i.stop(), p = [],
|
|
2175
|
+
function A() {
|
|
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 = [];
|
|
2169
|
-
function D(
|
|
2170
|
-
T.push(
|
|
2182
|
+
function D(z) {
|
|
2183
|
+
T.push(z);
|
|
2171
2184
|
}
|
|
2172
|
-
function
|
|
2173
|
-
F.push(
|
|
2185
|
+
function Y(z) {
|
|
2186
|
+
F.push(z);
|
|
2174
2187
|
}
|
|
2175
|
-
|
|
2188
|
+
Ce(g, {
|
|
2176
2189
|
args: S,
|
|
2177
2190
|
name: d,
|
|
2178
|
-
store:
|
|
2191
|
+
store: C,
|
|
2179
2192
|
after: D,
|
|
2180
|
-
onError:
|
|
2193
|
+
onError: Y
|
|
2181
2194
|
});
|
|
2182
|
-
let
|
|
2195
|
+
let Q;
|
|
2183
2196
|
try {
|
|
2184
|
-
|
|
2185
|
-
} catch (
|
|
2186
|
-
throw
|
|
2197
|
+
Q = f.apply(this && this.$id === e ? this : C, S);
|
|
2198
|
+
} catch (z) {
|
|
2199
|
+
throw Ce(F, z), z;
|
|
2187
2200
|
}
|
|
2188
|
-
return
|
|
2201
|
+
return Q instanceof Promise ? Q.then((z) => (Ce(T, z), z)).catch((z) => (Ce(F, z), Promise.reject(z))) : (Ce(T, Q), Q);
|
|
2189
2202
|
};
|
|
2190
2203
|
}
|
|
2191
2204
|
const y = /* @__PURE__ */ fe({
|
|
@@ -2197,21 +2210,21 @@ 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,
|
|
2208
2221
|
events: w
|
|
2209
2222
|
}, F);
|
|
2210
|
-
},
|
|
2223
|
+
}, X({}, r, f)));
|
|
2211
2224
|
return S;
|
|
2212
2225
|
},
|
|
2213
|
-
$dispose:
|
|
2214
|
-
},
|
|
2226
|
+
$dispose: A
|
|
2227
|
+
}, C = Tt(process.env.NODE_ENV !== "production" || Se ? X(
|
|
2215
2228
|
{
|
|
2216
2229
|
_hmrPayload: y,
|
|
2217
2230
|
_customProperties: fe(/* @__PURE__ */ new Set())
|
|
@@ -2221,58 +2234,58 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2221
2234
|
// must be added later
|
|
2222
2235
|
// setupStore
|
|
2223
2236
|
) : M);
|
|
2224
|
-
n._s.set(e,
|
|
2225
|
-
const
|
|
2226
|
-
for (const d in
|
|
2227
|
-
const f =
|
|
2228
|
-
if (
|
|
2229
|
-
process.env.NODE_ENV !== "production" && l ?
|
|
2237
|
+
n._s.set(e, C);
|
|
2238
|
+
const k = (n._a && n._a.runWithContext || xn)(() => n._e.run(() => (i = Lt()).run(o)));
|
|
2239
|
+
for (const d in k) {
|
|
2240
|
+
const f = k[d];
|
|
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 :
|
|
2232
|
-
|
|
2233
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
2244
|
+
const S = process.env.NODE_ENV !== "production" && l ? f : P(d, f);
|
|
2245
|
+
k[d] = S, process.env.NODE_ENV !== "production" && (y.actions[d] = f), s.actions[d] = f;
|
|
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,
|
|
2237
|
-
(
|
|
2249
|
+
) : f, ze && (k._getters || // @ts-expect-error: same
|
|
2250
|
+
(k._getters = fe([]))).push(d));
|
|
2238
2251
|
}
|
|
2239
|
-
if (
|
|
2252
|
+
if (X(C, k), X(ee(C), k), Object.defineProperty(C, "$state", {
|
|
2240
2253
|
get: () => process.env.NODE_ENV !== "production" && l ? _.value : n.state.value[e],
|
|
2241
2254
|
set: (d) => {
|
|
2242
2255
|
if (process.env.NODE_ENV !== "production" && l)
|
|
2243
2256
|
throw new Error("cannot set hotState");
|
|
2244
2257
|
I((f) => {
|
|
2245
|
-
|
|
2258
|
+
X(f, d);
|
|
2246
2259
|
});
|
|
2247
2260
|
}
|
|
2248
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
2249
|
-
|
|
2250
|
-
if (f in
|
|
2251
|
-
const S = d.$state[f], T =
|
|
2252
|
-
typeof S == "object" && pe(S) && pe(T) ?
|
|
2261
|
+
}), process.env.NODE_ENV !== "production" && (C._hotUpdate = fe((d) => {
|
|
2262
|
+
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2263
|
+
if (f in C.$state) {
|
|
2264
|
+
const S = d.$state[f], T = C.$state[f];
|
|
2265
|
+
typeof S == "object" && pe(S) && pe(T) ? a2(S, T) : d.$state[f] = T;
|
|
2253
2266
|
}
|
|
2254
|
-
|
|
2255
|
-
}), Object.keys(
|
|
2256
|
-
f in d.$state ||
|
|
2257
|
-
}), u = !1, c = !1, n.state.value[e] =
|
|
2267
|
+
Fe(C, f, qe(d.$state, f));
|
|
2268
|
+
}), Object.keys(C.$state).forEach((f) => {
|
|
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
|
-
E(() => (
|
|
2280
|
+
E(() => (Ie(n), S.call(C, C)))
|
|
2268
2281
|
) : S;
|
|
2269
|
-
|
|
2282
|
+
Fe(C, f, T);
|
|
2270
2283
|
}
|
|
2271
|
-
Object.keys(
|
|
2272
|
-
f in d._hmrPayload.getters ||
|
|
2273
|
-
}), Object.keys(
|
|
2274
|
-
f in d._hmrPayload.actions ||
|
|
2275
|
-
}),
|
|
2284
|
+
Object.keys(C._hmrPayload.getters).forEach((f) => {
|
|
2285
|
+
f in d._hmrPayload.getters || Ye(C, f);
|
|
2286
|
+
}), Object.keys(C._hmrPayload.actions).forEach((f) => {
|
|
2287
|
+
f in d._hmrPayload.actions || Ye(C, f);
|
|
2288
|
+
}), C._hmrPayload = d._hmrPayload, C._getters = d._getters, C._hotUpdating = !1;
|
|
2276
2289
|
})), Se) {
|
|
2277
2290
|
const d = {
|
|
2278
2291
|
writable: !0,
|
|
@@ -2281,30 +2294,30 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2281
2294
|
enumerable: !1
|
|
2282
2295
|
};
|
|
2283
2296
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((f) => {
|
|
2284
|
-
Object.defineProperty(
|
|
2297
|
+
Object.defineProperty(C, f, X({ value: C[f] }, d));
|
|
2285
2298
|
});
|
|
2286
2299
|
}
|
|
2287
2300
|
return n._p.forEach((d) => {
|
|
2288
2301
|
if (Se) {
|
|
2289
2302
|
const f = i.run(() => d({
|
|
2290
|
-
store:
|
|
2303
|
+
store: C,
|
|
2291
2304
|
app: n._a,
|
|
2292
2305
|
pinia: n,
|
|
2293
2306
|
options: s
|
|
2294
2307
|
}));
|
|
2295
|
-
Object.keys(f || {}).forEach((S) =>
|
|
2308
|
+
Object.keys(f || {}).forEach((S) => C._customProperties.add(S)), X(C, f);
|
|
2296
2309
|
} else
|
|
2297
|
-
|
|
2298
|
-
store:
|
|
2310
|
+
X(C, i.run(() => d({
|
|
2311
|
+
store: C,
|
|
2299
2312
|
app: n._a,
|
|
2300
2313
|
pinia: n,
|
|
2301
2314
|
options: s
|
|
2302
2315
|
})));
|
|
2303
|
-
}), process.env.NODE_ENV !== "production" &&
|
|
2316
|
+
}), process.env.NODE_ENV !== "production" && C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2304
2317
|
state: () => new MyClass()
|
|
2305
|
-
Found in store "${
|
|
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,24 +2325,24 @@ 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,
|
|
2326
|
-
r._hotUpdate(
|
|
2338
|
+
const p = "__hot:" + n, g = a ? tt(p, o, l, s, !0) : _t(p, X({}, l), s, !0);
|
|
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
|
-
const
|
|
2345
|
+
const g = p.proxy, w = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
2333
2346
|
w[n] = c;
|
|
2334
2347
|
}
|
|
2335
2348
|
}
|
|
@@ -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,32 +2371,32 @@ 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) => (
|
|
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,
|
|
2370
2383
|
as: "div",
|
|
2371
2384
|
class: "relative mt-1"
|
|
2372
2385
|
}, {
|
|
2373
|
-
default:
|
|
2374
|
-
|
|
2386
|
+
default: ke(() => [
|
|
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
|
-
|
|
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
|
-
default:
|
|
2386
|
-
|
|
2398
|
+
default: ke(() => [
|
|
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,22 +2404,22 @@ const Me = ze("loader", () => {
|
|
|
2391
2404
|
]),
|
|
2392
2405
|
_: 1
|
|
2393
2406
|
}, 512),
|
|
2394
|
-
|
|
2395
|
-
default:
|
|
2396
|
-
(
|
|
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" }, {
|
|
2408
|
+
default: ke(() => [
|
|
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
|
}, {
|
|
2400
|
-
default:
|
|
2413
|
+
default: ke(({ active: g, selected: w }) => [
|
|
2401
2414
|
v("li", {
|
|
2402
|
-
class:
|
|
2415
|
+
class: j([
|
|
2403
2416
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
2404
|
-
|
|
2417
|
+
g ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
2405
2418
|
])
|
|
2406
2419
|
}, [
|
|
2407
2420
|
v("span", {
|
|
2408
|
-
class:
|
|
2409
|
-
},
|
|
2421
|
+
class: j(["block truncate", w && "font-semibold"])
|
|
2422
|
+
}, K(p), 3)
|
|
2410
2423
|
], 2)
|
|
2411
2424
|
]),
|
|
2412
2425
|
_: 2
|
|
@@ -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: {
|
|
@@ -2441,16 +2454,16 @@ const Me = ze("loader", () => {
|
|
|
2441
2454
|
emits: ["swap"],
|
|
2442
2455
|
setup(e, { emit: o }) {
|
|
2443
2456
|
const t = Me(), n = E(() => t.isLoading("translation")), l = o;
|
|
2444
|
-
return (a, i) => e.isBidirect ? (
|
|
2457
|
+
return (a, i) => e.isBidirect ? (m(), O("button", {
|
|
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,49 +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 = {
|
|
2484
|
+
key: 0,
|
|
2485
|
+
class: "flex flex-col"
|
|
2486
|
+
}, Mn = { class: "flex" }, kn = { class: "grow flex flex-col" }, An = {
|
|
2471
2487
|
key: 0,
|
|
2472
|
-
class: "flex"
|
|
2473
|
-
},
|
|
2488
|
+
class: "flex mt-1 space-x-1"
|
|
2489
|
+
}, Vn = ["onClick"], Fn = { class: "grow flex flex-col" }, Rn = {
|
|
2490
|
+
key: 0,
|
|
2491
|
+
class: "flex mt-1 space-x-1"
|
|
2492
|
+
}, Pn = ["onClick"], Dn = {
|
|
2474
2493
|
__name: "Selects",
|
|
2475
2494
|
setup(e) {
|
|
2476
|
-
const o =
|
|
2477
|
-
function
|
|
2495
|
+
const o = Ze(), t = $([]), n = $([]);
|
|
2496
|
+
function l() {
|
|
2478
2497
|
o.swap();
|
|
2479
2498
|
}
|
|
2480
|
-
return (
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
"
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
},
|
|
2499
|
+
return ve(() => {
|
|
2500
|
+
t.value = Ae.getLocalStorage("recentSrc") || [], n.value = Ae.getLocalStorage("recentTarget") || [];
|
|
2501
|
+
}), N(
|
|
2502
|
+
() => o.src,
|
|
2503
|
+
(a) => {
|
|
2504
|
+
t.value.includes(a) || (t.value.unshift(a), t.value = t.value.slice(0, 3), Ae.setLocalStorage("recentSrc", t.value));
|
|
2505
|
+
}
|
|
2506
|
+
), N(
|
|
2507
|
+
() => o.target,
|
|
2508
|
+
(a) => {
|
|
2509
|
+
n.value.includes(a) || (n.value.unshift(a), n.value = n.value.slice(0, 3), Ae.setLocalStorage("recentTarget", n.value));
|
|
2510
|
+
}
|
|
2511
|
+
), (a, i) => L(o).languages ? (m(), O("div", Ln, [
|
|
2512
|
+
v("div", Mn, [
|
|
2513
|
+
v("div", kn, [
|
|
2514
|
+
B(St, {
|
|
2515
|
+
modelValue: L(o).src,
|
|
2516
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => L(o).src = s),
|
|
2517
|
+
languages: L(o).languages.src,
|
|
2518
|
+
class: "grow"
|
|
2519
|
+
}, null, 8, ["modelValue", "languages"]),
|
|
2520
|
+
t.value.length > 0 ? (m(), O("div", An, [
|
|
2521
|
+
(m(!0), O(G, null, te(t.value, (s) => (m(), O("button", {
|
|
2522
|
+
key: s,
|
|
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",
|
|
2524
|
+
onClick: (r) => L(o).src = s
|
|
2525
|
+
}, K(L(o).languages.src[s]), 9, Vn))), 128))
|
|
2526
|
+
])) : H("", !0)
|
|
2527
|
+
]),
|
|
2528
|
+
B(Tn, {
|
|
2529
|
+
isBidirect: L(o).src !== "auto",
|
|
2530
|
+
class: "grow-0 mx-3 mt-4 self-start",
|
|
2531
|
+
onSwap: l
|
|
2532
|
+
}, null, 8, ["isBidirect"]),
|
|
2533
|
+
v("div", Fn, [
|
|
2534
|
+
B(St, {
|
|
2535
|
+
modelValue: L(o).target,
|
|
2536
|
+
"onUpdate:modelValue": i[1] || (i[1] = (s) => L(o).target = s),
|
|
2537
|
+
languages: L(o).languages.target,
|
|
2538
|
+
class: "grow"
|
|
2539
|
+
}, null, 8, ["modelValue", "languages"]),
|
|
2540
|
+
n.value.length > 0 ? (m(), O("div", Rn, [
|
|
2541
|
+
(m(!0), O(G, null, te(n.value, (s) => (m(), O("button", {
|
|
2542
|
+
key: s,
|
|
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",
|
|
2544
|
+
onClick: (r) => L(o).target = s
|
|
2545
|
+
}, K(L(o).languages.target[s]), 9, Pn))), 128))
|
|
2546
|
+
])) : H("", !0)
|
|
2547
|
+
])
|
|
2548
|
+
])
|
|
2549
|
+
])) : H("", !0);
|
|
2550
|
+
}
|
|
2551
|
+
}, Nn = {
|
|
2501
2552
|
INPUT_MAX_LENGTH: 5e3,
|
|
2502
2553
|
INPUT_DEBOUNCE: 500
|
|
2503
|
-
},
|
|
2554
|
+
}, We = (e, o) => {
|
|
2504
2555
|
const t = e.__vccOpts || e;
|
|
2505
2556
|
for (const [n, l] of o)
|
|
2506
2557
|
t[n] = l;
|
|
2507
2558
|
return t;
|
|
2508
|
-
},
|
|
2509
|
-
function
|
|
2510
|
-
return
|
|
2559
|
+
}, Bn = {}, jn = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2560
|
+
function Hn(e, o) {
|
|
2561
|
+
return m(), O("span", jn);
|
|
2511
2562
|
}
|
|
2512
|
-
const
|
|
2563
|
+
const u2 = /* @__PURE__ */ We(Bn, [["render", Hn]]), c2 = Ue("tts", () => {
|
|
2513
2564
|
const e = $({
|
|
2514
2565
|
src: null,
|
|
2515
2566
|
target: null
|
|
@@ -2533,7 +2584,7 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2533
2584
|
get: t,
|
|
2534
2585
|
reset: n
|
|
2535
2586
|
};
|
|
2536
|
-
}),
|
|
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 = {
|
|
2537
2588
|
__name: "SpeakBtn",
|
|
2538
2589
|
props: {
|
|
2539
2590
|
type: {
|
|
@@ -2544,8 +2595,8 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2544
2595
|
},
|
|
2545
2596
|
emits: ["loadTTS"],
|
|
2546
2597
|
setup(e, { emit: o }) {
|
|
2547
|
-
const t =
|
|
2548
|
-
|
|
2598
|
+
const t = c2(), n = e, l = o, a = E(() => t.tts[n.type]), i = $(!1), s = new Audio();
|
|
2599
|
+
N(
|
|
2549
2600
|
a,
|
|
2550
2601
|
() => {
|
|
2551
2602
|
if (!a.value) {
|
|
@@ -2555,7 +2606,7 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2555
2606
|
u();
|
|
2556
2607
|
},
|
|
2557
2608
|
{ immediate: !0 }
|
|
2558
|
-
),
|
|
2609
|
+
), ot(() => {
|
|
2559
2610
|
c(), s.src = "";
|
|
2560
2611
|
});
|
|
2561
2612
|
function r() {
|
|
@@ -2575,110 +2626,110 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2575
2626
|
}
|
|
2576
2627
|
return s.onended = () => {
|
|
2577
2628
|
i.value = !1;
|
|
2578
|
-
}, (p,
|
|
2629
|
+
}, (p, g) => i.value ? (m(), O("button", {
|
|
2579
2630
|
key: 1,
|
|
2580
2631
|
class: "btn btn-xs btn-circle",
|
|
2581
|
-
onClick:
|
|
2632
|
+
onClick: ft(c, ["prevent"])
|
|
2582
2633
|
}, [
|
|
2583
2634
|
v("img", {
|
|
2584
|
-
src: L(
|
|
2635
|
+
src: L(Un),
|
|
2585
2636
|
alt: "Stop",
|
|
2586
2637
|
class: "w-4 transition-all duration-200"
|
|
2587
|
-
}, null, 8,
|
|
2588
|
-
])) : (
|
|
2638
|
+
}, null, 8, Gn)
|
|
2639
|
+
])) : (m(), O("button", {
|
|
2589
2640
|
key: 0,
|
|
2590
|
-
class:
|
|
2641
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2591
2642
|
{ "btn-ghost": !e.disabled },
|
|
2592
2643
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2593
2644
|
]]),
|
|
2594
2645
|
disabled: e.disabled,
|
|
2595
|
-
onClick:
|
|
2646
|
+
onClick: ft(r, ["prevent"])
|
|
2596
2647
|
}, [
|
|
2597
2648
|
v("img", {
|
|
2598
|
-
src: L(
|
|
2649
|
+
src: L(zn),
|
|
2599
2650
|
alt: "Play",
|
|
2600
|
-
class:
|
|
2601
|
-
}, null, 10,
|
|
2602
|
-
], 10,
|
|
2651
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2652
|
+
}, null, 10, Wn)
|
|
2653
|
+
], 10, Zn));
|
|
2603
2654
|
}
|
|
2604
|
-
},
|
|
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 = {
|
|
2605
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",
|
|
2606
2657
|
"data-tip": "Clear"
|
|
2607
|
-
},
|
|
2658
|
+
}, Yn = ["disabled"], Qn = ["src"], Xn = {
|
|
2608
2659
|
__name: "ClearBtn",
|
|
2609
2660
|
props: {
|
|
2610
2661
|
disabled: Boolean
|
|
2611
2662
|
},
|
|
2612
2663
|
setup(e) {
|
|
2613
|
-
return (o, t) => (
|
|
2664
|
+
return (o, t) => (m(), O("div", Kn, [
|
|
2614
2665
|
v("button", {
|
|
2615
|
-
class:
|
|
2666
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2616
2667
|
{ "btn-ghost": !e.disabled },
|
|
2617
2668
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2618
2669
|
]]),
|
|
2619
2670
|
disabled: e.disabled
|
|
2620
2671
|
}, [
|
|
2621
2672
|
v("img", {
|
|
2622
|
-
src: L(
|
|
2673
|
+
src: L(Jn),
|
|
2623
2674
|
alt: "Clear",
|
|
2624
|
-
class:
|
|
2625
|
-
}, null, 10,
|
|
2626
|
-
], 10,
|
|
2675
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2676
|
+
}, null, 10, Qn)
|
|
2677
|
+
], 10, Yn)
|
|
2627
2678
|
]));
|
|
2628
2679
|
}
|
|
2629
|
-
},
|
|
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 = {
|
|
2630
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",
|
|
2631
2682
|
"data-tip": "Favorite"
|
|
2632
|
-
},
|
|
2683
|
+
}, oo = ["disabled"], lo = ["src"], so = {
|
|
2633
2684
|
__name: "FavoriteBtn",
|
|
2634
2685
|
props: {
|
|
2635
2686
|
disabled: Boolean,
|
|
2636
2687
|
isFilled: Boolean
|
|
2637
2688
|
},
|
|
2638
2689
|
setup(e) {
|
|
2639
|
-
return (o, t) => (
|
|
2690
|
+
return (o, t) => (m(), O("div", no, [
|
|
2640
2691
|
v("button", {
|
|
2641
|
-
class:
|
|
2692
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2642
2693
|
{ "btn-ghost": !e.disabled },
|
|
2643
2694
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2644
2695
|
]]),
|
|
2645
2696
|
disabled: e.disabled
|
|
2646
2697
|
}, [
|
|
2647
2698
|
v("img", {
|
|
2648
|
-
src: e.isFilled ? L(
|
|
2699
|
+
src: e.isFilled ? L(eo) : L(to),
|
|
2649
2700
|
alt: "Favorite",
|
|
2650
|
-
class:
|
|
2651
|
-
}, null, 10,
|
|
2652
|
-
], 10,
|
|
2701
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2702
|
+
}, null, 10, lo)
|
|
2703
|
+
], 10, oo)
|
|
2653
2704
|
]));
|
|
2654
2705
|
}
|
|
2655
|
-
},
|
|
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 = {
|
|
2656
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",
|
|
2657
2708
|
"data-tip": "AI Translate"
|
|
2658
|
-
},
|
|
2709
|
+
}, uo = ["disabled"], co = ["src"], d2 = {
|
|
2659
2710
|
__name: "AIBtn",
|
|
2660
2711
|
props: {
|
|
2661
2712
|
disabled: Boolean,
|
|
2662
2713
|
isFilled: Boolean
|
|
2663
2714
|
},
|
|
2664
2715
|
setup(e) {
|
|
2665
|
-
return (o, t) => (
|
|
2716
|
+
return (o, t) => (m(), O("div", ro, [
|
|
2666
2717
|
v("button", {
|
|
2667
|
-
class:
|
|
2718
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2668
2719
|
{ "btn-ghost": !e.disabled },
|
|
2669
2720
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2670
2721
|
]]),
|
|
2671
2722
|
disabled: e.disabled
|
|
2672
2723
|
}, [
|
|
2673
2724
|
v("img", {
|
|
2674
|
-
src: e.isFilled ? L(
|
|
2725
|
+
src: e.isFilled ? L(ao) : L(io),
|
|
2675
2726
|
alt: "AI",
|
|
2676
|
-
class:
|
|
2677
|
-
}, null, 10,
|
|
2678
|
-
], 10,
|
|
2727
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2728
|
+
}, null, 10, co)
|
|
2729
|
+
], 10, uo)
|
|
2679
2730
|
]));
|
|
2680
2731
|
}
|
|
2681
|
-
},
|
|
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 = {
|
|
2682
2733
|
__name: "CopyBtn",
|
|
2683
2734
|
props: {
|
|
2684
2735
|
disabled: Boolean
|
|
@@ -2689,12 +2740,12 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2689
2740
|
o.value = "Copy";
|
|
2690
2741
|
}, 1e3);
|
|
2691
2742
|
};
|
|
2692
|
-
return (n, l) => (
|
|
2743
|
+
return (n, l) => (m(), O("div", {
|
|
2693
2744
|
class: "tooltip tooltip-bottom tooltip-small before:!bg-baseColor before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] before:!text-xs before:!py-1 before:!px-2",
|
|
2694
2745
|
"data-tip": o.value
|
|
2695
2746
|
}, [
|
|
2696
2747
|
v("button", {
|
|
2697
|
-
class:
|
|
2748
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2698
2749
|
{ "btn-ghost": !e.disabled },
|
|
2699
2750
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2700
2751
|
]]),
|
|
@@ -2702,17 +2753,17 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2702
2753
|
onClick: t
|
|
2703
2754
|
}, [
|
|
2704
2755
|
v("img", {
|
|
2705
|
-
src: L(
|
|
2756
|
+
src: L(fo),
|
|
2706
2757
|
alt: "Copy",
|
|
2707
|
-
class:
|
|
2708
|
-
}, null, 10,
|
|
2709
|
-
], 10,
|
|
2710
|
-
], 8,
|
|
2758
|
+
class: j(["w-3 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2759
|
+
}, null, 10, ho)
|
|
2760
|
+
], 10, vo)
|
|
2761
|
+
], 8, po));
|
|
2711
2762
|
}
|
|
2712
|
-
},
|
|
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 = {
|
|
2713
2764
|
key: 0,
|
|
2714
2765
|
class: "italic"
|
|
2715
|
-
},
|
|
2766
|
+
}, xo = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, yo = {
|
|
2716
2767
|
__name: "TranslationBtnGroup",
|
|
2717
2768
|
props: {
|
|
2718
2769
|
loading: {
|
|
@@ -2772,58 +2823,58 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2772
2823
|
emits: ["clear", "favorite", "loadTTS", "aiTranslate", "copy"],
|
|
2773
2824
|
setup(e, { emit: o }) {
|
|
2774
2825
|
const t = e, n = o;
|
|
2775
|
-
return (l, a) => (
|
|
2776
|
-
t.src ? (
|
|
2826
|
+
return (l, a) => (m(), O("div", bo, [
|
|
2827
|
+
t.src ? (m(), q(qn, {
|
|
2777
2828
|
key: 0,
|
|
2778
2829
|
type: t.type,
|
|
2779
2830
|
onLoadTTS: a[0] || (a[0] = (i) => n("loadTTS"))
|
|
2780
|
-
}, null, 8, ["type"])) :
|
|
2781
|
-
v("div",
|
|
2782
|
-
|
|
2783
|
-
e.phonetic ? (
|
|
2831
|
+
}, null, 8, ["type"])) : H("", !0),
|
|
2832
|
+
v("div", go, [
|
|
2833
|
+
C2(K(e.srcLabel) + " ", 1),
|
|
2834
|
+
e.phonetic ? (m(), O("span", Co, "- [" + K(t.phonetic) + "]", 1)) : H("", !0)
|
|
2784
2835
|
]),
|
|
2785
|
-
t.loading ? (
|
|
2836
|
+
t.loading ? (m(), q(u2, {
|
|
2786
2837
|
key: 1,
|
|
2787
2838
|
class: "absolute right-6 top-2"
|
|
2788
|
-
})) :
|
|
2789
|
-
v("div",
|
|
2790
|
-
e.hasClearBtn && e.src ? (
|
|
2839
|
+
})) : H("", !0),
|
|
2840
|
+
v("div", xo, [
|
|
2841
|
+
e.hasClearBtn && e.src ? (m(), q(Xn, {
|
|
2791
2842
|
key: 0,
|
|
2792
2843
|
onClick: a[1] || (a[1] = (i) => n("clear")),
|
|
2793
2844
|
disabled: e.loading
|
|
2794
|
-
}, null, 8, ["disabled"])) :
|
|
2795
|
-
e.src && !e.hasDictionary && e.hasAIBtn ? (
|
|
2845
|
+
}, null, 8, ["disabled"])) : H("", !0),
|
|
2846
|
+
e.src && !e.hasDictionary && e.hasAIBtn ? (m(), q(d2, {
|
|
2796
2847
|
key: 1,
|
|
2797
2848
|
isFilled: e.isAITranslate,
|
|
2798
2849
|
onClick: a[2] || (a[2] = (i) => n("aiTranslate")),
|
|
2799
2850
|
disabled: e.loading
|
|
2800
|
-
}, null, 8, ["isFilled", "disabled"])) :
|
|
2801
|
-
e.src && e.hasFavoriteBtn ? (
|
|
2851
|
+
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2852
|
+
e.src && e.hasFavoriteBtn ? (m(), q(so, {
|
|
2802
2853
|
key: 2,
|
|
2803
2854
|
isFilled: e.isFavorite,
|
|
2804
2855
|
onClick: a[3] || (a[3] = (i) => n("favorite")),
|
|
2805
2856
|
disabled: e.loading
|
|
2806
|
-
}, null, 8, ["isFilled", "disabled"])) :
|
|
2807
|
-
e.src && e.hasCopyBtn ? (
|
|
2857
|
+
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2858
|
+
e.src && e.hasCopyBtn ? (m(), q(mo, {
|
|
2808
2859
|
key: 3,
|
|
2809
2860
|
onClick: a[4] || (a[4] = (i) => n("copy")),
|
|
2810
2861
|
disabled: e.loading
|
|
2811
|
-
}, null, 8, ["disabled"])) :
|
|
2862
|
+
}, null, 8, ["disabled"])) : H("", !0)
|
|
2812
2863
|
])
|
|
2813
2864
|
]));
|
|
2814
2865
|
}
|
|
2815
|
-
},
|
|
2866
|
+
}, f2 = /* @__PURE__ */ We(yo, [["__scopeId", "data-v-c9ef8858"]]), be = Ue("translation", () => {
|
|
2816
2867
|
const e = $(null), o = $(null), t = $(null), n = $({
|
|
2817
2868
|
src: null,
|
|
2818
2869
|
target: null
|
|
2819
2870
|
}), l = $(null), a = $([]), i = $([]), s = $([]), r = $([]), u = $({
|
|
2820
2871
|
src: null,
|
|
2821
2872
|
target: null
|
|
2822
|
-
}), c =
|
|
2873
|
+
}), c = Ze(), p = E(() => c.getLabel(e.value)), g = E(() => c.getLabel(o.value));
|
|
2823
2874
|
function w(_) {
|
|
2824
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;
|
|
2825
2876
|
}
|
|
2826
|
-
function
|
|
2877
|
+
function b() {
|
|
2827
2878
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2828
2879
|
src: null,
|
|
2829
2880
|
target: null
|
|
@@ -2836,7 +2887,7 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2836
2887
|
src: e,
|
|
2837
2888
|
srcLabel: p,
|
|
2838
2889
|
target: o,
|
|
2839
|
-
targetLabel:
|
|
2890
|
+
targetLabel: g,
|
|
2840
2891
|
phonetic: n,
|
|
2841
2892
|
text: t,
|
|
2842
2893
|
result: l,
|
|
@@ -2846,20 +2897,20 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2846
2897
|
examples: r,
|
|
2847
2898
|
tts: u,
|
|
2848
2899
|
init: w,
|
|
2849
|
-
reset:
|
|
2900
|
+
reset: b
|
|
2850
2901
|
};
|
|
2851
2902
|
});
|
|
2852
|
-
function
|
|
2853
|
-
return
|
|
2903
|
+
function wo(e) {
|
|
2904
|
+
return kt() ? (nt(e), !0) : !1;
|
|
2854
2905
|
}
|
|
2855
|
-
function
|
|
2906
|
+
function je(e) {
|
|
2856
2907
|
return typeof e == "function" ? e() : L(e);
|
|
2857
2908
|
}
|
|
2858
|
-
const
|
|
2909
|
+
const _o = typeof window < "u" && typeof document < "u";
|
|
2859
2910
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2860
|
-
const
|
|
2911
|
+
const Et = () => {
|
|
2861
2912
|
};
|
|
2862
|
-
function
|
|
2913
|
+
function So(e, o) {
|
|
2863
2914
|
function t(...n) {
|
|
2864
2915
|
return new Promise((l, a) => {
|
|
2865
2916
|
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(a);
|
|
@@ -2867,13 +2918,13 @@ function po(e, o) {
|
|
|
2867
2918
|
}
|
|
2868
2919
|
return t;
|
|
2869
2920
|
}
|
|
2870
|
-
function
|
|
2871
|
-
let t, n, l =
|
|
2921
|
+
function Eo(e, o = {}) {
|
|
2922
|
+
let t, n, l = Et;
|
|
2872
2923
|
const a = (s) => {
|
|
2873
|
-
clearTimeout(s), l(), l =
|
|
2924
|
+
clearTimeout(s), l(), l = Et;
|
|
2874
2925
|
};
|
|
2875
2926
|
return (s) => {
|
|
2876
|
-
const r =
|
|
2927
|
+
const r = je(e), u = je(o.maxWait);
|
|
2877
2928
|
return t && a(t), r <= 0 || u !== void 0 && u <= 0 ? (n && (a(n), n = null), Promise.resolve(s())) : new Promise((c, p) => {
|
|
2878
2929
|
l = o.rejectOnCancel ? p : c, u && !n && (n = setTimeout(() => {
|
|
2879
2930
|
t && a(t), n = null, c(s());
|
|
@@ -2883,52 +2934,52 @@ function vo(e, o = {}) {
|
|
|
2883
2934
|
});
|
|
2884
2935
|
};
|
|
2885
2936
|
}
|
|
2886
|
-
function
|
|
2887
|
-
return
|
|
2888
|
-
|
|
2937
|
+
function Oo(e, o = 200, t = {}) {
|
|
2938
|
+
return So(
|
|
2939
|
+
Eo(o, t),
|
|
2889
2940
|
e
|
|
2890
2941
|
);
|
|
2891
2942
|
}
|
|
2892
|
-
function
|
|
2943
|
+
function Ot(e) {
|
|
2893
2944
|
var o;
|
|
2894
|
-
const t =
|
|
2945
|
+
const t = je(e);
|
|
2895
2946
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2896
2947
|
}
|
|
2897
|
-
const
|
|
2898
|
-
function
|
|
2899
|
-
const e = $(!1), o =
|
|
2900
|
-
return o &&
|
|
2948
|
+
const $o = _o ? window : void 0;
|
|
2949
|
+
function Io() {
|
|
2950
|
+
const e = $(!1), o = Mt();
|
|
2951
|
+
return o && ve(() => {
|
|
2901
2952
|
e.value = !0;
|
|
2902
2953
|
}, o), e;
|
|
2903
2954
|
}
|
|
2904
|
-
function
|
|
2905
|
-
const o =
|
|
2955
|
+
function To(e) {
|
|
2956
|
+
const o = Io();
|
|
2906
2957
|
return E(() => (o.value, !!e()));
|
|
2907
2958
|
}
|
|
2908
|
-
function
|
|
2909
|
-
const { window: n =
|
|
2959
|
+
function Lo(e, o, t = {}) {
|
|
2960
|
+
const { window: n = $o, ...l } = t;
|
|
2910
2961
|
let a;
|
|
2911
|
-
const i =
|
|
2962
|
+
const i = To(() => n && "ResizeObserver" in n), s = () => {
|
|
2912
2963
|
a && (a.disconnect(), a = void 0);
|
|
2913
|
-
}, r = E(() => Array.isArray(e) ? e.map((p) =>
|
|
2964
|
+
}, r = E(() => Array.isArray(e) ? e.map((p) => Ot(p)) : [Ot(e)]), u = N(
|
|
2914
2965
|
r,
|
|
2915
2966
|
(p) => {
|
|
2916
2967
|
if (s(), i.value && n) {
|
|
2917
2968
|
a = new ResizeObserver(o);
|
|
2918
|
-
for (const
|
|
2919
|
-
|
|
2969
|
+
for (const g of p)
|
|
2970
|
+
g && a.observe(g, l);
|
|
2920
2971
|
}
|
|
2921
2972
|
},
|
|
2922
2973
|
{ immediate: !0, flush: "post" }
|
|
2923
2974
|
), c = () => {
|
|
2924
2975
|
s(), u();
|
|
2925
2976
|
};
|
|
2926
|
-
return
|
|
2977
|
+
return wo(c), {
|
|
2927
2978
|
isSupported: i,
|
|
2928
2979
|
stop: c
|
|
2929
2980
|
};
|
|
2930
2981
|
}
|
|
2931
|
-
function
|
|
2982
|
+
function p2(e) {
|
|
2932
2983
|
var o;
|
|
2933
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);
|
|
2934
2985
|
function i() {
|
|
@@ -2936,18 +2987,18 @@ function f2(e) {
|
|
|
2936
2987
|
if (!t.value)
|
|
2937
2988
|
return;
|
|
2938
2989
|
let r = "";
|
|
2939
|
-
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;
|
|
2940
2991
|
}
|
|
2941
|
-
return
|
|
2992
|
+
return N([n, t], () => oe(i), { immediate: !0 }), N(a, () => {
|
|
2942
2993
|
var s;
|
|
2943
2994
|
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2944
|
-
}),
|
|
2995
|
+
}), Lo(t, () => i()), e != null && e.watch && N(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2945
2996
|
textarea: t,
|
|
2946
2997
|
input: n,
|
|
2947
2998
|
triggerResize: i
|
|
2948
2999
|
};
|
|
2949
3000
|
}
|
|
2950
|
-
const
|
|
3001
|
+
const Mo = { class: "bg-white relative z-10 border rounded-md" }, ko = {
|
|
2951
3002
|
__name: "TranslationInput",
|
|
2952
3003
|
props: {
|
|
2953
3004
|
text: {
|
|
@@ -2957,45 +3008,45 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
2957
3008
|
},
|
|
2958
3009
|
emits: ["change", "clear", "loadTTS"],
|
|
2959
3010
|
setup(e, { emit: o }) {
|
|
2960
|
-
const t =
|
|
2961
|
-
var
|
|
2962
|
-
return (
|
|
2963
|
-
}), { textarea: r } =
|
|
3011
|
+
const t = be(), n = e, l = $(""), a = E(() => t.src), i = E(() => t.srcLabel), s = E(() => {
|
|
3012
|
+
var b;
|
|
3013
|
+
return (b = t.phonetic) == null ? void 0 : b.src;
|
|
3014
|
+
}), { textarea: r } = p2({ input: l, styleProp: "minHeight" }), u = o, c = Oo(() => {
|
|
2964
3015
|
u("change", l.value);
|
|
2965
|
-
},
|
|
3016
|
+
}, Nn.INPUT_DEBOUNCE);
|
|
2966
3017
|
function p() {
|
|
2967
3018
|
if (!l.value) {
|
|
2968
|
-
|
|
3019
|
+
g();
|
|
2969
3020
|
return;
|
|
2970
3021
|
}
|
|
2971
3022
|
c();
|
|
2972
3023
|
}
|
|
2973
|
-
function
|
|
3024
|
+
function g() {
|
|
2974
3025
|
u("clear"), l.value = "", r.value.focus();
|
|
2975
3026
|
}
|
|
2976
3027
|
async function w() {
|
|
2977
|
-
await
|
|
3028
|
+
await oe(), r.value.select();
|
|
2978
3029
|
}
|
|
2979
|
-
return
|
|
3030
|
+
return N(
|
|
2980
3031
|
() => n.text,
|
|
2981
|
-
(
|
|
2982
|
-
l.value !==
|
|
3032
|
+
(b) => {
|
|
3033
|
+
l.value !== b && w(), l.value = b;
|
|
2983
3034
|
}
|
|
2984
|
-
), (
|
|
2985
|
-
|
|
3035
|
+
), (b, _) => (m(), O("div", Mo, [
|
|
3036
|
+
B(f2, {
|
|
2986
3037
|
src: a.value,
|
|
2987
3038
|
srcLabel: i.value,
|
|
2988
3039
|
type: "src",
|
|
2989
3040
|
phonetic: s.value,
|
|
2990
3041
|
hasClearBtn: !0,
|
|
2991
|
-
onClear:
|
|
2992
|
-
onLoadTTS: _[0] || (_[0] = (
|
|
3042
|
+
onClear: g,
|
|
3043
|
+
onLoadTTS: _[0] || (_[0] = (R) => u("loadTTS")),
|
|
2993
3044
|
class: "mb-2"
|
|
2994
3045
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
2995
3046
|
At(v("textarea", {
|
|
2996
3047
|
ref_key: "textarea",
|
|
2997
3048
|
ref: r,
|
|
2998
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
3049
|
+
"onUpdate:modelValue": _[1] || (_[1] = (R) => l.value = R),
|
|
2999
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",
|
|
3000
3051
|
autofocus: "",
|
|
3001
3052
|
rows: "2",
|
|
@@ -3011,10 +3062,10 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3011
3062
|
])
|
|
3012
3063
|
]));
|
|
3013
3064
|
}
|
|
3014
|
-
},
|
|
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 = {
|
|
3015
3066
|
key: 0,
|
|
3016
|
-
class: "w-full flex items-center justify-end absolute -bottom-
|
|
3017
|
-
},
|
|
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 = {
|
|
3018
3069
|
__name: "TranslationResult",
|
|
3019
3070
|
props: {
|
|
3020
3071
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -3024,23 +3075,23 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3024
3075
|
},
|
|
3025
3076
|
emits: ["loadTTS", "favorite", "aiTranslate", "copy"],
|
|
3026
3077
|
setup(e, { emit: o }) {
|
|
3027
|
-
const t =
|
|
3078
|
+
const t = be(), n = E(() => t.result), l = E(() => t.target), a = E(() => t.targetLabel), i = E(() => {
|
|
3028
3079
|
var w;
|
|
3029
3080
|
return (w = t.phonetic) == null ? void 0 : w.target;
|
|
3030
3081
|
}), s = E(() => {
|
|
3031
3082
|
var w;
|
|
3032
3083
|
return !!((w = t.dictionary) != null && w.length);
|
|
3033
|
-
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } =
|
|
3034
|
-
return (w,
|
|
3035
|
-
class:
|
|
3084
|
+
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } = p2({ input: n, styleProp: "minHeight" }), g = o;
|
|
3085
|
+
return (w, b) => (m(), O("div", {
|
|
3086
|
+
class: j([
|
|
3036
3087
|
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
3037
3088
|
{
|
|
3038
3089
|
"bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient border border-white": e.isAITranslate && !u.value
|
|
3039
3090
|
}
|
|
3040
3091
|
])
|
|
3041
3092
|
}, [
|
|
3042
|
-
v("div",
|
|
3043
|
-
|
|
3093
|
+
v("div", Fo, [
|
|
3094
|
+
B(f2, {
|
|
3044
3095
|
loading: u.value,
|
|
3045
3096
|
src: l.value,
|
|
3046
3097
|
srcLabel: a.value,
|
|
@@ -3052,17 +3103,17 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3052
3103
|
isAITranslate: e.isAITranslate,
|
|
3053
3104
|
hasDictionary: s.value,
|
|
3054
3105
|
phonetic: i.value,
|
|
3055
|
-
onFavorite:
|
|
3056
|
-
onLoadTTS:
|
|
3057
|
-
onAiTranslate:
|
|
3058
|
-
onCopy:
|
|
3106
|
+
onFavorite: b[0] || (b[0] = (_) => g("favorite")),
|
|
3107
|
+
onLoadTTS: b[1] || (b[1] = (_) => g("loadTTS")),
|
|
3108
|
+
onAiTranslate: b[2] || (b[2] = (_) => g("aiTranslate")),
|
|
3109
|
+
onCopy: b[3] || (b[3] = (_) => g("copy")),
|
|
3059
3110
|
class: "mb-2"
|
|
3060
3111
|
}, null, 8, ["loading", "src", "srcLabel", "hasFavoriteBtn", "hasAIBtn", "isFavorite", "isAITranslate", "hasDictionary", "phonetic"]),
|
|
3061
|
-
v("div",
|
|
3112
|
+
v("div", Ro, [
|
|
3062
3113
|
At(v("textarea", {
|
|
3063
3114
|
ref_key: "textarea",
|
|
3064
3115
|
ref: c,
|
|
3065
|
-
"onUpdate:modelValue":
|
|
3116
|
+
"onUpdate:modelValue": b[4] || (b[4] = (_) => ye(p) ? p.value = _ : null),
|
|
3066
3117
|
class: "w-full outline-none px-5 pr-8 bg-transparent text-gray-800 resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
3067
3118
|
readonly: "",
|
|
3068
3119
|
rows: "2",
|
|
@@ -3072,65 +3123,68 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3072
3123
|
])
|
|
3073
3124
|
])
|
|
3074
3125
|
]),
|
|
3075
|
-
e.isAITranslate ? (
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3126
|
+
e.isAITranslate ? (m(), O("div", Po, [
|
|
3127
|
+
Do,
|
|
3128
|
+
B(d2, {
|
|
3129
|
+
disabled: "",
|
|
3130
|
+
isFilled: ""
|
|
3131
|
+
})
|
|
3132
|
+
])) : H("", !0)
|
|
3079
3133
|
], 2));
|
|
3080
3134
|
}
|
|
3081
|
-
},
|
|
3135
|
+
}, Bo = /* @__PURE__ */ We(No, [["__scopeId", "data-v-7c33874e"]]), jo = { class: "btn btn-sm btn-circle btn-ghost" }, Ge = {
|
|
3082
3136
|
__name: "ToggleBtn",
|
|
3083
3137
|
props: {
|
|
3084
3138
|
isExpanded: Boolean
|
|
3085
3139
|
},
|
|
3086
3140
|
setup(e) {
|
|
3087
3141
|
const o = e;
|
|
3088
|
-
return (t, n) => (
|
|
3089
|
-
o.isExpanded ? (
|
|
3142
|
+
return (t, n) => (m(), O("button", jo, [
|
|
3143
|
+
o.isExpanded ? (m(), q(L(G0), {
|
|
3090
3144
|
key: 0,
|
|
3091
3145
|
class: "w-7 text-gray-400"
|
|
3092
|
-
})) : (
|
|
3146
|
+
})) : (m(), q(L(Z0), {
|
|
3093
3147
|
key: 1,
|
|
3094
3148
|
class: "w-7 text-gray-400"
|
|
3095
3149
|
}))
|
|
3096
3150
|
]));
|
|
3097
3151
|
}
|
|
3098
|
-
},
|
|
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 = {
|
|
3099
3153
|
__name: "Dictionary",
|
|
3100
3154
|
emits: ["translate"],
|
|
3101
3155
|
setup(e, { emit: o }) {
|
|
3102
|
-
const t = $(!0), n =
|
|
3156
|
+
const t = $(!0), n = be(), l = Ze(), a = E(() => n.dictionary), i = o, s = () => {
|
|
3103
3157
|
t.value = !t.value;
|
|
3104
3158
|
}, r = (u) => {
|
|
3105
3159
|
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
3106
3160
|
};
|
|
3107
|
-
return (u, c) => (
|
|
3108
|
-
v("div",
|
|
3109
|
-
v("div",
|
|
3110
|
-
|
|
3111
|
-
|
|
3161
|
+
return (u, c) => (m(), O("div", Ho, [
|
|
3162
|
+
v("div", zo, [
|
|
3163
|
+
v("div", Uo, [
|
|
3164
|
+
Zo,
|
|
3165
|
+
B(Ge, {
|
|
3112
3166
|
isExpanded: t.value,
|
|
3113
3167
|
onClick: s
|
|
3114
3168
|
}, null, 8, ["isExpanded"])
|
|
3115
3169
|
]),
|
|
3116
3170
|
v("div", {
|
|
3117
|
-
class:
|
|
3171
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3118
3172
|
}, [
|
|
3119
3173
|
v("ul", null, [
|
|
3120
|
-
(
|
|
3121
|
-
key: `${p.pos}-${
|
|
3174
|
+
(m(!0), O(G, null, te(a.value, (p, g) => (m(), O("li", {
|
|
3175
|
+
key: `${p.pos}-${g}`,
|
|
3122
3176
|
class: "mb-2"
|
|
3123
3177
|
}, [
|
|
3124
|
-
v("h5",
|
|
3125
|
-
v("ul",
|
|
3126
|
-
(
|
|
3127
|
-
key: `${w.word}-${
|
|
3178
|
+
v("h5", Wo, K(p.pos), 1),
|
|
3179
|
+
v("ul", Go, [
|
|
3180
|
+
(m(!0), O(G, null, te(p.items, (w, b) => (m(), O("li", {
|
|
3181
|
+
key: `${w.word}-${b}`
|
|
3128
3182
|
}, [
|
|
3129
3183
|
v("span", {
|
|
3130
3184
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3131
3185
|
onClick: (_) => r(w.word)
|
|
3132
|
-
},
|
|
3133
|
-
v("small",
|
|
3186
|
+
}, K(w.word), 9, qo),
|
|
3187
|
+
v("small", Jo, " - " + K(w.reverse_translation.join(", ")), 1)
|
|
3134
3188
|
]))), 128))
|
|
3135
3189
|
])
|
|
3136
3190
|
]))), 128))
|
|
@@ -3139,41 +3193,41 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3139
3193
|
])
|
|
3140
3194
|
]));
|
|
3141
3195
|
}
|
|
3142
|
-
},
|
|
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 = {
|
|
3143
3197
|
key: 0,
|
|
3144
3198
|
class: "italic"
|
|
3145
|
-
},
|
|
3199
|
+
}, sl = {
|
|
3146
3200
|
__name: "Definition",
|
|
3147
3201
|
setup(e) {
|
|
3148
|
-
const o = $(!0), t =
|
|
3202
|
+
const o = $(!0), t = be(), n = E(() => t.definitions), l = () => {
|
|
3149
3203
|
o.value = !o.value;
|
|
3150
3204
|
};
|
|
3151
|
-
return (a, i) => (
|
|
3152
|
-
v("div",
|
|
3153
|
-
v("div",
|
|
3154
|
-
|
|
3155
|
-
|
|
3205
|
+
return (a, i) => (m(), O("div", Yo, [
|
|
3206
|
+
v("div", Qo, [
|
|
3207
|
+
v("div", Xo, [
|
|
3208
|
+
el,
|
|
3209
|
+
B(Ge, {
|
|
3156
3210
|
isExpanded: o.value,
|
|
3157
3211
|
onClick: l
|
|
3158
3212
|
}, null, 8, ["isExpanded"])
|
|
3159
3213
|
]),
|
|
3160
3214
|
v("div", {
|
|
3161
|
-
class:
|
|
3215
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3162
3216
|
}, [
|
|
3163
3217
|
v("ul", null, [
|
|
3164
|
-
(
|
|
3218
|
+
(m(!0), O(G, null, te(n.value, (s, r) => (m(), O("li", {
|
|
3165
3219
|
key: `${s.pos}-${r}`,
|
|
3166
3220
|
class: "mb-2"
|
|
3167
3221
|
}, [
|
|
3168
|
-
v("h5",
|
|
3169
|
-
v("ul",
|
|
3170
|
-
(
|
|
3222
|
+
v("h5", tl, K(s.pos), 1),
|
|
3223
|
+
v("ul", nl, [
|
|
3224
|
+
(m(!0), O(G, null, te(s.items, (u, c) => (m(), O("li", {
|
|
3171
3225
|
key: `${u.gloss}-${c}`,
|
|
3172
3226
|
class: "mb-1"
|
|
3173
3227
|
}, [
|
|
3174
|
-
v("span", null,
|
|
3175
|
-
|
|
3176
|
-
u.example ? (
|
|
3228
|
+
v("span", null, K(u.gloss), 1),
|
|
3229
|
+
ol,
|
|
3230
|
+
u.example ? (m(), O("small", ll, '"' + K(u.example) + '"', 1)) : H("", !0)
|
|
3177
3231
|
]))), 128))
|
|
3178
3232
|
])
|
|
3179
3233
|
]))), 128))
|
|
@@ -3182,72 +3236,72 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3182
3236
|
])
|
|
3183
3237
|
]));
|
|
3184
3238
|
}
|
|
3185
|
-
},
|
|
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 = {
|
|
3186
3240
|
__name: "Example",
|
|
3187
3241
|
setup(e) {
|
|
3188
|
-
const o = $(!0), t =
|
|
3242
|
+
const o = $(!0), t = be(), n = E(() => t.examples), l = () => {
|
|
3189
3243
|
o.value = !o.value;
|
|
3190
3244
|
};
|
|
3191
|
-
return (a, i) => (
|
|
3192
|
-
v("div",
|
|
3193
|
-
v("div",
|
|
3194
|
-
|
|
3195
|
-
|
|
3245
|
+
return (a, i) => (m(), O("div", al, [
|
|
3246
|
+
v("div", il, [
|
|
3247
|
+
v("div", rl, [
|
|
3248
|
+
ul,
|
|
3249
|
+
B(Ge, {
|
|
3196
3250
|
isExpanded: o.value,
|
|
3197
3251
|
onClick: l
|
|
3198
3252
|
}, null, 8, ["isExpanded"])
|
|
3199
3253
|
]),
|
|
3200
3254
|
v("div", {
|
|
3201
|
-
class:
|
|
3255
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3202
3256
|
}, [
|
|
3203
|
-
v("ul",
|
|
3204
|
-
(
|
|
3257
|
+
v("ul", cl, [
|
|
3258
|
+
(m(!0), O(G, null, te(n.value, (s, r) => (m(), O("li", {
|
|
3205
3259
|
key: `${s.definition_id}-${r}`,
|
|
3206
3260
|
innerHTML: s
|
|
3207
|
-
}, null, 8,
|
|
3261
|
+
}, null, 8, dl))), 128))
|
|
3208
3262
|
])
|
|
3209
3263
|
], 2)
|
|
3210
3264
|
])
|
|
3211
3265
|
]));
|
|
3212
3266
|
}
|
|
3213
|
-
},
|
|
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 = {
|
|
3214
3268
|
__name: "Synonyms",
|
|
3215
3269
|
emits: ["translate"],
|
|
3216
3270
|
setup(e, { emit: o }) {
|
|
3217
|
-
const t = $(!0), n =
|
|
3271
|
+
const t = $(!0), n = be(), l = E(() => n.synonyms), a = o, i = () => {
|
|
3218
3272
|
t.value = !t.value;
|
|
3219
3273
|
}, s = (r) => {
|
|
3220
3274
|
a("translate", r), window.scrollTo(0, 0);
|
|
3221
3275
|
};
|
|
3222
|
-
return (r, u) => (
|
|
3223
|
-
v("div",
|
|
3224
|
-
v("div",
|
|
3225
|
-
|
|
3226
|
-
|
|
3276
|
+
return (r, u) => (m(), O("div", pl, [
|
|
3277
|
+
v("div", vl, [
|
|
3278
|
+
v("div", hl, [
|
|
3279
|
+
ml,
|
|
3280
|
+
B(Ge, {
|
|
3227
3281
|
isExpanded: t.value,
|
|
3228
3282
|
onClick: i
|
|
3229
3283
|
}, null, 8, ["isExpanded"])
|
|
3230
3284
|
]),
|
|
3231
3285
|
v("div", {
|
|
3232
|
-
class:
|
|
3286
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3233
3287
|
}, [
|
|
3234
3288
|
v("ul", null, [
|
|
3235
|
-
(
|
|
3289
|
+
(m(!0), O(G, null, te(l.value, (c, p) => (m(), O("li", {
|
|
3236
3290
|
key: `${c.pos}-${p}`,
|
|
3237
3291
|
class: "mb-2"
|
|
3238
3292
|
}, [
|
|
3239
|
-
v("h5",
|
|
3240
|
-
v("ul",
|
|
3241
|
-
(
|
|
3242
|
-
key: `${
|
|
3293
|
+
v("h5", bl, K(c.pos), 1),
|
|
3294
|
+
v("ul", gl, [
|
|
3295
|
+
(m(!0), O(G, null, te(c.items, (g, w) => (m(), O("li", {
|
|
3296
|
+
key: `${g.word}-${w}`,
|
|
3243
3297
|
class: "mb-2"
|
|
3244
3298
|
}, [
|
|
3245
|
-
v("div",
|
|
3246
|
-
(
|
|
3247
|
-
key: `${
|
|
3299
|
+
v("div", Cl, [
|
|
3300
|
+
(m(!0), O(G, null, te(g.synonym, (b, _) => (m(), O("span", {
|
|
3301
|
+
key: `${b}-${_}`,
|
|
3248
3302
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3249
|
-
onClick: (
|
|
3250
|
-
},
|
|
3303
|
+
onClick: (R) => s(b)
|
|
3304
|
+
}, K(b), 9, xl))), 128))
|
|
3251
3305
|
])
|
|
3252
3306
|
]))), 128))
|
|
3253
3307
|
])
|
|
@@ -3257,34 +3311,34 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3257
3311
|
])
|
|
3258
3312
|
]));
|
|
3259
3313
|
}
|
|
3260
|
-
},
|
|
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 = {
|
|
3261
3315
|
__name: "ChevronAIBtn",
|
|
3262
3316
|
props: {
|
|
3263
3317
|
disabled: Boolean,
|
|
3264
3318
|
isExpanded: Boolean
|
|
3265
3319
|
},
|
|
3266
3320
|
setup(e) {
|
|
3267
|
-
return (o, t) => (
|
|
3268
|
-
class:
|
|
3321
|
+
return (o, t) => (m(), O("button", {
|
|
3322
|
+
class: j(["btn btn-sm btn-circle", [
|
|
3269
3323
|
{ "btn-ghost": !e.disabled },
|
|
3270
3324
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
3271
3325
|
]]),
|
|
3272
3326
|
disabled: e.disabled
|
|
3273
3327
|
}, [
|
|
3274
3328
|
v("img", {
|
|
3275
|
-
src: e.isExpanded ? L(
|
|
3329
|
+
src: e.isExpanded ? L(wl) : L(_l),
|
|
3276
3330
|
alt: "AI",
|
|
3277
|
-
class:
|
|
3278
|
-
}, null, 10,
|
|
3279
|
-
], 10,
|
|
3331
|
+
class: j(["w-6 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
3332
|
+
}, null, 10, El)
|
|
3333
|
+
], 10, Sl));
|
|
3280
3334
|
}
|
|
3281
|
-
},
|
|
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 = {
|
|
3282
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",
|
|
3283
3337
|
"data-tip": "AI Summarize"
|
|
3284
|
-
},
|
|
3338
|
+
}, kl = {
|
|
3285
3339
|
key: 0,
|
|
3286
3340
|
class: "text-textCustom list-none list-outside my-2"
|
|
3287
|
-
},
|
|
3341
|
+
}, Al = ["innerHTML"], Vl = {
|
|
3288
3342
|
__name: "AIExplanation",
|
|
3289
3343
|
props: {
|
|
3290
3344
|
isAIExplain: {
|
|
@@ -3304,21 +3358,21 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3304
3358
|
};
|
|
3305
3359
|
return (i, s) => {
|
|
3306
3360
|
var r, u;
|
|
3307
|
-
return
|
|
3308
|
-
class:
|
|
3361
|
+
return m(), O("div", {
|
|
3362
|
+
class: j(["card border bg-white rounded-lg mb-8", [
|
|
3309
3363
|
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
3310
3364
|
{
|
|
3311
3365
|
"bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient border border-white": e.isAIExplain
|
|
3312
3366
|
}
|
|
3313
3367
|
]])
|
|
3314
3368
|
}, [
|
|
3315
|
-
v("div",
|
|
3316
|
-
v("div",
|
|
3317
|
-
|
|
3318
|
-
v("div",
|
|
3319
|
-
n.value ? (
|
|
3320
|
-
v("div",
|
|
3321
|
-
|
|
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, {
|
|
3322
3376
|
isExpanded: e.isAIExplain,
|
|
3323
3377
|
disabled: n.value,
|
|
3324
3378
|
onClick: a
|
|
@@ -3327,40 +3381,40 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3327
3381
|
])
|
|
3328
3382
|
]),
|
|
3329
3383
|
v("div", {
|
|
3330
|
-
class:
|
|
3384
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", e.isAIExplain ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3331
3385
|
}, [
|
|
3332
|
-
(r = e.explanation) != null && r.result ? (
|
|
3333
|
-
(
|
|
3334
|
-
`)) || [], (c, p) => (
|
|
3386
|
+
(r = e.explanation) != null && r.result ? (m(), O("ul", kl, [
|
|
3387
|
+
(m(!0), O(G, null, te(((u = e.explanation) == null ? void 0 : u.result.split(`
|
|
3388
|
+
`)) || [], (c, p) => (m(), O("li", {
|
|
3335
3389
|
key: `${c}-${p}`,
|
|
3336
3390
|
innerHTML: c
|
|
3337
|
-
}, null, 8,
|
|
3338
|
-
])) :
|
|
3391
|
+
}, null, 8, Al))), 128))
|
|
3392
|
+
])) : H("", !0)
|
|
3339
3393
|
], 2)
|
|
3340
3394
|
])
|
|
3341
3395
|
], 2);
|
|
3342
3396
|
};
|
|
3343
3397
|
}
|
|
3344
3398
|
};
|
|
3345
|
-
function
|
|
3399
|
+
function Fl() {
|
|
3346
3400
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3347
3401
|
}
|
|
3348
|
-
function
|
|
3402
|
+
function Rl() {
|
|
3349
3403
|
document.documentElement.removeAttribute("dir");
|
|
3350
3404
|
}
|
|
3351
|
-
const
|
|
3352
|
-
supportRTL:
|
|
3353
|
-
removeRTL:
|
|
3354
|
-
},
|
|
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 = {
|
|
3355
3409
|
key: 0,
|
|
3356
3410
|
class: "w-full my-4"
|
|
3357
|
-
},
|
|
3411
|
+
}, Wl = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Gl = {
|
|
3358
3412
|
key: 1,
|
|
3359
3413
|
class: "w-full my-4"
|
|
3360
|
-
},
|
|
3414
|
+
}, ql = {
|
|
3361
3415
|
key: 1,
|
|
3362
3416
|
class: "text-textCustom italic font-medium"
|
|
3363
|
-
},
|
|
3417
|
+
}, Yl = {
|
|
3364
3418
|
__name: "Popup",
|
|
3365
3419
|
props: {
|
|
3366
3420
|
opt: {
|
|
@@ -3422,23 +3476,23 @@ const Ot = {
|
|
|
3422
3476
|
"copy"
|
|
3423
3477
|
],
|
|
3424
3478
|
setup(e, { emit: o }) {
|
|
3425
|
-
const t =
|
|
3479
|
+
const t = Cn(), n = be(t), l = c2(t), a = Ze(t), i = Me(t), s = e, r = o, u = $(""), c = () => {
|
|
3426
3480
|
const I = s.opt.target;
|
|
3427
|
-
|
|
3481
|
+
Pl.includes(I) ? $t.supportRTL() : $t.removeRTL();
|
|
3428
3482
|
};
|
|
3429
|
-
|
|
3483
|
+
N(
|
|
3430
3484
|
() => s.translation,
|
|
3431
3485
|
(I) => {
|
|
3432
3486
|
i.setLoading("translation", !1), I && (u.value = I.text, n.init(I), l.reset());
|
|
3433
3487
|
},
|
|
3434
3488
|
{ immediate: !0 }
|
|
3435
|
-
),
|
|
3489
|
+
), N(
|
|
3436
3490
|
[() => s.explanation, () => s.isAIExplain],
|
|
3437
3491
|
([I]) => {
|
|
3438
3492
|
I != null && I.result && i.setLoading("aiExplanation", !1);
|
|
3439
3493
|
},
|
|
3440
3494
|
{ immediate: !0, deep: !0 }
|
|
3441
|
-
),
|
|
3495
|
+
), N(
|
|
3442
3496
|
() => s.tts,
|
|
3443
3497
|
(I) => {
|
|
3444
3498
|
if (!I) {
|
|
@@ -3448,62 +3502,62 @@ const Ot = {
|
|
|
3448
3502
|
l.set(I);
|
|
3449
3503
|
},
|
|
3450
3504
|
{ immediate: !0 }
|
|
3451
|
-
),
|
|
3505
|
+
), N([() => s.opt, () => s.languages], ([I, x]) => {
|
|
3452
3506
|
a.init(I, x), c();
|
|
3453
|
-
}),
|
|
3454
|
-
r("opt", { src: I, target: x }),
|
|
3455
|
-
}),
|
|
3507
|
+
}), N([() => a.src, () => a.target], ([I, x]) => {
|
|
3508
|
+
r("opt", { src: I, target: x }), b(u.value);
|
|
3509
|
+
}), ve(() => {
|
|
3456
3510
|
a.init(s.opt, s.languages), c();
|
|
3457
3511
|
});
|
|
3458
3512
|
function p() {
|
|
3459
3513
|
u.value = "", s.isAITranslate && _(), n.reset();
|
|
3460
3514
|
}
|
|
3461
|
-
function
|
|
3462
|
-
|
|
3515
|
+
function g(I) {
|
|
3516
|
+
b(I);
|
|
3463
3517
|
}
|
|
3464
3518
|
function w(I) {
|
|
3465
3519
|
const x = I === "src" ? n.text : n.result;
|
|
3466
3520
|
r("loadTTS", { type: I, data: x });
|
|
3467
3521
|
}
|
|
3468
|
-
function
|
|
3522
|
+
function b(I, x = a.src, A = a.target) {
|
|
3469
3523
|
I && (u.value = I, i.setLoading("translation", !0), r("translate", {
|
|
3470
3524
|
src: x,
|
|
3471
|
-
target:
|
|
3525
|
+
target: A,
|
|
3472
3526
|
text: I
|
|
3473
3527
|
}));
|
|
3474
3528
|
}
|
|
3475
3529
|
function _() {
|
|
3476
3530
|
s.isAITranslate || i.setLoading("translation", !0), r("aiTranslate");
|
|
3477
3531
|
}
|
|
3478
|
-
function
|
|
3532
|
+
function R() {
|
|
3479
3533
|
s.isAIExplain || i.setLoading("aiExplanation", !0), r("aiExplain");
|
|
3480
3534
|
}
|
|
3481
3535
|
return (I, x) => {
|
|
3482
|
-
var
|
|
3483
|
-
return
|
|
3484
|
-
v("div",
|
|
3485
|
-
|
|
3536
|
+
var A, P, y, M, C;
|
|
3537
|
+
return m(), O("div", Dl, [
|
|
3538
|
+
v("div", Nl, [
|
|
3539
|
+
B(H2, {
|
|
3486
3540
|
onReader: x[0] || (x[0] = (h) => r("reader")),
|
|
3487
3541
|
onSettings: x[1] || (x[1] = (h) => r("settings")),
|
|
3488
3542
|
onFullScreen: x[2] || (x[2] = (h) => r("fullscreen")),
|
|
3489
3543
|
onStarList: x[3] || (x[3] = (h) => r("starList"))
|
|
3490
3544
|
})
|
|
3491
3545
|
]),
|
|
3492
|
-
v("div",
|
|
3493
|
-
|
|
3494
|
-
v("div",
|
|
3495
|
-
v("div",
|
|
3496
|
-
|
|
3546
|
+
v("div", Bl, [
|
|
3547
|
+
B(Dn, { class: "mt-3 mb-0" }),
|
|
3548
|
+
v("div", jl, [
|
|
3549
|
+
v("div", Hl, [
|
|
3550
|
+
B(Ao, {
|
|
3497
3551
|
text: u.value,
|
|
3498
|
-
onChange:
|
|
3552
|
+
onChange: g,
|
|
3499
3553
|
onClear: p,
|
|
3500
3554
|
onLoadTTS: x[4] || (x[4] = (h) => w("src")),
|
|
3501
3555
|
class: "flex-grow flex flex-col"
|
|
3502
3556
|
}, null, 8, ["text"])
|
|
3503
3557
|
]),
|
|
3504
|
-
|
|
3505
|
-
v("div",
|
|
3506
|
-
|
|
3558
|
+
zl,
|
|
3559
|
+
v("div", Ul, [
|
|
3560
|
+
B(Bo, {
|
|
3507
3561
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3508
3562
|
isAITranslateFeatureEnabled: e.isAITranslateFeatureEnabled,
|
|
3509
3563
|
isAITranslate: e.isAITranslate,
|
|
@@ -3516,34 +3570,34 @@ const Ot = {
|
|
|
3516
3570
|
}, null, 8, ["isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isAITranslate", "isFavorite"])
|
|
3517
3571
|
])
|
|
3518
3572
|
]),
|
|
3519
|
-
s.translation ? (
|
|
3520
|
-
((
|
|
3521
|
-
|
|
3573
|
+
s.translation ? (m(), O(G, { key: 0 }, [
|
|
3574
|
+
((A = L(n).result) == null ? void 0 : A.length) > e.aiExplainMinLength ? (m(), O("div", Zl, [
|
|
3575
|
+
B(Vl, {
|
|
3522
3576
|
isAIExplain: e.isAIExplain,
|
|
3523
3577
|
explanation: e.explanation,
|
|
3524
|
-
onAiExplain:
|
|
3578
|
+
onAiExplain: R
|
|
3525
3579
|
}, null, 8, ["isAIExplain", "explanation"])
|
|
3526
|
-
])) :
|
|
3527
|
-
v("div",
|
|
3528
|
-
(
|
|
3580
|
+
])) : H("", !0),
|
|
3581
|
+
v("div", Wl, [
|
|
3582
|
+
(P = L(n).dictionary) != null && P.length ? (m(), q(Ko, {
|
|
3529
3583
|
key: 0,
|
|
3530
|
-
onTranslate:
|
|
3531
|
-
})) :
|
|
3532
|
-
(y = L(n).definitions) != null && y.length ? (
|
|
3533
|
-
(M = L(n).synonyms) != null && M.length ? (
|
|
3584
|
+
onTranslate: b
|
|
3585
|
+
})) : H("", !0),
|
|
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, {
|
|
3534
3588
|
key: 2,
|
|
3535
|
-
onTranslate:
|
|
3536
|
-
})) :
|
|
3589
|
+
onTranslate: b
|
|
3590
|
+
})) : H("", !0)
|
|
3537
3591
|
]),
|
|
3538
|
-
(
|
|
3539
|
-
|
|
3540
|
-
])) :
|
|
3541
|
-
], 64)) : (
|
|
3592
|
+
(C = L(n).examples) != null && C.length ? (m(), O("div", Gl, [
|
|
3593
|
+
B(fl)
|
|
3594
|
+
])) : H("", !0)
|
|
3595
|
+
], 64)) : (m(), O("span", ql, "Service unavailable"))
|
|
3542
3596
|
])
|
|
3543
3597
|
]);
|
|
3544
3598
|
};
|
|
3545
3599
|
}
|
|
3546
3600
|
};
|
|
3547
3601
|
export {
|
|
3548
|
-
|
|
3602
|
+
Yl as default
|
|
3549
3603
|
};
|