@ddict/popup 1.0.10 → 1.0.12
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/README.md +5 -1
- package/dist/popup.css +1 -1
- package/dist/popup.es.js +1156 -1207
- package/dist/popup.umd.js +9 -27
- package/package.json +3 -4
- package/dist/howler-DJIW9wc6.js +0 -1226
package/dist/popup.umd.js
CHANGED
|
@@ -1,35 +1,17 @@
|
|
|
1
|
-
(function(W,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(W=typeof globalThis<"u"?globalThis:W||self,r(W.Popup={},W.Vue))})(this,function(W,r){"use strict";function kt(n,i){for(var e=0;e<i.length;e++){const o=i[e];if(typeof o!="string"&&!Array.isArray(o)){for(const a in o)if(a!=="default"&&!(a in n)){const s=Object.getOwnPropertyDescriptor(o,a);s&&Object.defineProperty(n,a,s.get?s:{enumerable:!0,get:()=>o[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}const Ot="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",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%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",Vt="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",$t="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=r.createElementVNode("div",{class:"flex flex-row"},[r.createElementVNode("img",{src:Ot,alt:"Vue logo",class:"w-24"})],-1),Nt={class:"flex"},Pt=[r.createElementVNode("img",{src:It,alt:"Reader",class:"w-7"},null,-1)],Mt=[r.createElementVNode("img",{src:Vt,alt:"Full screen",class:"w-7"},null,-1)],Rt=[r.createElementVNode("img",{src:$t,alt:"Setting",class:"w-7"},null,-1)],Dt={__name:"Header",emits:["settings","fullScreen","reader"],setup(n,{emit:i}){const e=i;return(o,a)=>(r.openBlock(),r.createElementBlock("div",Lt,[Bt,r.createElementVNode("div",Nt,[r.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:a[0]||(a[0]=s=>e("reader"))},Pt),r.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:a[1]||(a[1]=s=>e("fullScreen"))},Mt),r.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:a[2]||(a[2]=s=>e("settings"))},Rt)])]))}};function oe(n,i,e){let o=e.initialDeps??[],a;return()=>{var s,d,c,p;let m;e.key&&((s=e.debug)!=null&&s.call(e))&&(m=Date.now());const g=n();if(!(g.length!==o.length||g.some((u,f)=>o[f]!==u)))return a;o=g;let l;if(e.key&&((d=e.debug)!=null&&d.call(e))&&(l=Date.now()),a=i(...g),e.key&&((c=e.debug)!=null&&c.call(e))){const u=Math.round((Date.now()-m)*100)/100,f=Math.round((Date.now()-l)*100)/100,h=f/16,v=(_,w)=>{for(_=String(_);_.length<w;)_=" "+_;return _};console.info(`%c⏱ ${v(f,5)} /${v(u,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 Ot="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",kt="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",Vt="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",$t="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",Nt={class:"flex justify-between"},It=n.createElementVNode("div",{class:"flex flex-row"},[n.createElementVNode("img",{src:Ot,alt:"Vue logo",class:"w-24"})],-1),Lt={class:"flex"},Tt=[n.createElementVNode("img",{src:kt,alt:"Reader",class:"w-7"},null,-1)],Bt=[n.createElementVNode("img",{src:Vt,alt:"Full screen",class:"w-7"},null,-1)],Rt=[n.createElementVNode("img",{src:$t,alt:"Setting",class:"w-7"},null,-1)],Mt={__name:"Header",emits:["settings","fullScreen","reader"],setup(e,{emit:l}){const t=l;return(o,s)=>(n.openBlock(),n.createElementBlock("div",Nt,[It,n.createElementVNode("div",Lt,[n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[0]||(s[0]=a=>t("reader"))},Tt),n.createElementVNode("button",{class:"btn btn-ghost btn-circle md:hidden",onClick:s[1]||(s[1]=a=>t("fullScreen"))},Bt),n.createElementVNode("button",{class:"btn btn-ghost btn-circle",onClick:s[2]||(s[2]=a=>t("settings"))},Rt)])]))}};function oe(e,l,t){let o=t.initialDeps??[],s;return()=>{var a,i,r,c;let u;t.key&&((a=t.debug)!=null&&a.call(t))&&(u=Date.now());const m=e();if(!(m.length!==o.length||m.some((b,g)=>o[g]!==b)))return s;o=m;let h;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(h=Date.now()),s=l(...m),t.key&&((r=t.debug)!=null&&r.call(t))){const b=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,y=g/16,N=(L,E)=>{for(L=String(L);L.length<E;)L=" "+L;return L};console.info(`%c⏱ ${N(g,5)} /${N(b,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%);`,e==null?void 0:e.key)}return(p=e==null?void 0:e.onChange)==null||p.call(e,a),a}}function Ee(n,i){if(n===void 0)throw new Error("Unexpected undefined");return n}const Ft=(n,i)=>Math.abs(n-i)<1,Ht=(n,i,e)=>{let o;return function(...a){n.clearTimeout(o),o=n.setTimeout(()=>i.apply(this,a),e)}},jt=n=>n,Gt=n=>{const i=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),o=[];for(let a=i;a<=e;a++)o.push(a);return o},Ut=(n,i)=>{const e=n.scrollElement;if(!e)return;const o=n.targetWindow;if(!o)return;const a=d=>{const{width:c,height:p}=d;i({width:Math.round(c),height:Math.round(p)})};if(a(e.getBoundingClientRect()),!o.ResizeObserver)return()=>{};const s=new o.ResizeObserver(d=>{const c=d[0];if(c!=null&&c.borderBoxSize){const p=c.borderBoxSize[0];if(p){a({width:p.inlineSize,height:p.blockSize});return}}a(e.getBoundingClientRect())});return s.observe(e,{box:"border-box"}),()=>{s.unobserve(e)}},Me={passive:!0},zt=typeof window>"u"?!0:"onscrollend"in window,Zt=(n,i)=>{const e=n.scrollElement;if(!e)return;const o=n.targetWindow;if(!o)return;let a=0;const s=zt?()=>{}:Ht(o,()=>{i(a,!1)},n.options.isScrollingResetDelay),d=m=>()=>{a=e[n.options.horizontal?"scrollLeft":"scrollTop"],s(),i(a,m)},c=d(!0),p=d(!1);return p(),e.addEventListener("scroll",c,Me),e.addEventListener("scrollend",p,Me),()=>{e.removeEventListener("scroll",c),e.removeEventListener("scrollend",p)}},Wt=(n,i,e)=>{if(i!=null&&i.borderBoxSize){const o=i.borderBoxSize[0];if(o)return Math.round(o[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[e.options.horizontal?"width":"height"])},qt=(n,{adjustments:i=0,behavior:e},o)=>{var a,s;const d=n+i;(s=(a=o.scrollElement)==null?void 0:a.scrollTo)==null||s.call(a,{[o.options.horizontal?"left":"top"]:d,behavior:e})};class Xt{constructor(i){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 e=null;const o=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(a=>{a.forEach(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var a;return(a=o())==null?void 0:a.disconnect()},observe:a=>{var s;return(s=o())==null?void 0:s.observe(a,{box:"border-box"})},unobserve:a=>{var s;return(s=o())==null?void 0:s.unobserve(a)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([o,a])=>{typeof a>"u"&&delete e[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:jt,rangeExtractor:Gt,onChange:()=>{},measureElement:Wt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...e}},this.notify=(e,o)=>{var a,s;const{startIndex:d,endIndex:c}=this.range??{startIndex:void 0,endIndex:void 0},p=this.calculateRange();(e||d!==(p==null?void 0:p.startIndex)||c!==(p==null?void 0:p.endIndex))&&((s=(a=this.options).onChange)==null||s.call(a,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;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=((e=this.scrollElement)==null?void 0:e.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(a,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a;const d=this.isScrolling;this.isScrolling=s,this.notify(d!==s,s)}))}},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=(e,o)=>{const a=new Map,s=new Map;for(let d=o-1;d>=0;d--){const c=e[d];if(a.has(c.lane))continue;const p=s.get(c.lane);if(p==null||c.end>p.end?s.set(c.lane,c):c.end<p.end&&a.set(c.lane,!0),a.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((d,c)=>d.end===c.end?d.index-c.index:d.end-c.end)[0]:void 0},this.getMeasurementOptions=oe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,o,a,s,d)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:o,scrollMargin:a,getItemKey:s,enabled:d}),{key:!1}),this.getMeasurements=oe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:o,scrollMargin:a,getItemKey:s,enabled:d},c)=>{var p;if(!d)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(t=>{this.itemSizeCache.set(t.key,t.size)}));const m=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const g=this.measurementsCache.slice(0,m);for(let t=m;t<e;t++){let l=(p=this.measurementsCache[t])==null?void 0:p.measureElement;l||(l=O=>{const x=s(t),I=this.elementsCache.get(x);if(!O){I&&(this.observer.unobserve(I),this.elementsCache.delete(x));return}I!==O&&(I&&this.observer.unobserve(I),this.observer.observe(O),this.elementsCache.set(x,O)),O.isConnected&&this.resizeItem(t,this.options.measureElement(O,void 0,this))});const u=s(t),f=this.options.lanes===1?g[t-1]:this.getFurthestMeasurement(g,t),h=f?f.end+this.options.gap:o+a,v=c.get(u),_=typeof v=="number"?v:this.options.estimateSize(t),w=h+_,A=f?f.lane:t%this.options.lanes;g[t]={index:t,start:h,size:_,end:w,key:u,lane:A,measureElement:l}}return this.measurementsCache=g,g},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=oe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,o,a)=>this.range=e.length>0&&o>0?Yt({measurements:e,outerSize:o,scrollOffset:a}):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],(e,o,a,s)=>o===null?[]:e({startIndex:o.startIndex,endIndex:o.endIndex,overscan:a,count:s}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const o=this.options.indexAttribute,a=e.getAttribute(o);return a?parseInt(a,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(e,o)=>{const a=this.indexFromElement(e),s=this.getMeasurements()[a];if(!s||!e.isConnected){this.elementsCache.forEach((c,p)=>{c===e&&(this.observer.unobserve(e),this.elementsCache.delete(p))});return}const d=this.elementsCache.get(s.key);d!==e&&(d&&this.observer.unobserve(d),this.observer.observe(e),this.elementsCache.set(s.key,e)),this.resizeItem(a,this.options.measureElement(e,o,this))},this.resizeItem=(e,o)=>{const a=this.getMeasurements()[e];if(!a)return;const s=this.itemSizeCache.get(a.key)??a.size,d=o-s;d!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,d,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",d),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=d,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,o)),this.notify(!0,!1))},this.measureElement=e=>{e&&this._measureElement(e,void 0)},this.getVirtualItems=oe(()=>[this.getIndexes(),this.getMeasurements()],(e,o)=>{const a=[];for(let s=0,d=e.length;s<d;s++){const c=e[s],p=o[c];a.push(p)}return a},{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const o=this.getMeasurements();if(o.length!==0)return Ee(o[Re(0,o.length-1,a=>Ee(o[a]).start,e)])},this.getOffsetForAlignment=(e,o)=>{const a=this.getSize(),s=this.getScrollOffset();o==="auto"&&(e<=s?o="start":e>=s+a?o="end":o="start"),o==="start"?e=e:o==="end"?e=e-a:o==="center"&&(e=e-a/2);const d=this.options.horizontal?"scrollWidth":"scrollHeight",p=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[d]:this.scrollElement[d]:0)-a;return Math.max(Math.min(p,e),0)},this.getOffsetForIndex=(e,o="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const a=this.getMeasurements()[e];if(!a)return;const s=this.getSize(),d=this.getScrollOffset();if(o==="auto")if(a.end>=d+s-this.options.scrollPaddingEnd)o="end";else if(a.start<=d+this.options.scrollPaddingStart)o="start";else return[d,o];const c=o==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,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=(e,{align:o="start",behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,o),{adjustments:void 0,behavior:a})},this.scrollToIndex=(e,{align:o="auto",behavior:a}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const s=this.getOffsetForIndex(e,o);if(!s)return;const[d,c]=s;this._scrollToOffset(d,{adjustments:void 0,behavior:a}),a!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[m]=Ee(this.getOffsetForIndex(e,c));Ft(m,this.getScrollOffset())||this.scrollToIndex(e,{align:c,behavior:a})}else this.scrollToIndex(e,{align:c,behavior:a})}))},this.scrollBy=(e,{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()+e,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var e;const o=this.getMeasurements();let a;return o.length===0?a=this.options.paddingStart:a=this.options.lanes===1?((e=o[o.length-1])==null?void 0:e.end)??0:Math.max(...o.slice(-this.options.lanes).map(s=>s.end)),a-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:o,behavior:a})=>{this.options.scrollToFn(e,{behavior:a,adjustments:o},this)},this.measure=()=>{var e,o;this.itemSizeCache=new Map,(o=(e=this.options).onChange)==null||o.call(e,this,!1)},this.setOptions(i)}}const Re=(n,i,e,o)=>{for(;n<=i;){const a=(n+i)/2|0,s=e(a);if(s<o)n=a+1;else if(s>o)i=a-1;else return a}return n>0?n-1:0};function Yt({measurements:n,outerSize:i,scrollOffset:e}){const o=n.length-1,s=Re(0,o,c=>n[c].start,e);let d=s;for(;d<o&&n[d].end<e+i;)d++;return{startIndex:s,endIndex:d}}function Qt(n){const i=new Xt(r.unref(n)),e=r.shallowRef(i),o=i._didMount();return r.watch(()=>r.unref(n).getScrollElement(),a=>{a&&i._willUpdate()},{immediate:!0}),r.watch(()=>r.unref(n),a=>{i.setOptions({...a,onChange:(s,d)=>{var c;r.triggerRef(e),(c=a.onChange)==null||c.call(a,s,d)}}),i._willUpdate(),r.triggerRef(e)},{immediate:!0}),r.onScopeDispose(o),e}function Kt(n){return Qt(r.computed(()=>({observeElementRect:Ut,observeElementOffset:Zt,scrollToFn:qt,...r.unref(n)})))}function Jt(n,i,e){let o=r.ref(e==null?void 0:e.value),a=r.computed(()=>n.value!==void 0);return[r.computed(()=>a.value?n.value:o.value),function(s){return a.value||(o.value=s),i==null?void 0:i(s)}]}function en(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(i=>setTimeout(()=>{throw i}))}function de(){let n=[],i={addEventListener(e,o,a,s){return e.addEventListener(o,a,s),i.add(()=>e.removeEventListener(o,a,s))},requestAnimationFrame(...e){let o=requestAnimationFrame(...e);i.add(()=>cancelAnimationFrame(o))},nextFrame(...e){i.requestAnimationFrame(()=>{i.requestAnimationFrame(...e)})},setTimeout(...e){let o=setTimeout(...e);i.add(()=>clearTimeout(o))},microTask(...e){let o={current:!0};return en(()=>{o.current&&e[0]()}),i.add(()=>{o.current=!1})},style(e,o,a){let s=e.style.getPropertyValue(o);return Object.assign(e.style,{[o]:a}),this.add(()=>{Object.assign(e.style,{[o]:s})})},group(e){let o=de();return e(o),this.add(()=>o.dispose())},add(e){return n.push(e),()=>{let o=n.indexOf(e);if(o>=0)for(let a of n.splice(o,1))a()}},dispose(){for(let e of n.splice(0))e()}};return i}function tn(){let n=de();return r.onUnmounted(()=>n.dispose()),n}function nn(){let n=tn();return i=>{n.dispose(),n.nextFrame(i)}}let on=Symbol("headlessui.useid"),rn=0;function re(){return r.inject(on,()=>`${++rn}`)()}function $(n){var i;if(n==null||n.value==null)return null;let e=(i=n.value.$el)!=null?i:n.value;return e instanceof Node?e:null}function U(n,i,...e){if(n in i){let a=i[n];return typeof a=="function"?a(...e):a}let o=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(i).map(a=>`"${a}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,U),o}var an=Object.defineProperty,ln=(n,i,e)=>i in n?an(n,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[i]=e,De=(n,i,e)=>(ln(n,typeof i!="symbol"?i+"":i,e),e);let sn=class{constructor(){De(this,"current",this.detect()),De(this,"currentId",0)}set(i){this.current!==i&&(this.currentId=0,this.current=i)}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"}},Se=new sn;function Te(n){if(Se.isServer)return null;if(n instanceof Node)return n.ownerDocument;if(n!=null&&n.hasOwnProperty("value")){let i=$(n);if(i)return i.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(n=>`${n}:not([tabindex='-1'])`).join(",");var cn=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n))(cn||{}),un=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(un||{}),dn=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(dn||{}),He=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(He||{});function fn(n,i=0){var e;return n===((e=Te(n))==null?void 0:e.body)?!1:U(i,{0(){return n.matches(Fe)},1(){let o=n;for(;o!==null;){if(o.matches(Fe))return!0;o=o.parentElement}return!1}})}var pn=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(pn||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function mn(n,i=e=>e){return n.slice().sort((e,o)=>{let a=i(e),s=i(o);if(a===null||s===null)return 0;let d=a.compareDocumentPosition(s);return d&Node.DOCUMENT_POSITION_FOLLOWING?-1:d&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 hn(){return/Android/gi.test(window.navigator.userAgent)}function je(){return _n()||hn()}function fe(n,i,e){Se.isServer||r.watchEffect(o=>{document.addEventListener(n,i,e),o(()=>document.removeEventListener(n,i,e))})}function gn(n,i,e){Se.isServer||r.watchEffect(o=>{window.addEventListener(n,i,e),o(()=>window.removeEventListener(n,i,e))})}function vn(n,i,e=r.computed(()=>!0)){function o(s,d){if(!e.value||s.defaultPrevented)return;let c=d(s);if(c===null||!c.getRootNode().contains(c))return;let p=function m(g){return typeof g=="function"?m(g()):Array.isArray(g)||g instanceof Set?g:[g]}(n);for(let m of p){if(m===null)continue;let g=m instanceof HTMLElement?m:$(m);if(g!=null&&g.contains(c)||s.composed&&s.composedPath().includes(g))return}return!fn(c,He.Loose)&&c.tabIndex!==-1&&s.preventDefault(),i(s,c)}let a=r.ref(null);fe("pointerdown",s=>{var d,c;e.value&&(a.value=((c=(d=s.composedPath)==null?void 0:d.call(s))==null?void 0:c[0])||s.target)},!0),fe("mousedown",s=>{var d,c;e.value&&(a.value=((c=(d=s.composedPath)==null?void 0:d.call(s))==null?void 0:c[0])||s.target)},!0),fe("click",s=>{je()||a.value&&(o(s,()=>a.value),a.value=null)},!0),fe("touchend",s=>o(s,()=>s.target instanceof HTMLElement?s.target:null),!0),gn("blur",s=>o(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ge(n,i){if(n)return n;let e=i??"button";if(typeof e=="string"&&e.toLowerCase()==="button")return"button"}function bn(n,i){let e=r.ref(Ge(n.value.type,n.value.as));return r.onMounted(()=>{e.value=Ge(n.value.type,n.value.as)}),r.watchEffect(()=>{var o;e.value||$(i)&&$(i)instanceof HTMLButtonElement&&!((o=$(i))!=null&&o.hasAttribute("type"))&&(e.value="button")}),e}function Ue(n){return[n.screenX,n.screenY]}function yn(){let n=r.ref([-1,-1]);return{wasMoved(i){let e=Ue(i);return n.value[0]===e[0]&&n.value[1]===e[1]?!1:(n.value=e,!0)},update(i){n.value=Ue(i)}}}function wn({container:n,accept:i,walk:e,enabled:o}){r.watchEffect(()=>{let a=n.value;if(!a||o!==void 0&&!o.value)return;let s=Te(n);if(!s)return;let d=Object.assign(p=>i(p),{acceptNode:i}),c=s.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,d,!1);for(;c.nextNode();)e(c.currentNode)})}var ae=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(ae||{}),xn=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(xn||{});function q({visible:n=!0,features:i=0,ourProps:e,theirProps:o,...a}){var s;let d=Ze(o,e),c=Object.assign(a,{props:d});if(n||i&2&&d.static)return Ae(c);if(i&1){let p=(s=d.unmount)==null||s?0:1;return U(p,{0(){return null},1(){return Ae({...a,props:{...d,hidden:!0,style:{display:"none"}}})}})}return Ae(c)}function Ae({props:n,attrs:i,slots:e,slot:o,name:a}){var s,d;let{as:c,...p}=pe(n,["unmount","static"]),m=(s=e.default)==null?void 0:s.call(e,o),g={};if(o){let t=!1,l=[];for(let[u,f]of Object.entries(o))typeof f=="boolean"&&(t=!0),f===!0&&l.push(u);t&&(g["data-headlessui-state"]=l.join(" "))}if(c==="template"){if(m=ze(m??[]),Object.keys(p).length>0||Object.keys(i).length>0){let[t,...l]=m??[];if(!En(t)||l.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${a} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(p).concat(Object.keys(i)).map(h=>h.trim()).filter((h,v,_)=>_.indexOf(h)===v).sort((h,v)=>h.localeCompare(v)).map(h=>` - ${h}`).join(`
|
|
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(
|
|
4
|
+
color: hsl(${Math.max(0,Math.min(120-120*y,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 ye(e,l){if(e===void 0)throw new Error("Unexpected undefined");return e}const Pt=(e,l)=>Math.abs(e-l)<1,Dt=(e,l,t)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>l.apply(this,s),t)}},At=e=>e,Ft=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)}},Re={passive:!0},Ht=typeof window>"u"?!0:"onscrollend"in window,zt=(e,l)=>{const t=e.scrollElement;if(!t)return;const o=e.targetWindow;if(!o)return;let s=0;const a=Ht?()=>{}:Dt(o,()=>{l(s,!1)},e.options.isScrollingResetDelay),i=u=>()=>{s=t[e.options.horizontal?"scrollLeft":"scrollTop"],a(),l(s,u)},r=i(!0),c=i(!1);return c(),t.addEventListener("scroll",r,Re),t.addEventListener("scrollend",c,Re),()=>{t.removeEventListener("scroll",r),t.removeEventListener("scrollend",c)}},Ut=(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"])},Zt=(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 Wt{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:At,rangeExtractor:Ft,onChange:()=>{},measureElement:Ut,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(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const m=this.measurementsCache.slice(0,u);for(let p=u;p<t;p++){let h=(c=this.measurementsCache[p])==null?void 0:c.measureElement;h||(h=T=>{const _=a(p),O=this.elementsCache.get(_);if(!T){O&&(this.observer.unobserve(O),this.elementsCache.delete(_));return}O!==T&&(O&&this.observer.unobserve(O),this.observer.observe(T),this.elementsCache.set(_,T)),T.isConnected&&this.resizeItem(p,this.options.measureElement(T,void 0,this))});const b=a(p),g=this.options.lanes===1?m[p-1]:this.getFurthestMeasurement(m,p),y=g?g.end+this.options.gap:o+s,N=r.get(b),L=typeof N=="number"?N:this.options.estimateSize(p),E=y+L,$=g?g.lane:p%this.options.lanes;m[p]={index:p,start:y,size:L,end:E,key:b,lane:$,measureElement:h}}return this.measurementsCache=m,m},{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?Gt({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 ye(o[Me(0,o.length-1,s=>ye(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[u]=ye(this.getOffsetForIndex(t,r));Pt(u,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 Me=(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 Gt({measurements:e,outerSize:l,scrollOffset:t}){const o=e.length-1,a=Me(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 qt(e){const l=new Wt(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 Jt(e){return qt(n.computed(()=>({observeElementRect:jt,observeElementOffset:zt,scrollToFn:Zt,...n.unref(e)})))}function Kt(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 Yt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(l=>setTimeout(()=>{throw l}))}function ue(){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 Yt(()=>{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=ue();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 Qt(){let e=ue();return n.onUnmounted(()=>e.dispose()),e}function Xt(){let e=Qt();return l=>{e.dispose(),e.nextFrame(l)}}let en=Symbol("headlessui.useid"),tn=0;function le(){return n.inject(en,()=>`${++tn}`)()}function k(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 nn=Object.defineProperty,on=(e,l,t)=>l in e?nn(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,Pe=(e,l,t)=>(on(e,typeof l!="symbol"?l+"":l,t),t);let ln=class{constructor(){Pe(this,"current",this.detect()),Pe(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"}},Ee=new ln;function Se(e){if(Ee.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let l=k(e);if(l)return l.ownerDocument}return document}let De=["[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 sn=(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))(sn||{}),rn=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(rn||{}),an=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(an||{}),Ae=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ae||{});function cn(e,l=0){var t;return e===((t=Se(e))==null?void 0:t.body)?!1:U(l,{0(){return e.matches(De)},1(){let o=e;for(;o!==null;){if(o.matches(De))return!0;o=o.parentElement}return!1}})}var un=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(un||{});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 dn(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 fn(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function pn(){return/Android/gi.test(window.navigator.userAgent)}function Fe(){return fn()||pn()}function de(e,l,t){Ee.isServer||n.watchEffect(o=>{document.addEventListener(e,l,t),o(()=>document.removeEventListener(e,l,t))})}function mn(e,l,t){Ee.isServer||n.watchEffect(o=>{window.addEventListener(e,l,t),o(()=>window.removeEventListener(e,l,t))})}function hn(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 u(m){return typeof m=="function"?u(m()):Array.isArray(m)||m instanceof Set?m:[m]}(e);for(let u of c){if(u===null)continue;let m=u instanceof HTMLElement?u:k(u);if(m!=null&&m.contains(r)||a.composed&&a.composedPath().includes(m))return}return!cn(r,Ae.Loose)&&r.tabIndex!==-1&&a.preventDefault(),l(a,r)}let s=n.ref(null);de("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),de("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),de("click",a=>{Fe()||s.value&&(o(a,()=>s.value),s.value=null)},!0),de("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),mn("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function je(e,l){if(e)return e;let t=l??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function gn(e,l){let t=n.ref(je(e.value.type,e.value.as));return n.onMounted(()=>{t.value=je(e.value.type,e.value.as)}),n.watchEffect(()=>{var o;t.value||k(l)&&k(l)instanceof HTMLButtonElement&&!((o=k(l))!=null&&o.hasAttribute("type"))&&(t.value="button")}),t}function He(e){return[e.screenX,e.screenY]}function bn(){let e=n.ref([-1,-1]);return{wasMoved(l){let t=He(l);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(l){e.value=He(l)}}}function vn({container:e,accept:l,walk:t,enabled:o}){n.watchEffect(()=>{let s=e.value;if(!s||o!==void 0&&!o.value)return;let a=Se(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||{}),Cn=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Cn||{});function q({visible:e=!0,features:l=0,ourProps:t,theirProps:o,...s}){var a;let i=Ue(o,t),r=Object.assign(s,{props:i});if(e||l&2&&i.static)return Oe(r);if(l&1){let c=(a=i.unmount)==null||a?0:1;return U(c,{0(){return null},1(){return Oe({...s,props:{...i,hidden:!0,style:{display:"none"}}})}})}return Oe(r)}function Oe({props:e,attrs:l,slots:t,slot:o,name:s}){var a,i;let{as:r,...c}=fe(e,["unmount","static"]),u=(a=t.default)==null?void 0:a.call(t,o),m={};if(o){let p=!1,h=[];for(let[b,g]of Object.entries(o))typeof g=="boolean"&&(p=!0),g===!0&&h.push(b);p&&(m["data-headlessui-state"]=h.join(" "))}if(r==="template"){if(u=ze(u??[]),Object.keys(c).length>0||Object.keys(l).length>0){let[p,...h]=u??[];if(!xn(p)||h.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(y=>y.trim()).filter((y,N,L)=>L.indexOf(y)===N).sort((y,N)=>y.localeCompare(N)).map(y=>` - ${y}`).join(`
|
|
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(y=>` - ${y}`).join(`
|
|
6
6
|
`)].join(`
|
|
7
|
-
`));let u=Ze((d=t.props)!=null?d:{},p,g),f=r.cloneVNode(t,u,!0);for(let h in u)h.startsWith("on")&&(f.props||(f.props={}),f.props[h]=u[h]);return f}return Array.isArray(m)&&m.length===1?m[0]:m}return r.h(c,Object.assign({},p,g),{default:()=>m})}function ze(n){return n.flatMap(i=>i.type===r.Fragment?ze(i.children):[i])}function Ze(...n){if(n.length===0)return{};if(n.length===1)return n[0];let i={},e={};for(let o of n)for(let a in o)a.startsWith("on")&&typeof o[a]=="function"?(e[a]!=null||(e[a]=[]),e[a].push(o[a])):i[a]=o[a];if(i.disabled||i["aria-disabled"])return Object.assign(i,Object.fromEntries(Object.keys(e).map(o=>[o,void 0])));for(let o in e)Object.assign(i,{[o](a,...s){let d=e[o];for(let c of d){if(a instanceof Event&&a.defaultPrevented)return;c(a,...s)}}});return i}function Cn(n){let i=Object.assign({},n);for(let e in i)i[e]===void 0&&delete i[e];return i}function pe(n,i=[]){let e=Object.assign({},n);for(let o of i)o in e&&delete e[o];return e}function En(n){return n==null?!1:typeof n.type=="string"||typeof n.type=="object"||typeof n.type=="function"}var We=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(We||{});let Sn=r.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(n,{slots:i,attrs:e}){return()=>{var o;let{features:a,...s}=n,d={"aria-hidden":(a&2)===2?!0:(o=s["aria-hidden"])!=null?o:void 0,hidden:(a&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",...(a&4)===4&&(a&2)!==2&&{display:"none"}}};return q({ourProps:d,theirProps:s,slot:{},attrs:e,slots:i,name:"Hidden"})}}}),qe=Symbol("Context");var le=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(le||{});function Tn(){return r.inject(qe,null)}function An(n){r.provide(qe,n)}var R=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(R||{}),Xe=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(Xe||{});function kn(n){function i(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",i))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",i),i())}let X=[];kn(()=>{function n(i){i.target instanceof HTMLElement&&i.target!==document.body&&X[0]!==i.target&&(X.unshift(i.target),X=X.filter(e=>e!=null&&e.isConnected),X.splice(10))}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function On(n){throw new Error("Unexpected object: "+n)}var P=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(P||{});function Ye(n,i){let e=i.resolveItems();if(e.length<=0)return null;let o=i.resolveActiveIndex(),a=o??-1;switch(n.focus){case 0:{for(let s=0;s<e.length;++s)if(!i.resolveDisabled(e[s],s,e))return s;return o}case 1:{a===-1&&(a=e.length);for(let s=a-1;s>=0;--s)if(!i.resolveDisabled(e[s],s,e))return s;return o}case 2:{for(let s=a+1;s<e.length;++s)if(!i.resolveDisabled(e[s],s,e))return s;return o}case 3:{for(let s=e.length-1;s>=0;--s)if(!i.resolveDisabled(e[s],s,e))return s;return o}case 4:{for(let s=0;s<e.length;++s)if(i.resolveId(e[s],s,e)===n.id)return s;return o}case 5:return null;default:On(n)}}function Qe(n={},i=null,e=[]){for(let[o,a]of Object.entries(n))Je(e,Ke(i,o),a);return e}function Ke(n,i){return n?n+"["+i+"]":i}function Je(n,i,e){if(Array.isArray(e))for(let[o,a]of e.entries())Je(n,Ke(i,o.toString()),a);else e instanceof Date?n.push([i,e.toISOString()]):typeof e=="boolean"?n.push([i,e?"1":"0"]):typeof e=="string"?n.push([i,e]):typeof e=="number"?n.push([i,`${e}`]):e==null?n.push([i,""]):Qe(e,i,n)}function In(n,i){return n===i}var Vn=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Vn||{}),$n=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))($n||{}),Ln=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(Ln||{});let et=Symbol("ComboboxContext");function Y(n){let i=r.inject(et,null);if(i===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Y),e}return i}let tt=Symbol("VirtualContext"),Bn=r.defineComponent({name:"VirtualProvider",setup(n,{slots:i}){let e=Y("VirtualProvider"),o=r.computed(()=>{let c=$(e.optionsRef);if(!c)return{start:0,end:0};let p=window.getComputedStyle(c);return{start:parseFloat(p.paddingBlockStart||p.paddingTop),end:parseFloat(p.paddingBlockEnd||p.paddingBottom)}}),a=Kt(r.computed(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:e.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return $(e.optionsRef)},overscan:12}))),s=r.computed(()=>{var c;return(c=e.virtual.value)==null?void 0:c.options}),d=r.ref(0);return r.watch([s],()=>{d.value+=1}),r.provide(tt,e.virtual.value?a:null),()=>[r.h("div",{style:{position:"relative",width:"100%",height:`${a.value.getTotalSize()}px`},ref:c=>{if(c){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||e.activationTrigger.value===0)return;e.activeOptionIndex.value!==null&&e.virtual.value.options.length>e.activeOptionIndex.value&&a.value.scrollToIndex(e.activeOptionIndex.value)}}},a.value.getVirtualItems().map(c=>r.cloneVNode(i.default({option:e.virtual.value.options[c.index],open:e.comboboxState.value===0})[0],{key:`${d.value}-${c.index}`,"data-index":c.index,"aria-setsize":e.virtual.value.options.length,"aria-posinset":c.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${c.start}px)`,overflowAnchor:"none"}})))]}}),Nn=r.defineComponent({name:"Combobox",emits:{"update:modelValue":n=>!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(n,{slots:i,attrs:e,emit:o}){let a=r.ref(1),s=r.ref(null),d=r.ref(null),c=r.ref(null),p=r.ref(null),m=r.ref({static:!1,hold:!1}),g=r.ref([]),t=r.ref(null),l=r.ref(2),u=r.ref(!1);function f(b=y=>y){let y=t.value!==null?g.value[t.value]:null,S=b(g.value.slice()),k=S.length>0&&S[0].dataRef.order.value!==null?S.sort((L,F)=>L.dataRef.order.value-F.dataRef.order.value):mn(S,L=>$(L.dataRef.domRef)),V=y?k.indexOf(y):null;return V===-1&&(V=null),{options:k,activeOptionIndex:V}}let h=r.computed(()=>n.multiple?1:0),v=r.computed(()=>n.nullable),[_,w]=Jt(r.computed(()=>n.modelValue),b=>o("update:modelValue",b),r.computed(()=>n.defaultValue)),A=r.computed(()=>_.value===void 0?U(h.value,{1:[],0:void 0}):_.value),O=null,x=null;function I(b){return U(h.value,{0(){return w==null?void 0:w(b)},1:()=>{let y=r.toRaw(E.value.value).slice(),S=r.toRaw(b),k=y.findIndex(V=>E.compare(S,r.toRaw(V)));return k===-1?y.push(S):y.splice(k,1),w==null?void 0:w(y)}})}let C=r.computed(()=>{});r.watch([C],([b],[y])=>{if(E.virtual.value&&b&&y&&t.value!==null){let S=b.indexOf(y[t.value]);S!==-1?t.value=S:t.value=null}});let E={comboboxState:a,value:A,mode:h,compare(b,y){if(typeof n.by=="string"){let S=n.by;return(b==null?void 0:b[S])===(y==null?void 0:y[S])}return n.by===null?In(b,y):n.by(b,y)},calculateIndex(b){return E.virtual.value?n.by===null?E.virtual.value.options.indexOf(b):E.virtual.value.options.findIndex(y=>E.compare(y,b)):g.value.findIndex(y=>E.compare(y.dataRef.value,b))},defaultValue:r.computed(()=>n.defaultValue),nullable:v,immediate:r.computed(()=>!1),virtual:r.computed(()=>null),inputRef:d,labelRef:s,buttonRef:c,optionsRef:p,disabled:r.computed(()=>n.disabled),options:g,change(b){w(b)},activeOptionIndex:r.computed(()=>{if(u.value&&t.value===null&&(E.virtual.value?E.virtual.value.options.length>0:g.value.length>0)){if(E.virtual.value){let y=E.virtual.value.options.findIndex(S=>{var k;return!((k=E.virtual.value)!=null&&k.disabled(S))});if(y!==-1)return y}let b=g.value.findIndex(y=>!y.dataRef.disabled);if(b!==-1)return b}return t.value}),activationTrigger:l,optionsPropsRef:m,closeCombobox(){u.value=!1,!n.disabled&&a.value!==1&&(a.value=1,t.value=null)},openCombobox(){if(u.value=!0,!n.disabled&&a.value!==0){if(E.value.value){let b=E.calculateIndex(E.value.value);b!==-1&&(t.value=b)}a.value=0}},setActivationTrigger(b){l.value=b},goToOption(b,y,S){u.value=!1,O!==null&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{if(n.disabled||p.value&&!m.value.static&&a.value===1)return;if(E.virtual.value){t.value=b===P.Specific?y:Ye({focus:b},{resolveItems:()=>E.virtual.value.options,resolveActiveIndex:()=>{var L,F;return(F=(L=E.activeOptionIndex.value)!=null?L:E.virtual.value.options.findIndex(H=>{var N;return!((N=E.virtual.value)!=null&&N.disabled(H))}))!=null?F:null},resolveDisabled:L=>E.virtual.value.disabled(L),resolveId(){throw new Error("Function not implemented.")}}),l.value=S??2;return}let k=f();if(k.activeOptionIndex===null){let L=k.options.findIndex(F=>!F.dataRef.disabled);L!==-1&&(k.activeOptionIndex=L)}let V=b===P.Specific?y:Ye({focus:b},{resolveItems:()=>k.options,resolveActiveIndex:()=>k.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});t.value=V,l.value=S??2,g.value=k.options})},selectOption(b){let y=g.value.find(k=>k.id===b);if(!y)return;let{dataRef:S}=y;I(S.value)},selectActiveOption(){if(E.activeOptionIndex.value!==null){if(E.virtual.value)I(E.virtual.value.options[E.activeOptionIndex.value]);else{let{dataRef:b}=g.value[E.activeOptionIndex.value];I(b.value)}E.goToOption(P.Specific,E.activeOptionIndex.value)}},registerOption(b,y){let S=r.reactive({id:b,dataRef:y});if(E.virtual.value){g.value.push(S);return}x&&cancelAnimationFrame(x);let k=f(V=>(V.push(S),V));t.value===null&&E.isSelected(y.value.value)&&(k.activeOptionIndex=k.options.indexOf(S)),g.value=k.options,t.value=k.activeOptionIndex,l.value=2,k.options.some(V=>!$(V.dataRef.domRef))&&(x=requestAnimationFrame(()=>{let V=f();g.value=V.options,t.value=V.activeOptionIndex}))},unregisterOption(b,y){if(O!==null&&cancelAnimationFrame(O),y&&(u.value=!0),E.virtual.value){g.value=g.value.filter(k=>k.id!==b);return}let S=f(k=>{let V=k.findIndex(L=>L.id===b);return V!==-1&&k.splice(V,1),k});g.value=S.options,t.value=S.activeOptionIndex,l.value=2},isSelected(b){return U(h.value,{0:()=>E.compare(r.toRaw(E.value.value),r.toRaw(b)),1:()=>r.toRaw(E.value.value).some(y=>E.compare(r.toRaw(y),r.toRaw(b)))})},isActive(b){return t.value===E.calculateIndex(b)}};vn([d,c,p],()=>E.closeCombobox(),r.computed(()=>a.value===0)),r.provide(et,E),An(r.computed(()=>U(a.value,{0:le.Open,1:le.Closed})));let T=r.computed(()=>{var b;return(b=$(d))==null?void 0:b.closest("form")});return r.onMounted(()=>{r.watch([T],()=>{if(!T.value||n.defaultValue===void 0)return;function b(){E.change(n.defaultValue)}return T.value.addEventListener("reset",b),()=>{var y;(y=T.value)==null||y.removeEventListener("reset",b)}},{immediate:!0})}),()=>{var b,y,S;let{name:k,disabled:V,form:L,...F}=n,H={open:a.value===0,disabled:V,activeIndex:E.activeOptionIndex.value,activeOption:E.activeOptionIndex.value===null?null:E.virtual.value?E.virtual.value.options[(b=E.activeOptionIndex.value)!=null?b:0]:(S=(y=E.options.value[E.activeOptionIndex.value])==null?void 0:y.dataRef.value)!=null?S:null,value:A.value};return r.h(r.Fragment,[...k!=null&&A.value!=null?Qe({[k]:A.value}).map(([N,la])=>r.h(Sn,Cn({features:We.Hidden,key:N,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:L,disabled:V,name:N,value:la}))):[],q({theirProps:{...e,...pe(F,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:H,slots:i,attrs:e,name:"Combobox"})])}}});r.defineComponent({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(n,{attrs:i,slots:e}){var o;let a=(o=n.id)!=null?o:`headlessui-combobox-label-${re()}`,s=Y("ComboboxLabel");function d(){var c;(c=$(s.inputRef))==null||c.focus({preventScroll:!0})}return()=>{let c={open:s.comboboxState.value===0,disabled:s.disabled.value},{...p}=n,m={id:a,ref:s.labelRef,onClick:d};return q({ourProps:m,theirProps:p,slot:c,attrs:i,slots:e,name:"ComboboxLabel"})}}});let Pn=r.defineComponent({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(n,{attrs:i,slots:e,expose:o}){var a;let s=(a=n.id)!=null?a:`headlessui-combobox-button-${re()}`,d=Y("ComboboxButton");o({el:d.buttonRef,$el:d.buttonRef});function c(g){d.disabled.value||(d.comboboxState.value===0?d.closeCombobox():(g.preventDefault(),d.openCombobox()),r.nextTick(()=>{var t;return(t=$(d.inputRef))==null?void 0:t.focus({preventScroll:!0})}))}function p(g){switch(g.key){case R.ArrowDown:g.preventDefault(),g.stopPropagation(),d.comboboxState.value===1&&d.openCombobox(),r.nextTick(()=>{var t;return(t=d.inputRef.value)==null?void 0:t.focus({preventScroll:!0})});return;case R.ArrowUp:g.preventDefault(),g.stopPropagation(),d.comboboxState.value===1&&(d.openCombobox(),r.nextTick(()=>{d.value.value||d.goToOption(P.Last)})),r.nextTick(()=>{var t;return(t=d.inputRef.value)==null?void 0:t.focus({preventScroll:!0})});return;case R.Escape:if(d.comboboxState.value!==0)return;g.preventDefault(),d.optionsRef.value&&!d.optionsPropsRef.value.static&&g.stopPropagation(),d.closeCombobox(),r.nextTick(()=>{var t;return(t=d.inputRef.value)==null?void 0:t.focus({preventScroll:!0})});return}}let m=bn(r.computed(()=>({as:n.as,type:i.type})),d.buttonRef);return()=>{var g,t;let l={open:d.comboboxState.value===0,disabled:d.disabled.value,value:d.value.value},{...u}=n,f={ref:d.buttonRef,id:s,type:m.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(g=$(d.optionsRef))==null?void 0:g.id,"aria-expanded":d.comboboxState.value===0,"aria-labelledby":d.labelRef.value?[(t=$(d.labelRef))==null?void 0:t.id,s].join(" "):void 0,disabled:d.disabled.value===!0?!0:void 0,onKeydown:p,onClick:c};return q({ourProps:f,theirProps:u,slot:l,attrs:i,slots:e,name:"ComboboxButton"})}}}),Mn=r.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:n=>!0},setup(n,{emit:i,attrs:e,slots:o,expose:a}){var s;let d=(s=n.id)!=null?s:`headlessui-combobox-input-${re()}`,c=Y("ComboboxInput"),p=r.computed(()=>Te($(c.inputRef))),m={value:!1};a({el:c.inputRef,$el:c.inputRef});function g(){c.change(null);let x=$(c.optionsRef);x&&(x.scrollTop=0),c.goToOption(P.Nothing)}let t=r.computed(()=>{var x;let I=c.value.value;return $(c.inputRef)?typeof n.displayValue<"u"&&I!==void 0?(x=n.displayValue(I))!=null?x:"":typeof I=="string"?I:"":""});r.onMounted(()=>{r.watch([t,c.comboboxState,p],([x,I],[C,E])=>{if(m.value)return;let T=$(c.inputRef);T&&((E===0&&I===1||x!==C)&&(T.value=x),requestAnimationFrame(()=>{var b;if(m.value||!T||((b=p.value)==null?void 0:b.activeElement)!==T)return;let{selectionStart:y,selectionEnd:S}=T;Math.abs((S??0)-(y??0))===0&&y===0&&T.setSelectionRange(T.value.length,T.value.length)}))},{immediate:!0}),r.watch([c.comboboxState],([x],[I])=>{if(x===0&&I===1){if(m.value)return;let C=$(c.inputRef);if(!C)return;let E=C.value,{selectionStart:T,selectionEnd:b,selectionDirection:y}=C;C.value="",C.value=E,y!==null?C.setSelectionRange(T,b,y):C.setSelectionRange(T,b)}})});let l=r.ref(!1);function u(){l.value=!0}function f(){de().nextFrame(()=>{l.value=!1})}let h=nn();function v(x){switch(m.value=!0,h(()=>{m.value=!1}),x.key){case R.Enter:if(m.value=!1,c.comboboxState.value!==0||l.value)return;if(x.preventDefault(),x.stopPropagation(),c.activeOptionIndex.value===null){c.closeCombobox();return}c.selectActiveOption(),c.mode.value===0&&c.closeCombobox();break;case R.ArrowDown:return m.value=!1,x.preventDefault(),x.stopPropagation(),U(c.comboboxState.value,{0:()=>c.goToOption(P.Next),1:()=>c.openCombobox()});case R.ArrowUp:return m.value=!1,x.preventDefault(),x.stopPropagation(),U(c.comboboxState.value,{0:()=>c.goToOption(P.Previous),1:()=>{c.openCombobox(),r.nextTick(()=>{c.value.value||c.goToOption(P.Last)})}});case R.Home:if(x.shiftKey)break;return m.value=!1,x.preventDefault(),x.stopPropagation(),c.goToOption(P.First);case R.PageUp:return m.value=!1,x.preventDefault(),x.stopPropagation(),c.goToOption(P.First);case R.End:if(x.shiftKey)break;return m.value=!1,x.preventDefault(),x.stopPropagation(),c.goToOption(P.Last);case R.PageDown:return m.value=!1,x.preventDefault(),x.stopPropagation(),c.goToOption(P.Last);case R.Escape:if(m.value=!1,c.comboboxState.value!==0)return;x.preventDefault(),c.optionsRef.value&&!c.optionsPropsRef.value.static&&x.stopPropagation(),c.nullable.value&&c.mode.value===0&&c.value.value===null&&g(),c.closeCombobox();break;case R.Tab:if(m.value=!1,c.comboboxState.value!==0)return;c.mode.value===0&&c.activationTrigger.value!==1&&c.selectActiveOption(),c.closeCombobox();break}}function _(x){i("change",x),c.nullable.value&&c.mode.value===0&&x.target.value===""&&g(),c.openCombobox()}function w(x){var I,C,E;let T=(I=x.relatedTarget)!=null?I:X.find(b=>b!==x.currentTarget);if(m.value=!1,!((C=$(c.optionsRef))!=null&&C.contains(T))&&!((E=$(c.buttonRef))!=null&&E.contains(T))&&c.comboboxState.value===0)return x.preventDefault(),c.mode.value===0&&(c.nullable.value&&c.value.value===null?g():c.activationTrigger.value!==1&&c.selectActiveOption()),c.closeCombobox()}function A(x){var I,C,E;let T=(I=x.relatedTarget)!=null?I:X.find(b=>b!==x.currentTarget);(C=$(c.buttonRef))!=null&&C.contains(T)||(E=$(c.optionsRef))!=null&&E.contains(T)||c.disabled.value||c.immediate.value&&c.comboboxState.value!==0&&(c.openCombobox(),de().nextFrame(()=>{c.setActivationTrigger(1)}))}let O=r.computed(()=>{var x,I,C,E;return(E=(C=(I=n.defaultValue)!=null?I:c.defaultValue.value!==void 0?(x=n.displayValue)==null?void 0:x.call(n,c.defaultValue.value):null)!=null?C:c.defaultValue.value)!=null?E:""});return()=>{var x,I,C,E,T,b,y;let S={open:c.comboboxState.value===0},{displayValue:k,onChange:V,...L}=n,F={"aria-controls":(x=c.optionsRef.value)==null?void 0:x.id,"aria-expanded":c.comboboxState.value===0,"aria-activedescendant":c.activeOptionIndex.value===null?void 0:c.virtual.value?(I=c.options.value.find(H=>!c.virtual.value.disabled(H.dataRef.value)&&c.compare(H.dataRef.value,c.virtual.value.options[c.activeOptionIndex.value])))==null?void 0:I.id:(C=c.options.value[c.activeOptionIndex.value])==null?void 0:C.id,"aria-labelledby":(b=(E=$(c.labelRef))==null?void 0:E.id)!=null?b:(T=$(c.buttonRef))==null?void 0:T.id,"aria-autocomplete":"list",id:d,onCompositionstart:u,onCompositionend:f,onKeydown:v,onInput:_,onFocus:A,onBlur:w,role:"combobox",type:(y=e.type)!=null?y:"text",tabIndex:0,ref:c.inputRef,defaultValue:O.value,disabled:c.disabled.value===!0?!0:void 0};return q({ourProps:F,theirProps:L,slot:S,attrs:e,slots:o,features:ae.RenderStrategy|ae.Static,name:"ComboboxInput"})}}}),Rn=r.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(n,{attrs:i,slots:e,expose:o}){let a=Y("ComboboxOptions"),s=`headlessui-combobox-options-${re()}`;o({el:a.optionsRef,$el:a.optionsRef}),r.watchEffect(()=>{a.optionsPropsRef.value.static=n.static}),r.watchEffect(()=>{a.optionsPropsRef.value.hold=n.hold});let d=Tn(),c=r.computed(()=>d!==null?(d.value&le.Open)===le.Open:a.comboboxState.value===0);wn({container:r.computed(()=>$(a.optionsRef)),enabled:r.computed(()=>a.comboboxState.value===0),accept(m){return m.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:m.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(m){m.setAttribute("role","none")}});function p(m){m.preventDefault()}return()=>{var m,g,t;let l={open:a.comboboxState.value===0},u={"aria-labelledby":(t=(m=$(a.labelRef))==null?void 0:m.id)!=null?t:(g=$(a.buttonRef))==null?void 0:g.id,id:s,ref:a.optionsRef,role:"listbox","aria-multiselectable":a.mode.value===1?!0:void 0,onMousedown:p},f=pe(n,["hold"]);return q({ourProps:u,theirProps:f,slot:l,attrs:i,slots:a.virtual.value&&a.comboboxState.value===0?{...e,default:()=>[r.h(Bn,{},e.default)]}:e,features:ae.RenderStrategy|ae.Static,visible:c.value,name:"ComboboxOptions"})}}}),Dn=r.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(n,{slots:i,attrs:e,expose:o}){let a=Y("ComboboxOption"),s=`headlessui-combobox-option-${re()}`,d=r.ref(null),c=r.computed(()=>n.disabled);o({el:d,$el:d});let p=r.computed(()=>{var w;return a.virtual.value?a.activeOptionIndex.value===a.calculateIndex(n.value):a.activeOptionIndex.value===null?!1:((w=a.options.value[a.activeOptionIndex.value])==null?void 0:w.id)===s}),m=r.computed(()=>a.isSelected(n.value)),g=r.inject(tt,null),t=r.computed(()=>({disabled:n.disabled,value:n.value,domRef:d,order:r.computed(()=>n.order)}));r.onMounted(()=>a.registerOption(s,t)),r.onUnmounted(()=>a.unregisterOption(s,p.value)),r.watchEffect(()=>{let w=$(d);w&&(g==null||g.value.measureElement(w))}),r.watchEffect(()=>{a.comboboxState.value===0&&p.value&&(a.virtual.value||a.activationTrigger.value!==0&&r.nextTick(()=>{var w,A;return(A=(w=$(d))==null?void 0:w.scrollIntoView)==null?void 0:A.call(w,{block:"nearest"})}))});function l(w){w.preventDefault(),w.button===Xe.Left&&(c.value||(a.selectOption(s),je()||requestAnimationFrame(()=>{var A;return(A=$(a.inputRef))==null?void 0:A.focus({preventScroll:!0})}),a.mode.value===0&&a.closeCombobox()))}function u(){var w;if(n.disabled||(w=a.virtual.value)!=null&&w.disabled(n.value))return a.goToOption(P.Nothing);let A=a.calculateIndex(n.value);a.goToOption(P.Specific,A)}let f=yn();function h(w){f.update(w)}function v(w){var A;if(!f.wasMoved(w)||n.disabled||(A=a.virtual.value)!=null&&A.disabled(n.value)||p.value)return;let O=a.calculateIndex(n.value);a.goToOption(P.Specific,O,0)}function _(w){var A;f.wasMoved(w)&&(n.disabled||(A=a.virtual.value)!=null&&A.disabled(n.value)||p.value&&(a.optionsPropsRef.value.hold||a.goToOption(P.Nothing)))}return()=>{let{disabled:w}=n,A={active:p.value,selected:m.value,disabled:w},O={id:s,ref:d,role:"option",tabIndex:w===!0?void 0:-1,"aria-disabled":w===!0?!0:void 0,"aria-selected":m.value,disabled:void 0,onMousedown:l,onFocus:u,onPointerenter:h,onMouseenter:h,onPointermove:v,onMousemove:v,onPointerleave:_,onMouseleave:_},x=pe(n,["order","value"]);return q({ourProps:O,theirProps:x,slot:A,attrs:e,slots:i,name:"ComboboxOption"})}}});function Fn(n,i){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.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 Hn(n,i){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.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 jn(n,i){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[r.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"})])}const nt={__name:"Select",props:r.mergeModels({languages:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const i=n,e=r.useModel(n,"modelValue"),o=r.ref(""),a=r.ref(null),s=r.computed(()=>Object.entries(i.languages).filter(([,c])=>c.toLowerCase().includes(o.value.toLowerCase()))),d=c=>{c.target.value="",o.value="",a.value&&a.value.$el.click()};return(c,p)=>(r.openBlock(),r.createBlock(r.unref(Nn),{modelValue:e.value,"onUpdate:modelValue":p[3]||(p[3]=m=>e.value=m),as:"div",class:"relative mt-1"},{default:r.withCtx(()=>[r.createVNode(r.unref(Mn),{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:p[0]||(p[0]=m=>o.value=m.target.value),displayValue:m=>n.languages[m],onFocus:p[1]||(p[1]=m=>d(m))},null,8,["displayValue"]),r.createVNode(r.unref(Pn),{ref_key:"btnSelect",ref:a,class:"absolute inset-y-0 right-0 flex items-center pr-2"},{default:r.withCtx(()=>[r.createVNode(r.unref(Hn),{class:"h-5 w-5 text-gray-400","aria-hidden":"true",onClick:p[2]||(p[2]=m=>d(m))})]),_:1},512),r.createVNode(r.unref(Rn),{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:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,([m,g])=>(r.openBlock(),r.createBlock(r.unref(Dn),{key:m,value:m},{default:r.withCtx(({active:t,selected:l})=>[r.createElementVNode("li",{class:r.normalizeClass(["relative cursor-default select-none py-2 pl-3 pr-9",t?"bg-[#3B5695] text-white":"text-textCustom"])},[r.createElementVNode("span",{class:r.normalizeClass(["block truncate",l&&"font-semibold"])},r.toDisplayString(g),3)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]))}},ot="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",Gn={key:0},Un=[r.createElementVNode("img",{src:ot,alt:"swap",class:"w-4"},null,-1)],zn=[r.createElementVNode("img",{src:ot,alt:"swap",class:"w-4"},null,-1)],Zn={__name:"SwapBtn",props:{isBidirect:{type:Boolean,default:!1}},emits:["swap"],setup(n,{emit:i}){const e=i;return(o,a)=>n.isBidirect?(r.openBlock(),r.createElementBlock("button",{key:1,onClick:a[0]||(a[0]=s=>e("swap"))},zn)):(r.openBlock(),r.createElementBlock("button",Gn,Un))}};var rt=!1;function me(n,i,e){return Array.isArray(n)?(n.length=Math.max(n.length,i),n.splice(i,1,e),e):(n[i]=e,e)}function ke(n,i){if(Array.isArray(n)){n.splice(i,1);return}delete n[i]}function Wn(){return at().__VUE_DEVTOOLS_GLOBAL_HOOK__}function at(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const qn=typeof Proxy=="function",Xn="devtools-plugin:setup",Yn="plugin:settings:set";let ee,Oe;function Qn(){var n;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,Oe=window.performance):typeof globalThis<"u"&&(!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance)?(ee=!0,Oe=globalThis.perf_hooks.performance):ee=!1),ee}function Kn(){return Qn()?Oe.now():Date.now()}class Jn{constructor(i,e){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=i,this.hook=e;const o={};if(i.settings)for(const d in i.settings){const c=i.settings[d];o[d]=c.defaultValue}const a=`__vue-devtools-plugin-settings__${i.id}`;let s=Object.assign({},o);try{const d=localStorage.getItem(a),c=JSON.parse(d);Object.assign(s,c)}catch{}this.fallbacks={getSettings(){return s},setSettings(d){try{localStorage.setItem(a,JSON.stringify(d))}catch{}s=d},now(){return Kn()}},e&&e.on(Yn,(d,c)=>{d===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(d,c)=>this.target?this.target.on[c]:(...p)=>{this.onQueue.push({method:c,args:p})}}),this.proxiedTarget=new Proxy({},{get:(d,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...p)=>(this.targetQueue.push({method:c,args:p,resolve:()=>{}}),this.fallbacks[c](...p)):(...p)=>new Promise(m=>{this.targetQueue.push({method:c,args:p,resolve:m})})})}async setRealTarget(i){this.target=i;for(const e of this.onQueue)this.target.on[e.method](...e.args);for(const e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}}function lt(n,i){const e=n,o=at(),a=Wn(),s=qn&&e.enableEarlyProxy;if(a&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))a.emit(Xn,n,i);else{const d=s?new Jn(e,a):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:e,setupFn:i,proxy:d}),d&&i(d.proxiedTarget)}}/*!
|
|
7
|
+
`));let b=Ue((i=p.props)!=null?i:{},c,m),g=n.cloneVNode(p,b,!0);for(let y in b)y.startsWith("on")&&(g.props||(g.props={}),g.props[y]=b[y]);return g}return Array.isArray(u)&&u.length===1?u[0]:u}return n.h(r,Object.assign({},c,m),{default:()=>u})}function ze(e){return e.flatMap(l=>l.type===n.Fragment?ze(l.children):[l])}function Ue(...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 xn(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var Ze=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ze||{});let wn=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"})}}}),We=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 yn(){return n.inject(We,null)}function En(e){n.provide(We,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||{}),Ge=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Ge||{});function Sn(e){function l(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",l))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",l),l())}let J=[];Sn(()=>{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 On(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 qe(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:On(e)}}function Je(e={},l=null,t=[]){for(let[o,s]of Object.entries(e))Ye(t,Ke(l,o),s);return t}function Ke(e,l){return e?e+"["+l+"]":l}function Ye(e,l,t){if(Array.isArray(t))for(let[o,s]of t.entries())Ye(e,Ke(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,""]):Je(t,l,e)}function kn(e,l){return e===l}var Vn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Vn||{}),$n=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))($n||{}),Nn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Nn||{});let Qe=Symbol("ComboboxContext");function K(e){let l=n.inject(Qe,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 Xe=Symbol("VirtualContext"),In=n.defineComponent({name:"VirtualProvider",setup(e,{slots:l}){let t=K("VirtualProvider"),o=n.computed(()=>{let r=k(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=Jt(n.computed(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return k(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(Xe,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"}})))]}}),Ln=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),u=n.ref({static:!1,hold:!1}),m=n.ref([]),p=n.ref(null),h=n.ref(2),b=n.ref(!1);function g(d=f=>f){let f=p.value!==null?m.value[p.value]:null,x=d(m.value.slice()),w=x.length>0&&x[0].dataRef.order.value!==null?x.sort((I,F)=>I.dataRef.order.value-F.dataRef.order.value):dn(x,I=>k(I.dataRef.domRef)),V=f?w.indexOf(f):null;return V===-1&&(V=null),{options:w,activeOptionIndex:V}}let y=n.computed(()=>e.multiple?1:0),N=n.computed(()=>e.nullable),[L,E]=Kt(n.computed(()=>e.modelValue),d=>o("update:modelValue",d),n.computed(()=>e.defaultValue)),$=n.computed(()=>L.value===void 0?U(y.value,{1:[],0:void 0}):L.value),T=null,_=null;function O(d){return U(y.value,{0(){return E==null?void 0:E(d)},1:()=>{let f=n.toRaw(v.value.value).slice(),x=n.toRaw(d),w=f.findIndex(V=>v.compare(x,n.toRaw(V)));return w===-1?f.push(x):f.splice(w,1),E==null?void 0:E(f)}})}let C=n.computed(()=>{});n.watch([C],([d],[f])=>{if(v.virtual.value&&d&&f&&p.value!==null){let x=d.indexOf(f[p.value]);x!==-1?p.value=x:p.value=null}});let v={comboboxState:s,value:$,mode:y,compare(d,f){if(typeof e.by=="string"){let x=e.by;return(d==null?void 0:d[x])===(f==null?void 0:f[x])}return e.by===null?kn(d,f):e.by(d,f)},calculateIndex(d){return v.virtual.value?e.by===null?v.virtual.value.options.indexOf(d):v.virtual.value.options.findIndex(f=>v.compare(f,d)):m.value.findIndex(f=>v.compare(f.dataRef.value,d))},defaultValue:n.computed(()=>e.defaultValue),nullable:N,immediate:n.computed(()=>!1),virtual:n.computed(()=>null),inputRef:i,labelRef:a,buttonRef:r,optionsRef:c,disabled:n.computed(()=>e.disabled),options:m,change(d){E(d)},activeOptionIndex:n.computed(()=>{if(b.value&&p.value===null&&(v.virtual.value?v.virtual.value.options.length>0:m.value.length>0)){if(v.virtual.value){let f=v.virtual.value.options.findIndex(x=>{var w;return!((w=v.virtual.value)!=null&&w.disabled(x))});if(f!==-1)return f}let d=m.value.findIndex(f=>!f.dataRef.disabled);if(d!==-1)return d}return p.value}),activationTrigger:h,optionsPropsRef:u,closeCombobox(){b.value=!1,!e.disabled&&s.value!==1&&(s.value=1,p.value=null)},openCombobox(){if(b.value=!0,!e.disabled&&s.value!==0){if(v.value.value){let d=v.calculateIndex(v.value.value);d!==-1&&(p.value=d)}s.value=0}},setActivationTrigger(d){h.value=d},goToOption(d,f,x){b.value=!1,T!==null&&cancelAnimationFrame(T),T=requestAnimationFrame(()=>{if(e.disabled||c.value&&!u.value.static&&s.value===1)return;if(v.virtual.value){p.value=d===M.Specific?f:qe({focus:d},{resolveItems:()=>v.virtual.value.options,resolveActiveIndex:()=>{var I,F;return(F=(I=v.activeOptionIndex.value)!=null?I:v.virtual.value.options.findIndex(j=>{var R;return!((R=v.virtual.value)!=null&&R.disabled(j))}))!=null?F:null},resolveDisabled:I=>v.virtual.value.disabled(I),resolveId(){throw new Error("Function not implemented.")}}),h.value=x??2;return}let w=g();if(w.activeOptionIndex===null){let I=w.options.findIndex(F=>!F.dataRef.disabled);I!==-1&&(w.activeOptionIndex=I)}let V=d===M.Specific?f:qe({focus:d},{resolveItems:()=>w.options,resolveActiveIndex:()=>w.activeOptionIndex,resolveId:I=>I.id,resolveDisabled:I=>I.dataRef.disabled});p.value=V,h.value=x??2,m.value=w.options})},selectOption(d){let f=m.value.find(w=>w.id===d);if(!f)return;let{dataRef:x}=f;O(x.value)},selectActiveOption(){if(v.activeOptionIndex.value!==null){if(v.virtual.value)O(v.virtual.value.options[v.activeOptionIndex.value]);else{let{dataRef:d}=m.value[v.activeOptionIndex.value];O(d.value)}v.goToOption(M.Specific,v.activeOptionIndex.value)}},registerOption(d,f){let x=n.reactive({id:d,dataRef:f});if(v.virtual.value){m.value.push(x);return}_&&cancelAnimationFrame(_);let w=g(V=>(V.push(x),V));p.value===null&&v.isSelected(f.value.value)&&(w.activeOptionIndex=w.options.indexOf(x)),m.value=w.options,p.value=w.activeOptionIndex,h.value=2,w.options.some(V=>!k(V.dataRef.domRef))&&(_=requestAnimationFrame(()=>{let V=g();m.value=V.options,p.value=V.activeOptionIndex}))},unregisterOption(d,f){if(T!==null&&cancelAnimationFrame(T),f&&(b.value=!0),v.virtual.value){m.value=m.value.filter(w=>w.id!==d);return}let x=g(w=>{let V=w.findIndex(I=>I.id===d);return V!==-1&&w.splice(V,1),w});m.value=x.options,p.value=x.activeOptionIndex,h.value=2},isSelected(d){return U(y.value,{0:()=>v.compare(n.toRaw(v.value.value),n.toRaw(d)),1:()=>n.toRaw(v.value.value).some(f=>v.compare(n.toRaw(f),n.toRaw(d)))})},isActive(d){return p.value===v.calculateIndex(d)}};hn([i,r,c],()=>v.closeCombobox(),n.computed(()=>s.value===0)),n.provide(Qe,v),En(n.computed(()=>U(s.value,{0:re.Open,1:re.Closed})));let S=n.computed(()=>{var d;return(d=k(i))==null?void 0:d.closest("form")});return n.onMounted(()=>{n.watch([S],()=>{if(!S.value||e.defaultValue===void 0)return;function d(){v.change(e.defaultValue)}return S.value.addEventListener("reset",d),()=>{var f;(f=S.value)==null||f.removeEventListener("reset",d)}},{immediate:!0})}),()=>{var d,f,x;let{name:w,disabled:V,form:I,...F}=e,j={open:s.value===0,disabled:V,activeIndex:v.activeOptionIndex.value,activeOption:v.activeOptionIndex.value===null?null:v.virtual.value?v.virtual.value.options[(d=v.activeOptionIndex.value)!=null?d:0]:(x=(f=v.options.value[v.activeOptionIndex.value])==null?void 0:f.dataRef.value)!=null?x:null,value:$.value};return n.h(n.Fragment,[...w!=null&&$.value!=null?Je({[w]:$.value}).map(([R,e2])=>n.h(wn,_n({features:Ze.Hidden,key:R,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:I,disabled:V,name:R,value:e2}))):[],q({theirProps:{...t,...fe(F,["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=k(a.inputRef))==null||r.focus({preventScroll:!0})}return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value},{...c}=e,u={id:s,ref:a.labelRef,onClick:i};return q({ourProps:u,theirProps:c,slot:r,attrs:l,slots:t,name:"ComboboxLabel"})}}});let Tn=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(m){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(m.preventDefault(),i.openCombobox()),n.nextTick(()=>{var p;return(p=k(i.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(m){switch(m.key){case D.ArrowDown:m.preventDefault(),m.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),n.nextTick(()=>{var p;return(p=i.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case D.ArrowUp:m.preventDefault(),m.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),n.nextTick(()=>{i.value.value||i.goToOption(M.Last)})),n.nextTick(()=>{var p;return(p=i.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case D.Escape:if(i.comboboxState.value!==0)return;m.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&m.stopPropagation(),i.closeCombobox(),n.nextTick(()=>{var p;return(p=i.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let u=gn(n.computed(()=>({as:e.as,type:l.type})),i.buttonRef);return()=>{var m,p;let h={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...b}=e,g={ref:i.buttonRef,id:a,type:u.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(m=k(i.optionsRef))==null?void 0:m.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(p=k(i.labelRef))==null?void 0:p.id,a].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:c,onClick:r};return q({ourProps:g,theirProps:b,slot:h,attrs:l,slots:t,name:"ComboboxButton"})}}}),Bn=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(()=>Se(k(r.inputRef))),u={value:!1};s({el:r.inputRef,$el:r.inputRef});function m(){r.change(null);let _=k(r.optionsRef);_&&(_.scrollTop=0),r.goToOption(M.Nothing)}let p=n.computed(()=>{var _;let O=r.value.value;return k(r.inputRef)?typeof e.displayValue<"u"&&O!==void 0?(_=e.displayValue(O))!=null?_:"":typeof O=="string"?O:"":""});n.onMounted(()=>{n.watch([p,r.comboboxState,c],([_,O],[C,v])=>{if(u.value)return;let S=k(r.inputRef);S&&((v===0&&O===1||_!==C)&&(S.value=_),requestAnimationFrame(()=>{var d;if(u.value||!S||((d=c.value)==null?void 0:d.activeElement)!==S)return;let{selectionStart:f,selectionEnd:x}=S;Math.abs((x??0)-(f??0))===0&&f===0&&S.setSelectionRange(S.value.length,S.value.length)}))},{immediate:!0}),n.watch([r.comboboxState],([_],[O])=>{if(_===0&&O===1){if(u.value)return;let C=k(r.inputRef);if(!C)return;let v=C.value,{selectionStart:S,selectionEnd:d,selectionDirection:f}=C;C.value="",C.value=v,f!==null?C.setSelectionRange(S,d,f):C.setSelectionRange(S,d)}})});let h=n.ref(!1);function b(){h.value=!0}function g(){ue().nextFrame(()=>{h.value=!1})}let y=Xt();function N(_){switch(u.value=!0,y(()=>{u.value=!1}),_.key){case D.Enter:if(u.value=!1,r.comboboxState.value!==0||h.value)return;if(_.preventDefault(),_.stopPropagation(),r.activeOptionIndex.value===null){r.closeCombobox();return}r.selectActiveOption(),r.mode.value===0&&r.closeCombobox();break;case D.ArrowDown:return u.value=!1,_.preventDefault(),_.stopPropagation(),U(r.comboboxState.value,{0:()=>r.goToOption(M.Next),1:()=>r.openCombobox()});case D.ArrowUp:return u.value=!1,_.preventDefault(),_.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(_.shiftKey)break;return u.value=!1,_.preventDefault(),_.stopPropagation(),r.goToOption(M.First);case D.PageUp:return u.value=!1,_.preventDefault(),_.stopPropagation(),r.goToOption(M.First);case D.End:if(_.shiftKey)break;return u.value=!1,_.preventDefault(),_.stopPropagation(),r.goToOption(M.Last);case D.PageDown:return u.value=!1,_.preventDefault(),_.stopPropagation(),r.goToOption(M.Last);case D.Escape:if(u.value=!1,r.comboboxState.value!==0)return;_.preventDefault(),r.optionsRef.value&&!r.optionsPropsRef.value.static&&_.stopPropagation(),r.nullable.value&&r.mode.value===0&&r.value.value===null&&m(),r.closeCombobox();break;case D.Tab:if(u.value=!1,r.comboboxState.value!==0)return;r.mode.value===0&&r.activationTrigger.value!==1&&r.selectActiveOption(),r.closeCombobox();break}}function L(_){l("change",_),r.nullable.value&&r.mode.value===0&&_.target.value===""&&m(),r.openCombobox()}function E(_){var O,C,v;let S=(O=_.relatedTarget)!=null?O:J.find(d=>d!==_.currentTarget);if(u.value=!1,!((C=k(r.optionsRef))!=null&&C.contains(S))&&!((v=k(r.buttonRef))!=null&&v.contains(S))&&r.comboboxState.value===0)return _.preventDefault(),r.mode.value===0&&(r.nullable.value&&r.value.value===null?m():r.activationTrigger.value!==1&&r.selectActiveOption()),r.closeCombobox()}function $(_){var O,C,v;let S=(O=_.relatedTarget)!=null?O:J.find(d=>d!==_.currentTarget);(C=k(r.buttonRef))!=null&&C.contains(S)||(v=k(r.optionsRef))!=null&&v.contains(S)||r.disabled.value||r.immediate.value&&r.comboboxState.value!==0&&(r.openCombobox(),ue().nextFrame(()=>{r.setActivationTrigger(1)}))}let T=n.computed(()=>{var _,O,C,v;return(v=(C=(O=e.defaultValue)!=null?O:r.defaultValue.value!==void 0?(_=e.displayValue)==null?void 0:_.call(e,r.defaultValue.value):null)!=null?C:r.defaultValue.value)!=null?v:""});return()=>{var _,O,C,v,S,d,f;let x={open:r.comboboxState.value===0},{displayValue:w,onChange:V,...I}=e,F={"aria-controls":(_=r.optionsRef.value)==null?void 0:_.id,"aria-expanded":r.comboboxState.value===0,"aria-activedescendant":r.activeOptionIndex.value===null?void 0:r.virtual.value?(O=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:O.id:(C=r.options.value[r.activeOptionIndex.value])==null?void 0:C.id,"aria-labelledby":(d=(v=k(r.labelRef))==null?void 0:v.id)!=null?d:(S=k(r.buttonRef))==null?void 0:S.id,"aria-autocomplete":"list",id:i,onCompositionstart:b,onCompositionend:g,onKeydown:N,onInput:L,onFocus:$,onBlur:E,role:"combobox",type:(f=t.type)!=null?f:"text",tabIndex:0,ref:r.inputRef,defaultValue:T.value,disabled:r.disabled.value===!0?!0:void 0};return q({ourProps:F,theirProps:I,slot:x,attrs:t,slots:o,features:se.RenderStrategy|se.Static,name:"ComboboxInput"})}}}),Rn=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=yn(),r=n.computed(()=>i!==null?(i.value&re.Open)===re.Open:s.comboboxState.value===0);vn({container:n.computed(()=>k(s.optionsRef)),enabled:n.computed(()=>s.comboboxState.value===0),accept(u){return u.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function c(u){u.preventDefault()}return()=>{var u,m,p;let h={open:s.comboboxState.value===0},b={"aria-labelledby":(p=(u=k(s.labelRef))==null?void 0:u.id)!=null?p:(m=k(s.buttonRef))==null?void 0:m.id,id:a,ref:s.optionsRef,role:"listbox","aria-multiselectable":s.mode.value===1?!0:void 0,onMousedown:c},g=fe(e,["hold"]);return q({ourProps:b,theirProps:g,slot:h,attrs:l,slots:s.virtual.value&&s.comboboxState.value===0?{...t,default:()=>[n.h(In,{},t.default)]}:t,features:se.RenderStrategy|se.Static,visible:r.value,name:"ComboboxOptions"})}}}),Mn=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 E;return s.virtual.value?s.activeOptionIndex.value===s.calculateIndex(e.value):s.activeOptionIndex.value===null?!1:((E=s.options.value[s.activeOptionIndex.value])==null?void 0:E.id)===a}),u=n.computed(()=>s.isSelected(e.value)),m=n.inject(Xe,null),p=n.computed(()=>({disabled:e.disabled,value:e.value,domRef:i,order:n.computed(()=>e.order)}));n.onMounted(()=>s.registerOption(a,p)),n.onUnmounted(()=>s.unregisterOption(a,c.value)),n.watchEffect(()=>{let E=k(i);E&&(m==null||m.value.measureElement(E))}),n.watchEffect(()=>{s.comboboxState.value===0&&c.value&&(s.virtual.value||s.activationTrigger.value!==0&&n.nextTick(()=>{var E,$;return($=(E=k(i))==null?void 0:E.scrollIntoView)==null?void 0:$.call(E,{block:"nearest"})}))});function h(E){E.preventDefault(),E.button===Ge.Left&&(r.value||(s.selectOption(a),Fe()||requestAnimationFrame(()=>{var $;return($=k(s.inputRef))==null?void 0:$.focus({preventScroll:!0})}),s.mode.value===0&&s.closeCombobox()))}function b(){var E;if(e.disabled||(E=s.virtual.value)!=null&&E.disabled(e.value))return s.goToOption(M.Nothing);let $=s.calculateIndex(e.value);s.goToOption(M.Specific,$)}let g=bn();function y(E){g.update(E)}function N(E){var $;if(!g.wasMoved(E)||e.disabled||($=s.virtual.value)!=null&&$.disabled(e.value)||c.value)return;let T=s.calculateIndex(e.value);s.goToOption(M.Specific,T,0)}function L(E){var $;g.wasMoved(E)&&(e.disabled||($=s.virtual.value)!=null&&$.disabled(e.value)||c.value&&(s.optionsPropsRef.value.hold||s.goToOption(M.Nothing)))}return()=>{let{disabled:E}=e,$={active:c.value,selected:u.value,disabled:E},T={id:a,ref:i,role:"option",tabIndex:E===!0?void 0:-1,"aria-disabled":E===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onMousedown:h,onFocus:b,onPointerenter:y,onMouseenter:y,onPointermove:N,onMousemove:N,onPointerleave:L,onMouseleave:L},_=fe(e,["order","value"]);return q({ourProps:T,theirProps:_,slot:$,attrs:t,slots:l,name:"ComboboxOption"})}}});function Pn(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 Dn(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 An(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"})])}const et={__name:"Select",props:n.mergeModels({languages:{type:Object,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=n.useModel(e,"modelValue"),o=n.ref(""),s=n.ref(null),a=n.computed(()=>Object.entries(l.languages).filter(([,r])=>r.toLowerCase().includes(o.value.toLowerCase()))),i=r=>{r.target.value="",o.value="",s.value&&s.value.$el.click()};return(r,c)=>(n.openBlock(),n.createBlock(n.unref(Ln),{modelValue:t.value,"onUpdate:modelValue":c[3]||(c[3]=u=>t.value=u),as:"div",class:"relative mt-1"},{default:n.withCtx(()=>[n.createVNode(n.unref(Bn),{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:c[0]||(c[0]=u=>o.value=u.target.value),displayValue:u=>e.languages[u],onFocus:c[1]||(c[1]=u=>i(u))},null,8,["displayValue"]),n.createVNode(n.unref(Tn),{ref_key:"btnSelect",ref:s,class:"absolute inset-y-0 right-0 flex items-center pr-2"},{default:n.withCtx(()=>[n.createVNode(n.unref(Dn),{class:"h-5 w-5 text-gray-400","aria-hidden":"true",onClick:c[2]||(c[2]=u=>i(u))})]),_:1},512),n.createVNode(n.unref(Rn),{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(a.value,([u,m])=>(n.openBlock(),n.createBlock(n.unref(Mn),{key:u,value:u},{default:n.withCtx(({active:p,selected:h})=>[n.createElementVNode("li",{class:n.normalizeClass(["relative cursor-default select-none py-2 pl-3 pr-9",p?"bg-[#3B5695] text-white":"text-textCustom"])},[n.createElementVNode("span",{class:n.normalizeClass(["block truncate",h&&"font-semibold"])},n.toDisplayString(m),3)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]))}},tt="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",Fn={key:0},jn=[n.createElementVNode("img",{src:tt,alt:"swap",class:"w-4"},null,-1)],Hn=[n.createElementVNode("img",{src:tt,alt:"swap",class:"w-4"},null,-1)],zn={__name:"SwapBtn",props:{isBidirect:{type:Boolean,default:!1}},emits:["swap"],setup(e,{emit:l}){const t=l;return(o,s)=>e.isBidirect?(n.openBlock(),n.createElementBlock("button",{key:1,onClick:s[0]||(s[0]=a=>t("swap"))},Hn)):(n.openBlock(),n.createElementBlock("button",Fn,jn))}};var nt=!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 ke(e,l){if(Array.isArray(e)){e.splice(l,1);return}delete e[l]}function Un(){return ot().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ot(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Zn=typeof Proxy=="function",Wn="devtools-plugin:setup",Gn="plugin:settings:set";let ee,Ve;function qn(){var e;return ee!==void 0||(typeof window<"u"&&window.performance?(ee=!0,Ve=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ee=!0,Ve=globalThis.perf_hooks.performance):ee=!1),ee}function Jn(){return qn()?Ve.now():Date.now()}class Kn{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 Jn()}},t&&t.on(Gn,(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(u=>{this.targetQueue.push({method:r,args:c,resolve:u})})})}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=Un(),a=Zn&&t.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Wn,e,l);else{const i=a?new Kn(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
|
|
12
|
-
${
|
|
13
|
-
Only state can be modified.`);
|
|
11
|
+
*/let ae;const ie=e=>ae=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 me=typeof window<"u",ce=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&me,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 Yn(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 $e(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 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:""},it=/Macintosh/.test(ge.userAgent)&&/AppleWebKit/.test(ge.userAgent)&&!/Safari/.test(ge.userAgent),ct=me?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!it?Qn:"msSaveOrOpenBlob"in ge?Xn:eo:()=>{};function Qn(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)?$e(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 Xn(e,l="download",t){if(typeof e=="string")if(at(e))$e(e,l,t);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){he(o)})}else navigator.msSaveOrOpenBlob(Yn(e,t),l)}function eo(e,l,t,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return $e(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 Ne(e){return"_a"in e&&"install"in e}function ut(){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 to(e){if(!ut())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 no(e){if(!ut())try{ft(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 oo(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 lo(){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 so(e){try{const t=await lo()();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)",Ie="_root";function ro(e){return Ne(e)?{id:Ie,label:pt}:{id:e.$id,label:e.$id}}function ao(e){if(Ne(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 io(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 co(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:uo}=Object,ve=e=>"🍍 "+e;function fo(e,l){lt({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:()=>{to(l)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await no(l),t.sendInspectorTree(P),t.sendInspectorState(P)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{oo(l)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await so(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,u)=>(c[u]=r.$state[u],c),{})}),r._getters&&r._getters.length&&o.instanceData.state.push({type:ve(r.$id),key:"getters",editable:!1,value:r._getters.reduce((c,u)=>{try{c[u]=r[u]}catch(m){c[u]=m}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(ro)}}),t.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===P){const s=o.nodeId===Ie?l:l._s.get(o.nodeId);if(!s)return;s&&(o.state=ao(s))}}),t.on.editInspectorState((o,s)=>{if(o.app===e&&o.inspectorId===P){const a=o.nodeId===Ie?l:l._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:i}=o;Ne(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
|
+
${i}
|
|
13
|
+
Only state can be modified.`);i[0]="$state",te=!1,o.set(a,i,o.state.value),te=!0}})})}function po(e,l){be.includes(ve(l.$id))||be.push(ve(l.$id)),lt({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:u})=>{const m=mt++;t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛫 "+c,subtitle:"start",data:{store:H(l.$id),action:H(c),args:u},groupId:m}}),i(p=>{W=void 0,t.addTimelineEvent({layerId:Q,event:{time:o(),title:"🛬 "+c,subtitle:"end",data:{store:H(l.$id),action:H(c),args:u,result:p},groupId:m}})}),r(p=>{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:u,error:p},groupId:m}})})},!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 u={time:o(),title:co(r),data:uo({store:H(l.$id)},io(i)),groupId:W};r===z.patchFunction?u.subtitle="⤵️":r===z.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),t.addTimelineEvent({layerId:Q,event:u})},{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 mo({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)},po(e,l)}function ho(){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(st,s),a.config.globalProperties.$pinia=s,ce&&fo(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 ce&&typeof Proxy<"u"&&s.use(mo),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 go=e=>e();function Le(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]=Le(s,o):e[t]=o}return e}const bo=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function vo(e){return!Y(e)||!e.hasOwnProperty(bo)}const{assign:A}=Object;function Ct(e){return!!(n.isRef(e)&&e.effect)}function _t(e,l,t,o){const{state:s,actions:a,getters:i}=l,r=t.state.value[e];let c;function u(){!r&&(process.env.NODE_ENV==="production"||!o)&&(t.state.value[e]=s?s():{});const m=process.env.NODE_ENV!=="production"&&o?n.toRefs(n.ref(s?s():{}).value):n.toRefs(t.state.value[e]);return A(m,a,Object.keys(i||{}).reduce((p,h)=>(process.env.NODE_ENV!=="production"&&h in m&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${e}".`),p[h]=n.markRaw(n.computed(()=>{ie(t);const b=t._s.get(e);return i[h].call(b,b)})),p),{}))}return c=Te(e,u,l,t,o,!0),c}function Te(e,l,t={},o,s,a){let i;const r=A({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=d=>{u?b=d:u==!1&&!C._hotUpdating&&(Array.isArray(b)?b.push(d):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,m,p=[],h=[],b;const g=o.state.value[e];!a&&!g&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[e]={});const y=n.ref({});let N;function L(d){let f;u=m=!1,process.env.NODE_ENV!=="production"&&(b=[]),typeof d=="function"?(d(o.state.value[e]),f={type:z.patchFunction,storeId:e,events:b}):(Le(o.state.value[e],d),f={type:z.patchObject,payload:d,storeId:e,events:b});const x=N=Symbol();n.nextTick().then(()=>{N===x&&(u=!0)}),m=!0,ne(p,f,o.state.value[e])}const E=a?function(){const{state:f}=t,x=f?f():{};this.$patch(w=>{A(w,x)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:bt;function $(){i.stop(),p=[],h=[],o._s.delete(e)}function T(d,f){return function(){ie(o);const x=Array.from(arguments),w=[],V=[];function I(R){w.push(R)}function F(R){V.push(R)}ne(h,{args:x,name:d,store:C,after:I,onError:F});let j;try{j=f.apply(this&&this.$id===e?this:C,x)}catch(R){throw ne(V,R),R}return j instanceof Promise?j.then(R=>(ne(w,R),R)).catch(R=>(ne(V,R),Promise.reject(R))):(ne(w,j),j)}}const _=n.markRaw({actions:{},getters:{},state:[],hotState:y}),O={_p:o,$id:e,$onAction:vt.bind(null,h),$patch:L,$reset:E,$subscribe(d,f={}){const x=vt(p,d,f.detached,()=>w()),w=i.run(()=>n.watch(()=>o.state.value[e],V=>{(f.flush==="sync"?m:u)&&d({storeId:e,type:z.direct,events:b},V)},A({},c,f)));return x},$dispose:$},C=n.reactive(process.env.NODE_ENV!=="production"||ce?A({_hmrPayload:_,_customProperties:n.markRaw(new Set)},O):O);o._s.set(e,C);const S=(o._a&&o._a.runWithContext||go)(()=>o._e.run(()=>(i=n.effectScope()).run(l)));for(const d in S){const f=S[d];if(n.isRef(f)&&!Ct(f)||n.isReactive(f))process.env.NODE_ENV!=="production"&&s?pe(y.value,d,n.toRef(S,d)):a||(g&&vo(f)&&(n.isRef(f)?f.value=g[d]:Le(f,g[d])),o.state.value[e][d]=f),process.env.NODE_ENV!=="production"&&_.state.push(d);else if(typeof f=="function"){const x=process.env.NODE_ENV!=="production"&&s?f:T(d,f);S[d]=x,process.env.NODE_ENV!=="production"&&(_.actions[d]=f),r.actions[d]=f}else process.env.NODE_ENV!=="production"&&Ct(f)&&(_.getters[d]=a?t.getters[d]:f,me&&(S._getters||(S._getters=n.markRaw([]))).push(d))}if(A(C,S),A(n.toRaw(C),S),Object.defineProperty(C,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?y.value:o.state.value[e],set:d=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");L(f=>{A(f,d)})}}),process.env.NODE_ENV!=="production"&&(C._hotUpdate=n.markRaw(d=>{C._hotUpdating=!0,d._hmrPayload.state.forEach(f=>{if(f in C.$state){const x=d.$state[f],w=C.$state[f];typeof x=="object"&&Y(x)&&Y(w)?gt(x,w):d.$state[f]=w}pe(C,f,n.toRef(d.$state,f))}),Object.keys(C.$state).forEach(f=>{f in d.$state||ke(C,f)}),u=!1,m=!1,o.state.value[e]=n.toRef(d._hmrPayload,"hotState"),m=!0,n.nextTick().then(()=>{u=!0});for(const f in d._hmrPayload.actions){const x=d[f];pe(C,f,T(f,x))}for(const f in d._hmrPayload.getters){const x=d._hmrPayload.getters[f],w=a?n.computed(()=>(ie(o),x.call(C,C))):x;pe(C,f,w)}Object.keys(C._hmrPayload.getters).forEach(f=>{f in d._hmrPayload.getters||ke(C,f)}),Object.keys(C._hmrPayload.actions).forEach(f=>{f in d._hmrPayload.actions||ke(C,f)}),C._hmrPayload=d._hmrPayload,C._getters=d._getters,C._hotUpdating=!1})),ce){const d={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(f=>{Object.defineProperty(C,f,A({value:C[f]},d))})}return o._p.forEach(d=>{if(ce){const f=i.run(()=>d({store:C,app:o._a,pinia:o,options:r}));Object.keys(f||{}).forEach(x=>C._customProperties.add(x)),A(C,f)}else A(C,i.run(()=>d({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
|
|
14
14
|
state: () => new MyClass()
|
|
15
|
-
Found in store "${C.$id}".`),
|
|
15
|
+
Found in store "${C.$id}".`),g&&a&&t.hydrate&&t.hydrate(C.$state,g),u=!0,m=!0,C}function Be(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 u=n.hasInjectionContext();if(r=(process.env.NODE_ENV==="test"&&ae&&ae._testing?null:r)||(u?n.inject(st,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.`);c=ie,c._s.has(o)||(s?Be(o,i,a,c):xt(o,a,c),process.env.NODE_ENV!=="production"&&(d._pinia=c));const g=c._s.get(o);if(process.env.NODE_ENV!=="production"&&p){const t="__hot:"+o,l=s?Be(t,i,a,c,!0):xt(t,D({},a),c,!0);p._hotUpdate(l),delete c.state.value[t],c._s.delete(t)}if(process.env.NODE_ENV!=="production"&&_e){const t=r.getCurrentInstance();if(t&&t.proxy&&!p){const l=t.proxy,u="_pStores"in l?l._pStores:l._pStores={};u[o]=g}}return g}return d.$id=o,d}const ye=Ne("language",()=>{const n=r.ref("auto"),i=r.ref("en"),e=r.ref({src:[],target:[]}),o=r.computed(()=>e.value.src[n.value]),a=r.computed(()=>e.value.target[i.value]);function s(p,m){n.value=p==null?void 0:p.src,i.value=p==null?void 0:p.target,e.value=m}function d(){if(!e.value.src[i.value]||!e.value.target[n.value])return;const p=n.value;n.value=i.value,i.value=p}function c(p){return e.value.src[p]||e.value.target[p]}return{languages:e,src:n,target:i,srcLabel:o,targetLabel:a,init:s,swap:d,getLabel:c}}),xo={key:0,class:"flex"},Co={__name:"Selects",setup(n){const i=ye();function e(){i.swap()}return(o,a)=>r.unref(i).languages?(r.openBlock(),r.createElementBlock("div",xo,[r.createVNode(nt,{modelValue:r.unref(i).src,"onUpdate:modelValue":a[0]||(a[0]=s=>r.unref(i).src=s),languages:r.unref(i).languages.src,class:"grow"},null,8,["modelValue","languages"]),r.createVNode(Zn,{isBidirect:r.unref(i).src!=="auto",class:"grow-0 mx-3",onSwap:e},null,8,["isBidirect"]),r.createVNode(nt,{modelValue:r.unref(i).target,"onUpdate:modelValue":a[1]||(a[1]=s=>r.unref(i).target=s),languages:r.unref(i).languages.target,class:"grow"},null,8,["modelValue","languages"])])):r.createCommentVNode("",!0)}},Eo={INPUT_MAX_LENGTH:5e3,INPUT_DEBOUNCE:500},we=(n,i)=>{const e=n.__vccOpts||n;for(const[o,a]of i)e[o]=a;return e},So={},To={class:"mr-2 loading loading-dots loading-xs"};function Ao(n,i){return r.openBlock(),r.createElementBlock("span",To)}const ko=we(So,[["render",Ao]]),Oo="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",Io="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";function Vo(n,{volume:i=1,playbackRate:e=1,soundEnabled:o=!0,interrupt:a=!1,autoplay:s=!1,onload:d,...c}={}){const p=r.ref(null),m=r.ref(!1),g=r.ref(null),t=r.ref(null);function l(){var _;typeof d=="function"&&d.call(this),g.value=(g.value||((_=t.value)==null?void 0:_.duration())||0)*1e3,s===!0&&(m.value=!0)}return r.onMounted(async()=>{const _=await Promise.resolve().then(()=>aa);p.value=_.default.Howl,t.value=new p.value({src:r.unref(n),volume:r.unref(i),rate:r.unref(e),onload:l,...c})}),r.watch(()=>[n],()=>{p.value&&p.value&&t&&t.value&&(t.value=new p.value({src:r.unref(n),volume:r.unref(i),rate:r.unref(e),onload:l,...c}))}),r.watch(()=>[r.unref(i),r.unref(e)],()=>{t.value&&(t.value.volume(r.unref(i)),t.value.rate(r.unref(e)))}),{play:_=>{typeof _>"u"&&(_={}),!(!t.value||!o&&!_.forceSoundEnabled)&&(a&&t.value.stop(),_.playbackRate&&t.value.rate(_.playbackRate),t.value.play(_.id),t.value.once("end",()=>{t.value&&t.value&&!t.value.playing()&&(m.value=!1)}),m.value=!0)},sound:t,isPlaying:m,duration:g,pause:_=>{t.value&&(t.value.pause(typeof _=="number"?_:void 0),m.value=!1)},stop:_=>{t.value&&(t.value.stop(typeof _=="number"?_:void 0),m.value=!1)}}}const $o={key:0,src:Oo,alt:"Play"},Lo={key:1,src:Io,alt:"Stop"},Bo={__name:"SpeakBtn",props:{url:{type:String,default:""}},setup(n){const i=n,{play:e,stop:o,isPlaying:a}=Vo(i.url),s=r.ref(!1);r.watch(()=>a.value,c=>{s.value=c});function d(){if(a.value){o();return}e()}return(c,p)=>(r.openBlock(),r.createElementBlock("button",{class:"btn btn-xs btn-ghost btn-circle",onClick:r.withModifiers(d,["prevent"])},[r.unref(a)?(r.openBlock(),r.createElementBlock("img",Lo)):(r.openBlock(),r.createElementBlock("img",$o))]))}},No="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",Po={},Mo={class:"btn btn-xs btn-circle btn-ghost"},Ro=[r.createElementVNode("img",{src:No,alt:"Clear",class:"w-4"},null,-1)];function Do(n,i){return r.openBlock(),r.createElementBlock("button",Mo,Ro)}const Fo=we(Po,[["render",Do]]),Ho="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",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%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",Go={class:"btn btn-xs btn-circle btn-ghost"},Uo={key:0,src:Ho,alt:"Clear",class:"w-4"},zo={key:1,src:jo,alt:"Clear",class:"w-4"},Zo={__name:"FavoriteBtn",props:{isFilled:Boolean},setup(n){const i=n;return(e,o)=>(r.openBlock(),r.createElementBlock("button",Go,[i.isFilled?(r.openBlock(),r.createElementBlock("img",Uo)):(r.openBlock(),r.createElementBlock("img",zo))]))}},Wo={class:"flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center"},qo={class:"text-sm text-gray-600"},Xo={key:0,class:"italic"},Yo=r.createElementVNode("div",{class:"flex-grow"},null,-1),Ct={__name:"TranslationBtnGroup",props:{loading:{type:Boolean,default:!1},src:{type:String,default:""},srcLabel:{type:String,default:""},tts:{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"],setup(n,{emit:i}){const e=n,o=i;return(a,s)=>(r.openBlock(),r.createElementBlock("div",Wo,[e.tts?(r.openBlock(),r.createBlock(Bo,{key:0,url:e.tts},null,8,["url"])):r.createCommentVNode("",!0),r.createElementVNode("div",qo,[r.createTextVNode(r.toDisplayString(n.srcLabel)+" ",1),n.phonetic?(r.openBlock(),r.createElementBlock("span",Xo,"- ["+r.toDisplayString(e.phonetic)+"]",1)):r.createCommentVNode("",!0)]),Yo,e.loading?(r.openBlock(),r.createBlock(ko,{key:1})):r.createCommentVNode("",!0),e.src&&e.isClearBtn?(r.openBlock(),r.createBlock(Fo,{key:2,onClick:s[0]||(s[0]=d=>o("clear"))})):r.createCommentVNode("",!0),e.src&&e.isFavoriteBtn?(r.openBlock(),r.createBlock(Zo,{key:3,isFilled:e.isFavorite,onClick:s[1]||(s[1]=d=>o("favorite"))},null,8,["isFilled"])):r.createCommentVNode("",!0)]))}},J=Ne("translation",()=>{const n=r.ref(null),i=r.ref(null),e=r.ref({src:null,target:null}),o=r.ref(null),a=r.ref([]),s=r.ref([]),d=r.ref([]),c=r.ref([]),p=r.ref({src:null,target:null}),m=ye(),g=r.computed(()=>m.getLabel(n.value)),t=r.computed(()=>m.getLabel(i.value));function l(f){n.value=f.src,i.value=f.target,e.value=f.phonetic,o.value=f.result,a.value=f.dictionary,s.value=f.definitions,d.value=f.synonyms,c.value=f.examples,p.value=f.tts}function u(){n.value=null,i.value=null,e.value={src:null,target:null},o.value=null,a.value=[],s.value=[],d.value=[],c.value=[],p.value={src:null,target:null}}return{src:n,srcLabel:g,target:i,targetLabel:t,phonetic:e,result:o,dictionary:a,definitions:s,synonyms:d,examples:c,tts:p,init:l,reset:u}});function Qo(n){return r.getCurrentScope()?(r.onScopeDispose(n),!0):!1}function xe(n){return typeof n=="function"?n():r.unref(n)}const Ko=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Et=()=>{};function Jo(n,i){function e(...o){return new Promise((a,s)=>{Promise.resolve(n(()=>i.apply(this,o),{fn:i,thisArg:this,args:o})).then(a).catch(s)})}return e}function er(n,i={}){let e,o,a=Et;const s=c=>{clearTimeout(c),a(),a=Et};return c=>{const p=xe(n),m=xe(i.maxWait);return e&&s(e),p<=0||m!==void 0&&m<=0?(o&&(s(o),o=null),Promise.resolve(c())):new Promise((g,t)=>{a=i.rejectOnCancel?t:g,m&&!o&&(o=setTimeout(()=>{e&&s(e),o=null,g(c())},m)),e=setTimeout(()=>{o&&s(o),o=null,g(c())},p)})}}function tr(n,i=200,e={}){return Jo(er(i,e),n)}function St(n){var i;const e=xe(n);return(i=e==null?void 0:e.$el)!=null?i:e}const nr=Ko?window:void 0;function or(){const n=r.ref(!1),i=r.getCurrentInstance();return i&&r.onMounted(()=>{n.value=!0},i),n}function rr(n){const i=or();return r.computed(()=>(i.value,!!n()))}function ar(n,i,e={}){const{window:o=nr,...a}=e;let s;const d=rr(()=>o&&"ResizeObserver"in o),c=()=>{s&&(s.disconnect(),s=void 0)},p=r.computed(()=>Array.isArray(n)?n.map(t=>St(t)):[St(n)]),m=r.watch(p,t=>{if(c(),d.value&&o){s=new ResizeObserver(i);for(const l of t)l&&s.observe(l,a)}},{immediate:!0,flush:"post"}),g=()=>{c(),m()};return Qo(g),{isSupported:d,stop:g}}function Tt(n){var i;const e=r.ref(n==null?void 0:n.element),o=r.ref(n==null?void 0:n.input),a=(i=n==null?void 0:n.styleProp)!=null?i:"height",s=r.ref(1);function d(){var c;if(!e.value)return;let p="";e.value.style[a]="1px",s.value=(c=e.value)==null?void 0:c.scrollHeight,n!=null&&n.styleTarget?xe(n.styleTarget).style[a]=`${s.value}px`:p=`${s.value}px`,e.value.style[a]=p}return r.watch([o,e],()=>r.nextTick(d),{immediate:!0}),r.watch(s,()=>{var c;return(c=n==null?void 0:n.onResize)==null?void 0:c.call(n)}),ar(e,()=>d()),n!=null&&n.watch&&r.watch(n.watch,d,{immediate:!0,deep:!0}),{textarea:e,input:o,triggerResize:d}}const lr=we({__name:"TranslationInput",props:{text:{type:String,default:""}},emits:["change","clear"],setup(n,{emit:i}){const e=J(),o=n,a=r.ref(o.text),s=r.computed(()=>e.src),d=r.computed(()=>e.srcLabel),c=r.computed(()=>{var f;return(f=e.phonetic)==null?void 0:f.src}),p=r.computed(()=>{var f;return(f=e.tts)==null?void 0:f.src}),{textarea:m}=Tt({input:a,styleProp:"minHeight"}),g=i,t=tr(()=>{g("change",a.value)},Eo.INPUT_DEBOUNCE);function l(){if(!a.value){u();return}t()}function u(){g("clear"),a.value="",m.value.focus()}return r.watch(()=>o.text,f=>{a.value=f}),(f,h)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(Ct,{src:s.value,srcLabel:d.value,tts:p.value,phonetic:c.value,isClearBtn:!0,onClear:u},null,8,["src","srcLabel","tts","phonetic"]),r.withDirectives(r.createElementVNode("textarea",{ref_key:"textarea",ref:m,"onUpdate:modelValue":h[0]||(h[0]=v=>a.value=v),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",autofocus:"",rows:"2",onInput:l},null,544),[[r.vModelText,a.value,void 0,{trim:!0}]])],64))}},[["__scopeId","data-v-ef4399dd"]]),ir="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='M13.2018%204.409H8.2373L7.46364%202H2.79867C2.35907%202%202%202.3595%202%202.7995V10.937C2%2011.376%202.36008%2011.7355%202.79867%2011.7355H7.79971L8.53636%2014H13.2013C13.6404%2014%2014%2013.6465%2014%2013.214V5.195C14%204.7625%2013.6404%204.409%2013.2018%204.409ZM5.3702%208.749C4.33499%208.749%203.49481%207.909%203.49481%206.874C3.49481%205.839%204.33499%204.999%205.3702%204.999C5.87631%204.999%206.3004%205.1865%206.62646%205.487L6.13136%205.963C5.9244%205.77181%205.65196%205.66729%205.3702%205.671C4.71757%205.671%204.18846%206.211%204.18846%206.8755C4.18846%207.54%204.71757%208.08%205.3697%208.08C6.12336%208.08%206.43492%207.54%206.46493%207.176L5.3707%207.175V6.533H7.12607C7.15107%206.648%207.17108%206.7615%207.17108%206.915C7.17108%207.9885%206.45393%208.7495%205.3697%208.7495L5.3702%208.749ZM13.7504%2013.214C13.7504%2013.509%2013.5044%2013.75%2013.2018%2013.75H8.76341L10.5883%2011.735H10.5908L10.2207%2010.584L10.2237%2010.5815C10.2237%2010.5815%2010.5078%2010.3375%2010.8623%209.9615C11.2184%2010.347%2011.6775%2010.811%2012.2716%2011.364L12.6572%2010.978C12.0211%2010.401%2011.555%209.943%2011.2119%209.5755C11.6715%209.032%2012.1381%208.348%2012.2366%207.722H13.2538V7.723H13.2548V7.253H10.9884V6.493H10.2527V7.253H9.15049L8.31432%204.648L8.31732%204.659H13.2018C13.5044%204.659%2013.7504%204.899%2013.7504%205.195V13.214ZM10.5078%209.5585C10.2397%209.8325%2010.0362%209.995%2010.0362%209.995L10.0322%209.997L9.30202%207.723H11.6845C11.531%208.265%2011.1904%208.777%2010.8588%209.175C10.2707%208.479%2010.2687%208.253%2010.2687%208.253H9.6576C9.6576%208.253%209.6826%208.5925%2010.5078%209.5585Z'%20fill='%237E7E7E'/%3e%3c/svg%3e",At=Ne("loader",()=>({loading:r.ref(!1)})),sr=n=>(r.pushScopeId("data-v-5a9dbf88"),n=n(),r.popScopeId(),n),cr={class:"flex flex-col"},ur=sr(()=>r.createElementVNode("div",{class:"w-full flex align-item-center justify-end"},[r.createElementVNode("span",{class:"text-sm"},"Powered by Google Translate"),r.createElementVNode("img",{src:ir,alt:"Google",class:"h-5 ml-2"})],-1)),dr=we({__name:"TranslationResult",props:{isFavoriteFeatureEnabled:Boolean},setup(n){const i=J(),e=r.ref(!1),o=r.computed(()=>i.result),a=r.computed(()=>i.target),s=r.computed(()=>i.targetLabel),d=r.computed(()=>{var l;return(l=i.phonetic)==null?void 0:l.target}),c=r.computed(()=>{var l;return(l=i.tts)==null?void 0:l.target}),p=n,m=At(),{textarea:g,input:t}=Tt({input:o,styleProp:"minHeight"});return(l,u)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(Ct,{loading:r.unref(m).loading,src:a.value,srcLabel:s.value,tts:c.value,isFavoriteBtn:p.isFavoriteFeatureEnabled,isFavorite:e.value,phonetic:d.value,onFavorite:u[0]||(u[0]=f=>e.value=!e.value)},null,8,["loading","src","srcLabel","tts","isFavoriteBtn","isFavorite","phonetic"]),r.createElementVNode("div",cr,[r.withDirectives(r.createElementVNode("textarea",{ref_key:"textarea",ref:g,"onUpdate:modelValue":u[1]||(u[1]=f=>r.isRef(t)?t.value=f: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",readonly:"",rows:"2",spellcheck:"false"},null,512),[[r.vModelText,r.unref(t)]]),ur])],64))}},[["__scopeId","data-v-5a9dbf88"]]),fr={class:"btn btn-sm btn-circle btn-ghost"},Ce={__name:"ToggleBtn",props:{isExpanded:Boolean},setup(n){const i=n;return(e,o)=>(r.openBlock(),r.createElementBlock("button",fr,[i.isExpanded?(r.openBlock(),r.createBlock(r.unref(jn),{key:0,class:"w-7 text-gray-400"})):(r.openBlock(),r.createBlock(r.unref(Fn),{key:1,class:"w-7 text-gray-400"}))]))}},pr={class:"card border bg-white rounded-lg"},mr={class:"card-body px-4 py-2 gap-0"},_r={class:"flex justify-between items-center"},hr=r.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Translations",-1),gr={class:"capitalize text-base font-normal text-textSecondary mb-1"},vr={class:"list-none list-inside"},br=["onClick"],yr={class:"text-base font-normal text-gray-800 leading-4"},wr={__name:"Dictionary",emits:["translate"],setup(n,{emit:i}){const e=r.ref(!0),o=J(),a=ye(),s=r.computed(()=>o.dictionary),d=i,c=()=>{e.value=!e.value},p=m=>{const g=o.src,t=o.target;a.src=t,a.target=g,d("translate",m)};return(m,g)=>(r.openBlock(),r.createElementBlock("div",pr,[r.createElementVNode("div",mr,[r.createElementVNode("div",_r,[hr,r.createVNode(Ce,{isExpanded:e.value,onClick:c},null,8,["isExpanded"])]),r.createElementVNode("div",{class:r.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",e.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[r.createElementVNode("ul",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(t,l)=>(r.openBlock(),r.createElementBlock("li",{key:`${t.pos}-${l}`,class:"mb-2"},[r.createElementVNode("h5",gr,r.toDisplayString(t.pos),1),r.createElementVNode("ul",vr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.items,(u,f)=>(r.openBlock(),r.createElementBlock("li",{key:`${u.word}-${f}`},[r.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=>p(u.word)},r.toDisplayString(u.word),9,br),r.createElementVNode("small",yr," - "+r.toDisplayString(u.reverse_translation.join(", ")),1)]))),128))])]))),128))])],2)])]))}},xr={class:"card border bg-white rounded-lg"},Cr={class:"card-body px-4 py-2 gap-0"},Er={class:"flex justify-between items-center"},Sr=r.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Definitions",-1),Tr={class:"capitalize text-base font-normal text-textSecondary mb-1"},Ar={class:"text-base text-textCustom list-decimal list-outside ml-5"},kr=r.createElementVNode("br",null,null,-1),Or={key:0,class:"italic"},Ir={__name:"Definition",setup(n){const i=r.ref(!0),e=J(),o=r.computed(()=>e.definitions),a=()=>{i.value=!i.value};return(s,d)=>(r.openBlock(),r.createElementBlock("div",xr,[r.createElementVNode("div",Cr,[r.createElementVNode("div",Er,[Sr,r.createVNode(Ce,{isExpanded:i.value,onClick:a},null,8,["isExpanded"])]),r.createElementVNode("div",{class:r.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",i.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[r.createElementVNode("ul",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(c,p)=>(r.openBlock(),r.createElementBlock("li",{key:`${c.pos}-${p}`,class:"mb-2"},[r.createElementVNode("h5",Tr,r.toDisplayString(c.pos),1),r.createElementVNode("ul",Ar,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.items,(m,g)=>(r.openBlock(),r.createElementBlock("li",{key:`${m.gloss}-${g}`,class:"mb-1"},[r.createElementVNode("span",null,r.toDisplayString(m.gloss),1),kr,m.example?(r.openBlock(),r.createElementBlock("small",Or,'"'+r.toDisplayString(m.example)+'"',1)):r.createCommentVNode("",!0)]))),128))])]))),128))])],2)])]))}},Vr={class:"card border bg-white rounded-lg"},$r={class:"card-body px-4 py-2 gap-0"},Lr={class:"flex justify-between items-center"},Br=r.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Examples",-1),Nr={class:"text-textCustom list-decimal list-outside ml-7 mt-2"},Pr=["innerHTML"],Mr={__name:"Example",setup(n){const i=r.ref(!0),e=J(),o=r.computed(()=>e.examples),a=()=>{i.value=!i.value};return(s,d)=>(r.openBlock(),r.createElementBlock("div",Vr,[r.createElementVNode("div",$r,[r.createElementVNode("div",Lr,[Br,r.createVNode(Ce,{isExpanded:i.value,onClick:a},null,8,["isExpanded"])]),r.createElementVNode("div",{class:r.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",i.value?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"])},[r.createElementVNode("ul",Nr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(c,p)=>(r.openBlock(),r.createElementBlock("li",{key:`${c.definition_id}-${p}`,innerHTML:c},null,8,Pr))),128))])],2)])]))}},Rr={class:"card border bg-white rounded-lg"},Dr={class:"card-body px-4 py-2 gap-0"},Fr={class:"flex justify-between items-center"},Hr=r.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Synonyms",-1),jr={class:"capitalize text-base font-normal text-textSecondary mb-1"},Gr={class:"list-none list-inside"},Ur={class:"flex flex-wrap"},zr=["onClick"],Zr={__name:"Synonyms",emits:["translate"],setup(n,{emit:i}){const e=r.ref(!0),o=J(),a=r.computed(()=>o.synonyms),s=i,d=()=>{e.value=!e.value},c=p=>{s("translate",p)};return(p,m)=>(r.openBlock(),r.createElementBlock("div",Rr,[r.createElementVNode("div",Dr,[r.createElementVNode("div",Fr,[Hr,r.createVNode(Ce,{isExpanded:e.value,onClick:d},null,8,["isExpanded"])]),r.createElementVNode("div",{class:r.normalizeClass(["overflow-hidden transition-all duration-300 ease-in-out",e.value?"max-h-[2000px] opacity-100":"max-h-0 opacity-0"])},[r.createElementVNode("ul",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(g,t)=>(r.openBlock(),r.createElementBlock("li",{key:`${g.pos}-${t}`,class:"mb-2"},[r.createElementVNode("h5",jr,r.toDisplayString(g.pos),1),r.createElementVNode("ul",Gr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(g.items,(l,u)=>(r.openBlock(),r.createElementBlock("li",{key:`${l.word}-${u}`,class:"mb-2"},[r.createElementVNode("div",Ur,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.synonym,(f,h)=>(r.openBlock(),r.createElementBlock("span",{key:`${f}-${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:v=>c(f)},r.toDisplayString(f),9,zr))),128))])]))),128))])]))),128))])],2)])]))}},Wr={class:"bg-white min-h-screen flex flex-col"},qr={class:"py-2 px-5 shadow-lg"},Xr={class:"px-5 flex-grow"},Yr={class:"flex flex-col lg:flex-row lg:gap-2"},Qr={class:"w-full lg:w-[calc(50%-1rem)] my-2"},Kr=r.createElementVNode("div",{class:"w-6 h-4 mx-auto hidden lg:block"},null,-1),Jr={class:"w-full lg:w-[calc(50%-1rem)] my-2"},ea={class:"grid grid-cols-1 lg:grid-cols-3 gap-4"},ta={key:0,class:"w-full my-4"},na=r.createElementVNode("div",{class:"mt-auto py-5 px-5"},[r.createElementVNode("span",{class:"block text-center text-gray-700"}," The site is not affiliated with Google Translate "),r.createElementVNode("span",{class:"block text-center text-gray-700"},"Since 2011")],-1),oa={__name:"Popup",props:{opt:{type:Object,default:null},languages:{type:Object,default:null},translation:{type:Object,default:null},isFavoriteFeatureEnabled:{type:Boolean,default:!1}},emits:["opt","translate","reader","settings","fullscreen"],setup(n,{emit:i}){var l;const e=vo(),o=J(e),a=ye(e),s=At(e),d=n,c=i,p=r.ref((l=d.translation)==null?void 0:l.text);r.watch(()=>d.translation,u=>{s.loading=!1,o.init(u)},{immediate:!0}),r.watch([()=>d.opt,()=>d.languages],([u,f])=>{a.init(u,f)}),r.watch([()=>a.src,()=>a.target],([u,f])=>{c("opt",{src:u,target:f}),p.value&&t(p.value)}),r.onMounted(()=>{a.init(d.opt,d.languages)});function m(){p.value="",o.reset()}function g(u){u&&t(u)}function t(u){p.value=u,s.loading=!0,c("translate",{src:a.src,target:a.target,text:u})}return(u,f)=>(r.openBlock(),r.createElementBlock("div",Wr,[r.createElementVNode("div",qr,[r.createVNode(Dt,{onReader:f[0]||(f[0]=h=>c("reader")),onSettings:f[1]||(f[1]=h=>c("settings")),onFullScreen:f[2]||(f[2]=h=>c("fullscreen"))})]),r.createElementVNode("div",Xr,[r.createVNode(Co,{class:"my-4"}),r.createElementVNode("div",Yr,[r.createElementVNode("div",Qr,[r.createVNode(lr,{text:p.value,onChange:g,onClear:m},null,8,["text"])]),Kr,r.createElementVNode("div",Jr,[r.createVNode(dr,{isFavoriteFeatureEnabled:n.isFavoriteFeatureEnabled},null,8,["isFavoriteFeatureEnabled"])])]),r.createElementVNode("div",ea,[r.unref(o).dictionary.length?(r.openBlock(),r.createBlock(wr,{key:0,onTranslate:t})):r.createCommentVNode("",!0),r.unref(o).definitions.length?(r.openBlock(),r.createBlock(Ir,{key:1})):r.createCommentVNode("",!0),r.unref(o).synonyms.length?(r.openBlock(),r.createBlock(Zr,{key:2,onTranslate:t})):r.createCommentVNode("",!0)]),r.unref(o).examples.length?(r.openBlock(),r.createElementBlock("div",ta,[r.createVNode(Mr)])):r.createCommentVNode("",!0)]),na]))}};var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pe={};/*!
|
|
18
|
-
* howler.js v2.2.4
|
|
19
|
-
* howlerjs.com
|
|
20
|
-
*
|
|
21
|
-
* (c) 2013-2020, James Simpson of GoldFire Studios
|
|
22
|
-
* goldfirestudios.com
|
|
23
|
-
*
|
|
24
|
-
* MIT License
|
|
25
|
-
*/(function(n){(function(){var i=function(){this.init()};i.prototype={init:function(){var t=this||e;return t._counter=1e3,t._html5AudioPool=[],t.html5PoolSize=10,t._codecs={},t._howls=[],t._muted=!1,t._volume=1,t._canPlayEvent="canplaythrough",t._navigator=typeof window<"u"&&window.navigator?window.navigator:null,t.masterGain=null,t.noAudio=!1,t.usingWebAudio=!0,t.autoSuspend=!0,t.ctx=null,t.autoUnlock=!0,t._setup(),t},volume:function(t){var l=this||e;if(t=parseFloat(t),l.ctx||g(),typeof t<"u"&&t>=0&&t<=1){if(l._volume=t,l._muted)return l;l.usingWebAudio&&l.masterGain.gain.setValueAtTime(t,e.ctx.currentTime);for(var u=0;u<l._howls.length;u++)if(!l._howls[u]._webAudio)for(var f=l._howls[u]._getSoundIds(),h=0;h<f.length;h++){var v=l._howls[u]._soundById(f[h]);v&&v._node&&(v._node.volume=v._volume*t)}return l}return l._volume},mute:function(t){var l=this||e;l.ctx||g(),l._muted=t,l.usingWebAudio&&l.masterGain.gain.setValueAtTime(t?0:l._volume,e.ctx.currentTime);for(var u=0;u<l._howls.length;u++)if(!l._howls[u]._webAudio)for(var f=l._howls[u]._getSoundIds(),h=0;h<f.length;h++){var v=l._howls[u]._soundById(f[h]);v&&v._node&&(v._node.muted=t?!0:v._muted)}return l},stop:function(){for(var t=this||e,l=0;l<t._howls.length;l++)t._howls[l].stop();return t},unload:function(){for(var t=this||e,l=t._howls.length-1;l>=0;l--)t._howls[l].unload();return t.usingWebAudio&&t.ctx&&typeof t.ctx.close<"u"&&(t.ctx.close(),t.ctx=null,g()),t},codecs:function(t){return(this||e)._codecs[t.replace(/^x-/,"")]},_setup:function(){var t=this||e;if(t.state=t.ctx&&t.ctx.state||"suspended",t._autoSuspend(),!t.usingWebAudio)if(typeof Audio<"u")try{var l=new Audio;typeof l.oncanplaythrough>"u"&&(t._canPlayEvent="canplay")}catch{t.noAudio=!0}else t.noAudio=!0;try{var l=new Audio;l.muted&&(t.noAudio=!0)}catch{}return t.noAudio||t._setupCodecs(),t},_setupCodecs:function(){var t=this||e,l=null;try{l=typeof Audio<"u"?new Audio:null}catch{return t}if(!l||typeof l.canPlayType!="function")return t;var u=l.canPlayType("audio/mpeg;").replace(/^no$/,""),f=t._navigator?t._navigator.userAgent:"",h=f.match(/OPR\/(\d+)/g),v=h&&parseInt(h[0].split("/")[1],10)<33,_=f.indexOf("Safari")!==-1&&f.indexOf("Chrome")===-1,w=f.match(/Version\/(.*?) /),A=_&&w&&parseInt(w[1],10)<15;return t._codecs={mp3:!!(!v&&(u||l.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!u,opus:!!l.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!l.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!l.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(l.canPlayType('audio/wav; codecs="1"')||l.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!l.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!l.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(l.canPlayType("audio/x-m4a;")||l.canPlayType("audio/m4a;")||l.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(l.canPlayType("audio/x-m4b;")||l.canPlayType("audio/m4b;")||l.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(l.canPlayType("audio/x-mp4;")||l.canPlayType("audio/mp4;")||l.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!A&&l.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!A&&l.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!l.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(l.canPlayType("audio/x-flac;")||l.canPlayType("audio/flac;")).replace(/^no$/,"")},t},_unlockAudio:function(){var t=this||e;if(!(t._audioUnlocked||!t.ctx)){t._audioUnlocked=!1,t.autoUnlock=!1,!t._mobileUnloaded&&t.ctx.sampleRate!==44100&&(t._mobileUnloaded=!0,t.unload()),t._scratchBuffer=t.ctx.createBuffer(1,1,22050);var l=function(u){for(;t._html5AudioPool.length<t.html5PoolSize;)try{var f=new Audio;f._unlocked=!0,t._releaseHtml5Audio(f)}catch{t.noAudio=!0;break}for(var h=0;h<t._howls.length;h++)if(!t._howls[h]._webAudio)for(var v=t._howls[h]._getSoundIds(),_=0;_<v.length;_++){var w=t._howls[h]._soundById(v[_]);w&&w._node&&!w._node._unlocked&&(w._node._unlocked=!0,w._node.load())}t._autoResume();var A=t.ctx.createBufferSource();A.buffer=t._scratchBuffer,A.connect(t.ctx.destination),typeof A.start>"u"?A.noteOn(0):A.start(0),typeof t.ctx.resume=="function"&&t.ctx.resume(),A.onended=function(){A.disconnect(0),t._audioUnlocked=!0,document.removeEventListener("touchstart",l,!0),document.removeEventListener("touchend",l,!0),document.removeEventListener("click",l,!0),document.removeEventListener("keydown",l,!0);for(var O=0;O<t._howls.length;O++)t._howls[O]._emit("unlock")}};return document.addEventListener("touchstart",l,!0),document.addEventListener("touchend",l,!0),document.addEventListener("click",l,!0),document.addEventListener("keydown",l,!0),t}},_obtainHtml5Audio:function(){var t=this||e;if(t._html5AudioPool.length)return t._html5AudioPool.pop();var l=new Audio().play();return l&&typeof Promise<"u"&&(l instanceof Promise||typeof l.then=="function")&&l.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(t){var l=this||e;return t._unlocked&&l._html5AudioPool.push(t),l},_autoSuspend:function(){var t=this;if(!(!t.autoSuspend||!t.ctx||typeof t.ctx.suspend>"u"||!e.usingWebAudio)){for(var l=0;l<t._howls.length;l++)if(t._howls[l]._webAudio){for(var u=0;u<t._howls[l]._sounds.length;u++)if(!t._howls[l]._sounds[u]._paused)return t}return t._suspendTimer&&clearTimeout(t._suspendTimer),t._suspendTimer=setTimeout(function(){if(t.autoSuspend){t._suspendTimer=null,t.state="suspending";var f=function(){t.state="suspended",t._resumeAfterSuspend&&(delete t._resumeAfterSuspend,t._autoResume())};t.ctx.suspend().then(f,f)}},3e4),t}},_autoResume:function(){var t=this;if(!(!t.ctx||typeof t.ctx.resume>"u"||!e.usingWebAudio))return t.state==="running"&&t.ctx.state!=="interrupted"&&t._suspendTimer?(clearTimeout(t._suspendTimer),t._suspendTimer=null):t.state==="suspended"||t.state==="running"&&t.ctx.state==="interrupted"?(t.ctx.resume().then(function(){t.state="running";for(var l=0;l<t._howls.length;l++)t._howls[l]._emit("resume")}),t._suspendTimer&&(clearTimeout(t._suspendTimer),t._suspendTimer=null)):t.state==="suspending"&&(t._resumeAfterSuspend=!0),t}};var e=new i,o=function(t){var l=this;if(!t.src||t.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}l.init(t)};o.prototype={init:function(t){var l=this;return e.ctx||g(),l._autoplay=t.autoplay||!1,l._format=typeof t.format!="string"?t.format:[t.format],l._html5=t.html5||!1,l._muted=t.mute||!1,l._loop=t.loop||!1,l._pool=t.pool||5,l._preload=typeof t.preload=="boolean"||t.preload==="metadata"?t.preload:!0,l._rate=t.rate||1,l._sprite=t.sprite||{},l._src=typeof t.src!="string"?t.src:[t.src],l._volume=t.volume!==void 0?t.volume:1,l._xhr={method:t.xhr&&t.xhr.method?t.xhr.method:"GET",headers:t.xhr&&t.xhr.headers?t.xhr.headers:null,withCredentials:t.xhr&&t.xhr.withCredentials?t.xhr.withCredentials:!1},l._duration=0,l._state="unloaded",l._sounds=[],l._endTimers={},l._queue=[],l._playLock=!1,l._onend=t.onend?[{fn:t.onend}]:[],l._onfade=t.onfade?[{fn:t.onfade}]:[],l._onload=t.onload?[{fn:t.onload}]:[],l._onloaderror=t.onloaderror?[{fn:t.onloaderror}]:[],l._onplayerror=t.onplayerror?[{fn:t.onplayerror}]:[],l._onpause=t.onpause?[{fn:t.onpause}]:[],l._onplay=t.onplay?[{fn:t.onplay}]:[],l._onstop=t.onstop?[{fn:t.onstop}]:[],l._onmute=t.onmute?[{fn:t.onmute}]:[],l._onvolume=t.onvolume?[{fn:t.onvolume}]:[],l._onrate=t.onrate?[{fn:t.onrate}]:[],l._onseek=t.onseek?[{fn:t.onseek}]:[],l._onunlock=t.onunlock?[{fn:t.onunlock}]:[],l._onresume=[],l._webAudio=e.usingWebAudio&&!l._html5,typeof e.ctx<"u"&&e.ctx&&e.autoUnlock&&e._unlockAudio(),e._howls.push(l),l._autoplay&&l._queue.push({event:"play",action:function(){l.play()}}),l._preload&&l._preload!=="none"&&l.load(),l},load:function(){var t=this,l=null;if(e.noAudio){t._emit("loaderror",null,"No audio support.");return}typeof t._src=="string"&&(t._src=[t._src]);for(var u=0;u<t._src.length;u++){var f,h;if(t._format&&t._format[u])f=t._format[u];else{if(h=t._src[u],typeof h!="string"){t._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}f=/^data:audio\/([^;,]+);/i.exec(h),f||(f=/\.([^.]+)$/.exec(h.split("?",1)[0])),f&&(f=f[1].toLowerCase())}if(f||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),f&&e.codecs(f)){l=t._src[u];break}}if(!l){t._emit("loaderror",null,"No codec support for selected audio sources.");return}return t._src=l,t._state="loading",window.location.protocol==="https:"&&l.slice(0,5)==="http:"&&(t._html5=!0,t._webAudio=!1),new a(t),t._webAudio&&d(t),t},play:function(t,l){var u=this,f=null;if(typeof t=="number")f=t,t=null;else{if(typeof t=="string"&&u._state==="loaded"&&!u._sprite[t])return null;if(typeof t>"u"&&(t="__default",!u._playLock)){for(var h=0,v=0;v<u._sounds.length;v++)u._sounds[v]._paused&&!u._sounds[v]._ended&&(h++,f=u._sounds[v]._id);h===1?t=null:f=null}}var _=f?u._soundById(f):u._inactiveSound();if(!_)return null;if(f&&!t&&(t=_._sprite||"__default"),u._state!=="loaded"){_._sprite=t,_._ended=!1;var w=_._id;return u._queue.push({event:"play",action:function(){u.play(w)}}),w}if(f&&!_._paused)return l||u._loadQueue("play"),_._id;u._webAudio&&e._autoResume();var A=Math.max(0,_._seek>0?_._seek:u._sprite[t][0]/1e3),O=Math.max(0,(u._sprite[t][0]+u._sprite[t][1])/1e3-A),x=O*1e3/Math.abs(_._rate),I=u._sprite[t][0]/1e3,C=(u._sprite[t][0]+u._sprite[t][1])/1e3;_._sprite=t,_._ended=!1;var E=function(){_._paused=!1,_._seek=A,_._start=I,_._stop=C,_._loop=!!(_._loop||u._sprite[t][2])};if(A>=C){u._ended(_);return}var T=_._node;if(u._webAudio){var b=function(){u._playLock=!1,E(),u._refreshBuffer(_);var V=_._muted||u._muted?0:_._volume;T.gain.setValueAtTime(V,e.ctx.currentTime),_._playStart=e.ctx.currentTime,typeof T.bufferSource.start>"u"?_._loop?T.bufferSource.noteGrainOn(0,A,86400):T.bufferSource.noteGrainOn(0,A,O):_._loop?T.bufferSource.start(0,A,86400):T.bufferSource.start(0,A,O),x!==1/0&&(u._endTimers[_._id]=setTimeout(u._ended.bind(u,_),x)),l||setTimeout(function(){u._emit("play",_._id),u._loadQueue()},0)};e.state==="running"&&e.ctx.state!=="interrupted"?b():(u._playLock=!0,u.once("resume",b),u._clearTimer(_._id))}else{var y=function(){T.currentTime=A,T.muted=_._muted||u._muted||e._muted||T.muted,T.volume=_._volume*e.volume(),T.playbackRate=_._rate;try{var V=T.play();if(V&&typeof Promise<"u"&&(V instanceof Promise||typeof V.then=="function")?(u._playLock=!0,E(),V.then(function(){u._playLock=!1,T._unlocked=!0,l?u._loadQueue():u._emit("play",_._id)}).catch(function(){u._playLock=!1,u._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),_._ended=!0,_._paused=!0})):l||(u._playLock=!1,E(),u._emit("play",_._id)),T.playbackRate=_._rate,T.paused){u._emit("playerror",_._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}t!=="__default"||_._loop?u._endTimers[_._id]=setTimeout(u._ended.bind(u,_),x):(u._endTimers[_._id]=function(){u._ended(_),T.removeEventListener("ended",u._endTimers[_._id],!1)},T.addEventListener("ended",u._endTimers[_._id],!1))}catch(L){u._emit("playerror",_._id,L)}};T.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(T.src=u._src,T.load());var S=window&&window.ejecta||!T.readyState&&e._navigator.isCocoonJS;if(T.readyState>=3||S)y();else{u._playLock=!0,u._state="loading";var k=function(){u._state="loaded",y(),T.removeEventListener(e._canPlayEvent,k,!1)};T.addEventListener(e._canPlayEvent,k,!1),u._clearTimer(_._id)}}return _._id},pause:function(t){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"pause",action:function(){l.pause(t)}}),l;for(var u=l._getSoundIds(t),f=0;f<u.length;f++){l._clearTimer(u[f]);var h=l._soundById(u[f]);if(h&&!h._paused&&(h._seek=l.seek(u[f]),h._rateSeek=0,h._paused=!0,l._stopFade(u[f]),h._node))if(l._webAudio){if(!h._node.bufferSource)continue;typeof h._node.bufferSource.stop>"u"?h._node.bufferSource.noteOff(0):h._node.bufferSource.stop(0),l._cleanBuffer(h._node)}else(!isNaN(h._node.duration)||h._node.duration===1/0)&&h._node.pause();arguments[1]||l._emit("pause",h?h._id:null)}return l},stop:function(t,l){var u=this;if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"stop",action:function(){u.stop(t)}}),u;for(var f=u._getSoundIds(t),h=0;h<f.length;h++){u._clearTimer(f[h]);var v=u._soundById(f[h]);v&&(v._seek=v._start||0,v._rateSeek=0,v._paused=!0,v._ended=!0,u._stopFade(f[h]),v._node&&(u._webAudio?v._node.bufferSource&&(typeof v._node.bufferSource.stop>"u"?v._node.bufferSource.noteOff(0):v._node.bufferSource.stop(0),u._cleanBuffer(v._node)):(!isNaN(v._node.duration)||v._node.duration===1/0)&&(v._node.currentTime=v._start||0,v._node.pause(),v._node.duration===1/0&&u._clearSound(v._node))),l||u._emit("stop",v._id))}return u},mute:function(t,l){var u=this;if(u._state!=="loaded"||u._playLock)return u._queue.push({event:"mute",action:function(){u.mute(t,l)}}),u;if(typeof l>"u")if(typeof t=="boolean")u._muted=t;else return u._muted;for(var f=u._getSoundIds(l),h=0;h<f.length;h++){var v=u._soundById(f[h]);v&&(v._muted=t,v._interval&&u._stopFade(v._id),u._webAudio&&v._node?v._node.gain.setValueAtTime(t?0:v._volume,e.ctx.currentTime):v._node&&(v._node.muted=e._muted?!0:t),u._emit("mute",v._id))}return u},volume:function(){var t=this,l=arguments,u,f;if(l.length===0)return t._volume;if(l.length===1||l.length===2&&typeof l[1]>"u"){var h=t._getSoundIds(),v=h.indexOf(l[0]);v>=0?f=parseInt(l[0],10):u=parseFloat(l[0])}else l.length>=2&&(u=parseFloat(l[0]),f=parseInt(l[1],10));var _;if(typeof u<"u"&&u>=0&&u<=1){if(t._state!=="loaded"||t._playLock)return t._queue.push({event:"volume",action:function(){t.volume.apply(t,l)}}),t;typeof f>"u"&&(t._volume=u),f=t._getSoundIds(f);for(var w=0;w<f.length;w++)_=t._soundById(f[w]),_&&(_._volume=u,l[2]||t._stopFade(f[w]),t._webAudio&&_._node&&!_._muted?_._node.gain.setValueAtTime(u,e.ctx.currentTime):_._node&&!_._muted&&(_._node.volume=u*e.volume()),t._emit("volume",_._id))}else return _=f?t._soundById(f):t._sounds[0],_?_._volume:0;return t},fade:function(t,l,u,f){var h=this;if(h._state!=="loaded"||h._playLock)return h._queue.push({event:"fade",action:function(){h.fade(t,l,u,f)}}),h;t=Math.min(Math.max(0,parseFloat(t)),1),l=Math.min(Math.max(0,parseFloat(l)),1),u=parseFloat(u),h.volume(t,f);for(var v=h._getSoundIds(f),_=0;_<v.length;_++){var w=h._soundById(v[_]);if(w){if(f||h._stopFade(v[_]),h._webAudio&&!w._muted){var A=e.ctx.currentTime,O=A+u/1e3;w._volume=t,w._node.gain.setValueAtTime(t,A),w._node.gain.linearRampToValueAtTime(l,O)}h._startFadeInterval(w,t,l,u,v[_],typeof f>"u")}}return h},_startFadeInterval:function(t,l,u,f,h,v){var _=this,w=l,A=u-l,O=Math.abs(A/.01),x=Math.max(4,O>0?f/O:f),I=Date.now();t._fadeTo=u,t._interval=setInterval(function(){var C=(Date.now()-I)/f;I=Date.now(),w+=A*C,w=Math.round(w*100)/100,A<0?w=Math.max(u,w):w=Math.min(u,w),_._webAudio?t._volume=w:_.volume(w,t._id,!0),v&&(_._volume=w),(u<l&&w<=u||u>l&&w>=u)&&(clearInterval(t._interval),t._interval=null,t._fadeTo=null,_.volume(u,t._id),_._emit("fade",t._id))},x)},_stopFade:function(t){var l=this,u=l._soundById(t);return u&&u._interval&&(l._webAudio&&u._node.gain.cancelScheduledValues(e.ctx.currentTime),clearInterval(u._interval),u._interval=null,l.volume(u._fadeTo,t),u._fadeTo=null,l._emit("fade",t)),l},loop:function(){var t=this,l=arguments,u,f,h;if(l.length===0)return t._loop;if(l.length===1)if(typeof l[0]=="boolean")u=l[0],t._loop=u;else return h=t._soundById(parseInt(l[0],10)),h?h._loop:!1;else l.length===2&&(u=l[0],f=parseInt(l[1],10));for(var v=t._getSoundIds(f),_=0;_<v.length;_++)h=t._soundById(v[_]),h&&(h._loop=u,t._webAudio&&h._node&&h._node.bufferSource&&(h._node.bufferSource.loop=u,u&&(h._node.bufferSource.loopStart=h._start||0,h._node.bufferSource.loopEnd=h._stop,t.playing(v[_])&&(t.pause(v[_],!0),t.play(v[_],!0)))));return t},rate:function(){var t=this,l=arguments,u,f;if(l.length===0)f=t._sounds[0]._id;else if(l.length===1){var h=t._getSoundIds(),v=h.indexOf(l[0]);v>=0?f=parseInt(l[0],10):u=parseFloat(l[0])}else l.length===2&&(u=parseFloat(l[0]),f=parseInt(l[1],10));var _;if(typeof u=="number"){if(t._state!=="loaded"||t._playLock)return t._queue.push({event:"rate",action:function(){t.rate.apply(t,l)}}),t;typeof f>"u"&&(t._rate=u),f=t._getSoundIds(f);for(var w=0;w<f.length;w++)if(_=t._soundById(f[w]),_){t.playing(f[w])&&(_._rateSeek=t.seek(f[w]),_._playStart=t._webAudio?e.ctx.currentTime:_._playStart),_._rate=u,t._webAudio&&_._node&&_._node.bufferSource?_._node.bufferSource.playbackRate.setValueAtTime(u,e.ctx.currentTime):_._node&&(_._node.playbackRate=u);var A=t.seek(f[w]),O=(t._sprite[_._sprite][0]+t._sprite[_._sprite][1])/1e3-A,x=O*1e3/Math.abs(_._rate);(t._endTimers[f[w]]||!_._paused)&&(t._clearTimer(f[w]),t._endTimers[f[w]]=setTimeout(t._ended.bind(t,_),x)),t._emit("rate",_._id)}}else return _=t._soundById(f),_?_._rate:t._rate;return t},seek:function(){var t=this,l=arguments,u,f;if(l.length===0)t._sounds.length&&(f=t._sounds[0]._id);else if(l.length===1){var h=t._getSoundIds(),v=h.indexOf(l[0]);v>=0?f=parseInt(l[0],10):t._sounds.length&&(f=t._sounds[0]._id,u=parseFloat(l[0]))}else l.length===2&&(u=parseFloat(l[0]),f=parseInt(l[1],10));if(typeof f>"u")return 0;if(typeof u=="number"&&(t._state!=="loaded"||t._playLock))return t._queue.push({event:"seek",action:function(){t.seek.apply(t,l)}}),t;var _=t._soundById(f);if(_)if(typeof u=="number"&&u>=0){var w=t.playing(f);w&&t.pause(f,!0),_._seek=u,_._ended=!1,t._clearTimer(f),!t._webAudio&&_._node&&!isNaN(_._node.duration)&&(_._node.currentTime=u);var A=function(){w&&t.play(f,!0),t._emit("seek",f)};if(w&&!t._webAudio){var O=function(){t._playLock?setTimeout(O,0):A()};setTimeout(O,0)}else A()}else if(t._webAudio){var x=t.playing(f)?e.ctx.currentTime-_._playStart:0,I=_._rateSeek?_._rateSeek-_._seek:0;return _._seek+(I+x*Math.abs(_._rate))}else return _._node.currentTime;return t},playing:function(t){var l=this;if(typeof t=="number"){var u=l._soundById(t);return u?!u._paused:!1}for(var f=0;f<l._sounds.length;f++)if(!l._sounds[f]._paused)return!0;return!1},duration:function(t){var l=this,u=l._duration,f=l._soundById(t);return f&&(u=l._sprite[f._sprite][1]/1e3),u},state:function(){return this._state},unload:function(){for(var t=this,l=t._sounds,u=0;u<l.length;u++)l[u]._paused||t.stop(l[u]._id),t._webAudio||(t._clearSound(l[u]._node),l[u]._node.removeEventListener("error",l[u]._errorFn,!1),l[u]._node.removeEventListener(e._canPlayEvent,l[u]._loadFn,!1),l[u]._node.removeEventListener("ended",l[u]._endFn,!1),e._releaseHtml5Audio(l[u]._node)),delete l[u]._node,t._clearTimer(l[u]._id);var f=e._howls.indexOf(t);f>=0&&e._howls.splice(f,1);var h=!0;for(u=0;u<e._howls.length;u++)if(e._howls[u]._src===t._src||t._src.indexOf(e._howls[u]._src)>=0){h=!1;break}return s&&h&&delete s[t._src],e.noAudio=!1,t._state="unloaded",t._sounds=[],t=null,null},on:function(t,l,u,f){var h=this,v=h["_on"+t];return typeof l=="function"&&v.push(f?{id:u,fn:l,once:f}:{id:u,fn:l}),h},off:function(t,l,u){var f=this,h=f["_on"+t],v=0;if(typeof l=="number"&&(u=l,l=null),l||u)for(v=0;v<h.length;v++){var _=u===h[v].id;if(l===h[v].fn&&_||!l&&_){h.splice(v,1);break}}else if(t)f["_on"+t]=[];else{var w=Object.keys(f);for(v=0;v<w.length;v++)w[v].indexOf("_on")===0&&Array.isArray(f[w[v]])&&(f[w[v]]=[])}return f},once:function(t,l,u){var f=this;return f.on(t,l,u,1),f},_emit:function(t,l,u){for(var f=this,h=f["_on"+t],v=h.length-1;v>=0;v--)(!h[v].id||h[v].id===l||t==="load")&&(setTimeout((function(_){_.call(this,l,u)}).bind(f,h[v].fn),0),h[v].once&&f.off(t,h[v].fn,h[v].id));return f._loadQueue(t),f},_loadQueue:function(t){var l=this;if(l._queue.length>0){var u=l._queue[0];u.event===t&&(l._queue.shift(),l._loadQueue()),t||u.action()}return l},_ended:function(t){var l=this,u=t._sprite;if(!l._webAudio&&t._node&&!t._node.paused&&!t._node.ended&&t._node.currentTime<t._stop)return setTimeout(l._ended.bind(l,t),100),l;var f=!!(t._loop||l._sprite[u][2]);if(l._emit("end",t._id),!l._webAudio&&f&&l.stop(t._id,!0).play(t._id),l._webAudio&&f){l._emit("play",t._id),t._seek=t._start||0,t._rateSeek=0,t._playStart=e.ctx.currentTime;var h=(t._stop-t._start)*1e3/Math.abs(t._rate);l._endTimers[t._id]=setTimeout(l._ended.bind(l,t),h)}return l._webAudio&&!f&&(t._paused=!0,t._ended=!0,t._seek=t._start||0,t._rateSeek=0,l._clearTimer(t._id),l._cleanBuffer(t._node),e._autoSuspend()),!l._webAudio&&!f&&l.stop(t._id,!0),l},_clearTimer:function(t){var l=this;if(l._endTimers[t]){if(typeof l._endTimers[t]!="function")clearTimeout(l._endTimers[t]);else{var u=l._soundById(t);u&&u._node&&u._node.removeEventListener("ended",l._endTimers[t],!1)}delete l._endTimers[t]}return l},_soundById:function(t){for(var l=this,u=0;u<l._sounds.length;u++)if(t===l._sounds[u]._id)return l._sounds[u];return null},_inactiveSound:function(){var t=this;t._drain();for(var l=0;l<t._sounds.length;l++)if(t._sounds[l]._ended)return t._sounds[l].reset();return new a(t)},_drain:function(){var t=this,l=t._pool,u=0,f=0;if(!(t._sounds.length<l)){for(f=0;f<t._sounds.length;f++)t._sounds[f]._ended&&u++;for(f=t._sounds.length-1;f>=0;f--){if(u<=l)return;t._sounds[f]._ended&&(t._webAudio&&t._sounds[f]._node&&t._sounds[f]._node.disconnect(0),t._sounds.splice(f,1),u--)}}},_getSoundIds:function(t){var l=this;if(typeof t>"u"){for(var u=[],f=0;f<l._sounds.length;f++)u.push(l._sounds[f]._id);return u}else return[t]},_refreshBuffer:function(t){var l=this;return t._node.bufferSource=e.ctx.createBufferSource(),t._node.bufferSource.buffer=s[l._src],t._panner?t._node.bufferSource.connect(t._panner):t._node.bufferSource.connect(t._node),t._node.bufferSource.loop=t._loop,t._loop&&(t._node.bufferSource.loopStart=t._start||0,t._node.bufferSource.loopEnd=t._stop||0),t._node.bufferSource.playbackRate.setValueAtTime(t._rate,e.ctx.currentTime),l},_cleanBuffer:function(t){var l=this,u=e._navigator&&e._navigator.vendor.indexOf("Apple")>=0;if(!t.bufferSource)return l;if(e._scratchBuffer&&t.bufferSource&&(t.bufferSource.onended=null,t.bufferSource.disconnect(0),u))try{t.bufferSource.buffer=e._scratchBuffer}catch{}return t.bufferSource=null,l},_clearSound:function(t){var l=/MSIE |Trident\//.test(e._navigator&&e._navigator.userAgent);l||(t.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var a=function(t){this._parent=t,this.init()};a.prototype={init:function(){var t=this,l=t._parent;return t._muted=l._muted,t._loop=l._loop,t._volume=l._volume,t._rate=l._rate,t._seek=0,t._paused=!0,t._ended=!0,t._sprite="__default",t._id=++e._counter,l._sounds.push(t),t.create(),t},create:function(){var t=this,l=t._parent,u=e._muted||t._muted||t._parent._muted?0:t._volume;return l._webAudio?(t._node=typeof e.ctx.createGain>"u"?e.ctx.createGainNode():e.ctx.createGain(),t._node.gain.setValueAtTime(u,e.ctx.currentTime),t._node.paused=!0,t._node.connect(e.masterGain)):e.noAudio||(t._node=e._obtainHtml5Audio(),t._errorFn=t._errorListener.bind(t),t._node.addEventListener("error",t._errorFn,!1),t._loadFn=t._loadListener.bind(t),t._node.addEventListener(e._canPlayEvent,t._loadFn,!1),t._endFn=t._endListener.bind(t),t._node.addEventListener("ended",t._endFn,!1),t._node.src=l._src,t._node.preload=l._preload===!0?"auto":l._preload,t._node.volume=u*e.volume(),t._node.load()),t},reset:function(){var t=this,l=t._parent;return t._muted=l._muted,t._loop=l._loop,t._volume=l._volume,t._rate=l._rate,t._seek=0,t._rateSeek=0,t._paused=!0,t._ended=!0,t._sprite="__default",t._id=++e._counter,t},_errorListener:function(){var t=this;t._parent._emit("loaderror",t._id,t._node.error?t._node.error.code:0),t._node.removeEventListener("error",t._errorFn,!1)},_loadListener:function(){var t=this,l=t._parent;l._duration=Math.ceil(t._node.duration*10)/10,Object.keys(l._sprite).length===0&&(l._sprite={__default:[0,l._duration*1e3]}),l._state!=="loaded"&&(l._state="loaded",l._emit("load"),l._loadQueue()),t._node.removeEventListener(e._canPlayEvent,t._loadFn,!1)},_endListener:function(){var t=this,l=t._parent;l._duration===1/0&&(l._duration=Math.ceil(t._node.duration*10)/10,l._sprite.__default[1]===1/0&&(l._sprite.__default[1]=l._duration*1e3),l._ended(t)),t._node.removeEventListener("ended",t._endFn,!1)}};var s={},d=function(t){var l=t._src;if(s[l]){t._duration=s[l].duration,m(t);return}if(/^data:[^;]+;base64,/.test(l)){for(var u=atob(l.split(",")[1]),f=new Uint8Array(u.length),h=0;h<u.length;++h)f[h]=u.charCodeAt(h);p(f.buffer,t)}else{var v=new XMLHttpRequest;v.open(t._xhr.method,l,!0),v.withCredentials=t._xhr.withCredentials,v.responseType="arraybuffer",t._xhr.headers&&Object.keys(t._xhr.headers).forEach(function(_){v.setRequestHeader(_,t._xhr.headers[_])}),v.onload=function(){var _=(v.status+"")[0];if(_!=="0"&&_!=="2"&&_!=="3"){t._emit("loaderror",null,"Failed loading audio file with status: "+v.status+".");return}p(v.response,t)},v.onerror=function(){t._webAudio&&(t._html5=!0,t._webAudio=!1,t._sounds=[],delete s[l],t.load())},c(v)}},c=function(t){try{t.send()}catch{t.onerror()}},p=function(t,l){var u=function(){l._emit("loaderror",null,"Decoding audio data failed.")},f=function(h){h&&l._sounds.length>0?(s[l._src]=h,m(l,h)):u()};typeof Promise<"u"&&e.ctx.decodeAudioData.length===1?e.ctx.decodeAudioData(t).then(f).catch(u):e.ctx.decodeAudioData(t,f,u)},m=function(t,l){l&&!t._duration&&(t._duration=l.duration),Object.keys(t._sprite).length===0&&(t._sprite={__default:[0,t._duration*1e3]}),t._state!=="loaded"&&(t._state="loaded",t._emit("load"),t._loadQueue())},g=function(){if(e.usingWebAudio){try{typeof AudioContext<"u"?e.ctx=new AudioContext:typeof webkitAudioContext<"u"?e.ctx=new webkitAudioContext:e.usingWebAudio=!1}catch{e.usingWebAudio=!1}e.ctx||(e.usingWebAudio=!1);var t=/iP(hone|od|ad)/.test(e._navigator&&e._navigator.platform),l=e._navigator&&e._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),u=l?parseInt(l[1],10):null;if(t&&u&&u<9){var f=/safari/.test(e._navigator&&e._navigator.userAgent.toLowerCase());e._navigator&&!f&&(e.usingWebAudio=!1)}e.usingWebAudio&&(e.masterGain=typeof e.ctx.createGain>"u"?e.ctx.createGainNode():e.ctx.createGain(),e.masterGain.gain.setValueAtTime(e._muted?0:e._volume,e.ctx.currentTime),e.masterGain.connect(e.ctx.destination)),e._setup()}};n.Howler=e,n.Howl=o,typeof ue<"u"?(ue.HowlerGlobal=i,ue.Howler=e,ue.Howl=o,ue.Sound=a):typeof window<"u"&&(window.HowlerGlobal=i,window.Howler=e,window.Howl=o,window.Sound=a)})();/*!
|
|
26
|
-
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
|
|
27
|
-
*
|
|
28
|
-
* howler.js v2.2.4
|
|
29
|
-
* howlerjs.com
|
|
30
|
-
*
|
|
31
|
-
* (c) 2013-2020, James Simpson of GoldFire Studios
|
|
32
|
-
* goldfirestudios.com
|
|
33
|
-
*
|
|
34
|
-
* MIT License
|
|
35
|
-
*/(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){var o=this;if(!o.ctx||!o.ctx.listener)return o;for(var a=o._howls.length-1;a>=0;a--)o._howls[a].stereo(e);return o},HowlerGlobal.prototype.pos=function(e,o,a){var s=this;if(!s.ctx||!s.ctx.listener)return s;if(o=typeof o!="number"?s._pos[1]:o,a=typeof a!="number"?s._pos[2]:a,typeof e=="number")s._pos=[e,o,a],typeof s.ctx.listener.positionX<"u"?(s.ctx.listener.positionX.setTargetAtTime(s._pos[0],Howler.ctx.currentTime,.1),s.ctx.listener.positionY.setTargetAtTime(s._pos[1],Howler.ctx.currentTime,.1),s.ctx.listener.positionZ.setTargetAtTime(s._pos[2],Howler.ctx.currentTime,.1)):s.ctx.listener.setPosition(s._pos[0],s._pos[1],s._pos[2]);else return s._pos;return s},HowlerGlobal.prototype.orientation=function(e,o,a,s,d,c){var p=this;if(!p.ctx||!p.ctx.listener)return p;var m=p._orientation;if(o=typeof o!="number"?m[1]:o,a=typeof a!="number"?m[2]:a,s=typeof s!="number"?m[3]:s,d=typeof d!="number"?m[4]:d,c=typeof c!="number"?m[5]:c,typeof e=="number")p._orientation=[e,o,a,s,d,c],typeof p.ctx.listener.forwardX<"u"?(p.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),p.ctx.listener.forwardY.setTargetAtTime(o,Howler.ctx.currentTime,.1),p.ctx.listener.forwardZ.setTargetAtTime(a,Howler.ctx.currentTime,.1),p.ctx.listener.upX.setTargetAtTime(s,Howler.ctx.currentTime,.1),p.ctx.listener.upY.setTargetAtTime(d,Howler.ctx.currentTime,.1),p.ctx.listener.upZ.setTargetAtTime(c,Howler.ctx.currentTime,.1)):p.ctx.listener.setOrientation(e,o,a,s,d,c);else return m;return p},Howl.prototype.init=function(e){return function(o){var a=this;return a._orientation=o.orientation||[1,0,0],a._stereo=o.stereo||null,a._pos=o.pos||null,a._pannerAttr={coneInnerAngle:typeof o.coneInnerAngle<"u"?o.coneInnerAngle:360,coneOuterAngle:typeof o.coneOuterAngle<"u"?o.coneOuterAngle:360,coneOuterGain:typeof o.coneOuterGain<"u"?o.coneOuterGain:0,distanceModel:typeof o.distanceModel<"u"?o.distanceModel:"inverse",maxDistance:typeof o.maxDistance<"u"?o.maxDistance:1e4,panningModel:typeof o.panningModel<"u"?o.panningModel:"HRTF",refDistance:typeof o.refDistance<"u"?o.refDistance:1,rolloffFactor:typeof o.rolloffFactor<"u"?o.rolloffFactor:1},a._onstereo=o.onstereo?[{fn:o.onstereo}]:[],a._onpos=o.onpos?[{fn:o.onpos}]:[],a._onorientation=o.onorientation?[{fn:o.onorientation}]:[],e.call(this,o)}}(Howl.prototype.init),Howl.prototype.stereo=function(e,o){var a=this;if(!a._webAudio)return a;if(a._state!=="loaded")return a._queue.push({event:"stereo",action:function(){a.stereo(e,o)}}),a;var s=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof o>"u")if(typeof e=="number")a._stereo=e,a._pos=[e,0,0];else return a._stereo;for(var d=a._getSoundIds(o),c=0;c<d.length;c++){var p=a._soundById(d[c]);if(p)if(typeof e=="number")p._stereo=e,p._pos=[e,0,0],p._node&&(p._pannerAttr.panningModel="equalpower",(!p._panner||!p._panner.pan)&&i(p,s),s==="spatial"?typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):p._panner.setPosition(e,0,0):p._panner.pan.setValueAtTime(e,Howler.ctx.currentTime)),a._emit("stereo",p._id);else return p._stereo}return a},Howl.prototype.pos=function(e,o,a,s){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"pos",action:function(){d.pos(e,o,a,s)}}),d;if(o=typeof o!="number"?0:o,a=typeof a!="number"?-.5:a,typeof s>"u")if(typeof e=="number")d._pos=[e,o,a];else return d._pos;for(var c=d._getSoundIds(s),p=0;p<c.length;p++){var m=d._soundById(c[p]);if(m)if(typeof e=="number")m._pos=[e,o,a],m._node&&((!m._panner||m._panner.pan)&&i(m,"spatial"),typeof m._panner.positionX<"u"?(m._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),m._panner.positionY.setValueAtTime(o,Howler.ctx.currentTime),m._panner.positionZ.setValueAtTime(a,Howler.ctx.currentTime)):m._panner.setPosition(e,o,a)),d._emit("pos",m._id);else return m._pos}return d},Howl.prototype.orientation=function(e,o,a,s){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"orientation",action:function(){d.orientation(e,o,a,s)}}),d;if(o=typeof o!="number"?d._orientation[1]:o,a=typeof a!="number"?d._orientation[2]:a,typeof s>"u")if(typeof e=="number")d._orientation=[e,o,a];else return d._orientation;for(var c=d._getSoundIds(s),p=0;p<c.length;p++){var m=d._soundById(c[p]);if(m)if(typeof e=="number")m._orientation=[e,o,a],m._node&&(m._panner||(m._pos||(m._pos=d._pos||[0,0,-.5]),i(m,"spatial")),typeof m._panner.orientationX<"u"?(m._panner.orientationX.setValueAtTime(e,Howler.ctx.currentTime),m._panner.orientationY.setValueAtTime(o,Howler.ctx.currentTime),m._panner.orientationZ.setValueAtTime(a,Howler.ctx.currentTime)):m._panner.setOrientation(e,o,a)),d._emit("orientation",m._id);else return m._orientation}return d},Howl.prototype.pannerAttr=function(){var e=this,o=arguments,a,s,d;if(!e._webAudio)return e;if(o.length===0)return e._pannerAttr;if(o.length===1)if(typeof o[0]=="object")a=o[0],typeof s>"u"&&(a.pannerAttr||(a.pannerAttr={coneInnerAngle:a.coneInnerAngle,coneOuterAngle:a.coneOuterAngle,coneOuterGain:a.coneOuterGain,distanceModel:a.distanceModel,maxDistance:a.maxDistance,refDistance:a.refDistance,rolloffFactor:a.rolloffFactor,panningModel:a.panningModel}),e._pannerAttr={coneInnerAngle:typeof a.pannerAttr.coneInnerAngle<"u"?a.pannerAttr.coneInnerAngle:e._coneInnerAngle,coneOuterAngle:typeof a.pannerAttr.coneOuterAngle<"u"?a.pannerAttr.coneOuterAngle:e._coneOuterAngle,coneOuterGain:typeof a.pannerAttr.coneOuterGain<"u"?a.pannerAttr.coneOuterGain:e._coneOuterGain,distanceModel:typeof a.pannerAttr.distanceModel<"u"?a.pannerAttr.distanceModel:e._distanceModel,maxDistance:typeof a.pannerAttr.maxDistance<"u"?a.pannerAttr.maxDistance:e._maxDistance,refDistance:typeof a.pannerAttr.refDistance<"u"?a.pannerAttr.refDistance:e._refDistance,rolloffFactor:typeof a.pannerAttr.rolloffFactor<"u"?a.pannerAttr.rolloffFactor:e._rolloffFactor,panningModel:typeof a.pannerAttr.panningModel<"u"?a.pannerAttr.panningModel:e._panningModel});else return d=e._soundById(parseInt(o[0],10)),d?d._pannerAttr:e._pannerAttr;else o.length===2&&(a=o[0],s=parseInt(o[1],10));for(var c=e._getSoundIds(s),p=0;p<c.length;p++)if(d=e._soundById(c[p]),d){var m=d._pannerAttr;m={coneInnerAngle:typeof a.coneInnerAngle<"u"?a.coneInnerAngle:m.coneInnerAngle,coneOuterAngle:typeof a.coneOuterAngle<"u"?a.coneOuterAngle:m.coneOuterAngle,coneOuterGain:typeof a.coneOuterGain<"u"?a.coneOuterGain:m.coneOuterGain,distanceModel:typeof a.distanceModel<"u"?a.distanceModel:m.distanceModel,maxDistance:typeof a.maxDistance<"u"?a.maxDistance:m.maxDistance,refDistance:typeof a.refDistance<"u"?a.refDistance:m.refDistance,rolloffFactor:typeof a.rolloffFactor<"u"?a.rolloffFactor:m.rolloffFactor,panningModel:typeof a.panningModel<"u"?a.panningModel:m.panningModel};var g=d._panner;g||(d._pos||(d._pos=e._pos||[0,0,-.5]),i(d,"spatial"),g=d._panner),g.coneInnerAngle=m.coneInnerAngle,g.coneOuterAngle=m.coneOuterAngle,g.coneOuterGain=m.coneOuterGain,g.distanceModel=m.distanceModel,g.maxDistance=m.maxDistance,g.refDistance=m.refDistance,g.rolloffFactor=m.rolloffFactor,g.panningModel=m.panningModel}return e},Sound.prototype.init=function(e){return function(){var o=this,a=o._parent;o._orientation=a._orientation,o._stereo=a._stereo,o._pos=a._pos,o._pannerAttr=a._pannerAttr,e.call(this),o._stereo?a.stereo(o._stereo):o._pos&&a.pos(o._pos[0],o._pos[1],o._pos[2],o._id)}}(Sound.prototype.init),Sound.prototype.reset=function(e){return function(){var o=this,a=o._parent;return o._orientation=a._orientation,o._stereo=a._stereo,o._pos=a._pos,o._pannerAttr=a._pannerAttr,o._stereo?a.stereo(o._stereo):o._pos?a.pos(o._pos[0],o._pos[1],o._pos[2],o._id):o._panner&&(o._panner.disconnect(0),o._panner=void 0,a._refreshBuffer(o)),e.call(this)}}(Sound.prototype.reset);var i=function(e,o){o=o||"spatial",o==="spatial"?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,typeof e._panner.positionX<"u"?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),typeof e._panner.orientationX<"u"?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}})()})(Pe);const aa=kt({__proto__:null,default:ra(Pe)},[Pe]);W.default=oa,Object.defineProperties(W,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
17
|
+
This will fail in production.`);r=ae,r._s.has(o)||(a?Te(o,l,s,r):_t(o,s,r),process.env.NODE_ENV!=="production"&&(i._pinia=r));const m=r._s.get(o);if(process.env.NODE_ENV!=="production"&&c){const p="__hot:"+o,h=a?Te(p,l,s,r,!0):_t(p,A({},s),r,!0);c._hotUpdate(h),delete r.state.value[p],r._s.delete(p)}if(process.env.NODE_ENV!=="production"&&me){const p=n.getCurrentInstance();if(p&&p.proxy&&!c){const h=p.proxy,b="_pStores"in h?h._pStores:h._pStores={};b[o]=m}}return m}return i.$id=o,i}const Ce=Be("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,u){e.value=c==null?void 0:c.src,l.value=c==null?void 0:c.target,t.value=u}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}}),Co={key:0,class:"flex"},_o={__name:"Selects",setup(e){const l=Ce();function t(){l.swap()}return(o,s)=>n.unref(l).languages?(n.openBlock(),n.createElementBlock("div",Co,[n.createVNode(et,{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(zn,{isBidirect:n.unref(l).src!=="auto",class:"grow-0 mx-3",onSwap:t},null,8,["isBidirect"]),n.createVNode(et,{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)}},xo={INPUT_MAX_LENGTH:5e3,INPUT_DEBOUNCE:500},_e=(e,l)=>{const t=e.__vccOpts||e;for(const[o,s]of l)t[o]=s;return t},wo={},yo={class:"mr-2 loading loading-dots loading-xs"};function Eo(e,l){return n.openBlock(),n.createElementBlock("span",yo)}const So=_e(wo,[["render",Eo]]),Oo="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",ko="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",Vo={key:0,src:Oo,alt:"Play"},$o={key:1,src:ko,alt:"Stop"},No={__name:"SpeakBtn",props:{url:{type:String,default:""}},setup(e){const l=e,t=n.ref(!1);let o=new Audio(l.url);n.watch(()=>l.url,a=>{o=new Audio(a)});function s(){t.value?(o.pause(),o.currentTime=0,t.value=!1):(o.play(),t.value=!0)}return o.onended=()=>{t.value=!1},(a,i)=>(n.openBlock(),n.createElementBlock("button",{class:"btn btn-xs btn-ghost btn-circle",onClick:n.withModifiers(s,["prevent"])},[t.value?(n.openBlock(),n.createElementBlock("img",$o)):(n.openBlock(),n.createElementBlock("img",Vo))]))}},Io="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",Lo={},To={class:"btn btn-xs btn-circle btn-ghost"},Bo=[n.createElementVNode("img",{src:Io,alt:"Clear",class:"w-4"},null,-1)];function Ro(e,l){return n.openBlock(),n.createElementBlock("button",To,Bo)}const Mo=_e(Lo,[["render",Ro]]),Po="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",Do="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",Ao={class:"btn btn-xs btn-circle btn-ghost"},Fo={key:0,src:Po,alt:"Clear",class:"w-4"},jo={key:1,src:Do,alt:"Clear",class:"w-4"},Ho={__name:"FavoriteBtn",props:{isFilled:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",Ao,[l.isFilled?(n.openBlock(),n.createElementBlock("img",Fo)):(n.openBlock(),n.createElementBlock("img",jo))]))}},zo={class:"flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center"},Uo={class:"text-sm text-gray-600"},Zo={key:0,class:"italic"},Wo=n.createElementVNode("div",{class:"flex-grow"},null,-1),xt={__name:"TranslationBtnGroup",props:{loading:{type:Boolean,default:!1},src:{type:String,default:""},srcLabel:{type:String,default:""},tts:{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"],setup(e,{emit:l}){const t=e,o=l;return(s,a)=>(n.openBlock(),n.createElementBlock("div",zo,[t.tts?(n.openBlock(),n.createBlock(No,{key:0,url:t.tts},null,8,["url"])):n.createCommentVNode("",!0),n.createElementVNode("div",Uo,[n.createTextVNode(n.toDisplayString(e.srcLabel)+" ",1),e.phonetic?(n.openBlock(),n.createElementBlock("span",Zo,"- ["+n.toDisplayString(t.phonetic)+"]",1)):n.createCommentVNode("",!0)]),Wo,t.loading?(n.openBlock(),n.createBlock(So,{key:1})):n.createCommentVNode("",!0),t.src&&t.isClearBtn?(n.openBlock(),n.createBlock(Mo,{key:2,onClick:a[0]||(a[0]=i=>o("clear"))})):n.createCommentVNode("",!0),t.src&&t.isFavoriteBtn?(n.openBlock(),n.createBlock(Ho,{key:3,isFilled:t.isFavorite,onClick:a[1]||(a[1]=i=>o("favorite"))},null,8,["isFilled"])):n.createCommentVNode("",!0)]))}},X=Be("translation",()=>{const e=n.ref(null),l=n.ref(null),t=n.ref({src:null,target:null}),o=n.ref(null),s=n.ref([]),a=n.ref([]),i=n.ref([]),r=n.ref([]),c=n.ref({src:null,target:null}),u=Ce(),m=n.computed(()=>u.getLabel(e.value)),p=n.computed(()=>u.getLabel(l.value));function h(g){e.value=g.src,l.value=g.target,t.value=g.phonetic,o.value=g.result,s.value=g.dictionary,a.value=g.definitions,i.value=g.synonyms,r.value=g.examples,c.value=g.tts}function b(){e.value=null,l.value=null,t.value={src:null,target:null},o.value=null,s.value=[],a.value=[],i.value=[],r.value=[],c.value={src:null,target:null}}return{src:e,srcLabel:m,target:l,targetLabel:p,phonetic:t,result:o,dictionary:s,definitions:a,synonyms:i,examples:r,tts:c,init:h,reset:b}});function Go(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function xe(e){return typeof e=="function"?e():n.unref(e)}const qo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wt=()=>{};function Jo(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 Ko(e,l={}){let t,o,s=wt;const a=r=>{clearTimeout(r),s(),s=wt};return r=>{const c=xe(e),u=xe(l.maxWait);return t&&a(t),c<=0||u!==void 0&&u<=0?(o&&(a(o),o=null),Promise.resolve(r())):new Promise((m,p)=>{s=l.rejectOnCancel?p:m,u&&!o&&(o=setTimeout(()=>{t&&a(t),o=null,m(r())},u)),t=setTimeout(()=>{o&&a(o),o=null,m(r())},c)})}}function Yo(e,l=200,t={}){return Jo(Ko(l,t),e)}function yt(e){var l;const t=xe(e);return(l=t==null?void 0:t.$el)!=null?l:t}const Qo=qo?window:void 0;function Xo(){const e=n.ref(!1),l=n.getCurrentInstance();return l&&n.onMounted(()=>{e.value=!0},l),e}function el(e){const l=Xo();return n.computed(()=>(l.value,!!e()))}function tl(e,l,t={}){const{window:o=Qo,...s}=t;let a;const i=el(()=>o&&"ResizeObserver"in o),r=()=>{a&&(a.disconnect(),a=void 0)},c=n.computed(()=>Array.isArray(e)?e.map(p=>yt(p)):[yt(e)]),u=n.watch(c,p=>{if(r(),i.value&&o){a=new ResizeObserver(l);for(const h of p)h&&a.observe(h,s)}},{immediate:!0,flush:"post"}),m=()=>{r(),u()};return Go(m),{isSupported:i,stop:m}}function Et(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?xe(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)}),tl(t,()=>i()),e!=null&&e.watch&&n.watch(e.watch,i,{immediate:!0,deep:!0}),{textarea:t,input:o,triggerResize:i}}const nl=_e({__name:"TranslationInput",props:{text:{type:String,default:""}},emits:["change","clear"],setup(e,{emit:l}){const t=X(),o=e,s=n.ref(o.text),a=n.computed(()=>t.src),i=n.computed(()=>t.srcLabel),r=n.computed(()=>{var g;return(g=t.phonetic)==null?void 0:g.src}),c=n.computed(()=>{var g;return(g=t.tts)==null?void 0:g.src}),{textarea:u}=Et({input:s,styleProp:"minHeight"}),m=l,p=Yo(()=>{m("change",s.value)},xo.INPUT_DEBOUNCE);function h(){if(!s.value){b();return}p()}function b(){m("clear"),s.value="",u.value.focus()}return n.watch(()=>o.text,g=>{s.value=g}),(g,y)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(xt,{src:a.value,srcLabel:i.value,tts:c.value,phonetic:r.value,isClearBtn:!0,onClear:b},null,8,["src","srcLabel","tts","phonetic"]),n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:u,"onUpdate:modelValue":y[0]||(y[0]=N=>s.value=N),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",autofocus:"",rows:"2",onInput:h,onFocus:y[1]||(y[1]=N=>N.target.select())},null,544),[[n.vModelText,s.value,void 0,{trim:!0}]])],64))}},[["__scopeId","data-v-5ce52ee5"]]),ol="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='M13.2018%204.409H8.2373L7.46364%202H2.79867C2.35907%202%202%202.3595%202%202.7995V10.937C2%2011.376%202.36008%2011.7355%202.79867%2011.7355H7.79971L8.53636%2014H13.2013C13.6404%2014%2014%2013.6465%2014%2013.214V5.195C14%204.7625%2013.6404%204.409%2013.2018%204.409ZM5.3702%208.749C4.33499%208.749%203.49481%207.909%203.49481%206.874C3.49481%205.839%204.33499%204.999%205.3702%204.999C5.87631%204.999%206.3004%205.1865%206.62646%205.487L6.13136%205.963C5.9244%205.77181%205.65196%205.66729%205.3702%205.671C4.71757%205.671%204.18846%206.211%204.18846%206.8755C4.18846%207.54%204.71757%208.08%205.3697%208.08C6.12336%208.08%206.43492%207.54%206.46493%207.176L5.3707%207.175V6.533H7.12607C7.15107%206.648%207.17108%206.7615%207.17108%206.915C7.17108%207.9885%206.45393%208.7495%205.3697%208.7495L5.3702%208.749ZM13.7504%2013.214C13.7504%2013.509%2013.5044%2013.75%2013.2018%2013.75H8.76341L10.5883%2011.735H10.5908L10.2207%2010.584L10.2237%2010.5815C10.2237%2010.5815%2010.5078%2010.3375%2010.8623%209.9615C11.2184%2010.347%2011.6775%2010.811%2012.2716%2011.364L12.6572%2010.978C12.0211%2010.401%2011.555%209.943%2011.2119%209.5755C11.6715%209.032%2012.1381%208.348%2012.2366%207.722H13.2538V7.723H13.2548V7.253H10.9884V6.493H10.2527V7.253H9.15049L8.31432%204.648L8.31732%204.659H13.2018C13.5044%204.659%2013.7504%204.899%2013.7504%205.195V13.214ZM10.5078%209.5585C10.2397%209.8325%2010.0362%209.995%2010.0362%209.995L10.0322%209.997L9.30202%207.723H11.6845C11.531%208.265%2011.1904%208.777%2010.8588%209.175C10.2707%208.479%2010.2687%208.253%2010.2687%208.253H9.6576C9.6576%208.253%209.6826%208.5925%2010.5078%209.5585Z'%20fill='%237E7E7E'/%3e%3c/svg%3e",St=Be("loader",()=>({loading:n.ref(!1)})),ll=e=>(n.pushScopeId("data-v-5a9dbf88"),e=e(),n.popScopeId(),e),sl={class:"flex flex-col"},rl=ll(()=>n.createElementVNode("div",{class:"w-full flex align-item-center justify-end"},[n.createElementVNode("span",{class:"text-sm"},"Powered by Google Translate"),n.createElementVNode("img",{src:ol,alt:"Google",class:"h-5 ml-2"})],-1)),al=_e({__name:"TranslationResult",props:{isFavoriteFeatureEnabled:Boolean},setup(e){const l=X(),t=n.ref(!1),o=n.computed(()=>l.result),s=n.computed(()=>l.target),a=n.computed(()=>l.targetLabel),i=n.computed(()=>{var h;return(h=l.phonetic)==null?void 0:h.target}),r=n.computed(()=>{var h;return(h=l.tts)==null?void 0:h.target}),c=e,u=St(),{textarea:m,input:p}=Et({input:o,styleProp:"minHeight"});return(h,b)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(xt,{loading:n.unref(u).loading,src:s.value,srcLabel:a.value,tts:r.value,isFavoriteBtn:c.isFavoriteFeatureEnabled,isFavorite:t.value,phonetic:i.value,onFavorite:b[0]||(b[0]=g=>t.value=!t.value)},null,8,["loading","src","srcLabel","tts","isFavoriteBtn","isFavorite","phonetic"]),n.createElementVNode("div",sl,[n.withDirectives(n.createElementVNode("textarea",{ref_key:"textarea",ref:m,"onUpdate:modelValue":b[1]||(b[1]=g=>n.isRef(p)?p.value=g: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",readonly:"",rows:"2",spellcheck:"false"},null,512),[[n.vModelText,n.unref(p)]]),rl])],64))}},[["__scopeId","data-v-5a9dbf88"]]),il={class:"btn btn-sm btn-circle btn-ghost"},we={__name:"ToggleBtn",props:{isExpanded:Boolean},setup(e){const l=e;return(t,o)=>(n.openBlock(),n.createElementBlock("button",il,[l.isExpanded?(n.openBlock(),n.createBlock(n.unref(An),{key:0,class:"w-7 text-gray-400"})):(n.openBlock(),n.createBlock(n.unref(Pn),{key:1,class:"w-7 text-gray-400"}))]))}},cl={class:"card border bg-white rounded-lg"},ul={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"},"Translations",-1),pl={class:"capitalize text-base font-normal text-textSecondary mb-1"},ml={class:"list-none list-inside"},hl=["onClick"],gl={class:"text-base font-normal text-gray-800 leading-4"},bl={__name:"Dictionary",emits:["translate"],setup(e,{emit:l}){const t=n.ref(!0),o=X(),s=Ce(),a=n.computed(()=>o.dictionary),i=l,r=()=>{t.value=!t.value},c=u=>{i("translate",u,o.target,o.src),s.src=o.target,s.target=o.src};return(u,m)=>(n.openBlock(),n.createElementBlock("div",cl,[n.createElementVNode("div",ul,[n.createElementVNode("div",dl,[fl,n.createVNode(we,{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,(p,h)=>(n.openBlock(),n.createElementBlock("li",{key:`${p.pos}-${h}`,class:"mb-2"},[n.createElementVNode("h5",pl,n.toDisplayString(p.pos),1),n.createElementVNode("ul",ml,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(p.items,(b,g)=>(n.openBlock(),n.createElementBlock("li",{key:`${b.word}-${g}`},[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:y=>c(b.word)},n.toDisplayString(b.word),9,hl),n.createElementVNode("small",gl," - "+n.toDisplayString(b.reverse_translation.join(", ")),1)]))),128))])]))),128))])],2)])]))}},vl={class:"card border bg-white rounded-lg"},Cl={class:"card-body px-4 py-2 gap-0"},_l={class:"flex justify-between items-center"},xl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Definitions",-1),wl={class:"capitalize text-base font-normal text-textSecondary mb-1"},yl={class:"text-base text-textCustom list-decimal list-outside ml-5"},El=n.createElementVNode("br",null,null,-1),Sl={key:0,class:"italic"},Ol={__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",vl,[n.createElementVNode("div",Cl,[n.createElementVNode("div",_l,[xl,n.createVNode(we,{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",wl,n.toDisplayString(r.pos),1),n.createElementVNode("ul",yl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.items,(u,m)=>(n.openBlock(),n.createElementBlock("li",{key:`${u.gloss}-${m}`,class:"mb-1"},[n.createElementVNode("span",null,n.toDisplayString(u.gloss),1),El,u.example?(n.openBlock(),n.createElementBlock("small",Sl,'"'+n.toDisplayString(u.example)+'"',1)):n.createCommentVNode("",!0)]))),128))])]))),128))])],2)])]))}},kl={class:"card border bg-white rounded-lg"},Vl={class:"card-body px-4 py-2 gap-0"},$l={class:"flex justify-between items-center"},Nl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Examples",-1),Il={class:"text-textCustom list-decimal list-outside ml-7 mt-2"},Ll=["innerHTML"],Tl={__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",kl,[n.createElementVNode("div",Vl,[n.createElementVNode("div",$l,[Nl,n.createVNode(we,{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",Il,[(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,Ll))),128))])],2)])]))}},Bl={class:"card border bg-white rounded-lg"},Rl={class:"card-body px-4 py-2 gap-0"},Ml={class:"flex justify-between items-center"},Pl=n.createElementVNode("h2",{class:"card-title text-base font-bold leading-6 text-textCustom"},"Synonyms",-1),Dl={class:"capitalize text-base font-normal text-textSecondary mb-1"},Al={class:"list-none list-inside"},Fl={class:"flex flex-wrap"},jl=["onClick"],Hl={__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)};return(c,u)=>(n.openBlock(),n.createElementBlock("div",Bl,[n.createElementVNode("div",Rl,[n.createElementVNode("div",Ml,[Pl,n.createVNode(we,{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,(m,p)=>(n.openBlock(),n.createElementBlock("li",{key:`${m.pos}-${p}`,class:"mb-2"},[n.createElementVNode("h5",Dl,n.toDisplayString(m.pos),1),n.createElementVNode("ul",Al,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.items,(h,b)=>(n.openBlock(),n.createElementBlock("li",{key:`${h.word}-${b}`,class:"mb-2"},[n.createElementVNode("div",Fl,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(h.synonym,(g,y)=>(n.openBlock(),n.createElementBlock("span",{key:`${g}-${y}`,class:"p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",onClick:N=>r(g)},n.toDisplayString(g),9,jl))),128))])]))),128))])]))),128))])],2)])]))}},zl={class:"bg-white min-h-screen flex flex-col"},Ul={class:"py-2 px-5 shadow-lg"},Zl={class:"px-5 flex-grow"},Wl={class:"flex flex-col lg:flex-row lg:gap-2"},Gl={class:"w-full lg:w-[calc(50%-1rem)] my-2"},ql=n.createElementVNode("div",{class:"w-6 h-4 mx-auto hidden lg:block"},null,-1),Jl={class:"w-full lg:w-[calc(50%-1rem)] my-2"},Kl={class:"grid grid-cols-1 lg:grid-cols-3 gap-4"},Yl={key:0,class:"w-full my-4"},Ql=n.createElementVNode("div",{class:"mt-auto py-5 px-5"},[n.createElementVNode("span",{class:"block text-center text-gray-700"}," The site is not affiliated with Google Translate "),n.createElementVNode("span",{class:"block text-center text-gray-700"},"Since 2011")],-1),Xl={__name:"Popup",props:{opt:{type:Object,default:null},languages:{type:Object,default:null},translation:{type:Object,default:null},isFavoriteFeatureEnabled:{type:Boolean,default:!1}},emits:["opt","translate","reader","settings","fullscreen"],setup(e,{emit:l}){const t=ho(),o=X(t),s=Ce(t),a=St(t),i=e,r=l,c=n.ref("");n.watch(()=>i.translation,h=>{a.loading=!1,c.value=h.text,o.init(h)},{immediate:!0}),n.watch([()=>i.opt,()=>i.languages],([h,b])=>{s.init(h,b),p(c.value)}),n.watch([()=>s.src,()=>s.target],([h,b])=>{r("opt",{src:h,target:b}),c.value&&p(c.value)}),n.onMounted(()=>{s.init(i.opt,i.languages)});function u(){c.value="",o.reset()}function m(h){h&&p(h)}function p(h,b=s.src,g=s.target){c.value=h,a.loading=!0,r("translate",{src:b,target:g,text:h})}return(h,b)=>(n.openBlock(),n.createElementBlock("div",zl,[n.createElementVNode("div",Ul,[n.createVNode(Mt,{onReader:b[0]||(b[0]=g=>r("reader")),onSettings:b[1]||(b[1]=g=>r("settings")),onFullScreen:b[2]||(b[2]=g=>r("fullscreen"))})]),n.createElementVNode("div",Zl,[n.createVNode(_o,{class:"my-4"}),n.createElementVNode("div",Wl,[n.createElementVNode("div",Gl,[n.createVNode(nl,{text:c.value,onChange:m,onClear:u},null,8,["text"])]),ql,n.createElementVNode("div",Jl,[n.createVNode(al,{isFavoriteFeatureEnabled:e.isFavoriteFeatureEnabled},null,8,["isFavoriteFeatureEnabled"])])]),n.createElementVNode("div",Kl,[n.unref(o).dictionary.length?(n.openBlock(),n.createBlock(bl,{key:0,onTranslate:p})):n.createCommentVNode("",!0),n.unref(o).definitions.length?(n.openBlock(),n.createBlock(Ol,{key:1})):n.createCommentVNode("",!0),n.unref(o).synonyms.length?(n.openBlock(),n.createBlock(Hl,{key:2,onTranslate:p})):n.createCommentVNode("",!0)]),n.unref(o).examples.length?(n.openBlock(),n.createElementBlock("div",Yl,[n.createVNode(Tl)])):n.createCommentVNode("",!0)]),Ql]))}};G.default=Xl,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|