@ddict/popup 1.0.21 → 1.0.22

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.umd.js CHANGED
@@ -1,17 +1,17 @@
1
- (function(G,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(G=typeof globalThis<"u"?globalThis:G||self,n(G.Popup={},G.Vue))})(this,function(G,n){"use strict";const Vt="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",Tt="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",Nt="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",It="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",Lt="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",oe=(e,l)=>{const t=e.__vccOpts||e;for(const[o,s]of l)t[o]=s;return t},le=e=>(n.pushScopeId("data-v-5c07032a"),e=e(),n.popScopeId(),e),Bt={class:"flex justify-between"},Rt=le(()=>n.createElementVNode("div",{class:"flex flex-row"},[n.createElementVNode("img",{src:Vt,alt:"Vue logo",class:"w-24"})],-1)),Mt={class:"flex"},Pt={class:"tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]","data-tip":"Saved Words"},Dt=[le(()=>n.createElementVNode("img",{src:Tt,alt:"Star list",class:"w-7"},null,-1))],Ft={class:"tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]","data-tip":"Reader"},At=[le(()=>n.createElementVNode("img",{src:Nt,alt:"Reader",class:"w-7"},null,-1))],jt={class:"tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%] md:hidden","data-tip":"Full screen"},Ht=[le(()=>n.createElementVNode("img",{src:It,alt:"Full screen",class:"w-7"},null,-1))],zt={class:"tooltip tooltip-bottom tooltip-custom before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary before:!top-[90%]","data-tip":"Settings"},Ut=[le(()=>n.createElementVNode("img",{src:Lt,alt:"Setting",class:"w-7"},null,-1))],Zt=oe({__name:"Header",emits:["settings","fullScreen","reader","starList"],setup(e,{emit:l}){const t=l;return(o,s)=>(n.openBlock(),n.createElementBlock("div",Bt,[Rt,n.createElementVNode("div",Mt,[n.createElementVNode("div",Pt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[0]||(s[0]=a=>t("starList"))},Dt)]),n.createElementVNode("div",Ft,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[1]||(s[1]=a=>t("reader"))},At)]),n.createElementVNode("div",jt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[2]||(s[2]=a=>t("fullScreen"))},Ht)]),n.createElementVNode("div",zt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[3]||(s[3]=a=>t("settings"))},Ut)])])]))}},[["__scopeId","data-v-5c07032a"]]);function se(e,l,t){let o=t.initialDeps??[],s;return()=>{var a,i,r,c;let d;t.key&&((a=t.debug)!=null&&a.call(t))&&(d=Date.now());const u=e();if(!(u.length!==o.length||u.some((_,x)=>o[x]!==_)))return s;o=u;let b;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(b=Date.now()),s=l(...u),t.key&&((r=t.debug)!=null&&r.call(t))){const _=Math.round((Date.now()-d)*100)/100,x=Math.round((Date.now()-b)*100)/100,h=x/16,E=(N,S)=>{for(N=String(N);N.length<S;)N=" "+N;return N};console.info(`%c⏱ ${E(x,5)} /${E(_,5)} ms`,`
1
+ (function(G,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(G=typeof globalThis<"u"?globalThis:G||self,n(G.Popup={},G.Vue))})(this,function(G,n){"use strict";const $t="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",Vt="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",Tt="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",Nt="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",It="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",Lt={class:"flex justify-between"},Bt=n.createElementVNode("div",{class:"flex flex-row"},[n.createElementVNode("img",{src:$t,alt:"Vue logo",class:"w-24"})],-1),Rt={class:"flex"},Mt={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%]","data-tip":"Saved Words"},Pt=[n.createElementVNode("img",{src:Vt,alt:"Star list",class:"w-7"},null,-1)],Dt={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%]","data-tip":"Reader"},Ft=[n.createElementVNode("img",{src:Tt,alt:"Reader",class:"w-7"},null,-1)],At={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","data-tip":"Full screen"},jt=[n.createElementVNode("img",{src:Nt,alt:"Full screen",class:"w-7"},null,-1)],Ht={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%]","data-tip":"Settings"},zt=[n.createElementVNode("img",{src:It,alt:"Setting",class:"w-7"},null,-1)],Ut={__name:"Header",emits:["settings","fullScreen","reader","starList"],setup(e,{emit:l}){const t=l;return(o,s)=>(n.openBlock(),n.createElementBlock("div",Lt,[Bt,n.createElementVNode("div",Rt,[n.createElementVNode("div",Mt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[0]||(s[0]=a=>t("starList"))},Pt)]),n.createElementVNode("div",Dt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[1]||(s[1]=a=>t("reader"))},Ft)]),n.createElementVNode("div",At,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[2]||(s[2]=a=>t("fullScreen"))},jt)]),n.createElementVNode("div",Ht,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[3]||(s[3]=a=>t("settings"))},zt)])])]))}};function oe(e,l,t){let o=t.initialDeps??[],s;return()=>{var a,i,r,c;let d;t.key&&((a=t.debug)!=null&&a.call(t))&&(d=Date.now());const u=e();if(!(u.length!==o.length||u.some((C,_)=>o[_]!==C)))return s;o=u;let b;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(b=Date.now()),s=l(...u),t.key&&((r=t.debug)!=null&&r.call(t))){const C=Math.round((Date.now()-d)*100)/100,_=Math.round((Date.now()-b)*100)/100,h=_/16,E=(N,S)=>{for(N=String(N);N.length<S;)N=" "+N;return N};console.info(`%c⏱ ${E(_,5)} /${E(C,5)} ms`,`
2
2
  font-size: .6rem;
3
3
  font-weight: bold;
4
- color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(c=t==null?void 0:t.onChange)==null||c.call(t,s),s}}function Oe(e,l){if(e===void 0)throw new Error("Unexpected undefined");return e}const Wt=(e,l)=>Math.abs(e-l)<1,Gt=(e,l,t)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>l.apply(this,s),t)}},qt=e=>e,Jt=e=>{const l=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=l;s<=t;s++)o.push(s);return o},Kt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;const s=i=>{const{width:r,height:c}=i;l({width:Math.round(r),height:Math.round(c)})};if(s(t.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(i=>{const r=i[0];if(r!=null&&r.borderBoxSize){const c=r.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(t.getBoundingClientRect())});return a.observe(t,{box:"border-box"}),()=>{a.unobserve(t)}},Pe={passive:!0},Yt=typeof window>"u"?!0:"onscrollend"in window,Qt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;let s=0;const a=Yt?()=>{}:Gt(o,()=>{l(s,!1)},e.options.isScrollingResetDelay),i=d=>()=>{s=t[e.options.horizontal?"scrollLeft":"scrollTop"],a(),l(s,d)},r=i(!0),c=i(!1);return c(),t.addEventListener("scroll",r,Pe),t.addEventListener("scrollend",c,Pe),()=>{t.removeEventListener("scroll",r),t.removeEventListener("scrollend",c)}},Xt=(e,l,t)=>{if(l!=null&&l.borderBoxSize){const o=l.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},en=(e,{adjustments:l=0,behavior:t},o)=>{var s,a;const i=e+l;(a=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[o.options.horizontal?"left":"top"]:i,behavior:t})};class tn{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const o=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var s;return(s=o())==null?void 0:s.disconnect()},observe:s=>{var a;return(a=o())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=o())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,s])=>{typeof s>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:qt,rangeExtractor:Jt,onChange:()=>{},measureElement:Xt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,o)=>{var s,a;const{startIndex:i,endIndex:r}=this.range??{startIndex:void 0,endIndex:void 0},c=this.calculateRange();(t||i!==(c==null?void 0:c.startIndex)||r!==(c==null?void 0:c.endIndex))&&((a=(s=this.options).onChange)==null||a.call(s,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.notify(!1,!1);return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;const i=this.isScrolling;this.isScrolling=a,this.notify(i!==a,a)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,o)=>{const s=new Map,a=new Map;for(let i=o-1;i>=0;i--){const r=t[i];if(s.has(r.lane))continue;const c=a.get(r.lane);if(c==null||r.end>c.end?a.set(r.lane,r):r.end<c.end&&s.set(r.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,r)=>i.end===r.end?i.index-r.index:i.end-r.end)[0]:void 0},this.getMeasurementOptions=se(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,o,s,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=se(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i},r)=>{var c;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,d);for(let m=d;m<t;m++){let b=(c=this.measurementsCache[m])==null?void 0:c.measureElement;b||(b=I=>{const g=a(m),k=this.elementsCache.get(g);if(!I){k&&(this.observer.unobserve(k),this.elementsCache.delete(g));return}k!==I&&(k&&this.observer.unobserve(k),this.observer.observe(I),this.elementsCache.set(g,I)),I.isConnected&&this.resizeItem(m,this.options.measureElement(I,void 0,this))});const _=a(m),x=this.options.lanes===1?u[m-1]:this.getFurthestMeasurement(u,m),h=x?x.end+this.options.gap:o+s,E=r.get(_),N=typeof E=="number"?E:this.options.estimateSize(m),S=h+N,V=x?x.lane:m%this.options.lanes;u[m]={index:m,start:h,size:N,end:S,key:_,lane:V,measureElement:b}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=se(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,o,s)=>this.range=t.length>0&&o>0?nn({measurements:t,outerSize:o,scrollOffset:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=se(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,o,s,a)=>o===null?[]:t({startIndex:o.startIndex,endIndex:o.endIndex,overscan:s,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,s=t.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const s=this.indexFromElement(t),a=this.getMeasurements()[s];if(!a||!t.isConnected){this.elementsCache.forEach((r,c)=>{r===t&&(this.observer.unobserve(t),this.elementsCache.delete(c))});return}const i=this.elementsCache.get(a.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(a.key,t)),this.resizeItem(s,this.options.measureElement(t,o,this))},this.resizeItem=(t,o)=>{const s=this.getMeasurements()[t];if(!s)return;const a=this.itemSizeCache.get(s.key)??s.size,i=o-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,o)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=se(()=>[this.getIndexes(),this.getMeasurements()],(t,o)=>{const s=[];for(let a=0,i=t.length;a<i;a++){const r=t[a],c=o[r];s.push(c)}return s},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();if(o.length!==0)return Oe(o[De(0,o.length-1,s=>Oe(o[s]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const s=this.getSize(),a=this.getScrollOffset();o==="auto"&&(t<=a?o="start":t>=a+s?o="end":o="start"),o==="start"?t=t:o==="end"?t=t-s:o==="center"&&(t=t-s/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-s;return Math.max(Math.min(c,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getMeasurements()[t];if(!s)return;const a=this.getSize(),i=this.getScrollOffset();if(o==="auto")if(s.end>=i+a-this.options.scrollPaddingEnd)o="end";else if(s.start<=i+this.options.scrollPaddingStart)o="start";else return[i,o];const r=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,o),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(t,{align:o="auto",behavior:s}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(t,o);if(!a)return;const[i,r]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=Oe(this.getOffsetForIndex(t,r));Wt(d,this.getScrollOffset())||this.scrollToIndex(t,{align:r,behavior:s})}else this.scrollToIndex(t,{align:r,behavior:s})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let s;return o.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:o,behavior:s})=>{this.options.scrollToFn(t,{behavior:s,adjustments:o},this)},this.measure=()=>{var t,o;this.itemSizeCache=new Map,(o=(t=this.options).onChange)==null||o.call(t,this,!1)},this.setOptions(l)}}const De=(e,l,t,o)=>{for(;e<=l;){const s=(e+l)/2|0,a=t(s);if(a<o)e=s+1;else if(a>o)l=s-1;else return s}return e>0?e-1:0};function nn({measurements:e,outerSize:l,scrollOffset:t}){const o=e.length-1,a=De(0,o,r=>e[r].start,t);let i=a;for(;i<o&&e[i].end<t+l;)i++;return{startIndex:a,endIndex:i}}function on(e){const l=new tn(n.unref(e)),t=n.shallowRef(l),o=l._didMount();return n.watch(()=>n.unref(e).getScrollElement(),s=>{s&&l._willUpdate()},{immediate:!0}),n.watch(()=>n.unref(e),s=>{l.setOptions({...s,onChange:(a,i)=>{var r;n.triggerRef(t),(r=s.onChange)==null||r.call(s,a,i)}}),l._willUpdate(),n.triggerRef(t)},{immediate:!0}),n.onScopeDispose(o),t}function ln(e){return on(n.computed(()=>({observeElementRect:Kt,observeElementOffset:Qt,scrollToFn:en,...n.unref(e)})))}function sn(e,l,t){let o=n.ref(t==null?void 0:t.value),s=n.computed(()=>e.value!==void 0);return[n.computed(()=>s.value?e.value:o.value),function(a){return s.value||(o.value=a),l==null?void 0:l(a)}]}function rn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(l=>setTimeout(()=>{throw l}))}function fe(){let e=[],l={addEventListener(t,o,s,a){return t.addEventListener(o,s,a),l.add(()=>t.removeEventListener(o,s,a))},requestAnimationFrame(...t){let o=requestAnimationFrame(...t);l.add(()=>cancelAnimationFrame(o))},nextFrame(...t){l.requestAnimationFrame(()=>{l.requestAnimationFrame(...t)})},setTimeout(...t){let o=setTimeout(...t);l.add(()=>clearTimeout(o))},microTask(...t){let o={current:!0};return rn(()=>{o.current&&t[0]()}),l.add(()=>{o.current=!1})},style(t,o,s){let a=t.style.getPropertyValue(o);return Object.assign(t.style,{[o]:s}),this.add(()=>{Object.assign(t.style,{[o]:a})})},group(t){let o=fe();return t(o),this.add(()=>o.dispose())},add(t){return e.push(t),()=>{let o=e.indexOf(t);if(o>=0)for(let s of e.splice(o,1))s()}},dispose(){for(let t of e.splice(0))t()}};return l}function an(){let e=fe();return n.onUnmounted(()=>e.dispose()),e}function cn(){let e=an();return l=>{e.dispose(),e.nextFrame(l)}}let dn=Symbol("headlessui.useid"),un=0;function re(){return n.inject(dn,()=>`${++un}`)()}function $(e){var l;if(e==null||e.value==null)return null;let t=(l=e.value.$el)!=null?l:e.value;return t instanceof Node?t:null}function U(e,l,...t){if(e in l){let s=l[e];return typeof s=="function"?s(...t):s}let o=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,U),o}var fn=Object.defineProperty,pn=(e,l,t)=>l in e?fn(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,Fe=(e,l,t)=>(pn(e,typeof l!="symbol"?l+"":l,t),t);let mn=class{constructor(){Fe(this,"current",this.detect()),Fe(this,"currentId",0)}set(l){this.current!==l&&(this.currentId=0,this.current=l)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},ke=new mn;function $e(e){if(ke.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let l=$(e);if(l)return l.ownerDocument}return document}let Ae=["[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(",");var hn=(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))(hn||{}),gn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(gn||{}),bn=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(bn||{}),je=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(je||{});function vn(e,l=0){var t;return e===((t=$e(e))==null?void 0:t.body)?!1:U(l,{0(){return e.matches(Ae)},1(){let o=e;for(;o!==null;){if(o.matches(Ae))return!0;o=o.parentElement}return!1}})}var _n=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(_n||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function xn(e,l=t=>t){return e.slice().sort((t,o)=>{let s=l(t),a=l(o);if(s===null||a===null)return 0;let i=s.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Cn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function wn(){return/Android/gi.test(window.navigator.userAgent)}function He(){return Cn()||wn()}function pe(e,l,t){ke.isServer||n.watchEffect(o=>{document.addEventListener(e,l,t),o(()=>document.removeEventListener(e,l,t))})}function yn(e,l,t){ke.isServer||n.watchEffect(o=>{window.addEventListener(e,l,t),o(()=>window.removeEventListener(e,l,t))})}function En(e,l,t=n.computed(()=>!0)){function o(a,i){if(!t.value||a.defaultPrevented)return;let r=i(a);if(r===null||!r.getRootNode().contains(r))return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:$(d);if(u!=null&&u.contains(r)||a.composed&&a.composedPath().includes(u))return}return!vn(r,je.Loose)&&r.tabIndex!==-1&&a.preventDefault(),l(a,r)}let s=n.ref(null);pe("pointerdown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),pe("mousedown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),pe("click",a=>{He()||s.value&&(o(a,()=>s.value),s.value=null)},!0),pe("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),yn("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ze(e,l){if(e)return e;let t=l??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function Sn(e,l){let t=n.ref(ze(e.value.type,e.value.as));return n.onMounted(()=>{t.value=ze(e.value.type,e.value.as)}),n.watchEffect(()=>{var o;t.value||$(l)&&$(l)instanceof HTMLButtonElement&&!((o=$(l))!=null&&o.hasAttribute("type"))&&(t.value="button")}),t}function Ue(e){return[e.screenX,e.screenY]}function On(){let e=n.ref([-1,-1]);return{wasMoved(l){let t=Ue(l);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(l){e.value=Ue(l)}}}function kn({container:e,accept:l,walk:t,enabled:o}){n.watchEffect(()=>{let s=e.value;if(!s||o!==void 0&&!o.value)return;let a=$e(e);if(!a)return;let i=Object.assign(c=>l(c),{acceptNode:l}),r=a.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,i,!1);for(;r.nextNode();)t(r.currentNode)})}var ae=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ae||{}),$n=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))($n||{});function q({visible:e=!0,features:l=0,ourProps:t,theirProps:o,...s}){var a;let i=We(o,t),r=Object.assign(s,{props:i});if(e||l&2&&i.static)return Ve(r);if(l&1){let c=(a=i.unmount)==null||a?0:1;return U(c,{0(){return null},1(){return Ve({...s,props:{...i,hidden:!0,style:{display:"none"}}})}})}return Ve(r)}function Ve({props:e,attrs:l,slots:t,slot:o,name:s}){var a,i;let{as:r,...c}=me(e,["unmount","static"]),d=(a=t.default)==null?void 0:a.call(t,o),u={};if(o){let m=!1,b=[];for(let[_,x]of Object.entries(o))typeof x=="boolean"&&(m=!0),x===!0&&b.push(_);m&&(u["data-headlessui-state"]=b.join(" "))}if(r==="template"){if(d=Ze(d??[]),Object.keys(c).length>0||Object.keys(l).length>0){let[m,...b]=d??[];if(!Tn(m)||b.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${s} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(l)).map(h=>h.trim()).filter((h,E,N)=>N.indexOf(h)===E).sort((h,E)=>h.localeCompare(E)).map(h=>` - ${h}`).join(`
4
+ color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(c=t==null?void 0:t.onChange)==null||c.call(t,s),s}}function Se(e,l){if(e===void 0)throw new Error("Unexpected undefined");return e}const Zt=(e,l)=>Math.abs(e-l)<1,Wt=(e,l,t)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>l.apply(this,s),t)}},Gt=e=>e,qt=e=>{const l=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=l;s<=t;s++)o.push(s);return o},Jt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;const s=i=>{const{width:r,height:c}=i;l({width:Math.round(r),height:Math.round(c)})};if(s(t.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const a=new o.ResizeObserver(i=>{const r=i[0];if(r!=null&&r.borderBoxSize){const c=r.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(t.getBoundingClientRect())});return a.observe(t,{box:"border-box"}),()=>{a.unobserve(t)}},Me={passive:!0},Kt=typeof window>"u"?!0:"onscrollend"in window,Yt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;let s=0;const a=Kt?()=>{}:Wt(o,()=>{l(s,!1)},e.options.isScrollingResetDelay),i=d=>()=>{s=t[e.options.horizontal?"scrollLeft":"scrollTop"],a(),l(s,d)},r=i(!0),c=i(!1);return c(),t.addEventListener("scroll",r,Me),t.addEventListener("scrollend",c,Me),()=>{t.removeEventListener("scroll",r),t.removeEventListener("scrollend",c)}},Qt=(e,l,t)=>{if(l!=null&&l.borderBoxSize){const o=l.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Xt=(e,{adjustments:l=0,behavior:t},o)=>{var s,a;const i=e+l;(a=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[o.options.horizontal?"left":"top"]:i,behavior:t})};class en{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const o=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var s;return(s=o())==null?void 0:s.disconnect()},observe:s=>{var a;return(a=o())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=o())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,s])=>{typeof s>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Gt,rangeExtractor:qt,onChange:()=>{},measureElement:Qt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...t}},this.notify=(t,o)=>{var s,a;const{startIndex:i,endIndex:r}=this.range??{startIndex:void 0,endIndex:void 0},c=this.calculateRange();(t||i!==(c==null?void 0:c.startIndex)||r!==(c==null?void 0:c.endIndex))&&((a=(s=this.options).onChange)==null||a.call(s,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.notify(!1,!1);return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s;const i=this.isScrolling;this.isScrolling=a,this.notify(i!==a,a)}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,o)=>{const s=new Map,a=new Map;for(let i=o-1;i>=0;i--){const r=t[i];if(s.has(r.lane))continue;const c=a.get(r.lane);if(c==null||r.end>c.end?a.set(r.lane,r):r.end<c.end&&s.set(r.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,r)=>i.end===r.end?i.index-r.index:i.end-r.end)[0]:void 0},this.getMeasurementOptions=oe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,o,s,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=oe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:s,getItemKey:a,enabled:i},r)=>{var c;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,d);for(let m=d;m<t;m++){let b=(c=this.measurementsCache[m])==null?void 0:c.measureElement;b||(b=I=>{const g=a(m),k=this.elementsCache.get(g);if(!I){k&&(this.observer.unobserve(k),this.elementsCache.delete(g));return}k!==I&&(k&&this.observer.unobserve(k),this.observer.observe(I),this.elementsCache.set(g,I)),I.isConnected&&this.resizeItem(m,this.options.measureElement(I,void 0,this))});const C=a(m),_=this.options.lanes===1?u[m-1]:this.getFurthestMeasurement(u,m),h=_?_.end+this.options.gap:o+s,E=r.get(C),N=typeof E=="number"?E:this.options.estimateSize(m),S=h+N,V=_?_.lane:m%this.options.lanes;u[m]={index:m,start:h,size:N,end:S,key:C,lane:V,measureElement:b}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=oe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,o,s)=>this.range=t.length>0&&o>0?tn({measurements:t,outerSize:o,scrollOffset:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=oe(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,o,s,a)=>o===null?[]:t({startIndex:o.startIndex,endIndex:o.endIndex,overscan:s,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,s=t.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const s=this.indexFromElement(t),a=this.getMeasurements()[s];if(!a||!t.isConnected){this.elementsCache.forEach((r,c)=>{r===t&&(this.observer.unobserve(t),this.elementsCache.delete(c))});return}const i=this.elementsCache.get(a.key);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(a.key,t)),this.resizeItem(s,this.options.measureElement(t,o,this))},this.resizeItem=(t,o)=>{const s=this.getMeasurements()[t];if(!s)return;const a=this.itemSizeCache.get(s.key)??s.size,i=o-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,o)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=oe(()=>[this.getIndexes(),this.getMeasurements()],(t,o)=>{const s=[];for(let a=0,i=t.length;a<i;a++){const r=t[a],c=o[r];s.push(c)}return s},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();if(o.length!==0)return Se(o[Pe(0,o.length-1,s=>Se(o[s]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const s=this.getSize(),a=this.getScrollOffset();o==="auto"&&(t<=a?o="start":t>=a+s?o="end":o="start"),o==="start"?t=t:o==="end"?t=t-s:o==="center"&&(t=t-s/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-s;return Math.max(Math.min(c,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getMeasurements()[t];if(!s)return;const a=this.getSize(),i=this.getScrollOffset();if(o==="auto")if(s.end>=i+a-this.options.scrollPaddingEnd)o="end";else if(s.start<=i+this.options.scrollPaddingStart)o="start";else return[i,o];const r=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,o),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(t,{align:o="auto",behavior:s}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(t,o);if(!a)return;const[i,r]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=Se(this.getOffsetForIndex(t,r));Zt(d,this.getScrollOffset())||this.scrollToIndex(t,{align:r,behavior:s})}else this.scrollToIndex(t,{align:r,behavior:s})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let s;return o.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(a=>a.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:o,behavior:s})=>{this.options.scrollToFn(t,{behavior:s,adjustments:o},this)},this.measure=()=>{var t,o;this.itemSizeCache=new Map,(o=(t=this.options).onChange)==null||o.call(t,this,!1)},this.setOptions(l)}}const Pe=(e,l,t,o)=>{for(;e<=l;){const s=(e+l)/2|0,a=t(s);if(a<o)e=s+1;else if(a>o)l=s-1;else return s}return e>0?e-1:0};function tn({measurements:e,outerSize:l,scrollOffset:t}){const o=e.length-1,a=Pe(0,o,r=>e[r].start,t);let i=a;for(;i<o&&e[i].end<t+l;)i++;return{startIndex:a,endIndex:i}}function nn(e){const l=new en(n.unref(e)),t=n.shallowRef(l),o=l._didMount();return n.watch(()=>n.unref(e).getScrollElement(),s=>{s&&l._willUpdate()},{immediate:!0}),n.watch(()=>n.unref(e),s=>{l.setOptions({...s,onChange:(a,i)=>{var r;n.triggerRef(t),(r=s.onChange)==null||r.call(s,a,i)}}),l._willUpdate(),n.triggerRef(t)},{immediate:!0}),n.onScopeDispose(o),t}function on(e){return nn(n.computed(()=>({observeElementRect:Jt,observeElementOffset:Yt,scrollToFn:Xt,...n.unref(e)})))}function ln(e,l,t){let o=n.ref(t==null?void 0:t.value),s=n.computed(()=>e.value!==void 0);return[n.computed(()=>s.value?e.value:o.value),function(a){return s.value||(o.value=a),l==null?void 0:l(a)}]}function sn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(l=>setTimeout(()=>{throw l}))}function de(){let e=[],l={addEventListener(t,o,s,a){return t.addEventListener(o,s,a),l.add(()=>t.removeEventListener(o,s,a))},requestAnimationFrame(...t){let o=requestAnimationFrame(...t);l.add(()=>cancelAnimationFrame(o))},nextFrame(...t){l.requestAnimationFrame(()=>{l.requestAnimationFrame(...t)})},setTimeout(...t){let o=setTimeout(...t);l.add(()=>clearTimeout(o))},microTask(...t){let o={current:!0};return sn(()=>{o.current&&t[0]()}),l.add(()=>{o.current=!1})},style(t,o,s){let a=t.style.getPropertyValue(o);return Object.assign(t.style,{[o]:s}),this.add(()=>{Object.assign(t.style,{[o]:a})})},group(t){let o=de();return t(o),this.add(()=>o.dispose())},add(t){return e.push(t),()=>{let o=e.indexOf(t);if(o>=0)for(let s of e.splice(o,1))s()}},dispose(){for(let t of e.splice(0))t()}};return l}function rn(){let e=de();return n.onUnmounted(()=>e.dispose()),e}function an(){let e=rn();return l=>{e.dispose(),e.nextFrame(l)}}let cn=Symbol("headlessui.useid"),dn=0;function le(){return n.inject(cn,()=>`${++dn}`)()}function $(e){var l;if(e==null||e.value==null)return null;let t=(l=e.value.$el)!=null?l:e.value;return t instanceof Node?t:null}function U(e,l,...t){if(e in l){let s=l[e];return typeof s=="function"?s(...t):s}let o=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(l).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,U),o}var un=Object.defineProperty,fn=(e,l,t)=>l in e?un(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,De=(e,l,t)=>(fn(e,typeof l!="symbol"?l+"":l,t),t);let pn=class{constructor(){De(this,"current",this.detect()),De(this,"currentId",0)}set(l){this.current!==l&&(this.currentId=0,this.current=l)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Oe=new pn;function ke(e){if(Oe.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let l=$(e);if(l)return l.ownerDocument}return document}let Fe=["[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(",");var mn=(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))(mn||{}),hn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(hn||{}),gn=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(gn||{}),Ae=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ae||{});function bn(e,l=0){var t;return e===((t=ke(e))==null?void 0:t.body)?!1:U(l,{0(){return e.matches(Fe)},1(){let o=e;for(;o!==null;){if(o.matches(Fe))return!0;o=o.parentElement}return!1}})}var vn=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(vn||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Cn(e,l=t=>t){return e.slice().sort((t,o)=>{let s=l(t),a=l(o);if(s===null||a===null)return 0;let i=s.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function _n(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function xn(){return/Android/gi.test(window.navigator.userAgent)}function je(){return _n()||xn()}function ue(e,l,t){Oe.isServer||n.watchEffect(o=>{document.addEventListener(e,l,t),o(()=>document.removeEventListener(e,l,t))})}function wn(e,l,t){Oe.isServer||n.watchEffect(o=>{window.addEventListener(e,l,t),o(()=>window.removeEventListener(e,l,t))})}function yn(e,l,t=n.computed(()=>!0)){function o(a,i){if(!t.value||a.defaultPrevented)return;let r=i(a);if(r===null||!r.getRootNode().contains(r))return;let c=function d(u){return typeof u=="function"?d(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let d of c){if(d===null)continue;let u=d instanceof HTMLElement?d:$(d);if(u!=null&&u.contains(r)||a.composed&&a.composedPath().includes(u))return}return!bn(r,Ae.Loose)&&r.tabIndex!==-1&&a.preventDefault(),l(a,r)}let s=n.ref(null);ue("pointerdown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),ue("mousedown",a=>{var i,r;t.value&&(s.value=((r=(i=a.composedPath)==null?void 0:i.call(a))==null?void 0:r[0])||a.target)},!0),ue("click",a=>{je()||s.value&&(o(a,()=>s.value),s.value=null)},!0),ue("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),wn("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function He(e,l){if(e)return e;let t=l??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function En(e,l){let t=n.ref(He(e.value.type,e.value.as));return n.onMounted(()=>{t.value=He(e.value.type,e.value.as)}),n.watchEffect(()=>{var o;t.value||$(l)&&$(l)instanceof HTMLButtonElement&&!((o=$(l))!=null&&o.hasAttribute("type"))&&(t.value="button")}),t}function ze(e){return[e.screenX,e.screenY]}function Sn(){let e=n.ref([-1,-1]);return{wasMoved(l){let t=ze(l);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(l){e.value=ze(l)}}}function On({container:e,accept:l,walk:t,enabled:o}){n.watchEffect(()=>{let s=e.value;if(!s||o!==void 0&&!o.value)return;let a=ke(e);if(!a)return;let i=Object.assign(c=>l(c),{acceptNode:l}),r=a.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,i,!1);for(;r.nextNode();)t(r.currentNode)})}var se=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(se||{}),kn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(kn||{});function q({visible:e=!0,features:l=0,ourProps:t,theirProps:o,...s}){var a;let i=Ze(o,t),r=Object.assign(s,{props:i});if(e||l&2&&i.static)return $e(r);if(l&1){let c=(a=i.unmount)==null||a?0:1;return U(c,{0(){return null},1(){return $e({...s,props:{...i,hidden:!0,style:{display:"none"}}})}})}return $e(r)}function $e({props:e,attrs:l,slots:t,slot:o,name:s}){var a,i;let{as:r,...c}=fe(e,["unmount","static"]),d=(a=t.default)==null?void 0:a.call(t,o),u={};if(o){let m=!1,b=[];for(let[C,_]of Object.entries(o))typeof _=="boolean"&&(m=!0),_===!0&&b.push(C);m&&(u["data-headlessui-state"]=b.join(" "))}if(r==="template"){if(d=Ue(d??[]),Object.keys(c).length>0||Object.keys(l).length>0){let[m,...b]=d??[];if(!Vn(m)||b.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${s} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(c).concat(Object.keys(l)).map(h=>h.trim()).filter((h,E,N)=>N.indexOf(h)===E).sort((h,E)=>h.localeCompare(E)).map(h=>` - ${h}`).join(`
5
5
  `),"","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(h=>` - ${h}`).join(`
6
6
  `)].join(`
7
- `));let _=We((i=m.props)!=null?i:{},c,u),x=n.cloneVNode(m,_,!0);for(let h in _)h.startsWith("on")&&(x.props||(x.props={}),x.props[h]=_[h]);return x}return Array.isArray(d)&&d.length===1?d[0]:d}return n.h(r,Object.assign({},c,u),{default:()=>d})}function Ze(e){return e.flatMap(l=>l.type===n.Fragment?Ze(l.children):[l])}function We(...e){if(e.length===0)return{};if(e.length===1)return e[0];let l={},t={};for(let o of e)for(let s in o)s.startsWith("on")&&typeof o[s]=="function"?(t[s]!=null||(t[s]=[]),t[s].push(o[s])):l[s]=o[s];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(t).map(o=>[o,void 0])));for(let o in t)Object.assign(l,{[o](s,...a){let i=t[o];for(let r of i){if(s instanceof Event&&s.defaultPrevented)return;r(s,...a)}}});return l}function Vn(e){let l=Object.assign({},e);for(let t in l)l[t]===void 0&&delete l[t];return l}function me(e,l=[]){let t=Object.assign({},e);for(let o of l)o in t&&delete t[o];return t}function Tn(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Ge=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ge||{});let Nn=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:l,attrs:t}){return()=>{var o;let{features:s,...a}=e,i={"aria-hidden":(s&2)===2?!0:(o=a["aria-hidden"])!=null?o:void 0,hidden:(s&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",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return q({ourProps:i,theirProps:a,slot:{},attrs:t,slots:l,name:"Hidden"})}}}),qe=Symbol("Context");var ie=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ie||{});function In(){return n.inject(qe,null)}function Ln(e){n.provide(qe,e)}var D=(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))(D||{}),Je=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Je||{});function Bn(e){function l(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let J=[];Bn(()=>{function e(l){l.target instanceof HTMLElement&&l.target!==document.body&&J[0]!==l.target&&(J.unshift(l.target),J=J.filter(t=>t!=null&&t.isConnected),J.splice(10))}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})});function Rn(e){throw new Error("Unexpected object: "+e)}var M=(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))(M||{});function Ke(e,l){let t=l.resolveItems();if(t.length<=0)return null;let o=l.resolveActiveIndex(),s=o??-1;switch(e.focus){case 0:{for(let a=0;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 1:{s===-1&&(s=t.length);for(let a=s-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 2:{for(let a=s+1;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 3:{for(let a=t.length-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 4:{for(let a=0;a<t.length;++a)if(l.resolveId(t[a],a,t)===e.id)return a;return o}case 5:return null;default:Rn(e)}}function Ye(e={},l=null,t=[]){for(let[o,s]of Object.entries(e))Xe(t,Qe(l,o),s);return t}function Qe(e,l){return e?e+"["+l+"]":l}function Xe(e,l,t){if(Array.isArray(t))for(let[o,s]of t.entries())Xe(e,Qe(l,o.toString()),s);else t instanceof Date?e.push([l,t.toISOString()]):typeof t=="boolean"?e.push([l,t?"1":"0"]):typeof t=="string"?e.push([l,t]):typeof t=="number"?e.push([l,`${t}`]):t==null?e.push([l,""]):Ye(t,l,e)}function Mn(e,l){return e===l}var Pn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Pn||{}),Dn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Dn||{}),Fn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Fn||{});let et=Symbol("ComboboxContext");function K(e){let l=n.inject(et,null);if(l===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,K),t}return l}let tt=Symbol("VirtualContext"),An=n.defineComponent({name:"VirtualProvider",setup(e,{slots:l}){let t=K("VirtualProvider"),o=n.computed(()=>{let r=$(t.optionsRef);if(!r)return{start:0,end:0};let c=window.getComputedStyle(r);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),s=ln(n.computed(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return $(t.optionsRef)},overscan:12}))),a=n.computed(()=>{var r;return(r=t.virtual.value)==null?void 0:r.options}),i=n.ref(0);return n.watch([a],()=>{i.value+=1}),n.provide(tt,t.virtual.value?s:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${s.value.getTotalSize()}px`},ref:r=>{if(r){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&s.value.scrollToIndex(t.activeOptionIndex.value)}}},s.value.getVirtualItems().map(r=>n.cloneVNode(l.default({option:t.virtual.value.options[r.index],open:t.comboboxState.value===0})[0],{key:`${i.value}-${r.index}`,"data-index":r.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":r.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})))]}}),jn=n.defineComponent({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:l,attrs:t,emit:o}){let s=n.ref(1),a=n.ref(null),i=n.ref(null),r=n.ref(null),c=n.ref(null),d=n.ref({static:!1,hold:!1}),u=n.ref([]),m=n.ref(null),b=n.ref(2),_=n.ref(!1);function x(f=p=>p){let p=m.value!==null?u.value[m.value]:null,w=f(u.value.slice()),y=w.length>0&&w[0].dataRef.order.value!==null?w.sort((L,A)=>L.dataRef.order.value-A.dataRef.order.value):xn(w,L=>$(L.dataRef.domRef)),T=p?y.indexOf(p):null;return T===-1&&(T=null),{options:y,activeOptionIndex:T}}let h=n.computed(()=>e.multiple?1:0),E=n.computed(()=>e.nullable),[N,S]=sn(n.computed(()=>e.modelValue),f=>o("update:modelValue",f),n.computed(()=>e.defaultValue)),V=n.computed(()=>N.value===void 0?U(h.value,{1:[],0:void 0}):N.value),I=null,g=null;function k(f){return U(h.value,{0(){return S==null?void 0:S(f)},1:()=>{let p=n.toRaw(v.value.value).slice(),w=n.toRaw(f),y=p.findIndex(T=>v.compare(w,n.toRaw(T)));return y===-1?p.push(w):p.splice(y,1),S==null?void 0:S(p)}})}let C=n.computed(()=>{});n.watch([C],([f],[p])=>{if(v.virtual.value&&f&&p&&m.value!==null){let w=f.indexOf(p[m.value]);w!==-1?m.value=w:m.value=null}});let v={comboboxState:s,value:V,mode:h,compare(f,p){if(typeof e.by=="string"){let w=e.by;return(f==null?void 0:f[w])===(p==null?void 0:p[w])}return e.by===null?Mn(f,p):e.by(f,p)},calculateIndex(f){return v.virtual.value?e.by===null?v.virtual.value.options.indexOf(f):v.virtual.value.options.findIndex(p=>v.compare(p,f)):u.value.findIndex(p=>v.compare(p.dataRef.value,f))},defaultValue:n.computed(()=>e.defaultValue),nullable:E,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:i,labelRef:a,buttonRef:r,optionsRef:c,disabled:n.computed(()=>e.disabled),options:u,change(f){S(f)},activeOptionIndex:n.computed(()=>{if(_.value&&m.value===null&&(v.virtual.value?v.virtual.value.options.length>0:u.value.length>0)){if(v.virtual.value){let p=v.virtual.value.options.findIndex(w=>{var y;return!((y=v.virtual.value)!=null&&y.disabled(w))});if(p!==-1)return p}let f=u.value.findIndex(p=>!p.dataRef.disabled);if(f!==-1)return f}return m.value}),activationTrigger:b,optionsPropsRef:d,closeCombobox(){_.value=!1,!e.disabled&&s.value!==1&&(s.value=1,m.value=null)},openCombobox(){if(_.value=!0,!e.disabled&&s.value!==0){if(v.value.value){let f=v.calculateIndex(v.value.value);f!==-1&&(m.value=f)}s.value=0}},setActivationTrigger(f){b.value=f},goToOption(f,p,w){_.value=!1,I!==null&&cancelAnimationFrame(I),I=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&s.value===1)return;if(v.virtual.value){m.value=f===M.Specific?p:Ke({focus:f},{resolveItems:()=>v.virtual.value.options,resolveActiveIndex:()=>{var L,A;return(A=(L=v.activeOptionIndex.value)!=null?L:v.virtual.value.options.findIndex(j=>{var R;return!((R=v.virtual.value)!=null&&R.disabled(j))}))!=null?A:null},resolveDisabled:L=>v.virtual.value.disabled(L),resolveId(){throw new Error("Function not implemented.")}}),b.value=w??2;return}let y=x();if(y.activeOptionIndex===null){let L=y.options.findIndex(A=>!A.dataRef.disabled);L!==-1&&(y.activeOptionIndex=L)}let T=f===M.Specific?p:Ke({focus:f},{resolveItems:()=>y.options,resolveActiveIndex:()=>y.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});m.value=T,b.value=w??2,u.value=y.options})},selectOption(f){let p=u.value.find(y=>y.id===f);if(!p)return;let{dataRef:w}=p;k(w.value)},selectActiveOption(){if(v.activeOptionIndex.value!==null){if(v.virtual.value)k(v.virtual.value.options[v.activeOptionIndex.value]);else{let{dataRef:f}=u.value[v.activeOptionIndex.value];k(f.value)}v.goToOption(M.Specific,v.activeOptionIndex.value)}},registerOption(f,p){let w=n.reactive({id:f,dataRef:p});if(v.virtual.value){u.value.push(w);return}g&&cancelAnimationFrame(g);let y=x(T=>(T.push(w),T));m.value===null&&v.isSelected(p.value.value)&&(y.activeOptionIndex=y.options.indexOf(w)),u.value=y.options,m.value=y.activeOptionIndex,b.value=2,y.options.some(T=>!$(T.dataRef.domRef))&&(g=requestAnimationFrame(()=>{let T=x();u.value=T.options,m.value=T.activeOptionIndex}))},unregisterOption(f,p){if(I!==null&&cancelAnimationFrame(I),p&&(_.value=!0),v.virtual.value){u.value=u.value.filter(y=>y.id!==f);return}let w=x(y=>{let T=y.findIndex(L=>L.id===f);return T!==-1&&y.splice(T,1),y});u.value=w.options,m.value=w.activeOptionIndex,b.value=2},isSelected(f){return U(h.value,{0:()=>v.compare(n.toRaw(v.value.value),n.toRaw(f)),1:()=>n.toRaw(v.value.value).some(p=>v.compare(n.toRaw(p),n.toRaw(f)))})},isActive(f){return m.value===v.calculateIndex(f)}};En([i,r,c],()=>v.closeCombobox(),n.computed(()=>s.value===0)),n.provide(et,v),Ln(n.computed(()=>U(s.value,{0:ie.Open,1:ie.Closed})));let O=n.computed(()=>{var f;return(f=$(i))==null?void 0:f.closest("form")});return n.onMounted(()=>{n.watch([O],()=>{if(!O.value||e.defaultValue===void 0)return;function f(){v.change(e.defaultValue)}return O.value.addEventListener("reset",f),()=>{var p;(p=O.value)==null||p.removeEventListener("reset",f)}},{immediate:!0})}),()=>{var f,p,w;let{name:y,disabled:T,form:L,...A}=e,j={open:s.value===0,disabled:T,activeIndex:v.activeOptionIndex.value,activeOption:v.activeOptionIndex.value===null?null:v.virtual.value?v.virtual.value.options[(f=v.activeOptionIndex.value)!=null?f:0]:(w=(p=v.options.value[v.activeOptionIndex.value])==null?void 0:p.dataRef.value)!=null?w:null,value:V.value};return n.h(n.Fragment,[...y!=null&&V.value!=null?Ye({[y]:V.value}).map(([R,fs])=>n.h(Nn,Vn({features:Ge.Hidden,key:R,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:L,disabled:T,name:R,value:fs}))):[],q({theirProps:{...t,...me(A,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:j,slots:l,attrs:t,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t}){var o;let s=(o=e.id)!=null?o:`headlessui-combobox-label-${re()}`,a=K("ComboboxLabel");function i(){var r;(r=$(a.inputRef))==null||r.focus({preventScroll:!0})}return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value},{...c}=e,d={id:s,ref:a.labelRef,onClick:i};return q({ourProps:d,theirProps:c,slot:r,attrs:l,slots:t,name:"ComboboxLabel"})}}});let Hn=n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t,expose:o}){var s;let a=(s=e.id)!=null?s:`headlessui-combobox-button-${re()}`,i=K("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});function r(u){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(u.preventDefault(),i.openCombobox()),n.nextTick(()=>{var m;return(m=$(i.inputRef))==null?void 0:m.focus({preventScroll:!0})}))}function c(u){switch(u.key){case D.ArrowDown:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.ArrowUp:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(M.Last)})),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.Escape:if(i.comboboxState.value!==0)return;u.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&u.stopPropagation(),i.closeCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return}}let d=Sn(n.computed(()=>({as:e.as,type:l.type})),i.buttonRef);return()=>{var u,m;let b={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{..._}=e,x={ref:i.buttonRef,id:a,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(u=$(i.optionsRef))==null?void 0:u.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(m=$(i.labelRef))==null?void 0:m.id,a].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:c,onClick:r};return q({ourProps:x,theirProps:_,slot:b,attrs:l,slots:t,name:"ComboboxButton"})}}}),zn=n.defineComponent({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:l,attrs:t,slots:o,expose:s}){var a;let i=(a=e.id)!=null?a:`headlessui-combobox-input-${re()}`,r=K("ComboboxInput"),c=n.computed(()=>$e($(r.inputRef))),d={value:!1};s({el:r.inputRef,$el:r.inputRef});function u(){r.change(null);let g=$(r.optionsRef);g&&(g.scrollTop=0),r.goToOption(M.Nothing)}let m=n.computed(()=>{var g;let k=r.value.value;return $(r.inputRef)?typeof e.displayValue<"u"&&k!==void 0?(g=e.displayValue(k))!=null?g:"":typeof k=="string"?k:"":""});n.onMounted(()=>{n.watch([m,r.comboboxState,c],([g,k],[C,v])=>{if(d.value)return;let O=$(r.inputRef);O&&((v===0&&k===1||g!==C)&&(O.value=g),requestAnimationFrame(()=>{var f;if(d.value||!O||((f=c.value)==null?void 0:f.activeElement)!==O)return;let{selectionStart:p,selectionEnd:w}=O;Math.abs((w??0)-(p??0))===0&&p===0&&O.setSelectionRange(O.value.length,O.value.length)}))},{immediate:!0}),n.watch([r.comboboxState],([g],[k])=>{if(g===0&&k===1){if(d.value)return;let C=$(r.inputRef);if(!C)return;let v=C.value,{selectionStart:O,selectionEnd:f,selectionDirection:p}=C;C.value="",C.value=v,p!==null?C.setSelectionRange(O,f,p):C.setSelectionRange(O,f)}})});let b=n.ref(!1);function _(){b.value=!0}function x(){fe().nextFrame(()=>{b.value=!1})}let h=cn();function E(g){switch(d.value=!0,h(()=>{d.value=!1}),g.key){case D.Enter:if(d.value=!1,r.comboboxState.value!==0||b.value)return;if(g.preventDefault(),g.stopPropagation(),r.activeOptionIndex.value===null){r.closeCombobox();return}r.selectActiveOption(),r.mode.value===0&&r.closeCombobox();break;case D.ArrowDown:return d.value=!1,g.preventDefault(),g.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(M.Next),1:()=>r.openCombobox()});case D.ArrowUp:return d.value=!1,g.preventDefault(),g.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(M.Previous),1:()=>{r.openCombobox(),n.nextTick(()=>{r.value.value||r.goToOption(M.Last)})}});case D.Home:if(g.shiftKey)break;return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.First);case D.PageUp:return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.First);case D.End:if(g.shiftKey)break;return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.Last);case D.PageDown:return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.Last);case D.Escape:if(d.value=!1,r.comboboxState.value!==0)return;g.preventDefault(),r.optionsRef.value&&!r.optionsPropsRef.value.static&&g.stopPropagation(),r.nullable.value&&r.mode.value===0&&r.value.value===null&&u(),r.closeCombobox();break;case D.Tab:if(d.value=!1,r.comboboxState.value!==0)return;r.mode.value===0&&r.activationTrigger.value!==1&&r.selectActiveOption(),r.closeCombobox();break}}function N(g){l("change",g),r.nullable.value&&r.mode.value===0&&g.target.value===""&&u(),r.openCombobox()}function S(g){var k,C,v;let O=(k=g.relatedTarget)!=null?k:J.find(f=>f!==g.currentTarget);if(d.value=!1,!((C=$(r.optionsRef))!=null&&C.contains(O))&&!((v=$(r.buttonRef))!=null&&v.contains(O))&&r.comboboxState.value===0)return g.preventDefault(),r.mode.value===0&&(r.nullable.value&&r.value.value===null?u():r.activationTrigger.value!==1&&r.selectActiveOption()),r.closeCombobox()}function V(g){var k,C,v;let O=(k=g.relatedTarget)!=null?k:J.find(f=>f!==g.currentTarget);(C=$(r.buttonRef))!=null&&C.contains(O)||(v=$(r.optionsRef))!=null&&v.contains(O)||r.disabled.value||r.immediate.value&&r.comboboxState.value!==0&&(r.openCombobox(),fe().nextFrame(()=>{r.setActivationTrigger(1)}))}let I=n.computed(()=>{var g,k,C,v;return(v=(C=(k=e.defaultValue)!=null?k:r.defaultValue.value!==void 0?(g=e.displayValue)==null?void 0:g.call(e,r.defaultValue.value):null)!=null?C:r.defaultValue.value)!=null?v:""});return()=>{var g,k,C,v,O,f,p;let w={open:r.comboboxState.value===0},{displayValue:y,onChange:T,...L}=e,A={"aria-controls":(g=r.optionsRef.value)==null?void 0:g.id,"aria-expanded":r.comboboxState.value===0,"aria-activedescendant":r.activeOptionIndex.value===null?void 0:r.virtual.value?(k=r.options.value.find(j=>!r.virtual.value.disabled(j.dataRef.value)&&r.compare(j.dataRef.value,r.virtual.value.options[r.activeOptionIndex.value])))==null?void 0:k.id:(C=r.options.value[r.activeOptionIndex.value])==null?void 0:C.id,"aria-labelledby":(f=(v=$(r.labelRef))==null?void 0:v.id)!=null?f:(O=$(r.buttonRef))==null?void 0:O.id,"aria-autocomplete":"list",id:i,onCompositionstart:_,onCompositionend:x,onKeydown:E,onInput:N,onFocus:V,onBlur:S,role:"combobox",type:(p=t.type)!=null?p:"text",tabIndex:0,ref:r.inputRef,defaultValue:I.value,disabled:r.disabled.value===!0?!0:void 0};return q({ourProps:A,theirProps:L,slot:w,attrs:t,slots:o,features:ae.RenderStrategy|ae.Static,name:"ComboboxInput"})}}}),Un=n.defineComponent({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:l,slots:t,expose:o}){let s=K("ComboboxOptions"),a=`headlessui-combobox-options-${re()}`;o({el:s.optionsRef,$el:s.optionsRef}),n.watchEffect(()=>{s.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{s.optionsPropsRef.value.hold=e.hold});let i=In(),r=n.computed(()=>i!==null?(i.value&ie.Open)===ie.Open:s.comboboxState.value===0);kn({container:n.computed(()=>$(s.optionsRef)),enabled:n.computed(()=>s.comboboxState.value===0),accept(d){return d.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function c(d){d.preventDefault()}return()=>{var d,u,m;let b={open:s.comboboxState.value===0},_={"aria-labelledby":(m=(d=$(s.labelRef))==null?void 0:d.id)!=null?m:(u=$(s.buttonRef))==null?void 0:u.id,id:a,ref:s.optionsRef,role:"listbox","aria-multiselectable":s.mode.value===1?!0:void 0,onMousedown:c},x=me(e,["hold"]);return q({ourProps:_,theirProps:x,slot:b,attrs:l,slots:s.virtual.value&&s.comboboxState.value===0?{...t,default:()=>[n.h(An,{},t.default)]}:t,features:ae.RenderStrategy|ae.Static,visible:r.value,name:"ComboboxOptions"})}}}),Zn=n.defineComponent({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:l,attrs:t,expose:o}){let s=K("ComboboxOption"),a=`headlessui-combobox-option-${re()}`,i=n.ref(null),r=n.computed(()=>e.disabled);o({el:i,$el:i});let c=n.computed(()=>{var S;return s.virtual.value?s.activeOptionIndex.value===s.calculateIndex(e.value):s.activeOptionIndex.value===null?!1:((S=s.options.value[s.activeOptionIndex.value])==null?void 0:S.id)===a}),d=n.computed(()=>s.isSelected(e.value)),u=n.inject(tt,null),m=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:i,order:n.computed(()=>e.order)}));n.onMounted(()=>s.registerOption(a,m)),n.onUnmounted(()=>s.unregisterOption(a,c.value)),n.watchEffect(()=>{let S=$(i);S&&(u==null||u.value.measureElement(S))}),n.watchEffect(()=>{s.comboboxState.value===0&&c.value&&(s.virtual.value||s.activationTrigger.value!==0&&n.nextTick(()=>{var S,V;return(V=(S=$(i))==null?void 0:S.scrollIntoView)==null?void 0:V.call(S,{block:"nearest"})}))});function b(S){S.preventDefault(),S.button===Je.Left&&(r.value||(s.selectOption(a),He()||requestAnimationFrame(()=>{var V;return(V=$(s.inputRef))==null?void 0:V.focus({preventScroll:!0})}),s.mode.value===0&&s.closeCombobox()))}function _(){var S;if(e.disabled||(S=s.virtual.value)!=null&&S.disabled(e.value))return s.goToOption(M.Nothing);let V=s.calculateIndex(e.value);s.goToOption(M.Specific,V)}let x=On();function h(S){x.update(S)}function E(S){var V;if(!x.wasMoved(S)||e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value)return;let I=s.calculateIndex(e.value);s.goToOption(M.Specific,I,0)}function N(S){var V;x.wasMoved(S)&&(e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value&&(s.optionsPropsRef.value.hold||s.goToOption(M.Nothing)))}return()=>{let{disabled:S}=e,V={active:c.value,selected:d.value,disabled:S},I={id:a,ref:i,role:"option",tabIndex:S===!0?void 0:-1,"aria-disabled":S===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onMousedown:b,onFocus:_,onPointerenter:h,onMouseenter:h,onPointermove:E,onMousemove:E,onPointerleave:N,onMouseleave:N},g=me(e,["order","value"]);return q({ourProps:I,theirProps:g,slot:V,attrs:t,slots:l,name:"ComboboxOption"})}}});function Wn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}function Gn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z","clip-rule":"evenodd"})])}function qn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z","clip-rule":"evenodd"})])}var nt=!1;function he(e,l,t){return Array.isArray(e)?(e.length=Math.max(e.length,l),e.splice(l,1,t),t):(e[l]=t,t)}function Te(e,l){if(Array.isArray(e)){e.splice(l,1);return}delete e[l]}function Jn(){return ot().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ot(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Kn=typeof Proxy=="function",Yn="devtools-plugin:setup",Qn="plugin:settings:set";let ee,Ne;function Xn(){var e;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,Ne=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ee=!0,Ne=globalThis.perf_hooks.performance):ee=!1),ee}function eo(){return Xn()?Ne.now():Date.now()}class to{constructor(l,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=l,this.hook=t;const o={};if(l.settings)for(const i in l.settings){const r=l.settings[i];o[i]=r.defaultValue}const s=`__vue-devtools-plugin-settings__${l.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(s),r=JSON.parse(i);Object.assign(a,r)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch{}a=i},now(){return eo()}},t&&t.on(Qn,(i,r)=>{i===this.plugin.id&&this.fallbacks.setSettings(r)}),this.proxiedOn=new Proxy({},{get:(i,r)=>this.target?this.target.on[r]:(...c)=>{this.onQueue.push({method:r,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,r)=>this.target?this.target[r]:r==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(r)?(...c)=>(this.targetQueue.push({method:r,args:c,resolve:()=>{}}),this.fallbacks[r](...c)):(...c)=>new Promise(d=>{this.targetQueue.push({method:r,args:c,resolve:d})})})}async setRealTarget(l){this.target=l;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function lt(e,l){const t=e,o=ot(),s=Jn(),a=Kn&&t.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Yn,e,l);else{const i=a?new to(t,s):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:l,proxy:i}),i&&l(i.proxiedTarget)}}/*!
7
+ `));let C=Ze((i=m.props)!=null?i:{},c,u),_=n.cloneVNode(m,C,!0);for(let h in C)h.startsWith("on")&&(_.props||(_.props={}),_.props[h]=C[h]);return _}return Array.isArray(d)&&d.length===1?d[0]:d}return n.h(r,Object.assign({},c,u),{default:()=>d})}function Ue(e){return e.flatMap(l=>l.type===n.Fragment?Ue(l.children):[l])}function Ze(...e){if(e.length===0)return{};if(e.length===1)return e[0];let l={},t={};for(let o of e)for(let s in o)s.startsWith("on")&&typeof o[s]=="function"?(t[s]!=null||(t[s]=[]),t[s].push(o[s])):l[s]=o[s];if(l.disabled||l["aria-disabled"])return Object.assign(l,Object.fromEntries(Object.keys(t).map(o=>[o,void 0])));for(let o in t)Object.assign(l,{[o](s,...a){let i=t[o];for(let r of i){if(s instanceof Event&&s.defaultPrevented)return;r(s,...a)}}});return l}function $n(e){let l=Object.assign({},e);for(let t in l)l[t]===void 0&&delete l[t];return l}function fe(e,l=[]){let t=Object.assign({},e);for(let o of l)o in t&&delete t[o];return t}function Vn(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var We=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(We||{});let Tn=n.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:l,attrs:t}){return()=>{var o;let{features:s,...a}=e,i={"aria-hidden":(s&2)===2?!0:(o=a["aria-hidden"])!=null?o:void 0,hidden:(s&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",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return q({ourProps:i,theirProps:a,slot:{},attrs:t,slots:l,name:"Hidden"})}}}),Ge=Symbol("Context");var re=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(re||{});function Nn(){return n.inject(Ge,null)}function In(e){n.provide(Ge,e)}var D=(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))(D||{}),qe=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(qe||{});function Ln(e){function l(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let J=[];Ln(()=>{function e(l){l.target instanceof HTMLElement&&l.target!==document.body&&J[0]!==l.target&&(J.unshift(l.target),J=J.filter(t=>t!=null&&t.isConnected),J.splice(10))}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})});function Bn(e){throw new Error("Unexpected object: "+e)}var M=(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))(M||{});function Je(e,l){let t=l.resolveItems();if(t.length<=0)return null;let o=l.resolveActiveIndex(),s=o??-1;switch(e.focus){case 0:{for(let a=0;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 1:{s===-1&&(s=t.length);for(let a=s-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 2:{for(let a=s+1;a<t.length;++a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 3:{for(let a=t.length-1;a>=0;--a)if(!l.resolveDisabled(t[a],a,t))return a;return o}case 4:{for(let a=0;a<t.length;++a)if(l.resolveId(t[a],a,t)===e.id)return a;return o}case 5:return null;default:Bn(e)}}function Ke(e={},l=null,t=[]){for(let[o,s]of Object.entries(e))Qe(t,Ye(l,o),s);return t}function Ye(e,l){return e?e+"["+l+"]":l}function Qe(e,l,t){if(Array.isArray(t))for(let[o,s]of t.entries())Qe(e,Ye(l,o.toString()),s);else t instanceof Date?e.push([l,t.toISOString()]):typeof t=="boolean"?e.push([l,t?"1":"0"]):typeof t=="string"?e.push([l,t]):typeof t=="number"?e.push([l,`${t}`]):t==null?e.push([l,""]):Ke(t,l,e)}function Rn(e,l){return e===l}var Mn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Mn||{}),Pn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Pn||{}),Dn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Dn||{});let Xe=Symbol("ComboboxContext");function K(e){let l=n.inject(Xe,null);if(l===null){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,K),t}return l}let et=Symbol("VirtualContext"),Fn=n.defineComponent({name:"VirtualProvider",setup(e,{slots:l}){let t=K("VirtualProvider"),o=n.computed(()=>{let r=$(t.optionsRef);if(!r)return{start:0,end:0};let c=window.getComputedStyle(r);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),s=on(n.computed(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return $(t.optionsRef)},overscan:12}))),a=n.computed(()=>{var r;return(r=t.virtual.value)==null?void 0:r.options}),i=n.ref(0);return n.watch([a],()=>{i.value+=1}),n.provide(et,t.virtual.value?s:null),()=>[n.h("div",{style:{position:"relative",width:"100%",height:`${s.value.getTotalSize()}px`},ref:r=>{if(r){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&s.value.scrollToIndex(t.activeOptionIndex.value)}}},s.value.getVirtualItems().map(r=>n.cloneVNode(l.default({option:t.virtual.value.options[r.index],open:t.comboboxState.value===0})[0],{key:`${i.value}-${r.index}`,"data-index":r.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":r.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})))]}}),An=n.defineComponent({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:l,attrs:t,emit:o}){let s=n.ref(1),a=n.ref(null),i=n.ref(null),r=n.ref(null),c=n.ref(null),d=n.ref({static:!1,hold:!1}),u=n.ref([]),m=n.ref(null),b=n.ref(2),C=n.ref(!1);function _(f=p=>p){let p=m.value!==null?u.value[m.value]:null,w=f(u.value.slice()),y=w.length>0&&w[0].dataRef.order.value!==null?w.sort((L,A)=>L.dataRef.order.value-A.dataRef.order.value):Cn(w,L=>$(L.dataRef.domRef)),T=p?y.indexOf(p):null;return T===-1&&(T=null),{options:y,activeOptionIndex:T}}let h=n.computed(()=>e.multiple?1:0),E=n.computed(()=>e.nullable),[N,S]=ln(n.computed(()=>e.modelValue),f=>o("update:modelValue",f),n.computed(()=>e.defaultValue)),V=n.computed(()=>N.value===void 0?U(h.value,{1:[],0:void 0}):N.value),I=null,g=null;function k(f){return U(h.value,{0(){return S==null?void 0:S(f)},1:()=>{let p=n.toRaw(v.value.value).slice(),w=n.toRaw(f),y=p.findIndex(T=>v.compare(w,n.toRaw(T)));return y===-1?p.push(w):p.splice(y,1),S==null?void 0:S(p)}})}let x=n.computed(()=>{});n.watch([x],([f],[p])=>{if(v.virtual.value&&f&&p&&m.value!==null){let w=f.indexOf(p[m.value]);w!==-1?m.value=w:m.value=null}});let v={comboboxState:s,value:V,mode:h,compare(f,p){if(typeof e.by=="string"){let w=e.by;return(f==null?void 0:f[w])===(p==null?void 0:p[w])}return e.by===null?Rn(f,p):e.by(f,p)},calculateIndex(f){return v.virtual.value?e.by===null?v.virtual.value.options.indexOf(f):v.virtual.value.options.findIndex(p=>v.compare(p,f)):u.value.findIndex(p=>v.compare(p.dataRef.value,f))},defaultValue:n.computed(()=>e.defaultValue),nullable:E,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:i,labelRef:a,buttonRef:r,optionsRef:c,disabled:n.computed(()=>e.disabled),options:u,change(f){S(f)},activeOptionIndex:n.computed(()=>{if(C.value&&m.value===null&&(v.virtual.value?v.virtual.value.options.length>0:u.value.length>0)){if(v.virtual.value){let p=v.virtual.value.options.findIndex(w=>{var y;return!((y=v.virtual.value)!=null&&y.disabled(w))});if(p!==-1)return p}let f=u.value.findIndex(p=>!p.dataRef.disabled);if(f!==-1)return f}return m.value}),activationTrigger:b,optionsPropsRef:d,closeCombobox(){C.value=!1,!e.disabled&&s.value!==1&&(s.value=1,m.value=null)},openCombobox(){if(C.value=!0,!e.disabled&&s.value!==0){if(v.value.value){let f=v.calculateIndex(v.value.value);f!==-1&&(m.value=f)}s.value=0}},setActivationTrigger(f){b.value=f},goToOption(f,p,w){C.value=!1,I!==null&&cancelAnimationFrame(I),I=requestAnimationFrame(()=>{if(e.disabled||c.value&&!d.value.static&&s.value===1)return;if(v.virtual.value){m.value=f===M.Specific?p:Je({focus:f},{resolveItems:()=>v.virtual.value.options,resolveActiveIndex:()=>{var L,A;return(A=(L=v.activeOptionIndex.value)!=null?L:v.virtual.value.options.findIndex(j=>{var R;return!((R=v.virtual.value)!=null&&R.disabled(j))}))!=null?A:null},resolveDisabled:L=>v.virtual.value.disabled(L),resolveId(){throw new Error("Function not implemented.")}}),b.value=w??2;return}let y=_();if(y.activeOptionIndex===null){let L=y.options.findIndex(A=>!A.dataRef.disabled);L!==-1&&(y.activeOptionIndex=L)}let T=f===M.Specific?p:Je({focus:f},{resolveItems:()=>y.options,resolveActiveIndex:()=>y.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});m.value=T,b.value=w??2,u.value=y.options})},selectOption(f){let p=u.value.find(y=>y.id===f);if(!p)return;let{dataRef:w}=p;k(w.value)},selectActiveOption(){if(v.activeOptionIndex.value!==null){if(v.virtual.value)k(v.virtual.value.options[v.activeOptionIndex.value]);else{let{dataRef:f}=u.value[v.activeOptionIndex.value];k(f.value)}v.goToOption(M.Specific,v.activeOptionIndex.value)}},registerOption(f,p){let w=n.reactive({id:f,dataRef:p});if(v.virtual.value){u.value.push(w);return}g&&cancelAnimationFrame(g);let y=_(T=>(T.push(w),T));m.value===null&&v.isSelected(p.value.value)&&(y.activeOptionIndex=y.options.indexOf(w)),u.value=y.options,m.value=y.activeOptionIndex,b.value=2,y.options.some(T=>!$(T.dataRef.domRef))&&(g=requestAnimationFrame(()=>{let T=_();u.value=T.options,m.value=T.activeOptionIndex}))},unregisterOption(f,p){if(I!==null&&cancelAnimationFrame(I),p&&(C.value=!0),v.virtual.value){u.value=u.value.filter(y=>y.id!==f);return}let w=_(y=>{let T=y.findIndex(L=>L.id===f);return T!==-1&&y.splice(T,1),y});u.value=w.options,m.value=w.activeOptionIndex,b.value=2},isSelected(f){return U(h.value,{0:()=>v.compare(n.toRaw(v.value.value),n.toRaw(f)),1:()=>n.toRaw(v.value.value).some(p=>v.compare(n.toRaw(p),n.toRaw(f)))})},isActive(f){return m.value===v.calculateIndex(f)}};yn([i,r,c],()=>v.closeCombobox(),n.computed(()=>s.value===0)),n.provide(Xe,v),In(n.computed(()=>U(s.value,{0:re.Open,1:re.Closed})));let O=n.computed(()=>{var f;return(f=$(i))==null?void 0:f.closest("form")});return n.onMounted(()=>{n.watch([O],()=>{if(!O.value||e.defaultValue===void 0)return;function f(){v.change(e.defaultValue)}return O.value.addEventListener("reset",f),()=>{var p;(p=O.value)==null||p.removeEventListener("reset",f)}},{immediate:!0})}),()=>{var f,p,w;let{name:y,disabled:T,form:L,...A}=e,j={open:s.value===0,disabled:T,activeIndex:v.activeOptionIndex.value,activeOption:v.activeOptionIndex.value===null?null:v.virtual.value?v.virtual.value.options[(f=v.activeOptionIndex.value)!=null?f:0]:(w=(p=v.options.value[v.activeOptionIndex.value])==null?void 0:p.dataRef.value)!=null?w:null,value:V.value};return n.h(n.Fragment,[...y!=null&&V.value!=null?Ke({[y]:V.value}).map(([R,us])=>n.h(Tn,$n({features:We.Hidden,key:R,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:L,disabled:T,name:R,value:us}))):[],q({theirProps:{...t,...fe(A,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:j,slots:l,attrs:t,name:"Combobox"})])}}});n.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t}){var o;let s=(o=e.id)!=null?o:`headlessui-combobox-label-${le()}`,a=K("ComboboxLabel");function i(){var r;(r=$(a.inputRef))==null||r.focus({preventScroll:!0})}return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value},{...c}=e,d={id:s,ref:a.labelRef,onClick:i};return q({ourProps:d,theirProps:c,slot:r,attrs:l,slots:t,name:"ComboboxLabel"})}}});let jn=n.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:l,slots:t,expose:o}){var s;let a=(s=e.id)!=null?s:`headlessui-combobox-button-${le()}`,i=K("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});function r(u){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(u.preventDefault(),i.openCombobox()),n.nextTick(()=>{var m;return(m=$(i.inputRef))==null?void 0:m.focus({preventScroll:!0})}))}function c(u){switch(u.key){case D.ArrowDown:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.ArrowUp:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(M.Last)})),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return;case D.Escape:if(i.comboboxState.value!==0)return;u.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&u.stopPropagation(),i.closeCombobox(),n.nextTick(()=>{var m;return(m=i.inputRef.value)==null?void 0:m.focus({preventScroll:!0})});return}}let d=En(n.computed(()=>({as:e.as,type:l.type})),i.buttonRef);return()=>{var u,m;let b={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...C}=e,_={ref:i.buttonRef,id:a,type:d.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(u=$(i.optionsRef))==null?void 0:u.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(m=$(i.labelRef))==null?void 0:m.id,a].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:c,onClick:r};return q({ourProps:_,theirProps:C,slot:b,attrs:l,slots:t,name:"ComboboxButton"})}}}),Hn=n.defineComponent({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:l,attrs:t,slots:o,expose:s}){var a;let i=(a=e.id)!=null?a:`headlessui-combobox-input-${le()}`,r=K("ComboboxInput"),c=n.computed(()=>ke($(r.inputRef))),d={value:!1};s({el:r.inputRef,$el:r.inputRef});function u(){r.change(null);let g=$(r.optionsRef);g&&(g.scrollTop=0),r.goToOption(M.Nothing)}let m=n.computed(()=>{var g;let k=r.value.value;return $(r.inputRef)?typeof e.displayValue<"u"&&k!==void 0?(g=e.displayValue(k))!=null?g:"":typeof k=="string"?k:"":""});n.onMounted(()=>{n.watch([m,r.comboboxState,c],([g,k],[x,v])=>{if(d.value)return;let O=$(r.inputRef);O&&((v===0&&k===1||g!==x)&&(O.value=g),requestAnimationFrame(()=>{var f;if(d.value||!O||((f=c.value)==null?void 0:f.activeElement)!==O)return;let{selectionStart:p,selectionEnd:w}=O;Math.abs((w??0)-(p??0))===0&&p===0&&O.setSelectionRange(O.value.length,O.value.length)}))},{immediate:!0}),n.watch([r.comboboxState],([g],[k])=>{if(g===0&&k===1){if(d.value)return;let x=$(r.inputRef);if(!x)return;let v=x.value,{selectionStart:O,selectionEnd:f,selectionDirection:p}=x;x.value="",x.value=v,p!==null?x.setSelectionRange(O,f,p):x.setSelectionRange(O,f)}})});let b=n.ref(!1);function C(){b.value=!0}function _(){de().nextFrame(()=>{b.value=!1})}let h=an();function E(g){switch(d.value=!0,h(()=>{d.value=!1}),g.key){case D.Enter:if(d.value=!1,r.comboboxState.value!==0||b.value)return;if(g.preventDefault(),g.stopPropagation(),r.activeOptionIndex.value===null){r.closeCombobox();return}r.selectActiveOption(),r.mode.value===0&&r.closeCombobox();break;case D.ArrowDown:return d.value=!1,g.preventDefault(),g.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(M.Next),1:()=>r.openCombobox()});case D.ArrowUp:return d.value=!1,g.preventDefault(),g.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(M.Previous),1:()=>{r.openCombobox(),n.nextTick(()=>{r.value.value||r.goToOption(M.Last)})}});case D.Home:if(g.shiftKey)break;return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.First);case D.PageUp:return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.First);case D.End:if(g.shiftKey)break;return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.Last);case D.PageDown:return d.value=!1,g.preventDefault(),g.stopPropagation(),r.goToOption(M.Last);case D.Escape:if(d.value=!1,r.comboboxState.value!==0)return;g.preventDefault(),r.optionsRef.value&&!r.optionsPropsRef.value.static&&g.stopPropagation(),r.nullable.value&&r.mode.value===0&&r.value.value===null&&u(),r.closeCombobox();break;case D.Tab:if(d.value=!1,r.comboboxState.value!==0)return;r.mode.value===0&&r.activationTrigger.value!==1&&r.selectActiveOption(),r.closeCombobox();break}}function N(g){l("change",g),r.nullable.value&&r.mode.value===0&&g.target.value===""&&u(),r.openCombobox()}function S(g){var k,x,v;let O=(k=g.relatedTarget)!=null?k:J.find(f=>f!==g.currentTarget);if(d.value=!1,!((x=$(r.optionsRef))!=null&&x.contains(O))&&!((v=$(r.buttonRef))!=null&&v.contains(O))&&r.comboboxState.value===0)return g.preventDefault(),r.mode.value===0&&(r.nullable.value&&r.value.value===null?u():r.activationTrigger.value!==1&&r.selectActiveOption()),r.closeCombobox()}function V(g){var k,x,v;let O=(k=g.relatedTarget)!=null?k:J.find(f=>f!==g.currentTarget);(x=$(r.buttonRef))!=null&&x.contains(O)||(v=$(r.optionsRef))!=null&&v.contains(O)||r.disabled.value||r.immediate.value&&r.comboboxState.value!==0&&(r.openCombobox(),de().nextFrame(()=>{r.setActivationTrigger(1)}))}let I=n.computed(()=>{var g,k,x,v;return(v=(x=(k=e.defaultValue)!=null?k:r.defaultValue.value!==void 0?(g=e.displayValue)==null?void 0:g.call(e,r.defaultValue.value):null)!=null?x:r.defaultValue.value)!=null?v:""});return()=>{var g,k,x,v,O,f,p;let w={open:r.comboboxState.value===0},{displayValue:y,onChange:T,...L}=e,A={"aria-controls":(g=r.optionsRef.value)==null?void 0:g.id,"aria-expanded":r.comboboxState.value===0,"aria-activedescendant":r.activeOptionIndex.value===null?void 0:r.virtual.value?(k=r.options.value.find(j=>!r.virtual.value.disabled(j.dataRef.value)&&r.compare(j.dataRef.value,r.virtual.value.options[r.activeOptionIndex.value])))==null?void 0:k.id:(x=r.options.value[r.activeOptionIndex.value])==null?void 0:x.id,"aria-labelledby":(f=(v=$(r.labelRef))==null?void 0:v.id)!=null?f:(O=$(r.buttonRef))==null?void 0:O.id,"aria-autocomplete":"list",id:i,onCompositionstart:C,onCompositionend:_,onKeydown:E,onInput:N,onFocus:V,onBlur:S,role:"combobox",type:(p=t.type)!=null?p:"text",tabIndex:0,ref:r.inputRef,defaultValue:I.value,disabled:r.disabled.value===!0?!0:void 0};return q({ourProps:A,theirProps:L,slot:w,attrs:t,slots:o,features:se.RenderStrategy|se.Static,name:"ComboboxInput"})}}}),zn=n.defineComponent({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:l,slots:t,expose:o}){let s=K("ComboboxOptions"),a=`headlessui-combobox-options-${le()}`;o({el:s.optionsRef,$el:s.optionsRef}),n.watchEffect(()=>{s.optionsPropsRef.value.static=e.static}),n.watchEffect(()=>{s.optionsPropsRef.value.hold=e.hold});let i=Nn(),r=n.computed(()=>i!==null?(i.value&re.Open)===re.Open:s.comboboxState.value===0);On({container:n.computed(()=>$(s.optionsRef)),enabled:n.computed(()=>s.comboboxState.value===0),accept(d){return d.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function c(d){d.preventDefault()}return()=>{var d,u,m;let b={open:s.comboboxState.value===0},C={"aria-labelledby":(m=(d=$(s.labelRef))==null?void 0:d.id)!=null?m:(u=$(s.buttonRef))==null?void 0:u.id,id:a,ref:s.optionsRef,role:"listbox","aria-multiselectable":s.mode.value===1?!0:void 0,onMousedown:c},_=fe(e,["hold"]);return q({ourProps:C,theirProps:_,slot:b,attrs:l,slots:s.virtual.value&&s.comboboxState.value===0?{...t,default:()=>[n.h(Fn,{},t.default)]}:t,features:se.RenderStrategy|se.Static,visible:r.value,name:"ComboboxOptions"})}}}),Un=n.defineComponent({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:l,attrs:t,expose:o}){let s=K("ComboboxOption"),a=`headlessui-combobox-option-${le()}`,i=n.ref(null),r=n.computed(()=>e.disabled);o({el:i,$el:i});let c=n.computed(()=>{var S;return s.virtual.value?s.activeOptionIndex.value===s.calculateIndex(e.value):s.activeOptionIndex.value===null?!1:((S=s.options.value[s.activeOptionIndex.value])==null?void 0:S.id)===a}),d=n.computed(()=>s.isSelected(e.value)),u=n.inject(et,null),m=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:i,order:n.computed(()=>e.order)}));n.onMounted(()=>s.registerOption(a,m)),n.onUnmounted(()=>s.unregisterOption(a,c.value)),n.watchEffect(()=>{let S=$(i);S&&(u==null||u.value.measureElement(S))}),n.watchEffect(()=>{s.comboboxState.value===0&&c.value&&(s.virtual.value||s.activationTrigger.value!==0&&n.nextTick(()=>{var S,V;return(V=(S=$(i))==null?void 0:S.scrollIntoView)==null?void 0:V.call(S,{block:"nearest"})}))});function b(S){S.preventDefault(),S.button===qe.Left&&(r.value||(s.selectOption(a),je()||requestAnimationFrame(()=>{var V;return(V=$(s.inputRef))==null?void 0:V.focus({preventScroll:!0})}),s.mode.value===0&&s.closeCombobox()))}function C(){var S;if(e.disabled||(S=s.virtual.value)!=null&&S.disabled(e.value))return s.goToOption(M.Nothing);let V=s.calculateIndex(e.value);s.goToOption(M.Specific,V)}let _=Sn();function h(S){_.update(S)}function E(S){var V;if(!_.wasMoved(S)||e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value)return;let I=s.calculateIndex(e.value);s.goToOption(M.Specific,I,0)}function N(S){var V;_.wasMoved(S)&&(e.disabled||(V=s.virtual.value)!=null&&V.disabled(e.value)||c.value&&(s.optionsPropsRef.value.hold||s.goToOption(M.Nothing)))}return()=>{let{disabled:S}=e,V={active:c.value,selected:d.value,disabled:S},I={id:a,ref:i,role:"option",tabIndex:S===!0?void 0:-1,"aria-disabled":S===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onMousedown:b,onFocus:C,onPointerenter:h,onMouseenter:h,onPointermove:E,onMousemove:E,onPointerleave:N,onMouseleave:N},g=fe(e,["order","value"]);return q({ourProps:I,theirProps:g,slot:V,attrs:t,slots:l,name:"ComboboxOption"})}}});function Zn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})])}function Wn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z","clip-rule":"evenodd"})])}function Gn(e,l){return n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z","clip-rule":"evenodd"})])}var tt=!1;function pe(e,l,t){return Array.isArray(e)?(e.length=Math.max(e.length,l),e.splice(l,1,t),t):(e[l]=t,t)}function Ve(e,l){if(Array.isArray(e)){e.splice(l,1);return}delete e[l]}function qn(){return nt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function nt(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Jn=typeof Proxy=="function",Kn="devtools-plugin:setup",Yn="plugin:settings:set";let ee,Te;function Qn(){var e;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,Te=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ee=!0,Te=globalThis.perf_hooks.performance):ee=!1),ee}function Xn(){return Qn()?Te.now():Date.now()}class eo{constructor(l,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=l,this.hook=t;const o={};if(l.settings)for(const i in l.settings){const r=l.settings[i];o[i]=r.defaultValue}const s=`__vue-devtools-plugin-settings__${l.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(s),r=JSON.parse(i);Object.assign(a,r)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch{}a=i},now(){return Xn()}},t&&t.on(Yn,(i,r)=>{i===this.plugin.id&&this.fallbacks.setSettings(r)}),this.proxiedOn=new Proxy({},{get:(i,r)=>this.target?this.target.on[r]:(...c)=>{this.onQueue.push({method:r,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,r)=>this.target?this.target[r]:r==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(r)?(...c)=>(this.targetQueue.push({method:r,args:c,resolve:()=>{}}),this.fallbacks[r](...c)):(...c)=>new Promise(d=>{this.targetQueue.push({method:r,args:c,resolve:d})})})}async setRealTarget(l){this.target=l;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function ot(e,l){const t=e,o=nt(),s=qn(),a=Jn&&t.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Kn,e,l);else{const i=a?new eo(t,s):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:l,proxy:i}),i&&l(i.proxiedTarget)}}/*!
8
8
  * pinia v2.1.7
9
9
  * (c) 2023 Eduardo San Martin Morote
10
10
  * @license MIT
11
- */let ce;const de=e=>ce=e,st=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Y(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var z;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(z||(z={}));const ge=typeof window<"u",ue=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&ge,rt=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};function no(e,{autoBom:l=!1}={}){return l&&/^\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}function Ie(e,l,t){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){ct(o.response,l,t)},o.onerror=function(){console.error("could not download file")},o.send()}function at(e){const l=new XMLHttpRequest;l.open("HEAD",e,!1);try{l.send()}catch{}return l.status>=200&&l.status<=299}function be(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}const ve=typeof navigator=="object"?navigator:{userAgent:""},it=/Macintosh/.test(ve.userAgent)&&/AppleWebKit/.test(ve.userAgent)&&!/Safari/.test(ve.userAgent),ct=ge?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!it?oo:"msSaveOrOpenBlob"in ve?lo:so:()=>{};function oo(e,l="download",t){const o=document.createElement("a");o.download=l,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?at(o.href)?Ie(e,l,t):(o.target="_blank",be(o)):be(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){be(o)},0))}function lo(e,l="download",t){if(typeof e=="string")if(at(e))Ie(e,l,t);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){be(o)})}else navigator.msSaveOrOpenBlob(no(e,t),l)}function so(e,l,t,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return Ie(e,l,t);const s=e.type==="application/octet-stream",a=/constructor/i.test(String(rt.HTMLElement))||"safari"in rt,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&a||it)&&typeof FileReader<"u"){const r=new FileReader;r.onloadend=function(){let c=r.result;if(typeof c!="string")throw o=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=c:location.assign(c),o=null},r.readAsDataURL(e)}else{const r=URL.createObjectURL(e);o?o.location.assign(r):location.href=r,o=null,setTimeout(function(){URL.revokeObjectURL(r)},4e4)}}function B(e,l){const t="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,l):l==="error"?console.error(t):l==="warn"?console.warn(t):console.log(t)}function Le(e){return"_a"in e&&"install"in e}function dt(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function ut(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function ro(e){if(!dt())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(l){if(ut(l))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(l)}}async function ao(e){if(!dt())try{ft(e,JSON.parse(await navigator.clipboard.readText())),B("Global state pasted from clipboard.")}catch(l){if(ut(l))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(l)}}async function io(e){try{ct(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(l){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(l)}}let Z;function co(){Z||(Z=document.createElement("input"),Z.type="file",Z.accept=".json");function e(){return new Promise((l,t)=>{Z.onchange=async()=>{const o=Z.files;if(!o)return l(null);const s=o.item(0);return l(s?{text:await s.text(),file:s}:null)},Z.oncancel=()=>l(null),Z.onerror=t,Z.click()})}return e}async function uo(e){try{const t=await co()();if(!t)return;const{text:o,file:s}=t;ft(e,JSON.parse(o)),B(`Global state imported from "${s.name}".`)}catch(l){B("Failed to import the state from JSON. Check the console for more details.","error"),console.error(l)}}function ft(e,l){for(const t in l){const o=e.state.value[t];o?Object.assign(o,l[t]):e.state.value[t]=l[t]}}function H(e){return{_custom:{display:e}}}const pt="🍍 Pinia (root)",Be="_root";function fo(e){return Le(e)?{id:Be,label:pt}:{id:e.$id,label:e.$id}}function po(e){if(Le(e)){const t=Array.from(e._s.keys()),o=e._s;return{state:t.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:t.filter(a=>o.get(a)._getters).map(a=>{const i=o.get(a);return{editable:!1,key:a,value:i._getters.reduce((r,c)=>(r[c]=i[c],r),{})}})}}const l={state:Object.keys(e.$state).map(t=>({editable:!0,key:t,value:e.$state[t]}))};return e._getters&&e._getters.length&&(l.getters=e._getters.map(t=>({editable:!1,key:t,value:e[t]}))),e._customProperties.size&&(l.customProperties=Array.from(e._customProperties).map(t=>({editable:!0,key:t,value:e[t]}))),l}function mo(e){return e?Array.isArray(e)?e.reduce((l,t)=>(l.keys.push(t.key),l.operations.push(t.type),l.oldValue[t.key]=t.oldValue,l.newValue[t.key]=t.newValue,l),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:H(e.type),key:H(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ho(e){switch(e){case z.direct:return"mutation";case z.patchFunction:return"$patch";case z.patchObject:return"$patch";default:return"unknown"}}let te=!0;const _e=[],Q="pinia:mutations",P="pinia",{assign:go}=Object,xe=e=>"🍍 "+e;function bo(e,l){lt({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:_e,app:e},t=>{typeof t.now!="function"&&B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:Q,label:"Pinia 🍍",color:15064968}),t.addInspector({id:P,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{ro(l)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await ao(l),t.sendInspectorTree(P),t.sendInspectorState(P)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{io(l)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await uo(l),t.sendInspectorTree(P),t.sendInspectorState(P)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const s=l._s.get(o);s?typeof s.$reset!="function"?B(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((o,s)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const i=o.componentInstance.proxy._pStores;Object.values(i).forEach(r=>{o.instanceData.state.push({type:xe(r.$id),key:"state",editable:!0,value:r._isOptionsAPI?{_custom:{value:n.toRaw(r.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>r.$reset()}]}}:Object.keys(r.$state).reduce((c,d)=>(c[d]=r.$state[d],c),{})}),r._getters&&r._getters.length&&o.instanceData.state.push({type:xe(r.$id),key:"getters",editable:!1,value:r._getters.reduce((c,d)=>{try{c[d]=r[d]}catch(u){c[d]=u}return c},{})})})}}),t.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===P){let s=[l];s=s.concat(Array.from(l._s.values())),o.rootNodes=(o.filter?s.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):pt.toLowerCase().includes(o.filter.toLowerCase())):s).map(fo)}}),t.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===P){const s=o.nodeId===Be?l:l._s.get(o.nodeId);if(!s)return;s&&(o.state=po(s))}}),t.on.editInspectorState((o,s)=>{if(o.app===e&&o.inspectorId===P){const a=o.nodeId===Be?l:l._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:i}=o;Le(a)?i.unshift("state"):(i.length!==1||!a._customProperties.has(i[0])||i[0]in a.$state)&&i.unshift("$state"),te=!1,o.set(a,i,o.state.value),te=!0}}),t.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const s=o.type.replace(/^🍍\s*/,""),a=l._s.get(s);if(!a)return B(`store "${s}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return B(`Invalid path for store "${s}":
11
+ */let ae;const ie=e=>ae=e,lt=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Y(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var z;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(z||(z={}));const me=typeof window<"u",ce=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&me,st=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};function to(e,{autoBom:l=!1}={}){return l&&/^\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}function Ne(e,l,t){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){it(o.response,l,t)},o.onerror=function(){console.error("could not download file")},o.send()}function rt(e){const l=new XMLHttpRequest;l.open("HEAD",e,!1);try{l.send()}catch{}return l.status>=200&&l.status<=299}function he(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}const ge=typeof navigator=="object"?navigator:{userAgent:""},at=/Macintosh/.test(ge.userAgent)&&/AppleWebKit/.test(ge.userAgent)&&!/Safari/.test(ge.userAgent),it=me?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!at?no:"msSaveOrOpenBlob"in ge?oo:lo:()=>{};function no(e,l="download",t){const o=document.createElement("a");o.download=l,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?rt(o.href)?Ne(e,l,t):(o.target="_blank",he(o)):he(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){he(o)},0))}function oo(e,l="download",t){if(typeof e=="string")if(rt(e))Ne(e,l,t);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){he(o)})}else navigator.msSaveOrOpenBlob(to(e,t),l)}function lo(e,l,t,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return Ne(e,l,t);const s=e.type==="application/octet-stream",a=/constructor/i.test(String(st.HTMLElement))||"safari"in st,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&a||at)&&typeof FileReader<"u"){const r=new FileReader;r.onloadend=function(){let c=r.result;if(typeof c!="string")throw o=null,new Error("Wrong reader.result type");c=i?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=c:location.assign(c),o=null},r.readAsDataURL(e)}else{const r=URL.createObjectURL(e);o?o.location.assign(r):location.href=r,o=null,setTimeout(function(){URL.revokeObjectURL(r)},4e4)}}function B(e,l){const t="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,l):l==="error"?console.error(t):l==="warn"?console.warn(t):console.log(t)}function Ie(e){return"_a"in e&&"install"in e}function ct(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function dt(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function so(e){if(!ct())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(l){if(dt(l))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(l)}}async function ro(e){if(!ct())try{ut(e,JSON.parse(await navigator.clipboard.readText())),B("Global state pasted from clipboard.")}catch(l){if(dt(l))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(l)}}async function ao(e){try{it(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(l){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(l)}}let Z;function io(){Z||(Z=document.createElement("input"),Z.type="file",Z.accept=".json");function e(){return new Promise((l,t)=>{Z.onchange=async()=>{const o=Z.files;if(!o)return l(null);const s=o.item(0);return l(s?{text:await s.text(),file:s}:null)},Z.oncancel=()=>l(null),Z.onerror=t,Z.click()})}return e}async function co(e){try{const t=await io()();if(!t)return;const{text:o,file:s}=t;ut(e,JSON.parse(o)),B(`Global state imported from "${s.name}".`)}catch(l){B("Failed to import the state from JSON. Check the console for more details.","error"),console.error(l)}}function ut(e,l){for(const t in l){const o=e.state.value[t];o?Object.assign(o,l[t]):e.state.value[t]=l[t]}}function H(e){return{_custom:{display:e}}}const ft="🍍 Pinia (root)",Le="_root";function uo(e){return Ie(e)?{id:Le,label:ft}:{id:e.$id,label:e.$id}}function fo(e){if(Ie(e)){const t=Array.from(e._s.keys()),o=e._s;return{state:t.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:t.filter(a=>o.get(a)._getters).map(a=>{const i=o.get(a);return{editable:!1,key:a,value:i._getters.reduce((r,c)=>(r[c]=i[c],r),{})}})}}const l={state:Object.keys(e.$state).map(t=>({editable:!0,key:t,value:e.$state[t]}))};return e._getters&&e._getters.length&&(l.getters=e._getters.map(t=>({editable:!1,key:t,value:e[t]}))),e._customProperties.size&&(l.customProperties=Array.from(e._customProperties).map(t=>({editable:!0,key:t,value:e[t]}))),l}function po(e){return e?Array.isArray(e)?e.reduce((l,t)=>(l.keys.push(t.key),l.operations.push(t.type),l.oldValue[t.key]=t.oldValue,l.newValue[t.key]=t.newValue,l),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:H(e.type),key:H(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function mo(e){switch(e){case z.direct:return"mutation";case z.patchFunction:return"$patch";case z.patchObject:return"$patch";default:return"unknown"}}let te=!0;const be=[],Q="pinia:mutations",P="pinia",{assign:ho}=Object,ve=e=>"🍍 "+e;function go(e,l){ot({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:be,app:e},t=>{typeof t.now!="function"&&B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:Q,label:"Pinia 🍍",color:15064968}),t.addInspector({id:P,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{so(l)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await ro(l),t.sendInspectorTree(P),t.sendInspectorState(P)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{ao(l)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await co(l),t.sendInspectorTree(P),t.sendInspectorState(P)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const s=l._s.get(o);s?typeof s.$reset!="function"?B(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((o,s)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const i=o.componentInstance.proxy._pStores;Object.values(i).forEach(r=>{o.instanceData.state.push({type:ve(r.$id),key:"state",editable:!0,value:r._isOptionsAPI?{_custom:{value:n.toRaw(r.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>r.$reset()}]}}:Object.keys(r.$state).reduce((c,d)=>(c[d]=r.$state[d],c),{})}),r._getters&&r._getters.length&&o.instanceData.state.push({type:ve(r.$id),key:"getters",editable:!1,value:r._getters.reduce((c,d)=>{try{c[d]=r[d]}catch(u){c[d]=u}return c},{})})})}}),t.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===P){let s=[l];s=s.concat(Array.from(l._s.values())),o.rootNodes=(o.filter?s.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):ft.toLowerCase().includes(o.filter.toLowerCase())):s).map(uo)}}),t.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===P){const s=o.nodeId===Le?l:l._s.get(o.nodeId);if(!s)return;s&&(o.state=fo(s))}}),t.on.editInspectorState((o,s)=>{if(o.app===e&&o.inspectorId===P){const a=o.nodeId===Le?l:l._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:i}=o;Ie(a)?i.unshift("state"):(i.length!==1||!a._customProperties.has(i[0])||i[0]in a.$state)&&i.unshift("$state"),te=!1,o.set(a,i,o.state.value),te=!0}}),t.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const s=o.type.replace(/^🍍\s*/,""),a=l._s.get(s);if(!a)return B(`store "${s}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return B(`Invalid path for store "${s}":
12
12
  ${i}
13
- Only state can be modified.`);i[0]="$state",te=!1,o.set(a,i,o.state.value),te=!0}})})}function vo(e,l){_e.includes(xe(l.$id))||_e.push(xe(l.$id)),lt({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:_e,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const o=typeof t.now=="function"?t.now.bind(t):Date.now;l.$onAction(({after:i,onError:r,name:c,args:d})=>{const u=mt++;t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛫 "+c,subtitle:"start",data:{store:H(l.$id),action:H(c),args:d},groupId:u}}),i(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛬 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:d,result:m},groupId:u}})}),r(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:d,error:m},groupId:u}})})},!0),l._customProperties.forEach(i=>{n.watch(()=>n.unref(l[i]),(r,c)=>{t.notifyComponentUpdate(),t.sendInspectorState(P),te&&t.addTimelineEvent({layerId:Q,event:{time:o(),title:"Change",subtitle:i,data:{newValue:r,oldValue:c},groupId:W}})},{deep:!0})}),l.$subscribe(({events:i,type:r},c)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(P),!te)return;const d={time:o(),title:ho(r),data:go({store:H(l.$id)},mo(i)),groupId:W};r===z.patchFunction?d.subtitle="⤵️":r===z.patchObject?d.subtitle="🧩":i&&!Array.isArray(i)&&(d.subtitle=i.type),i&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),t.addTimelineEvent({layerId:Q,event:d})},{detached:!0,flush:"sync"});const s=l._hotUpdate;l._hotUpdate=n.markRaw(i=>{s(i),t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🔥 "+l.$id,subtitle:"HMR update",data:{store:H(l.$id),info:H("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(P),t.sendInspectorState(P)});const{$dispose:a}=l;l.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(P),t.sendInspectorState(P),t.getSettings().logStoreChanges&&B(`Disposed "${l.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(P),t.sendInspectorState(P),t.getSettings().logStoreChanges&&B(`"${l.$id}" store installed 🆕`)})}let mt=0,W;function ht(e,l,t){const o=l.reduce((s,a)=>(s[a]=n.toRaw(e)[a],s),{});for(const s in o)e[s]=function(){const a=mt,i=t?new Proxy(e,{get(...c){return W=a,Reflect.get(...c)},set(...c){return W=a,Reflect.set(...c)}}):e;W=a;const r=o[s].apply(i,arguments);return W=void 0,r}}function _o({app:e,store:l,options:t}){if(l.$id.startsWith("__hot:"))return;l._isOptionsAPI=!!t.state,ht(l,Object.keys(t.actions),l._isOptionsAPI);const o=l._hotUpdate;n.toRaw(l)._hotUpdate=function(s){o.apply(this,arguments),ht(l,Object.keys(s._hmrPayload.actions),!!l._isOptionsAPI)},vo(e,l)}function xo(){const e=n.effectScope(!0),l=e.run(()=>n.ref({}));let t=[],o=[];const s=n.markRaw({install(a){de(s),s._a=a,a.provide(st,s),a.config.globalProperties.$pinia=s,ue&&bo(a,s),o.forEach(i=>t.push(i)),o=[]},use(a){return!this._a&&!nt?o.push(a):t.push(a),this},_p:t,_a:null,_e:e,_s:new Map,state:l});return ue&&typeof Proxy<"u"&&s.use(_o),s}function gt(e,l){for(const t in l){const o=l[t];if(!(t in e))continue;const s=e[t];Y(s)&&Y(o)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=gt(s,o):e[t]=o}return e}const bt=()=>{};function vt(e,l,t,o=bt){e.push(l);const s=()=>{const a=e.indexOf(l);a>-1&&(e.splice(a,1),o())};return!t&&n.getCurrentScope()&&n.onScopeDispose(s),s}function ne(e,...l){e.slice().forEach(t=>{t(...l)})}const Co=e=>e();function Re(e,l){e instanceof Map&&l instanceof Map&&l.forEach((t,o)=>e.set(o,t)),e instanceof Set&&l instanceof Set&&l.forEach(e.add,e);for(const t in l){if(!l.hasOwnProperty(t))continue;const o=l[t],s=e[t];Y(s)&&Y(o)&&e.hasOwnProperty(t)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=Re(s,o):e[t]=o}return e}const wo=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function yo(e){return!Y(e)||!e.hasOwnProperty(wo)}const{assign:F}=Object;function _t(e){return!!(n.isRef(e)&&e.effect)}function xt(e,l,t,o){const{state:s,actions:a,getters:i}=l,r=t.state.value[e];let c;function d(){!r&&(process.env.NODE_ENV==="production"||!o)&&(t.state.value[e]=s?s():{});const u=process.env.NODE_ENV!=="production"&&o?n.toRefs(n.ref(s?s():{}).value):n.toRefs(t.state.value[e]);return F(u,a,Object.keys(i||{}).reduce((m,b)=>(process.env.NODE_ENV!=="production"&&b in u&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${e}".`),m[b]=n.markRaw(n.computed(()=>{de(t);const _=t._s.get(e);return i[b].call(_,_)})),m),{}))}return c=Me(e,d,l,t,o,!0),c}function Me(e,l,t={},o,s,a){let i;const r=F({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!nt&&(c.onTrigger=f=>{d?_=f:d==!1&&!C._hotUpdating&&(Array.isArray(_)?_.push(f):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,u,m=[],b=[],_;const x=o.state.value[e];!a&&!x&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[e]={});const h=n.ref({});let E;function N(f){let p;d=u=!1,process.env.NODE_ENV!=="production"&&(_=[]),typeof f=="function"?(f(o.state.value[e]),p={type:z.patchFunction,storeId:e,events:_}):(Re(o.state.value[e],f),p={type:z.patchObject,payload:f,storeId:e,events:_});const w=E=Symbol();n.nextTick().then(()=>{E===w&&(d=!0)}),u=!0,ne(m,p,o.state.value[e])}const S=a?function(){const{state:p}=t,w=p?p():{};this.$patch(y=>{F(y,w)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:bt;function V(){i.stop(),m=[],b=[],o._s.delete(e)}function I(f,p){return function(){de(o);const w=Array.from(arguments),y=[],T=[];function L(R){y.push(R)}function A(R){T.push(R)}ne(b,{args:w,name:f,store:C,after:L,onError:A});let j;try{j=p.apply(this&&this.$id===e?this:C,w)}catch(R){throw ne(T,R),R}return j instanceof Promise?j.then(R=>(ne(y,R),R)).catch(R=>(ne(T,R),Promise.reject(R))):(ne(y,j),j)}}const g=n.markRaw({actions:{},getters:{},state:[],hotState:h}),k={_p:o,$id:e,$onAction:vt.bind(null,b),$patch:N,$reset:S,$subscribe(f,p={}){const w=vt(m,f,p.detached,()=>y()),y=i.run(()=>n.watch(()=>o.state.value[e],T=>{(p.flush==="sync"?u:d)&&f({storeId:e,type:z.direct,events:_},T)},F({},c,p)));return w},$dispose:V},C=n.reactive(process.env.NODE_ENV!=="production"||ue?F({_hmrPayload:g,_customProperties:n.markRaw(new Set)},k):k);o._s.set(e,C);const O=(o._a&&o._a.runWithContext||Co)(()=>o._e.run(()=>(i=n.effectScope()).run(l)));for(const f in O){const p=O[f];if(n.isRef(p)&&!_t(p)||n.isReactive(p))process.env.NODE_ENV!=="production"&&s?he(h.value,f,n.toRef(O,f)):a||(x&&yo(p)&&(n.isRef(p)?p.value=x[f]:Re(p,x[f])),o.state.value[e][f]=p),process.env.NODE_ENV!=="production"&&g.state.push(f);else if(typeof p=="function"){const w=process.env.NODE_ENV!=="production"&&s?p:I(f,p);O[f]=w,process.env.NODE_ENV!=="production"&&(g.actions[f]=p),r.actions[f]=p}else process.env.NODE_ENV!=="production"&&_t(p)&&(g.getters[f]=a?t.getters[f]:p,ge&&(O._getters||(O._getters=n.markRaw([]))).push(f))}if(F(C,O),F(n.toRaw(C),O),Object.defineProperty(C,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?h.value:o.state.value[e],set:f=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");N(p=>{F(p,f)})}}),process.env.NODE_ENV!=="production"&&(C._hotUpdate=n.markRaw(f=>{C._hotUpdating=!0,f._hmrPayload.state.forEach(p=>{if(p in C.$state){const w=f.$state[p],y=C.$state[p];typeof w=="object"&&Y(w)&&Y(y)?gt(w,y):f.$state[p]=y}he(C,p,n.toRef(f.$state,p))}),Object.keys(C.$state).forEach(p=>{p in f.$state||Te(C,p)}),d=!1,u=!1,o.state.value[e]=n.toRef(f._hmrPayload,"hotState"),u=!0,n.nextTick().then(()=>{d=!0});for(const p in f._hmrPayload.actions){const w=f[p];he(C,p,I(p,w))}for(const p in f._hmrPayload.getters){const w=f._hmrPayload.getters[p],y=a?n.computed(()=>(de(o),w.call(C,C))):w;he(C,p,y)}Object.keys(C._hmrPayload.getters).forEach(p=>{p in f._hmrPayload.getters||Te(C,p)}),Object.keys(C._hmrPayload.actions).forEach(p=>{p in f._hmrPayload.actions||Te(C,p)}),C._hmrPayload=f._hmrPayload,C._getters=f._getters,C._hotUpdating=!1})),ue){const f={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(p=>{Object.defineProperty(C,p,F({value:C[p]},f))})}return o._p.forEach(f=>{if(ue){const p=i.run(()=>f({store:C,app:o._a,pinia:o,options:r}));Object.keys(p||{}).forEach(w=>C._customProperties.add(w)),F(C,p)}else F(C,i.run(()=>f({store:C,app:o._a,pinia:o,options:r})))}),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
13
+ Only state can be modified.`);i[0]="$state",te=!1,o.set(a,i,o.state.value),te=!0}})})}function bo(e,l){be.includes(ve(l.$id))||be.push(ve(l.$id)),ot({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:be,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const o=typeof t.now=="function"?t.now.bind(t):Date.now;l.$onAction(({after:i,onError:r,name:c,args:d})=>{const u=pt++;t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛫 "+c,subtitle:"start",data:{store:H(l.$id),action:H(c),args:d},groupId:u}}),i(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛬 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:d,result:m},groupId:u}})}),r(m=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),logType:"error",title:"💥 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:d,error:m},groupId:u}})})},!0),l._customProperties.forEach(i=>{n.watch(()=>n.unref(l[i]),(r,c)=>{t.notifyComponentUpdate(),t.sendInspectorState(P),te&&t.addTimelineEvent({layerId:Q,event:{time:o(),title:"Change",subtitle:i,data:{newValue:r,oldValue:c},groupId:W}})},{deep:!0})}),l.$subscribe(({events:i,type:r},c)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(P),!te)return;const d={time:o(),title:mo(r),data:ho({store:H(l.$id)},po(i)),groupId:W};r===z.patchFunction?d.subtitle="⤵️":r===z.patchObject?d.subtitle="🧩":i&&!Array.isArray(i)&&(d.subtitle=i.type),i&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),t.addTimelineEvent({layerId:Q,event:d})},{detached:!0,flush:"sync"});const s=l._hotUpdate;l._hotUpdate=n.markRaw(i=>{s(i),t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🔥 "+l.$id,subtitle:"HMR update",data:{store:H(l.$id),info:H("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(P),t.sendInspectorState(P)});const{$dispose:a}=l;l.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(P),t.sendInspectorState(P),t.getSettings().logStoreChanges&&B(`Disposed "${l.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(P),t.sendInspectorState(P),t.getSettings().logStoreChanges&&B(`"${l.$id}" store installed 🆕`)})}let pt=0,W;function mt(e,l,t){const o=l.reduce((s,a)=>(s[a]=n.toRaw(e)[a],s),{});for(const s in o)e[s]=function(){const a=pt,i=t?new Proxy(e,{get(...c){return W=a,Reflect.get(...c)},set(...c){return W=a,Reflect.set(...c)}}):e;W=a;const r=o[s].apply(i,arguments);return W=void 0,r}}function vo({app:e,store:l,options:t}){if(l.$id.startsWith("__hot:"))return;l._isOptionsAPI=!!t.state,mt(l,Object.keys(t.actions),l._isOptionsAPI);const o=l._hotUpdate;n.toRaw(l)._hotUpdate=function(s){o.apply(this,arguments),mt(l,Object.keys(s._hmrPayload.actions),!!l._isOptionsAPI)},bo(e,l)}function Co(){const e=n.effectScope(!0),l=e.run(()=>n.ref({}));let t=[],o=[];const s=n.markRaw({install(a){ie(s),s._a=a,a.provide(lt,s),a.config.globalProperties.$pinia=s,ce&&go(a,s),o.forEach(i=>t.push(i)),o=[]},use(a){return!this._a&&!tt?o.push(a):t.push(a),this},_p:t,_a:null,_e:e,_s:new Map,state:l});return ce&&typeof Proxy<"u"&&s.use(vo),s}function ht(e,l){for(const t in l){const o=l[t];if(!(t in e))continue;const s=e[t];Y(s)&&Y(o)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=ht(s,o):e[t]=o}return e}const gt=()=>{};function bt(e,l,t,o=gt){e.push(l);const s=()=>{const a=e.indexOf(l);a>-1&&(e.splice(a,1),o())};return!t&&n.getCurrentScope()&&n.onScopeDispose(s),s}function ne(e,...l){e.slice().forEach(t=>{t(...l)})}const _o=e=>e();function Be(e,l){e instanceof Map&&l instanceof Map&&l.forEach((t,o)=>e.set(o,t)),e instanceof Set&&l instanceof Set&&l.forEach(e.add,e);for(const t in l){if(!l.hasOwnProperty(t))continue;const o=l[t],s=e[t];Y(s)&&Y(o)&&e.hasOwnProperty(t)&&!n.isRef(o)&&!n.isReactive(o)?e[t]=Be(s,o):e[t]=o}return e}const xo=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function wo(e){return!Y(e)||!e.hasOwnProperty(xo)}const{assign:F}=Object;function vt(e){return!!(n.isRef(e)&&e.effect)}function Ct(e,l,t,o){const{state:s,actions:a,getters:i}=l,r=t.state.value[e];let c;function d(){!r&&(process.env.NODE_ENV==="production"||!o)&&(t.state.value[e]=s?s():{});const u=process.env.NODE_ENV!=="production"&&o?n.toRefs(n.ref(s?s():{}).value):n.toRefs(t.state.value[e]);return F(u,a,Object.keys(i||{}).reduce((m,b)=>(process.env.NODE_ENV!=="production"&&b in u&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${e}".`),m[b]=n.markRaw(n.computed(()=>{ie(t);const C=t._s.get(e);return i[b].call(C,C)})),m),{}))}return c=Re(e,d,l,t,o,!0),c}function Re(e,l,t={},o,s,a){let i;const r=F({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!tt&&(c.onTrigger=f=>{d?C=f:d==!1&&!x._hotUpdating&&(Array.isArray(C)?C.push(f):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,u,m=[],b=[],C;const _=o.state.value[e];!a&&!_&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[e]={});const h=n.ref({});let E;function N(f){let p;d=u=!1,process.env.NODE_ENV!=="production"&&(C=[]),typeof f=="function"?(f(o.state.value[e]),p={type:z.patchFunction,storeId:e,events:C}):(Be(o.state.value[e],f),p={type:z.patchObject,payload:f,storeId:e,events:C});const w=E=Symbol();n.nextTick().then(()=>{E===w&&(d=!0)}),u=!0,ne(m,p,o.state.value[e])}const S=a?function(){const{state:p}=t,w=p?p():{};this.$patch(y=>{F(y,w)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:gt;function V(){i.stop(),m=[],b=[],o._s.delete(e)}function I(f,p){return function(){ie(o);const w=Array.from(arguments),y=[],T=[];function L(R){y.push(R)}function A(R){T.push(R)}ne(b,{args:w,name:f,store:x,after:L,onError:A});let j;try{j=p.apply(this&&this.$id===e?this:x,w)}catch(R){throw ne(T,R),R}return j instanceof Promise?j.then(R=>(ne(y,R),R)).catch(R=>(ne(T,R),Promise.reject(R))):(ne(y,j),j)}}const g=n.markRaw({actions:{},getters:{},state:[],hotState:h}),k={_p:o,$id:e,$onAction:bt.bind(null,b),$patch:N,$reset:S,$subscribe(f,p={}){const w=bt(m,f,p.detached,()=>y()),y=i.run(()=>n.watch(()=>o.state.value[e],T=>{(p.flush==="sync"?u:d)&&f({storeId:e,type:z.direct,events:C},T)},F({},c,p)));return w},$dispose:V},x=n.reactive(process.env.NODE_ENV!=="production"||ce?F({_hmrPayload:g,_customProperties:n.markRaw(new Set)},k):k);o._s.set(e,x);const O=(o._a&&o._a.runWithContext||_o)(()=>o._e.run(()=>(i=n.effectScope()).run(l)));for(const f in O){const p=O[f];if(n.isRef(p)&&!vt(p)||n.isReactive(p))process.env.NODE_ENV!=="production"&&s?pe(h.value,f,n.toRef(O,f)):a||(_&&wo(p)&&(n.isRef(p)?p.value=_[f]:Be(p,_[f])),o.state.value[e][f]=p),process.env.NODE_ENV!=="production"&&g.state.push(f);else if(typeof p=="function"){const w=process.env.NODE_ENV!=="production"&&s?p:I(f,p);O[f]=w,process.env.NODE_ENV!=="production"&&(g.actions[f]=p),r.actions[f]=p}else process.env.NODE_ENV!=="production"&&vt(p)&&(g.getters[f]=a?t.getters[f]:p,me&&(O._getters||(O._getters=n.markRaw([]))).push(f))}if(F(x,O),F(n.toRaw(x),O),Object.defineProperty(x,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?h.value:o.state.value[e],set:f=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");N(p=>{F(p,f)})}}),process.env.NODE_ENV!=="production"&&(x._hotUpdate=n.markRaw(f=>{x._hotUpdating=!0,f._hmrPayload.state.forEach(p=>{if(p in x.$state){const w=f.$state[p],y=x.$state[p];typeof w=="object"&&Y(w)&&Y(y)?ht(w,y):f.$state[p]=y}pe(x,p,n.toRef(f.$state,p))}),Object.keys(x.$state).forEach(p=>{p in f.$state||Ve(x,p)}),d=!1,u=!1,o.state.value[e]=n.toRef(f._hmrPayload,"hotState"),u=!0,n.nextTick().then(()=>{d=!0});for(const p in f._hmrPayload.actions){const w=f[p];pe(x,p,I(p,w))}for(const p in f._hmrPayload.getters){const w=f._hmrPayload.getters[p],y=a?n.computed(()=>(ie(o),w.call(x,x))):w;pe(x,p,y)}Object.keys(x._hmrPayload.getters).forEach(p=>{p in f._hmrPayload.getters||Ve(x,p)}),Object.keys(x._hmrPayload.actions).forEach(p=>{p in f._hmrPayload.actions||Ve(x,p)}),x._hmrPayload=f._hmrPayload,x._getters=f._getters,x._hotUpdating=!1})),ce){const f={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(p=>{Object.defineProperty(x,p,F({value:x[p]},f))})}return o._p.forEach(f=>{if(ce){const p=i.run(()=>f({store:x,app:o._a,pinia:o,options:r}));Object.keys(p||{}).forEach(w=>x._customProperties.add(w)),F(x,p)}else F(x,i.run(()=>f({store:x,app:o._a,pinia:o,options:r})))}),process.env.NODE_ENV!=="production"&&x.$state&&typeof x.$state=="object"&&typeof x.$state.constructor=="function"&&!x.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
14
14
  state: () => new MyClass()
15
- Found in store "${C.$id}".`),x&&a&&t.hydrate&&t.hydrate(C.$state,x),d=!0,u=!0,C}function Ce(e,l,t){let o,s;const a=typeof l=="function";if(typeof e=="string")o=e,s=a?t:l;else if(s=e,o=e.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function i(r,c){const d=n.hasInjectionContext();if(r=(process.env.NODE_ENV==="test"&&ce&&ce._testing?null:r)||(d?n.inject(st,null):null),r&&de(r),process.env.NODE_ENV!=="production"&&!ce)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
15
+ Found in store "${x.$id}".`),_&&a&&t.hydrate&&t.hydrate(x.$state,_),d=!0,u=!0,x}function Ce(e,l,t){let o,s;const a=typeof l=="function";if(typeof e=="string")o=e,s=a?t:l;else if(s=e,o=e.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function i(r,c){const d=n.hasInjectionContext();if(r=(process.env.NODE_ENV==="test"&&ae&&ae._testing?null:r)||(d?n.inject(lt,null):null),r&&ie(r),process.env.NODE_ENV!=="production"&&!ae)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
16
16
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
17
- This will fail in production.`);r=ce,r._s.has(o)||(a?Me(o,l,s,r):xt(o,s,r),process.env.NODE_ENV!=="production"&&(i._pinia=r));const u=r._s.get(o);if(process.env.NODE_ENV!=="production"&&c){const m="__hot:"+o,b=a?Me(m,l,s,r,!0):xt(m,F({},s),r,!0);c._hotUpdate(b),delete r.state.value[m],r._s.delete(m)}if(process.env.NODE_ENV!=="production"&&ge){const m=n.getCurrentInstance();if(m&&m.proxy&&!c){const b=m.proxy,_="_pStores"in b?b._pStores:b._pStores={};_[o]=u}}return u}return i.$id=o,i}const we=Ce("loader",()=>({loading:n.ref(!1)})),Ct={__name:"Select",props:n.mergeModels({languages:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=we(),t=e,o=n.useModel(e,"modelValue"),s=n.ref(""),a=n.ref(null),i=n.computed(()=>Object.entries(t.languages).filter(([,c])=>c.toLowerCase().includes(s.value.toLowerCase()))),r=c=>{c.target.value="",s.value="",a.value&&a.value.$el.click()};return(c,d)=>(n.openBlock(),n.createBlock(n.unref(jn),{modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=u=>o.value=u),disabled:n.unref(l).loading,as:"div",class:"relative mt-1"},{default:n.withCtx(()=>[n.createVNode(n.unref(zn),{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",onChange:d[0]||(d[0]=u=>s.value=u.target.value),displayValue:u=>e.languages[u],onFocus:d[1]||(d[1]=u=>r(u))},null,8,["displayValue"]),n.createVNode(n.unref(Hn),{ref_key:"btnSelect",ref:a,class:"absolute inset-y-0 right-0 flex items-center pr-2"},{default:n.withCtx(()=>[n.createVNode(n.unref(Gn),{class:"h-5 w-5 text-gray-400","aria-hidden":"true",onClick:d[2]||(d[2]=u=>r(u))})]),_:1},512),n.createVNode(n.unref(Un),{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"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,([u,m])=>(n.openBlock(),n.createBlock(n.unref(Zn),{key:u,value:u},{default:n.withCtx(({active:b,selected:_})=>[n.createElementVNode("li",{class:n.normalizeClass(["relative cursor-default select-none py-2 pl-3 pr-9",b?"bg-[#3B5695] text-white":"text-textCustom"])},[n.createElementVNode("span",{class:n.normalizeClass(["block truncate",_&&"font-semibold"])},n.toDisplayString(m),3)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue","disabled"]))}},wt="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",Eo=["disabled"],So=[n.createElementVNode("img",{src:wt,alt:"swap",class:"w-4"},null,-1)],Oo=["disabled"],ko=[n.createElementVNode("img",{src:wt,alt:"swap",class:"w-4"},null,-1)],$o={__name:"SwapBtn",props:{isBidirect:{type:Boolean,default:!1}},emits:["swap"],setup(e,{emit:l}){const t=we(),o=l;return(s,a)=>e.isBidirect?(n.openBlock(),n.createElementBlock("button",{key:1,onClick:a[0]||(a[0]=i=>o("swap")),disabled:n.unref(t).loading},ko,8,Oo)):(n.openBlock(),n.createElementBlock("button",{key:0,disabled:n.unref(t).loading},So,8,Eo))}},ye=Ce("language",()=>{const e=n.ref("auto"),l=n.ref("en"),t=n.ref({src:[],target:[]}),o=n.computed(()=>t.value.src[e.value]),s=n.computed(()=>t.value.target[l.value]);function a(c,d){e.value=c==null?void 0:c.src,l.value=c==null?void 0:c.target,t.value=d}function i(){if(!t.value.src[l.value]||!t.value.target[e.value])return;const c=e.value;e.value=l.value,l.value=c}function r(c){return t.value.src[c]||t.value.target[c]}return{languages:t,src:e,target:l,srcLabel:o,targetLabel:s,init:a,swap:i,getLabel:r}}),Vo={key:0,class:"flex"},To={__name:"Selects",setup(e){const l=ye();function t(){l.swap()}return(o,s)=>n.unref(l).languages?(n.openBlock(),n.createElementBlock("div",Vo,[n.createVNode(Ct,{modelValue:n.unref(l).src,"onUpdate:modelValue":s[0]||(s[0]=a=>n.unref(l).src=a),languages:n.unref(l).languages.src,class:"grow"},null,8,["modelValue","languages"]),n.createVNode($o,{isBidirect:n.unref(l).src!=="auto",class:"grow-0 mx-3",onSwap:t},null,8,["isBidirect"]),n.createVNode(Ct,{modelValue:n.unref(l).target,"onUpdate:modelValue":s[1]||(s[1]=a=>n.unref(l).target=a),languages:n.unref(l).languages.target,class:"grow"},null,8,["modelValue","languages"])])):n.createCommentVNode("",!0)}},No={INPUT_MAX_LENGTH:5e3,INPUT_DEBOUNCE:500},Io={},Lo={class:"mr-2 loading loading-dots loading-xs"};function Bo(e,l){return n.openBlock(),n.createElementBlock("span",Lo)}const Ro=oe(Io,[["render",Bo]]),Mo="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",Po="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",yt=Ce("tts",()=>{const e=n.ref({src:null,target:null});function l(s){s.src&&(e.value.src=s.src),s.target&&(e.value.target=s.target)}function t(s){if(s==="src")return e.value.src;if(s==="target")return e.value.target}function o(){e.value={src:null,target:null}}return{tts:e,set:l,get:t,reset:o}}),Do=[n.createElementVNode("img",{src:Mo,alt:"Play"},null,-1)],Fo=[n.createElementVNode("img",{src:Po,alt:"Stop"},null,-1)],Ao={__name:"SpeakBtn",props:{type:{type:String,default:""}},emits:["loadTTS"],setup(e,{emit:l}){const t=yt(),o=e,s=l,a=n.computed(()=>t.tts[o.type]),i=n.ref(!1),r=new Audio;n.watch(a,()=>{if(!a.value){i.value=!1;return}d()},{immediate:!0}),n.onUnmounted(()=>{u(),r.src=""});function c(){if(a.value){d();return}i.value=!0,s("loadTTS")}function d(){a.value&&(r.src=a.value,i.value=!0,r.play().catch(()=>{i.value=!1}))}function u(){r.pause(),r.currentTime=0,i.value=!1}return r.onended=()=>{i.value=!1},(m,b)=>i.value?(n.openBlock(),n.createElementBlock("button",{key:1,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(u,["prevent"])},Fo)):(n.openBlock(),n.createElementBlock("button",{key:0,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(c,["prevent"])},Do))}},jo="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",Ho={},zo={class:"btn btn-xs btn-circle btn-ghost"},Uo=[n.createElementVNode("img",{src:jo,alt:"Clear",class:"w-4"},null,-1)];function Zo(e,l){return n.openBlock(),n.createElementBlock("button",zo,Uo)}const Wo=oe(Ho,[["render",Zo]]),Go="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",qo="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%23FFC857'/%3e%3c/svg%3e",Jo={class:"btn btn-xs btn-circle btn-ghost"},Ko={key:0,src:Go,alt:"Clear",class:"w-4"},Yo={key:1,src:qo,alt:"Clear",class:"w-4"},Qo={__name:"FavoriteBtn",props:{isFilled:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",Jo,[l.isFilled?(n.openBlock(),n.createElementBlock("img",Ko)):(n.openBlock(),n.createElementBlock("img",Yo))]))}},Xo={class:"flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center"},el={class:"text-sm text-gray-600"},tl={key:0,class:"italic"},nl=n.createElementVNode("div",{class:"flex-grow"},null,-1),Et={__name:"TranslationBtnGroup",props:{loading:{type:Boolean,default:!1},src:{type:String,default:""},srcLabel:{type:String,default:""},type:{type:String,default:""},phonetic:{type:String,default:""},isClearBtn:{type:Boolean,default:!1},isFavoriteBtn:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1},onFavorite:{type:Function,default:()=>{}}},emits:["clear","favorite","loadTTS"],setup(e,{emit:l}){const t=e,o=l;return(s,a)=>(n.openBlock(),n.createElementBlock("div",Xo,[t.src?(n.openBlock(),n.createBlock(Ao,{key:0,type:t.type,onLoadTTS:a[0]||(a[0]=i=>o("loadTTS"))},null,8,["type"])):n.createCommentVNode("",!0),n.createElementVNode("div",el,[n.createTextVNode(n.toDisplayString(e.srcLabel)+" ",1),e.phonetic?(n.openBlock(),n.createElementBlock("span",tl,"- ["+n.toDisplayString(t.phonetic)+"]",1)):n.createCommentVNode("",!0)]),nl,t.loading?(n.openBlock(),n.createBlock(Ro,{key:1})):n.createCommentVNode("",!0),t.src&&t.isClearBtn?(n.openBlock(),n.createBlock(Wo,{key:2,onClick:a[1]||(a[1]=i=>o("clear"))})):n.createCommentVNode("",!0),t.src&&t.isFavoriteBtn?(n.openBlock(),n.createBlock(Qo,{key:3,isFilled:t.isFavorite,onClick:a[2]||(a[2]=i=>o("favorite"))},null,8,["isFilled"])):n.createCommentVNode("",!0)]))}},X=Ce("translation",()=>{const e=n.ref(null),l=n.ref(null),t=n.ref(null),o=n.ref({src:null,target:null}),s=n.ref(null),a=n.ref([]),i=n.ref([]),r=n.ref([]),c=n.ref([]),d=n.ref({src:null,target:null}),u=ye(),m=n.computed(()=>u.getLabel(e.value)),b=n.computed(()=>u.getLabel(l.value));function _(h){e.value=h.src,l.value=h.target,t.value=h.text,o.value=h.phonetic,s.value=h.result,a.value=h.dictionary,i.value=h.definitions,r.value=h.synonyms,c.value=h.examples,d.value=h.tts}function x(){e.value=null,l.value=null,t.value=null,o.value={src:null,target:null},s.value=null,a.value=[],i.value=[],r.value=[],c.value=[],d.value={src:null,target:null}}return{src:e,srcLabel:m,target:l,targetLabel:b,phonetic:o,text:t,result:s,dictionary:a,definitions:i,synonyms:r,examples:c,tts:d,init:_,reset:x}});function ol(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function Ee(e){return typeof e=="function"?e():n.unref(e)}const ll=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const St=()=>{};function sl(e,l){function t(...o){return new Promise((s,a)=>{Promise.resolve(e(()=>l.apply(this,o),{fn:l,thisArg:this,args:o})).then(s).catch(a)})}return t}function rl(e,l={}){let t,o,s=St;const a=r=>{clearTimeout(r),s(),s=St};return r=>{const c=Ee(e),d=Ee(l.maxWait);return t&&a(t),c<=0||d!==void 0&&d<=0?(o&&(a(o),o=null),Promise.resolve(r())):new Promise((u,m)=>{s=l.rejectOnCancel?m:u,d&&!o&&(o=setTimeout(()=>{t&&a(t),o=null,u(r())},d)),t=setTimeout(()=>{o&&a(o),o=null,u(r())},c)})}}function al(e,l=200,t={}){return sl(rl(l,t),e)}function Ot(e){var l;const t=Ee(e);return(l=t==null?void 0:t.$el)!=null?l:t}const il=ll?window:void 0;function cl(){const e=n.ref(!1),l=n.getCurrentInstance();return l&&n.onMounted(()=>{e.value=!0},l),e}function dl(e){const l=cl();return n.computed(()=>(l.value,!!e()))}function ul(e,l,t={}){const{window:o=il,...s}=t;let a;const i=dl(()=>o&&"ResizeObserver"in o),r=()=>{a&&(a.disconnect(),a=void 0)},c=n.computed(()=>Array.isArray(e)?e.map(m=>Ot(m)):[Ot(e)]),d=n.watch(c,m=>{if(r(),i.value&&o){a=new ResizeObserver(l);for(const b of m)b&&a.observe(b,s)}},{immediate:!0,flush:"post"}),u=()=>{r(),d()};return ol(u),{isSupported:i,stop:u}}function kt(e){var l;const t=n.ref(e==null?void 0:e.element),o=n.ref(e==null?void 0:e.input),s=(l=e==null?void 0:e.styleProp)!=null?l:"height",a=n.ref(1);function i(){var r;if(!t.value)return;let c="";t.value.style[s]="1px",a.value=(r=t.value)==null?void 0:r.scrollHeight,e!=null&&e.styleTarget?Ee(e.styleTarget).style[s]=`${a.value}px`:c=`${a.value}px`,t.value.style[s]=c}return n.watch([o,t],()=>n.nextTick(i),{immediate:!0}),n.watch(a,()=>{var r;return(r=e==null?void 0:e.onResize)==null?void 0:r.call(e)}),ul(t,()=>i()),e!=null&&e.watch&&n.watch(e.watch,i,{immediate:!0,deep:!0}),{textarea:t,input:o,triggerResize:i}}const fl=oe({__name:"TranslationInput",props:{text:{type:String,default:""}},emits:["change","clear","loadTTS"],setup(e,{emit:l}){const t=X(),o=e,s=n.ref(""),a=n.computed(()=>t.src),i=n.computed(()=>t.srcLabel),r=n.computed(()=>{var x;return(x=t.phonetic)==null?void 0:x.src}),{textarea:c}=kt({input:s,styleProp:"minHeight"}),d=l,u=al(()=>{d("change",s.value)},No.INPUT_DEBOUNCE);function m(){if(!s.value){b();return}u()}function b(){d("clear"),s.value="",c.value.focus()}async function _(){await n.nextTick(),c.value.select()}return n.watch(()=>o.text,x=>{s.value!==x&&_(),s.value=x}),(x,h)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(Et,{src:a.value,srcLabel:i.value,type:"src",phonetic:r.value,isClearBtn:!0,onClear:b,onLoadTTS:h[0]||(h[0]=E=>d("loadTTS"))},null,8,["src","srcLabel","phonetic"]),n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:c,"onUpdate:modelValue":h[1]||(h[1]=E=>s.value=E),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",autofocus:"",rows:"2",onInput:m,onFocus:_},null,544),[[n.vModelText,s.value,void 0,{trim:!0}]])],64))}},[["__scopeId","data-v-90bf3e0d"]]),pl=e=>(n.pushScopeId("data-v-f47b8efe"),e=e(),n.popScopeId(),e),ml={class:"flex flex-col"},hl=pl(()=>n.createElementVNode("div",{class:"w-full flex align-item-center justify-end mt-2"},null,-1)),gl=oe({__name:"TranslationResult",props:{isFavoriteFeatureEnabled:Boolean,isFavorite:Boolean},emits:["loadTTS","favorite"],setup(e,{emit:l}){const t=X(),o=n.computed(()=>t.result),s=n.computed(()=>t.target),a=n.computed(()=>t.targetLabel),i=n.computed(()=>{var b;return(b=t.phonetic)==null?void 0:b.target}),r=e,c=we(),{textarea:d,input:u}=kt({input:o,styleProp:"minHeight"}),m=l;return(b,_)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(Et,{loading:n.unref(c).loading,src:s.value,srcLabel:a.value,type:"target",isFavoriteBtn:r.isFavoriteFeatureEnabled,isFavorite:e.isFavorite,phonetic:i.value,onFavorite:_[0]||(_[0]=x=>m("favorite")),onLoadTTS:_[1]||(_[1]=x=>m("loadTTS"))},null,8,["loading","src","srcLabel","isFavoriteBtn","isFavorite","phonetic"]),n.createElementVNode("div",ml,[n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:d,"onUpdate:modelValue":_[2]||(_[2]=x=>n.isRef(u)?u.value=x:null),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",readonly:"",rows:"2",spellcheck:"false"},null,512),[[n.vModelText,n.unref(u)]]),hl])],64))}},[["__scopeId","data-v-f47b8efe"]]),bl={class:"btn btn-sm btn-circle btn-ghost"},Se={__name:"ToggleBtn",props:{isExpanded:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",bl,[l.isExpanded?(n.openBlock(),n.createBlock(n.unref(qn),{key:0,class:"w-7 text-gray-400"})):(n.openBlock(),n.createBlock(n.unref(Wn),{key:1,class:"w-7 text-gray-400"}))]))}},vl={class:"card border bg-white rounded-lg"},_l={class:"card-body px-4 py-2 gap-0"},xl={class:"flex justify-between items-center"},Cl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Translations",-1),wl={class:"capitalize text-base font-normal text-textSecondary mb-1"},yl={class:"list-none list-inside"},El=["onClick"],Sl={class:"text-base font-normal text-gray-800 leading-4"},Ol={__name:"Dictionary",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=ye(),a=n.computed(()=>o.dictionary),i=l,r=()=>{t.value=!t.value},c=d=>{i("translate",d,o.target,o.src),s.src=o.target,s.target=o.src,window.scrollTo(0,0)};return(d,u)=>(n.openBlock(),n.createElementBlock("div",vl,[n.createElementVNode("div",_l,[n.createElementVNode("div",xl,[Cl,n.createVNode(Se,{isExpanded:t.value,onClick:r},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,(m,b)=>(n.openBlock(),n.createElementBlock("li",{key:`${m.pos}-${b}`,class:"mb-2"},[n.createElementVNode("h5",wl,n.toDisplayString(m.pos),1),n.createElementVNode("ul",yl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.items,(_,x)=>(n.openBlock(),n.createElementBlock("li",{key:`${_.word}-${x}`},[n.createElementVNode("span",{class:"p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:h=>c(_.word)},n.toDisplayString(_.word),9,El),n.createElementVNode("small",Sl," - "+n.toDisplayString(_.reverse_translation.join(", ")),1)]))),128))])]))),128))])],2)])]))}},kl={class:"card border bg-white rounded-lg"},$l={class:"card-body px-4 py-2 gap-0"},Vl={class:"flex justify-between items-center"},Tl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Definitions",-1),Nl={class:"capitalize text-base font-normal text-textSecondary mb-1"},Il={class:"text-base text-textCustom list-decimal list-outside ml-5"},Ll=n.createElementVNode("br",null,null,-1),Bl={key:0,class:"italic"},Rl={__name:"Definition",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.definitions),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",kl,[n.createElementVNode("div",$l,[n.createElementVNode("div",Vl,[Tl,n.createVNode(Se,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.pos}-${c}`,class:"mb-2"},[n.createElementVNode("h5",Nl,n.toDisplayString(r.pos),1),n.createElementVNode("ul",Il,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.items,(d,u)=>(n.openBlock(),n.createElementBlock("li",{key:`${d.gloss}-${u}`,class:"mb-1"},[n.createElementVNode("span",null,n.toDisplayString(d.gloss),1),Ll,d.example?(n.openBlock(),n.createElementBlock("small",Bl,'"'+n.toDisplayString(d.example)+'"',1)):n.createCommentVNode("",!0)]))),128))])]))),128))])],2)])]))}},Ml={class:"card border bg-white rounded-lg"},Pl={class:"card-body px-4 py-2 gap-0"},Dl={class:"flex justify-between items-center"},Fl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Examples",-1),Al={class:"text-textCustom list-decimal list-outside ml-7 mt-2"},jl=["innerHTML"],Hl={__name:"Example",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.examples),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",Ml,[n.createElementVNode("div",Pl,[n.createElementVNode("div",Dl,[Fl,n.createVNode(Se,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",Al,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.definition_id}-${c}`,innerHTML:r},null,8,jl))),128))])],2)])]))}},zl={class:"card border bg-white rounded-lg"},Ul={class:"card-body px-4 py-2 gap-0"},Zl={class:"flex justify-between items-center"},Wl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Synonyms",-1),Gl={class:"capitalize text-base font-normal text-textSecondary mb-1"},ql={class:"list-none list-inside"},Jl={class:"flex flex-wrap"},Kl=["onClick"],Yl={__name:"Synonyms",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=n.computed(()=>o.synonyms),a=l,i=()=>{t.value=!t.value},r=c=>{a("translate",c),window.scrollTo(0,0)};return(c,d)=>(n.openBlock(),n.createElementBlock("div",zl,[n.createElementVNode("div",Ul,[n.createElementVNode("div",Zl,[Wl,n.createVNode(Se,{isExpanded:t.value,onClick:i},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(u,m)=>(n.openBlock(),n.createElementBlock("li",{key:`${u.pos}-${m}`,class:"mb-2"},[n.createElementVNode("h5",Gl,n.toDisplayString(u.pos),1),n.createElementVNode("ul",ql,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.items,(b,_)=>(n.openBlock(),n.createElementBlock("li",{key:`${b.word}-${_}`,class:"mb-2"},[n.createElementVNode("div",Jl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.synonym,(x,h)=>(n.openBlock(),n.createElementBlock("span",{key:`${x}-${h}`,class:"p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:E=>r(x)},n.toDisplayString(x),9,Kl))),128))])]))),128))])]))),128))])],2)])]))}};function Ql(){document.documentElement.setAttribute("dir","rtl")}function Xl(){document.documentElement.removeAttribute("dir")}const $t={supportRTL:Ql,removeRTL:Xl},es=["ar","fa","iw","yi","ur","pa"],ts={class:"bg-white min-h-screen flex flex-col"},ns={class:"py-2 px-5 shadow-lg"},os={class:"px-5 flex-grow"},ls={class:"flex flex-col lg:flex-row lg:gap-2"},ss={class:"w-full lg:w-[calc(50%-1rem)] my-2"},rs=n.createElementVNode("div",{class:"w-6 h-4 mx-auto hidden lg:block"},null,-1),as={class:"w-full lg:w-[calc(50%-1rem)] my-2"},is={class:"grid grid-cols-1 lg:grid-cols-3 gap-4"},cs={key:0,class:"w-full my-4"},ds={key:1,class:"text-textCustom italic font-medium"},us={__name:"Popup",props:{opt:{type:Object,default:null},languages:{type:Object,default:null},translation:{type:Object,default:null},tts:{type:Object,default:null},isFavoriteFeatureEnabled:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1}},emits:["opt","translate","reader","settings","fullscreen","starList","loadTTS","favorite"],setup(e,{emit:l}){const t=xo(),o=X(t),s=yt(t),a=ye(t),i=we(t),r=e,c=l,d=n.ref(""),u=()=>{const h=r.opt.target;es.includes(h)?$t.supportRTL():$t.removeRTL()};n.watch(()=>r.translation,h=>{h&&(i.loading=!1,d.value=h.text,o.init(h),s.reset())},{immediate:!0}),n.watch(()=>r.tts,h=>{if(!h){s.reset();return}s.set(h)},{immediate:!0}),n.watch([()=>r.opt,()=>r.languages],([h,E])=>{a.init(h,E),u()}),n.watch([()=>a.src,()=>a.target],([h,E])=>{c("opt",{src:h,target:E}),x(d.value)}),n.onMounted(()=>{a.init(r.opt,r.languages),u()});function m(){d.value="",o.reset()}function b(h){x(h)}function _(h){const E=h==="src"?o.text:o.result;c("loadTTS",{type:h,data:E})}function x(h,E=a.src,N=a.target){h&&(d.value=h,i.loading=!0,c("translate",{src:E,target:N,text:h}))}return(h,E)=>{var N,S,V,I;return n.openBlock(),n.createElementBlock("div",ts,[n.createElementVNode("div",ns,[n.createVNode(Zt,{onReader:E[0]||(E[0]=g=>c("reader")),onSettings:E[1]||(E[1]=g=>c("settings")),onFullScreen:E[2]||(E[2]=g=>c("fullscreen")),onStarList:E[3]||(E[3]=g=>c("starList"))})]),n.createElementVNode("div",os,[n.createVNode(To,{class:"my-4"}),n.createElementVNode("div",ls,[n.createElementVNode("div",ss,[n.createVNode(fl,{text:d.value,onChange:b,onClear:m,onLoadTTS:E[4]||(E[4]=g=>_("src"))},null,8,["text"])]),rs,n.createElementVNode("div",as,[n.createVNode(gl,{isFavoriteFeatureEnabled:e.isFavoriteFeatureEnabled,isFavorite:e.isFavorite,onFavorite:E[5]||(E[5]=g=>c("favorite")),onLoadTTS:E[6]||(E[6]=g=>_("target"))},null,8,["isFavoriteFeatureEnabled","isFavorite"])])]),r.translation?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("div",is,[(N=n.unref(o).dictionary)!=null&&N.length?(n.openBlock(),n.createBlock(Ol,{key:0,onTranslate:x})):n.createCommentVNode("",!0),(S=n.unref(o).definitions)!=null&&S.length?(n.openBlock(),n.createBlock(Rl,{key:1})):n.createCommentVNode("",!0),(V=n.unref(o).synonyms)!=null&&V.length?(n.openBlock(),n.createBlock(Yl,{key:2,onTranslate:x})):n.createCommentVNode("",!0)]),(I=n.unref(o).examples)!=null&&I.length?(n.openBlock(),n.createElementBlock("div",cs,[n.createVNode(Hl)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock("span",ds,"Service unavailable"))])])}}};G.default=us,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
17
+ This will fail in production.`);r=ae,r._s.has(o)||(a?Re(o,l,s,r):Ct(o,s,r),process.env.NODE_ENV!=="production"&&(i._pinia=r));const u=r._s.get(o);if(process.env.NODE_ENV!=="production"&&c){const m="__hot:"+o,b=a?Re(m,l,s,r,!0):Ct(m,F({},s),r,!0);c._hotUpdate(b),delete r.state.value[m],r._s.delete(m)}if(process.env.NODE_ENV!=="production"&&me){const m=n.getCurrentInstance();if(m&&m.proxy&&!c){const b=m.proxy,C="_pStores"in b?b._pStores:b._pStores={};C[o]=u}}return u}return i.$id=o,i}const _e=Ce("loader",()=>({loading:n.ref(!1)})),_t={__name:"Select",props:n.mergeModels({languages:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=_e(),t=e,o=n.useModel(e,"modelValue"),s=n.ref(""),a=n.ref(null),i=n.computed(()=>Object.entries(t.languages).filter(([,c])=>c.toLowerCase().includes(s.value.toLowerCase()))),r=c=>{c.target.value="",s.value="",a.value&&a.value.$el.click()};return(c,d)=>(n.openBlock(),n.createBlock(n.unref(An),{modelValue:o.value,"onUpdate:modelValue":d[3]||(d[3]=u=>o.value=u),disabled:n.unref(l).loading,as:"div",class:"relative mt-1"},{default:n.withCtx(()=>[n.createVNode(n.unref(Hn),{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",onChange:d[0]||(d[0]=u=>s.value=u.target.value),displayValue:u=>e.languages[u],onFocus:d[1]||(d[1]=u=>r(u))},null,8,["displayValue"]),n.createVNode(n.unref(jn),{ref_key:"btnSelect",ref:a,class:"absolute inset-y-0 right-0 flex items-center pr-2"},{default:n.withCtx(()=>[n.createVNode(n.unref(Wn),{class:"h-5 w-5 text-gray-400","aria-hidden":"true",onClick:d[2]||(d[2]=u=>r(u))})]),_:1},512),n.createVNode(n.unref(zn),{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"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,([u,m])=>(n.openBlock(),n.createBlock(n.unref(Un),{key:u,value:u},{default:n.withCtx(({active:b,selected:C})=>[n.createElementVNode("li",{class:n.normalizeClass(["relative cursor-default select-none py-2 pl-3 pr-9",b?"bg-[#3B5695] text-white":"text-textCustom"])},[n.createElementVNode("span",{class:n.normalizeClass(["block truncate",C&&"font-semibold"])},n.toDisplayString(m),3)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue","disabled"]))}},xt="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",yo=["disabled"],Eo=[n.createElementVNode("img",{src:xt,alt:"swap",class:"w-4"},null,-1)],So=["disabled"],Oo=[n.createElementVNode("img",{src:xt,alt:"swap",class:"w-4"},null,-1)],ko={__name:"SwapBtn",props:{isBidirect:{type:Boolean,default:!1}},emits:["swap"],setup(e,{emit:l}){const t=_e(),o=l;return(s,a)=>e.isBidirect?(n.openBlock(),n.createElementBlock("button",{key:1,onClick:a[0]||(a[0]=i=>o("swap")),disabled:n.unref(t).loading},Oo,8,So)):(n.openBlock(),n.createElementBlock("button",{key:0,disabled:n.unref(t).loading},Eo,8,yo))}},xe=Ce("language",()=>{const e=n.ref("auto"),l=n.ref("en"),t=n.ref({src:[],target:[]}),o=n.computed(()=>t.value.src[e.value]),s=n.computed(()=>t.value.target[l.value]);function a(c,d){e.value=c==null?void 0:c.src,l.value=c==null?void 0:c.target,t.value=d}function i(){if(!t.value.src[l.value]||!t.value.target[e.value])return;const c=e.value;e.value=l.value,l.value=c}function r(c){return t.value.src[c]||t.value.target[c]}return{languages:t,src:e,target:l,srcLabel:o,targetLabel:s,init:a,swap:i,getLabel:r}}),$o={key:0,class:"flex"},Vo={__name:"Selects",setup(e){const l=xe();function t(){l.swap()}return(o,s)=>n.unref(l).languages?(n.openBlock(),n.createElementBlock("div",$o,[n.createVNode(_t,{modelValue:n.unref(l).src,"onUpdate:modelValue":s[0]||(s[0]=a=>n.unref(l).src=a),languages:n.unref(l).languages.src,class:"grow"},null,8,["modelValue","languages"]),n.createVNode(ko,{isBidirect:n.unref(l).src!=="auto",class:"grow-0 mx-3",onSwap:t},null,8,["isBidirect"]),n.createVNode(_t,{modelValue:n.unref(l).target,"onUpdate:modelValue":s[1]||(s[1]=a=>n.unref(l).target=a),languages:n.unref(l).languages.target,class:"grow"},null,8,["modelValue","languages"])])):n.createCommentVNode("",!0)}},To={INPUT_MAX_LENGTH:5e3,INPUT_DEBOUNCE:500},we=(e,l)=>{const t=e.__vccOpts||e;for(const[o,s]of l)t[o]=s;return t},No={},Io={class:"mr-2 loading loading-dots loading-xs"};function Lo(e,l){return n.openBlock(),n.createElementBlock("span",Io)}const Bo=we(No,[["render",Lo]]),Ro="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",Mo="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",wt=Ce("tts",()=>{const e=n.ref({src:null,target:null});function l(s){s.src&&(e.value.src=s.src),s.target&&(e.value.target=s.target)}function t(s){if(s==="src")return e.value.src;if(s==="target")return e.value.target}function o(){e.value={src:null,target:null}}return{tts:e,set:l,get:t,reset:o}}),Po=[n.createElementVNode("img",{src:Ro,alt:"Play"},null,-1)],Do=[n.createElementVNode("img",{src:Mo,alt:"Stop"},null,-1)],Fo={__name:"SpeakBtn",props:{type:{type:String,default:""}},emits:["loadTTS"],setup(e,{emit:l}){const t=wt(),o=e,s=l,a=n.computed(()=>t.tts[o.type]),i=n.ref(!1),r=new Audio;n.watch(a,()=>{if(!a.value){i.value=!1;return}d()},{immediate:!0}),n.onUnmounted(()=>{u(),r.src=""});function c(){if(a.value){d();return}i.value=!0,s("loadTTS")}function d(){a.value&&(r.src=a.value,i.value=!0,r.play().catch(()=>{i.value=!1}))}function u(){r.pause(),r.currentTime=0,i.value=!1}return r.onended=()=>{i.value=!1},(m,b)=>i.value?(n.openBlock(),n.createElementBlock("button",{key:1,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(u,["prevent"])},Do)):(n.openBlock(),n.createElementBlock("button",{key:0,class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(c,["prevent"])},Po))}},Ao="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",jo={},Ho={class:"btn btn-xs btn-circle btn-ghost"},zo=[n.createElementVNode("img",{src:Ao,alt:"Clear",class:"w-4"},null,-1)];function Uo(e,l){return n.openBlock(),n.createElementBlock("button",Ho,zo)}const Zo=we(jo,[["render",Uo]]),Wo="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",Go="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%23FFC857'/%3e%3c/svg%3e",qo={class:"btn btn-xs btn-circle btn-ghost"},Jo={key:0,src:Wo,alt:"Clear",class:"w-4"},Ko={key:1,src:Go,alt:"Clear",class:"w-4"},Yo={__name:"FavoriteBtn",props:{isFilled:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",qo,[l.isFilled?(n.openBlock(),n.createElementBlock("img",Jo)):(n.openBlock(),n.createElementBlock("img",Ko))]))}},Qo={class:"flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center"},Xo={class:"text-sm text-gray-600"},el={key:0,class:"italic"},tl=n.createElementVNode("div",{class:"flex-grow"},null,-1),yt={__name:"TranslationBtnGroup",props:{loading:{type:Boolean,default:!1},src:{type:String,default:""},srcLabel:{type:String,default:""},type:{type:String,default:""},phonetic:{type:String,default:""},isClearBtn:{type:Boolean,default:!1},isFavoriteBtn:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1},onFavorite:{type:Function,default:()=>{}}},emits:["clear","favorite","loadTTS"],setup(e,{emit:l}){const t=e,o=l;return(s,a)=>(n.openBlock(),n.createElementBlock("div",Qo,[t.src?(n.openBlock(),n.createBlock(Fo,{key:0,type:t.type,onLoadTTS:a[0]||(a[0]=i=>o("loadTTS"))},null,8,["type"])):n.createCommentVNode("",!0),n.createElementVNode("div",Xo,[n.createTextVNode(n.toDisplayString(e.srcLabel)+" ",1),e.phonetic?(n.openBlock(),n.createElementBlock("span",el,"- ["+n.toDisplayString(t.phonetic)+"]",1)):n.createCommentVNode("",!0)]),tl,t.loading?(n.openBlock(),n.createBlock(Bo,{key:1})):n.createCommentVNode("",!0),t.src&&t.isClearBtn?(n.openBlock(),n.createBlock(Zo,{key:2,onClick:a[1]||(a[1]=i=>o("clear"))})):n.createCommentVNode("",!0),t.src&&t.isFavoriteBtn?(n.openBlock(),n.createBlock(Yo,{key:3,isFilled:t.isFavorite,onClick:a[2]||(a[2]=i=>o("favorite"))},null,8,["isFilled"])):n.createCommentVNode("",!0)]))}},X=Ce("translation",()=>{const e=n.ref(null),l=n.ref(null),t=n.ref(null),o=n.ref({src:null,target:null}),s=n.ref(null),a=n.ref([]),i=n.ref([]),r=n.ref([]),c=n.ref([]),d=n.ref({src:null,target:null}),u=xe(),m=n.computed(()=>u.getLabel(e.value)),b=n.computed(()=>u.getLabel(l.value));function C(h){e.value=h.src,l.value=h.target,t.value=h.text,o.value=h.phonetic,s.value=h.result,a.value=h.dictionary,i.value=h.definitions,r.value=h.synonyms,c.value=h.examples,d.value=h.tts}function _(){e.value=null,l.value=null,t.value=null,o.value={src:null,target:null},s.value=null,a.value=[],i.value=[],r.value=[],c.value=[],d.value={src:null,target:null}}return{src:e,srcLabel:m,target:l,targetLabel:b,phonetic:o,text:t,result:s,dictionary:a,definitions:i,synonyms:r,examples:c,tts:d,init:C,reset:_}});function nl(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function ye(e){return typeof e=="function"?e():n.unref(e)}const ol=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Et=()=>{};function ll(e,l){function t(...o){return new Promise((s,a)=>{Promise.resolve(e(()=>l.apply(this,o),{fn:l,thisArg:this,args:o})).then(s).catch(a)})}return t}function sl(e,l={}){let t,o,s=Et;const a=r=>{clearTimeout(r),s(),s=Et};return r=>{const c=ye(e),d=ye(l.maxWait);return t&&a(t),c<=0||d!==void 0&&d<=0?(o&&(a(o),o=null),Promise.resolve(r())):new Promise((u,m)=>{s=l.rejectOnCancel?m:u,d&&!o&&(o=setTimeout(()=>{t&&a(t),o=null,u(r())},d)),t=setTimeout(()=>{o&&a(o),o=null,u(r())},c)})}}function rl(e,l=200,t={}){return ll(sl(l,t),e)}function St(e){var l;const t=ye(e);return(l=t==null?void 0:t.$el)!=null?l:t}const al=ol?window:void 0;function il(){const e=n.ref(!1),l=n.getCurrentInstance();return l&&n.onMounted(()=>{e.value=!0},l),e}function cl(e){const l=il();return n.computed(()=>(l.value,!!e()))}function dl(e,l,t={}){const{window:o=al,...s}=t;let a;const i=cl(()=>o&&"ResizeObserver"in o),r=()=>{a&&(a.disconnect(),a=void 0)},c=n.computed(()=>Array.isArray(e)?e.map(m=>St(m)):[St(e)]),d=n.watch(c,m=>{if(r(),i.value&&o){a=new ResizeObserver(l);for(const b of m)b&&a.observe(b,s)}},{immediate:!0,flush:"post"}),u=()=>{r(),d()};return nl(u),{isSupported:i,stop:u}}function Ot(e){var l;const t=n.ref(e==null?void 0:e.element),o=n.ref(e==null?void 0:e.input),s=(l=e==null?void 0:e.styleProp)!=null?l:"height",a=n.ref(1);function i(){var r;if(!t.value)return;let c="";t.value.style[s]="1px",a.value=(r=t.value)==null?void 0:r.scrollHeight,e!=null&&e.styleTarget?ye(e.styleTarget).style[s]=`${a.value}px`:c=`${a.value}px`,t.value.style[s]=c}return n.watch([o,t],()=>n.nextTick(i),{immediate:!0}),n.watch(a,()=>{var r;return(r=e==null?void 0:e.onResize)==null?void 0:r.call(e)}),dl(t,()=>i()),e!=null&&e.watch&&n.watch(e.watch,i,{immediate:!0,deep:!0}),{textarea:t,input:o,triggerResize:i}}const ul=we({__name:"TranslationInput",props:{text:{type:String,default:""}},emits:["change","clear","loadTTS"],setup(e,{emit:l}){const t=X(),o=e,s=n.ref(""),a=n.computed(()=>t.src),i=n.computed(()=>t.srcLabel),r=n.computed(()=>{var _;return(_=t.phonetic)==null?void 0:_.src}),{textarea:c}=Ot({input:s,styleProp:"minHeight"}),d=l,u=rl(()=>{d("change",s.value)},To.INPUT_DEBOUNCE);function m(){if(!s.value){b();return}u()}function b(){d("clear"),s.value="",c.value.focus()}async function C(){await n.nextTick(),c.value.select()}return n.watch(()=>o.text,_=>{s.value!==_&&C(),s.value=_}),(_,h)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(yt,{src:a.value,srcLabel:i.value,type:"src",phonetic:r.value,isClearBtn:!0,onClear:b,onLoadTTS:h[0]||(h[0]=E=>d("loadTTS"))},null,8,["src","srcLabel","phonetic"]),n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:c,"onUpdate:modelValue":h[1]||(h[1]=E=>s.value=E),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",autofocus:"",rows:"2",onInput:m,onFocus:C},null,544),[[n.vModelText,s.value,void 0,{trim:!0}]])],64))}},[["__scopeId","data-v-90bf3e0d"]]),fl=e=>(n.pushScopeId("data-v-f47b8efe"),e=e(),n.popScopeId(),e),pl={class:"flex flex-col"},ml=fl(()=>n.createElementVNode("div",{class:"w-full flex align-item-center justify-end mt-2"},null,-1)),hl=we({__name:"TranslationResult",props:{isFavoriteFeatureEnabled:Boolean,isFavorite:Boolean},emits:["loadTTS","favorite"],setup(e,{emit:l}){const t=X(),o=n.computed(()=>t.result),s=n.computed(()=>t.target),a=n.computed(()=>t.targetLabel),i=n.computed(()=>{var b;return(b=t.phonetic)==null?void 0:b.target}),r=e,c=_e(),{textarea:d,input:u}=Ot({input:o,styleProp:"minHeight"}),m=l;return(b,C)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(yt,{loading:n.unref(c).loading,src:s.value,srcLabel:a.value,type:"target",isFavoriteBtn:r.isFavoriteFeatureEnabled,isFavorite:e.isFavorite,phonetic:i.value,onFavorite:C[0]||(C[0]=_=>m("favorite")),onLoadTTS:C[1]||(C[1]=_=>m("loadTTS"))},null,8,["loading","src","srcLabel","isFavoriteBtn","isFavorite","phonetic"]),n.createElementVNode("div",pl,[n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:d,"onUpdate:modelValue":C[2]||(C[2]=_=>n.isRef(u)?u.value=_:null),class:"w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3 overflow-x-hidden overflow-y-hidden",readonly:"",rows:"2",spellcheck:"false"},null,512),[[n.vModelText,n.unref(u)]]),ml])],64))}},[["__scopeId","data-v-f47b8efe"]]),gl={class:"btn btn-sm btn-circle btn-ghost"},Ee={__name:"ToggleBtn",props:{isExpanded:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",gl,[l.isExpanded?(n.openBlock(),n.createBlock(n.unref(Gn),{key:0,class:"w-7 text-gray-400"})):(n.openBlock(),n.createBlock(n.unref(Zn),{key:1,class:"w-7 text-gray-400"}))]))}},bl={class:"card border bg-white rounded-lg"},vl={class:"card-body px-4 py-2 gap-0"},Cl={class:"flex justify-between items-center"},_l=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Translations",-1),xl={class:"capitalize text-base font-normal text-textSecondary mb-1"},wl={class:"list-none list-inside"},yl=["onClick"],El={class:"text-base font-normal text-gray-800 leading-4"},Sl={__name:"Dictionary",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=xe(),a=n.computed(()=>o.dictionary),i=l,r=()=>{t.value=!t.value},c=d=>{i("translate",d,o.target,o.src),s.src=o.target,s.target=o.src,window.scrollTo(0,0)};return(d,u)=>(n.openBlock(),n.createElementBlock("div",bl,[n.createElementVNode("div",vl,[n.createElementVNode("div",Cl,[_l,n.createVNode(Ee,{isExpanded:t.value,onClick:r},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,(m,b)=>(n.openBlock(),n.createElementBlock("li",{key:`${m.pos}-${b}`,class:"mb-2"},[n.createElementVNode("h5",xl,n.toDisplayString(m.pos),1),n.createElementVNode("ul",wl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.items,(C,_)=>(n.openBlock(),n.createElementBlock("li",{key:`${C.word}-${_}`},[n.createElementVNode("span",{class:"p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:h=>c(C.word)},n.toDisplayString(C.word),9,yl),n.createElementVNode("small",El," - "+n.toDisplayString(C.reverse_translation.join(", ")),1)]))),128))])]))),128))])],2)])]))}},Ol={class:"card border bg-white rounded-lg"},kl={class:"card-body px-4 py-2 gap-0"},$l={class:"flex justify-between items-center"},Vl=n.createElementVNode("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"},Il=n.createElementVNode("br",null,null,-1),Ll={key:0,class:"italic"},Bl={__name:"Definition",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.definitions),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",Ol,[n.createElementVNode("div",kl,[n.createElementVNode("div",$l,[Vl,n.createVNode(Ee,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.pos}-${c}`,class:"mb-2"},[n.createElementVNode("h5",Tl,n.toDisplayString(r.pos),1),n.createElementVNode("ul",Nl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.items,(d,u)=>(n.openBlock(),n.createElementBlock("li",{key:`${d.gloss}-${u}`,class:"mb-1"},[n.createElementVNode("span",null,n.toDisplayString(d.gloss),1),Il,d.example?(n.openBlock(),n.createElementBlock("small",Ll,'"'+n.toDisplayString(d.example)+'"',1)):n.createCommentVNode("",!0)]))),128))])]))),128))])],2)])]))}},Rl={class:"card border bg-white rounded-lg"},Ml={class:"card-body px-4 py-2 gap-0"},Pl={class:"flex justify-between items-center"},Dl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Examples",-1),Fl={class:"text-textCustom list-decimal list-outside ml-7 mt-2"},Al=["innerHTML"],jl={__name:"Example",setup(e){const l=n.ref(!0),t=X(),o=n.computed(()=>t.examples),s=()=>{l.value=!l.value};return(a,i)=>(n.openBlock(),n.createElementBlock("div",Rl,[n.createElementVNode("div",Ml,[n.createElementVNode("div",Pl,[Dl,n.createVNode(Ee,{isExpanded:l.value,onClick:s},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",l.value?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",Fl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(r,c)=>(n.openBlock(),n.createElementBlock("li",{key:`${r.definition_id}-${c}`,innerHTML:r},null,8,Al))),128))])],2)])]))}},Hl={class:"card border bg-white rounded-lg"},zl={class:"card-body px-4 py-2 gap-0"},Ul={class:"flex justify-between items-center"},Zl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Synonyms",-1),Wl={class:"capitalize text-base font-normal text-textSecondary mb-1"},Gl={class:"list-none list-inside"},ql={class:"flex flex-wrap"},Jl=["onClick"],Kl={__name:"Synonyms",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=n.computed(()=>o.synonyms),a=l,i=()=>{t.value=!t.value},r=c=>{a("translate",c),window.scrollTo(0,0)};return(c,d)=>(n.openBlock(),n.createElementBlock("div",Hl,[n.createElementVNode("div",zl,[n.createElementVNode("div",Ul,[Zl,n.createVNode(Ee,{isExpanded:t.value,onClick:i},null,8,["isExpanded"])]),n.createElementVNode("div",{class:n.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",t.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,(u,m)=>(n.openBlock(),n.createElementBlock("li",{key:`${u.pos}-${m}`,class:"mb-2"},[n.createElementVNode("h5",Wl,n.toDisplayString(u.pos),1),n.createElementVNode("ul",Gl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.items,(b,C)=>(n.openBlock(),n.createElementBlock("li",{key:`${b.word}-${C}`,class:"mb-2"},[n.createElementVNode("div",ql,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.synonym,(_,h)=>(n.openBlock(),n.createElementBlock("span",{key:`${_}-${h}`,class:"p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:E=>r(_)},n.toDisplayString(_),9,Jl))),128))])]))),128))])]))),128))])],2)])]))}};function Yl(){document.documentElement.setAttribute("dir","rtl")}function Ql(){document.documentElement.removeAttribute("dir")}const kt={supportRTL:Yl,removeRTL:Ql},Xl=["ar","fa","iw","yi","ur","pa"],es={class:"bg-white min-h-screen flex flex-col"},ts={class:"py-2 px-5 shadow-lg"},ns={class:"px-5 flex-grow"},os={class:"flex flex-col lg:flex-row lg:gap-2"},ls={class:"w-full lg:w-[calc(50%-1rem)] my-2"},ss=n.createElementVNode("div",{class:"w-6 h-4 mx-auto hidden lg:block"},null,-1),rs={class:"w-full lg:w-[calc(50%-1rem)] my-2"},as={class:"grid grid-cols-1 lg:grid-cols-3 gap-4"},is={key:0,class:"w-full my-4"},cs={key:1,class:"text-textCustom italic font-medium"},ds={__name:"Popup",props:{opt:{type:Object,default:null},languages:{type:Object,default:null},translation:{type:Object,default:null},tts:{type:Object,default:null},isFavoriteFeatureEnabled:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1}},emits:["opt","translate","reader","settings","fullscreen","starList","loadTTS","favorite"],setup(e,{emit:l}){const t=Co(),o=X(t),s=wt(t),a=xe(t),i=_e(t),r=e,c=l,d=n.ref(""),u=()=>{const h=r.opt.target;Xl.includes(h)?kt.supportRTL():kt.removeRTL()};n.watch(()=>r.translation,h=>{h&&(i.loading=!1,d.value=h.text,o.init(h),s.reset())},{immediate:!0}),n.watch(()=>r.tts,h=>{if(!h){s.reset();return}s.set(h)},{immediate:!0}),n.watch([()=>r.opt,()=>r.languages],([h,E])=>{a.init(h,E),u()}),n.watch([()=>a.src,()=>a.target],([h,E])=>{c("opt",{src:h,target:E}),_(d.value)}),n.onMounted(()=>{a.init(r.opt,r.languages),u()});function m(){d.value="",o.reset()}function b(h){_(h)}function C(h){const E=h==="src"?o.text:o.result;c("loadTTS",{type:h,data:E})}function _(h,E=a.src,N=a.target){h&&(d.value=h,i.loading=!0,c("translate",{src:E,target:N,text:h}))}return(h,E)=>{var N,S,V,I;return n.openBlock(),n.createElementBlock("div",es,[n.createElementVNode("div",ts,[n.createVNode(Ut,{onReader:E[0]||(E[0]=g=>c("reader")),onSettings:E[1]||(E[1]=g=>c("settings")),onFullScreen:E[2]||(E[2]=g=>c("fullscreen")),onStarList:E[3]||(E[3]=g=>c("starList"))})]),n.createElementVNode("div",ns,[n.createVNode(Vo,{class:"my-4"}),n.createElementVNode("div",os,[n.createElementVNode("div",ls,[n.createVNode(ul,{text:d.value,onChange:b,onClear:m,onLoadTTS:E[4]||(E[4]=g=>C("src"))},null,8,["text"])]),ss,n.createElementVNode("div",rs,[n.createVNode(hl,{isFavoriteFeatureEnabled:e.isFavoriteFeatureEnabled,isFavorite:e.isFavorite,onFavorite:E[5]||(E[5]=g=>c("favorite")),onLoadTTS:E[6]||(E[6]=g=>C("target"))},null,8,["isFavoriteFeatureEnabled","isFavorite"])])]),r.translation?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("div",as,[(N=n.unref(o).dictionary)!=null&&N.length?(n.openBlock(),n.createBlock(Sl,{key:0,onTranslate:_})):n.createCommentVNode("",!0),(S=n.unref(o).definitions)!=null&&S.length?(n.openBlock(),n.createBlock(Bl,{key:1})):n.createCommentVNode("",!0),(V=n.unref(o).synonyms)!=null&&V.length?(n.openBlock(),n.createBlock(Kl,{key:2,onTranslate:_})):n.createCommentVNode("",!0)]),(I=n.unref(o).examples)!=null&&I.length?(n.openBlock(),n.createElementBlock("div",is,[n.createVNode(jl)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createElementBlock("span",cs,"Service unavailable"))])])}}};G.default=ds,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});