@krometra/ui-kit 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -3
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.js +4002 -2448
- package/dist/ui-kit.umd.cjs +23 -3
- package/package.json +2 -1
- package/src/components/KPagination.vue +15 -6
- package/src/components/KTable.vue +5 -1
- package/src/components/KVirtualList.vue +79 -0
- package/src/index.js +3 -2
package/dist/ui-kit.umd.cjs
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.TenderUiKit={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},r=e=>e===``,i=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),a=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),s=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)},c={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},l=({name:e,iconNode:o,absoluteStrokeWidth:l,"absolute-stroke-width":u,strokeWidth:d,"stroke-width":f,size:p=c.width,color:m=c.stroke,...h},{slots:g})=>(0,t.h)(`svg`,{...c,...h,width:p,height:p,stroke:m,"stroke-width":r(l)||r(u)||l===!0||u===!0?Number(d||f||c[`stroke-width`])*24/Number(p):d||f||c[`stroke-width`],class:i(`lucide`,h.class,...e?[`lucide-${a(s(e))}-icon`,`lucide-${a(e)}`]:[`lucide-icon`]),...!g.default&&!n(h)&&{"aria-hidden":`true`}},[...o.map(e=>(0,t.h)(...e)),...g.default?[g.default()]:[]]),u=(e,n)=>(r,{slots:i,attrs:a})=>(0,t.h)(l,{...a,...r,iconNode:n,name:e},i),d=u(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),f=u(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),p=u(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),m=u(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),h=u(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),g=u(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),_=u(`badge-check`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),v=u(`banknote`,[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`2`,key:`9lu3g6`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M6 12h.01M18 12h.01`,key:`113zkx`}]]),y=u(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),b=u(`bookmark`,[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]),x=u(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),S=u(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),C=u(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),w=u(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),T=u(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ee=u(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),te=u(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),ne=u(`circle-minus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),re=u(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ie=u(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),ae=u(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),oe=u(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),se=u(`credit-card`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]]),ce=u(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),le=u(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ue=u(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),de=u(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),fe=u(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),pe=u(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),me=u(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),he=u(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ge=u(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),_e=u(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),ve=u(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),ye=u(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),be=u(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),xe=u(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Se=u(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ce=u(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),we=u(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Te=u(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ee=u(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),De=u(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Oe=u(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ke=u(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Ae=u(`life-buoy`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),je=u(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Me=u(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Ne=u(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Pe=u(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Fe=u(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Ie=u(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),Le=u(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Re=u(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),ze=u(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Be=u(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),Ve=u(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),He=u(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ue=u(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),We=u(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Ge=u(`percent`,[[`line`,{x1:`19`,x2:`5`,y1:`5`,y2:`19`,key:`1x9vlm`}],[`circle`,{cx:`6.5`,cy:`6.5`,r:`2.5`,key:`4mh3h7`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`2.5`,key:`1mdrzq`}]]),Ke=u(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),qe=u(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Je=u(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ye=u(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Xe=u(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Ze=u(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Qe=u(`scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),$e=u(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),et=u(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),tt=u(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),nt=u(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),rt=u(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),it=u(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),at=u(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ot=u(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),st=u(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ct=u(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),lt=u(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ut=u(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),dt=u(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),ft=u(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),pt=u(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),mt=u(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),ht=u(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),gt=u(`wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]),_t={back:m,forward:h,up:g,down:p,"chevron-up":te,"chevron-down":w,"chevron-left":T,"chevron-right":ee,menu:Be,more:ue,"more-horizontal":de,home:we,dashboard:Oe,external:fe,link:je,add:Je,edit:We,delete:lt,save:Ze,copy:oe,search:$e,filter:xe,sliders:at,refresh:Ye,rotate:Xe,scissors:Qe,restore:f,"file-up":ge,move:ve,upload:pt,download:le,share:nt,send:et,play:qe,close:u(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),check:C,reject:re,remove:ne,info:Ee,alert:ft,"check-badge":_,spinner:Ne,activity:d,trending:dt,declining:ut,zap:u(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),document:he,file:_e,folder:be,"folder-open":ye,attach:Ue,image:Te,clipboard:ie,checklist:Me,list:Pe,grid:ke,database:ce,tag:ct,bookmark:b,star:ot,heart:Ce,user:mt,users:ht,organization:x,mail:Re,phone:Ke,message:Ve,bell:y,lock:Fe,key:De,shield:it,"shield-check":rt,login:Ie,logout:Le,eye:me,"eye-off":pe,finance:v,wallet:gt,card:se,percent:Ge,calendar:S,clock:ae,location:ze,globe:Se,settings:tt,help:Ae,sun:st,moon:He};function vt(e){Object.assign(_t,e),yt.splice(0,yt.length,...Object.keys(_t))}var yt=Object.keys(_t),E=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},D=E({__name:`KIcon`,props:{name:{type:String,default:``},component:{type:[Object,Function],default:null},size:{type:[Number,String],default:18},strokeWidth:{type:[Number,String],default:2},spin:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.computed)(()=>{if(n.component)return n.component;let e=_t[n.name];return!e&&n.name,e||null});return(n,i)=>r.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.value),{key:0,class:(0,t.normalizeClass)([`k-icon`,{"k-icon--spin":e.spin}]),size:Number(e.size),"stroke-width":Number(e.strokeWidth),"aria-hidden":`true`},null,8,[`class`,`size`,`stroke-width`])):(0,t.createCommentVNode)(``,!0)}},[[`__scopeId`,`data-v-a6df347d`]]),bt={class:`k-alert__body`},xt={key:0,class:`k-alert__title`},St={key:1,class:`k-alert__text`},Ct=E({__name:`KAlert`,props:{tone:{type:String,default:`info`},title:{type:String,default:``},icon:{type:String,default:``},closable:{type:Boolean,default:!1}},emits:[`close`],setup(e){let n=e,r={info:`info`,success:`check-badge`,warning:`alert`,danger:`reject`},i=(0,t.computed)(()=>n.icon||r[n.tone]||`info`);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-alert`,`k-alert--${e.tone}`]),role:`status`},[(0,t.createVNode)(D,{name:i.value,size:18,class:`k-alert__icon`},null,8,[`name`]),(0,t.createElementVNode)(`div`,bt,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,xt,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,St,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),e.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:0,class:`k-alert__close`,"aria-label":`Закрыть`,onClick:r[0]||=e=>n.$emit(`close`)},[(0,t.createVNode)(D,{name:`close`,size:15})])):(0,t.createCommentVNode)(``,!0)],2))}},[[`__scopeId`,`data-v-54c7f48e`]]),wt=[`title`],Tt=E({__name:`KAvatar`,props:{name:{type:String,default:``},icon:{type:String,default:``},size:{type:String,default:`md`},square:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.computed)(()=>n.name.replace(/["«»]/g,``).split(/[\s-]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)),i=[`primary`,`success`,`warning`,`info`,`danger`],a=(0,t.computed)(()=>{let e=0;for(let t of n.name)e=e*31+t.charCodeAt(0)>>>0;return i[e%i.length]});return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-avatar`,[`k-avatar--${e.size}`,`k-avatar--${a.value}`,{"k-avatar--square":e.square}]]),title:e.name},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:e.size===`sm`?14:e.size===`lg`?22:17},null,8,[`name`,`size`])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r.value),1)],64))],10,wt))}},[[`__scopeId`,`data-v-8e5b1629`]]),Et={key:0,class:`k-badge__dot`},Dt=E({__name:`KBadge`,props:{tone:{type:String,default:`neutral`},size:{type:String,default:`md`},dot:{type:Boolean,default:!1},icon:{type:String,default:``}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-badge`,[`k-badge--${e.tone}`,`k-badge--${e.size}`]])},[e.dot?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Et)):(0,t.createCommentVNode)(``,!0),e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:1,name:e.icon,size:e.size===`sm`?11:13},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)],2))}},[[`__scopeId`,`data-v-df0ae949`]]),Ot=[`type`,`disabled`],kt={key:2,class:`k-btn__label`},At=E({__name:`KButton`,props:{variant:{type:String,default:`secondary`},size:{type:String,default:`md`},icon:{type:String,default:``},iconEnd:{type:String,default:``},htmlType:{type:String,default:`button`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.useSlots)(),i=(0,t.computed)(()=>!!r.default),a=(0,t.computed)(()=>({sm:15,md:17,lg:19})[n.size]??17);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{class:(0,t.normalizeClass)([`k-btn`,[`k-btn--${e.variant}`,`k-btn--${e.size}`,{"k-btn--icon-only":(e.icon||e.loading)&&!i.value,"k-btn--block":e.block}]]),type:e.htmlType,disabled:e.disabled||e.loading},[e.loading?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`spinner`,size:a.value,spin:``},null,8,[`size`])):e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:1,name:e.icon,size:a.value},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),i.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,kt,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),e.iconEnd&&!e.loading?((0,t.openBlock)(),(0,t.createBlock)(D,{key:3,name:e.iconEnd,size:a.value},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0)],10,Ot))}},[[`__scopeId`,`data-v-92d86bbb`]]),jt={key:0,class:`k-card__header`},Mt={class:`k-card__heading`},Nt={key:0,class:`k-card__title`},Pt={key:1,class:`k-card__subtitle`},Ft={key:0,class:`k-card__actions`},It={class:`k-card__body`},Lt={key:1,class:`k-card__footer`},Rt=E({__name:`KCard`,props:{title:{type:String,default:``},subtitle:{type:String,default:``},padding:{type:String,default:`md`},hoverable:{type:Boolean,default:!1}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{class:(0,t.normalizeClass)([`k-card`,[`k-card--p-${e.padding}`,{"k-card--hoverable":e.hoverable}]])},[e.title||e.subtitle||n.$slots.header||n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,jt,[(0,t.createElementVNode)(`div`,Mt,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h2`,Nt,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Pt,(0,t.toDisplayString)(e.subtitle),1)):(0,t.createCommentVNode)(``,!0)],!0)]),n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ft,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,It,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Lt,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)],2))}},[[`__scopeId`,`data-v-04bba3c2`]]),O=(e,t=[])=>({parts:(...n)=>{if(Bt(t))return O(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>O(e,[...t,...n]),omit:(...n)=>O(e,t.filter(e=>!n.includes(e))),rename:e=>O(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${zt(e)}"][data-part="${zt(n)}"]`,`& [data-scope="${zt(e)}"][data-part="${zt(n)}"]`].join(`, `),attrs:{"data-scope":zt(e),"data-part":zt(n)}}}),{})}),zt=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),Bt=e=>e.length===0,Vt=O(`checkbox`).parts(`root`,`label`,`control`,`indicator`).build(),Ht=Object.defineProperty,Ut=(e,t,n)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wt=(e,t,n)=>Ut(e,typeof t==`symbol`?t:t+``,n);function Gt(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var Kt=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),qt=(...e)=>t=>e.reduce((e,t)=>t(e),t),Jt=()=>void 0,Yt=e=>typeof e==`object`&&!!e,Xt=2147483647,k=e=>e?``:void 0,Zt=e=>e?`true`:void 0,Qt=/\\/g,$t=/"/g,en=e=>globalThis.CSS?.escape?.(e)??e.replace(Qt,`\\\\`).replace($t,`\\"`),tn=e=>`[data-ownedby~="${en(String(e))}"]`,nn=1,rn=9,an=11,A=e=>Yt(e)&&e.nodeType===nn&&typeof e.nodeName==`string`,on=e=>Yt(e)&&e.nodeType===rn,sn=e=>Yt(e)&&e===e.window,cn=e=>A(e)?e.localName||``:`#document`;function ln(e){return[`html`,`body`,`#document`].includes(cn(e))}var un=e=>Yt(e)&&e.nodeType!==void 0,dn=e=>un(e)&&e.nodeType===an&&`host`in e,fn=e=>A(e)&&e.localName===`input`,pn=e=>!!e?.matches(`a[href]`),mn=e=>A(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function hn(e){return e?yn(e.getRootNode())===e:!1}var gn=/(textarea|select)/;function _n(e){if(e==null||!A(e))return!1;try{return fn(e)&&e.selectionStart!=null||gn.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function j(e,t){if(!e||!t||!A(e)||!un(t))return!1;if(A(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&dn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function M(e){return on(e)?e:sn(e)?e.document:e?.ownerDocument??document}function vn(e){return M(e).documentElement}function N(e){return dn(e)?N(e.host):on(e)?e.defaultView??window:A(e)?e.ownerDocument?.defaultView??window:window}function yn(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function bn(e){if(cn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||dn(e)&&e.host||vn(e);return dn(t)?t.host:t}function xn(e){let t;try{if(t=e.getRootNode({composed:!0}),on(t)||dn(t))return t}catch{}return e.ownerDocument??document}var Sn=new WeakMap;function Cn(e){return Sn.has(e)||Sn.set(e,N(e).getComputedStyle(e)),Sn.get(e)}var wn=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),Tn=e=>wn.has(e),En=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Dn(e,t){let n=new Set,r=xn(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=En(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&Tn(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function On(e,t){let n=xn(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=En(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&wn.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function kn(e){let t=new Set;return On(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function An(e){let t=e.getAttribute(`role`);return!!(t&&wn.has(t))}function jn(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function Mn(e){return jn(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function Nn(e){if(!e.id)return!1;let t=xn(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&An(e))}var Pn=()=>typeof document<`u`;function Fn(){return navigator.userAgentData?.platform??navigator.platform}function In(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var Ln=e=>Pn()&&e.test(Fn()),Rn=e=>Pn()&&e.test(In()),zn=e=>Pn()&&e.test(navigator.vendor),Bn=/^iPhone/i,Vn=/^iPad/i,Hn=/^Mac/i,Un=/apple/i,Wn=/Firefox/i,Gn=/Android/i,Kn=()=>Pn()&&!!navigator.maxTouchPoints,qn=()=>Ln(Bn),Jn=()=>Ln(Vn)||Zn()&&navigator.maxTouchPoints>1,Yn=()=>qn()||Jn(),Xn=()=>Zn()||Yn(),Zn=()=>Ln(Hn),Qn=()=>Xn()&&zn(Un),$n=()=>Rn(Wn),er=()=>Rn(Gn);function tr(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function P(e){return tr(e)?.[0]??e.target}function nr(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=ar(e);return n||r}function rr(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function ir(e){return pr(e).isComposing||e.keyCode===229}function ar(e){return Zn()?e.metaKey:e.ctrlKey}function or(e){return e.pointerType===``&&e.isTrusted?!0:er()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var sr=e=>e.button===0,cr=e=>e.button===2||Zn()&&e.ctrlKey&&e.button===0,lr=e=>`touches`in e&&e.touches.length>0,ur={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},dr={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function fr(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=ur[i]??i,n===`rtl`&&r===`horizontal`&&i in dr&&(i=dr[i]),i}function pr(e){return e.nativeEvent??e}function mr(e,t=`client`){let n=lr(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var F=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function hr(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=N(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function gr(e,t){e&&(hr(e,{type:`HTMLInputElement`,property:`checked`}).set?.call(e,t),t?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}function _r(e,t){let{checked:n,bubbles:r=!0}=t;if(!e)return;let i=N(e);if(!(e instanceof i.HTMLInputElement))return;gr(e,n);let a=new i.Event(`click`,{bubbles:r});e.dispatchEvent(wr(a))}function vr(e){return e.matches(`textarea, input, select, button`)}function yr(e,t){if(!e)return;let n=vr(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function br(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(N(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function xr(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[yr(e,r),br(e,n)];return()=>i.forEach(e=>e?.())}var Sr=Symbol.for(`zag.changeEvent`);function Cr(e){return Object.prototype.hasOwnProperty.call(e,Sr)}function wr(e){return Cr(e)||Object.defineProperty(e,Sr,{value:!0}),e}var Tr=e=>A(e)&&e.tagName===`IFRAME`,Er=/^(audio|video|details)$/;function Dr(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var Or=e=>!Number.isNaN(Dr(e)),kr=e=>Dr(e)<0;function Ar(e){return fn(e)&&e.type===`radio`}function jr(e){if(!Ar(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&I(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function Mr(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Nr(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=Mr(e,t);if(c){let t=Array.from(c.querySelectorAll(Pr)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var Pr=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,Fr=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Pr));(n==1||n==`if-empty`&&i.length===0)&&A(e)&&I(e)&&i.unshift(e);let a=[];for(let e of i)if(I(e)){if(Tr(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Fr(t,{getShadowRoot:r}));continue}a.push(e)}return r?Nr(a,r,I):a};function I(e){return!A(e)||e.closest(`[inert]`)?!1:e.matches(Pr)&&mn(e)}function Ir(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Pr));n&&Lr(e)&&i.unshift(e);let a=[];for(let e of i)if(Lr(e)){if(Tr(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Ir(t,{getShadowRoot:r}));continue}a.push(e)}if(r){let e=Nr(a,r,Lr);return!e.length&&n?i:e}return!a.length&&n?i:a}function Lr(e){return A(e)&&e.tabIndex>0?!0:!I(e)||kr(e)?!1:jr(e)}function Rr(e,t={}){let n=Ir(e,t);return[n[0]||null,n[n.length-1]||null]}function zr(e){return e.tabIndex<0&&(Er.test(e.localName)||_n(e))&&!Or(e)?0:e.tabIndex}function Br(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=typeof n==`function`?n():n;return a||=t?.querySelector(`[data-autofocus],[autofocus]`),a||=Ir(t).filter(e=>!r||r(e)).find(e=>!e.hasAttribute(`data-no-autofocus`)),a||t||void 0}function Vr(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=Rr(t);return!(hn(n)&&e.shiftKey||hn(r)&&!e.shiftKey||!n&&!r)}var Hr=class e{constructor(){Wt(this,`id`,null),Wt(this,`fn_cleanup`),Wt(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function L(e){let t=Hr.create();return t.request(e),t.cleanup}function Ur(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function Wr(e,t,n){let r=L(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}function Gr(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function Kr(e,t){let{defer:n}=t,r=n?L:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Gr(n,t))})),()=>{i.forEach(e=>e?.())}}function qr(e){let t=()=>{let t=N(e);e.dispatchEvent(new t.MouseEvent(`click`))};$n()?Wr(e,`keyup`,t):queueMicrotask(t)}function Jr(e){let t=bn(e);return ln(t)?M(t).body:A(t)&&Qr(t)?t:Jr(t)}function Yr(e,t=[]){let n=Jr(e),r=n===e.ownerDocument.body,i=N(n);return r?t.concat(i,i.visualViewport||[],Qr(n)?n:[]):t.concat(n,Yr(n,[]))}var Xr=/auto|scroll|overlay|hidden|clip/,Zr=new Set([`inline`,`contents`]);function Qr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=N(e).getComputedStyle(e);return Xr.test(t+r+n)&&!Zr.has(i)}function $r(e){let{pointerNode:t,keyboardNode:n=t,onPress:r,onPressStart:i,onPressEnd:a,isValidKey:o=e=>e.key===`Enter`}=e;if(!t)return Jt;let s=N(t),c=Jt,l=Jt,u=Jt,d=e=>({point:mr(e),event:e});function f(e){i?.(d(e))}function p(e){a?.(d(e))}c=qt(F(t,`pointerdown`,e=>{l(),l=qt(F(s,`pointerup`,e=>{let n=P(e);j(t,n)?r?.(d(e)):a?.(d(e))},{passive:!r,once:!0}),F(s,`pointercancel`,p,{passive:!a,once:!0})),hn(n)&&e.pointerType===`mouse`&&e.preventDefault(),f(e)},{passive:!i}),F(n,`focus`,m));function m(){u=qt(F(n,`keydown`,e=>{o(e)&&(l(),l=F(n,`keyup`,e=>{if(!o(e))return;let t=new s.PointerEvent(`pointerup`),n=d(t);r?.(n),a?.(n)}),f(new s.PointerEvent(`pointerdown`)))}),F(n,`blur`,()=>{p(new s.PointerEvent(`pointercancel`))}))}return()=>{c(),l(),u()}}function ei(e){return e==null?null:typeof e==`function`?e():e}function ti(e,t,n){if(!t)return null;let r=Ir(e.ownerDocument.body,{getShadowRoot:n}),i=r.indexOf(t);if(i===-1)return null;for(let t=i+1;t<r.length;t++){let n=r[t];if(!j(e,n))return n}return null}function ni(e,t={}){let{triggerElement:n,onFocus:r,onFocusEnter:i,getShadowRoot:a}=t,o=(ei(e)??ei(n))?.ownerDocument||document;function s(t){if(t.key!==`Tab`)return;let o=ei(e),s=ei(n);if(!o)return;let[c,l]=Rr(o,{includeContainer:!0,getShadowRoot:a}),u=!c&&!l,d=null;t.shiftKey&&(hn(c)||u)?d=s:!t.shiftKey&&hn(s)?(i?.(),d=c):!t.shiftKey&&(hn(l)||u)?d=ti(o,s,a):t.shiftKey&&hn(ti(o,s,a))&&(i?.(),d=l),d&&(t.preventDefault(),typeof r==`function`?r(d):d.focus())}return F(o,`keydown`,s,!0)}function ri(e,t){let{defer:n,...r}=t,i=n?L:e=>e(),a=[];return a.push(i(()=>{a.push(ni(e,r))})),()=>{a.forEach(e=>e?.())}}function ii(e,t){return Array.from(e?.querySelectorAll(t)??[])}function ai(e,t){return e?.querySelector(t)??null}var oi=e=>e.id;function si(e,t,n=oi){return e.find(e=>n(e)===t)}function ci(e,t,n=oi){let r=si(e,t,n);return r?e.indexOf(r):-1}function li(e,t,n=!0){let r=ci(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function ui(e,t,n=!0){let r=ci(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}function di(e){let t=new WeakMap,n,r=new WeakMap,i=e=>n||(n=new e.ResizeObserver(e=>{for(let n of e){r.set(n.target,n);let e=t.get(n.target);if(e)for(let t of e)t(n)}}),n);return{observe:(n,r)=>{let a=t.get(n)||new Set;a.add(r),t.set(n,a);let o=N(n);return i(o).observe(n,e),()=>{let e=t.get(n);e&&(e.delete(r),e.size===0&&(t.delete(n),i(o).unobserve(n)))}},unobserve:e=>{t.delete(e),n?.unobserve(e)}}}var fi=di({box:`border-box`});function pi(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function mi(e,t){let{rootEl:n,...r}=t||{};e&&n&&Qr(n)&&pi(n)&&e.scrollIntoView(r)}var hi=e=>e.split(``).map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace(`/`,`\\`):``}).join(``).trim(),gi=e=>hi(e.dataset?.valuetext??e.textContent??``),_i=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function vi(e,t,n,r=oi){let i=n?ci(e,n,r):-1,a=n?Kt(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>_i(gi(e),t))}function yi(e,t){if(!e)return Jt;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return xi(n,t)?Jt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function bi(e,t,n){if(!e)return Jt;let r=e.style.getPropertyValue(t);return r===n?Jt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function xi(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Si(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=vi(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var Ci=Object.assign(Si,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:wi});function wi(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Ti={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function Ei(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function Di(e,t){let{timeout:n,rootNode:r}=t,i=N(r),a=M(r),o=new i.AbortController;return Ei(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function Oi(e,t,n={}){let{defer:r,onMissing:i}=n,a=()=>typeof e==`function`?e():e,o=[],s=e=>{if(!e)return i?.();o.push(t(e))},c=a();if(!r||c)s(c);else{let e=!1;o.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=a();if(t){s(t);return}o.push(L(()=>{e||s(a())}))})}return()=>{o.forEach(e=>e?.())}}function ki(e){return!(e.metaKey||!Zn()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var Ai=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),ji=[`a[href]`,`audio[controls]`,`button`,`details`,`embed`,`iframe`,`img[controls]`,`img[usemap]`,`input`,`select`,`textarea`,`video[controls]`].join(`,`);function Mi(e,t,n){let r=n?P(n):null,i=M(r),a=N(r),o=yn(i);return e=e||o instanceof a.HTMLInputElement&&!Ai.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(Bi,n.key))}var Ni=null,Pi=new Set,Fi=new Map,Ii=!1,Li=null,Ri=!1,zi=null,Bi={Tab:!0,Escape:!0};function Vi(e,t){for(let n of Pi)n(e,t)}function Hi(e){Li=null,Ii=!0,ki(e)&&(Ni=`keyboard`,Vi(`keyboard`,e))}function R(e){(e.type!==`pointermove`&&e.type!==`mousemove`||zi?.x!==e.clientX||zi?.y!==e.clientY)&&(zi={x:e.clientX,y:e.clientY},Ni=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(Li=null,Ii=!0,Vi(`pointer`,e)))}function Ui(e){if(or(e)){Li=null,Ii=!0,Ni=`virtual`;return}Li=null;let t=P(e),n=t?.closest(`label`),r=n?.control;if(!n||!r||r.matches(`:disabled`))return;let i=t?.closest(ji);i&&n.contains(i)&&i!==r||r!==yn(n.ownerDocument)&&(Li=r)}function Wi(e){let t=P(e),n=t===Li;t!==N(t)&&t!==M(t)&&e.isTrusted&&(!Ii&&!n&&!Ri&&(Ni=`virtual`,Vi(`virtual`,e)),Ii=!1,Li=null,Ri=!1)}function Gi(){Ii=!1,Li=null,Ri=!0}function Ki(e){if(typeof window>`u`||Fi.get(N(e)))return;let t=N(e),n=M(e),r=t.HTMLElement.prototype.focus;function i(){Ii=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,Hi,!0),n.addEventListener(`keyup`,Hi,!0),n.addEventListener(`click`,Ui,!0),t.addEventListener(`focus`,Wi,!0),t.addEventListener(`blur`,Gi,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,R,!0),n.addEventListener(`mousemove`,R,!0),n.addEventListener(`mouseup`,R,!0)):(n.addEventListener(`pointerdown`,R,!0),n.addEventListener(`pointermove`,R,!0),n.addEventListener(`pointerup`,R,!0)),t.addEventListener(`beforeunload`,()=>{qi(e)},{once:!0}),Fi.set(t,{focus:r})}var qi=(e,t)=>{let n=N(e),r=M(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=Fi.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,Hi,!0),r.removeEventListener(`keyup`,Hi,!0),r.removeEventListener(`click`,Ui,!0),n.removeEventListener(`focus`,Wi,!0),n.removeEventListener(`blur`,Gi,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,R,!0),r.removeEventListener(`mousemove`,R,!0),r.removeEventListener(`mouseup`,R,!0)):(r.removeEventListener(`pointerdown`,R,!0),r.removeEventListener(`pointermove`,R,!0),r.removeEventListener(`pointerup`,R,!0)),Fi.delete(n)}};function Ji(){return Ni}function Yi(e){Ni=e,Vi(e,null)}function Xi(){return Ni===`keyboard`||Ni===`virtual`}function Zi(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;Ki(i),r?.({isFocusVisible:n||Xi(),modality:Ni});let a=(e,n)=>{Mi(!!t,e,n)&&r?.({isFocusVisible:Xi(),modality:e})};return Pi.add(a),()=>{Pi.delete(a)}}var Qi=e=>e.ids?.root??`checkbox:${e.id}`,$i=e=>e.ids?.label??`checkbox:${e.id}:label`,ea=e=>e.ids?.control??`checkbox:${e.id}:control`,ta=e=>e.ids?.hiddenInput??`checkbox:${e.id}:input`,na=e=>e.getById(Qi(e)),ra=e=>e.getById(ta(e));function ia(e,t){let{send:n,context:r,prop:i,computed:a,scope:o}=e,s=!!i(`disabled`),c=!!i(`readOnly`),l=!!i(`required`),u=!!i(`invalid`),d=!s&&r.get(`focused`),f=!s&&r.get(`focusVisible`),p=a(`checked`),m=a(`indeterminate`),h=r.get(`checked`),g={"data-active":k(r.get(`active`)),"data-focus":k(d),"data-focus-visible":k(f),"data-readonly":k(c),"data-hover":k(r.get(`hovered`)),"data-disabled":k(s),"data-state":m?`indeterminate`:p?`checked`:`unchecked`,"data-invalid":k(u),"data-required":k(l)};return{checked:p,disabled:s,indeterminate:m,focused:d,checkedState:h,setChecked(e){n({type:`CHECKED.SET`,checked:e,isTrusted:!1})},toggleChecked(){n({type:`CHECKED.TOGGLE`,checked:p,isTrusted:!1})},getRootProps(){return t.label({...Vt.root.attrs,...g,dir:i(`dir`),id:Qi(o),htmlFor:ta(o),onPointerMove(){s||n({type:`CONTEXT.SET`,context:{hovered:!0}})},onPointerLeave(){s||n({type:`CONTEXT.SET`,context:{hovered:!1}})},onClick(e){P(e)===ra(o)&&e.stopPropagation()}})},getLabelProps(){return t.element({...Vt.label.attrs,...g,dir:i(`dir`),id:$i(o)})},getControlProps(){return t.element({...Vt.control.attrs,...g,dir:i(`dir`),id:ea(o),"aria-hidden":!0})},getIndicatorProps(){return t.element({...Vt.indicator.attrs,...g,dir:i(`dir`),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:ta(o),type:`checkbox`,required:i(`required`),defaultChecked:p,disabled:s,"aria-labelledby":$i(o),"aria-invalid":u,name:i(`name`),form:i(`form`),value:i(`value`),style:Ti,onFocus(){let e=Xi();n({type:`CONTEXT.SET`,context:{focused:!0,focusVisible:e}})},onBlur(){n({type:`CONTEXT.SET`,context:{focused:!1,focusVisible:!1}})},onClick(e){if(c){e.preventDefault();return}let t=e.currentTarget.checked;n({type:`CHECKED.SET`,checked:t,isTrusted:!0})}})}}}var aa=Object.defineProperty,oa=e=>{throw TypeError(e)},sa=(e,t,n)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ca=(e,t,n)=>sa(e,typeof t==`symbol`?t:t+``,n),la=(e,t,n)=>t.has(e)||oa(`Cannot `+n),ua=(e,t,n)=>(la(e,t,`read from private field`),n?n.call(e):t.get(e)),da=(e,t,n)=>t.has(e)?oa(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n);function fa(e){return e==null?[]:Array.isArray(e)?e:[e]}var pa=e=>Array.from(Array(e).keys()),ma=e=>e[0],ha=e=>e[e.length-1],ga=(e,t)=>e.indexOf(t)!==-1,_a=(e,...t)=>e.concat(t),va=(e,...t)=>e.filter(e=>!t.includes(e)),ya=(e,t)=>ga(e,t)?va(e,t):_a(e,t);function ba(e){return e.reduce((e,t)=>Array.isArray(t)?e.concat(ba(t)):e.concat(t),[])}var xa=e=>e?.constructor.name===`Array`,Sa=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Ca(e[n],t[n]))return!1;return!0},Ca=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(xa(e)&&xa(t))return Sa(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!Ca(e[r],t[r]))return!1}return!0},wa=e=>Array.isArray(e),Ta=e=>e===!0||e===!1,Ea=e=>typeof e==`object`&&!!e,Da=e=>Ea(e)&&!wa(e),Oa=e=>typeof e==`number`&&!Number.isNaN(e),ka=e=>typeof e==`string`,Aa=e=>typeof e==`function`,ja=e=>e==null,Ma=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Na=e=>Object.prototype.toString.call(e),Pa=Function.prototype.toString,Fa=Pa.call(Object),Ia=e=>{if(!Ea(e)||Na(e)!=`[object Object]`||za(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Ma(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Pa.call(n)==Fa},La=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,Ra=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,za=e=>La(e)||Ra(e),Ba=(e,...t)=>(typeof e==`function`?e(...t):e)??void 0,Va=()=>{},Ha=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},Ua=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Wa(e,t,...n){if(e in t){let r=t[e];return Aa(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(r,Wa),r}var Ga=e=>String.fromCharCode(e+(e>25?39:97));function Ka(e){let t=``,n;for(n=Math.abs(e);n>52;n=n/52|0)t=Ga(n%52)+t;return Ga(n%52)+t}function qa(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}var Ja=e=>Ka(qa(5381,e)>>>0),{floor:Ya,abs:Xa,round:Za,min:Qa,max:$a,pow:eo,sign:to}=Math,no=e=>Number.isNaN(e),ro=e=>no(e)?0:e,io=(e,t,n)=>{let r=ro(e);return(t==null||r>=t)&&(n==null||r<=n)},ao=(e,t,n)=>(ro(e)-t)/(n-t),oo=e=>typeof e==`number`?`${e}px`:e;function so(e){if(!Ia(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=so(t))}return n}function co(e,t){if(!t)return e;let n={...e},r=t;for(let e in r){let t=r[e];t!==void 0&&(n[e]=t)}return n}function lo(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}var uo=()=>performance.now(),fo,po=class{constructor(e){ca(this,`onTick`,e),ca(this,`frameId`,null),ca(this,`pausedAtMs`,null),ca(this,`context`),ca(this,`cancelFrame`,()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),ca(this,`setStartMs`,e=>{this.context.startMs=e}),ca(this,`start`,()=>{if(this.frameId!==null)return;let e=uo();this.pausedAtMs===null?this.context.startMs=e:(this.context.startMs+=e-this.pausedAtMs,this.pausedAtMs=null),this.frameId=requestAnimationFrame(ua(this,fo))}),ca(this,`pause`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=uo())}),ca(this,`stop`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),da(this,fo,e=>{if(this.context.now=e,this.context.deltaMs=e-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(ua(this,fo))}),this.context={now:0,startMs:uo(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs===null?uo()-this.context.startMs:this.pausedAtMs-this.context.startMs}};fo=new WeakMap;function mo(e,t){let n=new po(({deltaMs:n})=>{if(n>=t)return e(),!1});return n.start(),()=>n.stop()}function ho(...e){let t=e.length===1?e[0]:e[1];(e.length!==2||e[0])&&process.env.NODE_ENV!==`production`&&console.warn(t)}function go(...e){let t=e.length===1?e[0]:e[1];if((e.length!==2||e[0])&&process.env.NODE_ENV!==`production`)throw Error(t)}function _o(e,t){if(e==null)throw Error(t())}function vo(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:``}] missing required props: ${r.join(`, `)}`)}function yo(e,t,n){let r=[],i;return a=>{let o=e(a);return o.length!==r.length||o.some((e,t)=>!Ca(r[t],e))?(r=o,i=t(o,a),n?.onChange?.(i),i):i}}var bo=`.`,xo=`#`,So=new WeakMap,Co=new WeakMap;function wo(e){return e.join(bo)}function To(e){return e.includes(bo)}function Eo(e){return e.startsWith(xo)}function Do(e){return e.startsWith(bo)}function Oo(e){return Eo(e)?e.slice(xo.length):e}function ko(e,t){return e?`${e}${bo}${t}`:t}function Ao(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&go(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){_o(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||go(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o)){if(!n)continue;let i=ko(e,t);r(i,n)}}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function jo(e){let t=So.get(e);if(t)return t;let{index:n,idIndex:r}=Ao(e);return So.set(e,n),Co.set(e,r),n}function Mo(e,t){return jo(e),Co.get(e)?.get(t)}function No(e){return e?String(e).split(bo).filter(Boolean):[]}function Po(e,t){if(!t)return[];let n=jo(e),r=No(t),i=[],a=[];for(let e of r){a.push(e);let t=wo(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function Fo(e,t){let n=jo(e),r=No(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=wo(i);if(!n.has(r))return t}let a=wo(i),o=n.get(a);for(;o?.initial;){let e=`${a}${bo}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function Io(e,t){return jo(e).has(t)}function Lo(e,t,n){let r=String(t);if(Eo(r)){let t=Oo(r),n=Mo(e,t);return _o(n,()=>`[zag-js] Unknown state id: "${t}"`),Fo(e,n)}if(Do(r)&&n)return Fo(e,ko(n,r.slice(1)));if(!To(r)&&n){let t=No(n);for(let n=t.length-1;n>=1;n--){let i=ko(t.slice(0,n).join(bo),r);if(Io(e,i))return Fo(e,i)}if(Io(e,r))return Fo(e,r)}return Fo(e,r)}function Ro(e,t,n){let r=Po(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function zo(e,t,n,r){let i=t?Po(e,t):[],a=Po(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i[i.length-1]?.path===a[a.length-1]?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function Bo(e,t){return e?e===t||e.startsWith(`${t}${bo}`):!1}function Vo(e,t,n){return Po(e,t).some(e=>e.state.tags?.includes(n))}function Ho(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function z(e){return jo(e),e}function Uo(){return{guards:Ho(),createMachine:e=>z(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var Wo=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(Wo||{}),Go=`__init__`;function Ko(e){let t=()=>e.getRootNode?.()??document,n=()=>M(t()),r=()=>n().defaultView??window,i=()=>yn(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:hn,getById:a}}var{not:qo}=Ho(),Jo=z({props({props:e}){return{value:`on`,...e,defaultChecked:e.defaultChecked??!1}},initialState(){return`ready`},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e(`defaultChecked`),value:e(`checked`),onChange(t){e(`onCheckedChange`)?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:r}){e([()=>n(`disabled`)],()=>{r([`removeFocusIfNeeded`])}),e([()=>t.get(`checked`)],()=>{r([`syncInputElement`])})},effects:[`trackFormControlState`,`trackPressEvent`,`trackFocusVisible`],on:{"CHECKED.TOGGLE":[{guard:qo(`isTrusted`),actions:[`toggleChecked`,`dispatchChangeEvent`]},{actions:[`toggleChecked`]}],"CHECKED.SET":[{guard:qo(`isTrusted`),actions:[`setChecked`,`dispatchChangeEvent`]},{actions:[`setChecked`]}],"CONTEXT.SET":{actions:[`setContext`]}},computed:{indeterminate:({context:e})=>Yo(e.get(`checked`)),checked:({context:e})=>Xo(e.get(`checked`)),disabled:({context:e,prop:t})=>!!t(`disabled`)||e.get(`fieldsetDisabled`)},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t(`disabled`))return $r({pointerNode:na(n),keyboardNode:ra(n),isValidKey:e=>e.key===` `,onPress:()=>e.set(`active`,!1),onPressStart:()=>e.set(`active`,!0),onPressEnd:()=>e.set(`active`,!1)})},trackFocusVisible({computed:e,scope:t}){if(!e(`disabled`))return Zi({root:t.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return xr(ra(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`checked`,e.initial(`checked`))}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){let r=ra(n);r&&(gr(r,t(`checked`)),r.indeterminate=Yo(e.get(`checked`)))},removeFocusIfNeeded({context:e,prop:t}){t(`disabled`)&&e.get(`focused`)&&(e.set(`focused`,!1),e.set(`focusVisible`,!1))},setChecked({context:e,event:t}){e.set(`checked`,t.checked)},toggleChecked({context:e,computed:t}){let n=Yo(t(`checked`))?!0:!t(`checked`);e.set(`checked`,n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{_r(ra(t),{checked:e(`checked`)})})}}}});function Yo(e){return e===`indeterminate`}function Xo(e){return!Yo(e)&&!!e}function Zo(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}function Qo(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var $o={htmlFor:`for`,className:`class`,onDoubleClick:`onDblclick`,onChange:`onInput`,onFocus:`onFocusin`,onBlur:`onFocusout`,defaultValue:`value`,defaultChecked:`checked`},es=`viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit`.split(`,`);function ts(e){return e in $o?$o[e]:e.startsWith(`on`)?`on${Qo(e.substr(2))}`:es.includes(e)?e:e.toLowerCase()}var B=Zo(e=>{let t={};for(let n in e){let r=e[n];n===`children`?typeof r==`string`?t.innerHTML=r:process.env.NODE_ENV!==`production`&&r!=null&&console.warn("[Vue Normalize Prop] : avoid passing non-primitive value as `children`"):t[ts(n)]=e[n]}return t});function ns(e){let n=e().value??e().defaultValue,r=e().isEqual??Object.is,i=(0,t.shallowRef)(n),a=(0,t.computed)(()=>e().value!==void 0);return{initial:n,ref:(0,t.shallowRef)(a.value?e().value:i.value),get(){return a.value?e().value:i.value},set(t){let n=a.value?e().value:i.value,o=Aa(t)?t(n):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:o,prev:n}),a.value||(i.value=o),r(o,n)||e().onChange?.(o,n)},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}ns.cleanup=e=>{(0,t.onUnmounted)(()=>e())},ns.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function rs(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}var is=(e,n)=>{(0,t.watch)(()=>[...e.map(e=>e())],(e,r)=>{let i=!1;for(let n=0;n<e.length;n++)if(!Ca(r[n],(0,t.toValue)(e[n]))){i=!0;break}i&&n()})};function V(e,n={}){let r=(0,t.computed)(()=>{let{id:e,ids:r,getRootNode:i}=(0,t.toValue)(n);return Ko({id:e,ids:r,getRootNode:i})}),i=(...t)=>{e.debug&&console.log(...t)},a=as((0,t.computed)(()=>e.props?.({props:so((0,t.toValue)(n)),get scope(){return r.value}})??(0,t.toValue)(n))),o=e.context?.({prop:a,bindable:ns,get scope(){return r.value},flush:os,getContext(){return s},getComputed(){return b},getRefs(){return m},getEvent(){return f()}}),s={get(e){return o[e]?.get()},set(e,t){o[e]?.set(t)},initial(e){return o[e]?.initial},hash(e){let t=o[e]?.get();return o[e]?.hash(t)}},c=new Map,l=null,u={current:null},d={current:{type:``}},f=()=>({...d.current,current(){return d.current},previous(){return u.current}}),p=()=>({...x,matches(...e){let t=x.get();return e.some(e=>Bo(t,e))},hasTag(t){return Vo(e,x.get(),t)}}),m=rs(e.refs?.({prop:a,context:s})??{}),h=()=>({state:p(),context:s,event:f(),prop:a,send:w,action:g,guard:_,track:is,refs:m,computed:b,flush:os,get scope(){return r.value},choose:y}),g=t=>{let n=Aa(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||ho(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(h())},_=t=>{if(Aa(t))return t(h());let n=e.implementations?.guards?.[t];return n||ho(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(h())},v=t=>{let n=Aa(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||ho(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(h());t&&i.push(t)}return()=>i.forEach(e=>e?.())},y=e=>fa(e).find(e=>{let t=!e.guard;return ka(e.guard)?t=!!_(e.guard):Aa(e.guard)&&(t=e.guard(h())),t}),b=t=>{_o(e.computed,()=>`[zag-js] No computed object found on machine`);let n=e.computed[t];return n({context:s,event:f(),prop:a,refs:m,get scope(){return r.value},computed:b})},x=ns(()=>({defaultValue:Lo(e,e.initialState({prop:a})),onChange(t,n){let{exiting:r,entering:i}=zo(e,n,t,l?.reenter);if(r.forEach(e=>{c.get(e.path)?.(),c.delete(e.path)}),r.forEach(e=>{g(e.state?.exit)}),g(l?.actions),i.forEach(e=>{let t=v(e.state?.effects);if(t){let n=c.get(e.path);c.set(e.path,n?Ha(n,t):t)}}),n===`__init__`){g(e.entry);let t=v(e.effects);if(t){let e=c.get(Go);c.set(Go,e?Ha(e,t):t)}}i.forEach(e=>{g(e.state?.entry)})}})),S=Wo.NotStarted,C=[];(0,t.onMounted)(()=>{let e=S===Wo.Started;S=Wo.Started,i(e?`rehydrating...`:`initializing...`),x.invoke(x.initial,Go);let t=C;C=[];for(let e of t)w(e)}),(0,t.onBeforeUnmount)(()=>{S=Wo.Stopped,C=[],i(`unmounting...`);let t=c.values();for(let e of t)e?.();c=new Map,g(e.exit)});let w=t=>{if(S!==Wo.Started){C.push(t);return}u.current=d.current,d.current=t;let n=x.get(),{transitions:r,source:a}=Ro(e,n,t.type),o=y(r);if(!o)return;l=o;let s=Lo(e,o.target??n,a);i(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?x.invoke(n,n):g(o.actions):x.set(s)};return e.watch?.(h()),{state:p(),send:w,context:s,prop:a,get scope(){return r.value},refs:m,computed:b,event:f(),getStatus:()=>S}}function as(e){return function(t){return e.value[t]}}var os=e=>{(0,t.nextTick)().then(()=>{e()})},ss={key:0,class:`k-check__body`},cs={key:0,class:`k-check__hint`},ls=E({__name:`KCheckbox`,props:{modelValue:{type:[Boolean,Array],default:!1},value:{type:[String,Number,Boolean],default:void 0},label:{type:String,default:``},hint:{type:String,default:``},name:{type:String,default:``},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>Array.isArray(r.modelValue)),o=(0,t.computed)(()=>a.value?r.modelValue.includes(r.value):r.modelValue),s=V(Jo,{id:(0,t.useId)(),get checked(){return r.indeterminate?`indeterminate`:o.value},get disabled(){return r.disabled},get required(){return r.required},get name(){return r.name||void 0},get value(){return r.value==null?void 0:String(r.value)},onCheckedChange({checked:e}){let t=e===!0;if(!a.value){i(`update:modelValue`,t);return}i(`update:modelValue`,t?[...r.modelValue,r.value]:r.modelValue.filter(e=>e!==r.value))}}),c=(0,t.computed)(()=>ia(s,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:`k-check`},c.value.getRootProps()),[(0,t.createElementVNode)(`input`,(0,t.normalizeProps)((0,t.guardReactiveProps)(c.value.getHiddenInputProps())),null,16),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-check__control`},c.value.getControlProps()),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-check__indicator`},c.value.getIndicatorProps()),[(0,t.createVNode)(D,{name:c.value.indeterminate?`remove`:`check`,size:12,"stroke-width":3},null,8,[`name`])],16)],16),e.label||e.hint||n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ss,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-check__label`},c.value.getLabelProps()),[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],16),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,cs,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}},[[`__scopeId`,`data-v-f6be6278`]]),us=[`aria-pressed`,`aria-expanded`,`disabled`],ds={key:0,class:`k-chip__mark`},fs={class:`k-chip__label`},ps=E({__name:`KChip`,props:{pressed:{type:Boolean,default:void 0},tone:{type:String,default:`primary`},soft:{type:Boolean,default:!1},dashed:{type:Boolean,default:!1},expanded:{type:Boolean,default:void 0},marked:{type:Boolean,default:!1},size:{type:String,default:`md`},icon:{type:String,default:``},disabled:{type:Boolean,default:!1}},emits:[`update:pressed`,`click`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>r.pressed!==void 0),o=(0,t.computed)(()=>r.expanded!==void 0);function s(e){a.value&&i(`update:pressed`,!r.pressed),i(`click`,e)}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:`button`,class:(0,t.normalizeClass)([`k-chip`,[`k-chip--${e.tone}`,`k-chip--${e.size}`,{"k-chip--on":e.pressed,"k-chip--soft":e.soft,"k-chip--dashed":e.dashed}]]),"aria-pressed":a.value?String(!!e.pressed):void 0,"aria-expanded":o.value?String(!!e.expanded):void 0,disabled:e.disabled,onClick:s},[e.marked?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ds)):(0,t.createCommentVNode)(``,!0),e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:1,name:e.icon,size:e.size===`sm`?13:15},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,fs,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),o.value?((0,t.openBlock)(),(0,t.createBlock)(D,{key:2,name:e.expanded?`chevron-up`:`chevron-down`,size:e.size===`sm`?13:14},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0)],10,us))}},[[`__scopeId`,`data-v-f79a2356`]]),H=O(`combobox`).parts(`root`,`clearTrigger`,`content`,`control`,`input`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`label`,`list`,`positioner`,`trigger`).build(),ms=Object.defineProperty,hs=(e,t,n)=>t in e?ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U=(e,t,n)=>hs(e,typeof t==`symbol`?t:t+``,n),gs={itemToValue(e){return typeof e==`string`?e:Da(e)&&Ma(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:Da(e)&&Ma(e,`label`)?e.label:gs.itemToValue(e)},isItemDisabled(e){return Da(e)&&Ma(e,`disabled`)?!!e.disabled:!1}},_s=class e{constructor(t){U(this,`options`,t),U(this,`items`),U(this,`indexMap`,null),U(this,`copy`,t=>new e({...this.options,items:t??[...this.items]})),U(this,`isEqual`,e=>Ca(this.items,e.items)),U(this,`setItems`,e=>this.copy(e)),U(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),U(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),U(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),U(this,`at`,e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0,n=this.group();for(let[,r]of n)for(let n of r){if(t===e)return n;t++}return null}),U(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),U(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),U(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??gs.itemToValue(e)),U(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??gs.isItemDisabled(e)),U(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??gs.itemToString(e)),U(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),U(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),U(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),U(this,`has`,e=>this.indexOf(e)!==-1),U(this,`hasItem`,e=>e!=null&&this.has(this.getItemValue(e))),U(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),U(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),U(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),U(this,`indexOf`,e=>{if(e==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0,t=this.group();for(let[,n]of t)for(let t of n){let n=this.getItemValue(t);n!=null&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1}),U(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1;for(let i=0;i<this.items.length;i++){let a=this.items[(n+i+1)%this.items.length];if(!(r&&this.getItemValue(a)===t)&&!this.getItemDisabled(a)&&vs(this.stringifyItem(a),e))return a}}),U(this,`search`,(e,t)=>{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),U(this,`update`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),U(this,`upsert`,(e,t,n=`append`)=>{let r=this.indexOf(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),U(this,`insert`,(e,...t)=>this.copy(ys(this.items,e,...t))),U(this,`insertBefore`,(e,...t)=>{let n=this.indexOf(e);if(n===-1){if(this.items.length===0)n=0;else return this}return this.copy(ys(this.items,n,...t))}),U(this,`insertAfter`,(e,...t)=>{let n=this.indexOf(e);if(n===-1){if(this.items.length===0)n=0;else return this}return this.copy(ys(this.items,n+1,...t))}),U(this,`prepend`,(...e)=>this.copy(ys(this.items,0,...e))),U(this,`append`,(...e)=>this.copy(ys(this.items,this.items.length,...e))),U(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),U(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n!=null&&!t.includes(n)}))}),U(this,`move`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy(bs(this.items,[n],t))}),U(this,`moveBefore`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(bs(this.items,r,n))}),U(this,`moveAfter`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(bs(this.items,r,n+1))}),U(this,`reorder`,(e,t)=>this.copy(bs(this.items,[e],t))),U(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:+(n>r)}),U(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),U(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),U(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),U(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},vs=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function ys(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function bs(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>e<n).length),[...e.slice(0,n),...r,...e.slice(n)]}function xs({values:e,collection:t,selectedItemMap:n}){let r=[];for(let i of e){let e=t.find(i)??n.get(i);e!=null&&r.push(e)}return r}function Ss({selectedItemMap:e,values:t,selectedItems:n,collection:r}){let i=new Map(e);for(let e of n){let t=r.getItemValue(e);t!=null&&i.set(t,e)}let a=new Set(t);for(let e of i.keys())a.has(e)||i.delete(e);return i}function Cs({values:e,collection:t,selectedItemMap:n}){let r=xs({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:Ss({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function ws({selectedItems:e,collection:t}){return Ss({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}var Ts=e=>new _s(e);Ts.empty=()=>new _s({items:[]});var Es=[`top`,`right`,`bottom`,`left`],Ds=Math.min,Os=Math.max,ks=Math.round,As=Math.floor,js=e=>({x:e,y:e}),Ms={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ns(e,t,n){return Os(e,Ds(t,n))}function Ps(e,t){return typeof e==`function`?e(t):e}function Fs(e){return e.split(`-`)[0]}function Is(e){return e.split(`-`)[1]}function Ls(e){return e===`x`?`y`:`x`}function Rs(e){return e===`y`?`height`:`width`}function W(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function zs(e){return Ls(W(e))}function Bs(e,t,n){n===void 0&&(n=!1);let r=Is(e),i=zs(e),a=Rs(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ys(o)),[o,Ys(o)]}function Vs(e){let t=Ys(e);return[Hs(e),t,Hs(t)]}function Hs(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Us=[`left`,`right`],Ws=[`right`,`left`],Gs=[`top`,`bottom`],Ks=[`bottom`,`top`];function qs(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ws:Us:t?Us:Ws;case`left`:case`right`:return t?Gs:Ks;default:return[]}}function Js(e,t,n,r){let i=Is(e),a=qs(Fs(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Hs)))),a}function Ys(e){let t=Fs(e);return Ms[t]+e.slice(t.length)}function Xs(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Zs(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Xs(e)}function Qs(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function $s(e,t,n){let{reference:r,floating:i}=e,a=W(t),o=zs(t),s=Rs(o),c=Fs(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Is(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ec(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ps(t,e),p=Zs(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Qs(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Qs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var tc=50,nc=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ec},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=$s(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<tc&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=$s(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},rc=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ps(e,t)||{};if(l==null)return{};let d=Zs(u),f={x:n,y:r},p=zs(i),m=Rs(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=Ds(d[_],T),te=Ds(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=Ns(ee,re,ne),ae=!c.arrow&&Is(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),ic=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ps(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Fs(r),_=W(o),v=Fs(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ys(o)]:Vs(o)),x=p!==`none`;!d&&x&&b.push(...Js(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Bs(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===W(t)||T.every(e=>W(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=W(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function ac(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oc(e){return Es.some(t=>e[t]>=0)}var sc=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ps(e,t);switch(i){case`referenceHidden`:{let e=ac(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:oc(e)}}}case`escaped`:{let e=ac(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:oc(e)}}}default:return{}}}}},cc=new Set([`left`,`top`]);async function lc(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Fs(n),s=Is(n),c=W(n)===`y`,l=cc.has(o)?-1:1,u=a&&c?-1:1,d=Ps(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var uc=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await lc(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},dc=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ps(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=W(i),p=Ls(f),m=u[p],h=u[f],g=(e,t)=>Ns(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},fc=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ps(e,t),u={x:n,y:r},d=W(i),f=Ls(d),p=u[f],m=u[d],h=Ps(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=cc.has(Fs(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},pc=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Ps(e,t),c=await i.detectOverflow(t,s),l=Fs(n),u=Is(n),d=W(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ds(p-c[m],g),y=Ds(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Os(c.left,c.right):S=p-2*Os(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function mc(){return typeof window<`u`}function hc(e){return _c(e)?(e.nodeName||``).toLowerCase():`#document`}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gc(e){return((_c(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _c(e){return mc()?e instanceof Node||e instanceof G(e).Node:!1}function K(e){return mc()?e instanceof Element||e instanceof G(e).Element:!1}function vc(e){return mc()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function yc(e){return!mc()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}function bc(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function xc(e){return/^(table|td|th)$/.test(hc(e))}function Sc(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Cc=/transform|translate|scale|rotate|perspective|filter/,wc=/paint|layout|strict|content/,Tc=e=>!!e&&e!==`none`,Ec;function Dc(e){let t=K(e)?q(e):e;return Tc(t.transform)||Tc(t.translate)||Tc(t.scale)||Tc(t.rotate)||Tc(t.perspective)||!kc()&&(Tc(t.backdropFilter)||Tc(t.filter))||Cc.test(t.willChange||``)||wc.test(t.contain||``)}function Oc(e){let t=Mc(e);for(;vc(t)&&!Ac(t);){if(Dc(t))return t;if(Sc(t))return null;t=Mc(t)}return null}function kc(){return Ec??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ec}function Ac(e){return/^(html|body|#document)$/.test(hc(e))}function q(e){return G(e).getComputedStyle(e)}function jc(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mc(e){if(hc(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||yc(e)&&e.host||gc(e);return yc(t)?t.host:t}function Nc(e){let t=Mc(e);return Ac(t)?(e.ownerDocument||e).body:vc(t)&&bc(t)?t:Nc(t)}function Pc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Nc(e),i=r===e.ownerDocument?.body,a=G(r);if(i){let e=Fc(a);return t.concat(a,a.visualViewport||[],bc(r)?r:[],e&&n?Pc(e):[])}return t.concat(r,Pc(r,[],n))}function Fc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ic(e){let t=q(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=vc(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ks(n)!==a||ks(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Lc(e){return K(e)?e:e.contextElement}function Rc(e){let t=Lc(e);if(!vc(t))return js(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ic(t),o=(a?ks(n.width):n.width)/r,s=(a?ks(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var zc=js(0);function Bc(e){let t=G(e);return!kc()||!t.visualViewport?zc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===G(e)}function Hc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Lc(e),o=js(1);t&&(r?K(r)&&(o=Rc(r)):o=Rc(e));let s=Vc(a,n,r)?Bc(a):js(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=G(a),t=K(r)?G(r):r,n=e,i=Fc(n);for(;i&&t!==n;){let e=Rc(i),t=i.getBoundingClientRect(),r=q(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=G(i),i=Fc(n)}}return Qs({width:u,height:d,x:c,y:l})}function Uc(e,t){let n=jc(e).scrollLeft;return t?t.left+n:Hc(gc(e)).left+n}function Wc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Uc(e,n),y:n.top+t.scrollTop}}function Gc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=gc(r),s=t?Sc(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=js(1),u=js(0),d=vc(r);if((d||!a)&&((hc(r)!==`body`||bc(o))&&(c=jc(r)),d)){let e=Hc(r);l=Rc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Wc(o,c):js(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Kc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function qc(e){let t=jc(e),n=e.ownerDocument.body,r=Os(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Os(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Uc(e),o=-t.scrollTop;return q(n).direction===`rtl`&&(a+=Os(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Jc=25;function Yc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=G(e),a=gc(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!kc()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Uc(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Jc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Xc(e,t){let n=Hc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Rc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Zc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Yc(e,n,t);else if(t===`document`)r=qc(gc(e));else if(K(t))r=Xc(t,n);else{let n=Bc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Qs(r)}function Qc(e,t){let n=t.get(e);if(n)return n;let r=Pc(e,[],!1).filter(e=>K(e)&&hc(e)!==`body`),i=null,a=q(e).position===`fixed`,o=a?Mc(e):e;for(;K(o)&&!Ac(o);){let e=q(o),t=Dc(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Mc(o)}return t.set(e,r),r}function $c(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Sc(t)?[]:Qc(t,this._c):[].concat(n),r],o=Zc(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Zc(t,a[e],i);s=Os(n.top,s),c=Ds(n.right,c),l=Ds(n.bottom,l),u=Os(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function el(e){let{width:t,height:n}=Ic(e);return{width:t,height:n}}function tl(e,t,n){let r=vc(t),i=gc(t),a=n===`fixed`,o=Hc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=js(0);if((r||!a)&&((hc(t)!==`body`||bc(i))&&(s=jc(t)),r)){let e=Hc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Uc(i));let l=i&&!r&&!a?Wc(i,s):js(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function nl(e){return q(e).position===`static`}function rl(e,t){if(!vc(e)||q(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return gc(e)===n&&(n=n.ownerDocument.body),n}function il(e,t){let n=G(e);if(Sc(e))return n;if(!vc(e)){let t=Mc(e);for(;t&&!Ac(t);){if(K(t)&&!nl(t))return t;t=Mc(t)}return n}let r=rl(e,t);for(;r&&xc(r)&&nl(r);)r=rl(r,t);return r&&Ac(r)&&nl(r)&&!Dc(r)?n:r||Oc(e)||n}var al=async function(e){let t=this.getOffsetParent||il,n=this.getDimensions,r=await n(e.floating);return{reference:tl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ol(e){return q(e).direction===`rtl`}var sl={convertOffsetParentRelativeRectToViewportRelativeRect:Gc,getDocumentElement:gc,getClippingRect:$c,getOffsetParent:il,getElementRects:al,getClientRects:Kc,getDimensions:el,getScale:Rc,isElement:K,isRTL:ol};function cl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ll(e,t,n){let r=null,i,a=gc(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=As(d),h=As(a.clientWidth-(u+f)),g=As(a.clientHeight-(d+p)),_=As(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Os(0,Ds(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!cl(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=G(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function ul(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Lc(e),u=i||a?[...l?Pc(l):[],...t?Pc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?ll(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Hc(e):null;c&&g();function g(){let t=Hc(e);h&&!cl(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dl=uc,fl=dc,pl=ic,ml=pc,hl=sc,gl=rc,_l=fc,vl=(e,t,n)=>{let r=new Map,i=n??{},a={...sl,...i.platform,_c:r};return nc(e,t,{...i,platform:a})};function yl(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function bl(e){if(!e)return yl();let{x:t,y:n,width:r,height:i}=e;return yl(t,n,r,i)}function xl(e,t){return{contextElement:A(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?bl(r):n.getBoundingClientRect()}}}var Sl=e=>({variable:e,reference:`var(${e})`}),Cl={arrowSize:Sl(`--arrow-size`),arrowSizeHalf:Sl(`--arrow-size-half`),arrowBg:Sl(`--arrow-background`),transformOrigin:Sl(`--transform-origin`),arrowOffset:Sl(`--arrow-offset`)},wl=e=>e===`top`||e===`bottom`?`y`:`x`;function Tl(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=wl(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(Cl.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var El={name:`rects`,fn({rects:e}){return{data:e}}},Dl=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${Cl.arrowOffset.reference})`}),{}}}};function Ol(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function kl(e){return e.split(`-`)[0]}var Al={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,applyStyles:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function jl(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Ml(e,t){return e!=null&&Math.abs(e-t)<.5}function Nl(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function Pl(e,t,n){return gl({element:e||t.createElement(`div`),padding:n.arrowPadding})}function Fl(e,t){if(!ja(t.offset??t.gutter))return dl(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=Ol(n),s=o?void 0:t.shift;return so({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function Il(e){if(e.flip)return pl(()=>{let t=Nl(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function Ll(e){if(e.slide||e.overlap)return fl(()=>{let t=Nl(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_l()}})}function Rl(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return ml(()=>{let a=Nl(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),Ml(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),Ml(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),Ml(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),Ml(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function zl(e){if(e.hideWhenDetached)return hl(()=>({strategy:`referenceHidden`,boundary:Nl(e.boundary)??`clippingAncestors`}))}function Bl(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var Vl=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],Hl=[`top`,`right`,`bottom`,`left`];function Ul(e,t){if(!e)return Va;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function Wl(e){return e==null?null:A(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function Gl(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:xl(e,n.getAnchorRect)},o=Object.assign({},Al,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?Ul(e,Vl):void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?Ul(t,Hl):void 0,s=[Fl(t,o),Il(o),Ll(o),Pl(t,e.ownerDocument,o),Dl(t),Tl({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),Rl(o),zl(o),El]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=Va,S=Bl(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();t&&n&&(Wl(e)!==Wl(y)||n!==b)&&(x(),y=e,b=n,x=ul(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await vl(t,e,{placement:f,middleware:s,strategy:p}),i=N(e),l=jl(i,n.x),u=jl(i,n.y);if(m?.({...n,x:l,y:u}),o.applyStyles!==!1&&(Ml(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),Ml(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v)){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,Cn(t).zIndex),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function Kl(e,t,n={}){let{defer:r,...i}=n,a=r?L:e=>e(),o=[];return o.push(a(()=>{o.push(Gl(e,t,i))})),()=>{o.forEach(e=>e?.())}}var ql={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function Jl(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:Cl.arrowSize.reference,height:Cl.arrowSize.reference,[Cl.arrowSizeHalf.variable]:`calc(${Cl.arrowSize.reference} / 2)`,[Cl.arrowOffset.variable]:`calc(${Cl.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?ql[t.split(`-`)[0]]:void 0,background:Cl.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}var Yl=e=>e.ids?.root??`combobox:${e.id}`,Xl=e=>e.ids?.label??`combobox:${e.id}:label`,Zl=e=>e.ids?.control??`combobox:${e.id}:control`,Ql=e=>e.ids?.input??`combobox:${e.id}:input`,$l=e=>e.ids?.content??`combobox:${e.id}:content`,eu=e=>e.ids?.positioner??`combobox:${e.id}:popper`,tu=e=>e.ids?.trigger??`combobox:${e.id}:toggle-btn`,nu=e=>e.ids?.clearTrigger??`combobox:${e.id}:clear-btn`,ru=(e,t)=>e.ids?.itemGroup?.(t)??`combobox:${e.id}:optgroup:${t}`,iu=(e,t)=>e.ids?.itemGroupLabel?.(t)??`combobox:${e.id}:optgroup-label:${t}`,au=(e,t)=>e.ids?.item?.(t)??`combobox:${e.id}:option:${t}`,ou=e=>e.getById($l(e)),su=e=>e.getById(Ql(e)),cu=e=>e.getById(eu(e)),lu=e=>e.getById(Zl(e)),uu=e=>e.getById(tu(e)),du=e=>e.getById(nu(e)),fu=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return ai(ou(e),n)},pu=e=>{let t=su(e);e.isActiveElement(t)||t?.focus({preventScroll:!0}),Gt(t)},mu=e=>{let t=uu(e);e.isActiveElement(t)||t?.focus({preventScroll:!0})},hu={triggerLabel:`Toggle suggestions`,clearTriggerLabel:`Clear value`};function gu(e,t){let{context:n,prop:r,state:i,send:a,scope:o,computed:s}=e,c=co(hu,r(`translations`)),l=r(`collection`),u=!!r(`disabled`),d=s(`isInteractive`),f=!!r(`invalid`),p=!!r(`required`),m=!!r(`readOnly`),h=i.hasTag(`open`),g=i.hasTag(`focused`),_=r(`composite`),v=n.get(`highlightedValue`),y=n.get(`currentPlacement`),b=y?kl(y):void 0,x=Jl({...r(`positioning`),placement:y});function S(e){let t=l.getItemDisabled(e.item),r=l.getItemValue(e.item);return _o(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(u||t),highlighted:v===r,selected:n.get(`value`).includes(r)}}return{focused:g,open:h,inputValue:n.get(`inputValue`),highlightedValue:v,highlightedItem:n.get(`highlightedItem`),value:n.get(`value`),valueAsString:s(`valueAsString`),hasSelectedItems:s(`hasSelectedItems`),selectedItems:s(`selectedItems`),collection:r(`collection`),multiple:!!r(`multiple`),disabled:!!u,syncSelectedItems(){a({type:`SELECTED_ITEMS.SYNC`})},reposition(e={}){a({type:`POSITIONING.SET`,options:e})},setHighlightValue(e){a({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){a({type:`HIGHLIGHTED_VALUE.CLEAR`})},selectValue(e){a({type:`ITEM.SELECT`,value:e})},setValue(e){a({type:`VALUE.SET`,value:e})},setInputValue(e,t=`script`){a({type:`INPUT_VALUE.SET`,value:e,src:t})},clearValue(e){a(e==null?{type:`VALUE.CLEAR`}:{type:`ITEM.CLEAR`,value:e})},focus(){su(o)?.focus()},setOpen(e,t=`script`){i.hasTag(`open`)!==e&&a({type:e?`OPEN`:`CLOSE`,src:t})},getRootProps(){return t.element({...H.root.attrs,dir:r(`dir`),id:Yl(o),"data-invalid":k(f),"data-readonly":k(m)})},getLabelProps(){return t.label({...H.label.attrs,dir:r(`dir`),htmlFor:Ql(o),id:Xl(o),"data-readonly":k(m),"data-disabled":k(u),"data-invalid":k(f),"data-required":k(p),"data-focus":k(g),onClick(e){_||(e.preventDefault(),uu(o)?.focus({preventScroll:!0}))}})},getControlProps(){return t.element({...H.control.attrs,dir:r(`dir`),id:Zl(o),"data-state":h?`open`:`closed`,"data-focus":k(g),"data-disabled":k(u),"data-invalid":k(f)})},getPositionerProps(){return t.element({...H.positioner.attrs,dir:r(`dir`),id:eu(o),style:x.floating})},getInputProps(){return t.input({...H.input.attrs,dir:r(`dir`),"aria-invalid":Zt(f),"data-invalid":k(f),"data-autofocus":k(r(`autoFocus`)),name:r(`name`),form:r(`form`),disabled:u,required:r(`required`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:`false`,readOnly:m,placeholder:r(`placeholder`),id:Ql(o),type:`text`,role:`combobox`,defaultValue:n.get(`inputValue`),"aria-autocomplete":s(`autoComplete`)?`both`:`list`,"aria-controls":$l(o),"aria-expanded":h,"data-state":h?`open`:`closed`,"aria-activedescendant":v?au(o,v):void 0,onClick(e){e.defaultPrevented||r(`openOnClick`)&&d&&a({type:`INPUT.CLICK`,src:`input-click`})},onFocus(){u||a({type:`INPUT.FOCUS`})},onBlur(){u||a({type:`INPUT.BLUR`})},onChange(e){a({type:`INPUT.CHANGE`,value:e.currentTarget.value,src:`input-change`})},onKeyDown(e){if(e.defaultPrevented||!d||e.ctrlKey||e.shiftKey||ir(e))return;let t=r(`openOnKeyPress`),n=e.ctrlKey||e.metaKey||e.shiftKey,i={ArrowDown(e){(t||h)&&(a({type:e.altKey?`OPEN`:`INPUT.ARROW_DOWN`,keypress:!0,src:`arrow-key`}),e.preventDefault())},ArrowUp(){(t||h)&&(a({type:e.altKey?`CLOSE`:`INPUT.ARROW_UP`,keypress:!0,src:`arrow-key`}),e.preventDefault())},Home(e){n||(a({type:`INPUT.HOME`,keypress:!0}),h&&e.preventDefault())},End(e){n||(a({type:`INPUT.END`,keypress:!0}),h&&e.preventDefault())},Enter(e){a({type:`INPUT.ENTER`,keypress:!0,src:`item-select`});let t=v!=null,n=r(`alwaysSubmitOnEnter`),i=s(`isCustomValue`)&&!r(`allowCustomValue`);if(h&&!n&&(t||i)&&e.preventDefault(),v==null)return;let c=fu(o,v);pn(c)&&r(`navigate`)?.({value:v,node:c,href:c.href})},Escape(){a({type:`INPUT.ESCAPE`,keypress:!0,src:`escape-key`}),e.preventDefault()}}[fr(e,{dir:r(`dir`)})];i?.(e)}})},getTriggerProps(e={}){return t.button({...H.trigger.attrs,dir:r(`dir`),id:tu(o),"aria-haspopup":_?`listbox`:`dialog`,type:`button`,tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":h,"data-state":h?`open`:`closed`,"aria-controls":h?$l(o):void 0,disabled:u,"data-invalid":k(f),"data-focusable":k(e.focusable),"data-readonly":k(m),"data-disabled":k(u),onFocus(){e.focusable&&a({type:`INPUT.FOCUS`,src:`trigger`})},onClick(e){e.defaultPrevented||d&&sr(e)&&a({type:`TRIGGER.CLICK`,src:`trigger-click`})},onPointerDown(e){d&&e.pointerType!==`touch`&&sr(e)&&(e.preventDefault(),queueMicrotask(()=>{pu(o)}))},onKeyDown(e){if(e.defaultPrevented||_)return;let t={ArrowDown(){a({type:`INPUT.ARROW_DOWN`,src:`arrow-key`})},ArrowUp(){a({type:`INPUT.ARROW_UP`,src:`arrow-key`})}}[fr(e,{dir:r(`dir`)})];t&&(t(e),e.preventDefault())}})},getContentProps(){return t.element({...H.content.attrs,dir:r(`dir`),id:$l(o),role:_?`listbox`:`dialog`,tabIndex:-1,hidden:!h,"data-state":h?`open`:`closed`,"data-placement":y,"data-side":b,"aria-labelledby":Xl(o),"aria-multiselectable":r(`multiple`)&&_?!0:void 0,"data-empty":k(l.size===0),onPointerDown(e){sr(e)&&e.preventDefault()}})},getListProps(){return t.element({...H.list.attrs,role:_?void 0:`listbox`,"data-empty":k(l.size===0),"aria-labelledby":Xl(o),"aria-multiselectable":r(`multiple`)&&!_?!0:void 0})},getClearTriggerProps(){return t.button({...H.clearTrigger.attrs,dir:r(`dir`),id:nu(o),type:`button`,tabIndex:-1,disabled:u,"data-invalid":k(f),"aria-label":c.clearTriggerLabel,"aria-controls":Ql(o),hidden:!n.get(`value`).length,onPointerDown(e){sr(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||d&&a({type:`VALUE.CLEAR`,src:`clear-trigger`})}})},getItemState:S,getItemProps(e){let n=S(e),i=n.value;return t.element({...H.item.attrs,dir:r(`dir`),id:au(o,i),role:`option`,tabIndex:-1,"data-highlighted":k(n.highlighted),"data-state":n.selected?`checked`:`unchecked`,"aria-selected":Zt(n.selected),"aria-disabled":Zt(n.disabled),"data-disabled":k(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||Ji()===`pointer`&&(n.highlighted||a({type:`ITEM.POINTER_MOVE`,value:i}))},onPointerLeave(){e.persistFocus||n.disabled||Ji()===`pointer`&&a({type:`ITEM.POINTER_LEAVE`,value:i})},onClick(e){rr(e)||nr(e)||cr(e)||n.disabled||a({type:`ITEM.CLICK`,src:`item-select`,value:i})}})},getItemTextProps(e){let n=S(e);return t.element({...H.itemText.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,"data-disabled":k(n.disabled),"data-highlighted":k(n.highlighted)})},getItemIndicatorProps(e){let n=S(e);return t.element({"aria-hidden":!0,...H.itemIndicator.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupProps(e){let{id:n}=e;return t.element({...H.itemGroup.attrs,dir:r(`dir`),id:ru(o,n),"aria-labelledby":iu(o,n),"data-empty":k(l.size===0),role:`group`})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...H.itemGroupLabel.attrs,dir:r(`dir`),id:iu(o,n),role:`presentation`})}}}function _u(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function vu(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var yu=`pointerdown.outside`,bu=`focus.outside`;function xu(e){for(let t of e)if(A(t)&&I(t))return!0;return!1}var Su=e=>`clientY`in e;function Cu(e,t){if(!Su(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function wu(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Tu(e,t){if(!t||!Su(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return wu({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function Eu(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=M(e),l=N(e),u=_u(l),d=vu(l);function f(t,r){if(!A(r)||!r.isConnected||j(e,r)||Cu(e,t)||s&&Dn(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&Tu(t,Jr(i))||Tu(t,Jr(e))?!1:!n?.(r)}let p=new Set,m=dn(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!Kn()?L:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:P(t);if(e&&f(t,n)){if(i||a){let t=Ha(i,a);e.addEventListener(yu,t,{once:!0})}Ou(e,yu,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:cr(s),focusable:xu(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(F(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(F(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?L:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:P(t);if(e&&f(t,i)){if(r||a){let t=Ha(r,a);e.addEventListener(bu,t,{once:!0})}Ou(e,bu,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:I(i),target:i}})}})}return Kn()||(_.add(F(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function Du(e,t){let{defer:n}=t,r=n?L:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Eu(n,t))})),()=>{i.forEach(e=>e?.())}}function Ou(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function ku(e,t){return F(M(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var Au=`layer:request-dismiss`,J={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>j(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>j(t,e))},add(e){let t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&Mu(t)}),this.recentlyRemoved.add(e),Ur(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>J.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{ju(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;ju(e,t,r);let{zIndex:i}=Cn(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];Pu(e,Au,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),Nu(e,Au,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function ju(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),J.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=J.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function Mu(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.style.removeProperty(`--z-index`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function Nu(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function Pu(e,t,n){e.addEventListener(t,n,{once:!0})}var Fu=new WeakMap,Iu=new WeakMap;function Lu(e){return J.isBelowPointerBlockingLayer(e)?`none`:`auto`}function Ru(e){let t=Lu(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function zu(e){if(Iu.has(e))return;let t=N(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Iu.has(e)&&Ru(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Iu.set(e,n)}function Bu(){J.layers.forEach(({node:e})=>{Ru(e),zu(e)})}function Vu(e){let t=Iu.get(e);t&&(t.disconnect(),Iu.delete(e)),e.style.pointerEvents=``}function Hu(e,t){let n=M(e),r=[];return J.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Fu.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=Di(()=>{let t=e();return A(t)?t:null},{timeout:1e3});t.then(e=>r.push(yi(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{J.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Fu.get(e);t!==void 0&&(e.style.pointerEvents=t,Fu.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Uu(e,t){let{onDismiss:n,onRequestDismiss:r,pointerBlocking:i,exclude:a,debug:o,type:s=`dialog`,layerStyleTargets:c}=t,l={dismiss:n,node:e,type:s,pointerBlocking:i,requestDismiss:r,styleTargets:c};J.add(l),Bu();function u(r){let i=P(r.detail.originalEvent);J.isBelowPointerBlockingLayer(e)||J.isInBranch(i)||(t.onPointerDownOutside?.(r),t.onInteractOutside?.(r),!r.defaultPrevented&&(o&&console.log(`onPointerDownOutside:`,r.detail.originalEvent),n?.()))}function d(e){let r=P(e.detail.originalEvent);J.isInBranch(r)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(o&&console.log(`onFocusOutside:`,e.detail.originalEvent),n?.()))}function f(r){J.isTopMost(e)&&(t.onEscapeKeyDown?.(r),!r.defaultPrevented&&n&&(r.preventDefault(),n()))}function p(n){let r=typeof a==`function`?a():a,i=Array.isArray(r)?r:[r],o=t.persistentElements?.map(e=>e()).filter(A);return o&&i.push(...o),i.some(e=>j(e,n))||J.isInNestedLayer(e,n)}let m=[i?Hu(e,t.persistentElements):void 0,ku(e,f),Du(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{J.remove(e),Bu(),Vu(e),m.forEach(e=>e?.())}}function Wu(e,t){let{warnOnMissingNode:n=!0}=t;return Oi(e,e=>Uu(e,t),{defer:t.defer,onMissing:n?()=>ho("[@zag-js/dismissable] node is `null` or `undefined`"):void 0})}function Gu(e,t={}){return Oi(e,e=>(J.addBranch(e),()=>{J.removeBranch(e)}),{defer:t.defer,onMissing:()=>ho("[@zag-js/dismissable] branch node is `null` or `undefined`")})}var Ku=`__live-region__`,qu=`__live-region-debug__`,Ju=`position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;`;function Yu(e={}){let{level:t=`polite`,document:n=document,root:r,delay:i=0,debug:a=!1}=e,o=n.defaultView??window,s=r??n.body;function c(){if(!a)return;let e=n.getElementById(qu);return e||(e=n.createElement(`div`),e.id=qu,e.dataset.liveAnnouncerDebug=`true`,e.setAttribute(`aria-hidden`,`true`),e.style.cssText=Ju,s.appendChild(e),e)}function l(e,r){n.getElementById(Ku)?.remove(),r??=i;let a=n.createElement(`span`);a.id=Ku,a.dataset.liveAnnouncer=`true`;let l=t===`assertive`?`alert`:`status`;a.setAttribute(`aria-live`,t),a.setAttribute(`role`,l),Object.assign(a.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}),s.appendChild(a),o.setTimeout(()=>{if(!a.isConnected)return;a.textContent=e;let t=c();t&&(t.textContent=e)},r)}function u(){n.getElementById(Ku)?.remove(),n.getElementById(qu)?.remove()}return{announce:l,destroy:u,toJSON(){return Ku}}}var{guards:Xu,createMachine:Zu,choose:Qu}=Uo(),{and:Y,not:$u}=Xu,ed=Zu({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:``,closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:`none`,selectionBehavior:e.multiple?`clear`:`replace`,openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){qr(e)},collection:Ts.empty(),...e,positioning:{placement:`bottom`,sameWidth:!0,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open.suggesting`:`closed.idle`},context({prop:e,bindable:t,getContext:n,getEvent:r}){let i=e(`value`)??e(`defaultValue`)??[],a=e(`collection`).findMany(i);return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Ca,hash(e){return e.join(`,`)},onChange(t){let r=n(),i=e(`collection`),a=Cs({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:Cs({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){let n=e(`collection`).find(t);e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:n})}})),inputValue:t(()=>{let t=e(`inputValue`)||e(`defaultInputValue`),n=e(`value`)||e(`defaultValue`);if(!t.trim()&&!e(`multiple`)){let r=e(`collection`).stringifyMany(n);t=Wa(e(`selectionBehavior`),{preserve:t||r,replace:r,clear:``})}return{defaultValue:t,value:e(`inputValue`),onChange(t){let n=r(),i=(n.previousEvent||n).src;e(`onInputValueChange`)?.({inputValue:t,reason:i})}}}),highlightedItem:t(()=>{let t=e(`highlightedValue`);return{defaultValue:e(`collection`).find(t)}}),selectedItemMap:t(()=>({defaultValue:ws({selectedItems:a,collection:e(`collection`)})}))}},computed:{isInputValueEmpty:({context:e})=>e.get(`inputValue`).length===0,isInteractive:({prop:e})=>!(e(`readOnly`)||e(`disabled`)),autoComplete:({prop:e})=>e(`inputBehavior`)===`autocomplete`,autoHighlight:({prop:e})=>e(`inputBehavior`)===`autohighlight`,hasSelectedItems:({context:e})=>e.get(`value`).length>0,selectedItems:({context:e,prop:t})=>xs({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`)),isCustomValue:({context:e,computed:t})=>e.get(`inputValue`)!==t(`valueAsString`)},watch({context:e,prop:t,track:n,action:r,send:i}){n([()=>e.hash(`value`)],()=>{r([`syncSelectedItems`])}),n([()=>e.get(`inputValue`)],()=>{r([`syncInputValue`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`,`autofillInputValue`,`announceHighlightedItem`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>t(`collection`).toString()],()=>{i({type:`CHILDREN_CHANGE`})})},on:{"SELECTED_ITEMS.SYNC":{actions:[`syncSelectedItems`]},"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedValue`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedValue`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setValue`]},"INPUT_VALUE.SET":{actions:[`setInputValue`]},"POSITIONING.SET":{actions:[`reposition`]}},entry:Qu([{guard:`autoFocus`,actions:[`setInitialFocus`]}]),states:{closed:{tags:[`closed`],initial:`idle`,states:{idle:{tags:[`idle`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":{target:`open.interacting`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{target:`focused`,actions:[`clearInputValue`,`clearSelectedItems`,`setInitialFocus`]}}},focused:{tags:[`focused`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":[{guard:`isChangeEvent`,target:`open.suggesting`},{target:`open.interacting`}],"INPUT.CHANGE":[{guard:Y(`isOpenControlled`,`openOnChange`),actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{guard:`openOnChange`,target:`open.suggesting`,actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{actions:[`setInputValue`]}],"LAYER.INTERACT_OUTSIDE":{target:`idle`},"INPUT.ESCAPE":{guard:Y(`isCustomValue`,$u(`allowCustomValue`)),actions:[`revertInputValue`]},"INPUT.BLUR":{target:`idle`},"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_DOWN":[{guard:Y(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_UP":[{guard:Y(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{actions:[`clearInputValue`,`clearSelectedItems`]}}}}},open:{tags:[`open`,`focused`],entry:[`setInitialFocus`],effects:[`trackFocusVisible`,`scrollToHighlightedItem`,`trackDismissableLayer`,`trackPlacement`,`trackLiveRegion`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`closed.focused`,actions:[`setFinalFocus`]},{target:`closed.idle`}],"INPUT.ENTER":[{guard:Y(`isOpenControlled`,`isCustomValue`,$u(`hasHighlightedItem`),$u(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:Y(`isCustomValue`,$u(`hasHighlightedItem`),$u(`allowCustomValue`)),target:`closed.focused`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:Y(`isOpenControlled`,`closeOnSelect`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectHighlightedItem`]}],"ITEM.CLICK":[{guard:Y(`isOpenControlled`,`closeOnSelect`),actions:[`selectItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"LAYER.INTERACT_OUTSIDE":[{guard:Y(`isOpenControlled`,`isCustomValue`,$u(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:Y(`isCustomValue`,$u(`allowCustomValue`)),target:`closed.idle`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.idle`,actions:[`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}],"VALUE.CLEAR":[{guard:`isOpenControlled`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`]},{target:`closed.focused`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`,`setFinalFocus`]}]},initial:`interacting`,states:{interacting:{on:{CHILDREN_CHANGE:[{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{actions:[`scrollToHighlightedItem`]}],"INPUT.HOME":{actions:[`highlightFirstItem`]},"INPUT.END":{actions:[`highlightLastItem`]},"INPUT.ARROW_DOWN":[{guard:Y(`autoComplete`,`isLastItemHighlighted`),actions:[`clearHighlightedValue`,`scrollContentToTop`]},{actions:[`highlightNextItem`]}],"INPUT.ARROW_UP":[{guard:Y(`autoComplete`,`isFirstItemHighlighted`),actions:[`clearHighlightedValue`]},{actions:[`highlightPrevItem`]}],"INPUT.CHANGE":[{guard:`autoComplete`,target:`suggesting`,actions:[`setInputValue`]},{target:`suggesting`,actions:[`clearHighlightedValue`,`setInputValue`]}],"ITEM.POINTER_MOVE":{actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]},"LAYER.ESCAPE":[{guard:Y(`isOpenControlled`,`autoComplete`),actions:[`syncInputValue`,`invokeOnClose`]},{guard:`autoComplete`,target:`closed.focused`,actions:[`syncInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:Y(`isHighlightedItemRemoved`,`hasCollectionItems`,`autoHighlight`),actions:[`clearHighlightedValue`,`highlightFirstItem`]},{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{guard:`autoHighlight`,actions:[`highlightFirstItem`]}],"INPUT.ARROW_DOWN":{target:`interacting`,actions:[`highlightNextItem`]},"INPUT.ARROW_UP":{target:`interacting`,actions:[`highlightPrevItem`]},"INPUT.HOME":{target:`interacting`,actions:[`highlightFirstItem`]},"INPUT.END":{target:`interacting`,actions:[`highlightLastItem`]},"INPUT.CHANGE":{actions:[`setInputValue`]},"LAYER.ESCAPE":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"ITEM.POINTER_MOVE":{target:`interacting`,actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e(`isInputValueEmpty`),autoComplete:({computed:e,prop:t})=>e(`autoComplete`)&&!t(`multiple`),autoHighlight:({computed:e})=>e(`autoHighlight`),isFirstItemHighlighted:({prop:e,context:t})=>e(`collection`).firstValue===t.get(`highlightedValue`),isLastItemHighlighted:({prop:e,context:t})=>e(`collection`).lastValue===t.get(`highlightedValue`),isCustomValue:({computed:e})=>e(`isCustomValue`),allowCustomValue:({prop:e})=>!!e(`allowCustomValue`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,closeOnSelect:({prop:e})=>!!e(`closeOnSelect`),isOpenControlled:({prop:e})=>e(`open`)!=null,openOnChange:({prop:e,context:t})=>{let n=e(`openOnChange`);return Ta(n)?n:!!n?.({inputValue:t.get(`inputValue`)})},restoreFocus:({event:e})=>{let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t},isChangeEvent:({event:e})=>e.previousEvent?.type===`INPUT.CHANGE`,autoFocus:({prop:e})=>!!e(`autoFocus`),isHighlightedItemRemoved:({prop:e,context:t})=>!e(`collection`).has(t.get(`highlightedValue`)),hasCollectionItems:({prop:e})=>e(`collection`).size>0},effects:{trackFocusVisible({scope:e}){return Zi({root:e.getRootNode?.()})},trackDismissableLayer({send:e,prop:t,scope:n}){return t(`disableLayer`)?void 0:Wu(()=>ou(n),{type:`listbox`,defer:!0,exclude:()=>[su(n),uu(n),du(n)],onFocusOutside:t(`onFocusOutside`),onPointerDownOutside:t(`onPointerDownOutside`),onInteractOutside:t(`onInteractOutside`),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:`LAYER.ESCAPE`,src:`escape-key`})},onDismiss(){e({type:`LAYER.INTERACT_OUTSIDE`,src:`interact-outside`,restoreFocus:!1})}})},trackLiveRegion({refs:e,scope:t}){let n=Yu({level:`assertive`,document:t.getDoc()});return e.set(`liveRegion`,n),()=>n.destroy()},trackPlacement({context:e,prop:t,scope:n}){return e.set(`currentPlacement`,t(`positioning`).placement),Kl(()=>lu(n)||uu(n),()=>cu(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=su(n),i=[],a=r=>{if(Ji()===`pointer`)return;let a=e.get(`highlightedValue`);if(!a)return;let o=ou(n),s=t(`scrollToIndexFn`);if(s){s({index:t(`collection`).indexOf(a),immediate:r,getElement:()=>fu(n,a)});return}let c=fu(n,a),l=L(()=>{mi(c,{rootEl:o,block:`nearest`})});i.push(l)},o=L(()=>{Yi(`virtual`),a(!0)});i.push(o);let s=Kr(r,{attributes:[`aria-activedescendant`],callback:()=>a(!1)});return i.push(s),()=>{i.forEach(e=>e())}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){Kl(()=>lu(n),()=>cu(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set(`highlightedValue`,t.value)},clearHighlightedValue({context:e}){e.set(`highlightedValue`,null)},selectHighlightedItem(e){let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`highlightedValue`);if(!i||!r.has(i))return;let a=n(`multiple`)?ya(t.get(`value`),i):[i];n(`onSelect`)?.({value:a,itemValue:i}),t.set(`value`,a);let o=Wa(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(a),clear:``});t.set(`inputValue`,o)},scrollToHighlightedItem({context:e,prop:t,scope:n}){Ur(()=>{let r=e.get(`highlightedValue`);if(r==null)return;let i=fu(n,r),a=ou(n),o=t(`scrollToIndexFn`);if(o){o({index:t(`collection`).indexOf(r),immediate:!0,getElement:()=>fu(n,r)});return}mi(i,{rootEl:a,block:`nearest`})})},selectItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=i(`multiple`)?ya(t.get(`value`),n.value):[n.value];i(`onSelect`)?.({value:e,itemValue:n.value}),t.set(`value`,e);let r=Wa(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},clearItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=va(t.get(`value`),n.value);t.set(`value`,e);let r=Wa(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},setInitialFocus({scope:e}){L(()=>{pu(e)})},setFinalFocus({scope:e}){L(()=>{uu(e)?.dataset.focusable==null?pu(e):mu(e)})},syncInputValue({context:e,scope:t,event:n}){let r=su(t);r&&(r.value=e.get(`inputValue`),queueMicrotask(()=>{n.current().type!==`INPUT.CHANGE`&&Gt(r)}))},setInputValue({context:e,event:t}){e.set(`inputValue`,t.value)},clearInputValue({context:e}){e.set(`inputValue`,``)},revertInputValue({context:e,prop:t,computed:n}){let r=Wa(t(`selectionBehavior`),{replace:n(`hasSelectedItems`)?n(`valueAsString`):``,preserve:e.get(`inputValue`),clear:``});e.set(`inputValue`,r)},setValue(e){let{context:t,flush:n,event:r,prop:i}=e;n(()=>{t.set(`value`,r.value);let e=Wa(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(r.value),clear:``});t.set(`inputValue`,e)})},clearSelectedItems(e){let{context:t,flush:n,prop:r}=e;n(()=>{t.set(`value`,[]);let e=Wa(r(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r(`collection`).stringifyMany([]),clear:``});t.set(`inputValue`,e)})},scrollContentToTop({prop:e,scope:t}){let n=e(`scrollToIndexFn`);if(n){let r=e(`collection`).firstValue;n({index:0,immediate:!0,getElement:()=>fu(t,r)})}else{let e=ou(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){let r=td(t);e(`onOpenChange`)?.({open:!0,reason:r,value:n.get(`value`)})},invokeOnClose({prop:e,event:t,context:n}){let r=td(t);e(`onOpenChange`)?.({open:!1,reason:r,value:n.get(`value`)})},highlightFirstItem({context:e,prop:t,scope:n}){(ou(n)?queueMicrotask:L)(()=>{let n=t(`collection`).firstValue;n&&e.set(`highlightedValue`,n)})},highlightFirstItemIfNeeded({computed:e,action:t}){e(`autoHighlight`)&&t([`highlightFirstItem`])},highlightLastItem({context:e,prop:t,scope:n}){(ou(n)?queueMicrotask:L)(()=>{let n=t(`collection`).lastValue;n&&e.set(`highlightedValue`,n)})},highlightNextItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getNextValue(r),!n&&t(`loopFocus`)&&(n=i.firstValue)):n=i.firstValue,n&&e.set(`highlightedValue`,n)},highlightPrevItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getPreviousValue(r),!n&&t(`loopFocus`)&&(n=i.lastValue)):n=i.lastValue,n&&e.set(`highlightedValue`,n)},highlightFirstSelectedItem({context:e,prop:t}){L(()=>{let[n]=t(`collection`).sort(e.get(`value`));n&&e.set(`highlightedValue`,n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){L(()=>{let r=null;r=n(`hasSelectedItems`)?t(`collection`).sort(e.get(`value`))[0]:t(`collection`).firstValue,r&&e.set(`highlightedValue`,r)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){L(()=>{let r=t(`collection`),i=null;i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue,i&&e.set(`highlightedValue`,i)})},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:i}){let a=su(i),o=n(`collection`);if(!t(`autoComplete`)||!a||!r.keypress)return;let s=o.stringify(e.get(`highlightedValue`));L(()=>{a.value=s||e.get(`inputValue`)})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`value`),a=Cs({values:i,collection:r,selectedItemMap:t.get(`selectedItemMap`)});t.set(`selectedItemMap`,a.nextSelectedItemMap);let o=Wa(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(i),clear:``});t.set(`inputValue`,o)})},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`).find(e.get(`highlightedValue`));e.set(`highlightedItem`,n)},announceHighlightedItem({context:e,prop:t,refs:n}){if(!Xn())return;let r=e.get(`highlightedValue`),i=r?t(`collection`).stringifyItem(t(`collection`).find(r)):null;if(!i)return;let a=r?e.get(`value`).includes(r):!1;n.get(`liveRegion`)?.announce(a?`${i}, selected`:i)},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}});function td(e){return(e.previousEvent||e).src}var nd={key:0,class:`k-combobox__req`},rd={key:1,class:`k-combobox__error`},id={key:2,class:`k-combobox__hint`},ad={key:0,class:`k-combobox__empty`},od=E(Object.assign({inheritAttrs:!1},{__name:`KCombobox`,props:{modelValue:{type:[String,Number,null],default:null},options:{type:Array,default:()=>[]},getValue:{type:Function,default:e=>e.value??e.id},getLabel:{type:Function,default:e=>e.label??e.name??``},label:{type:String,default:``},placeholder:{type:String,default:`Начните вводить…`},hint:{type:String,default:``},error:{type:String,default:``},emptyText:{type:String,default:`Ничего не найдено`},name:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}},emits:[`update:modelValue`,`search`],setup(e,{emit:n}){let r=(0,t.useAttrs)(),i=(0,t.computed)(()=>({class:r.class,style:r.style})),a=e,o=n,s=(0,t.computed)(()=>a.options.map(e=>typeof e==`object`&&e?e:{value:e,label:String(e)})),c=e=>String(a.getValue(e)),l=e=>String(a.getLabel(e)),u=(0,t.ref)([]);(0,t.watch)(s,e=>{u.value=e},{immediate:!0});function d(e){let t=(e||``).toLowerCase().trim();u.value=t?s.value.filter(e=>l(e).toLowerCase().includes(t)):s.value}let f=(0,t.computed)(()=>Ts({items:u.value,itemToValue:c,itemToString:l}));function p(e){if(e!=null&&e!==``)return s.value.find(t=>c(t)===String(e))}let m=V(ed,{id:(0,t.useId)(),positioning:{sameWidth:!0},get collection(){return f.value},get disabled(){return a.disabled},get invalid(){return!!a.error},get required(){return a.required},get name(){return a.name||void 0},get placeholder(){return a.placeholder},get value(){let e=p(a.modelValue);return e?[c(e)]:[]},onOpenChange({open:e}){e||(u.value=s.value)},onInputValueChange({inputValue:e}){d(e),o(`search`,e)},onValueChange({value:e}){let t=p(e[0]);o(`update:modelValue`,t===void 0?null:a.getValue(t))}}),h=(0,t.computed)(()=>gu(m,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-combobox`},{...i.value,...h.value.getRootProps()}),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:0,class:`k-combobox__label`},h.value.getLabelProps()),[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,nd,`*`)):(0,t.createCommentVNode)(``,!0)],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:[`k-combobox__box`,{"k-combobox__box--error":e.error,"k-combobox__box--disabled":e.disabled}]},h.value.getControlProps()),[(0,t.createElementVNode)(`input`,(0,t.mergeProps)({class:`k-combobox__input`},h.value.getInputProps()),null,16),e.clearable&&h.value.hasSelectedItems?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-combobox__clear`,"aria-label":`Очистить`},h.value.getClearTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:14})],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-combobox__trigger`,"aria-label":`Показать список`},h.value.getTriggerProps()),[(0,t.createVNode)(D,{name:`chevron-down`,size:16})],16)],16),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,rd,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,id,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.normalizeProps)((0,t.guardReactiveProps)(h.value.getPositionerProps())),[(0,t.createElementVNode)(`ul`,(0,t.mergeProps)({class:`k-combobox__content`},h.value.getContentProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(u.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:c(e),class:`k-combobox__item`},{ref_for:!0},h.value.getItemProps({item:e})),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-combobox__item-text`},{ref_for:!0},h.value.getItemTextProps({item:e})),(0,t.toDisplayString)(l(e)),17),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-combobox__item-check`},{ref_for:!0},h.value.getItemIndicatorProps({item:e})),[(0,t.createVNode)(D,{name:`check`,size:15})],16)],16))),128)),u.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`li`,ad,(0,t.toDisplayString)(e.emptyText),1))],16)],16)]))],16))}}),[[`__scopeId`,`data-v-2f435f23`]]),sd=E({__name:`KCountdown`,props:{to:{type:[String,Number,Date],required:!0},warnAt:{type:Number,default:300},dangerAt:{type:Number,default:60},showIcon:{type:Boolean,default:!0},size:{type:String,default:`md`},endedText:{type:String,default:`Завершено`}},setup(e){let n=e,r=(0,t.ref)(Date.now()),i=null;(0,t.onMounted)(()=>{i=setInterval(()=>{r.value=Date.now()},1e3)}),(0,t.onBeforeUnmount)(()=>clearInterval(i));let a=(0,t.computed)(()=>Math.max(0,Math.floor((new Date(n.to).getTime()-r.value)/1e3))),o=(0,t.computed)(()=>a.value<=0),s=(0,t.computed)(()=>o.value?`ended`:a.value<=n.dangerAt?`danger`:a.value<=n.warnAt?`warning`:`normal`),c=(0,t.computed)(()=>{if(o.value)return n.endedText;let e=a.value,t=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),s=e%60,c=e=>String(e).padStart(2,`0`);return t>0?`${t} д ${c(r)}:${c(i)}:${c(s)}`:`${c(r)}:${c(i)}:${c(s)}`});return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-countdown`,[`k-countdown--${s.value}`,`k-countdown--${e.size}`]])},[e.showIcon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`clock`,size:e.size===`lg`?18:14},null,8,[`size`])):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(c.value),1)],2))}},[[`__scopeId`,`data-v-f2953376`]]),cd={class:`k-desc__label`},ld={class:`k-desc__value`},ud=E({__name:`KDescriptions`,props:{items:{type:Array,default:()=>[]},columns:{type:Number,default:2}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,{class:`k-desc`,style:(0,t.normalizeStyle)({"--k-desc-cols":e.columns})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.key,class:(0,t.normalizeClass)([`k-desc__row`,{"k-desc__row--wide":e.wide}])},[(0,t.createElementVNode)(`dt`,cd,(0,t.toDisplayString)(e.label),1),(0,t.createElementVNode)(`dd`,ld,[(0,t.renderSlot)(n.$slots,`value-${e.key}`,{item:e},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.value??`—`),1)],!0)])],2))),128))],4))}},[[`__scopeId`,`data-v-a1a1403d`]]),dd=O(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),fd=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,pd=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,md=e=>e.ids?.content??`dialog:${e.id}:content`,hd=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`:Aa(n)?n(t):n},gd=e=>e.ids?.title??`dialog:${e.id}:title`,_d=e=>e.ids?.description??`dialog:${e.id}:description`,vd=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,yd=e=>e.getById(md(e)),bd=e=>e.getById(fd(e)),xd=e=>e.getById(pd(e)),Sd=e=>e.getById(hd(e)),Cd=e=>e.getById(gd(e)),wd=e=>e.getById(_d(e)),Td=e=>e.getById(vd(e)),Ed=e=>ii(e.getRootNode(),`[data-scope="dialog"][data-part="trigger"]${tn(e.id)}`),Dd=(e,t)=>t==null?Sd(e)??Ed(e)[0]:e.getById(hd(e,t));function Od(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`),l=i.get(`triggerValue`);return{open:c,setOpen(e){n.matches(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},triggerValue:l,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},getTriggerProps(e={}){let{value:n}=e,i=n!=null&&l===n;return t.button({...dd.trigger.attrs,dir:a(`dir`),id:hd(o,n),"data-ownedby":o.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":md(o),"data-current":k(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})}})},getBackdropProps(){return t.element({...dd.backdrop.attrs,dir:a(`dir`),hidden:!c,id:pd(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...dd.positioner.attrs,dir:a(`dir`),id:fd(o),style:so({pointerEvents:!c||!a(`modal`)?`none`:void 0})})},getContentProps(){let e=i.get(`rendered`);return t.element({...dd.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:md(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":a(`modal`),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:gd(o),"aria-describedby":e.description?_d(o):void 0,style:so({pointerEvents:a(`modal`)?void 0:`auto`})})},getTitleProps(){return t.element({...dd.title.attrs,dir:a(`dir`),id:gd(o)})},getDescriptionProps(){return t.element({...dd.description.attrs,dir:a(`dir`),id:_d(o)})},getCloseTriggerProps(){return t.button({...dd.closeTrigger.attrs,dir:a(`dir`),id:vd(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var kd=new WeakMap,Ad=new WeakMap,jd={},Md=0,Nd=e=>e&&(e.host||Nd(e.parentNode)),Pd=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Nd(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),Fd=new Set([`script`,`output`,`status`,`next-route-announcer`]),Id=e=>Fd.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),Ld=(e,t)=>{let{parentNode:n,markerName:r,controlAttribute:i,explicitBooleanValue:a,followControlledElements:o=!0}=t,s=Pd(n,Array.isArray(e)?e:[e]);jd[r]||(jd[r]=new WeakMap);let c=jd[r],l=[],u=new Set,d=new Set(s),f=e=>{e&&!u.has(e)&&(u.add(e),f(e.parentNode))};s.forEach(e=>{f(e),o&&A(e)&&On(e,e=>{f(e)})});let p=e=>{e&&!d.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(u.has(e))p(e);else try{if(Id(e))return;let t=e.getAttribute(i),n=a?t===`true`:t!==null&&t!==`false`,o=(kd.get(e)||0)+1,s=(c.get(e)||0)+1;kd.set(e,o),c.set(e,s),l.push(e),o===1&&n&&Ad.set(e,!0),s===1&&e.setAttribute(r,``),n||e.setAttribute(i,a?`true`:``)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return p(n),u.clear(),Md++,()=>{l.forEach(e=>{let t=kd.get(e)-1,n=c.get(e)-1;kd.set(e,t),c.set(e,n),t||(Ad.has(e)||e.removeAttribute(i),Ad.delete(e)),n||e.removeAttribute(r)}),Md--,Md||(kd=new WeakMap,kd=new WeakMap,Ad=new WeakMap,jd={})}},Rd=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,zd=(e,t=Rd(e),n=`data-aria-hidden`,r=!0)=>{if(t)return Ld(e,{parentNode:t,markerName:n,controlAttribute:`aria-hidden`,explicitBooleanValue:!0,followControlledElements:r})},Bd=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Vd(e,t={}){let{defer:n=!0}=t,r=n?Bd:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(zd(t))})),()=>{i.forEach(e=>e?.())}}var Hd=Object.defineProperty,Ud=(e,t,n)=>t in e?Hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t,n)=>Ud(e,typeof t==`symbol`?t:t+``,n),Wd={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},Gd=[],Kd=class{constructor(e,t){X(this,`trapStack`),X(this,`config`),X(this,`doc`),X(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),X(this,`lastInteractionType`,`keyboard`),X(this,`portalContainers`,new Set),X(this,`listenerCleanups`,[]),X(this,`handleFocus`,e=>{let t=P(e),n=this.findContainerIndex(t,e)>=0;if(n||on(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode){if(zr(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>zr(e)>0))||(n=!1)}else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),X(this,`handlePointerDown`,e=>{this.lastInteractionType=`pointer`;let t=P(e);if(!(this.findContainerIndex(t,e)>=0)){if(Zd(this.config.clickOutsideDeactivates,e)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Zd(this.config.allowOutsideClick,e)||e.preventDefault()}}),X(this,`handleClick`,e=>{let t=P(e);this.findContainerIndex(t,e)>=0||Zd(this.config.clickOutsideDeactivates,e)||Zd(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),X(this,`handleTabKey`,e=>{if(this.lastInteractionType=`keyboard`,this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;Jd(e)&&e.preventDefault(),this.tryFocus(n)}}),X(this,`handleEscapeKey`,e=>{Qd(e)&&Zd(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),X(this,`_mutationObserver`),X(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)||e.type===`childList`&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return Mn(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?Nn(t):!1}))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),X(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),X(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!I(e)){let t=yn(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),X(this,`tryFocus`,(e,t)=>{if(e!==!1&&e!==yn(this.doc)){if(!e||!e.focus){this.tryFocus(this.getInitialFocusNode());return}e.focus({preventScroll:!!this.config.preventScroll,...t}),this.state.mostRecentlyFocusedNode=e,ef(e)&&e.select()}}),X(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Wd.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{$d(()=>{if(a&&this.isSafeToOverrideFocus()){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),t=this.lastInteractionType===`keyboard`?{focusVisible:!0}:void 0;this.tryFocus(e,t)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),X(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),X(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);this.state.paused=!1,t?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),n?.(),this}),X(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),X(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||t!==!1&&e}),X(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),X(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),X(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||P(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||I(r)&&!Lr(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=zr(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else Jd(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||I(r)&&!Lr(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=zr(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else Jd(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||Gd;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:Yd,isKeyBackward:Xd,...t};this.doc=n.document||M(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{kn(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(e)||n?.includes(r)||i.find(t=>t===e)||this.isControlledElement(r,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return this.config.followControlledElements?Dn(e,t):!1}isPersistentElement(e,t){let n=this.config.persistentElements;if(!n||n.length===0)return!1;let r=typeof t?.composedPath==`function`?t.composedPath():void 0;return n.some(t=>{let n=t();return j(n,e)||n!=null&&r?.includes(n)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=Ir(e,{getShadowRoot:this.config.getShadowRoot}),n=Fr(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e<t.length;e++)if(zr(t[e])>0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e<n.length;e++)if(Lr(n[e]))return n[e]}else for(let e=a-1;e>=0;e--)if(Lr(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}attachListeners(){if(this.state.active)return Wd.activateTrap(this.trapStack,this),this.listenerCleanups.push(F(this.doc,`focusin`,this.handleFocus,!0),F(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),F(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),F(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),F(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),F(this.doc,`keydown`,this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?$d(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this}addListeners(){if(this.state.active)return this.attachListeners(),this.commitInitialFocus(),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}containsElement(e){return this.state.containers.some(t=>j(t,e))}isSafeToOverrideFocus(){let e=yn(this.doc);return!e||e===this.doc.body||this.containsElement(e)?!0:this.trapStack.some(t=>t!==this&&t.containsElement(e))}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=yn(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},qd=e=>e?.type===`keydown`,Jd=e=>qd(e)&&e?.key===`Tab`,Yd=e=>qd(e)&&e.key===`Tab`&&!e?.shiftKey,Xd=e=>qd(e)&&e.key===`Tab`&&e?.shiftKey,Zd=(e,...t)=>typeof e==`function`?e(...t):e,Qd=e=>!e.isComposing&&e.key===`Escape`,$d=e=>setTimeout(e,0),ef=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function tf(e,t={}){let n,r=L(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new Kd(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:M(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var nf=`data-scroll-lock`,rf=new WeakMap;function af(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function of(e){let t=Cn(e)?.scrollbarGutter;return t===`stable`||t?.startsWith(`stable `)===!0}function sf(e){let{documentElement:t,body:n}=e;return Qr(t)?t:n}function cf(e){let t=e.defaultView??window,{documentElement:n,body:r}=e,i=sf(e),a=of(n)||of(r),o=t.innerWidth-n.clientWidth;r.setAttribute(nf,``);let s=()=>bi(n,`--scrollbar-width`,`${o}px`),c=af(n),l=[s(),Yn()?(()=>{let{scrollX:e,scrollY:n,visualViewport:i}=t,s=i?.offsetLeft??0,l=i?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(n-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=yi(r,u);return()=>{d?.(),t.scrollTo({left:e,top:n,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),yi(i,e)})()];return()=>{l.forEach(e=>e?.()),r.removeAttribute(nf)}}function lf(e){let t=e??document,n=rf.get(t);n||(n={count:0,cleanup:cf(t)},rf.set(t,n)),n.count++;let r=n,i=!1;return()=>{i||(i=!0,r.count--,r.count===0&&(r.cleanup(),rf.delete(t)))}}var uf=z({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>Td(t):void 0,i=typeof e.modal!=`boolean`||e.modal;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:i&&!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:Dd(n,e)})}}))}},watch({track:e,action:t,prop:n}){e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{open:{entry:[`checkRenderedElements`,`setInitialFocus`],effects:[`trackDismissableElement`,`trapFocus`,`preventScroll`,`hideContentBelow`],on:{"CONTROLLED.CLOSE":{target:`closed`},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}},closed:{on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Wu(()=>yd(e),{type:`dialog`,defer:!0,pointerBlocking:n(`modal`),layerStyleTargets:[()=>xd(e),()=>bd(e)],exclude:[Sd(e),...Ed(e)].filter(Boolean),onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault()},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return lf(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?tf(()=>yd(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:()=>Br({root:yd(e),getInitialEl:t(`initialFocusEl`)}),setReturnFocus:r=>{let i=t(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let t=Dd(e,a);if(t)return t}return Ed(e)[0]||r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?Vd(()=>[yd(e)],{defer:!0}):void 0}},actions:{setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||L(()=>{Br({root:yd(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},checkRenderedElements({context:e,scope:t}){L(()=>{e.set(`rendered`,{title:!!Cd(t),description:!!wd(t)})})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},toggleVisibility({prop:e,send:t,event:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),df={class:`k-drawer__header`},ff={class:`k-drawer__heading`},pf={class:`k-drawer__tools`},mf={class:`k-drawer__body`},hf={key:0,class:`k-drawer__footer`},gf=E({__name:`KDrawer`,props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:``},subtitle:{type:String,default:``},side:{type:String,default:`right`},size:{type:String,default:`md`},modal:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},closeOnOutside:{type:Boolean,default:!1}},emits:[`update:modelValue`,`close`],setup(e,{emit:n}){let r=e,i=n,a=V(uf,{id:(0,t.useId)(),get open(){return r.modelValue},get modal(){return r.modal},get trapFocus(){return r.modal},get preventScroll(){return r.modal},get closeOnInteractOutside(){return r.modal&&r.closeOnOutside&&r.closable},get closeOnEscape(){return r.closable},onOpenChange({open:e}){i(`update:modelValue`,e),e||i(`close`)}}),o=(0,t.computed)(()=>Od(a,B));return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{name:`k-drawer`,duration:220},{default:(0,t.withCtx)(()=>[o.value.open?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`k-drawer`,[`k-drawer--${e.side}`,{"k-drawer--modal":e.modal}]])},[e.modal?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({key:0,class:`k-drawer__backdrop`},o.value.getBackdropProps()),null,16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-drawer__positioner`},o.value.getPositionerProps()),[(0,t.createElementVNode)(`aside`,(0,t.mergeProps)({class:[`k-drawer__panel`,`k-drawer__panel--${e.size}`]},o.value.getContentProps()),[(0,t.createElementVNode)(`header`,df,[(0,t.createElementVNode)(`div`,ff,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`h2`,(0,t.mergeProps)({class:`k-drawer__title`},o.value.getTitleProps()),(0,t.toDisplayString)(e.title),17),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:0,class:`k-drawer__subtitle`},o.value.getDescriptionProps()),(0,t.toDisplayString)(e.subtitle),17)):(0,t.createCommentVNode)(``,!0)],!0)]),(0,t.createElementVNode)(`div`,pf,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0),e.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-drawer__close`,"aria-label":`Закрыть`},o.value.getCloseTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:18})],16)):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,mf,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,hf,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)],16)],16)],2)):(0,t.createCommentVNode)(``,!0)]),_:3})]))}},[[`__scopeId`,`data-v-719b8b21`]]),_f=O(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),vf=e=>e.ids?.anchor??`popover:${e.id}:anchor`,yf=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`popover:${e.id}:trigger:${t}`:`popover:${e.id}:trigger`:Aa(n)?n(t):n},bf=e=>e.ids?.content??`popover:${e.id}:content`,xf=e=>e.ids?.positioner??`popover:${e.id}:popper`,Sf=e=>e.ids?.arrow??`popover:${e.id}:arrow`,Cf=e=>e.ids?.title??`popover:${e.id}:title`,wf=e=>e.ids?.description??`popover:${e.id}:desc`,Tf=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,Ef=e=>e.getById(vf(e)),Df=e=>e.getById(yf(e)),Of=e=>ii(e.getRootNode(),`[data-scope="popover"][data-part="trigger"]${tn(e.id)}`),kf=(e,t)=>t==null?Df(e)??Of(e)[0]:e.getById(yf(e,t)),Af=e=>e.getById(bf(e)),jf=e=>e.getById(xf(e)),Mf=e=>e.getById(Cf(e)),Nf=e=>e.getById(wf(e)),Pf={closeTriggerLabel:`close`};function Ff(e,t){let{state:n,context:r,send:i,computed:a,prop:o,scope:s}=e,c=co(Pf,o(`translations`)),l=n.matches(`open`),u=r.get(`currentPlacement`),d=u?kl(u):void 0,f=a(`currentPortalled`),p=r.get(`renderedElements`),m=r.get(`triggerValue`),h=Jl({...o(`positioning`),placement:u});return{portalled:f,open:l,setOpen(e){n.matches(`open`)!==e&&i({type:e?`OPEN`:`CLOSE`})},triggerValue:m,setTriggerValue(e){i({type:`TRIGGER_VALUE.SET`,value:e})},reposition(e={}){i({type:`POSITIONING.SET`,options:e})},getArrowProps(){return t.element({id:Sf(s),..._f.arrow.attrs,dir:o(`dir`),style:h.arrow})},getArrowTipProps(){return t.element({..._f.arrowTip.attrs,dir:o(`dir`),style:h.arrowTip})},getAnchorProps(){return t.element({..._f.anchor.attrs,dir:o(`dir`),id:vf(s)})},getTriggerProps(e={}){let{value:n}=e,r=n!=null&&m===n;return t.button({..._f.trigger.attrs,dir:o(`dir`),type:`button`,"data-placement":u,"data-side":d,id:yf(s,n),"data-ownedby":s.id,"data-value":n,"data-current":k(r),"aria-haspopup":`dialog`,"aria-expanded":n==null?l:l&&r,"data-state":l?`open`:`closed`,"aria-controls":bf(s),onPointerDown(e){sr(e)&&Qn()&&e.currentTarget.focus()},onClick(e){e.defaultPrevented||i({type:l&&n!=null&&!r?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})},onBlur(e){i({type:`TRIGGER_BLUR`,target:e.relatedTarget})}})},getIndicatorProps(){return t.element({..._f.indicator.attrs,dir:o(`dir`),"data-state":l?`open`:`closed`})},getPositionerProps(){return t.element({id:xf(s),..._f.positioner.attrs,dir:o(`dir`),style:h.floating})},getContentProps(){return t.element({..._f.content.attrs,dir:o(`dir`),id:bf(s),tabIndex:-1,role:`dialog`,"aria-modal":Zt(o(`modal`)),hidden:!l,"data-state":l?`open`:`closed`,"data-expanded":k(l),"aria-labelledby":p.title?Cf(s):void 0,"aria-describedby":p.description?wf(s):void 0,"data-placement":u,"data-side":d})},getTitleProps(){return t.element({..._f.title.attrs,id:Cf(s),dir:o(`dir`)})},getDescriptionProps(){return t.element({..._f.description.attrs,id:wf(s),dir:o(`dir`)})},getCloseTriggerProps(){return t.button({..._f.closeTrigger.attrs,dir:o(`dir`),id:Tf(s),type:`button`,"aria-label":c.closeTriggerLabel,onClick(e){e.defaultPrevented||(e.stopPropagation(),i({type:`CLOSE`}))}})}}}var If=z({props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,restoreFocus:!0,...e,positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:kf(n,e)})}}))}},computed:{currentPortalled:({prop:e})=>!!e(`modal`)||!!e(`portalled`)},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`toggleVisibility`])})},entry:[`checkRenderedElements`],on:{"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`,`reposition`]}},states:{closed:{on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}]}},open:{effects:[`trapFocus`,`preventScroll`,`hideContentBelow`,`trackDismissableElement`,`trackPositioning`,`proxyTabFocus`],on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){e.set(`currentPlacement`,t(`positioning`).placement);let r=Ef(n);return Kl(()=>r??kf(n,e.get(`triggerValue`)),()=>jf(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){let r=()=>Af(n),i=!0;return Wu(r,{type:`popover`,pointerBlocking:t(`modal`),exclude:[Df(n),...Of(n)].filter(Boolean),defer:!0,onEscapeKeyDown(e){t(`onEscapeKeyDown`)?.(e),!t(`closeOnEscape`)&&e.preventDefault()},onInteractOutside(e){t(`onInteractOutside`)?.(e),!e.defaultPrevented&&(i=!(e.detail.focusable||e.detail.contextmenu),t(`closeOnInteractOutside`)||e.preventDefault())},onPointerDownOutside:t(`onPointerDownOutside`),onFocusOutside:t(`onFocusOutside`),persistentElements:t(`persistentElements`),onRequestDismiss:t(`onRequestDismiss`),onDismiss(){e({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},proxyTabFocus({prop:e,scope:t,context:n}){return e(`modal`)||!e(`portalled`)?void 0:ri(()=>Af(t),{triggerElement:kf(t,n.get(`triggerValue`)),defer:!0,getShadowRoot:!0,onFocus(e){e.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t,context:n}){return e(`modal`)?Vd(()=>[Af(t),kf(t,n.get(`triggerValue`))],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e(`modal`))return lf(t.getDoc())},trapFocus({prop:e,scope:t,context:n}){return e(`modal`)?tf(()=>Af(t),{preventScroll:!0,returnFocusOnDeactivate:!!e(`restoreFocus`),initialFocus:()=>Br({root:Af(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)}),setReturnFocus:r=>{let i=e(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let e=kf(t,a);if(e)return e}return Of(t)[0]||r},getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){let i=Ef(n);Kl(()=>i??kf(n,r.get(`triggerValue`)),()=>jf(n),{...t(`positioning`),...e.options,defer:!0,listeners:!1,onComplete(e){r.set(`currentPlacement`,e.placement)}})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},checkRenderedElements({context:e,scope:t}){L(()=>{Object.assign(e.get(`renderedElements`),{title:!!Mf(t),description:!!Nf(t)})})},setInitialFocus({prop:e,scope:t}){e(`modal`)||L(()=>{Br({root:Af(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)})?.focus({preventScroll:!0})})},setFinalFocus({event:e,prop:t,scope:n,context:r}){let i=e.restoreFocus??e.previousEvent?.restoreFocus;(i==null||i)&&t(`restoreFocus`)&&L(()=>{let e=t(`finalFocusEl`)?.();if(e){e.focus({preventScroll:!0});return}kf(n,r.get(`triggerValue`))?.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}}),Lf={class:`k-dropdown`},Rf=E({__name:`KDropdown`,props:{modelValue:{type:Boolean,default:void 0},label:{type:String,default:``},icon:{type:String,default:``},iconEnd:{type:String,default:void 0},variant:{type:String,default:`secondary`},size:{type:String,default:`md`},align:{type:String,default:`end`},placement:{type:String,default:``},width:{type:String,default:`13rem`},closeOnSelect:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>r.label?r.icon:r.icon||`more`),o=(0,t.computed)(()=>r.label?r.iconEnd??`chevron-down`:``),s=V(If,{id:(0,t.useId)(),get positioning(){return{placement:r.placement||(r.align===`start`?`bottom-start`:`bottom-end`)}},get open(){return r.modelValue},onOpenChange(e){i(`update:modelValue`,e.open)}}),c=(0,t.computed)(()=>Ff(s,B));function l(){c.value.setOpen(!1)}function u(e){r.closeOnSelect&&e.target.closest(`[data-k-menu-item]`)&&l()}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Lf,[(0,t.renderSlot)(n.$slots,`trigger`,{props:c.value.getTriggerProps(),open:c.value.open},()=>[(0,t.createVNode)(At,(0,t.mergeProps)(c.value.getTriggerProps(),{variant:e.variant,size:e.size,icon:a.value,"icon-end":o.value,disabled:e.disabled}),(0,t.createSlots)({_:2},[e.label?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)]),key:`0`}:void 0]),1040,[`variant`,`size`,`icon`,`icon-end`,`disabled`])],!0),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.normalizeProps)((0,t.guardReactiveProps)(c.value.getPositionerProps())),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-dropdown__menu`,style:{minWidth:e.width}},c.value.getContentProps(),{onClick:u}),[(0,t.renderSlot)(n.$slots,`default`,{close:l},void 0,!0)],16)],16)]))]))}},[[`__scopeId`,`data-v-fa73f15e`]]),zf={class:`k-empty`},Bf={class:`k-empty__icon`},Vf={class:`k-empty__title`},Hf={key:0,class:`k-empty__desc`},Uf={key:1,class:`k-empty__actions`},Wf=E({__name:`KEmpty`,props:{icon:{type:String,default:`search`},title:{type:String,default:`Ничего не найдено`},description:{type:String,default:``}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,zf,[(0,t.createElementVNode)(`span`,Bf,[(0,t.createVNode)(D,{name:e.icon,size:24},null,8,[`name`])]),(0,t.createElementVNode)(`p`,Vf,(0,t.toDisplayString)(e.title),1),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Hf,(0,t.toDisplayString)(e.description),1)):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Uf,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-f3632906`]]),Z=O(`file-upload`).parts(`root`,`dropzone`,`item`,`itemDeleteTrigger`,`itemGroup`,`itemName`,`itemPreview`,`itemPreviewImage`,`itemSizeText`,`label`,`trigger`,`clearTrigger`).build(),Gf=e=>typeof e.getAsEntry==`function`?e.getAsEntry():typeof e.webkitGetAsEntry==`function`?e.webkitGetAsEntry():null,Kf=e=>e.isDirectory,qf=e=>e.isFile,Jf=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),Yf=(e,t)=>Promise.all(Array.from(e).filter(e=>e.kind===`file`).map(e=>{let n=Gf(e);if(!n)return null;if(Kf(n)&&t)return Xf(n.createReader(),`${n.name}`);if(qf(n)&&typeof e.getAsFile==`function`){let t=e.getAsFile();return Promise.resolve(t?Jf(t,``):null)}if(qf(n))return new Promise(e=>{n.file(t=>{e(Jf(t,``))})})}).filter(e=>e)),Xf=(e,t=``)=>new Promise(n=>{let r=[],i=()=>{e.readEntries(e=>{if(e.length===0){n(Promise.all(r).then(e=>e.flat()));return}let a=e.map(e=>{if(!e)return null;if(Kf(e))return Xf(e.createReader(),`${t}${e.name}`);if(qf(e))return new Promise(n=>{e.file(e=>{n(Jf(e,t))})})}).filter(e=>e);r.push(Promise.all(a)),i()})};i()});function Zf(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||/\w+\/[-+.\w]+/g.test(e)}function Qf(e){return/^.*\.[\w]+$/.test(e)}var $f=e=>Zf(e)||Qf(e);function ep(e){if(e!=null)return typeof e==`string`?e:Array.isArray(e)?e.filter($f).join(`,`):Object.entries(e).reduce((e,[t,n])=>[...e,t,...n],[]).filter($f).join(`,`)}var tp=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,np=e=>e!=null;function rp(e,t,n){if(np(e.size)){if(np(t)&&np(n)){if(e.size>n)return[!1,`FILE_TOO_LARGE`];if(e.size<t)return[!1,`FILE_TOO_SMALL`]}else if(np(t)&&e.size<t)return[!1,`FILE_TOO_SMALL`];else if(np(n)&&e.size>n)return[!1,`FILE_TOO_LARGE`]}return[!0,null]}var ip=new Map(`3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip`.split(`[`).flatMap(e=>{let[t,n]=e.split(`_`);return t.split(`,`).map(e=>[e,n])}));function ap(e){let t=e.split(`.`).pop();return t&&ip.get(t)||null}function op(e,t){if(e&&t){let n=Array.isArray(t)?t:typeof t==`string`?t.split(`,`):[];if(n.length===0)return!0;let r=e.name||``,i=(e.type||ap(r)||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}function sp(e,t){let n=e.type===`application/x-moz-file`||op(e,t);return[n,n?null:`FILE_INVALID_TYPE`]}function cp(e){let t=new Map;return function(n,r){let i=n+(r?Object.entries(r).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(t.has(i))return t.get(i);let a=new e(n,r);return t.set(i,a),a}}var lp=cp(Intl.NumberFormat);function up(e,t,n={}){return lp(t,n).format(e)}var dp=[``,`kilo`,`mega`,`giga`,`tera`],fp=[``,`kilo`,`mega`,`giga`,`tera`,`peta`],pp=(e,t=`en-US`,n={})=>{if(Number.isNaN(e))return``;if(e===0)return`0 B`;let{unitSystem:r=`decimal`,precision:i=3,unit:a=`byte`,unitDisplay:o=`short`}=n,s=r===`binary`?1024:1e3,c=a===`bit`?dp:fp,l=e<0,u=Math.abs(e),d=0;for(;u>=s&&d<c.length-1;)u/=s,d++;let f=parseFloat(u.toPrecision(i));return up(l?-f:f,t,{style:`unit`,unit:c[d]+a,unitDisplay:o})},mp=e=>e.ids?.root??`file:${e.id}`,hp=e=>e.ids?.dropzone??`file:${e.id}:dropzone`,gp=e=>e.ids?.hiddenInput??`file:${e.id}:input`,_p=e=>e.ids?.trigger??`file:${e.id}:trigger`,vp=e=>e.ids?.label??`file:${e.id}:label`,yp=(e,t)=>e.ids?.item?.(t)??`file:${e.id}:item:${t}`,bp=(e,t)=>e.ids?.itemName?.(t)??`file:${e.id}:item-name:${t}`,xp=(e,t)=>e.ids?.itemSizeText?.(t)??`file:${e.id}:item-size:${t}`,Sp=(e,t)=>e.ids?.itemPreview?.(t)??`file:${e.id}:item-preview:${t}`,Cp=(e,t)=>e.ids?.itemDeleteTrigger?.(t)??`file:${e.id}:item-delete:${t}`,wp=e=>Ja(`${e.name}-${e.size}`),Tp=e=>e.getById(mp(e)),Ep=e=>e.getById(gp(e)),Dp=e=>e.getById(hp(e));function Op(e){let t=P(e);return e.dataTransfer?e.dataTransfer.types.some(e=>e===`Files`||e===`application/x-moz-file`):!!t&&`files`in t}function kp(e,t,n){let{prop:r,computed:i}=e;return!i(`multiple`)&&t>1?!1:!i(`multiple`)&&t+n.length===2||!(t+n.length>r(`maxFiles`))}function Ap(e,t,n=[],r=[]){let{prop:i,computed:a}=e,o=[],s=[],c={acceptedFiles:n,rejectedFiles:r};return t.forEach(e=>{let[t,r]=sp(e,a(`acceptAttr`)),[l,u]=rp(e,i(`minFileSize`),i(`maxFileSize`)),d=n.some(t=>tp(t,e))||o.some(t=>tp(t,e)),f=i(`validate`)?.(e,c),p=!f||f.length===0;if(t&&l&&p&&!d)o.push(e);else{let t=[r,u];d&&t.push(`FILE_EXISTS`),p||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}}),kp(e,o.length,n)||(o.forEach(e=>{s.push({file:e,errors:[`TOO_MANY_FILES`]})}),o.splice(0)),{acceptedFiles:o,rejectedFiles:s}}function jp(e,t){let n=N(e);try{if(`DataTransfer`in n){let r=new n.DataTransfer;t.forEach(e=>{r.items.add(e)}),e.files=r.files}}catch{}}var Mp={dropzone:`dropzone`,itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`},Np=`accepted`,Pp=`button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]`;function Fp(e,t){if(!e||e.getAttribute(`type`)===`file`)return!1;let n=e.closest(Pp);return n!=t&&j(t,n)}function Ip(e,t){let{state:n,send:r,prop:i,computed:a,scope:o,context:s}=e,c=!!i(`disabled`),l=!!i(`readOnly`),u=!!i(`required`),d=i(`allowDrop`),f=co(Mp,i(`translations`)),p=n.matches(`dragging`),m=n.matches(`focused`)&&!c,h=s.get(`acceptedFiles`),g=i(`maxFiles`);return{dragging:p,focused:m,disabled:c,readOnly:l,transforming:s.get(`transforming`),maxFilesReached:h.length>=g,remainingFiles:Math.max(0,g-h.length),openFilePicker(){c||l||r({type:`OPEN`})},deleteFile(e,t=Np){c||l||r({type:`FILE.DELETE`,file:e,itemType:t})},acceptedFiles:h,rejectedFiles:s.get(`rejectedFiles`),setFiles(e){c||l||r({type:`FILES.SET`,files:e,count:e.length})},clearRejectedFiles(){c||l||r({type:`REJECTED_FILES.CLEAR`})},clearFiles(){c||l||r({type:`FILES.CLEAR`})},getFileSize(e){return pp(e.size,i(`locale`))},createFileUrl(e,t){let n=o.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(c||l)return!1;let t=Array.from(e?.items??[]).reduce((e,t)=>{if(t.kind!==`file`)return e;let n=t.getAsFile();return n?[...e,n]:e},[]);return t.length?(r({type:`FILE.SELECT`,files:t}),!0):!1},getRootProps(){return t.element({...Z.root.attrs,dir:i(`dir`),id:mp(o),"data-disabled":k(c),"data-readonly":k(l),"data-dragging":k(p)})},getDropzoneProps(e={}){return t.element({...Z.dropzone.attrs,dir:i(`dir`),id:hp(o),tabIndex:c||l||e.disableClick?void 0:0,role:e.disableClick?`application`:`button`,"aria-label":f.dropzone,"aria-disabled":c||l||void 0,"data-invalid":k(i(`invalid`)),"data-disabled":k(c),"data-readonly":k(l),"data-dragging":k(p),onKeyDown(t){if(c||l||t.defaultPrevented)return;let n=P(t);j(t.currentTarget,n)&&(Fp(n,t.currentTarget)||e.disableClick||(t.key===`Enter`||t.key===` `)&&r({type:`DROPZONE.CLICK`,src:`keydown`}))},onClick(t){if(c||l||t.defaultPrevented||e.disableClick)return;let n=P(t);j(t.currentTarget,n)&&(Fp(n,t.currentTarget)||(t.currentTarget.localName===`label`&&t.preventDefault(),r({type:`DROPZONE.CLICK`})))},onDragOver(e){if(c||l||!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect=`copy`}catch{}if(!Op(e))return;let t=e.dataTransfer.items.length;r({type:`DROPZONE.DRAG_OVER`,count:t})},onDragLeave(e){c||l||d&&(j(e.currentTarget,e.relatedTarget)||r({type:`DROPZONE.DRAG_LEAVE`}))},onDrop(e){c||l||(d&&(e.preventDefault(),e.stopPropagation()),Op(e)&&Yf(e.dataTransfer.items,i(`directory`)).then(e=>{r({type:`DROPZONE.DROP`,files:ba(e)})}))},onFocus(){c||l||r({type:`DROPZONE.FOCUS`})},onBlur(){c||l||r({type:`DROPZONE.BLUR`})}})},getTriggerProps(){return t.button({...Z.trigger.attrs,dir:i(`dir`),id:_p(o),disabled:c||l,"data-disabled":k(c),"data-readonly":k(l),"data-invalid":k(i(`invalid`)),type:`button`,onClick(e){c||l||(j(Dp(o),e.currentTarget)&&e.stopPropagation(),r({type:`OPEN`}))}})},getHiddenInputProps(){return t.input({id:gp(o),tabIndex:-1,disabled:c||l,type:`file`,required:i(`required`),capture:i(`capture`),name:i(`name`),accept:a(`acceptAttr`),webkitdirectory:i(`directory`)?``:void 0,multiple:a(`multiple`)||i(`maxFiles`)>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=``},onInput(e){if(c||l)return;let{files:t}=e.currentTarget;r({type:`FILE.SELECT`,files:t?Array.from(t):[]})},style:Ti})},getItemGroupProps(e={}){let{type:n=Np}=e;return t.element({...Z.itemGroup.attrs,dir:i(`dir`),"data-disabled":k(c),"data-type":n})},getItemProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.item.attrs,dir:i(`dir`),id:yp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemNameProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.itemName.attrs,dir:i(`dir`),id:bp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemSizeTextProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.itemSizeText.attrs,dir:i(`dir`),id:xp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemPreviewProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.itemPreview.attrs,dir:i(`dir`),id:Sp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemPreviewImageProps(e){let{file:n,url:r,type:i=Np}=e;if(!n.type.startsWith(`image/`))throw Error(`Preview Image is only supported for image files`);return t.img({...Z.itemPreviewImage.attrs,alt:f.itemPreview?.(n),src:r,"data-disabled":k(c),"data-type":i})},getItemDeleteTriggerProps(e){let{file:n,type:a=Np}=e;return t.button({...Z.itemDeleteTrigger.attrs,dir:i(`dir`),id:Cp(o,wp(n)),type:`button`,disabled:c||l,"data-disabled":k(c),"data-readonly":k(l),"data-type":a,"aria-label":f.deleteFile?.(n),onClick(){c||l||r({type:`FILE.DELETE`,file:n,itemType:a})}})},getLabelProps(){return t.label({...Z.label.attrs,dir:i(`dir`),id:vp(o),htmlFor:gp(o),"data-disabled":k(c),"data-invalid":k(i(`invalid`)),"data-required":k(u)})},getClearTriggerProps(){return t.button({...Z.clearTrigger.attrs,dir:i(`dir`),type:`button`,disabled:c||l,hidden:h.length===0,"data-disabled":k(c),"data-readonly":k(l),onClick(e){e.defaultPrevented||c||l||r({type:`FILES.CLEAR`})}})}}}var Lp=z({props({props:e}){return{minFileSize:0,maxFileSize:1/0,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e(`defaultAcceptedFiles`),value:e(`acceptedFiles`),isEqual:(e,t)=>e.length===t?.length&&e.every((e,n)=>tp(e,t[n])),hash(e){return e.map(e=>`${e.name}-${e.size}`).join(`,`)},onChange(t){let r=n();e(`onFileAccept`)?.({files:t}),e(`onFileChange`)?.({acceptedFiles:t,rejectedFiles:r.get(`rejectedFiles`)})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(e,t)=>e.length===t?.length&&e.every((e,n)=>tp(e.file,t[n].file)),onChange(t){let r=n();e(`onFileReject`)?.({files:t}),e(`onFileChange`)?.({acceptedFiles:r.get(`acceptedFiles`),rejectedFiles:t})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>ep(e(`accept`)),multiple:({prop:e})=>e(`maxFiles`)>1},watch({track:e,context:t,action:n}){e([()=>t.hash(`acceptedFiles`)],()=>{n([`syncInputElement`])})},on:{"FILES.SET":{actions:[`setFiles`]},"FILE.SELECT":{actions:[`setEventFiles`]},"FILE.DELETE":{actions:[`removeFile`]},"FILES.CLEAR":{actions:[`clearFiles`]},"REJECTED_FILES.CLEAR":{actions:[`clearRejectedFiles`]}},effects:[`preventDocumentDrop`],states:{idle:{on:{OPEN:{actions:[`openFilePicker`]},"DROPZONE.CLICK":{actions:[`openFilePicker`]},"DROPZONE.FOCUS":{target:`focused`},"DROPZONE.DRAG_OVER":{target:`dragging`}}},focused:{on:{"DROPZONE.BLUR":{target:`idle`},OPEN:{actions:[`openFilePicker`]},"DROPZONE.CLICK":{actions:[`openFilePicker`]},"DROPZONE.DRAG_OVER":{target:`dragging`}}},dragging:{on:{"DROPZONE.DROP":{target:`idle`,actions:[`setEventFiles`]},"DROPZONE.DRAG_LEAVE":{target:`idle`}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e(`preventDocumentDrop`)||!e(`allowDrop`)||e(`disabled`))return;let n=t.getDoc();return Ha(F(n,`dragover`,e=>{e?.preventDefault()},!1),F(n,`drop`,e=>{j(Tp(t),P(e))||e.preventDefault()},!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{let n=Ep(e);if(!n)return;jp(n,t.get(`acceptedFiles`));let r=e.getWin();n.dispatchEvent(new r.Event(`change`,{bubbles:!0}))})},openFilePicker({scope:e}){L(()=>{Ep(e)?.click()})},setFiles(e){let{computed:t,context:n,event:r}=e,{acceptedFiles:i,rejectedFiles:a}=Ap(e,r.files);n.set(`acceptedFiles`,t(`multiple`)?i:i.length>0?[i[0]]:[]),n.set(`rejectedFiles`,a)},setEventFiles(e){let{computed:t,context:n,event:r,prop:i}=e,a=n.get(`acceptedFiles`),o=n.get(`rejectedFiles`),{acceptedFiles:s,rejectedFiles:c}=Ap(e,r.files,a,o),l=e=>{if(t(`multiple`)){n.set(`acceptedFiles`,t=>[...t,...e]),n.set(`rejectedFiles`,c);return}if(e.length){n.set(`acceptedFiles`,[e[0]]),n.set(`rejectedFiles`,c);return}c.length&&(n.set(`acceptedFiles`,n.get(`acceptedFiles`)),n.set(`rejectedFiles`,c))},u=i(`transformFiles`);u?(n.set(`transforming`,!0),u(s).then(l).catch(e=>{ho(`[zag-js/file-upload] error transforming files
|
|
2
|
-
${e}`)}).finally(()=>{n.set(`transforming`,!1)})):l(s)},removeFile({context:e,event:t}){if(t.itemType===`rejected`){let n=e.get(`rejectedFiles`).filter(e=>!tp(e.file,t.file));e.set(`rejectedFiles`,n)}else{let n=e.get(`acceptedFiles`).filter(e=>!tp(e,t.file));e.set(`acceptedFiles`,n)}},clearRejectedFiles({context:e}){e.set(`rejectedFiles`,[])},clearFiles({context:e}){e.set(`acceptedFiles`,[]),e.set(`rejectedFiles`,[])}}}}),Rp={class:`k-upload__label`},zp={key:0,class:`k-upload__hint`},Bp=E({__name:`KFileUpload`,props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:`Перетащите файлы или нажмите для выбора`},hint:{type:String,default:``},accept:{type:String,default:``},multiple:{type:Boolean,default:!0},maxFileSize:{type:Number,default:1/0},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`,`reject`],setup(e,{emit:n}){let r=e,i=n,a=V(Lp,{id:(0,t.useId)(),locale:`ru-RU`,get accept(){return r.accept?r.accept.split(`,`).map(e=>e.trim()).filter(Boolean):void 0},get maxFiles(){return r.multiple?1/0:1},get maxFileSize(){return r.maxFileSize},get disabled(){return r.disabled},get acceptedFiles(){return r.modelValue},onFileChange({acceptedFiles:e,rejectedFiles:t}){i(`update:modelValue`,e),t.length&&i(`reject`,t)}}),o=(0,t.computed)(()=>Ip(a,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-upload`},o.value.getRootProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-upload__zone`},o.value.getDropzoneProps()),[(0,t.createVNode)(D,{name:`upload`,size:20,class:`k-upload__icon`}),(0,t.createElementVNode)(`span`,Rp,(0,t.toDisplayString)(e.label),1),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,zp,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16),(0,t.createElementVNode)(`input`,(0,t.normalizeProps)((0,t.guardReactiveProps)(o.value.getHiddenInputProps())),null,16),o.value.acceptedFiles.length?((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,(0,t.mergeProps)({key:0,class:`k-upload__list`},o.value.getItemGroupProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.value.acceptedFiles,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:`${e.name}-${e.size}-${e.lastModified}`,class:`k-upload__file`},{ref_for:!0},o.value.getItemProps({file:e})),[(0,t.createVNode)(D,{name:`document`,size:16,class:`k-upload__file-icon`}),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-upload__file-name`},{ref_for:!0},o.value.getItemNameProps({file:e})),(0,t.toDisplayString)(e.name),17),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-upload__file-size`},{ref_for:!0},o.value.getItemSizeTextProps({file:e})),(0,t.toDisplayString)(o.value.getFileSize(e)),17),(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-upload__remove`,"aria-label":`Удалить`},{ref_for:!0},o.value.getItemDeleteTriggerProps({file:e})),[(0,t.createVNode)(D,{name:`close`,size:14})],16)],16))),128))],16)):(0,t.createCommentVNode)(``,!0)],16))}},[[`__scopeId`,`data-v-e38c669e`]]),Vp={class:`k-filterbar`},Hp={class:`k-filterbar__row`},Up={key:0,class:`k-filterbar__search`},Wp={class:`k-filterbar__fields`},Gp={key:1,class:`k-filterbar__actions`},Kp={key:0,class:`k-filterbar__chips`},qp=[`onClick`],Jp=E({__name:`KFilterBar`,props:{active:{type:Array,default:()=>[]}},emits:[`remove`,`reset`],setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Vp,[(0,t.createElementVNode)(`div`,Hp,[n.$slots.search?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Up,[(0,t.renderSlot)(n.$slots,`search`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Wp,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Gp,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),e.active.length?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Kp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.active,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:e.key,class:`k-filterbar__chip`},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label)+` `,1),(0,t.createElementVNode)(`button`,{class:`k-filterbar__chip-x`,"aria-label":`Убрать фильтр`,onClick:t=>n.$emit(`remove`,e)},[(0,t.createVNode)(D,{name:`close`,size:12})],8,qp)]))),128)),(0,t.createElementVNode)(`button`,{class:`k-filterbar__reset`,onClick:r[0]||=e=>n.$emit(`reset`)},`Сбросить всё`)])):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-f1d38124`]]),Yp=O(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`).build(),Xp=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`tooltip:${e.id}:trigger:${t}`:`tooltip:${e.id}:trigger`:Aa(n)?n(t):n},Zp=e=>e.ids?.content??`tooltip:${e.id}:content`,Qp=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,$p=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,em=e=>e.getById(Xp(e)),tm=e=>e.getById($p(e)),nm=e=>ii(e.getRootNode(),`[data-scope="tooltip"][data-part="trigger"]${tn(e.id)}`),rm=(e,t)=>t==null?em(e)??nm(e)[0]:e.getById(Xp(e,t)),Q=lo({id:null,prevId:null,instant:!1});function im(e,t){let{state:n,context:r,send:i,scope:a,prop:o,event:s}=e,c=o(`id`),l=!!o(`aria-label`),u=n.matches(`open`,`closing`),d=r.get(`triggerValue`),f=r.get(`currentPlacement`),p=f?kl(f):void 0,m=Zp(a),h=o(`disabled`),g=Jl({...o(`positioning`),placement:f});return{open:u,setOpen(e){n.matches(`open`,`closing`)!==e&&i({type:e?`open`:`close`})},triggerValue:d,setTriggerValue(e){i({type:`triggerValue.set`,value:e??void 0})},reposition(e={}){i({type:`positioning.set`,options:e})},getTriggerProps(e={}){let{value:n}=e,r=n!=null&&d===n,s=Xp(a,n);return t.button({...Yp.trigger.attrs,id:s,"data-ownedby":a.id,"data-value":n,"data-current":k(r),dir:o(`dir`),"data-expanded":k(u),"data-state":u?`open`:`closed`,"aria-describedby":u?m:void 0,onClick(e){e.defaultPrevented||h||o(`closeOnClick`)&&i({type:u&&n!=null&&!r?`triggerValue.set`:`close`,src:`trigger.click`,value:n,triggerId:s})},onFocus(e){e.defaultPrevented||h||Xi()&&i({type:u&&n!=null&&!r?`triggerValue.set`:`open`,src:`trigger.focus`,value:n,triggerId:s})},onBlur(e){e.defaultPrevented||h||c===Q.get(`id`)&&((e.relatedTarget??a.getDoc().activeElement)?.closest(tn(a.id))??i({type:`close`,src:`trigger.blur`,value:n,triggerId:s}))},onPointerDown(e){e.defaultPrevented||h||sr(e)&&o(`closeOnPointerDown`)&&c===Q.get(`id`)&&i({type:`close`,src:`trigger.pointerdown`,value:n,triggerId:s})},onPointerMove(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:u&&n!=null&&!r?`triggerValue.set`:`pointer.move`,value:n,triggerId:s})},onPointerOver(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:`pointer.move`,value:n,triggerId:s})},onPointerLeave(){h||i({type:`pointer.leave`})},onPointerCancel(){h||i({type:`pointer.leave`})}})},getArrowProps(){return t.element({id:Qp(a),...Yp.arrow.attrs,dir:o(`dir`),style:g.arrow})},getArrowTipProps(){return t.element({...Yp.arrowTip.attrs,dir:o(`dir`),style:g.arrowTip})},getPositionerProps(){return t.element({id:$p(a),...Yp.positioner.attrs,dir:o(`dir`),style:g.floating})},getContentProps(){let e=Q.get(`id`)===c,n=Q.get(`prevId`)===c,r=Q.get(`instant`)&&(u&&e||n);return t.element({...Yp.content.attrs,dir:o(`dir`),hidden:!u,"data-state":u?`open`:`closed`,"data-instant":k(r),role:l?void 0:`tooltip`,id:l?void 0:m,"data-placement":f,"data-side":p,onPointerEnter(){i({type:`content.pointer.move`})},onPointerLeave(){i({type:`content.pointer.leave`})},style:{pointerEvents:o(`interactive`)?`auto`:`none`}})}}}var{and:am,not:om}=Ho(),sm=z({initialState:({prop:e})=>e(`open`)||e(`defaultOpen`)?`open`:`closed`,props({props:e}){vo(e,[`id`]);let t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:`bottom`,...e.positioning}}},effects:[`trackFocusVisible`,`trackStore`],context:({bindable:e,prop:t,scope:n})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:null})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:rm(n,e)})}}))}),watch({track:e,action:t,prop:n}){e([()=>n(`disabled`)],()=>{t([`closeIfDisabled`])}),e([()=>n(`open`)],()=>{t([`toggleVisibility`])}),e([()=>n(`triggerValue`)],()=>{t([`repositionImmediate`])})},on:{"triggerValue.set":{actions:[`setTriggerValue`,`repositionImmediate`]}},states:{closed:{entry:[`clearGlobalId`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":{actions:[`clearPointerMoveOpened`]},"pointer.move":[{guard:am(`noVisibleTooltip`,om(`hasPointerMoveOpened`)),target:`opening`,actions:[`setTriggerValue`]},{guard:om(`hasPointerMoveOpened`),target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`,`setTriggerValue`]}]}},opening:{effects:[`trackScroll`,`trackPointerlockChange`,`waitForOpenDelay`],on:{"after.openDelay":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"controlled.open":{target:`open`},"controlled.close":{target:`closed`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":[{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`invokeOnClose`]}]}},open:{effects:[`trackEscapeKey`,`trackScroll`,`trackPointerlockChange`,`trackPositioning`],entry:[`setGlobalId`],on:{"controlled.close":{target:`closed`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.leave":[{guard:`isVisible`,target:`closing`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],"content.pointer.leave":{guard:`isInteractive`,target:`closing`},"positioning.set":{actions:[`reposition`]},"triggerValue.set":{target:`closing`,actions:[`setTriggerValue`,`immediateReopen`]}}},closing:{effects:[`trackPositioning`,`waitForCloseDelay`],on:{"after.closeDelay":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"controlled.close":{target:`closed`},"controlled.open":{target:`open`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.move":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`,`toggleVisibility`]},{target:`open`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`]}],"triggerValue.set":{target:`open`,actions:[`setTriggerValue`,`repositionImmediate`]},reopen:{target:`open`},"content.pointer.move":{guard:`isInteractive`,target:`open`},"positioning.set":{actions:[`reposition`]}}}},implementations:{guards:{noVisibleTooltip:()=>Q.get(`id`)===null,isVisible:({prop:e})=>e(`id`)===Q.get(`id`),isInteractive:({prop:e})=>!!e(`interactive`),hasPointerMoveOpened:({context:e})=>!!e.get(`hasPointerMoveOpened`),isOpenControlled:({prop:e})=>e(`open`)!==void 0},actions:{setGlobalId:({prop:e})=>{let t=Q.get(`id`),n=t!==null&&t!==e(`id`);Q.update({id:e(`id`),prevId:n?t:null,instant:n})},clearGlobalId:({prop:e})=>{e(`id`)===Q.get(`id`)&&Q.update({id:null,prevId:null,instant:!1})},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e(`disabled`)&&t({type:`close`,src:`disabled.change`})},reposition:({context:e,event:t,prop:n,scope:r})=>{t.type===`positioning.set`&&Kl(()=>rm(r,e.get(`triggerValue`)),()=>tm(r),{...n(`positioning`),...t.options,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},repositionImmediate:({context:e,event:t,prop:n,scope:r})=>{let i=t.value??e.get(`triggerValue`);return Kl(()=>rm(r,i),()=>tm(r),{...n(`positioning`),onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e(`open`)?`controlled.open`:`controlled.close`,previousEvent:t})})},setPointerMoveOpened:({context:e,event:t})=>{let n=t.triggerId??t.previousEvent?.triggerId;e.set(`hasPointerMoveOpened`,n??null)},clearPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,null)},setTriggerValue:({context:e,event:t})=>{t.value!==void 0&&e.set(`triggerValue`,t.value)},immediateReopen:({send:e})=>{queueMicrotask(()=>{e({type:`reopen`})})}},effects:{trackFocusVisible:({scope:e})=>Zi({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),Kl(()=>rm(n,e.get(`triggerValue`)),()=>tm(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>F(t.getDoc(),`pointerlockchange`,()=>e({type:`close`,src:`pointerlock:change`}),!1),trackScroll:({send:e,prop:t,scope:n,context:r})=>{if(!t(`closeOnScroll`))return;let i=rm(n,r.get(`triggerValue`));if(!i)return;let a=Yr(i).map(t=>F(t,`scroll`,()=>{e({type:`close`,src:`scroll`})},{passive:!0,capture:!0}));return()=>{a.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=Q.subscribe(()=>{Q.get(`id`)!==e(`id`)&&t({type:`close`,src:`id.change`})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t(`closeOnEscape`)?F(document,`keydown`,t=>{ir(t)||t.key===`Escape`&&(t.stopPropagation(),e({type:`close`,src:`keydown.escape`}))},!0):void 0,waitForOpenDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.openDelay`,previousEvent:n})},t(`openDelay`));return()=>clearTimeout(r)},waitForCloseDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.closeDelay`,previousEvent:n})},t(`closeDelay`));return()=>clearTimeout(r)}}}}),cm=E({__name:`KTooltip`,props:{text:{type:String,default:``},placement:{type:String,default:`top`},openDelay:{type:Number,default:300},closeDelay:{type:Number,default:100},disabled:{type:Boolean,default:!1}},setup(e){let n=e,r=V(sm,{id:(0,t.useId)(),get positioning(){return{placement:n.placement}},get openDelay(){return n.openDelay},get closeDelay(){return n.closeDelay},get disabled(){return n.disabled}}),i=(0,t.computed)(()=>im(r,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-tooltip`,tabindex:`0`},i.value.getTriggerProps()),[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)],16),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[i.value.open?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.normalizeProps)((0,t.mergeProps)({key:0},i.value.getPositionerProps())),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-tooltip__bubble`},i.value.getContentProps()),[(0,t.renderSlot)(n.$slots,`content`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.text),1)],!0)],16)],16)):(0,t.createCommentVNode)(``,!0)]))],64))}},[[`__scopeId`,`data-v-e8bb1df5`]]),lm={class:`k-gantt`},um={class:`k-gantt__scroll`},dm={class:`k-gantt__corner`},fm={class:`k-gantt__month`},pm={class:`k-gantt__date`},mm={class:`k-gantt__wd`},hm={key:0,class:`k-gantt__empty`},gm=[`onClick`],_m={class:`k-gantt__group-name`},vm={class:`k-gantt__count`},ym=[`onClick`,`onKeydown`],bm={key:0,class:`k-gantt__code`},xm={class:`k-gantt__title`},Sm={class:`k-gantt__hint`},Cm=E({__name:`KGantt`,props:{items:{type:Array,default:()=>[]},groups:{type:Array,default:()=>[]},from:{type:String,required:!0},to:{type:String,required:!0},today:{type:String,default:()=>new Date(Date.now()-new Date().getTimezoneOffset()*6e4).toISOString().slice(0,10)},weekends:{type:Boolean,default:!1},dayWidth:{type:Number,default:56},labelWidth:{type:String,default:`18rem`},emptyText:{type:String,default:`Нет задач в этом периоде`},selected:{type:[String,Number],default:null}},emits:[`item-click`],setup(e,{emit:n}){let r=e,i=n,a=[`вс`,`пн`,`вт`,`ср`,`чт`,`пт`,`сб`],o=[`янв`,`фев`,`мар`,`апр`,`май`,`июн`,`июл`,`авг`,`сен`,`окт`,`ноя`,`дек`],s=e=>new Date(`${e}T00:00:00Z`),c=(e,t)=>new Date(s(e).getTime()+t*864e5).toISOString().slice(0,10),l=(0,t.computed)(()=>{let e=[];for(let t=r.from;t<=r.to;t=c(t,1)){let n=s(t).getUTCDay(),i=n===0||n===6;(!i||r.weekends)&&e.push({iso:t,wd:n,weekend:i,date:s(t).getUTCDate(),month:s(t).getUTCMonth()})}return e.map((t,n)=>({...t,monthStart:n===0||t.month!==e[n-1].month}))}),u=(0,t.computed)(()=>l.value.findIndex(e=>e.iso===r.today));function d(e,t){let n=e||t,i=t||e;if(!n||i<r.from||n>r.to)return null;let a=l.value,o=a.findIndex(e=>e.iso>=n),s=-1;for(let e=a.length-1;e>=0;e--)if(a[e].iso<=i){s=e;break}return o<0||s<o?null:{first:o,last:s,cutStart:n<r.from,cutEnd:i>r.to}}function f(e){return(e.segments?.length?e.segments:[{start:e.start,end:e.end}]).map(e=>d(e.start,e.end)).filter(Boolean)}let p=(0,t.ref)(new Set);function m(e){let t=new Set(p.value);t.has(e)?t.delete(e):t.add(e),p.value=t}let h=(0,t.computed)(()=>{let e=[];if(!r.groups.length){for(let t of r.items)e.push({type:`item`,key:t.key,item:t,bars:f(t)});return e}for(let t of r.groups){let n=r.items.filter(e=>e.group===t.key),i=n.flatMap(f),a=i.length?{first:Math.min(...i.map(e=>e.first)),last:Math.max(...i.map(e=>e.last))}:null,o=p.value.has(t.key);if(e.push({type:`group`,key:`g:${t.key}`,group:t,items:n,summary:a,collapsed:o}),!o)for(let r of n)e.push({type:`item`,key:`${t.key}:${r.key}`,item:r,bars:f(r)})}return e}),g=(0,t.computed)(()=>({"--k-gantt-day-w":`${r.dayWidth}px`,"--k-gantt-label-w":r.labelWidth,gridTemplateColumns:`var(--k-gantt-label-w) repeat(${l.value.length}, minmax(var(--k-gantt-day-w), 1fr))`})),_=e=>{let t=l.value.length;return{left:`calc(${e.first/t*100}% + 3px)`,width:`calc(${(e.last-e.first+1)/t*100}% - 6px)`}},v=(0,t.computed)(()=>{let e=[];return l.value.forEach((t,n)=>{t.weekend&&e.push({key:`w${n}`,kind:`weekend`,i:n}),n>0&&t.wd===1&&!r.weekends&&e.push({key:`m${n}`,kind:`week`,i:n})}),e});function y(e){i(`item-click`,e)}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,lm,[(0,t.createElementVNode)(`div`,um,[(0,t.createElementVNode)(`div`,{class:`k-gantt__grid`,style:(0,t.normalizeStyle)(g.value)},[(0,t.createElementVNode)(`div`,dm,[(0,t.renderSlot)(n.$slots,`corner`,{},void 0,!0)]),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n.iso,class:(0,t.normalizeClass)([`k-gantt__day`,{"k-gantt__day--today":r===u.value,"k-gantt__day--weekend":n.weekend,"k-gantt__day--week":r>0&&n.wd===1&&!e.weekends}])},[(0,t.createElementVNode)(`span`,fm,(0,t.toDisplayString)(n.monthStart?o[n.month]:``),1),(0,t.createElementVNode)(`span`,pm,(0,t.toDisplayString)(n.date),1),(0,t.createElementVNode)(`span`,mm,(0,t.toDisplayString)(a[n.wd]),1)],2))),128)),h.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hm,(0,t.toDisplayString)(e.emptyText),1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:r.key},[r.type===`group`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`button`,{type:`button`,class:`k-gantt__label k-gantt__label--group`,style:(0,t.normalizeStyle)({gridRow:i+2}),onClick:e=>m(r.group.key)},[(0,t.createVNode)(D,{name:r.collapsed?`chevron-right`:`chevron-down`,size:14,class:`k-gantt__chevron`},null,8,[`name`]),(0,t.createElementVNode)(`span`,_m,[(0,t.renderSlot)(n.$slots,`group`,{group:r.group,items:r.items,collapsed:r.collapsed},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.group.label),1)],!0)]),(0,t.createElementVNode)(`span`,vm,(0,t.toDisplayString)(r.items.length),1)],12,gm),(0,t.createElementVNode)(`div`,{class:`k-gantt__track k-gantt__track--group`,style:(0,t.normalizeStyle)({gridRow:i+2})},[r.summary?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`k-gantt__summary`,style:(0,t.normalizeStyle)(_(r.summary))},null,4)):(0,t.createCommentVNode)(``,!0)],4)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`k-gantt__label k-gantt__label--item`,{"k-gantt__label--muted":r.item.muted,"k-gantt__label--selected":r.item.key===e.selected}]),style:(0,t.normalizeStyle)({gridRow:i+2}),role:`button`,tabindex:`0`,onClick:e=>y(r.item),onKeydown:[(0,t.withKeys)((0,t.withModifiers)(e=>y(r.item),[`prevent`]),[`enter`]),(0,t.withKeys)((0,t.withModifiers)(e=>y(r.item),[`prevent`]),[`space`])]},[(0,t.renderSlot)(n.$slots,`label`,{item:r.item},()=>[r.item.code?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,bm,(0,t.toDisplayString)(r.item.code),1)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,xm,(0,t.toDisplayString)(r.item.label),1)],!0)],46,ym),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`k-gantt__track`,{"k-gantt__track--selected":r.item.key===e.selected}]),style:(0,t.normalizeStyle)({gridRow:i+2})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.bars,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:i,class:`k-gantt__bar-slot`,style:(0,t.normalizeStyle)(_(e))},[(0,t.createVNode)(cm,{disabled:!r.item.hint,placement:`top`},{content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,Sm,(0,t.toDisplayString)(r.item.hint),1)]),default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.item.href?`a`:`button`),{href:r.item.href||void 0,target:r.item.href?`_blank`:void 0,rel:r.item.href?`noopener`:void 0,type:r.item.href?void 0:`button`,class:(0,t.normalizeClass)([`k-gantt__bar`,[`k-gantt__bar--${r.item.tone||`primary`}`,{"k-gantt__bar--muted":r.item.muted,"k-gantt__bar--cut-start":e.cutStart,"k-gantt__bar--cut-end":e.cutEnd}]]),onClick:e=>y(r.item)},{default:(0,t.withCtx)(()=>[i===0?(0,t.renderSlot)(n.$slots,`bar`,{item:r.item},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.item.code||r.item.label),1)],!0,0):(0,t.createCommentVNode)(``,!0)]),_:2},1032,[`href`,`target`,`rel`,`type`,`class`,`onClick`]))]),_:2},1032,[`disabled`])],4))),128))],6)],64))],64))),128)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.key,class:(0,t.normalizeClass)([`k-gantt__mark`,`k-gantt__mark--${e.kind}`]),style:(0,t.normalizeStyle)({gridColumn:e.i+2,gridRow:`2 / ${h.value.length+2}`})},null,6))),128)),u.value>=0&&h.value.length?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`k-gantt__today`,style:(0,t.normalizeStyle)({gridColumn:u.value+2,gridRow:`2 / ${h.value.length+2}`})},null,4)):(0,t.createCommentVNode)(``,!0)],4)])]))}},[[`__scopeId`,`data-v-9c9f41c7`]]),wm={key:0,class:`k-input__label`},Tm={key:0,class:`k-input__req`},Em=[`type`,`value`,`placeholder`,`required`,`disabled`,`readonly`,`aria-invalid`],Dm={key:1,class:`k-input__suffix`},Om={key:1,class:`k-input__error`},km={key:2,class:`k-input__hint`},Am=E(Object.assign({inheritAttrs:!1},{__name:`KInput`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},placeholder:{type:String,default:``},type:{type:String,default:`text`},hint:{type:String,default:``},error:{type:String,default:``},prefixIcon:{type:String,default:``},suffix:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{type:String,default:`md`},inline:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e){let n=(0,t.useAttrs)(),r=(0,t.computed)(()=>({class:n.class,style:n.style})),i=(0,t.computed)(()=>{let{class:e,style:t,...r}=n;return r});return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:[`k-input`,[`k-input--${e.size}`,{"k-input--inline":e.inline}]]},r.value),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,wm,[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Tm,`*`)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`k-input__box`,{"k-input__box--error":e.error,"k-input__box--disabled":e.disabled}])},[e.prefixIcon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.prefixIcon,size:16,class:`k-input__icon`},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`input`,(0,t.mergeProps)({class:`k-input__field`,type:e.type,value:e.modelValue,placeholder:e.placeholder,required:e.required,disabled:e.disabled,readonly:e.readonly,"aria-invalid":e.error?`true`:null},i.value,{onInput:a[0]||=e=>n.$emit(`update:modelValue`,e.target.value)}),null,16,Em),e.suffix?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Dm,(0,t.toDisplayString)(e.suffix),1)):(0,t.createCommentVNode)(``,!0)],2),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Om,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,km,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-768590a7`]]),jm={class:`k-menu-item__label`},Mm=E({__name:`KMenuItem`,props:{icon:{type:String,default:``},to:{type:[String,Object],default:null},danger:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.to?`router-link`:`button`),{to:e.to,type:e.to?null:`button`,class:(0,t.normalizeClass)([`k-menu-item`,{"k-menu-item--danger":e.danger}]),disabled:e.to?null:e.disabled,role:`menuitem`,"data-k-menu-item":``},{default:(0,t.withCtx)(()=>[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:15},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,jm,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])]),_:3},8,[`to`,`type`,`class`,`disabled`]))}},[[`__scopeId`,`data-v-547b0d2a`]]),Nm={key:0,class:`k-modal__header`},Pm={class:`k-modal__heading`},Fm={class:`k-modal__body`},Im={key:1,class:`k-modal__footer`},Lm=E({__name:`KModal`,props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:``},subtitle:{type:String,default:``},size:{type:String,default:`md`},closable:{type:Boolean,default:!0},closeOnOutside:{type:Boolean,default:!1}},emits:[`update:modelValue`,`close`],setup(e,{emit:n}){let r=e,i=n,a=V(uf,{id:(0,t.useId)(),get open(){return r.modelValue},get closeOnInteractOutside(){return r.closeOnOutside&&r.closable},get closeOnEscape(){return r.closable},onOpenChange({open:e}){i(`update:modelValue`,e),e||i(`close`)}}),o=(0,t.computed)(()=>Od(a,B));return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[o.value.open?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-modal__backdrop`},o.value.getBackdropProps()),null,16),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-modal__positioner`},o.value.getPositionerProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:[`k-modal__panel`,`k-modal__panel--${e.size}`]},o.value.getContentProps()),[e.title||n.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,Nm,[(0,t.createElementVNode)(`div`,Pm,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`h2`,(0,t.mergeProps)({class:`k-modal__title`},o.value.getTitleProps()),(0,t.toDisplayString)(e.title),17),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:0,class:`k-modal__subtitle`},o.value.getDescriptionProps()),(0,t.toDisplayString)(e.subtitle),17)):(0,t.createCommentVNode)(``,!0)],!0)]),e.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-modal__close`,"aria-label":`Закрыть`},o.value.getCloseTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:18})],16)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Fm,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Im,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)],16)],16)],64)):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-500f8743`]]),Rm=E({__name:`KMoney`,props:{value:{type:[Number,String],default:0},currency:{type:String,default:`RUB`},fraction:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},tone:{type:String,default:``},size:{type:String,default:`md`}},setup(e){let n=e,r=(0,t.computed)(()=>{let e=Number(n.value);return Number.isFinite(e)?new Intl.NumberFormat(`ru-RU`,{style:`currency`,currency:n.currency,minimumFractionDigits:n.fraction?2:0,maximumFractionDigits:n.fraction?2:0,notation:n.compact?`compact`:`standard`}).format(e):`—`});return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-money`,[e.tone&&`k-money--${e.tone}`,`k-money--${e.size}`]])},(0,t.toDisplayString)(r.value),3))}},[[`__scopeId`,`data-v-f98ea4aa`]]),zm={key:0,class:`k-page__crumbs`,"aria-label":`Хлебные крошки`},Bm={class:`k-page__header`},Vm={class:`k-page__heading`},Hm={class:`k-page__titles`},Um={class:`k-page__title-row`},Wm={key:0,class:`k-page__subtitle`},Gm={key:0,class:`k-page__actions`},Km=E({__name:`KPage`,props:{title:{type:String,default:``},subtitle:{type:String,default:``},breadcrumbs:{type:Array,default:()=>[]},back:{type:[String,Object],default:null},width:{type:String,default:`wide`}},setup(e){return(n,r)=>{let i=(0,t.resolveComponent)(`router-link`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-page`,`k-page--${e.width}`])},[e.breadcrumbs.length?((0,t.openBlock)(),(0,t.createElementBlock)(`nav`,zm,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.breadcrumbs,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:r},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.to&&r<e.breadcrumbs.length-1?`router-link`:`span`),{to:n.to,class:(0,t.normalizeClass)([`k-page__crumb`,{"k-page__crumb--current":r===e.breadcrumbs.length-1}])},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.label),1)]),_:2},1032,[`to`,`class`])),r<e.breadcrumbs.length-1?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`chevron-right`,size:13,class:`k-page__crumb-sep`})):(0,t.createCommentVNode)(``,!0)],64))),128))])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`header`,Bm,[(0,t.createElementVNode)(`div`,Vm,[e.back?((0,t.openBlock)(),(0,t.createBlock)(i,{key:0,to:e.back,class:`k-page__back`,"aria-label":`Назад`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{name:`back`,size:18})]),_:1},8,[`to`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Hm,[(0,t.createElementVNode)(`div`,Um,[(0,t.renderSlot)(n.$slots,`title`,{},()=>[(0,t.createElementVNode)(`h1`,null,(0,t.toDisplayString)(e.title),1)],!0),(0,t.renderSlot)(n.$slots,`title-extra`,{},void 0,!0)]),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Wm,(0,t.toDisplayString)(e.subtitle),1)):(0,t.createCommentVNode)(``,!0)])]),n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Gm,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)],2)}}},[[`__scopeId`,`data-v-ad12f5da`]]),qm=O(`pagination`).parts(`root`,`item`,`ellipsis`,`firstTrigger`,`prevTrigger`,`nextTrigger`,`lastTrigger`).build(),Jm=e=>e.ids?.root??`pagination:${e.id}`,Ym=e=>e.ids?.firstTrigger??`pagination:${e.id}:first`,Xm=e=>e.ids?.prevTrigger??`pagination:${e.id}:prev`,Zm=e=>e.ids?.nextTrigger??`pagination:${e.id}:next`,Qm=e=>e.ids?.lastTrigger??`pagination:${e.id}:last`,$m=(e,t)=>e.ids?.ellipsis?.(t)??`pagination:${e.id}:ellipsis:${t}`,eh=(e,t)=>e.ids?.item?.(t)??`pagination:${e.id}:item:${t}`,th=(e,t)=>{let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)},nh=e=>e.map(e=>Oa(e)?{type:`page`,value:e}:{type:`ellipsis`}),rh=`ellipsis`,ih=e=>{let{page:t,totalPages:n,siblingCount:r,boundaryCount:i=1}=e;if(n<=0)return[];if(n===1)return[1];let a=n,o=Math.max(t-r,1),s=Math.min(t+r,a),c=Math.min(r*2+3+i*2,n);if(n<=c)return th(1,a);let l=c-1-i,u=o>1+i+1&&Math.abs(o-1)>i+1,d=s<a-i-1&&Math.abs(a-s)>i+1,f=[];if(!u&&d){let e=th(1,l);f.push(...e,rh),f.push(...th(a-i+1,a))}else if(u&&!d){f.push(...th(1,1+i-1)),f.push(rh);let e=th(a-l+1,a);f.push(...e)}else if(u&&d){f.push(...th(1,1+i-1)),f.push(rh);let e=th(o,s);f.push(...e),f.push(rh),f.push(...th(a-i+1,a))}else f.push(...th(1,a));for(let e=0;e<f.length;e++)if(f[e]===rh){let t=Oa(f[e-1])?f[e-1]:0;(Oa(f[e+1])?f[e+1]:n+1)-t===2&&(f[e]=t+1)}return f},ah=e=>nh(ih(e)),oh={rootLabel:`pagination`,firstTriggerLabel:`first page`,prevTriggerLabel:`previous page`,nextTriggerLabel:`next page`,lastTriggerLabel:`last page`,itemLabel({page:e,totalPages:t}){return`${t>1&&e===t?`last page, `:``}page ${e}`}};function sh(e,t){let{send:n,scope:r,prop:i,computed:a,context:o}=e,s=a(`totalPages`),c=o.get(`page`),l=o.get(`pageSize`),u=co(oh,i(`translations`)),d=i(`count`),f=i(`getPageUrl`),p=i(`type`),m=a(`previousPage`),h=a(`nextPage`),g=a(`pageRange`),_=c===1,v=c>=s;return{count:d,page:c,pageSize:l,totalPages:s,pages:ah({page:c,totalPages:s,siblingCount:i(`siblingCount`),boundaryCount:i(`boundaryCount`)}),previousPage:m,nextPage:h,pageRange:g,slice(e){return e.slice(g.start,g.end)},setPageSize(e){n({type:`SET_PAGE_SIZE`,size:e})},setPage(e){n({type:`SET_PAGE`,page:e})},goToNextPage(){n({type:`NEXT_PAGE`})},goToPrevPage(){n({type:`PREVIOUS_PAGE`})},goToFirstPage(){n({type:`FIRST_PAGE`})},goToLastPage(){n({type:`LAST_PAGE`})},getRootProps(){return t.element({id:Jm(r),...qm.root.attrs,dir:i(`dir`),"aria-label":u.rootLabel})},getEllipsisProps(e){return t.element({id:$m(r,e.index),...qm.ellipsis.attrs,dir:i(`dir`)})},getItemProps(e){let a=e.value,o=a===c;return t.element({id:eh(r,a),...qm.item.attrs,dir:i(`dir`),"data-index":a,"data-selected":k(o),"aria-current":o?`page`:void 0,"aria-label":u.itemLabel?.({page:a,totalPages:s}),onClick(){n({type:`SET_PAGE`,page:a})},...p===`button`&&{type:`button`},...p===`link`&&f&&{href:f({page:a,pageSize:l})}})},getPrevTriggerProps(){return t.element({id:Xm(r),...qm.prevTrigger.attrs,dir:i(`dir`),"data-disabled":k(_),"aria-label":u.prevTriggerLabel,onClick(){n({type:`PREVIOUS_PAGE`})},...p===`button`&&{disabled:_,type:`button`},...p===`link`&&f&&m&&{href:f({page:m,pageSize:l})}})},getFirstTriggerProps(){return t.element({id:Ym(r),...qm.firstTrigger.attrs,dir:i(`dir`),"data-disabled":k(_),"aria-label":u.firstTriggerLabel,onClick(){n({type:`FIRST_PAGE`})},...p===`button`&&{disabled:_,type:`button`},...p===`link`&&f&&{href:f({page:1,pageSize:l})}})},getNextTriggerProps(){return t.element({id:Zm(r),...qm.nextTrigger.attrs,dir:i(`dir`),"data-disabled":k(v),"aria-label":u.nextTriggerLabel,onClick(){n({type:`NEXT_PAGE`})},...p===`button`&&{disabled:v,type:`button`},...p===`link`&&f&&h&&{href:f({page:h,pageSize:l})}})},getLastTriggerProps(){return t.element({id:Qm(r),...qm.lastTrigger.attrs,dir:i(`dir`),"data-disabled":k(v),"aria-label":u.lastTriggerLabel,onClick(){n({type:`LAST_PAGE`})},...p===`button`&&{disabled:v,type:`button`},...p===`link`&&f&&{href:f({page:s,pageSize:l})}})}}}var ch=z({props({props:e}){return{defaultPageSize:10,siblingCount:1,boundaryCount:1,defaultPage:1,type:`button`,count:1,...e}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({value:e(`page`),defaultValue:e(`defaultPage`),onChange(t){let r=n();e(`onPageChange`)?.({page:t,pageSize:r.get(`pageSize`)})}})),pageSize:t(()=>({value:e(`pageSize`),defaultValue:e(`defaultPageSize`),onChange(t){e(`onPageSizeChange`)?.({pageSize:t})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get(`pageSize`)],()=>{n([`setPageIfNeeded`])})},computed:{totalPages:yo(({prop:e,context:t})=>[t.get(`pageSize`),e(`count`)],([e,t])=>Math.ceil(t/e)),pageRange:yo(({context:e,prop:t})=>[e.get(`page`),e.get(`pageSize`),t(`count`)],([e,t,n])=>{let r=(e-1)*t;return{start:r,end:Math.min(r+t,n)}}),previousPage:({context:e})=>e.get(`page`)===1?null:e.get(`page`)-1,nextPage:({context:e,computed:t})=>e.get(`page`)===t(`totalPages`)?null:e.get(`page`)+1,isValidPage:({context:e,computed:t})=>e.get(`page`)>=1&&e.get(`page`)<=t(`totalPages`)},on:{SET_PAGE:{guard:`isValidPage`,actions:[`setPage`]},SET_PAGE_SIZE:{actions:[`setPageSize`]},FIRST_PAGE:{actions:[`goToFirstPage`]},LAST_PAGE:{actions:[`goToLastPage`]},PREVIOUS_PAGE:{guard:`canGoToPrevPage`,actions:[`goToPrevPage`]},NEXT_PAGE:{guard:`canGoToNextPage`,actions:[`goToNextPage`]}},states:{idle:{}},implementations:{guards:{isValidPage:({event:e,computed:t})=>e.page>=1&&e.page<=t(`totalPages`),isValidCount:({context:e,event:t})=>e.get(`page`)>t.count,canGoToNextPage:({context:e,computed:t})=>e.get(`page`)<t(`totalPages`),canGoToPrevPage:({context:e})=>e.get(`page`)>1},actions:{setPage({context:e,event:t,computed:n}){let r=lh(t.page,n(`totalPages`));e.set(`page`,r)},setPageSize({context:e,event:t}){e.set(`pageSize`,t.size)},goToFirstPage({context:e}){e.set(`page`,1)},goToLastPage({context:e,computed:t}){e.set(`page`,t(`totalPages`))},goToPrevPage({context:e,computed:t}){e.set(`page`,e=>lh(e-1,t(`totalPages`)))},goToNextPage({context:e,computed:t}){e.set(`page`,e=>lh(e+1,t(`totalPages`)))},setPageIfNeeded({context:e,computed:t}){t(`isValidPage`)||e.set(`page`,1)}}}}),lh=(e,t)=>Math.min(Math.max(e,1),t),uh={key:0,class:`k-pagination__info`},dh={class:`k-pagination__pages`},fh=E({__name:`KPagination`,props:{page:{type:Number,default:1},pageSize:{type:Number,default:20},total:{type:Number,default:0},siblings:{type:Number,default:1},showInfo:{type:Boolean,default:!0}},emits:[`update:page`],setup(e,{emit:n}){let r=e,i=n,a=V(ch,{id:(0,t.useId)(),translations:{rootLabel:`Постраничная навигация`,prevTriggerLabel:`Назад`,nextTriggerLabel:`Вперёд`,itemLabel:({page:e})=>`Страница ${e}`},get count(){return r.total},get pageSize(){return r.pageSize||1},get siblingCount(){return r.siblings},get page(){return r.page},onPageChange({page:e}){e!==r.page&&i(`update:page`,e)}}),o=(0,t.computed)(()=>sh(a,B)),s=(0,t.computed)(()=>r.total?o.value.pageRange.start+1:0),c=(0,t.computed)(()=>o.value.pageRange.end);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`nav`,(0,t.mergeProps)({class:`k-pagination`},o.value.getRootProps()),[e.showInfo?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,uh,(0,t.toDisplayString)(s.value)+`–`+(0,t.toDisplayString)(c.value)+` из `+(0,t.toDisplayString)(e.total),1)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,dh,[(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-pagination__nav`},o.value.getPrevTriggerProps()),[(0,t.createVNode)(D,{name:`chevron-left`,size:16})],16),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.value.pages,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:e.type===`page`?e.value:`ellipsis-${n}`},[e.type===`ellipsis`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-pagination__gap`},{ref_for:!0},o.value.getEllipsisProps({index:n})),`…`,16)):((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:1,class:`k-pagination__page`},{ref_for:!0},o.value.getItemProps(e)),(0,t.toDisplayString)(e.value),17))],64))),128)),(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-pagination__nav`},o.value.getNextTriggerProps()),[(0,t.createVNode)(D,{name:`chevron-right`,size:16})],16)])],16))}},[[`__scopeId`,`data-v-1eac1a65`]]),ph=O(`progress`).parts(`root`,`label`,`track`,`range`,`valueText`,`view`,`circle`,`circleTrack`,`circleRange`).build(),mh=e=>e.ids?.root??`progress-${e.id}`,hh=e=>e.ids?.track??`progress-${e.id}-track`,gh=e=>e.ids?.label??`progress-${e.id}-label`,_h=e=>e.ids?.circle??`progress-${e.id}-circle`,vh={value:({value:e,percent:t,formatter:n})=>{if(e===null)return`loading...`;if(n){let r=n.resolvedOptions().style===`percent`?t/100:e;return n.format(r)}return e.toString()}};function yh(e,t){let{context:n,computed:r,prop:i,send:a,scope:o}=e,s=r(`percent`),c=r(`isIndeterminate`)?``:r(`formatter`).format(s/100),l=i(`max`),u=i(`min`),d=i(`orientation`),f=co(vh,i(`translations`)),p=r(`isIndeterminate`),m=n.get(`value`),h=f.value({value:m,max:l,percent:s,min:u,formatter:r(`formatter`)}),g=bh(m,l),_={role:`progressbar`,"aria-label":h,"data-max":l,"aria-valuemin":u,"aria-valuemax":l,"aria-valuenow":m??void 0,"data-orientation":d,"data-state":g},v=Ch(e);return{value:m,valueAsString:h,min:u,max:l,percent:s,percentAsString:c,indeterminate:p,setValue(e){a({type:`VALUE.SET`,value:e})},setToMax(){a({type:`VALUE.SET`,value:l})},setToMin(){a({type:`VALUE.SET`,value:u})},getRootProps(){return t.element({dir:i(`dir`),...ph.root.attrs,id:mh(o),"data-max":l,"data-value":m??void 0,"data-state":g,"data-orientation":d,style:{"--percent":p?void 0:s}})},getLabelProps(){return t.element({dir:i(`dir`),id:gh(o),...ph.label.attrs,"data-orientation":d})},getValueTextProps(){return t.element({dir:i(`dir`),"aria-live":`polite`,...ph.valueText.attrs})},getTrackProps(){return t.element({dir:i(`dir`),id:hh(o),...ph.track.attrs,..._})},getRangeProps(){return t.element({dir:i(`dir`),...ph.range.attrs,"data-orientation":d,"data-state":g,style:{[r(`isHorizontal`)?`width`:`height`]:p?void 0:`${s}%`}})},getCircleProps(){return t.element({dir:i(`dir`),id:_h(o),...ph.circle.attrs,..._,...v.root})},getCircleTrackProps(){return t.element({dir:i(`dir`),"data-orientation":d,...ph.circleTrack.attrs,...v.track})},getCircleRangeProps(){return t.element({dir:i(`dir`),...ph.circleRange.attrs,...v.range,"data-state":g})},getViewProps(e){return t.element({dir:i(`dir`),...ph.view.attrs,"data-state":e.state,hidden:e.state!==g})}}}function bh(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}var xh={style:{"--radius":`calc(var(--size) / 2 - var(--thickness) / 2)`,cx:`calc(var(--size) / 2)`,cy:`calc(var(--size) / 2)`,r:`var(--radius)`,fill:`transparent`,strokeWidth:`var(--thickness)`}},Sh={style:{width:`var(--size)`,height:`var(--size)`}};function Ch(e){let{context:t,computed:n}=e;return{root:Sh,track:xh,range:{opacity:t.get(`value`)===0?0:void 0,style:{...xh.style,"--percent":n(`percent`),"--circumference":`calc(2 * 3.14159 * var(--radius))`,"--offset":`calc(var(--circumference) * (100 - var(--percent)) / 100)`,strokeDashoffset:`calc(var(--circumference) * ((100 - var(--percent)) / 100))`,strokeDasharray:n(`isIndeterminate`)?void 0:`var(--circumference)`,transformOrigin:`center`,transform:`rotate(-90deg)`}}}}var wh=z({props({props:e}){let t=e.min??0,n=e.max??100;return{orientation:`horizontal`,...e,max:n,min:t,defaultValue:e.defaultValue===void 0?Oh(t,n):e.defaultValue,formatOptions:{style:`percent`,...e.formatOptions}}},initialState(){return`idle`},entry:[`validateContext`],context({bindable:e,prop:t}){return{value:e(()=>({defaultValue:t(`defaultValue`),value:t(`value`),onChange(e){t(`onValueChange`)?.({value:e})}}))}},computed:{isIndeterminate:({context:e})=>e.get(`value`)===null,percent({context:e,prop:t}){let n=e.get(`value`);return Oa(n)?ao(n,t(`min`),t(`max`))*100:-1},formatter:yo(({prop:e})=>[e(`locale`),e(`formatOptions`)],([e,t])=>new Intl.NumberFormat(e,t)),isHorizontal:({prop:e})=>e(`orientation`)===`horizontal`},states:{idle:{on:{"VALUE.SET":{actions:[`setValue`]}}}},implementations:{actions:{setValue:({context:e,event:t,prop:n})=>{let r=t.value===null?null:Math.max(0,Math.min(t.value,n(`max`)));e.set(`value`,r)},validateContext:({context:e,prop:t})=>{let n=t(`max`),r=t(`min`),i=e.get(`value`);if(i!=null){if(!Th(n))throw Error(`[progress] The max value passed \`${n}\` is not a valid number`);if(!Eh(i,n))throw Error(`[progress] The value passed \`${i}\` exceeds the max value \`${n}\``);if(!Dh(i,r))throw Error(`[progress] The value passed \`${i}\` exceeds the min value \`${r}\``)}}}}}),Th=e=>Oa(e)&&!isNaN(e),Eh=(e,t)=>Th(e)&&e<=t,Dh=(e,t)=>Th(e)&&e>=t,Oh=(e,t)=>e+(t-e)/2,kh={key:0,class:`k-progress__head`},Ah=E({__name:`KProgress`,props:{value:{type:Number,default:0},max:{type:Number,default:100},label:{type:String,default:``},tone:{type:String,default:`primary`},showValue:{type:Boolean,default:!1}},setup(e){let n=e,r=V(wh,{id:(0,t.useId)(),min:0,locale:`ru-RU`,get value(){return n.value},get max(){return n.max}}),i=(0,t.computed)(()=>yh(r,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-progress`},i.value.getRootProps()),[e.label||e.showValue?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kh,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-progress__label`},i.value.getLabelProps()),(0,t.toDisplayString)(e.label),17),e.showValue?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-progress__value`},i.value.getValueTextProps()),(0,t.toDisplayString)(i.value.percentAsString),17)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-progress__track`},i.value.getTrackProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:[`k-progress__bar`,`k-progress__bar--${e.tone}`]},i.value.getRangeProps()),null,16)],16)],16))}},[[`__scopeId`,`data-v-7e309874`]]),jh=O(`radio-group`).parts(`root`,`label`,`item`,`itemText`,`itemControl`,`indicator`).build(),Mh=e=>e.ids?.root??`radio-group:${e.id}`,Nh=e=>e.ids?.label??`radio-group:${e.id}:label`,Ph=(e,t)=>e.ids?.item?.(t)??`radio-group:${e.id}:radio:${t}`,Fh=(e,t)=>e.ids?.itemHiddenInput?.(t)??`radio-group:${e.id}:radio:input:${t}`,Ih=(e,t)=>e.ids?.itemControl?.(t)??`radio-group:${e.id}:radio:control:${t}`,Lh=(e,t)=>e.ids?.itemLabel?.(t)??`radio-group:${e.id}:radio:label:${t}`,Rh=e=>e.ids?.indicator??`radio-group:${e.id}:indicator`,zh=e=>e.getById(Mh(e)),Bh=(e,t)=>e.getById(Fh(e,t)),Vh=e=>e.getById(Rh(e)),Hh=e=>zh(e)?.querySelector(`input:not(:disabled)`),Uh=e=>zh(e)?.querySelector(`input:not(:disabled):checked`),Wh=e=>{let t=`input[type=radio]${tn(Mh(e))}:not([disabled])`;return ii(zh(e),t)},Gh=(e,t)=>{if(t)return e.getById(Ph(e,t))},Kh=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function qh(e,t){let{context:n,send:r,computed:i,prop:a,scope:o}=e,s=i(`isDisabled`),c=a(`invalid`),l=a(`readOnly`);function u(e){return{value:e.value,invalid:!!e.invalid||!!c,disabled:!!e.disabled||s,checked:n.get(`value`)===e.value,focused:n.get(`focusedValue`)===e.value,focusVisible:n.get(`focusVisibleValue`)===e.value,hovered:n.get(`hoveredValue`)===e.value,active:n.get(`activeValue`)===e.value}}function d(e){let t=u(e);return{"data-focus":k(t.focused),"data-focus-visible":k(t.focusVisible),"data-disabled":k(t.disabled),"data-readonly":k(l),"data-state":t.checked?`checked`:`unchecked`,"data-hover":k(t.hovered),"data-invalid":k(t.invalid),"data-orientation":a(`orientation`),"data-ssr":k(n.get(`ssr`))}}let f=()=>{(Uh(o)??Hh(o))?.focus()};return{focus:f,value:n.get(`value`),setValue(e){r({type:`SET_VALUE`,value:e,isTrusted:!1})},clearValue(){r({type:`SET_VALUE`,value:null,isTrusted:!1})},getRootProps(){return t.element({...jh.root.attrs,role:`radiogroup`,id:Mh(o),"aria-labelledby":Nh(o),"aria-required":a(`required`)||void 0,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"data-orientation":a(`orientation`),"data-disabled":k(s),"data-invalid":k(c),"data-required":k(a(`required`)),"aria-orientation":a(`orientation`),dir:a(`dir`),style:{position:`relative`}})},getLabelProps(){return t.element({...jh.label.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),"data-disabled":k(s),"data-invalid":k(c),"data-required":k(a(`required`)),id:Nh(o),onClick:f})},getItemState:u,getItemProps(e){let n=u(e);return t.label({...jh.item.attrs,dir:a(`dir`),id:Ph(o,e.value),htmlFor:Fh(o,e.value),...d(e),onPointerMove(){n.disabled||n.hovered||r({type:`SET_HOVERED`,value:e.value,hovered:!0})},onPointerLeave(){n.disabled||r({type:`SET_HOVERED`,value:null})},onPointerDown(t){n.disabled||sr(t)&&(n.focused&&t.pointerType===`mouse`&&t.preventDefault(),r({type:`SET_ACTIVE`,value:e.value,active:!0}))},onPointerUp(){n.disabled||r({type:`SET_ACTIVE`,value:null})},onClick(){!n.disabled&&Qn()&&Bh(o,e.value)?.focus()}})},getItemTextProps(e){return t.element({...jh.itemText.attrs,dir:a(`dir`),id:Lh(o,e.value),...d(e)})},getItemControlProps(e){let n=u(e);return t.element({...jh.itemControl.attrs,dir:a(`dir`),id:Ih(o,e.value),"data-active":k(n.active),"aria-hidden":!0,...d(e)})},getItemHiddenInputProps(e){let n=u(e);return t.input({"data-ownedby":Mh(o),id:Fh(o,e.value),type:`radio`,name:a(`name`)||a(`id`),form:a(`form`),value:e.value,required:a(`required`),"aria-labelledby":Lh(o,e.value),"aria-invalid":n.invalid||void 0,onClick(t){if(l){t.preventDefault();return}t.currentTarget.checked&&r({type:`SET_VALUE`,value:e.value,isTrusted:!0})},onBlur(){r({type:`SET_FOCUSED`,value:null,focused:!1,focusVisible:!1})},onFocus(){let t=Xi();r({type:`SET_FOCUSED`,value:e.value,focused:!0,focusVisible:t})},onKeyDown(t){t.defaultPrevented||t.key===` `&&r({type:`SET_ACTIVE`,value:e.value,active:!0})},onKeyUp(e){e.defaultPrevented||e.key===` `&&r({type:`SET_ACTIVE`,value:null})},disabled:n.disabled||l,defaultChecked:n.checked,style:Ti})},getIndicatorProps(){let e=n.get(`indicatorRect`),i=n.get(`animateIndicator`);return t.element({id:Rh(o),...jh.indicator.attrs,dir:a(`dir`),hidden:n.get(`value`)==null||Jh(e),"data-disabled":k(s),"data-orientation":a(`orientation`),onTransitionEnd(e){P(e)===e.currentTarget&&r({type:`INDICATOR_TRANSITION_END`})},style:{"--transition-property":`left, top, width, height`,"--left":oo(e?.x),"--top":oo(e?.y),"--width":oo(e?.width),"--height":oo(e?.height),position:`absolute`,willChange:i?`var(--transition-property)`:`auto`,transitionProperty:i?`var(--transition-property)`:`none`,transitionDuration:i?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[a(`orientation`)===`horizontal`?`left`:`top`]:a(`orientation`)===`horizontal`?`var(--left)`:`var(--top)`}})}}}var Jh=e=>e==null||e.width===0&&e.height===0&&e.x===0&&e.y===0,{not:Yh}=Ho(),Xh=z({props({props:e}){return{orientation:`vertical`,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null,prevValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`)},entry:[`syncPrevValue`,`syncIndicatorRect`,`syncSsr`],exit:[`cleanupObserver`],effects:[`trackFormControlState`,`trackFocusVisible`],watch({track:e,action:t,context:n}){e([()=>n.get(`value`)],()=>{t([`syncIndicatorAnimation`,`syncIndicatorRect`,`syncInputElements`])})},on:{SET_VALUE:[{guard:Yh(`isTrusted`),actions:[`setValue`,`dispatchChangeEvent`]},{actions:[`setValue`]}],SET_HOVERED:{actions:[`setHovered`]},SET_ACTIVE:{actions:[`setActive`]},SET_FOCUSED:{actions:[`setFocused`]},INDICATOR_TRANSITION_END:{actions:[`clearIndicatorAnimation`]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return xr(zh(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackFocusVisible({scope:e}){return Zi({root:e.getRootNode?.()})}},actions:{setValue({context:e,event:t}){e.set(`value`,t.value)},setHovered({context:e,event:t}){e.set(`hoveredValue`,t.value)},setActive({context:e,event:t}){e.set(`activeValue`,t.value)},setFocused({context:e,event:t}){e.set(`focusedValue`,t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set(`focusVisibleValue`,n)},syncPrevValue({context:e,refs:t}){t.set(`prevValue`,e.get(`value`))},syncIndicatorAnimation({context:e,refs:t}){let n=t.get(`prevValue`),r=e.get(`value`),i=n!=null&&r!=null&&n!==r;e.set(`animateIndicator`,i),t.set(`prevValue`,r)},clearIndicatorAnimation({context:e}){e.set(`animateIndicator`,!1)},syncInputElements({context:e,scope:t}){Wh(t).forEach(t=>{t.checked=t.value===e.get(`value`)})},cleanupObserver({refs:e}){e.get(`indicatorCleanup`)?.()},syncSsr({context:e}){e.set(`ssr`,!1)},syncIndicatorRect({context:e,scope:t,refs:n}){if(n.get(`indicatorCleanup`)?.(),!Vh(t))return;let r=e.get(`value`),i=Gh(t,r);if(r==null||!i){e.set(`indicatorRect`,null);return}let a=()=>{e.set(`indicatorRect`,Kh(i))};a();let o=fi.observe(i,a);n.set(`indicatorCleanup`,o)},dispatchChangeEvent({context:e,scope:t}){Wh(t).forEach(t=>{let n=t.value===e.get(`value`);n!==t.checked&&_r(t,{checked:n})})}}}}),Zh={class:`k-radio__body`},Qh={key:0,class:`k-radio__hint`},$h=E({__name:`KRadioGroup`,props:{modelValue:{type:[String,Number,Boolean,null],default:null},options:{type:Array,default:()=>[]},label:{type:String,default:``},name:{type:String,default:``},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>r.options.map(e=>typeof e==`object`&&e?e:{value:e,label:String(e)})),o=V(Xh,{id:(0,t.useId)(),get value(){return r.modelValue==null?null:String(r.modelValue)},get disabled(){return r.disabled},get name(){return r.name||void 0},get orientation(){return r.inline?`horizontal`:`vertical`},onValueChange({value:e}){let t=a.value.find(t=>String(t.value)===e);i(`update:modelValue`,t?t.value:e)}}),s=(0,t.computed)(()=>qh(o,B)),c=e=>({value:String(e.value),disabled:e.disabled});return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-radio`},s.value.getRootProps()),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-radio__legend`},s.value.getLabelProps()),(0,t.toDisplayString)(e.label),17)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`k-radio__items`,{"k-radio__items--inline":e.inline}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:e.value,class:`k-radio__item`},{ref_for:!0},s.value.getItemProps(c(e))),[(0,t.createElementVNode)(`input`,(0,t.mergeProps)({ref_for:!0},s.value.getItemHiddenInputProps(c(e))),null,16),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-radio__control`},{ref_for:!0},s.value.getItemControlProps(c(e))),null,16),(0,t.createElementVNode)(`span`,Zh,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-radio__label`},{ref_for:!0},s.value.getItemTextProps(c(e))),(0,t.toDisplayString)(e.label),17),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Qh,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])],16))),128))],2)],16))}},[[`__scopeId`,`data-v-98047f64`]]),eg=[`title`],tg=E({__name:`KSegmented`,props:{modelValue:{type:[String,Number],default:``},options:{type:Array,default:()=>[]},size:{type:String,default:`md`},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=V(Xh,{id:(0,t.useId)(),orientation:`horizontal`,get value(){return r.modelValue===``||r.modelValue==null?null:String(r.modelValue)},get disabled(){return r.disabled},onValueChange({value:e}){let t=r.options.find(t=>String(t.value)===e);i(`update:modelValue`,t?t.value:e)}}),o=(0,t.computed)(()=>qh(a,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:[`k-segmented`,`k-segmented--${e.size}`]},o.value.getRootProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,n=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:n.value,class:`k-segmented__item`,title:n.title},{ref_for:!0},o.value.getItemProps({value:String(n.value)})),[(0,t.createElementVNode)(`input`,(0,t.mergeProps)({ref_for:!0},o.value.getItemHiddenInputProps({value:String(n.value)})),null,16),n.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:n.icon,size:e.size===`sm`?14:16},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),n.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:1,ref_for:!0},o.value.getItemTextProps({value:String(n.value)})),(0,t.toDisplayString)(n.label),17)):(0,t.createCommentVNode)(``,!0)],16,eg))),128))],16))}},[[`__scopeId`,`data-v-06f6c695`]]),$=O(`select`).parts(`label`,`positioner`,`trigger`,`indicator`,`clearTrigger`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`list`,`content`,`root`,`control`,`valueText`).build(),ng=e=>new _s(e);ng.empty=()=>new _s({items:[]});var rg=e=>e.ids?.root??`select:${e.id}`,ig=e=>e.ids?.content??`select:${e.id}:content`,ag=e=>e.ids?.trigger??`select:${e.id}:trigger`,og=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,sg=e=>e.ids?.label??`select:${e.id}:label`,cg=e=>e.ids?.control??`select:${e.id}:control`,lg=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,ug=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,dg=e=>e.ids?.positioner??`select:${e.id}:positioner`,fg=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,pg=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,mg=e=>e.getById(ug(e)),hg=e=>e.getById(ig(e)),gg=e=>e.getById(ag(e)),_g=e=>e.getById(og(e)),vg=e=>e.getById(dg(e)),yg=(e,t)=>t==null?null:e.getById(lg(e,t)),bg={clearTriggerLabel:`Clear value`};function xg(e,t){let{context:n,prop:r,scope:i,state:a,computed:o,send:s}=e,c=co(bg,r(`translations`)),l=r(`disabled`)||n.get(`fieldsetDisabled`),u=!!r(`invalid`),d=!!r(`required`),f=!!r(`readOnly`),p=r(`composite`),m=r(`collection`),h=a.hasTag(`open`),g=a.matches(`focused`),_=n.get(`highlightedValue`),v=n.get(`highlightedItem`),y=o(`selectedItems`),b=n.get(`currentPlacement`),x=b?kl(b):void 0,S=o(`isTypingAhead`),C=o(`isInteractive`),w=_?lg(i,_):void 0;function T(e){let t=m.getItemDisabled(e.item),r=m.getItemValue(e.item);return _o(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(l||t),highlighted:_===r,selected:n.get(`value`).includes(r)}}let ee=Jl({...r(`positioning`),placement:b});return{open:h,focused:g,empty:n.get(`value`).length===0,highlightedItem:v,highlightedValue:_,selectedItems:y,hasSelectedItems:o(`hasSelectedItems`),value:n.get(`value`),valueAsString:o(`valueAsString`),collection:m,multiple:!!r(`multiple`),disabled:!!l,reposition(e={}){s({type:`POSITIONING.SET`,options:e})},focus(){gg(i)?.focus({preventScroll:!0})},setOpen(e){a.hasTag(`open`)!==e&&s({type:e?`OPEN`:`CLOSE`})},selectValue(e){s({type:`ITEM.SELECT`,value:e})},setValue(e){s({type:`VALUE.SET`,value:e})},selectAll(){s({type:`VALUE.SET`,value:m.getValues()})},setHighlightValue(e){s({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){s({type:`HIGHLIGHTED_VALUE.CLEAR`})},clearValue(e){s(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:T,getRootProps(){return t.element({...$.root.attrs,dir:r(`dir`),id:rg(i),"data-invalid":k(u),"data-readonly":k(f)})},getLabelProps(){return t.label({dir:r(`dir`),id:sg(i),...$.label.attrs,"data-disabled":k(l),"data-invalid":k(u),"data-readonly":k(f),"data-required":k(d),htmlFor:ug(i),onClick(e){e.defaultPrevented||l||gg(i)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...$.control.attrs,dir:r(`dir`),id:cg(i),"data-state":h?`open`:`closed`,"data-focus":k(g),"data-disabled":k(l),"data-invalid":k(u)})},getValueTextProps(){return t.element({...$.valueText.attrs,dir:r(`dir`),"data-disabled":k(l),"data-invalid":k(u),"data-focus":k(g)})},getTriggerProps(){return t.button({id:ag(i),disabled:l,dir:r(`dir`),type:`button`,role:`combobox`,"aria-controls":ig(i),"aria-expanded":h,"aria-haspopup":`listbox`,"data-state":h?`open`:`closed`,"aria-invalid":u,"aria-required":d,"aria-labelledby":sg(i),...$.trigger.attrs,"data-disabled":k(l),"data-invalid":k(u),"data-readonly":k(f),"data-placement":b,"data-side":x,"data-placeholder-shown":k(!o(`hasSelectedItems`)),onClick(e){C&&(e.defaultPrevented||s({type:`TRIGGER.CLICK`}))},onFocus(){s({type:`TRIGGER.FOCUS`})},onBlur(){s({type:`TRIGGER.BLUR`})},onKeyDown(e){if(e.defaultPrevented||!C)return;let t={ArrowUp(){s({type:`TRIGGER.ARROW_UP`})},ArrowDown(e){s({type:e.altKey?`OPEN`:`TRIGGER.ARROW_DOWN`})},ArrowLeft(){s({type:`TRIGGER.ARROW_LEFT`})},ArrowRight(){s({type:`TRIGGER.ARROW_RIGHT`})},Home(){s({type:`TRIGGER.HOME`})},End(){s({type:`TRIGGER.END`})},Enter(){s({type:`TRIGGER.ENTER`})},Space(e){s(S?{type:`TRIGGER.TYPEAHEAD`,key:e.key}:{type:`TRIGGER.ENTER`})}}[fr(e,{dir:r(`dir`),orientation:`vertical`})];if(t){t(e),e.preventDefault();return}Ci.isValidEvent(e)&&(s({type:`TRIGGER.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getIndicatorProps(){return t.element({...$.indicator.attrs,dir:r(`dir`),"aria-hidden":!0,"data-state":h?`open`:`closed`,"data-disabled":k(l),"data-invalid":k(u),"data-readonly":k(f)})},getItemProps(e){let n=T(e);return t.element({id:lg(i,n.value),role:`option`,...$.item.attrs,dir:r(`dir`),"data-value":n.value,"aria-selected":n.selected,"data-state":n.selected?`checked`:`unchecked`,"data-highlighted":k(n.highlighted),"data-disabled":k(n.disabled),"aria-disabled":Zt(n.disabled),onPointerMove(e){n.disabled||e.pointerType!==`mouse`||Ji()===`pointer`&&n.value!==_&&s({type:`ITEM.POINTER_MOVE`,value:n.value})},onClick(e){e.defaultPrevented||n.disabled||s({type:`ITEM.CLICK`,src:`pointerup`,value:n.value})},onPointerLeave(t){n.disabled||e.persistFocus||t.pointerType===`mouse`&&Ji()===`pointer`&&s({type:`ITEM.POINTER_LEAVE`})}})},getItemTextProps(e){let n=T(e);return t.element({...$.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":k(n.disabled),"data-highlighted":k(n.highlighted)})},getItemIndicatorProps(e){let n=T(e);return t.element({"aria-hidden":!0,...$.itemIndicator.attrs,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...$.itemGroupLabel.attrs,id:pg(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...$.itemGroup.attrs,"data-disabled":k(l),id:fg(i,n),"aria-labelledby":pg(i,n),role:`group`,dir:r(`dir`)})},getClearTriggerProps(){return t.button({...$.clearTrigger.attrs,id:og(i),type:`button`,"aria-label":c.clearTriggerLabel,"data-invalid":k(u),disabled:l,hidden:!o(`hasSelectedItems`),dir:r(`dir`),onClick(e){e.defaultPrevented||s({type:`CLEAR.CLICK`})}})},getHiddenSelectProps(){let e=n.get(`value`),a=r(`multiple`)?e:e?.[0],o=e=>{Cr(pr(e))||s({type:`VALUE.SET`,value:Sg(e.currentTarget)})};return t.select({name:r(`name`),form:r(`form`),disabled:l,multiple:r(`multiple`),required:r(`required`),"aria-hidden":!0,id:ug(i),defaultValue:a,style:Ti,tabIndex:-1,autoComplete:r(`autoComplete`),onChange:o,onInput:o,onFocus(){gg(i)?.focus({preventScroll:!0})},"aria-labelledby":sg(i)})},getPositionerProps(){return t.element({...$.positioner.attrs,dir:r(`dir`),id:dg(i),style:ee.floating})},getContentProps(){return t.element({hidden:!h,dir:r(`dir`),id:ig(i),role:p?`listbox`:`dialog`,...$.content.attrs,"data-state":h?`open`:`closed`,"data-placement":b,"data-side":x,"data-activedescendant":w,"aria-activedescendant":p?w:void 0,"aria-multiselectable":r(`multiple`)&&p?!0:void 0,"aria-labelledby":sg(i),tabIndex:0,onKeyDown(e){if(!C||!j(e.currentTarget,P(e)))return;if(e.key===`Tab`&&!Vr(e)){e.preventDefault();return}let t={ArrowUp(){s({type:`CONTENT.ARROW_UP`})},ArrowDown(){s({type:`CONTENT.ARROW_DOWN`})},Home(){s({type:`CONTENT.HOME`})},End(){s({type:`CONTENT.END`})},Enter(){s({type:`ITEM.CLICK`,src:`keydown.enter`})},Space(e){S?s({type:`CONTENT.TYPEAHEAD`,key:e.key}):t.Enter?.(e)}},n=t[fr(e)];if(n){n(e),e.preventDefault();return}_n(P(e))||Ci.isValidEvent(e)&&(s({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getListProps(){return t.element({...$.list.attrs,tabIndex:0,role:p?void 0:`listbox`,"aria-labelledby":ag(i),"aria-activedescendant":p?void 0:w,"aria-multiselectable":!p&&r(`multiple`)?!0:void 0})}}}var Sg=e=>e.multiple?Array.from(e.selectedOptions,e=>e.value):e.value?[e.value]:[],{and:Cg,not:wg,or:Tg}=Ho(),Eg=z({props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??ng.empty(),positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},context({prop:e,bindable:t,getContext:n}){let r=e(`value`)??e(`defaultValue`)??[],i=e(`collection`).findMany(r);return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Ca,onChange(t){let r=n(),i=e(`collection`),a=Cs({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:Cs({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});return r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:ws({selectedItems:i,collection:e(`collection`)})}))}},refs(){return{typeahead:{...Ci.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get(`value`).length>0,isTypingAhead:({refs:e})=>e.get(`typeahead`).keysSoFar!==``,isDisabled:({prop:e,context:t})=>!!e(`disabled`)||!!t.get(`fieldsetDisabled`),isInteractive:({prop:e})=>!(e(`disabled`)||e(`readOnly`)),selectedItems:({context:e,prop:t})=>xs({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`))},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`idle`},entry:[`syncSelectElement`],watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`,`syncSelectElement`,`dispatchChangeEvent`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>t(`collection`).toString()],()=>{r([`syncCollection`])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedItem`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedItem`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setSelectedItems`]},"VALUE.CLEAR":{actions:[`clearSelectedItems`]},"CLEAR.CLICK":{actions:[`clearSelectedItems`,`focusTriggerEl`]}},effects:[`trackFormControlState`],states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{target:`open`,actions:[`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`,`highlightFirstSelectedItem`]}],"TRIGGER.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}]}},focused:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{guard:`isTriggerArrowUpEvent`,target:`open`,actions:[`setInitialFocus`,`highlightComputedLastItem`]},{guard:Tg(`isTriggerArrowDownEvent`,`isTriggerEnterEvent`),target:`open`,actions:[`setInitialFocus`,`highlightComputedFirstItem`]},{target:`open`,actions:[`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}],"TRIGGER.BLUR":{target:`idle`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightFirstSelectedItem`]}],"TRIGGER.ENTER":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_UP":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedLastItem`]}],"TRIGGER.ARROW_DOWN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_LEFT":[{guard:Cg(wg(`multiple`),`hasSelectedItems`),actions:[`selectPreviousItem`]},{guard:wg(`multiple`),actions:[`selectLastItem`]}],"TRIGGER.ARROW_RIGHT":[{guard:Cg(wg(`multiple`),`hasSelectedItems`),actions:[`selectNextItem`]},{guard:wg(`multiple`),actions:[`selectFirstItem`]}],"TRIGGER.HOME":{guard:wg(`multiple`),actions:[`selectFirstItem`]},"TRIGGER.END":{guard:wg(`multiple`),actions:[`selectLastItem`]},"TRIGGER.TYPEAHEAD":{guard:wg(`multiple`),actions:[`selectMatchingItem`]}}},open:{tags:[`open`],exit:[`scrollContentToTop`],effects:[`trackDismissableElement`,`trackFocusVisible`,`computePlacement`,`scrollToHighlightedItem`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`focused`,actions:[`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`clearHighlightedItem`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`restoreFocus`,target:`focused`,actions:[`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`focused`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"ITEM.CLICK":[{guard:Cg(`closeOnSelect`,`isOpenControlled`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{actions:[`selectHighlightedItem`]}],"CONTENT.HOME":{actions:[`highlightFirstItem`]},"CONTENT.END":{actions:[`highlightLastItem`]},"CONTENT.ARROW_DOWN":[{guard:Cg(`hasHighlightedItem`,`loop`,`isLastItemHighlighted`),actions:[`highlightFirstItem`]},{guard:`hasHighlightedItem`,actions:[`highlightNextItem`]},{actions:[`highlightFirstItem`]}],"CONTENT.ARROW_UP":[{guard:Cg(`hasHighlightedItem`,`loop`,`isFirstItemHighlighted`),actions:[`highlightLastItem`]},{guard:`hasHighlightedItem`,actions:[`highlightPreviousItem`]},{actions:[`highlightLastItem`]}],"CONTENT.TYPEAHEAD":{actions:[`highlightMatchingItem`]},"ITEM.POINTER_MOVE":{actions:[`highlightItem`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedItem`]},"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{loop:({prop:e})=>!!e(`loopFocus`),multiple:({prop:e})=>!!e(`multiple`),hasSelectedItems:({computed:e})=>!!e(`hasSelectedItems`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e(`closeOnSelect`)),restoreFocus:({event:e})=>Dg(e),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.CLICK`,isTriggerEnterEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ENTER`,isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_UP`,isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_DOWN`},effects:{trackFocusVisible({scope:e}){return Zi({root:e.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return xr(mg(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){let t=e.initial(`value`);e.set(`value`,t)}})},trackDismissableElement({scope:e,send:t,prop:n}){let r=()=>hg(e),i=!0;return Wu(r,{type:`listbox`,defer:!0,exclude:[gg(e),_g(e)],onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onInteractOutside(e){n(`onInteractOutside`)?.(e),i=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(){t({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){let r=t(`positioning`);return e.set(`currentPlacement`,r.placement),Kl(()=>gg(n),()=>vg(n),{defer:!0,...r,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=r=>{let i=e.get(`highlightedValue`);if(i==null||Ji()===`pointer`)return;let a=hg(n),o=t(`scrollToIndexFn`);if(o){let e=t(`collection`).indexOf(i);o?.({index:e,immediate:r,getElement:()=>yg(n,i)});return}mi(yg(n,i),{rootEl:a,block:`nearest`})};return L(()=>{Yi(`virtual`),r(!0)}),Kr(()=>hg(n),{defer:!0,attributes:[`data-activedescendant`],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:r}){Kl(gg(n),()=>vg(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getPreviousValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightNextItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getNextValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;e.set(`highlightedValue`,n)},highlightLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;e.set(`highlightedValue`,n)},setInitialFocus({scope:e}){L(()=>{Br({root:hg(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Dg(e)&&L(()=>{gg(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get(`highlightedValue`);r!=null&&t(`collection`).has(r)&&(t(`onSelect`)?.({value:r}),r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(r)?null:r,e.set(`value`,e=>r==null?[]:t(`multiple`)?ya(e,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.firstValue;e.set(`highlightedValue`,i)},highlightComputedLastItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue;e.set(`highlightedValue`,i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n(`hasSelectedItems`))return;let r=t(`collection`).sort(e.get(`value`))[0];e.set(`highlightedValue`,r)},highlightItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},setHighlightedItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},selectItem({context:e,prop:t,event:n}){t(`onSelect`)?.({value:n.value});let r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(n.value)?null:n.value;e.set(`value`,e=>r==null?[]:t(`multiple`)?ya(e,r):[r])},clearItem({context:e,event:t}){e.set(`value`,e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getPreviousValue(n);r&&e.set(`value`,[r])},selectNextItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getNextValue(n);r&&e.set(`value`,[r])},selectFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;n&&e.set(`value`,[n])},selectLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;n&&e.set(`value`,[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`value`)[0]});i!=null&&e.set(`value`,[i])},scrollContentToTop({prop:e,scope:t}){if(e(`scrollToIndexFn`)){let n=e(`collection`).firstValue;e(`scrollToIndexFn`)?.({index:0,immediate:!0,getElement:()=>yg(t,n)})}else hg(t)?.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){e(`onOpenChange`)?.({open:!0,value:t.get(`value`)})},invokeOnClose({prop:e,context:t}){e(`onOpenChange`)?.({open:!1,value:t.get(`value`)})},syncSelectElement({context:e,prop:t,scope:n}){let r=mg(n);if(r){if(e.get(`value`).length===0&&!t(`multiple`)){r.selectedIndex=-1;return}for(let t of r.options)t.selected=e.get(`value`).includes(t.value)}},syncCollection({context:e,prop:t}){let n=t(`collection`),r=n.find(e.get(`highlightedValue`));r&&e.set(`highlightedItem`,r);let i=Cs({values:e.get(`value`),collection:n,selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,i.nextSelectedItemMap)},syncSelectedItems({context:e,prop:t}){let n=Cs({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,n.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=mg(e);if(!t)return;let n=new(e.getWin()).Event(`change`,{bubbles:!0,composed:!0});t.dispatchEvent(wr(n))})}}}});function Dg(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}var Og={key:0,class:`k-select__req`},kg=[`value`],Ag={key:1,class:`k-select__error`},jg={key:2,class:`k-select__hint`},Mg={key:0,class:`k-select__empty`},Ng=E(Object.assign({inheritAttrs:!1},{__name:`KSelect`,props:{modelValue:{type:[String,Number,Boolean,null],default:null},options:{type:Array,default:()=>[]},getValue:{type:Function,default:e=>e.value},getLabel:{type:Function,default:e=>e.label},label:{type:String,default:``},placeholder:{type:String,default:`Выберите…`},hint:{type:String,default:``},error:{type:String,default:``},name:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=(0,t.useAttrs)(),i=(0,t.computed)(()=>({class:r.class,style:r.style})),a=e,o=n,s=(0,t.ref)(null),c=(0,t.computed)(()=>a.options.map(e=>typeof e==`object`&&e?e:{value:e,label:String(e)})),l=e=>String(a.getValue(e)),u=e=>String(a.getLabel(e)),d=(0,t.computed)(()=>ng({items:c.value,itemToValue:l,itemToString:u}));function f(e){if(e!=null&&e!==``)return c.value.find(t=>l(t)===String(e))}let p=V(Eg,{id:(0,t.useId)(),positioning:{sameWidth:!0,getAnchorElement:()=>s.value},get collection(){return d.value},get disabled(){return a.disabled},get invalid(){return!!a.error},get required(){return a.required},get name(){return a.name||void 0},get value(){let e=f(a.modelValue);return e?[l(e)]:[]},onValueChange({value:e}){let t=f(e[0]);o(`update:modelValue`,t===void 0?null:a.getValue(t))}}),m=(0,t.computed)(()=>xg(p,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-select`},{...i.value,...m.value.getRootProps()}),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:0,class:`k-select__label`},m.value.getLabelProps()),[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Og,`*`)):(0,t.createCommentVNode)(``,!0)],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({ref_key:`box`,ref:s,class:[`k-select__box`,{"k-select__box--error":e.error,"k-select__box--disabled":e.disabled}]},m.value.getControlProps()),[(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-select__trigger`},m.value.getTriggerProps()),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:[`k-select__value`,{"k-select__value--placeholder":!m.value.hasSelectedItems}]},m.value.getValueTextProps()),(0,t.toDisplayString)(m.value.hasSelectedItems?m.value.valueAsString:e.placeholder),17)],16),e.clearable&&m.value.hasSelectedItems?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-select__clear`,"aria-label":`Очистить`},m.value.getClearTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:14})],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-select__chevron`},m.value.getIndicatorProps()),[(0,t.createVNode)(D,{name:`chevron-down`,size:16})],16)],16),(0,t.createElementVNode)(`select`,(0,t.normalizeProps)((0,t.guardReactiveProps)(m.value.getHiddenSelectProps())),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:l(e),value:l(e)},(0,t.toDisplayString)(u(e)),9,kg))),128))],16),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ag,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,jg,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.normalizeProps)((0,t.guardReactiveProps)(m.value.getPositionerProps())),[(0,t.createElementVNode)(`ul`,(0,t.mergeProps)({class:`k-select__content`},m.value.getContentProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:l(e),class:`k-select__item`},{ref_for:!0},m.value.getItemProps({item:e})),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-select__item-text`},{ref_for:!0},m.value.getItemTextProps({item:e})),(0,t.toDisplayString)(u(e)),17),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-select__item-check`},{ref_for:!0},m.value.getItemIndicatorProps({item:e})),[(0,t.createVNode)(D,{name:`check`,size:15})],16)],16))),128)),c.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`li`,Mg,`Нет вариантов`))],16)],16)]))],16))}}),[[`__scopeId`,`data-v-f59de15e`]]),Pg={class:`k-shell__sidebar`},Fg={class:`k-shell__logo`},Ig={class:`k-shell__nav`},Lg={key:0,class:`k-shell__section`},Rg={class:`k-shell__link-label`},zg={key:1,class:`k-shell__badge`},Bg={key:0,class:`k-shell__sidebar-footer`},Vg={class:`k-shell__main`},Hg={class:`k-shell__header`},Ug={class:`k-shell__header-left`},Wg={class:`k-shell__header-actions`},Gg={class:`k-shell__content`},Kg=E({__name:`KShell`,props:{nav:{type:Array,default:()=>[]},title:{type:String,default:``}},setup(e){let n=(0,t.ref)(!1);return(r,i)=>{let a=(0,t.resolveComponent)(`router-link`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-shell`,{"k-shell--nav-open":n.value}])},[(0,t.createElementVNode)(`aside`,Pg,[(0,t.createElementVNode)(`div`,Fg,[(0,t.renderSlot)(r.$slots,`logo`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)]),(0,t.createElementVNode)(`nav`,Ig,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.nav,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:r},[e.section?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Lg,(0,t.toDisplayString)(e.section),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,e=>((0,t.openBlock)(),(0,t.createBlock)(a,{key:e.to,to:e.to,class:`k-shell__link`,onClick:i[0]||=e=>n.value=!1},{default:(0,t.withCtx)(()=>[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:17,class:`k-shell__link-icon`},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,Rg,(0,t.toDisplayString)(e.label),1),e.badge?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,zg,(0,t.toDisplayString)(e.badge),1)):(0,t.createCommentVNode)(``,!0)]),_:2},1032,[`to`]))),128))],64))),128))]),r.$slots.sidebarFooter?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Bg,[(0,t.renderSlot)(r.$slots,`sidebarFooter`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,Vg,[(0,t.createElementVNode)(`header`,Hg,[(0,t.createElementVNode)(`button`,{class:`k-shell__burger`,"aria-label":`Меню`,onClick:i[1]||=e=>n.value=!n.value},[(0,t.createVNode)(D,{name:n.value?`close`:`menu`,size:20},null,8,[`name`])]),(0,t.createElementVNode)(`div`,Ug,[(0,t.renderSlot)(r.$slots,`header-left`,{},void 0,!0)]),(0,t.createElementVNode)(`div`,Wg,[(0,t.renderSlot)(r.$slots,`header-actions`,{},void 0,!0),(0,t.renderSlot)(r.$slots,`user`,{},void 0,!0)])]),(0,t.createElementVNode)(`main`,Gg,[(0,t.renderSlot)(r.$slots,`default`,{},void 0,!0)])]),(0,t.createElementVNode)(`div`,{class:`k-shell__overlay`,onClick:i[2]||=e=>n.value=!1})],2)}}},[[`__scopeId`,`data-v-28e372ea`]]),qg={class:`k-stat`},Jg={class:`k-stat__head`},Yg={class:`k-stat__label`},Xg={class:`k-stat__value`},Zg={key:0,class:`k-stat__foot`},Qg={key:1,class:`k-stat__hint`},$g=E({__name:`KStat`,props:{label:{type:String,default:``},value:{type:[String,Number],default:``},hint:{type:String,default:``},icon:{type:String,default:``},tone:{type:String,default:`neutral`},trend:{type:Number,default:null},invert:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.computed)(()=>n.invert?n.trend<0:n.trend>0);return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,qg,[(0,t.createElementVNode)(`div`,Jg,[(0,t.createElementVNode)(`span`,Yg,(0,t.toDisplayString)(e.label),1),e.icon?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([`k-stat__icon`,`k-stat__icon--${e.tone}`])},[(0,t.createVNode)(D,{name:e.icon,size:16},null,8,[`name`])],2)):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,Xg,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.value),1)],!0)]),e.hint||e.trend!=null?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zg,[e.trend==null?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([`k-stat__trend`,r.value?`k-stat__trend--good`:`k-stat__trend--bad`])},[(0,t.createVNode)(D,{name:e.trend>0?`up`:`down`,size:13},null,8,[`name`]),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(Math.abs(e.trend).toLocaleString(`ru-RU`))+`% `,1)],2)),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Qg,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-65b0e012`]]),e_=O(`steps`).parts(`root`,`list`,`item`,`trigger`,`indicator`,`separator`,`content`,`nextTrigger`,`prevTrigger`,`progress`).build(),t_=e=>e.ids?.root??`steps:${e.id}`,n_=e=>e.ids?.list??`steps:${e.id}:list`,r_=(e,t)=>e.ids?.triggerId?.(t)??`steps:${e.id}:trigger:${t}`,i_=(e,t)=>e.ids?.contentId?.(t)??`steps:${e.id}:content:${t}`;function a_(e,t){let{context:n,send:r,computed:i,prop:a,scope:o}=e,s=n.get(`step`),c=a(`count`),l=i(`percent`),u=i(`hasNextStep`),d=i(`hasPrevStep`),f=e=>a(`isStepValid`)?.(e)??!0,p=e=>a(`isStepSkippable`)?.(e)??!1,m=e=>({triggerId:r_(o,e.index),contentId:i_(o,e.index),current:e.index===s,completed:e.index<s,incomplete:e.index>s,index:e.index,first:e.index===0,last:e.index===c-1,skippable:p(e.index),isValid:()=>f(e.index)}),h=()=>{r({type:`STEP.NEXT`,src:`next.trigger.click`})},g=()=>{r({type:`STEP.PREV`,src:`prev.trigger.click`})};return{value:s,count:c,percent:l,hasNextStep:u,hasPrevStep:d,isCompleted:i(`completed`),isStepValid:f,isStepSkippable:p,goToNextStep:h,goToPrevStep:g,resetStep:()=>{r({type:`STEP.RESET`,src:`reset.trigger.click`})},getItemState:m,setStep:e=>{r({type:`STEP.SET`,value:e,src:`api.setValue`})},getRootProps(){return t.element({...e_.root.attrs,id:t_(o),dir:a(`dir`),"data-orientation":a(`orientation`),style:{"--percent":`${l}%`}})},getListProps(){let e=pa(c).map((e,t)=>r_(o,t));return t.element({...e_.list.attrs,dir:a(`dir`),id:n_(o),role:`tablist`,"aria-owns":e.join(` `),"aria-orientation":a(`orientation`),"data-orientation":a(`orientation`)})},getItemProps(e){let n=m(e);return t.element({...e_.item.attrs,dir:a(`dir`),"aria-current":n.current?`step`:void 0,"data-orientation":a(`orientation`),"data-skippable":k(n.skippable)})},getTriggerProps(e){let n=m(e);return t.button({...e_.trigger.attrs,id:n.triggerId,role:`tab`,type:`button`,dir:a(`dir`),tabIndex:!a(`linear`)||n.current?0:-1,"aria-selected":n.current,"aria-controls":n.contentId,"data-state":n.current?`open`:`closed`,"data-orientation":a(`orientation`),"data-complete":k(n.completed),"data-current":k(n.current),"data-incomplete":k(n.incomplete),onClick(t){t.defaultPrevented||a(`linear`)||r({type:`STEP.SET`,value:e.index,src:`trigger.click`})}})},getContentProps(e){let n=m(e);return t.element({...e_.content.attrs,dir:a(`dir`),id:n.contentId,role:`tabpanel`,tabIndex:0,hidden:!n.current,"data-state":n.current?`open`:`closed`,"data-orientation":a(`orientation`),"aria-labelledby":n.triggerId})},getIndicatorProps(e){let n=m(e);return t.element({...e_.indicator.attrs,dir:a(`dir`),"aria-hidden":!0,"data-complete":k(n.completed),"data-current":k(n.current),"data-incomplete":k(n.incomplete)})},getSeparatorProps(e){let n=m(e);return t.element({...e_.separator.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),"data-complete":k(n.completed),"data-current":k(n.current),"data-incomplete":k(n.incomplete)})},getNextTriggerProps(){return t.button({...e_.nextTrigger.attrs,dir:a(`dir`),type:`button`,disabled:!u,onClick(e){e.defaultPrevented||h()}})},getPrevTriggerProps(){return t.button({dir:a(`dir`),...e_.prevTrigger.attrs,type:`button`,disabled:!d,onClick(e){e.defaultPrevented||g()}})},getProgressProps(){return t.element({dir:a(`dir`),...e_.progress.attrs,role:`progressbar`,"aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${l}% complete`,"data-complete":k(l===100)})}}}var o_=z({props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:`horizontal`,...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e(`defaultStep`),value:e(`step`),onChange(t){e(`onStepChange`)?.({step:t}),t==e(`count`)&&e(`onStepComplete`)?.()}}))}},computed:{percent:yo(({context:e,prop:t})=>[e.get(`step`),t(`count`)],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get(`step`)<t(`count`),hasPrevStep:({context:e})=>e.get(`step`)>0,completed:({context:e,prop:t})=>e.get(`step`)===t(`count`)},initialState(){return`idle`},entry:[`validateStepIndex`],states:{idle:{on:{"STEP.SET":[{guard:`isValidStepNavigation`,actions:[`setStep`]},{actions:[`invokeOnStepInvalid`]}],"STEP.NEXT":[{guard:`isCurrentStepValid`,actions:[`goToNextStep`]},{actions:[`invokeOnStepInvalid`]}],"STEP.PREV":{actions:[`goToPrevStep`]},"STEP.RESET":{actions:[`resetStep`]}}}},implementations:{guards:{isCurrentStepValid({context:e,prop:t}){let n=e.get(`step`);if(t(`isStepSkippable`)?.(n))return!0;let r=t(`isStepValid`);return!r||r(n)},isValidStepNavigation({context:e,event:t,prop:n}){let r=e.get(`step`);if(t.value<=r||n(`isStepSkippable`)?.(r))return!0;let i=n(`isStepValid`);return!i||i(r)}},actions:{goToNextStep({context:e,prop:t}){let n=t(`count`);e.set(`step`,Math.min(e.get(`step`)+1,n))},goToPrevStep({context:e}){e.set(`step`,Math.max(e.get(`step`)-1,0))},resetStep({context:e}){e.set(`step`,0)},setStep({context:e,event:t}){e.set(`step`,t.value)},validateStepIndex({context:e,prop:t}){s_(t(`count`),e.get(`step`))},invokeOnStepInvalid({context:e,event:t,prop:n}){n(`onStepInvalid`)?.({step:e.get(`step`),action:t.type===`STEP.NEXT`?`next`:`set`,targetStep:t.value})}}}}),s_=(e,t)=>{if(!io(t,0,e))throw RangeError(`[zag-js/steps] step index ${t} is out of bounds`)},c_={class:`k-steps__body`},l_={class:`k-steps__label`},u_={key:0,class:`k-steps__hint`},d_=E({__name:`KSteps`,props:{items:{type:Array,default:()=>[]},current:{type:Number,default:0},clickable:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:n}){let r=e,i=n,a=V(o_,{id:(0,t.useId)(),linear:!1,get step(){return r.current},get count(){return r.items.length},onStepChange({step:e}){e!==r.current&&i(`select`,e)}}),o=(0,t.computed)(()=>a_(a,B)),s=e=>typeof e==`string`?e:e.label,c=e=>typeof e==`string`?``:e.hint;return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-steps`},o.value.getRootProps()),[(0,t.createElementVNode)(`ol`,(0,t.mergeProps)({class:`k-steps__list`},o.value.getListProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:r,class:`k-steps__item`},{ref_for:!0},o.value.getItemProps({index:r})),[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.clickable?`button`:`div`),(0,t.mergeProps)({class:[`k-steps__trigger`,{"k-steps__trigger--clickable":e.clickable&&r<=e.current}]},{ref_for:!0},e.clickable?o.value.getTriggerProps({index:r}):{},{disabled:e.clickable&&r>e.current?!0:null}),{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-steps__marker`},{ref_for:!0},o.value.getIndicatorProps({index:r})),[r<e.current?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`check`,size:14})):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r+1),1)],64))],16),(0,t.createElementVNode)(`span`,c_,[(0,t.createElementVNode)(`span`,l_,(0,t.toDisplayString)(s(n)),1),c(n)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,u_,(0,t.toDisplayString)(c(n)),1)):(0,t.createCommentVNode)(``,!0)])]),_:2},1040,[`class`,`disabled`])),r<e.items.length-1?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-steps__sep`},{ref_for:!0},o.value.getSeparatorProps({index:r})),null,16)):(0,t.createCommentVNode)(``,!0)],16))),128))],16)],16))}},[[`__scopeId`,`data-v-84abd47e`]]),f_=O(`switch`).parts(`root`,`label`,`control`,`thumb`).build(),p_=e=>e.ids?.root??`switch:${e.id}`,m_=e=>e.ids?.label??`switch:${e.id}:label`,h_=e=>e.ids?.thumb??`switch:${e.id}:thumb`,g_=e=>e.ids?.control??`switch:${e.id}:control`,__=e=>e.ids?.hiddenInput??`switch:${e.id}:input`,v_=e=>e.getById(p_(e)),y_=e=>e.getById(__(e));function b_(e,t){let{context:n,send:r,prop:i,scope:a}=e,o=!!i(`disabled`),s=!!i(`readOnly`),c=!!i(`required`),l=!!n.get(`checked`),u=!o&&n.get(`focused`),d=!o&&n.get(`focusVisible`),f={"data-active":k(!o&&n.get(`active`)),"data-focus":k(u),"data-focus-visible":k(d),"data-readonly":k(s),"data-hover":k(n.get(`hovered`)),"data-disabled":k(o),"data-state":l?`checked`:`unchecked`,"data-invalid":k(i(`invalid`)),"data-required":k(c)};return{checked:l,disabled:o,focused:u,setChecked(e){r({type:`CHECKED.SET`,checked:e,isTrusted:!1})},toggleChecked(){r({type:`CHECKED.TOGGLE`,checked:l,isTrusted:!1})},getRootProps(){return t.label({...f_.root.attrs,...f,dir:i(`dir`),id:p_(a),htmlFor:__(a),onPointerMove(){o||r({type:`CONTEXT.SET`,context:{hovered:!0}})},onPointerLeave(){o||r({type:`CONTEXT.SET`,context:{hovered:!1}})},onClick(e){o||(P(e)===y_(a)&&e.stopPropagation(),Qn()&&y_(a)?.focus())}})},getLabelProps(){return t.element({...f_.label.attrs,...f,dir:i(`dir`),id:m_(a)})},getThumbProps(){return t.element({...f_.thumb.attrs,...f,dir:i(`dir`),id:h_(a),"aria-hidden":!0})},getControlProps(){return t.element({...f_.control.attrs,...f,dir:i(`dir`),id:g_(a),"aria-hidden":!0})},getHiddenInputProps(){return t.input({id:__(a),type:`checkbox`,required:i(`required`),defaultChecked:l,disabled:o,"aria-labelledby":m_(a),"aria-invalid":i(`invalid`),name:i(`name`),form:i(`form`),value:i(`value`),style:Ti,onFocus(){let e=Xi();r({type:`CONTEXT.SET`,context:{focused:!0,focusVisible:e}})},onBlur(){r({type:`CONTEXT.SET`,context:{focused:!1,focusVisible:!1}})},onClick(e){if(s){e.preventDefault();return}let t=e.currentTarget.checked;r({type:`CHECKED.SET`,checked:t,isTrusted:!0})}})}}}var{not:x_}=Ho(),S_=z({props({props:e}){return{defaultChecked:!1,label:`switch`,value:`on`,...e}},initialState(){return`ready`},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e(`defaultChecked`),value:e(`checked`),onChange(t){e(`onCheckedChange`)?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t(`disabled`)||e.get(`fieldsetDisabled`)},watch({track:e,prop:t,context:n,action:r}){e([()=>t(`disabled`)],()=>{r([`removeFocusIfNeeded`])}),e([()=>n.get(`checked`)],()=>{r([`syncInputElement`])})},effects:[`trackFormControlState`,`trackPressEvent`,`trackFocusVisible`],on:{"CHECKED.TOGGLE":[{guard:x_(`isTrusted`),actions:[`toggleChecked`,`dispatchChangeEvent`]},{actions:[`toggleChecked`]}],"CHECKED.SET":[{guard:x_(`isTrusted`),actions:[`setChecked`,`dispatchChangeEvent`]},{actions:[`setChecked`]}],"CONTEXT.SET":{actions:[`setContext`]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e(`isDisabled`))return $r({pointerNode:v_(t),keyboardNode:y_(t),isValidKey:e=>e.key===` `,onPress:()=>n.set(`active`,!1),onPressStart:()=>n.set(`active`,!0),onPressEnd:()=>n.set(`active`,!1)})},trackFocusVisible({computed:e,scope:t}){if(!e(`isDisabled`))return Zi({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return xr(y_(n),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){t({type:`CHECKED.SET`,checked:!!e.initial(`checked`),src:`form-reset`})}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){let n=y_(t);n&&gr(n,!!e.get(`checked`))},removeFocusIfNeeded({context:e,prop:t}){t(`disabled`)&&e.set(`focused`,!1)},setChecked({context:e,event:t}){e.set(`checked`,t.checked)},toggleChecked({context:e}){e.set(`checked`,!e.get(`checked`))},dispatchChangeEvent({context:e,scope:t}){queueMicrotask(()=>{_r(y_(t),{checked:e.get(`checked`)})})}}}}),C_={key:0,class:`k-switch__body`},w_={key:0,class:`k-switch__hint`},T_=E({__name:`KSwitch`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},hint:{type:String,default:``},name:{type:String,default:``},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=V(S_,{id:(0,t.useId)(),get checked(){return r.modelValue},get disabled(){return r.disabled},get name(){return r.name||void 0},onCheckedChange({checked:e}){i(`update:modelValue`,e)}}),o=(0,t.computed)(()=>b_(a,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:`k-switch`},o.value.getRootProps()),[(0,t.createElementVNode)(`input`,(0,t.normalizeProps)((0,t.guardReactiveProps)(o.value.getHiddenInputProps())),null,16),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-switch__track`},o.value.getControlProps()),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-switch__thumb`},o.value.getThumbProps()),null,16)],16),e.label||e.hint||n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,C_,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-switch__label`},o.value.getLabelProps()),[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],16),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,w_,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}},[[`__scopeId`,`data-v-0896c0cd`]]),E_={class:`k-table__scroll`},D_={class:`k-table__table`},O_=[`onClick`],k_={class:`k-table__th-inner`},A_={key:0},j_=[`colspan`],M_={key:1},N_=[`colspan`],P_=[`onClick`],F_=E({__name:`KTable`,props:{columns:{type:Array,required:!0},rows:{type:Array,default:()=>[]},rowKey:{type:[String,Function],default:`id`},loading:{type:Boolean,default:!1},emptyText:{type:String,default:`Ничего не найдено`},clickable:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},sortKey:{type:String,default:``},sortDir:{type:String,default:`asc`},page:{type:Number,default:1},pageSize:{type:Number,default:0},total:{type:Number,default:0}},emits:[`update:page`,`update:sortKey`,`update:sortDir`,`row-click`],setup(e,{emit:n}){let r=e,i=n;function a(e,t){return typeof r.rowKey==`function`?r.rowKey(e):e[r.rowKey]??t}function o(e){e.sortable&&(r.sortKey===e.key?i(`update:sortDir`,r.sortDir===`asc`?`desc`:`asc`):(i(`update:sortKey`,e.key),i(`update:sortDir`,`asc`)))}let s=(0,t.computed)(()=>r.pageSize>0&&r.total>r.pageSize);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-table`,{"k-table--dense":e.dense}])},[(0,t.createElementVNode)(`div`,E_,[(0,t.createElementVNode)(`table`,D_,[(0,t.createElementVNode)(`thead`,null,[(0,t.createElementVNode)(`tr`,null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.columns,n=>((0,t.openBlock)(),(0,t.createElementBlock)(`th`,{key:n.key,style:(0,t.normalizeStyle)({width:n.width,textAlign:n.align||`left`}),class:(0,t.normalizeClass)({"k-table__th--sortable":n.sortable}),onClick:e=>o(n)},[(0,t.createElementVNode)(`span`,k_,[(0,t.createTextVNode)((0,t.toDisplayString)(n.label)+` `,1),n.sortable?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.sortKey===n.key&&e.sortDir===`desc`?`chevron-down`:`chevron-up`,size:13,class:(0,t.normalizeClass)([`k-table__sort`,{"k-table__sort--active":e.sortKey===n.key}])},null,8,[`name`,`class`])):(0,t.createCommentVNode)(``,!0)])],14,O_))),128))])]),(0,t.createElementVNode)(`tbody`,null,[e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`tr`,A_,[(0,t.createElementVNode)(`td`,{colspan:e.columns.length,class:`k-table__msg`},[(0,t.createVNode)(D,{name:`spinner`,size:18,spin:``}),r[2]||=(0,t.createTextVNode)(` Загрузка… `,-1)],8,j_)])):e.rows.length?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:2},(0,t.renderList)(e.rows,(o,s)=>((0,t.openBlock)(),(0,t.createElementBlock)(`tr`,{key:a(o,s),class:(0,t.normalizeClass)({"k-table__row--clickable":e.clickable}),onClick:t=>e.clickable&&i(`row-click`,o)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.columns,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`td`,{key:e.key,style:(0,t.normalizeStyle)({textAlign:e.align||`left`,whiteSpace:e.nowrap?`nowrap`:null})},[e.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`k-table__actions`,onClick:r[0]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.renderSlot)(n.$slots,`cell-${e.key}`,{row:o,value:o[e.key],index:s},void 0,!0)])):(0,t.renderSlot)(n.$slots,`cell-${e.key}`,{row:o,value:o[e.key],index:s},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(o[e.key]),1)],!0,1)],4))),128))],10,P_))),128)):((0,t.openBlock)(),(0,t.createElementBlock)(`tr`,M_,[(0,t.createElementVNode)(`td`,{colspan:e.columns.length,class:`k-table__msg`},[(0,t.renderSlot)(n.$slots,`empty`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.emptyText),1)],!0)],8,N_)]))])])]),s.value?((0,t.openBlock)(),(0,t.createBlock)(fh,{key:0,page:e.page,"page-size":e.pageSize,total:e.total,"onUpdate:page":r[1]||=e=>i(`update:page`,e)},null,8,[`page`,`page-size`,`total`])):(0,t.createCommentVNode)(``,!0)],2))}},[[`__scopeId`,`data-v-0ce6707d`]]),I_=O(`tabs`).parts(`root`,`list`,`trigger`,`content`,`indicator`).build(),L_=e=>e.ids?.root??`tabs:${e.id}`,R_=e=>e.ids?.list??`tabs:${e.id}:list`,z_=(e,t)=>e.ids?.content?.(t)??`tabs:${e.id}:content-${t}`,B_=(e,t)=>e.ids?.trigger?.(t)??`tabs:${e.id}:trigger-${t}`,V_=e=>e.ids?.indicator??`tabs:${e.id}:indicator`,H_=e=>e.getById(R_(e)),U_=(e,t)=>e.getById(z_(e,t)),W_=(e,t)=>t==null?null:e.getById(B_(e,t)),G_=e=>e.getById(V_(e)),K_=e=>{let t=`[role=tab]${tn(R_(e))}:not([disabled])`;return ii(H_(e),t)},q_=e=>ma(K_(e)),J_=e=>ha(K_(e)),Y_=(e,t)=>li(K_(e),B_(e,t.value),t.loopFocus),X_=(e,t)=>ui(K_(e),B_(e,t.value),t.loopFocus),Z_=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),Q_=(e,t)=>Z_(si(K_(e),B_(e,t)));function $_(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`translations`),c=n.matches(`focused`),l=a(`orientation`)===`vertical`,u=a(`orientation`)===`horizontal`,d=a(`composite`);function f(e){return{selected:i.get(`value`)===e.value,focused:i.get(`focusedValue`)===e.value,disabled:!!e.disabled}}return{value:i.get(`value`),focusedValue:i.get(`focusedValue`),setValue(e){r({type:`SET_VALUE`,value:e})},clearValue(){r({type:`CLEAR_VALUE`})},setIndicatorRect(e){let t=B_(o,e);r({type:`SET_INDICATOR_RECT`,id:t})},syncTabIndex(){r({type:`SYNC_TAB_INDEX`})},selectNext(e){r({type:`TAB_FOCUS`,value:e,src:`selectNext`}),r({type:`ARROW_NEXT`,src:`selectNext`})},selectPrev(e){r({type:`TAB_FOCUS`,value:e,src:`selectPrev`}),r({type:`ARROW_PREV`,src:`selectPrev`})},focus(){let e=i.get(`value`);e&&W_(o,e)?.focus()},getRootProps(){return t.element({...I_.root.attrs,id:L_(o),"data-orientation":a(`orientation`),"data-focus":k(c),dir:a(`dir`)})},getListProps(){return t.element({...I_.list.attrs,id:R_(o),role:`tablist`,dir:a(`dir`),"data-focus":k(c),"aria-orientation":a(`orientation`),"data-orientation":a(`orientation`),"aria-label":s?.listLabel,onKeyDown(e){if(e.defaultPrevented||ir(e)||!j(e.currentTarget,P(e)))return;let t={ArrowDown(){u||r({type:`ARROW_NEXT`,key:`ArrowDown`})},ArrowUp(){u||r({type:`ARROW_PREV`,key:`ArrowUp`})},ArrowLeft(){l||r({type:`ARROW_PREV`,key:`ArrowLeft`})},ArrowRight(){l||r({type:`ARROW_NEXT`,key:`ArrowRight`})},Home(){r({type:`HOME`})},End(){r({type:`END`})}}[fr(e,{dir:a(`dir`),orientation:a(`orientation`)})];if(t){e.preventDefault(),t(e);return}}})},getTriggerState:f,getTriggerProps(e){let{value:n,disabled:s}=e,c=f(e);return t.button({...I_.trigger.attrs,role:`tab`,type:`button`,disabled:s,dir:a(`dir`),"data-orientation":a(`orientation`),"data-disabled":k(s),"aria-disabled":s,"data-value":n,"aria-selected":c.selected,"data-selected":k(c.selected),"data-focus":k(c.focused),"aria-controls":c.selected?z_(o,n):void 0,"data-ownedby":R_(o),"data-ssr":k(i.get(`ssr`)),id:B_(o,n),tabIndex:c.selected&&d?0:-1,onFocus(){r({type:`TAB_FOCUS`,value:n})},onBlur(e){e.relatedTarget?.getAttribute(`role`)!==`tab`&&r({type:`TAB_BLUR`})},onClick(e){e.defaultPrevented||nr(e)||s||(Qn()&&e.currentTarget.focus(),r({type:`TAB_CLICK`,value:n}))}})},getContentProps(e){let{value:n}=e,r=i.get(`value`)===n;return t.element({...I_.content.attrs,dir:a(`dir`),id:z_(o,n),tabIndex:d?0:-1,"aria-labelledby":B_(o,n),role:`tabpanel`,"data-ownedby":R_(o),"data-selected":k(r),"data-orientation":a(`orientation`),hidden:!r})},getIndicatorProps(){let e=i.get(`indicatorRect`),n=i.get(`animateIndicator`);return t.element({id:V_(o),...I_.indicator.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),hidden:ev(e),onTransitionEnd(e){P(e)===e.currentTarget&&r({type:`INDICATOR_TRANSITION_END`})},style:{"--transition-property":`left, right, top, bottom, width, height`,"--left":oo(e?.x),"--top":oo(e?.y),"--width":oo(e?.width),"--height":oo(e?.height),position:`absolute`,willChange:n?`var(--transition-property)`:`auto`,transitionProperty:n?`var(--transition-property)`:`none`,transitionDuration:n?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[u?`left`:`top`]:u?`var(--left)`:`var(--top)`}})}}}var ev=e=>e==null||e.width===0&&e.height===0&&e.x===0&&e.y===0,{createMachine:tv}=Uo(),nv=tv({props({props:e}){return{dir:`ltr`,orientation:`horizontal`,activationMode:`automatic`,loopFocus:!0,composite:!0,navigate(e){qr(e.node)},defaultValue:null,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),focusedValue:t(()=>({defaultValue:e(`value`)||e(`defaultValue`),sync:!0,onChange(t){e(`onFocusChange`)?.({focusedValue:t})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1}))}},refs(){return{indicatorCleanup:null,prevValue:null}},watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`)],()=>{r([`syncIndicatorAnimation`,`syncIndicatorRect`,`syncTabIndex`,`navigateIfNeeded`])}),n([()=>t(`dir`),()=>t(`orientation`)],()=>{r([`syncIndicatorRect`])})},on:{SET_VALUE:{actions:[`setValue`]},CLEAR_VALUE:{actions:[`clearValue`]},SET_INDICATOR_RECT:{actions:[`setIndicatorRect`]},SYNC_TAB_INDEX:{actions:[`syncTabIndex`]},INDICATOR_TRANSITION_END:{actions:[`clearIndicatorAnimation`]}},entry:[`syncPrevValue`,`syncIndicatorRect`,`syncTabIndex`,`syncSsr`],exit:[`cleanupObserver`],states:{idle:{on:{TAB_FOCUS:{target:`focused`,actions:[`setFocusedValue`]},TAB_CLICK:{target:`focused`,actions:[`setFocusedValue`,`setValue`]}}},focused:{on:{TAB_CLICK:{actions:[`setFocusedValue`,`setValue`]},ARROW_PREV:[{guard:`selectOnFocus`,actions:[`focusPrevTab`,`selectFocusedTab`]},{actions:[`focusPrevTab`]}],ARROW_NEXT:[{guard:`selectOnFocus`,actions:[`focusNextTab`,`selectFocusedTab`]},{actions:[`focusNextTab`]}],HOME:[{guard:`selectOnFocus`,actions:[`focusFirstTab`,`selectFocusedTab`]},{actions:[`focusFirstTab`]}],END:[{guard:`selectOnFocus`,actions:[`focusLastTab`,`selectFocusedTab`]},{actions:[`focusLastTab`]}],TAB_FOCUS:{actions:[`setFocusedValue`]},TAB_BLUR:{target:`idle`,actions:[`clearFocusedValue`]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e(`activationMode`)===`automatic`},actions:{selectFocusedTab({context:e,prop:t}){L(()=>{let n=e.get(`focusedValue`);if(!n)return;let r=t(`deselectable`)&&e.get(`value`)===n?null:n;e.set(`value`,r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set(`focusedValue`,t.value)})},clearFocusedValue({context:e}){e.set(`focusedValue`,null)},setValue({context:e,event:t,prop:n}){let r=n(`deselectable`)&&e.get(`value`)===e.get(`focusedValue`);e.set(`value`,r?null:t.value)},clearValue({context:e}){e.set(`value`,null)},focusFirstTab({scope:e}){L(()=>{q_(e)?.focus()})},focusLastTab({scope:e}){L(()=>{J_(e)?.focus()})},focusNextTab({context:e,prop:t,scope:n,event:r}){let i=r.value??e.get(`focusedValue`);if(!i)return;let a=Y_(n,{value:i,loopFocus:t(`loopFocus`)});L(()=>{t(`composite`)?a?.focus():a?.dataset.value!=null&&e.set(`focusedValue`,a.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:r}){let i=r.value??e.get(`focusedValue`);if(!i)return;let a=X_(n,{value:i,loopFocus:t(`loopFocus`)});L(()=>{t(`composite`)?a?.focus():a?.dataset.value!=null&&e.set(`focusedValue`,a.dataset.value)})},syncTabIndex({context:e,scope:t}){L(()=>{let n=e.get(`value`);if(!n)return;let r=U_(t,n);r&&(Fr(r).length>0?r.removeAttribute(`tabindex`):r.setAttribute(`tabindex`,`0`))})},cleanupObserver({refs:e}){let t=e.get(`indicatorCleanup`);t&&t()},setIndicatorRect({context:e,event:t,scope:n}){let r=t.id??e.get(`value`);G_(n)&&r&&W_(n,r)&&e.set(`indicatorRect`,Q_(n,r))},syncSsr({context:e}){e.set(`ssr`,!1)},syncPrevValue({context:e,refs:t}){t.set(`prevValue`,e.get(`value`))},syncIndicatorAnimation({context:e,refs:t}){let n=t.get(`prevValue`),r=e.get(`value`),i=n!=null&&r!=null&&n!==r;e.set(`animateIndicator`,i),t.set(`prevValue`,r)},clearIndicatorAnimation({context:e}){e.set(`animateIndicator`,!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let r=t.get(`indicatorCleanup`);if(r&&r(),!G_(n))return;let i=()=>{let t=W_(n,e.get(`value`));if(!t)return;let r=Z_(t);e.set(`indicatorRect`,e=>Ca(e,r)?e:r)};i();let a=K_(n),o=H_(n),s=Ha(...a.map(e=>fi.observe(e,i)),...o?[fi.observe(o,i)]:[]);t.set(`indicatorCleanup`,s)},navigateIfNeeded({context:e,prop:t,scope:n}){let r=e.get(`value`);if(!r)return;let i=W_(n,r);pn(i)&&t(`navigate`)?.({value:r,node:i,href:i.href})}}}}),rv={class:`k-tabs__label`},iv={key:1,class:`k-tabs__count`},av={key:0,class:`k-tabs__hint`},ov=E({__name:`KTabs`,props:{modelValue:{type:[String,Number],default:``},items:{type:Array,default:()=>[]},variant:{type:String,default:`line`}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=V(nv,{id:(0,t.useId)(),get value(){return r.modelValue===``||r.modelValue==null?null:String(r.modelValue)},onValueChange({value:e}){let t=r.items.find(t=>String(t.value)===e);i(`update:modelValue`,t?t.value:e)}}),o=(0,t.computed)(()=>$_(a,B));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:[`k-tabs`,`k-tabs--${e.variant}`]},o.value.getRootProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-tabs__list`},o.value.getListProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:e.value,class:[`k-tabs__tab`,{"k-tabs__tab--hinted":e.hint}]},{ref_for:!0},o.value.getTriggerProps({value:String(e.value),disabled:e.disabled})),[(0,t.createElementVNode)(`span`,rv,[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:15},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.label)+` `,1),e.count==null?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,iv,(0,t.toDisplayString)(e.count),1))]),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,av,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16))),128))],16)],16))}},[[`__scopeId`,`data-v-d6a570d0`]]),sv={key:0,class:`k-textarea__label`},cv={key:0,class:`k-textarea__req`},lv=[`value`,`rows`,`placeholder`,`required`,`disabled`],uv={key:1,class:`k-textarea__error`},dv={key:2,class:`k-textarea__hint`},fv=E(Object.assign({inheritAttrs:!1},{__name:`KTextarea`,props:{modelValue:{type:String,default:``},label:{type:String,default:``},placeholder:{type:String,default:``},rows:{type:[Number,String],default:4},hint:{type:String,default:``},error:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e){let n=(0,t.useAttrs)(),r=(0,t.computed)(()=>({class:n.class,style:n.style})),i=(0,t.computed)(()=>{let{class:e,style:t,...r}=n;return r});return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:`k-textarea`},r.value),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,sv,[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,cv,`*`)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`textarea`,(0,t.mergeProps)({class:[`k-textarea__field`,{"k-textarea__field--error":e.error}],value:e.modelValue,rows:e.rows,placeholder:e.placeholder,required:e.required,disabled:e.disabled},i.value,{onInput:a[0]||=e=>n.$emit(`update:modelValue`,e.target.value)}),null,16,lv),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,uv,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,dv,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-b46790f4`]]),pv={class:`k-timeline`},mv={class:`k-timeline__body`},hv={class:`k-timeline__head`},gv={class:`k-timeline__title`},_v={class:`k-timeline__time`},vv={key:0,class:`k-timeline__text`},yv=E({__name:`KTimeline`,props:{items:{type:Array,default:()=>[]}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`ol`,pv,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:r,class:`k-timeline__item`},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`k-timeline__marker`,`k-timeline__marker--${e.tone||`neutral`}`])},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:12},null,8,[`name`])):(0,t.createCommentVNode)(``,!0)],2),(0,t.createElementVNode)(`div`,mv,[(0,t.createElementVNode)(`div`,hv,[(0,t.createElementVNode)(`span`,gv,[(0,t.renderSlot)(n.$slots,`title`,{item:e},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)]),(0,t.createElementVNode)(`span`,_v,(0,t.toDisplayString)(e.time),1)]),e.text?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,vv,(0,t.toDisplayString)(e.text),1)):(0,t.createCommentVNode)(``,!0),(0,t.renderSlot)(n.$slots,`extra`,{item:e},void 0,!0)])]))),128))]))}},[[`__scopeId`,`data-v-0bbdcdd1`]]),bv=O(`toast`).parts(`group`,`root`,`title`,`description`,`actionTrigger`,`closeTrigger`).build(),xv=e=>`toast-group:${e}`,Sv=(e,t)=>e.getById(`toast-group:${t}`),Cv=e=>`toast:${e.id}`,wv=e=>e.getById(Cv(e)),Tv=e=>`toast:${e.id}:title`,Ev=e=>`toast:${e.id}:description`,Dv=e=>`toast${e.id}:close`,Ov={info:5e3,error:5e3,success:2e3,loading:1/0,warning:5e3,DEFAULT:5e3};function kv(e,t){return e??Ov[t]??Ov.DEFAULT}var Av=e=>typeof e==`string`?{left:e,right:e,bottom:e,top:e}:e;function jv(e,t){let{prop:n,computed:r,context:i}=e,{offsets:a,gap:o}=n(`store`).attrs,s=i.get(`heights`),c=Av(a),l=n(`dir`)===`rtl`,u=t.replace(`-start`,l?`-right`:`-left`).replace(`-end`,l?`-left`:`-right`),d=u.includes(`right`),f=u.includes(`left`),p={position:`fixed`,pointerEvents:r(`count`)>0?void 0:`none`,display:`flex`,flexDirection:`column`,"--gap":`${o}px`,"--first-height":`${s[0]?.height||0}px`,"--viewport-offset-left":c.left,"--viewport-offset-right":c.right,"--viewport-offset-top":c.top,"--viewport-offset-bottom":c.bottom,zIndex:Xt},m=`center`;return d&&(m=`flex-end`),f&&(m=`flex-start`),p.alignItems=m,u.includes(`top`)&&(p.top=`max(env(safe-area-inset-top, 0px), ${c.top})`),u.includes(`bottom`)&&(p.bottom=`max(env(safe-area-inset-bottom, 0px), ${c.bottom})`),u.includes(`left`)||(p.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${c.right})`),u.includes(`right`)||(p.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${c.left})`),p}function Mv(e,t){let{prop:n,context:r,computed:i}=e,a=n(`parent`),o=a.computed(`placement`),{gap:s}=a.prop(`store`).attrs,[c]=o.split(`-`),l=r.get(`mounted`),u=r.get(`remainingTime`),d=i(`height`),f=i(`frontmost`),p=!f,m=!n(`stacked`),h=n(`stacked`),g=n(`type`)===`loading`?2**53-1:u,_=i(`heightIndex`)*s+i(`heightBefore`),v={position:`absolute`,pointerEvents:`auto`,"--opacity":`0`,"--remove-delay":`${n(`removeDelay`)}ms`,"--duration":`${g}ms`,"--initial-height":`${d}px`,"--offset":`${_}px`,"--index":n(`index`),"--z-index":i(`zIndex`),"--lift-amount":`calc(var(--lift) * var(--gap))`,"--y":`100%`,"--x":`0`},y=e=>Object.assign(v,e);return c===`top`?y({top:`0`,"--sign":`-1`,"--y":`-100%`,"--lift":`1`}):c===`bottom`&&y({bottom:`0`,"--sign":`1`,"--y":`100%`,"--lift":`-1`}),l&&(y({"--y":`0`,"--opacity":`1`}),h&&y({"--y":`calc(var(--lift) * var(--offset))`,"--height":`var(--initial-height)`})),t||y({"--opacity":`0`,pointerEvents:`none`}),p&&m&&(y({"--base-scale":`var(--index) * 0.05 + 1`,"--y":`calc(var(--lift-amount) * var(--index))`,"--scale":`calc(-1 * var(--base-scale))`,"--height":`var(--first-height)`}),t||y({"--y":`calc(var(--sign) * 40%)`})),p&&h&&!t&&y({"--y":`calc(var(--lift) * var(--offset) + var(--lift) * -100%)`}),f&&!t&&y({"--y":`calc(var(--lift) * -100%)`}),v}function Nv(e,t){let{computed:n}=e,r={position:`absolute`,inset:`0`,scale:`1 2`,pointerEvents:t?`none`:`auto`};return n(`frontmost`)&&!t&&(e=>Object.assign(r,e))({height:`calc(var(--initial-height) + 80%)`}),r}function Pv(){return{position:`absolute`,left:`0`,height:`calc(var(--gap) + 2px)`,bottom:`100%`,width:`100%`}}function Fv(e,t){let{context:n,prop:r,send:i,refs:a,computed:o}=e;return{getCount(){return n.get(`toasts`).length},getToasts(){return n.get(`toasts`)},getGroupProps(n={}){let{label:s=`Notifications`}=n,{hotkey:c}=r(`store`).attrs,l=c.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),u=o(`placement`),[d,f=`center`]=u.split(`-`);return t.element({...bv.group.attrs,dir:r(`dir`),tabIndex:-1,role:`region`,"aria-label":`${s}, ${u} (${l})`,id:xv(u),"data-placement":u,"data-side":d,"data-align":f,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,style:jv(e,u),onMouseEnter(){a.get(`ignoreMouseTimer`).isActive()||i({type:`REGION.POINTER_ENTER`,placement:u})},onMouseMove(){a.get(`ignoreMouseTimer`).isActive()||i({type:`REGION.POINTER_ENTER`,placement:u})},onMouseLeave(){a.get(`ignoreMouseTimer`).isActive()||i({type:`REGION.POINTER_LEAVE`,placement:u})},onFocus(e){i({type:`REGION.FOCUS`,target:e.relatedTarget})},onBlur(e){a.get(`isFocusWithin`)&&!j(e.currentTarget,e.relatedTarget)&&queueMicrotask(()=>i({type:`REGION.BLUR`}))}})},subscribe(e){return r(`store`).subscribe(()=>e(n.get(`toasts`)))}}}var{guards:Iv,createMachine:Lv}=Uo(),{and:Rv}=Iv,zv=Lv({props({props:e}){return{dir:`ltr`,id:Ua(),...e,store:e.store}},initialState({prop:e}){return e(`store`).attrs.overlap?`overlap`:`stack`},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:Hr.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:e=>e.map(e=>e.id).join(`,`)})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get(`toasts`).length,overlap:({prop:e})=>e(`store`).attrs.overlap,placement:({prop:e})=>e(`store`).attrs.placement},effects:[`subscribeToStore`,`trackDocumentVisibility`,`trackHotKeyPress`],watch({track:e,context:t,action:n}){e([()=>t.hash(`toasts`)],()=>{queueMicrotask(()=>{n([`collapsedIfEmpty`,`setDismissableBranch`])})})},exit:[`clearDismissableBranch`,`clearLastFocusedEl`,`clearMouseEventTimer`],on:{"DOC.HOTKEY":{actions:[`focusRegionEl`]},"REGION.BLUR":[{guard:Rv(`isOverlapping`,`isPointerOut`),target:`overlap`,actions:[`collapseToasts`,`resumeToasts`,`restoreFocusIfPointerOut`]},{guard:`isPointerOut`,target:`stack`,actions:[`resumeToasts`,`restoreFocusIfPointerOut`]},{actions:[`clearFocusWithin`]}],"TOAST.REMOVE":{actions:[`removeToast`,`removeHeight`,`ignoreMouseEventsTemporarily`]},"TOAST.PAUSE":{actions:[`pauseToasts`]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:`isOverlapping`,target:`overlap`,actions:[`clearPointerWithin`,`resumeToasts`,`collapseToasts`]},{actions:[`clearPointerWithin`,`resumeToasts`]}],"REGION.OVERLAP":{target:`overlap`,actions:[`collapseToasts`]},"REGION.FOCUS":{actions:[`setLastFocusedEl`,`pauseToasts`]},"REGION.POINTER_ENTER":{actions:[`setPointerWithin`,`pauseToasts`]}}},overlap:{on:{"REGION.STACK":{target:`stack`,actions:[`expandToasts`]},"REGION.POINTER_ENTER":{target:`stack`,actions:[`setPointerWithin`,`pauseToasts`,`expandToasts`]},"REGION.FOCUS":{target:`stack`,actions:[`setLastFocusedEl`,`pauseToasts`,`expandToasts`]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e(`overlap`),isPointerOut:({refs:e})=>!e.get(`isPointerWithin`)},effects:{subscribeToStore({context:e,prop:t}){let n=t(`store`);return e.set(`toasts`,n.getVisibleToasts()),n.subscribe(t=>{if(t.dismiss){e.set(`toasts`,e=>e.filter(e=>e.id!==t.id));return}e.set(`toasts`,e=>{let n=e.findIndex(e=>e.id===t.id);return n===-1?[t,...e]:[...e.slice(0,n),{...e[n],...t},...e.slice(n+1)]})})},trackHotKeyPress({prop:e,send:t}){return F(document,`keydown`,n=>{let{hotkey:r}=e(`store`).attrs;r.every(e=>n[e]||n.code===e)&&t({type:`DOC.HOTKEY`})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){let{pauseOnPageIdle:r}=e(`store`).attrs;if(!r)return;let i=n.getDoc();return F(i,`visibilitychange`,()=>{t({type:i.visibilityState===`hidden`?`PAUSE_ALL`:`RESUME_ALL`})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:r}){let i=t.get(`toasts`),a=n(`placement`),o=i.length>0;if(!o){e.get(`dismissableCleanup`)?.();return}if(o&&e.get(`dismissableCleanup`))return;let s=Gu(()=>Sv(r,a),{defer:!0});e.set(`dismissableCleanup`,s)},clearDismissableBranch({refs:e}){e.get(`dismissableCleanup`)?.()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{Sv(e,t(`placement`))?.focus()})},pauseToasts({prop:e}){e(`store`).pause()},resumeToasts({prop:e}){e(`store`).resume()},expandToasts({prop:e}){e(`store`).expand()},collapseToasts({prop:e}){e(`store`).collapse()},removeToast({prop:e,event:t}){e(`store`).remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set(`heights`,t=>t.filter(t=>t.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t(`overlap`)||t(`count`)>1||e({type:`REGION.OVERLAP`})},setLastFocusedEl({refs:e,event:t}){!e.get(`isFocusWithin`)&&t.target&&(e.set(`isFocusWithin`,!0),e.set(`lastFocusedEl`,t.target))},restoreFocusIfPointerOut({refs:e}){e.get(`lastFocusedEl`)&&!e.get(`isPointerWithin`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null),e.set(`isFocusWithin`,!1))},setPointerWithin({refs:e}){e.set(`isPointerWithin`,!0)},clearPointerWithin({refs:e}){e.set(`isPointerWithin`,!1),e.get(`lastFocusedEl`)&&!e.get(`isFocusWithin`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null))},clearFocusWithin({refs:e}){e.set(`isFocusWithin`,!1)},clearLastFocusedEl({refs:e}){e.get(`lastFocusedEl`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null),e.set(`isFocusWithin`,!1))},ignoreMouseEventsTemporarily({refs:e}){e.get(`ignoreMouseTimer`).request()},clearMouseEventTimer({refs:e}){e.get(`ignoreMouseTimer`).cancel()}}}}),Bv={closeTriggerLabel:`Dismiss notification`};function Vv(e,t){let{state:n,send:r,prop:i,scope:a,context:o,computed:s}=e,c=co(Bv,i(`translations`)),l=n.hasTag(`visible`),u=n.hasTag(`paused`),d=o.get(`mounted`),f=s(`frontmost`),p=i(`parent`).computed(`placement`),m=i(`type`),h=i(`stacked`),g=i(`title`),_=i(`description`),v=i(`action`),[y,b=`center`]=p.split(`-`);return{type:m,title:g,description:_,placement:p,visible:l,paused:u,closable:!!i(`closable`),pause(){r({type:`PAUSE`})},resume(){r({type:`RESUME`})},dismiss(){r({type:`DISMISS`,src:`programmatic`})},getRootProps(){return t.element({...bv.root.attrs,dir:i(`dir`),id:Cv(a),"data-state":l?`open`:`closed`,"data-type":m,"data-placement":p,"data-align":b,"data-side":y,"data-mounted":k(d),"data-paused":k(u),"data-first":k(f),"data-sibling":k(!f),"data-stack":k(h),"data-overlap":k(!h),role:`status`,"aria-atomic":`true`,"aria-describedby":_?Ev(a):void 0,"aria-labelledby":g?Tv(a):void 0,tabIndex:0,style:Mv(e,l),onKeyDown(e){e.defaultPrevented||e.key==`Escape`&&(r({type:`DISMISS`,src:`keyboard`}),e.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":`before`,style:Nv(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":`after`,style:Pv()})},getTitleProps(){return t.element({...bv.title.attrs,id:Tv(a)})},getDescriptionProps(){return t.element({...bv.description.attrs,id:Ev(a)})},getActionTriggerProps(){return t.button({...bv.actionTrigger.attrs,type:`button`,onClick(e){e.defaultPrevented||(v?.onClick?.(),r({type:`DISMISS`,src:`user`}))}})},getCloseTriggerProps(){return t.button({id:Dv(a),...bv.closeTrigger.attrs,type:`button`,"aria-label":c?.closeTriggerLabel,onClick(e){e.defaultPrevented||r({type:`DISMISS`,src:`user`})}})}}}var{not:Hv}=Ho(),Uv=z({props({props:e}){return vo(e,[`id`,`type`,`parent`,`removeDelay`],`toast`),{closable:!0,...e,duration:kv(e.duration,e.type)}},initialState({prop:e}){return e(`type`)===`loading`||e(`duration`)===1/0?`visible:persist`:`visible`},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:kv(e(`duration`),e(`type`))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e(`parent`).context.get(`toasts`),n=t.findIndex(t=>t.id===e(`id`));return t.length-n},height:({prop:e})=>e(`parent`).context.get(`heights`).find(t=>t.id===e(`id`))?.height??0,heightIndex:({prop:e})=>e(`parent`).context.get(`heights`).findIndex(t=>t.id===e(`id`)),frontmost:({prop:e})=>e(`index`)===0,heightBefore:({prop:e})=>{let t=e(`parent`).context.get(`heights`),n=t.findIndex(t=>t.id===e(`id`));return t.reduce((e,t,r)=>r>=n?e:e+t.height,0)},shouldPersist:({prop:e})=>e(`type`)===`loading`||e(`duration`)===1/0},watch({track:e,prop:t,send:n}){e([()=>t(`message`)],()=>{let e=t(`message`);e&&n({type:e,src:`programmatic`})}),e([()=>t(`type`),()=>t(`duration`)],()=>{n({type:`UPDATE`})})},on:{UPDATE:[{guard:`shouldPersist`,target:`visible:persist`,actions:[`resetCloseTimer`]},{target:`visible:updating`,actions:[`resetCloseTimer`]}],MEASURE:{actions:[`measureHeight`]}},entry:[`setMounted`,`measureHeight`,`invokeOnVisible`],effects:[`trackHeight`],states:{"visible:updating":{tags:[`visible`,`updating`],effects:[`waitForNextTick`],on:{SHOW:{target:`visible`}}},"visible:persist":{tags:[`visible`,`paused`],on:{RESUME:{guard:Hv(`isLoadingType`),target:`visible`,actions:[`setCloseTimer`]},DISMISS:{target:`dismissing`}}},visible:{tags:[`visible`],effects:[`waitForDuration`],on:{DISMISS:{target:`dismissing`},PAUSE:{target:`visible:persist`,actions:[`syncRemainingTime`]}}},dismissing:{entry:[`invokeOnDismiss`],effects:[`waitForRemoveDelay`],on:{REMOVE:{target:`unmounted`,actions:[`notifyParentToRemove`]}}},unmounted:{entry:[`invokeOnUnmount`]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return mo(()=>{t({type:`REMOVE`,src:`timer`})},e(`removeDelay`))},waitForDuration({send:e,context:t,computed:n}){if(!n(`shouldPersist`))return mo(()=>{e({type:`DISMISS`,src:`timer`})},t.get(`remainingTime`))},waitForNextTick({send:e}){return mo(()=>{e({type:`SHOW`,src:`timer`})},0)},trackHeight({scope:e,prop:t}){let n;return L(()=>{let r=wv(e);if(!r)return;let i=new(e.getWin()).MutationObserver(()=>{let e=Wv(r),n={id:t(`id`),height:e};Gv(t(`parent`),n)});i.observe(r,{childList:!0,subtree:!0,characterData:!0}),n=()=>i.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e(`type`)===`loading`,shouldPersist:({computed:e})=>e(`shouldPersist`)},actions:{setMounted({context:e}){L(()=>{e.set(`mounted`,!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{let r=wv(e);if(!r)return;let i=Wv(r);n.set(`initialHeight`,i);let a={id:t(`id`),height:i};Gv(t(`parent`),a)})},setCloseTimer({refs:e}){e.set(`closeTimerStartTime`,Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set(`closeTimerStartTime`,Date.now()),e.set(`remainingTime`,kv(n(`duration`),n(`type`)))},syncRemainingTime({context:e,refs:t}){e.set(`remainingTime`,e=>{let n=t.get(`closeTimerStartTime`),r=Date.now()-n;return t.set(`lastCloseStartTimerStartTime`,Date.now()),e-r})},notifyParentToRemove({prop:e}){e(`parent`).send({type:`TOAST.REMOVE`,id:e(`id`)})},invokeOnDismiss({prop:e,event:t}){e(`onStatusChange`)?.({status:`dismissing`,src:t.src})},invokeOnUnmount({prop:e}){e(`onStatusChange`)?.({status:`unmounted`})},invokeOnVisible({prop:e}){e(`onStatusChange`)?.({status:`visible`})}}}});function Wv(e){let t=e.style.height;e.style.height=`auto`;let n=e.offsetHeight;return e.style.height=t,n}function Gv(e,t){let{id:n,height:r}=t;e.context.set(`heights`,e=>e.find(e=>e.id===n)?e.map(e=>e.id===n?{...e,height:r}:e):[{id:n,height:r},...e])}var Kv=(e,t)=>({...t,...so(e)}),qv={error:[1,2],warning:[3,6],loading:[4,5],success:[5,7],info:[6,8]},Jv=`info`,Yv=(e,t)=>{let[n,r]=qv[e??Jv];return t?n:r},Xv=e=>e.sort((e,t)=>(e.priority??Yv(e.type,!!e.action))-(t.priority??Yv(t.type,!!t.action)));function Zv(e={}){let t=Kv(e,{placement:`bottom`,overlap:!1,max:24,gap:16,offsets:`1rem`,hotkey:[`altKey`,`KeyT`],removeDelay:200,pauseOnPageIdle:!0}),n=[],r=[],i=new Set,a=[],o=e=>(n.push(e),()=>{let t=n.indexOf(e);n.splice(t,1)}),s=e=>(n.forEach(t=>t(e)),e),c=e=>{if(r.length>=t.max){a.push(e);return}s(e),r.unshift(e)},l=()=>{for(a=Xv(a);a.length>0&&r.length<t.max;){let e=a.shift();e&&(s(e),r.unshift(e))}},u=e=>{let n=e.id??`toast:${Ua()}`,a=r.find(e=>e.id===n);if(i.has(n)&&i.delete(n),a)r=r.map(t=>t.id===n?s({...t,...e,id:n}):t);else{let r={id:n,duration:t.duration,removeDelay:t.removeDelay,type:Jv,...e,stacked:!t.overlap,gap:t.gap},i=r.priority??Yv(r.type,!!r.action);c({...r,priority:i})}return n},d=e=>(i.add(e),e?(n.forEach(t=>t({id:e,dismiss:!0})),r=r.filter(t=>t.id!==e),l()):(r.forEach(e=>{n.forEach(t=>t({id:e.id,dismiss:!0}))}),r=[],a=[]),e);return{attrs:t,subscribe:o,create:u,update:(e,t)=>u({id:e,...t}),remove:d,dismiss:e=>{r=e==null?r.map(e=>s({...e,message:`DISMISS`})):r.map(t=>t.id===e?s({...t,message:`DISMISS`}):t)},error:e=>u({...e,type:`error`}),success:e=>u({...e,type:`success`}),info:e=>u({...e,type:`info`}),warning:e=>u({...e,type:`warning`}),loading:e=>u({...e,type:`loading`}),getVisibleToasts:()=>r.filter(e=>!i.has(e.id)),getCount:()=>r.length,promise:(e,t,n={})=>{if(!t||!t.loading){ho(`[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified`);return}let r=u({...n,...t.loading,promise:e,type:`loading`}),i=!0,a,o=Ba(e).then(async e=>{if(a=[`resolve`,e],Qv(e)&&!e.ok){i=!1;let a=Ba(t.error,`HTTP Error! status: ${e.status}`);u({...n,...a,id:r,type:`error`})}else if(t.success!==void 0){i=!1;let a=Ba(t.success,e);u({...n,...a,id:r,type:a.type??`success`})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let a=Ba(t.error,e);u({...n,...a,id:r,type:`error`})}}).finally(()=>{i&&d(r),t.finally?.()});return{id:r,unwrap:()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t))}},pause:e=>{r=e==null?r.map(e=>s({...e,message:`PAUSE`})):r.map(t=>t.id===e?s({...t,message:`PAUSE`}):t)},resume:e=>{r=e==null?r.map(e=>s({...e,message:`RESUME`})):r.map(t=>t.id===e?s({...t,message:`RESUME`}):t)},isVisible:e=>!i.has(e)&&!!r.find(t=>t.id===e),isDismissed:e=>i.has(e),expand:()=>{r=r.map(e=>s({...e,stacked:!0}))},collapse:()=>{r=r.map(e=>s({...e,stacked:!1}))}}}var Qv=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,$v={connect:Fv,machine:zv},ey={class:`k-toast__body`},ty=E({__name:`KToastItem`,props:{actor:{type:Object,required:!0},index:{type:Number,required:!0},parent:{type:Object,required:!0}},setup(e){let n=e,r=V(Uv,(0,t.computed)(()=>({...n.actor,parent:n.parent,index:n.index}))),i=(0,t.computed)(()=>Vv(r,B)),a={info:`info`,success:`check-badge`,warning:`alert`,error:`reject`,loading:`spinner`};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-toast`},i.value.getRootProps()),[(0,t.createElementVNode)(`span`,(0,t.normalizeProps)((0,t.guardReactiveProps)(i.value.getGhostBeforeProps())),null,16),(0,t.createVNode)(D,{name:a[i.value.type]||`info`,size:18,class:`k-toast__icon`,spin:i.value.type===`loading`},null,8,[`name`,`spin`]),(0,t.createElementVNode)(`div`,ey,[i.value.title?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:0,class:`k-toast__title`},i.value.getTitleProps()),(0,t.toDisplayString)(i.value.title),17)):(0,t.createCommentVNode)(``,!0),i.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:1,class:`k-toast__text`},i.value.getDescriptionProps()),(0,t.toDisplayString)(i.value.description),17)):(0,t.createCommentVNode)(``,!0)]),i.value.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-toast__close`,"aria-label":`Закрыть`},i.value.getCloseTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:14})],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,(0,t.normalizeProps)((0,t.guardReactiveProps)(i.value.getGhostAfterProps())),null,16)],16))}},[[`__scopeId`,`data-v-259b0872`]]),ny=Zv({placement:`top-end`,duration:4e3,removeDelay:400,gap:12}),ry={info:`info`,success:`success`,warning:`warning`,danger:`error`,error:`error`,loading:`loading`};function iy({title:e=``,text:t=``,tone:n=`info`,timeout:r}={}){let i={title:e,description:t,type:ry[n]??`info`};return r===0?i.duration=1/0:r!=null&&(i.duration=r),ny.create(i)}function ay(e){ny.dismiss(e)}function oy(){return{toast:iy,success:(e,t)=>iy({title:e,text:t,tone:`success`}),info:(e,t)=>iy({title:e,text:t,tone:`info`}),warning:(e,t)=>iy({title:e,text:t,tone:`warning`}),error:(e,t)=>iy({title:e,text:t,tone:`danger`}),loading:(e,t)=>iy({title:e,text:t,tone:`loading`,timeout:0}),dismiss:ay}}var sy=E({__name:`KToast`,setup(e){let n=V($v.machine,{id:(0,t.useId)(),store:ny}),r=(0,t.computed)(()=>$v.connect(n,B));return(e,i)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-toasts`},r.value.getGroupProps({label:`Уведомления`})),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.value.getToasts(),(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(ty,{key:e.id,actor:e,index:r,parent:(0,t.unref)(n)},null,8,[`actor`,`index`,`parent`]))),128))],16)]))}},[[`__scopeId`,`data-v-c623c427`]]),cy=[`light`,`dark`,`system`],ly={default:{label:`Default`,accent:`#2563eb`,accentHover:`#1d4ed8`,accentSoft:`#eff6ff`,neutral:`cool`},scanflow:{label:`ScanFlow`,accent:`#2563eb`,accentHover:`#1d4ed8`,accentSoft:`#eff6ff`,neutral:`cool`,neutralOverrides:{light:{bg:`#f8fafc`,surfaceMuted:`#f1f5f9`,border:`#e2e8f0`,text:`#1e293b`},dark:{bg:`#0f172a`,surface:`#1e293b`,surfaceMuted:`#273549`,border:`#334155`,borderStrong:`#475569`}}},slate:{label:`Slate`,accent:`#475569`,accentHover:`#334155`,accentSoft:`#f1f5f9`,neutral:`cool`},ocean:{label:`Ocean`,accent:`#0891b2`,accentHover:`#0e7490`,accentSoft:`#ecfeff`,neutral:`cool`},forest:{label:`Forest`,accent:`#059669`,accentHover:`#047857`,accentSoft:`#ecfdf5`,neutral:`warm`},violet:{label:`Violet`,accent:`#7c3aed`,accentHover:`#6d28d9`,accentSoft:`#f5f3ff`,neutral:`cool`},amber:{label:`Amber`,accent:`#d97706`,accentHover:`#b45309`,accentSoft:`#fffbeb`,neutral:`warm`},rose:{label:`Rose`,accent:`#e11d48`,accentHover:`#be123c`,accentSoft:`#fff1f2`,neutral:`warm`},mono:{label:`Mono`,accent:`#18181b`,accentHover:`#000000`,accentSoft:`#f4f4f5`,neutral:`plain`},bordeaux:{label:`Bordeaux`,accent:`#8a3a48`,accentHover:`#73303c`,accentSoft:`#f3e6e8`,neutral:`warm`,font:`'Golos Text', -apple-system, 'Segoe UI', Roboto, sans-serif`,accentOverrides:{dark:{accent:`#e3929e`,accentHover:`#eaa9b3`,accentSoft:`#33242a`}},semanticOverrides:{light:{success:{base:`#2c7656`,hover:`#235f45`,soft:`#e3f1ea`,strong:`#2c7656`},info:{base:`#3b6286`,hover:`#2f4f6c`,soft:`#e5edf5`,strong:`#3b6286`},danger:{base:`#b03a37`,hover:`#922f2d`,soft:`#fbe8e6`,strong:`#b03a37`}},dark:{success:{base:`#72c9a2`,hover:`#8fd6b6`,soft:`#1b3228`,strong:`#72c9a2`},info:{base:`#94b8db`,hover:`#adc9e4`,soft:`#1c2936`,strong:`#94b8db`},danger:{base:`#f08d83`,hover:`#f4a69e`,soft:`#3a2220`,strong:`#f08d83`}}},neutralOverrides:{light:{bg:`#f6f4f4`,surface:`#ffffff`,surfaceMuted:`#faf8f8`,border:`#e3dcdd`,borderStrong:`#cdc3c4`,text:`#1e2327`,textMuted:`#5f666c`,textFaint:`#959ca1`},dark:{bg:`#15181b`,surface:`#1d2125`,surfaceMuted:`#24292e`,border:`#30353a`,borderStrong:`#454b52`,text:`#ebe7e7`,textMuted:`#a3a9ae`,textFaint:`#737a80`}}},blocky:{label:`Blocky`,accent:`#4f8a25`,accentHover:`#3f711c`,accentSoft:`#e8f3dc`,neutral:`warm`,radius:`square`,elevation:`hard`,font:`rounded`,neutralOverrides:{light:{bg:`#e7e1d3`,surface:`#fbf8f1`,surfaceMuted:`#f1ebdf`,border:`#cdc3ae`,borderStrong:`#8a7a5c`,text:`#2b2418`,textMuted:`#675a43`,textFaint:`#9a8c72`},dark:{bg:`#1b1814`,surface:`#27231d`,surfaceMuted:`#302b24`,border:`#443d32`,borderStrong:`#6b5f4c`,text:`#efe8da`,textMuted:`#b2a58c`,textFaint:`#7c715f`}}}},uy={cool:{light:{bg:`#f6f8fb`,surface:`#ffffff`,surfaceMuted:`#f8fafc`,border:`#e4e9f0`,borderStrong:`#cbd5e1`,text:`#172033`,textMuted:`#64748b`,textFaint:`#94a3b8`},dark:{bg:`#0b1220`,surface:`#111a2b`,surfaceMuted:`#18233a`,border:`#24314a`,borderStrong:`#354764`,text:`#e5eaf3`,textMuted:`#9aa7bb`,textFaint:`#66748c`}},warm:{light:{bg:`#faf9f7`,surface:`#ffffff`,surfaceMuted:`#f7f5f2`,border:`#ebe7e1`,borderStrong:`#d6cfc5`,text:`#26211c`,textMuted:`#6f665c`,textFaint:`#a39a8f`},dark:{bg:`#15120f`,surface:`#1c1814`,surfaceMuted:`#24201b`,border:`#302a24`,borderStrong:`#443c34`,text:`#efe9e2`,textMuted:`#a89e92`,textFaint:`#776d62`}},plain:{light:{bg:`#fafafa`,surface:`#ffffff`,surfaceMuted:`#f4f4f5`,border:`#e7e7e9`,borderStrong:`#d0d0d4`,text:`#18181b`,textMuted:`#6b7280`,textFaint:`#a1a1aa`},dark:{bg:`#0f0f11`,surface:`#17171a`,surfaceMuted:`#1f1f23`,border:`#2a2a30`,borderStrong:`#3c3c44`,text:`#ededf0`,textMuted:`#a1a1aa`,textFaint:`#6b6b75`}}},dy={light:{success:{base:`#059669`,hover:`#047857`,soft:`#ecfdf5`,strong:`#065f46`},warning:{base:`#f59e0b`,hover:`#d97706`,soft:`#fffbeb`,strong:`#b45309`},danger:{base:`#dc2626`,hover:`#b91c1c`,soft:`#fef2f2`,strong:`#991b1b`},info:{base:`#4f46e5`,hover:`#4338ca`,soft:`#eef2ff`,strong:`#3730a3`}},dark:{success:{base:`#34d399`,hover:`#6ee7b7`,strong:`#6ee7b7`},warning:{base:`#fbbf24`,hover:`#fcd34d`,strong:`#fcd34d`},danger:{base:`#f87171`,hover:`#fca5a5`,strong:`#fca5a5`},info:{base:`#818cf8`,hover:`#a5b4fc`,strong:`#a5b4fc`}}},fy={sharp:{sm:`2px`,md:`3px`,lg:`5px`},subtle:{sm:`4px`,md:`5px`,lg:`8px`},default:{sm:`6px`,md:`8px`,lg:`14px`},soft:{sm:`9px`,md:`12px`,lg:`20px`},pill:{sm:`12px`,md:`16px`,lg:`28px`},square:{sm:`0px`,md:`0px`,lg:`0px`}},py={compact:{controlH:`2.125rem`,controlHSm:`1.75rem`,gap:`0.375rem`},default:{controlH:`2.5rem`,controlHSm:`2rem`,gap:`0.5rem`},comfortable:{controlH:`2.875rem`,controlHSm:`2.25rem`,gap:`0.625rem`}},my={flat:{light:{sm:`none`,md:`0 1px 2px rgba(15, 23, 42, 0.06)`,lg:`0 6px 20px rgba(15, 23, 42, 0.10)`},dark:{sm:`none`,md:`0 1px 2px rgba(0, 0, 0, 0.3)`,lg:`0 6px 20px rgba(0, 0, 0, 0.45)`}},default:{light:{sm:`0 1px 2px rgba(15, 23, 42, 0.05)`,md:`0 4px 16px rgba(15, 23, 42, 0.08)`,lg:`0 18px 44px rgba(15, 23, 42, 0.14)`},dark:{sm:`0 1px 2px rgba(0, 0, 0, 0.35)`,md:`0 4px 16px rgba(0, 0, 0, 0.45)`,lg:`0 18px 44px rgba(0, 0, 0, 0.6)`}},lifted:{light:{sm:`0 1px 3px rgba(15, 23, 42, 0.08)`,md:`0 8px 24px rgba(15, 23, 42, 0.12)`,lg:`0 24px 60px rgba(15, 23, 42, 0.20)`},dark:{sm:`0 1px 3px rgba(0, 0, 0, 0.45)`,md:`0 8px 24px rgba(0, 0, 0, 0.55)`,lg:`0 24px 60px rgba(0, 0, 0, 0.7)`}},hard:{light:{sm:`0 3px 0 rgba(43, 36, 24, 0.28)`,md:`0 4px 0 rgba(43, 36, 24, 0.16)`,lg:`0 8px 0 rgba(43, 36, 24, 0.22)`},dark:{sm:`0 3px 0 rgba(0, 0, 0, 0.55)`,md:`0 4px 0 rgba(0, 0, 0, 0.45)`,lg:`0 8px 0 rgba(0, 0, 0, 0.6)`}}},hy={system:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif`,grotesk:`'Inter', 'Segoe UI', system-ui, sans-serif`,serif:`'Georgia', 'Times New Roman', serif`,mono:`ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace`,rounded:`ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', 'Segoe UI', system-ui, sans-serif`};function gy(e=`light`){return e===`system`?typeof window>`u`||!window.matchMedia?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e===`dark`?`dark`:`light`}function _y(e={}){let t=typeof e==`string`?{preset:e}:e,n=gy(t.scheme),r=n===`dark`,i=ly[t.preset]??ly.default,a={...(uy[t.neutral??i.neutral]??uy.cool)[n],...t.neutral?{}:i.neutralOverrides?.[n],...t.bg?{bg:t.bg}:{},...t.surface?{surface:t.surface}:{},...t.text?{text:t.text}:{},...t.textMuted?{textMuted:t.textMuted}:{},...t.textFaint?{textFaint:t.textFaint}:{}},o=fy[t.radius??i.radius]??fy.default,s=py[t.density??i.density]??py.default,c=(my[t.elevation??i.elevation]??my.default)[n],l=t.font??i.font,u=hy[l]??l??hy.system,d=t.accent?null:i.accentOverrides?.[n],f=t.accent??i.accent,p=d?.accent??(r?wy(f,.12):f),m={"--k-primary":p,"--k-primary-hover":t.accentHover??d?.accentHover??(r?wy(p,.14):t.accent?Cy(p,-.12):i.accentHover),"--k-primary-soft":t.accentSoft??d?.accentSoft??(r?Ty(p,a.surface,.22):t.accent?wy(p,.92):i.accentSoft),"--k-on-primary":Ey(p),"--k-bg":a.bg,"--k-surface":a.surface,"--k-surface-muted":a.surfaceMuted,"--k-border":a.border,"--k-border-strong":a.borderStrong,"--k-text":a.text,"--k-text-muted":a.textMuted,"--k-text-faint":a.textFaint,"--k-overlay":r?`rgba(0, 0, 0, 0.6)`:`rgba(15, 23, 42, 0.35)`,"--k-tooltip-bg":r?a.text:`#172033`,"--k-tooltip-text":r?a.bg:`#ffffff`,"--k-selection":Ty(p,a.surface,r?.4:.2),"--k-radius-sm":o.sm,"--k-radius":o.md,"--k-radius-lg":o.lg,"--k-control-h":s.controlH,"--k-control-h-sm":s.controlHSm,"--k-gap":s.gap,"--k-shadow-sm":c.sm,"--k-shadow-md":c.md,"--k-shadow-lg":c.lg,"--k-font":u},h={...dy[n],...i.semanticOverrides?.[n]};for(let[e,t]of Object.entries(h))m[`--k-${e}`]=t.base,m[`--k-${e}-hover`]=t.hover,m[`--k-${e}-soft`]=t.soft??Ty(t.base,a.surface,.18),m[`--k-${e}-strong`]=t.strong,m[`--k-on-${e}`]=Ey(t.base);return m}function vy(e={},t=null){let n=t??(typeof document<`u`?document.documentElement:null);if(!n)return()=>{};let r=typeof e==`string`?{preset:e}:e,i={},a=n.getAttribute(`data-k-scheme`),o=n.style.colorScheme,s=()=>{let e=_y(r);for(let[t,r]of Object.entries(e))t in i||(i[t]=n.style.getPropertyValue(t)),n.style.setProperty(t,r);let t=gy(r.scheme);n.setAttribute(`data-k-scheme`,t),n.style.colorScheme=t};s();let c=null;return r.scheme===`system`&&typeof window<`u`&&window.matchMedia&&(c=window.matchMedia(`(prefers-color-scheme: dark)`),c.addEventListener(`change`,s)),()=>{c?.removeEventListener(`change`,s);for(let[e,t]of Object.entries(i))t?n.style.setProperty(e,t):n.style.removeProperty(e);a?n.setAttribute(`data-k-scheme`,a):n.removeAttribute(`data-k-scheme`),n.style.colorScheme=o}}function yy(e={},t=`:root`){let n=typeof e==`string`?{preset:e}:e,r=Object.entries(_y(n)).map(([e,t])=>` ${e}: ${t};`);return r.push(` color-scheme: ${gy(n.scheme)};`),`${t} {\n${r.join(`
|
|
3
|
-
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.TenderUiKit={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},r=e=>e===``,i=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),a=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),s=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)},c={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},l=({name:e,iconNode:o,absoluteStrokeWidth:l,"absolute-stroke-width":u,strokeWidth:d,"stroke-width":f,size:p=c.width,color:m=c.stroke,...h},{slots:g})=>(0,t.h)(`svg`,{...c,...h,width:p,height:p,stroke:m,"stroke-width":r(l)||r(u)||l===!0||u===!0?Number(d||f||c[`stroke-width`])*24/Number(p):d||f||c[`stroke-width`],class:i(`lucide`,h.class,...e?[`lucide-${a(s(e))}-icon`,`lucide-${a(e)}`]:[`lucide-icon`]),...!g.default&&!n(h)&&{"aria-hidden":`true`}},[...o.map(e=>(0,t.h)(...e)),...g.default?[g.default()]:[]]),u=(e,n)=>(r,{slots:i,attrs:a})=>(0,t.h)(l,{...a,...r,iconNode:n,name:e},i),d=u(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),f=u(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),p=u(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),m=u(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),h=u(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),g=u(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),_=u(`badge-check`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),v=u(`banknote`,[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`2`,key:`9lu3g6`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M6 12h.01M18 12h.01`,key:`113zkx`}]]),y=u(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),b=u(`bookmark`,[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]),x=u(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),S=u(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),C=u(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),w=u(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),T=u(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ee=u(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),te=u(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),ne=u(`circle-minus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),re=u(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ie=u(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),ae=u(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),oe=u(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),se=u(`credit-card`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]]),ce=u(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),le=u(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ue=u(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),de=u(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),fe=u(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),pe=u(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),me=u(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),he=u(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),ge=u(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),_e=u(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),ve=u(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),ye=u(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),be=u(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),xe=u(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Se=u(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ce=u(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),we=u(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Te=u(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ee=u(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),De=u(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Oe=u(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ke=u(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Ae=u(`life-buoy`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),je=u(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Me=u(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),Ne=u(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Pe=u(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),Fe=u(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Ie=u(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),Le=u(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Re=u(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),ze=u(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Be=u(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),Ve=u(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),He=u(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ue=u(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),We=u(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Ge=u(`percent`,[[`line`,{x1:`19`,x2:`5`,y1:`5`,y2:`19`,key:`1x9vlm`}],[`circle`,{cx:`6.5`,cy:`6.5`,r:`2.5`,key:`4mh3h7`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`2.5`,key:`1mdrzq`}]]),Ke=u(`phone`,[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]),qe=u(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Je=u(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ye=u(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Xe=u(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Ze=u(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Qe=u(`scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),$e=u(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),et=u(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),tt=u(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),nt=u(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),rt=u(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),it=u(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),at=u(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),ot=u(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),st=u(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),ct=u(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),lt=u(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ut=u(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),dt=u(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),ft=u(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),pt=u(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),mt=u(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),ht=u(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),gt=u(`wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]),_t={back:m,forward:h,up:g,down:p,"chevron-up":te,"chevron-down":w,"chevron-left":T,"chevron-right":ee,menu:Be,more:ue,"more-horizontal":de,home:we,dashboard:Oe,external:fe,link:je,add:Je,edit:We,delete:lt,save:Ze,copy:oe,search:$e,filter:xe,sliders:at,refresh:Ye,rotate:Xe,scissors:Qe,restore:f,"file-up":ge,move:ve,upload:pt,download:le,share:nt,send:et,play:qe,close:u(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),check:C,reject:re,remove:ne,info:Ee,alert:ft,"check-badge":_,spinner:Ne,activity:d,trending:dt,declining:ut,zap:u(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),document:he,file:_e,folder:be,"folder-open":ye,attach:Ue,image:Te,clipboard:ie,checklist:Me,list:Pe,grid:ke,database:ce,tag:ct,bookmark:b,star:ot,heart:Ce,user:mt,users:ht,organization:x,mail:Re,phone:Ke,message:Ve,bell:y,lock:Fe,key:De,shield:it,"shield-check":rt,login:Ie,logout:Le,eye:me,"eye-off":pe,finance:v,wallet:gt,card:se,percent:Ge,calendar:S,clock:ae,location:ze,globe:Se,settings:tt,help:Ae,sun:st,moon:He};function vt(e){Object.assign(_t,e),yt.splice(0,yt.length,...Object.keys(_t))}var yt=Object.keys(_t),E=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},D=E({__name:`KIcon`,props:{name:{type:String,default:``},component:{type:[Object,Function],default:null},size:{type:[Number,String],default:18},strokeWidth:{type:[Number,String],default:2},spin:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.computed)(()=>{if(n.component)return n.component;let e=_t[n.name];return!e&&n.name,e||null});return(n,i)=>r.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.value),{key:0,class:(0,t.normalizeClass)([`k-icon`,{"k-icon--spin":e.spin}]),size:Number(e.size),"stroke-width":Number(e.strokeWidth),"aria-hidden":`true`},null,8,[`class`,`size`,`stroke-width`])):(0,t.createCommentVNode)(``,!0)}},[[`__scopeId`,`data-v-a6df347d`]]),bt={class:`k-alert__body`},xt={key:0,class:`k-alert__title`},St={key:1,class:`k-alert__text`},Ct=E({__name:`KAlert`,props:{tone:{type:String,default:`info`},title:{type:String,default:``},icon:{type:String,default:``},closable:{type:Boolean,default:!1}},emits:[`close`],setup(e){let n=e,r={info:`info`,success:`check-badge`,warning:`alert`,danger:`reject`},i=(0,t.computed)(()=>n.icon||r[n.tone]||`info`);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-alert`,`k-alert--${e.tone}`]),role:`status`},[(0,t.createVNode)(D,{name:i.value,size:18,class:`k-alert__icon`},null,8,[`name`]),(0,t.createElementVNode)(`div`,bt,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,xt,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,St,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),e.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:0,class:`k-alert__close`,"aria-label":`Закрыть`,onClick:r[0]||=e=>n.$emit(`close`)},[(0,t.createVNode)(D,{name:`close`,size:15})])):(0,t.createCommentVNode)(``,!0)],2))}},[[`__scopeId`,`data-v-54c7f48e`]]),wt=[`title`],Tt=E({__name:`KAvatar`,props:{name:{type:String,default:``},icon:{type:String,default:``},size:{type:String,default:`md`},square:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.computed)(()=>n.name.replace(/["«»]/g,``).split(/[\s-]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)),i=[`primary`,`success`,`warning`,`info`,`danger`],a=(0,t.computed)(()=>{let e=0;for(let t of n.name)e=e*31+t.charCodeAt(0)>>>0;return i[e%i.length]});return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-avatar`,[`k-avatar--${e.size}`,`k-avatar--${a.value}`,{"k-avatar--square":e.square}]]),title:e.name},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:e.size===`sm`?14:e.size===`lg`?22:17},null,8,[`name`,`size`])):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r.value),1)],64))],10,wt))}},[[`__scopeId`,`data-v-8e5b1629`]]),Et={key:0,class:`k-badge__dot`},Dt=E({__name:`KBadge`,props:{tone:{type:String,default:`neutral`},size:{type:String,default:`md`},dot:{type:Boolean,default:!1},icon:{type:String,default:``}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-badge`,[`k-badge--${e.tone}`,`k-badge--${e.size}`]])},[e.dot?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Et)):(0,t.createCommentVNode)(``,!0),e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:1,name:e.icon,size:e.size===`sm`?11:13},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)],2))}},[[`__scopeId`,`data-v-df0ae949`]]),Ot=[`type`,`disabled`],kt={key:2,class:`k-btn__label`},At=E({__name:`KButton`,props:{variant:{type:String,default:`secondary`},size:{type:String,default:`md`},icon:{type:String,default:``},iconEnd:{type:String,default:``},htmlType:{type:String,default:`button`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.useSlots)(),i=(0,t.computed)(()=>!!r.default),a=(0,t.computed)(()=>({sm:15,md:17,lg:19})[n.size]??17);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{class:(0,t.normalizeClass)([`k-btn`,[`k-btn--${e.variant}`,`k-btn--${e.size}`,{"k-btn--icon-only":(e.icon||e.loading)&&!i.value,"k-btn--block":e.block}]]),type:e.htmlType,disabled:e.disabled||e.loading},[e.loading?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`spinner`,size:a.value,spin:``},null,8,[`size`])):e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:1,name:e.icon,size:a.value},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),i.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,kt,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),e.iconEnd&&!e.loading?((0,t.openBlock)(),(0,t.createBlock)(D,{key:3,name:e.iconEnd,size:a.value},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0)],10,Ot))}},[[`__scopeId`,`data-v-92d86bbb`]]),jt={key:0,class:`k-card__header`},Mt={class:`k-card__heading`},Nt={key:0,class:`k-card__title`},Pt={key:1,class:`k-card__subtitle`},Ft={key:0,class:`k-card__actions`},It={class:`k-card__body`},Lt={key:1,class:`k-card__footer`},Rt=E({__name:`KCard`,props:{title:{type:String,default:``},subtitle:{type:String,default:``},padding:{type:String,default:`md`},hoverable:{type:Boolean,default:!1}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{class:(0,t.normalizeClass)([`k-card`,[`k-card--p-${e.padding}`,{"k-card--hoverable":e.hoverable}]])},[e.title||e.subtitle||n.$slots.header||n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,jt,[(0,t.createElementVNode)(`div`,Mt,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h2`,Nt,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Pt,(0,t.toDisplayString)(e.subtitle),1)):(0,t.createCommentVNode)(``,!0)],!0)]),n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ft,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,It,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Lt,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)],2))}},[[`__scopeId`,`data-v-04bba3c2`]]),O=(e,t=[])=>({parts:(...n)=>{if(Bt(t))return O(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>O(e,[...t,...n]),omit:(...n)=>O(e,t.filter(e=>!n.includes(e))),rename:e=>O(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${zt(e)}"][data-part="${zt(n)}"]`,`& [data-scope="${zt(e)}"][data-part="${zt(n)}"]`].join(`, `),attrs:{"data-scope":zt(e),"data-part":zt(n)}}}),{})}),zt=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),Bt=e=>e.length===0,Vt=O(`checkbox`).parts(`root`,`label`,`control`,`indicator`).build(),Ht=Object.defineProperty,Ut=(e,t,n)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wt=(e,t,n)=>Ut(e,typeof t==`symbol`?t:t+``,n);function Gt(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var Kt=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),qt=(...e)=>t=>e.reduce((e,t)=>t(e),t),Jt=()=>void 0,Yt=e=>typeof e==`object`&&!!e,Xt=2147483647,k=e=>e?``:void 0,Zt=e=>e?`true`:void 0,Qt=/\\/g,$t=/"/g,en=e=>globalThis.CSS?.escape?.(e)??e.replace(Qt,`\\\\`).replace($t,`\\"`),tn=e=>`[data-ownedby~="${en(String(e))}"]`,nn=1,rn=9,an=11,A=e=>Yt(e)&&e.nodeType===nn&&typeof e.nodeName==`string`,on=e=>Yt(e)&&e.nodeType===rn,sn=e=>Yt(e)&&e===e.window,cn=e=>A(e)?e.localName||``:`#document`;function ln(e){return[`html`,`body`,`#document`].includes(cn(e))}var un=e=>Yt(e)&&e.nodeType!==void 0,dn=e=>un(e)&&e.nodeType===an&&`host`in e,fn=e=>A(e)&&e.localName===`input`,pn=e=>!!e?.matches(`a[href]`),mn=e=>A(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function hn(e){return e?yn(e.getRootNode())===e:!1}var gn=/(textarea|select)/;function _n(e){if(e==null||!A(e))return!1;try{return fn(e)&&e.selectionStart!=null||gn.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function j(e,t){if(!e||!t||!A(e)||!un(t))return!1;if(A(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&dn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function M(e){return on(e)?e:sn(e)?e.document:e?.ownerDocument??document}function vn(e){return M(e).documentElement}function N(e){return dn(e)?N(e.host):on(e)?e.defaultView??window:A(e)?e.ownerDocument?.defaultView??window:window}function yn(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function bn(e){if(cn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||dn(e)&&e.host||vn(e);return dn(t)?t.host:t}function xn(e){let t;try{if(t=e.getRootNode({composed:!0}),on(t)||dn(t))return t}catch{}return e.ownerDocument??document}var Sn=new WeakMap;function Cn(e){return Sn.has(e)||Sn.set(e,N(e).getComputedStyle(e)),Sn.get(e)}var wn=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),Tn=e=>wn.has(e),En=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Dn(e,t){let n=new Set,r=xn(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=En(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&Tn(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function On(e,t){let n=xn(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=En(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&wn.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function kn(e){let t=new Set;return On(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function An(e){let t=e.getAttribute(`role`);return!!(t&&wn.has(t))}function jn(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function Mn(e){return jn(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function Nn(e){if(!e.id)return!1;let t=xn(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&An(e))}var Pn=()=>typeof document<`u`;function Fn(){return navigator.userAgentData?.platform??navigator.platform}function In(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var Ln=e=>Pn()&&e.test(Fn()),Rn=e=>Pn()&&e.test(In()),zn=e=>Pn()&&e.test(navigator.vendor),Bn=/^iPhone/i,Vn=/^iPad/i,Hn=/^Mac/i,Un=/apple/i,Wn=/Firefox/i,Gn=/Android/i,Kn=()=>Pn()&&!!navigator.maxTouchPoints,qn=()=>Ln(Bn),Jn=()=>Ln(Vn)||Zn()&&navigator.maxTouchPoints>1,Yn=()=>qn()||Jn(),Xn=()=>Zn()||Yn(),Zn=()=>Ln(Hn),Qn=()=>Xn()&&zn(Un),$n=()=>Rn(Wn),er=()=>Rn(Gn);function tr(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function P(e){return tr(e)?.[0]??e.target}function nr(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=ar(e);return n||r}function rr(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function ir(e){return pr(e).isComposing||e.keyCode===229}function ar(e){return Zn()?e.metaKey:e.ctrlKey}function or(e){return e.pointerType===``&&e.isTrusted?!0:er()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var sr=e=>e.button===0,cr=e=>e.button===2||Zn()&&e.ctrlKey&&e.button===0,lr=e=>`touches`in e&&e.touches.length>0,ur={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},dr={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function fr(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=ur[i]??i,n===`rtl`&&r===`horizontal`&&i in dr&&(i=dr[i]),i}function pr(e){return e.nativeEvent??e}function mr(e,t=`client`){let n=lr(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var F=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function hr(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=N(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function gr(e,t){e&&(hr(e,{type:`HTMLInputElement`,property:`checked`}).set?.call(e,t),t?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}function _r(e,t){let{checked:n,bubbles:r=!0}=t;if(!e)return;let i=N(e);if(!(e instanceof i.HTMLInputElement))return;gr(e,n);let a=new i.Event(`click`,{bubbles:r});e.dispatchEvent(wr(a))}function vr(e){return e.matches(`textarea, input, select, button`)}function yr(e,t){if(!e)return;let n=vr(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function br(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(N(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function xr(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[yr(e,r),br(e,n)];return()=>i.forEach(e=>e?.())}var Sr=Symbol.for(`zag.changeEvent`);function Cr(e){return Object.prototype.hasOwnProperty.call(e,Sr)}function wr(e){return Cr(e)||Object.defineProperty(e,Sr,{value:!0}),e}var Tr=e=>A(e)&&e.tagName===`IFRAME`,Er=/^(audio|video|details)$/;function Dr(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var Or=e=>!Number.isNaN(Dr(e)),kr=e=>Dr(e)<0;function Ar(e){return fn(e)&&e.type===`radio`}function jr(e){if(!Ar(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&Ir(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function Mr(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Nr(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=Mr(e,t);if(c){let t=Array.from(c.querySelectorAll(Pr)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var Pr=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,Fr=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Pr));(n==1||n==`if-empty`&&i.length===0)&&A(e)&&Ir(e)&&i.unshift(e);let a=[];for(let e of i)if(Ir(e)){if(Tr(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Fr(t,{getShadowRoot:r}));continue}a.push(e)}return r?Nr(a,r,Ir):a};function Ir(e){return!A(e)||e.closest(`[inert]`)?!1:e.matches(Pr)&&mn(e)}function Lr(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Pr));n&&Rr(e)&&i.unshift(e);let a=[];for(let e of i)if(Rr(e)){if(Tr(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Lr(t,{getShadowRoot:r}));continue}a.push(e)}if(r){let e=Nr(a,r,Rr);return!e.length&&n?i:e}return!a.length&&n?i:a}function Rr(e){return A(e)&&e.tabIndex>0?!0:!Ir(e)||kr(e)?!1:jr(e)}function zr(e,t={}){let n=Lr(e,t);return[n[0]||null,n[n.length-1]||null]}function Br(e){return e.tabIndex<0&&(Er.test(e.localName)||_n(e))&&!Or(e)?0:e.tabIndex}function Vr(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=typeof n==`function`?n():n;return a||=t?.querySelector(`[data-autofocus],[autofocus]`),a||=Lr(t).filter(e=>!r||r(e)).find(e=>!e.hasAttribute(`data-no-autofocus`)),a||t||void 0}function Hr(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=zr(t);return!(hn(n)&&e.shiftKey||hn(r)&&!e.shiftKey||!n&&!r)}var Ur=class e{constructor(){Wt(this,`id`,null),Wt(this,`fn_cleanup`),Wt(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function I(e){let t=Ur.create();return t.request(e),t.cleanup}function Wr(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function Gr(e,t,n){let r=I(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}function Kr(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function qr(e,t){let{defer:n}=t,r=n?I:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Kr(n,t))})),()=>{i.forEach(e=>e?.())}}function Jr(e){let t=()=>{let t=N(e);e.dispatchEvent(new t.MouseEvent(`click`))};$n()?Gr(e,`keyup`,t):queueMicrotask(t)}function Yr(e){let t=bn(e);return ln(t)?M(t).body:A(t)&&$r(t)?t:Yr(t)}function Xr(e,t=[]){let n=Yr(e),r=n===e.ownerDocument.body,i=N(n);return r?t.concat(i,i.visualViewport||[],$r(n)?n:[]):t.concat(n,Xr(n,[]))}var Zr=/auto|scroll|overlay|hidden|clip/,Qr=new Set([`inline`,`contents`]);function $r(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=N(e).getComputedStyle(e);return Zr.test(t+r+n)&&!Qr.has(i)}function ei(e){let{pointerNode:t,keyboardNode:n=t,onPress:r,onPressStart:i,onPressEnd:a,isValidKey:o=e=>e.key===`Enter`}=e;if(!t)return Jt;let s=N(t),c=Jt,l=Jt,u=Jt,d=e=>({point:mr(e),event:e});function f(e){i?.(d(e))}function p(e){a?.(d(e))}c=qt(F(t,`pointerdown`,e=>{l(),l=qt(F(s,`pointerup`,e=>{let n=P(e);j(t,n)?r?.(d(e)):a?.(d(e))},{passive:!r,once:!0}),F(s,`pointercancel`,p,{passive:!a,once:!0})),hn(n)&&e.pointerType===`mouse`&&e.preventDefault(),f(e)},{passive:!i}),F(n,`focus`,m));function m(){u=qt(F(n,`keydown`,e=>{o(e)&&(l(),l=F(n,`keyup`,e=>{if(!o(e))return;let t=new s.PointerEvent(`pointerup`),n=d(t);r?.(n),a?.(n)}),f(new s.PointerEvent(`pointerdown`)))}),F(n,`blur`,()=>{p(new s.PointerEvent(`pointercancel`))}))}return()=>{c(),l(),u()}}function ti(e){return e==null?null:typeof e==`function`?e():e}function ni(e,t,n){if(!t)return null;let r=Lr(e.ownerDocument.body,{getShadowRoot:n}),i=r.indexOf(t);if(i===-1)return null;for(let t=i+1;t<r.length;t++){let n=r[t];if(!j(e,n))return n}return null}function ri(e,t={}){let{triggerElement:n,onFocus:r,onFocusEnter:i,getShadowRoot:a}=t,o=(ti(e)??ti(n))?.ownerDocument||document;function s(t){if(t.key!==`Tab`)return;let o=ti(e),s=ti(n);if(!o)return;let[c,l]=zr(o,{includeContainer:!0,getShadowRoot:a}),u=!c&&!l,d=null;t.shiftKey&&(hn(c)||u)?d=s:!t.shiftKey&&hn(s)?(i?.(),d=c):!t.shiftKey&&(hn(l)||u)?d=ni(o,s,a):t.shiftKey&&hn(ni(o,s,a))&&(i?.(),d=l),d&&(t.preventDefault(),typeof r==`function`?r(d):d.focus())}return F(o,`keydown`,s,!0)}function ii(e,t){let{defer:n,...r}=t,i=n?I:e=>e(),a=[];return a.push(i(()=>{a.push(ri(e,r))})),()=>{a.forEach(e=>e?.())}}function ai(e,t){return Array.from(e?.querySelectorAll(t)??[])}function oi(e,t){return e?.querySelector(t)??null}var si=e=>e.id;function ci(e,t,n=si){return e.find(e=>n(e)===t)}function li(e,t,n=si){let r=ci(e,t,n);return r?e.indexOf(r):-1}function ui(e,t,n=!0){let r=li(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function di(e,t,n=!0){let r=li(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}function fi(e){let t=new WeakMap,n,r=new WeakMap,i=e=>n||(n=new e.ResizeObserver(e=>{for(let n of e){r.set(n.target,n);let e=t.get(n.target);if(e)for(let t of e)t(n)}}),n);return{observe:(n,r)=>{let a=t.get(n)||new Set;a.add(r),t.set(n,a);let o=N(n);return i(o).observe(n,e),()=>{let e=t.get(n);e&&(e.delete(r),e.size===0&&(t.delete(n),i(o).unobserve(n)))}},unobserve:e=>{t.delete(e),n?.unobserve(e)}}}var pi=fi({box:`border-box`});function mi(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function hi(e,t){let{rootEl:n,...r}=t||{};e&&n&&$r(n)&&mi(n)&&e.scrollIntoView(r)}var gi=e=>e.split(``).map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace(`/`,`\\`):``}).join(``).trim(),_i=e=>gi(e.dataset?.valuetext??e.textContent??``),vi=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function yi(e,t,n,r=si){let i=n?li(e,n,r):-1,a=n?Kt(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>vi(_i(e),t))}function bi(e,t){if(!e)return Jt;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return Si(n,t)?Jt:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function xi(e,t,n){if(!e)return Jt;let r=e.style.getPropertyValue(t);return r===n?Jt:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function Si(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Ci(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=yi(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var wi=Object.assign(Ci,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:Ti});function Ti(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Ei={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function Di(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function Oi(e,t){let{timeout:n,rootNode:r}=t,i=N(r),a=M(r),o=new i.AbortController;return Di(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function ki(e,t,n={}){let{defer:r,onMissing:i}=n,a=()=>typeof e==`function`?e():e,o=[],s=e=>{if(!e)return i?.();o.push(t(e))},c=a();if(!r||c)s(c);else{let e=!1;o.push(()=>{e=!0}),queueMicrotask(()=>{if(e)return;let t=a();if(t){s(t);return}o.push(I(()=>{e||s(a())}))})}return()=>{o.forEach(e=>e?.())}}function Ai(e){return!(e.metaKey||!Zn()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var ji=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),Mi=[`a[href]`,`audio[controls]`,`button`,`details`,`embed`,`iframe`,`img[controls]`,`img[usemap]`,`input`,`select`,`textarea`,`video[controls]`].join(`,`);function Ni(e,t,n){let r=n?P(n):null,i=M(r),a=N(r),o=yn(i);return e=e||o instanceof a.HTMLInputElement&&!ji.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(Vi,n.key))}var Pi=null,Fi=new Set,Ii=new Map,Li=!1,Ri=null,zi=!1,Bi=null,Vi={Tab:!0,Escape:!0};function Hi(e,t){for(let n of Fi)n(e,t)}function Ui(e){Ri=null,Li=!0,Ai(e)&&(Pi=`keyboard`,Hi(`keyboard`,e))}function L(e){(e.type!==`pointermove`&&e.type!==`mousemove`||Bi?.x!==e.clientX||Bi?.y!==e.clientY)&&(Bi={x:e.clientX,y:e.clientY},Pi=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(Ri=null,Li=!0,Hi(`pointer`,e)))}function Wi(e){if(or(e)){Ri=null,Li=!0,Pi=`virtual`;return}Ri=null;let t=P(e),n=t?.closest(`label`),r=n?.control;if(!n||!r||r.matches(`:disabled`))return;let i=t?.closest(Mi);i&&n.contains(i)&&i!==r||r!==yn(n.ownerDocument)&&(Ri=r)}function Gi(e){let t=P(e),n=t===Ri;t!==N(t)&&t!==M(t)&&e.isTrusted&&(!Li&&!n&&!zi&&(Pi=`virtual`,Hi(`virtual`,e)),Li=!1,Ri=null,zi=!1)}function Ki(){Li=!1,Ri=null,zi=!0}function qi(e){if(typeof window>`u`||Ii.get(N(e)))return;let t=N(e),n=M(e),r=t.HTMLElement.prototype.focus;function i(){Li=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,Ui,!0),n.addEventListener(`keyup`,Ui,!0),n.addEventListener(`click`,Wi,!0),t.addEventListener(`focus`,Gi,!0),t.addEventListener(`blur`,Ki,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,L,!0),n.addEventListener(`mousemove`,L,!0),n.addEventListener(`mouseup`,L,!0)):(n.addEventListener(`pointerdown`,L,!0),n.addEventListener(`pointermove`,L,!0),n.addEventListener(`pointerup`,L,!0)),t.addEventListener(`beforeunload`,()=>{Ji(e)},{once:!0}),Ii.set(t,{focus:r})}var Ji=(e,t)=>{let n=N(e),r=M(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=Ii.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,Ui,!0),r.removeEventListener(`keyup`,Ui,!0),r.removeEventListener(`click`,Wi,!0),n.removeEventListener(`focus`,Gi,!0),n.removeEventListener(`blur`,Ki,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,L,!0),r.removeEventListener(`mousemove`,L,!0),r.removeEventListener(`mouseup`,L,!0)):(r.removeEventListener(`pointerdown`,L,!0),r.removeEventListener(`pointermove`,L,!0),r.removeEventListener(`pointerup`,L,!0)),Ii.delete(n)}};function Yi(){return Pi}function Xi(e){Pi=e,Hi(e,null)}function Zi(){return Pi===`keyboard`||Pi===`virtual`}function Qi(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;qi(i),r?.({isFocusVisible:n||Zi(),modality:Pi});let a=(e,n)=>{Ni(!!t,e,n)&&r?.({isFocusVisible:Zi(),modality:e})};return Fi.add(a),()=>{Fi.delete(a)}}var $i=e=>e.ids?.root??`checkbox:${e.id}`,ea=e=>e.ids?.label??`checkbox:${e.id}:label`,ta=e=>e.ids?.control??`checkbox:${e.id}:control`,na=e=>e.ids?.hiddenInput??`checkbox:${e.id}:input`,ra=e=>e.getById($i(e)),ia=e=>e.getById(na(e));function aa(e,t){let{send:n,context:r,prop:i,computed:a,scope:o}=e,s=!!i(`disabled`),c=!!i(`readOnly`),l=!!i(`required`),u=!!i(`invalid`),d=!s&&r.get(`focused`),f=!s&&r.get(`focusVisible`),p=a(`checked`),m=a(`indeterminate`),h=r.get(`checked`),g={"data-active":k(r.get(`active`)),"data-focus":k(d),"data-focus-visible":k(f),"data-readonly":k(c),"data-hover":k(r.get(`hovered`)),"data-disabled":k(s),"data-state":m?`indeterminate`:p?`checked`:`unchecked`,"data-invalid":k(u),"data-required":k(l)};return{checked:p,disabled:s,indeterminate:m,focused:d,checkedState:h,setChecked(e){n({type:`CHECKED.SET`,checked:e,isTrusted:!1})},toggleChecked(){n({type:`CHECKED.TOGGLE`,checked:p,isTrusted:!1})},getRootProps(){return t.label({...Vt.root.attrs,...g,dir:i(`dir`),id:$i(o),htmlFor:na(o),onPointerMove(){s||n({type:`CONTEXT.SET`,context:{hovered:!0}})},onPointerLeave(){s||n({type:`CONTEXT.SET`,context:{hovered:!1}})},onClick(e){P(e)===ia(o)&&e.stopPropagation()}})},getLabelProps(){return t.element({...Vt.label.attrs,...g,dir:i(`dir`),id:ea(o)})},getControlProps(){return t.element({...Vt.control.attrs,...g,dir:i(`dir`),id:ta(o),"aria-hidden":!0})},getIndicatorProps(){return t.element({...Vt.indicator.attrs,...g,dir:i(`dir`),hidden:!m&&!p})},getHiddenInputProps(){return t.input({id:na(o),type:`checkbox`,required:i(`required`),defaultChecked:p,disabled:s,"aria-labelledby":ea(o),"aria-invalid":u,name:i(`name`),form:i(`form`),value:i(`value`),style:Ei,onFocus(){let e=Zi();n({type:`CONTEXT.SET`,context:{focused:!0,focusVisible:e}})},onBlur(){n({type:`CONTEXT.SET`,context:{focused:!1,focusVisible:!1}})},onClick(e){if(c){e.preventDefault();return}let t=e.currentTarget.checked;n({type:`CHECKED.SET`,checked:t,isTrusted:!0})}})}}}var oa=Object.defineProperty,sa=e=>{throw TypeError(e)},ca=(e,t,n)=>t in e?oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,la=(e,t,n)=>ca(e,typeof t==`symbol`?t:t+``,n),ua=(e,t,n)=>t.has(e)||sa(`Cannot `+n),da=(e,t,n)=>(ua(e,t,`read from private field`),n?n.call(e):t.get(e)),fa=(e,t,n)=>t.has(e)?sa(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n);function pa(e){return e==null?[]:Array.isArray(e)?e:[e]}var ma=e=>Array.from(Array(e).keys()),ha=e=>e[0],ga=e=>e[e.length-1],_a=(e,t)=>e.indexOf(t)!==-1,va=(e,...t)=>e.concat(t),ya=(e,...t)=>e.filter(e=>!t.includes(e)),ba=(e,t)=>_a(e,t)?ya(e,t):va(e,t);function xa(e){return e.reduce((e,t)=>Array.isArray(t)?e.concat(xa(t)):e.concat(t),[])}var Sa=e=>e?.constructor.name===`Array`,Ca=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!wa(e[n],t[n]))return!1;return!0},wa=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(Sa(e)&&Sa(t))return Ca(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!wa(e[r],t[r]))return!1}return!0},Ta=e=>Array.isArray(e),Ea=e=>e===!0||e===!1,Da=e=>typeof e==`object`&&!!e,Oa=e=>Da(e)&&!Ta(e),ka=e=>typeof e==`number`&&!Number.isNaN(e),Aa=e=>typeof e==`string`,ja=e=>typeof e==`function`,Ma=e=>e==null,Na=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Pa=e=>Object.prototype.toString.call(e),Fa=Function.prototype.toString,Ia=Fa.call(Object),La=e=>{if(!Da(e)||Pa(e)!=`[object Object]`||Ba(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Na(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Fa.call(n)==Ia},Ra=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,za=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,Ba=e=>Ra(e)||za(e),Va=(e,...t)=>(typeof e==`function`?e(...t):e)??void 0,Ha=()=>{},Ua=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},Wa=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Ga(e,t,...n){if(e in t){let r=t[e];return ja(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(r,Ga),r}var Ka=e=>String.fromCharCode(e+(e>25?39:97));function qa(e){let t=``,n;for(n=Math.abs(e);n>52;n=n/52|0)t=Ka(n%52)+t;return Ka(n%52)+t}function Ja(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}var Ya=e=>qa(Ja(5381,e)>>>0),{floor:Xa,abs:Za,round:Qa,min:$a,max:eo,pow:to,sign:no}=Math,ro=e=>Number.isNaN(e),io=e=>ro(e)?0:e,ao=(e,t,n)=>{let r=io(e);return(t==null||r>=t)&&(n==null||r<=n)},oo=(e,t,n)=>(io(e)-t)/(n-t),so=e=>typeof e==`number`?`${e}px`:e;function co(e){if(!La(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=co(t))}return n}function lo(e,t){if(!t)return e;let n={...e},r=t;for(let e in r){let t=r[e];t!==void 0&&(n[e]=t)}return n}function uo(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}var fo=()=>performance.now(),po,mo=class{constructor(e){la(this,`onTick`,e),la(this,`frameId`,null),la(this,`pausedAtMs`,null),la(this,`context`),la(this,`cancelFrame`,()=>{this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null)}),la(this,`setStartMs`,e=>{this.context.startMs=e}),la(this,`start`,()=>{if(this.frameId!==null)return;let e=fo();this.pausedAtMs===null?this.context.startMs=e:(this.context.startMs+=e-this.pausedAtMs,this.pausedAtMs=null),this.frameId=requestAnimationFrame(da(this,po))}),la(this,`pause`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=fo())}),la(this,`stop`,()=>{this.frameId!==null&&(this.cancelFrame(),this.pausedAtMs=null)}),fa(this,po,e=>{if(this.context.now=e,this.context.deltaMs=e-this.context.startMs,this.onTick(this.context)===!1){this.stop();return}this.frameId=requestAnimationFrame(da(this,po))}),this.context={now:0,startMs:fo(),deltaMs:0}}get elapsedMs(){return this.pausedAtMs===null?fo()-this.context.startMs:this.pausedAtMs-this.context.startMs}};po=new WeakMap;function ho(e,t){let n=new mo(({deltaMs:n})=>{if(n>=t)return e(),!1});return n.start(),()=>n.stop()}function go(...e){let t=e.length===1?e[0]:e[1];(e.length!==2||e[0])&&process.env.NODE_ENV!==`production`&&console.warn(t)}function _o(...e){let t=e.length===1?e[0]:e[1];if((e.length!==2||e[0])&&process.env.NODE_ENV!==`production`)throw Error(t)}function vo(e,t){if(e==null)throw Error(t())}function yo(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:``}] missing required props: ${r.join(`, `)}`)}function bo(e,t,n){let r=[],i;return a=>{let o=e(a);return o.length!==r.length||o.some((e,t)=>!wa(r[t],e))?(r=o,i=t(o,a),n?.onChange?.(i),i):i}}var xo=`.`,So=`#`,Co=new WeakMap,wo=new WeakMap;function To(e){return e.join(xo)}function Eo(e){return e.includes(xo)}function Do(e){return e.startsWith(So)}function Oo(e){return e.startsWith(xo)}function ko(e){return Do(e)?e.slice(So.length):e}function Ao(e,t){return e?`${e}${xo}${t}`:t}function jo(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&_o(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){vo(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||_o(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o)){if(!n)continue;let i=Ao(e,t);r(i,n)}}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function Mo(e){let t=Co.get(e);if(t)return t;let{index:n,idIndex:r}=jo(e);return Co.set(e,n),wo.set(e,r),n}function No(e,t){return Mo(e),wo.get(e)?.get(t)}function Po(e){return e?String(e).split(xo).filter(Boolean):[]}function Fo(e,t){if(!t)return[];let n=Mo(e),r=Po(t),i=[],a=[];for(let e of r){a.push(e);let t=To(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function Io(e,t){let n=Mo(e),r=Po(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=To(i);if(!n.has(r))return t}let a=To(i),o=n.get(a);for(;o?.initial;){let e=`${a}${xo}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function Lo(e,t){return Mo(e).has(t)}function Ro(e,t,n){let r=String(t);if(Do(r)){let t=ko(r),n=No(e,t);return vo(n,()=>`[zag-js] Unknown state id: "${t}"`),Io(e,n)}if(Oo(r)&&n)return Io(e,Ao(n,r.slice(1)));if(!Eo(r)&&n){let t=Po(n);for(let n=t.length-1;n>=1;n--){let i=Ao(t.slice(0,n).join(xo),r);if(Lo(e,i))return Io(e,i)}if(Lo(e,r))return Io(e,r)}return Io(e,r)}function zo(e,t,n){let r=Fo(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function Bo(e,t,n,r){let i=t?Fo(e,t):[],a=Fo(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i[i.length-1]?.path===a[a.length-1]?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function Vo(e,t){return e?e===t||e.startsWith(`${t}${xo}`):!1}function Ho(e,t,n){return Fo(e,t).some(e=>e.state.tags?.includes(n))}function Uo(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function R(e){return Mo(e),e}function Wo(){return{guards:Uo(),createMachine:e=>R(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var Go=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(Go||{}),Ko=`__init__`;function qo(e){let t=()=>e.getRootNode?.()??document,n=()=>M(t()),r=()=>n().defaultView??window,i=()=>yn(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:hn,getById:a}}var{not:Jo}=Uo(),Yo=R({props({props:e}){return{value:`on`,...e,defaultChecked:e.defaultChecked??!1}},initialState(){return`ready`},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e(`defaultChecked`),value:e(`checked`),onChange(t){e(`onCheckedChange`)?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},watch({track:e,context:t,prop:n,action:r}){e([()=>n(`disabled`)],()=>{r([`removeFocusIfNeeded`])}),e([()=>t.get(`checked`)],()=>{r([`syncInputElement`])})},effects:[`trackFormControlState`,`trackPressEvent`,`trackFocusVisible`],on:{"CHECKED.TOGGLE":[{guard:Jo(`isTrusted`),actions:[`toggleChecked`,`dispatchChangeEvent`]},{actions:[`toggleChecked`]}],"CHECKED.SET":[{guard:Jo(`isTrusted`),actions:[`setChecked`,`dispatchChangeEvent`]},{actions:[`setChecked`]}],"CONTEXT.SET":{actions:[`setContext`]}},computed:{indeterminate:({context:e})=>Xo(e.get(`checked`)),checked:({context:e})=>Zo(e.get(`checked`)),disabled:({context:e,prop:t})=>!!t(`disabled`)||e.get(`fieldsetDisabled`)},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({context:e,computed:t,scope:n}){if(!t(`disabled`))return ei({pointerNode:ra(n),keyboardNode:ia(n),isValidKey:e=>e.key===` `,onPress:()=>e.set(`active`,!1),onPressStart:()=>e.set(`active`,!0),onPressEnd:()=>e.set(`active`,!1)})},trackFocusVisible({computed:e,scope:t}){if(!e(`disabled`))return Qi({root:t.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return xr(ia(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`checked`,e.initial(`checked`))}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,computed:t,scope:n}){let r=ia(n);r&&(gr(r,t(`checked`)),r.indeterminate=Xo(e.get(`checked`)))},removeFocusIfNeeded({context:e,prop:t}){t(`disabled`)&&e.get(`focused`)&&(e.set(`focused`,!1),e.set(`focusVisible`,!1))},setChecked({context:e,event:t}){e.set(`checked`,t.checked)},toggleChecked({context:e,computed:t}){let n=Xo(t(`checked`))?!0:!t(`checked`);e.set(`checked`,n)},dispatchChangeEvent({computed:e,scope:t}){queueMicrotask(()=>{_r(ia(t),{checked:e(`checked`)})})}}}});function Xo(e){return e===`indeterminate`}function Zo(e){return!Xo(e)&&!!e}function Qo(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}function $o(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var es={htmlFor:`for`,className:`class`,onDoubleClick:`onDblclick`,onChange:`onInput`,onFocus:`onFocusin`,onBlur:`onFocusout`,defaultValue:`value`,defaultChecked:`checked`},ts=`viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit`.split(`,`);function ns(e){return e in es?es[e]:e.startsWith(`on`)?`on${$o(e.substr(2))}`:ts.includes(e)?e:e.toLowerCase()}var z=Qo(e=>{let t={};for(let n in e){let r=e[n];n===`children`?typeof r==`string`?t.innerHTML=r:process.env.NODE_ENV!==`production`&&r!=null&&console.warn("[Vue Normalize Prop] : avoid passing non-primitive value as `children`"):t[ns(n)]=e[n]}return t});function rs(e){let n=e().value??e().defaultValue,r=e().isEqual??Object.is,i=(0,t.shallowRef)(n),a=(0,t.computed)(()=>e().value!==void 0);return{initial:n,ref:(0,t.shallowRef)(a.value?e().value:i.value),get(){return a.value?e().value:i.value},set(t){let n=a.value?e().value:i.value,o=ja(t)?t(n):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:o,prev:n}),a.value||(i.value=o),r(o,n)||e().onChange?.(o,n)},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}rs.cleanup=e=>{(0,t.onUnmounted)(()=>e())},rs.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function is(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}var as=(e,n)=>{(0,t.watch)(()=>[...e.map(e=>e())],(e,r)=>{let i=!1;for(let n=0;n<e.length;n++)if(!wa(r[n],(0,t.toValue)(e[n]))){i=!0;break}i&&n()})};function B(e,n={}){let r=(0,t.computed)(()=>{let{id:e,ids:r,getRootNode:i}=(0,t.toValue)(n);return qo({id:e,ids:r,getRootNode:i})}),i=(...t)=>{e.debug&&console.log(...t)},a=os((0,t.computed)(()=>e.props?.({props:co((0,t.toValue)(n)),get scope(){return r.value}})??(0,t.toValue)(n))),o=e.context?.({prop:a,bindable:rs,get scope(){return r.value},flush:ss,getContext(){return s},getComputed(){return b},getRefs(){return m},getEvent(){return f()}}),s={get(e){return o[e]?.get()},set(e,t){o[e]?.set(t)},initial(e){return o[e]?.initial},hash(e){let t=o[e]?.get();return o[e]?.hash(t)}},c=new Map,l=null,u={current:null},d={current:{type:``}},f=()=>({...d.current,current(){return d.current},previous(){return u.current}}),p=()=>({...x,matches(...e){let t=x.get();return e.some(e=>Vo(t,e))},hasTag(t){return Ho(e,x.get(),t)}}),m=is(e.refs?.({prop:a,context:s})??{}),h=()=>({state:p(),context:s,event:f(),prop:a,send:w,action:g,guard:_,track:as,refs:m,computed:b,flush:ss,get scope(){return r.value},choose:y}),g=t=>{let n=ja(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||go(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(h())},_=t=>{if(ja(t))return t(h());let n=e.implementations?.guards?.[t];return n||go(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(h())},v=t=>{let n=ja(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||go(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(h());t&&i.push(t)}return()=>i.forEach(e=>e?.())},y=e=>pa(e).find(e=>{let t=!e.guard;return Aa(e.guard)?t=!!_(e.guard):ja(e.guard)&&(t=e.guard(h())),t}),b=t=>{vo(e.computed,()=>`[zag-js] No computed object found on machine`);let n=e.computed[t];return n({context:s,event:f(),prop:a,refs:m,get scope(){return r.value},computed:b})},x=rs(()=>({defaultValue:Ro(e,e.initialState({prop:a})),onChange(t,n){let{exiting:r,entering:i}=Bo(e,n,t,l?.reenter);if(r.forEach(e=>{c.get(e.path)?.(),c.delete(e.path)}),r.forEach(e=>{g(e.state?.exit)}),g(l?.actions),i.forEach(e=>{let t=v(e.state?.effects);if(t){let n=c.get(e.path);c.set(e.path,n?Ua(n,t):t)}}),n===`__init__`){g(e.entry);let t=v(e.effects);if(t){let e=c.get(Ko);c.set(Ko,e?Ua(e,t):t)}}i.forEach(e=>{g(e.state?.entry)})}})),S=Go.NotStarted,C=[];(0,t.onMounted)(()=>{let e=S===Go.Started;S=Go.Started,i(e?`rehydrating...`:`initializing...`),x.invoke(x.initial,Ko);let t=C;C=[];for(let e of t)w(e)}),(0,t.onBeforeUnmount)(()=>{S=Go.Stopped,C=[],i(`unmounting...`);let t=c.values();for(let e of t)e?.();c=new Map,g(e.exit)});let w=t=>{if(S!==Go.Started){C.push(t);return}u.current=d.current,d.current=t;let n=x.get(),{transitions:r,source:a}=zo(e,n,t.type),o=y(r);if(!o)return;l=o;let s=Ro(e,o.target??n,a);i(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?x.invoke(n,n):g(o.actions):x.set(s)};return e.watch?.(h()),{state:p(),send:w,context:s,prop:a,get scope(){return r.value},refs:m,computed:b,event:f(),getStatus:()=>S}}function os(e){return function(t){return e.value[t]}}var ss=e=>{(0,t.nextTick)().then(()=>{e()})},cs={key:0,class:`k-check__body`},ls={key:0,class:`k-check__hint`},us=E({__name:`KCheckbox`,props:{modelValue:{type:[Boolean,Array],default:!1},value:{type:[String,Number,Boolean],default:void 0},label:{type:String,default:``},hint:{type:String,default:``},name:{type:String,default:``},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>Array.isArray(r.modelValue)),o=(0,t.computed)(()=>a.value?r.modelValue.includes(r.value):r.modelValue),s=B(Yo,{id:(0,t.useId)(),get checked(){return r.indeterminate?`indeterminate`:o.value},get disabled(){return r.disabled},get required(){return r.required},get name(){return r.name||void 0},get value(){return r.value==null?void 0:String(r.value)},onCheckedChange({checked:e}){let t=e===!0;if(!a.value){i(`update:modelValue`,t);return}i(`update:modelValue`,t?[...r.modelValue,r.value]:r.modelValue.filter(e=>e!==r.value))}}),c=(0,t.computed)(()=>aa(s,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:`k-check`},c.value.getRootProps()),[(0,t.createElementVNode)(`input`,(0,t.normalizeProps)((0,t.guardReactiveProps)(c.value.getHiddenInputProps())),null,16),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-check__control`},c.value.getControlProps()),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-check__indicator`},c.value.getIndicatorProps()),[(0,t.createVNode)(D,{name:c.value.indeterminate?`remove`:`check`,size:12,"stroke-width":3},null,8,[`name`])],16)],16),e.label||e.hint||n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,cs,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-check__label`},c.value.getLabelProps()),[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],16),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ls,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}},[[`__scopeId`,`data-v-f6be6278`]]),ds=[`aria-pressed`,`aria-expanded`,`disabled`],fs={key:0,class:`k-chip__mark`},ps={class:`k-chip__label`},ms=E({__name:`KChip`,props:{pressed:{type:Boolean,default:void 0},tone:{type:String,default:`primary`},soft:{type:Boolean,default:!1},dashed:{type:Boolean,default:!1},expanded:{type:Boolean,default:void 0},marked:{type:Boolean,default:!1},size:{type:String,default:`md`},icon:{type:String,default:``},disabled:{type:Boolean,default:!1}},emits:[`update:pressed`,`click`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>r.pressed!==void 0),o=(0,t.computed)(()=>r.expanded!==void 0);function s(e){a.value&&i(`update:pressed`,!r.pressed),i(`click`,e)}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:`button`,class:(0,t.normalizeClass)([`k-chip`,[`k-chip--${e.tone}`,`k-chip--${e.size}`,{"k-chip--on":e.pressed,"k-chip--soft":e.soft,"k-chip--dashed":e.dashed}]]),"aria-pressed":a.value?String(!!e.pressed):void 0,"aria-expanded":o.value?String(!!e.expanded):void 0,disabled:e.disabled,onClick:s},[e.marked?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,fs)):(0,t.createCommentVNode)(``,!0),e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:1,name:e.icon,size:e.size===`sm`?13:15},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,ps,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),o.value?((0,t.openBlock)(),(0,t.createBlock)(D,{key:2,name:e.expanded?`chevron-up`:`chevron-down`,size:e.size===`sm`?13:14},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0)],10,ds))}},[[`__scopeId`,`data-v-f79a2356`]]),V=O(`combobox`).parts(`root`,`clearTrigger`,`content`,`control`,`input`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`label`,`list`,`positioner`,`trigger`).build(),hs=Object.defineProperty,gs=(e,t,n)=>t in e?hs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H=(e,t,n)=>gs(e,typeof t==`symbol`?t:t+``,n),_s={itemToValue(e){return typeof e==`string`?e:Oa(e)&&Na(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:Oa(e)&&Na(e,`label`)?e.label:_s.itemToValue(e)},isItemDisabled(e){return Oa(e)&&Na(e,`disabled`)?!!e.disabled:!1}},vs=class e{constructor(t){H(this,`options`,t),H(this,`items`),H(this,`indexMap`,null),H(this,`copy`,t=>new e({...this.options,items:t??[...this.items]})),H(this,`isEqual`,e=>wa(this.items,e.items)),H(this,`setItems`,e=>this.copy(e)),H(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),H(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),H(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),H(this,`at`,e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0,n=this.group();for(let[,r]of n)for(let n of r){if(t===e)return n;t++}return null}),H(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),H(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),H(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??_s.itemToValue(e)),H(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??_s.isItemDisabled(e)),H(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??_s.itemToString(e)),H(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),H(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),H(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),H(this,`has`,e=>this.indexOf(e)!==-1),H(this,`hasItem`,e=>e!=null&&this.has(this.getItemValue(e))),H(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),H(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),H(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),H(this,`indexOf`,e=>{if(e==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0,t=this.group();for(let[,n]of t)for(let t of n){let n=this.getItemValue(t);n!=null&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1}),H(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1;for(let i=0;i<this.items.length;i++){let a=this.items[(n+i+1)%this.items.length];if(!(r&&this.getItemValue(a)===t)&&!this.getItemDisabled(a)&&ys(this.stringifyItem(a),e))return a}}),H(this,`search`,(e,t)=>{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),H(this,`update`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),H(this,`upsert`,(e,t,n=`append`)=>{let r=this.indexOf(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),H(this,`insert`,(e,...t)=>this.copy(bs(this.items,e,...t))),H(this,`insertBefore`,(e,...t)=>{let n=this.indexOf(e);if(n===-1){if(this.items.length===0)n=0;else return this}return this.copy(bs(this.items,n,...t))}),H(this,`insertAfter`,(e,...t)=>{let n=this.indexOf(e);if(n===-1){if(this.items.length===0)n=0;else return this}return this.copy(bs(this.items,n+1,...t))}),H(this,`prepend`,(...e)=>this.copy(bs(this.items,0,...e))),H(this,`append`,(...e)=>this.copy(bs(this.items,this.items.length,...e))),H(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),H(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n!=null&&!t.includes(n)}))}),H(this,`move`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy(xs(this.items,[n],t))}),H(this,`moveBefore`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(xs(this.items,r,n))}),H(this,`moveAfter`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(xs(this.items,r,n+1))}),H(this,`reorder`,(e,t)=>this.copy(xs(this.items,[e],t))),H(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:+(n>r)}),H(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),H(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),H(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),H(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},ys=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function bs(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function xs(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>e<n).length),[...e.slice(0,n),...r,...e.slice(n)]}function Ss({values:e,collection:t,selectedItemMap:n}){let r=[];for(let i of e){let e=t.find(i)??n.get(i);e!=null&&r.push(e)}return r}function Cs({selectedItemMap:e,values:t,selectedItems:n,collection:r}){let i=new Map(e);for(let e of n){let t=r.getItemValue(e);t!=null&&i.set(t,e)}let a=new Set(t);for(let e of i.keys())a.has(e)||i.delete(e);return i}function ws({values:e,collection:t,selectedItemMap:n}){let r=Ss({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:Cs({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function Ts({selectedItems:e,collection:t}){return Cs({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}var Es=e=>new vs(e);Es.empty=()=>new vs({items:[]});var Ds=[`top`,`right`,`bottom`,`left`],Os=Math.min,ks=Math.max,As=Math.round,js=Math.floor,Ms=e=>({x:e,y:e}),Ns={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ps(e,t,n){return ks(e,Os(t,n))}function Fs(e,t){return typeof e==`function`?e(t):e}function Is(e){return e.split(`-`)[0]}function Ls(e){return e.split(`-`)[1]}function Rs(e){return e===`x`?`y`:`x`}function zs(e){return e===`y`?`height`:`width`}function U(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Bs(e){return Rs(U(e))}function Vs(e,t,n){n===void 0&&(n=!1);let r=Ls(e),i=Bs(e),a=zs(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Xs(o)),[o,Xs(o)]}function Hs(e){let t=Xs(e);return[Us(e),t,Us(t)]}function Us(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ws=[`left`,`right`],Gs=[`right`,`left`],Ks=[`top`,`bottom`],qs=[`bottom`,`top`];function Js(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Gs:Ws:t?Ws:Gs;case`left`:case`right`:return t?Ks:qs;default:return[]}}function Ys(e,t,n,r){let i=Ls(e),a=Js(Is(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Us)))),a}function Xs(e){let t=Is(e);return Ns[t]+e.slice(t.length)}function Zs(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Qs(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Zs(e)}function $s(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ec(e,t,n){let{reference:r,floating:i}=e,a=U(t),o=Bs(t),s=zs(o),c=Is(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ls(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function tc(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Fs(t,e),p=Qs(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=$s(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=$s(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var nc=50,rc=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:tc},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ec(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<nc&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ec(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ic=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Fs(e,t)||{};if(l==null)return{};let d=Qs(u),f={x:n,y:r},p=Bs(i),m=zs(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=Os(d[_],T),te=Os(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=Ps(ee,re,ne),ae=!c.arrow&&Ls(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),ac=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Fs(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Is(r),_=U(o),v=Is(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Xs(o)]:Hs(o)),x=p!==`none`;!d&&x&&b.push(...Ys(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Vs(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===U(t)||T.every(e=>U(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=U(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function oc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sc(e){return Ds.some(t=>e[t]>=0)}var cc=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Fs(e,t);switch(i){case`referenceHidden`:{let e=oc(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:sc(e)}}}case`escaped`:{let e=oc(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:sc(e)}}}default:return{}}}}},lc=new Set([`left`,`top`]);async function uc(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Is(n),s=Ls(n),c=U(n)===`y`,l=lc.has(o)?-1:1,u=a&&c?-1:1,d=Fs(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var dc=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await uc(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},fc=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Fs(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=U(i),p=Rs(f),m=u[p],h=u[f],g=(e,t)=>Ps(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},pc=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Fs(e,t),u={x:n,y:r},d=U(i),f=Rs(d),p=u[f],m=u[d],h=Fs(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=lc.has(Is(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},mc=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Fs(e,t),c=await i.detectOverflow(t,s),l=Is(n),u=Ls(n),d=U(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Os(p-c[m],g),y=Os(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ks(c.left,c.right):S=p-2*ks(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function hc(){return typeof window<`u`}function gc(e){return vc(e)?(e.nodeName||``).toLowerCase():`#document`}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _c(e){return((vc(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function vc(e){return hc()?e instanceof Node||e instanceof W(e).Node:!1}function G(e){return hc()?e instanceof Element||e instanceof W(e).Element:!1}function yc(e){return hc()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function bc(e){return!hc()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function xc(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Sc(e){return/^(table|td|th)$/.test(gc(e))}function Cc(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var wc=/transform|translate|scale|rotate|perspective|filter/,Tc=/paint|layout|strict|content/,Ec=e=>!!e&&e!==`none`,Dc;function Oc(e){let t=G(e)?K(e):e;return Ec(t.transform)||Ec(t.translate)||Ec(t.scale)||Ec(t.rotate)||Ec(t.perspective)||!Ac()&&(Ec(t.backdropFilter)||Ec(t.filter))||wc.test(t.willChange||``)||Tc.test(t.contain||``)}function kc(e){let t=Nc(e);for(;yc(t)&&!jc(t);){if(Oc(t))return t;if(Cc(t))return null;t=Nc(t)}return null}function Ac(){return Dc??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Dc}function jc(e){return/^(html|body|#document)$/.test(gc(e))}function K(e){return W(e).getComputedStyle(e)}function Mc(e){return G(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nc(e){if(gc(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||bc(e)&&e.host||_c(e);return bc(t)?t.host:t}function Pc(e){let t=Nc(e);return jc(t)?(e.ownerDocument||e).body:yc(t)&&xc(t)?t:Pc(t)}function Fc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Pc(e),i=r===e.ownerDocument?.body,a=W(r);if(i){let e=Ic(a);return t.concat(a,a.visualViewport||[],xc(r)?r:[],e&&n?Fc(e):[])}return t.concat(r,Fc(r,[],n))}function Ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lc(e){let t=K(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=yc(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=As(n)!==a||As(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Rc(e){return G(e)?e:e.contextElement}function zc(e){let t=Rc(e);if(!yc(t))return Ms(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Lc(t),o=(a?As(n.width):n.width)/r,s=(a?As(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Bc=Ms(0);function Vc(e){let t=W(e);return!Ac()||!t.visualViewport?Bc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===W(e)}function Uc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Rc(e),o=Ms(1);t&&(r?G(r)&&(o=zc(r)):o=zc(e));let s=Hc(a,n,r)?Vc(a):Ms(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=W(a),t=G(r)?W(r):r,n=e,i=Ic(n);for(;i&&t!==n;){let e=zc(i),t=i.getBoundingClientRect(),r=K(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=W(i),i=Ic(n)}}return $s({width:u,height:d,x:c,y:l})}function Wc(e,t){let n=Mc(e).scrollLeft;return t?t.left+n:Uc(_c(e)).left+n}function Gc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Wc(e,n),y:n.top+t.scrollTop}}function Kc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=_c(r),s=t?Cc(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ms(1),u=Ms(0),d=yc(r);if((d||!a)&&((gc(r)!==`body`||xc(o))&&(c=Mc(r)),d)){let e=Uc(r);l=zc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Gc(o,c):Ms(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function qc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Jc(e){let t=Mc(e),n=e.ownerDocument.body,r=ks(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ks(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Wc(e),o=-t.scrollTop;return K(n).direction===`rtl`&&(a+=ks(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Yc=25;function Xc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=W(e),a=_c(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ac()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Wc(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Yc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Zc(e,t){let n=Uc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=zc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Qc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Xc(e,n,t);else if(t===`document`)r=Jc(_c(e));else if(G(t))r=Zc(t,n);else{let n=Vc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return $s(r)}function $c(e,t){let n=t.get(e);if(n)return n;let r=Fc(e,[],!1).filter(e=>G(e)&&gc(e)!==`body`),i=null,a=K(e).position===`fixed`,o=a?Nc(e):e;for(;G(o)&&!jc(o);){let e=K(o),t=Oc(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Nc(o)}return t.set(e,r),r}function el(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Cc(t)?[]:$c(t,this._c):[].concat(n),r],o=Qc(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Qc(t,a[e],i);s=ks(n.top,s),c=Os(n.right,c),l=Os(n.bottom,l),u=ks(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function tl(e){let{width:t,height:n}=Lc(e);return{width:t,height:n}}function nl(e,t,n){let r=yc(t),i=_c(t),a=n===`fixed`,o=Uc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ms(0);if((r||!a)&&((gc(t)!==`body`||xc(i))&&(s=Mc(t)),r)){let e=Uc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Wc(i));let l=i&&!r&&!a?Gc(i,s):Ms(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function rl(e){return K(e).position===`static`}function il(e,t){if(!yc(e)||K(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return _c(e)===n&&(n=n.ownerDocument.body),n}function al(e,t){let n=W(e);if(Cc(e))return n;if(!yc(e)){let t=Nc(e);for(;t&&!jc(t);){if(G(t)&&!rl(t))return t;t=Nc(t)}return n}let r=il(e,t);for(;r&&Sc(r)&&rl(r);)r=il(r,t);return r&&jc(r)&&rl(r)&&!Oc(r)?n:r||kc(e)||n}var ol=async function(e){let t=this.getOffsetParent||al,n=this.getDimensions,r=await n(e.floating);return{reference:nl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sl(e){return K(e).direction===`rtl`}var cl={convertOffsetParentRelativeRectToViewportRelativeRect:Kc,getDocumentElement:_c,getClippingRect:el,getOffsetParent:al,getElementRects:ol,getClientRects:qc,getDimensions:tl,getScale:zc,isElement:G,isRTL:sl};function ll(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ul(e,t,n){let r=null,i,a=_c(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=js(d),h=js(a.clientWidth-(u+f)),g=js(a.clientHeight-(d+p)),_=js(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ks(0,Os(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ll(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=W(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function dl(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Rc(e),u=i||a?[...l?Fc(l):[],...t?Fc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?ul(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Uc(e):null;c&&g();function g(){let t=Uc(e);h&&!ll(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var fl=dc,pl=fc,ml=ac,hl=mc,gl=cc,_l=ic,vl=pc,yl=(e,t,n)=>{let r=new Map,i=n??{},a={...cl,...i.platform,_c:r};return rc(e,t,{...i,platform:a})};function bl(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function xl(e){if(!e)return bl();let{x:t,y:n,width:r,height:i}=e;return bl(t,n,r,i)}function Sl(e,t){return{contextElement:A(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?xl(r):n.getBoundingClientRect()}}}var Cl=e=>({variable:e,reference:`var(${e})`}),wl={arrowSize:Cl(`--arrow-size`),arrowSizeHalf:Cl(`--arrow-size-half`),arrowBg:Cl(`--arrow-background`),transformOrigin:Cl(`--transform-origin`),arrowOffset:Cl(`--arrow-offset`)},Tl=e=>e===`top`||e===`bottom`?`y`:`x`;function El(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=Tl(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(wl.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var Dl={name:`rects`,fn({rects:e}){return{data:e}}},Ol=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${wl.arrowOffset.reference})`}),{}}}};function kl(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function Al(e){return e.split(`-`)[0]}var jl={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,applyStyles:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Ml(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Nl(e,t){return e!=null&&Math.abs(e-t)<.5}function Pl(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function Fl(e,t,n){return _l({element:e||t.createElement(`div`),padding:n.arrowPadding})}function Il(e,t){if(!Ma(t.offset??t.gutter))return fl(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=kl(n),s=o?void 0:t.shift;return co({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function Ll(e){if(e.flip)return ml(()=>{let t=Pl(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function Rl(e){if(e.slide||e.overlap)return pl(()=>{let t=Pl(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:vl()}})}function zl(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return hl(()=>{let a=Pl(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),Nl(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),Nl(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),Nl(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),Nl(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function Bl(e){if(e.hideWhenDetached)return gl(()=>({strategy:`referenceHidden`,boundary:Pl(e.boundary)??`clippingAncestors`}))}function Vl(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var Hl=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],Ul=[`top`,`right`,`bottom`,`left`];function Wl(e,t){if(!e)return Ha;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function Gl(e){return e==null?null:A(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function Kl(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:Sl(e,n.getAnchorRect)},o=Object.assign({},jl,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?Wl(e,Hl):void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?Wl(t,Ul):void 0,s=[Il(t,o),Ll(o),Rl(o),Fl(t,e.ownerDocument,o),Ol(t),El({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),zl(o),Bl(o),Dl]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=Ha,S=Vl(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();t&&n&&(Gl(e)!==Gl(y)||n!==b)&&(x(),y=e,b=n,x=dl(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await yl(t,e,{placement:f,middleware:s,strategy:p}),i=N(e),l=Ml(i,n.x),u=Ml(i,n.y);if(m?.({...n,x:l,y:u}),o.applyStyles!==!1&&(Nl(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),Nl(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v)){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,Cn(t).zIndex),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function ql(e,t,n={}){let{defer:r,...i}=n,a=r?I:e=>e(),o=[];return o.push(a(()=>{o.push(Kl(e,t,i))})),()=>{o.forEach(e=>e?.())}}var Jl={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function Yl(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:wl.arrowSize.reference,height:wl.arrowSize.reference,[wl.arrowSizeHalf.variable]:`calc(${wl.arrowSize.reference} / 2)`,[wl.arrowOffset.variable]:`calc(${wl.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Jl[t.split(`-`)[0]]:void 0,background:wl.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}var Xl=e=>e.ids?.root??`combobox:${e.id}`,Zl=e=>e.ids?.label??`combobox:${e.id}:label`,Ql=e=>e.ids?.control??`combobox:${e.id}:control`,$l=e=>e.ids?.input??`combobox:${e.id}:input`,eu=e=>e.ids?.content??`combobox:${e.id}:content`,tu=e=>e.ids?.positioner??`combobox:${e.id}:popper`,nu=e=>e.ids?.trigger??`combobox:${e.id}:toggle-btn`,ru=e=>e.ids?.clearTrigger??`combobox:${e.id}:clear-btn`,iu=(e,t)=>e.ids?.itemGroup?.(t)??`combobox:${e.id}:optgroup:${t}`,au=(e,t)=>e.ids?.itemGroupLabel?.(t)??`combobox:${e.id}:optgroup-label:${t}`,ou=(e,t)=>e.ids?.item?.(t)??`combobox:${e.id}:option:${t}`,su=e=>e.getById(eu(e)),cu=e=>e.getById($l(e)),lu=e=>e.getById(tu(e)),uu=e=>e.getById(Ql(e)),du=e=>e.getById(nu(e)),fu=e=>e.getById(ru(e)),pu=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return oi(su(e),n)},mu=e=>{let t=cu(e);e.isActiveElement(t)||t?.focus({preventScroll:!0}),Gt(t)},hu=e=>{let t=du(e);e.isActiveElement(t)||t?.focus({preventScroll:!0})},gu={triggerLabel:`Toggle suggestions`,clearTriggerLabel:`Clear value`};function _u(e,t){let{context:n,prop:r,state:i,send:a,scope:o,computed:s}=e,c=lo(gu,r(`translations`)),l=r(`collection`),u=!!r(`disabled`),d=s(`isInteractive`),f=!!r(`invalid`),p=!!r(`required`),m=!!r(`readOnly`),h=i.hasTag(`open`),g=i.hasTag(`focused`),_=r(`composite`),v=n.get(`highlightedValue`),y=n.get(`currentPlacement`),b=y?Al(y):void 0,x=Yl({...r(`positioning`),placement:y});function S(e){let t=l.getItemDisabled(e.item),r=l.getItemValue(e.item);return vo(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(u||t),highlighted:v===r,selected:n.get(`value`).includes(r)}}return{focused:g,open:h,inputValue:n.get(`inputValue`),highlightedValue:v,highlightedItem:n.get(`highlightedItem`),value:n.get(`value`),valueAsString:s(`valueAsString`),hasSelectedItems:s(`hasSelectedItems`),selectedItems:s(`selectedItems`),collection:r(`collection`),multiple:!!r(`multiple`),disabled:!!u,syncSelectedItems(){a({type:`SELECTED_ITEMS.SYNC`})},reposition(e={}){a({type:`POSITIONING.SET`,options:e})},setHighlightValue(e){a({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){a({type:`HIGHLIGHTED_VALUE.CLEAR`})},selectValue(e){a({type:`ITEM.SELECT`,value:e})},setValue(e){a({type:`VALUE.SET`,value:e})},setInputValue(e,t=`script`){a({type:`INPUT_VALUE.SET`,value:e,src:t})},clearValue(e){a(e==null?{type:`VALUE.CLEAR`}:{type:`ITEM.CLEAR`,value:e})},focus(){cu(o)?.focus()},setOpen(e,t=`script`){i.hasTag(`open`)!==e&&a({type:e?`OPEN`:`CLOSE`,src:t})},getRootProps(){return t.element({...V.root.attrs,dir:r(`dir`),id:Xl(o),"data-invalid":k(f),"data-readonly":k(m)})},getLabelProps(){return t.label({...V.label.attrs,dir:r(`dir`),htmlFor:$l(o),id:Zl(o),"data-readonly":k(m),"data-disabled":k(u),"data-invalid":k(f),"data-required":k(p),"data-focus":k(g),onClick(e){_||(e.preventDefault(),du(o)?.focus({preventScroll:!0}))}})},getControlProps(){return t.element({...V.control.attrs,dir:r(`dir`),id:Ql(o),"data-state":h?`open`:`closed`,"data-focus":k(g),"data-disabled":k(u),"data-invalid":k(f)})},getPositionerProps(){return t.element({...V.positioner.attrs,dir:r(`dir`),id:tu(o),style:x.floating})},getInputProps(){return t.input({...V.input.attrs,dir:r(`dir`),"aria-invalid":Zt(f),"data-invalid":k(f),"data-autofocus":k(r(`autoFocus`)),name:r(`name`),form:r(`form`),disabled:u,required:r(`required`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:`false`,readOnly:m,placeholder:r(`placeholder`),id:$l(o),type:`text`,role:`combobox`,defaultValue:n.get(`inputValue`),"aria-autocomplete":s(`autoComplete`)?`both`:`list`,"aria-controls":eu(o),"aria-expanded":h,"data-state":h?`open`:`closed`,"aria-activedescendant":v?ou(o,v):void 0,onClick(e){e.defaultPrevented||r(`openOnClick`)&&d&&a({type:`INPUT.CLICK`,src:`input-click`})},onFocus(){u||a({type:`INPUT.FOCUS`})},onBlur(){u||a({type:`INPUT.BLUR`})},onChange(e){a({type:`INPUT.CHANGE`,value:e.currentTarget.value,src:`input-change`})},onKeyDown(e){if(e.defaultPrevented||!d||e.ctrlKey||e.shiftKey||ir(e))return;let t=r(`openOnKeyPress`),n=e.ctrlKey||e.metaKey||e.shiftKey,i={ArrowDown(e){(t||h)&&(a({type:e.altKey?`OPEN`:`INPUT.ARROW_DOWN`,keypress:!0,src:`arrow-key`}),e.preventDefault())},ArrowUp(){(t||h)&&(a({type:e.altKey?`CLOSE`:`INPUT.ARROW_UP`,keypress:!0,src:`arrow-key`}),e.preventDefault())},Home(e){n||(a({type:`INPUT.HOME`,keypress:!0}),h&&e.preventDefault())},End(e){n||(a({type:`INPUT.END`,keypress:!0}),h&&e.preventDefault())},Enter(e){a({type:`INPUT.ENTER`,keypress:!0,src:`item-select`});let t=v!=null,n=r(`alwaysSubmitOnEnter`),i=s(`isCustomValue`)&&!r(`allowCustomValue`);if(h&&!n&&(t||i)&&e.preventDefault(),v==null)return;let c=pu(o,v);pn(c)&&r(`navigate`)?.({value:v,node:c,href:c.href})},Escape(){a({type:`INPUT.ESCAPE`,keypress:!0,src:`escape-key`}),e.preventDefault()}}[fr(e,{dir:r(`dir`)})];i?.(e)}})},getTriggerProps(e={}){return t.button({...V.trigger.attrs,dir:r(`dir`),id:nu(o),"aria-haspopup":_?`listbox`:`dialog`,type:`button`,tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":h,"data-state":h?`open`:`closed`,"aria-controls":h?eu(o):void 0,disabled:u,"data-invalid":k(f),"data-focusable":k(e.focusable),"data-readonly":k(m),"data-disabled":k(u),onFocus(){e.focusable&&a({type:`INPUT.FOCUS`,src:`trigger`})},onClick(e){e.defaultPrevented||d&&sr(e)&&a({type:`TRIGGER.CLICK`,src:`trigger-click`})},onPointerDown(e){d&&e.pointerType!==`touch`&&sr(e)&&(e.preventDefault(),queueMicrotask(()=>{mu(o)}))},onKeyDown(e){if(e.defaultPrevented||_)return;let t={ArrowDown(){a({type:`INPUT.ARROW_DOWN`,src:`arrow-key`})},ArrowUp(){a({type:`INPUT.ARROW_UP`,src:`arrow-key`})}}[fr(e,{dir:r(`dir`)})];t&&(t(e),e.preventDefault())}})},getContentProps(){return t.element({...V.content.attrs,dir:r(`dir`),id:eu(o),role:_?`listbox`:`dialog`,tabIndex:-1,hidden:!h,"data-state":h?`open`:`closed`,"data-placement":y,"data-side":b,"aria-labelledby":Zl(o),"aria-multiselectable":r(`multiple`)&&_?!0:void 0,"data-empty":k(l.size===0),onPointerDown(e){sr(e)&&e.preventDefault()}})},getListProps(){return t.element({...V.list.attrs,role:_?void 0:`listbox`,"data-empty":k(l.size===0),"aria-labelledby":Zl(o),"aria-multiselectable":r(`multiple`)&&!_?!0:void 0})},getClearTriggerProps(){return t.button({...V.clearTrigger.attrs,dir:r(`dir`),id:ru(o),type:`button`,tabIndex:-1,disabled:u,"data-invalid":k(f),"aria-label":c.clearTriggerLabel,"aria-controls":$l(o),hidden:!n.get(`value`).length,onPointerDown(e){sr(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||d&&a({type:`VALUE.CLEAR`,src:`clear-trigger`})}})},getItemState:S,getItemProps(e){let n=S(e),i=n.value;return t.element({...V.item.attrs,dir:r(`dir`),id:ou(o,i),role:`option`,tabIndex:-1,"data-highlighted":k(n.highlighted),"data-state":n.selected?`checked`:`unchecked`,"aria-selected":Zt(n.selected),"aria-disabled":Zt(n.disabled),"data-disabled":k(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||Yi()===`pointer`&&(n.highlighted||a({type:`ITEM.POINTER_MOVE`,value:i}))},onPointerLeave(){e.persistFocus||n.disabled||Yi()===`pointer`&&a({type:`ITEM.POINTER_LEAVE`,value:i})},onClick(e){rr(e)||nr(e)||cr(e)||n.disabled||a({type:`ITEM.CLICK`,src:`item-select`,value:i})}})},getItemTextProps(e){let n=S(e);return t.element({...V.itemText.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,"data-disabled":k(n.disabled),"data-highlighted":k(n.highlighted)})},getItemIndicatorProps(e){let n=S(e);return t.element({"aria-hidden":!0,...V.itemIndicator.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupProps(e){let{id:n}=e;return t.element({...V.itemGroup.attrs,dir:r(`dir`),id:iu(o,n),"aria-labelledby":au(o,n),"data-empty":k(l.size===0),role:`group`})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...V.itemGroupLabel.attrs,dir:r(`dir`),id:au(o,n),role:`presentation`})}}}function vu(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function yu(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var bu=`pointerdown.outside`,xu=`focus.outside`;function Su(e){for(let t of e)if(A(t)&&Ir(t))return!0;return!1}var Cu=e=>`clientY`in e;function wu(e,t){if(!Cu(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Tu(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Eu(e,t){if(!t||!Cu(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return Tu({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function Du(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=M(e),l=N(e),u=vu(l),d=yu(l);function f(t,r){if(!A(r)||!r.isConnected||j(e,r)||wu(e,t)||s&&Dn(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&Eu(t,Yr(i))||Eu(t,Yr(e))?!1:!n?.(r)}let p=new Set,m=dn(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!Kn()?I:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:P(t);if(e&&f(t,n)){if(i||a){let t=Ua(i,a);e.addEventListener(bu,t,{once:!0})}ku(e,bu,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:cr(s),focusable:Su(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(F(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(F(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?I:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:P(t);if(e&&f(t,i)){if(r||a){let t=Ua(r,a);e.addEventListener(xu,t,{once:!0})}ku(e,xu,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:Ir(i),target:i}})}})}return Kn()||(_.add(F(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function Ou(e,t){let{defer:n}=t,r=n?I:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Du(n,t))})),()=>{i.forEach(e=>e?.())}}function ku(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function Au(e,t){return F(M(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var ju=`layer:request-dismiss`,q={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>j(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>j(t,e))},add(e){let t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&Nu(t)}),this.recentlyRemoved.add(e),Wr(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>q.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{Mu(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;Mu(e,t,r);let{zIndex:i}=Cn(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];Fu(e,ju,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),Pu(e,ju,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Mu(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),q.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=q.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function Nu(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.style.removeProperty(`--z-index`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function Pu(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function Fu(e,t,n){e.addEventListener(t,n,{once:!0})}var Iu=new WeakMap,Lu=new WeakMap;function Ru(e){return q.isBelowPointerBlockingLayer(e)?`none`:`auto`}function zu(e){let t=Ru(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function Bu(e){if(Lu.has(e))return;let t=N(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Lu.has(e)&&zu(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Lu.set(e,n)}function Vu(){q.layers.forEach(({node:e})=>{zu(e),Bu(e)})}function Hu(e){let t=Lu.get(e);t&&(t.disconnect(),Lu.delete(e)),e.style.pointerEvents=``}function Uu(e,t){let n=M(e),r=[];return q.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Iu.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=Oi(()=>{let t=e();return A(t)?t:null},{timeout:1e3});t.then(e=>r.push(bi(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{q.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Iu.get(e);t!==void 0&&(e.style.pointerEvents=t,Iu.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Wu(e,t){let{onDismiss:n,onRequestDismiss:r,pointerBlocking:i,exclude:a,debug:o,type:s=`dialog`,layerStyleTargets:c}=t,l={dismiss:n,node:e,type:s,pointerBlocking:i,requestDismiss:r,styleTargets:c};q.add(l),Vu();function u(r){let i=P(r.detail.originalEvent);q.isBelowPointerBlockingLayer(e)||q.isInBranch(i)||(t.onPointerDownOutside?.(r),t.onInteractOutside?.(r),!r.defaultPrevented&&(o&&console.log(`onPointerDownOutside:`,r.detail.originalEvent),n?.()))}function d(e){let r=P(e.detail.originalEvent);q.isInBranch(r)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(o&&console.log(`onFocusOutside:`,e.detail.originalEvent),n?.()))}function f(r){q.isTopMost(e)&&(t.onEscapeKeyDown?.(r),!r.defaultPrevented&&n&&(r.preventDefault(),n()))}function p(n){let r=typeof a==`function`?a():a,i=Array.isArray(r)?r:[r],o=t.persistentElements?.map(e=>e()).filter(A);return o&&i.push(...o),i.some(e=>j(e,n))||q.isInNestedLayer(e,n)}let m=[i?Uu(e,t.persistentElements):void 0,Au(e,f),Ou(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{q.remove(e),Vu(),Hu(e),m.forEach(e=>e?.())}}function Gu(e,t){let{warnOnMissingNode:n=!0}=t;return ki(e,e=>Wu(e,t),{defer:t.defer,onMissing:n?()=>go("[@zag-js/dismissable] node is `null` or `undefined`"):void 0})}function Ku(e,t={}){return ki(e,e=>(q.addBranch(e),()=>{q.removeBranch(e)}),{defer:t.defer,onMissing:()=>go("[@zag-js/dismissable] branch node is `null` or `undefined`")})}var qu=`__live-region__`,Ju=`__live-region-debug__`,Yu=`position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;`;function Xu(e={}){let{level:t=`polite`,document:n=document,root:r,delay:i=0,debug:a=!1}=e,o=n.defaultView??window,s=r??n.body;function c(){if(!a)return;let e=n.getElementById(Ju);return e||(e=n.createElement(`div`),e.id=Ju,e.dataset.liveAnnouncerDebug=`true`,e.setAttribute(`aria-hidden`,`true`),e.style.cssText=Yu,s.appendChild(e),e)}function l(e,r){n.getElementById(qu)?.remove(),r??=i;let a=n.createElement(`span`);a.id=qu,a.dataset.liveAnnouncer=`true`;let l=t===`assertive`?`alert`:`status`;a.setAttribute(`aria-live`,t),a.setAttribute(`role`,l),Object.assign(a.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}),s.appendChild(a),o.setTimeout(()=>{if(!a.isConnected)return;a.textContent=e;let t=c();t&&(t.textContent=e)},r)}function u(){n.getElementById(qu)?.remove(),n.getElementById(Ju)?.remove()}return{announce:l,destroy:u,toJSON(){return qu}}}var{guards:Zu,createMachine:Qu,choose:$u}=Wo(),{and:J,not:ed}=Zu,td=Qu({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:``,closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:`none`,selectionBehavior:e.multiple?`clear`:`replace`,openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){Jr(e)},collection:Es.empty(),...e,positioning:{placement:`bottom`,sameWidth:!0,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open.suggesting`:`closed.idle`},context({prop:e,bindable:t,getContext:n,getEvent:r}){let i=e(`value`)??e(`defaultValue`)??[],a=e(`collection`).findMany(i);return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:wa,hash(e){return e.join(`,`)},onChange(t){let r=n(),i=e(`collection`),a=ws({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:ws({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){let n=e(`collection`).find(t);e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:n})}})),inputValue:t(()=>{let t=e(`inputValue`)||e(`defaultInputValue`),n=e(`value`)||e(`defaultValue`);if(!t.trim()&&!e(`multiple`)){let r=e(`collection`).stringifyMany(n);t=Ga(e(`selectionBehavior`),{preserve:t||r,replace:r,clear:``})}return{defaultValue:t,value:e(`inputValue`),onChange(t){let n=r(),i=(n.previousEvent||n).src;e(`onInputValueChange`)?.({inputValue:t,reason:i})}}}),highlightedItem:t(()=>{let t=e(`highlightedValue`);return{defaultValue:e(`collection`).find(t)}}),selectedItemMap:t(()=>({defaultValue:Ts({selectedItems:a,collection:e(`collection`)})}))}},computed:{isInputValueEmpty:({context:e})=>e.get(`inputValue`).length===0,isInteractive:({prop:e})=>!(e(`readOnly`)||e(`disabled`)),autoComplete:({prop:e})=>e(`inputBehavior`)===`autocomplete`,autoHighlight:({prop:e})=>e(`inputBehavior`)===`autohighlight`,hasSelectedItems:({context:e})=>e.get(`value`).length>0,selectedItems:({context:e,prop:t})=>Ss({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`)),isCustomValue:({context:e,computed:t})=>e.get(`inputValue`)!==t(`valueAsString`)},watch({context:e,prop:t,track:n,action:r,send:i}){n([()=>e.hash(`value`)],()=>{r([`syncSelectedItems`])}),n([()=>e.get(`inputValue`)],()=>{r([`syncInputValue`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`,`autofillInputValue`,`announceHighlightedItem`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>t(`collection`).toString()],()=>{i({type:`CHILDREN_CHANGE`})})},on:{"SELECTED_ITEMS.SYNC":{actions:[`syncSelectedItems`]},"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedValue`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedValue`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setValue`]},"INPUT_VALUE.SET":{actions:[`setInputValue`]},"POSITIONING.SET":{actions:[`reposition`]}},entry:$u([{guard:`autoFocus`,actions:[`setInitialFocus`]}]),states:{closed:{tags:[`closed`],initial:`idle`,states:{idle:{tags:[`idle`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":{target:`open.interacting`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{target:`focused`,actions:[`clearInputValue`,`clearSelectedItems`,`setInitialFocus`]}}},focused:{tags:[`focused`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":[{guard:`isChangeEvent`,target:`open.suggesting`},{target:`open.interacting`}],"INPUT.CHANGE":[{guard:J(`isOpenControlled`,`openOnChange`),actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{guard:`openOnChange`,target:`open.suggesting`,actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{actions:[`setInputValue`]}],"LAYER.INTERACT_OUTSIDE":{target:`idle`},"INPUT.ESCAPE":{guard:J(`isCustomValue`,ed(`allowCustomValue`)),actions:[`revertInputValue`]},"INPUT.BLUR":{target:`idle`},"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_DOWN":[{guard:J(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_UP":[{guard:J(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{actions:[`clearInputValue`,`clearSelectedItems`]}}}}},open:{tags:[`open`,`focused`],entry:[`setInitialFocus`],effects:[`trackFocusVisible`,`scrollToHighlightedItem`,`trackDismissableLayer`,`trackPlacement`,`trackLiveRegion`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`closed.focused`,actions:[`setFinalFocus`]},{target:`closed.idle`}],"INPUT.ENTER":[{guard:J(`isOpenControlled`,`isCustomValue`,ed(`hasHighlightedItem`),ed(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:J(`isCustomValue`,ed(`hasHighlightedItem`),ed(`allowCustomValue`)),target:`closed.focused`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:J(`isOpenControlled`,`closeOnSelect`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectHighlightedItem`]}],"ITEM.CLICK":[{guard:J(`isOpenControlled`,`closeOnSelect`),actions:[`selectItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"LAYER.INTERACT_OUTSIDE":[{guard:J(`isOpenControlled`,`isCustomValue`,ed(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:J(`isCustomValue`,ed(`allowCustomValue`)),target:`closed.idle`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.idle`,actions:[`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}],"VALUE.CLEAR":[{guard:`isOpenControlled`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`]},{target:`closed.focused`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`,`setFinalFocus`]}]},initial:`interacting`,states:{interacting:{on:{CHILDREN_CHANGE:[{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{actions:[`scrollToHighlightedItem`]}],"INPUT.HOME":{actions:[`highlightFirstItem`]},"INPUT.END":{actions:[`highlightLastItem`]},"INPUT.ARROW_DOWN":[{guard:J(`autoComplete`,`isLastItemHighlighted`),actions:[`clearHighlightedValue`,`scrollContentToTop`]},{actions:[`highlightNextItem`]}],"INPUT.ARROW_UP":[{guard:J(`autoComplete`,`isFirstItemHighlighted`),actions:[`clearHighlightedValue`]},{actions:[`highlightPrevItem`]}],"INPUT.CHANGE":[{guard:`autoComplete`,target:`suggesting`,actions:[`setInputValue`]},{target:`suggesting`,actions:[`clearHighlightedValue`,`setInputValue`]}],"ITEM.POINTER_MOVE":{actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]},"LAYER.ESCAPE":[{guard:J(`isOpenControlled`,`autoComplete`),actions:[`syncInputValue`,`invokeOnClose`]},{guard:`autoComplete`,target:`closed.focused`,actions:[`syncInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:J(`isHighlightedItemRemoved`,`hasCollectionItems`,`autoHighlight`),actions:[`clearHighlightedValue`,`highlightFirstItem`]},{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{guard:`autoHighlight`,actions:[`highlightFirstItem`]}],"INPUT.ARROW_DOWN":{target:`interacting`,actions:[`highlightNextItem`]},"INPUT.ARROW_UP":{target:`interacting`,actions:[`highlightPrevItem`]},"INPUT.HOME":{target:`interacting`,actions:[`highlightFirstItem`]},"INPUT.END":{target:`interacting`,actions:[`highlightLastItem`]},"INPUT.CHANGE":{actions:[`setInputValue`]},"LAYER.ESCAPE":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"ITEM.POINTER_MOVE":{target:`interacting`,actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e(`isInputValueEmpty`),autoComplete:({computed:e,prop:t})=>e(`autoComplete`)&&!t(`multiple`),autoHighlight:({computed:e})=>e(`autoHighlight`),isFirstItemHighlighted:({prop:e,context:t})=>e(`collection`).firstValue===t.get(`highlightedValue`),isLastItemHighlighted:({prop:e,context:t})=>e(`collection`).lastValue===t.get(`highlightedValue`),isCustomValue:({computed:e})=>e(`isCustomValue`),allowCustomValue:({prop:e})=>!!e(`allowCustomValue`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,closeOnSelect:({prop:e})=>!!e(`closeOnSelect`),isOpenControlled:({prop:e})=>e(`open`)!=null,openOnChange:({prop:e,context:t})=>{let n=e(`openOnChange`);return Ea(n)?n:!!n?.({inputValue:t.get(`inputValue`)})},restoreFocus:({event:e})=>{let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t},isChangeEvent:({event:e})=>e.previousEvent?.type===`INPUT.CHANGE`,autoFocus:({prop:e})=>!!e(`autoFocus`),isHighlightedItemRemoved:({prop:e,context:t})=>!e(`collection`).has(t.get(`highlightedValue`)),hasCollectionItems:({prop:e})=>e(`collection`).size>0},effects:{trackFocusVisible({scope:e}){return Qi({root:e.getRootNode?.()})},trackDismissableLayer({send:e,prop:t,scope:n}){return t(`disableLayer`)?void 0:Gu(()=>su(n),{type:`listbox`,defer:!0,exclude:()=>[cu(n),du(n),fu(n)],onFocusOutside:t(`onFocusOutside`),onPointerDownOutside:t(`onPointerDownOutside`),onInteractOutside:t(`onInteractOutside`),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:`LAYER.ESCAPE`,src:`escape-key`})},onDismiss(){e({type:`LAYER.INTERACT_OUTSIDE`,src:`interact-outside`,restoreFocus:!1})}})},trackLiveRegion({refs:e,scope:t}){let n=Xu({level:`assertive`,document:t.getDoc()});return e.set(`liveRegion`,n),()=>n.destroy()},trackPlacement({context:e,prop:t,scope:n}){return e.set(`currentPlacement`,t(`positioning`).placement),ql(()=>uu(n)||du(n),()=>lu(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=cu(n),i=[],a=r=>{if(Yi()===`pointer`)return;let a=e.get(`highlightedValue`);if(!a)return;let o=su(n),s=t(`scrollToIndexFn`);if(s){s({index:t(`collection`).indexOf(a),immediate:r,getElement:()=>pu(n,a)});return}let c=pu(n,a),l=I(()=>{hi(c,{rootEl:o,block:`nearest`})});i.push(l)},o=I(()=>{Xi(`virtual`),a(!0)});i.push(o);let s=qr(r,{attributes:[`aria-activedescendant`],callback:()=>a(!1)});return i.push(s),()=>{i.forEach(e=>e())}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){ql(()=>uu(n),()=>lu(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set(`highlightedValue`,t.value)},clearHighlightedValue({context:e}){e.set(`highlightedValue`,null)},selectHighlightedItem(e){let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`highlightedValue`);if(!i||!r.has(i))return;let a=n(`multiple`)?ba(t.get(`value`),i):[i];n(`onSelect`)?.({value:a,itemValue:i}),t.set(`value`,a);let o=Ga(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(a),clear:``});t.set(`inputValue`,o)},scrollToHighlightedItem({context:e,prop:t,scope:n}){Wr(()=>{let r=e.get(`highlightedValue`);if(r==null)return;let i=pu(n,r),a=su(n),o=t(`scrollToIndexFn`);if(o){o({index:t(`collection`).indexOf(r),immediate:!0,getElement:()=>pu(n,r)});return}hi(i,{rootEl:a,block:`nearest`})})},selectItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=i(`multiple`)?ba(t.get(`value`),n.value):[n.value];i(`onSelect`)?.({value:e,itemValue:n.value}),t.set(`value`,e);let r=Ga(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},clearItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=ya(t.get(`value`),n.value);t.set(`value`,e);let r=Ga(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},setInitialFocus({scope:e}){I(()=>{mu(e)})},setFinalFocus({scope:e}){I(()=>{du(e)?.dataset.focusable==null?mu(e):hu(e)})},syncInputValue({context:e,scope:t,event:n}){let r=cu(t);r&&(r.value=e.get(`inputValue`),queueMicrotask(()=>{n.current().type!==`INPUT.CHANGE`&&Gt(r)}))},setInputValue({context:e,event:t}){e.set(`inputValue`,t.value)},clearInputValue({context:e}){e.set(`inputValue`,``)},revertInputValue({context:e,prop:t,computed:n}){let r=Ga(t(`selectionBehavior`),{replace:n(`hasSelectedItems`)?n(`valueAsString`):``,preserve:e.get(`inputValue`),clear:``});e.set(`inputValue`,r)},setValue(e){let{context:t,flush:n,event:r,prop:i}=e;n(()=>{t.set(`value`,r.value);let e=Ga(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(r.value),clear:``});t.set(`inputValue`,e)})},clearSelectedItems(e){let{context:t,flush:n,prop:r}=e;n(()=>{t.set(`value`,[]);let e=Ga(r(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r(`collection`).stringifyMany([]),clear:``});t.set(`inputValue`,e)})},scrollContentToTop({prop:e,scope:t}){let n=e(`scrollToIndexFn`);if(n){let r=e(`collection`).firstValue;n({index:0,immediate:!0,getElement:()=>pu(t,r)})}else{let e=su(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){let r=nd(t);e(`onOpenChange`)?.({open:!0,reason:r,value:n.get(`value`)})},invokeOnClose({prop:e,event:t,context:n}){let r=nd(t);e(`onOpenChange`)?.({open:!1,reason:r,value:n.get(`value`)})},highlightFirstItem({context:e,prop:t,scope:n}){(su(n)?queueMicrotask:I)(()=>{let n=t(`collection`).firstValue;n&&e.set(`highlightedValue`,n)})},highlightFirstItemIfNeeded({computed:e,action:t}){e(`autoHighlight`)&&t([`highlightFirstItem`])},highlightLastItem({context:e,prop:t,scope:n}){(su(n)?queueMicrotask:I)(()=>{let n=t(`collection`).lastValue;n&&e.set(`highlightedValue`,n)})},highlightNextItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getNextValue(r),!n&&t(`loopFocus`)&&(n=i.firstValue)):n=i.firstValue,n&&e.set(`highlightedValue`,n)},highlightPrevItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getPreviousValue(r),!n&&t(`loopFocus`)&&(n=i.lastValue)):n=i.lastValue,n&&e.set(`highlightedValue`,n)},highlightFirstSelectedItem({context:e,prop:t}){I(()=>{let[n]=t(`collection`).sort(e.get(`value`));n&&e.set(`highlightedValue`,n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){I(()=>{let r=null;r=n(`hasSelectedItems`)?t(`collection`).sort(e.get(`value`))[0]:t(`collection`).firstValue,r&&e.set(`highlightedValue`,r)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){I(()=>{let r=t(`collection`),i=null;i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue,i&&e.set(`highlightedValue`,i)})},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:i}){let a=cu(i),o=n(`collection`);if(!t(`autoComplete`)||!a||!r.keypress)return;let s=o.stringify(e.get(`highlightedValue`));I(()=>{a.value=s||e.get(`inputValue`)})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`value`),a=ws({values:i,collection:r,selectedItemMap:t.get(`selectedItemMap`)});t.set(`selectedItemMap`,a.nextSelectedItemMap);let o=Ga(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(i),clear:``});t.set(`inputValue`,o)})},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`).find(e.get(`highlightedValue`));e.set(`highlightedItem`,n)},announceHighlightedItem({context:e,prop:t,refs:n}){if(!Xn())return;let r=e.get(`highlightedValue`),i=r?t(`collection`).stringifyItem(t(`collection`).find(r)):null;if(!i)return;let a=r?e.get(`value`).includes(r):!1;n.get(`liveRegion`)?.announce(a?`${i}, selected`:i)},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}});function nd(e){return(e.previousEvent||e).src}var rd={key:0,class:`k-combobox__req`},id={key:1,class:`k-combobox__error`},ad={key:2,class:`k-combobox__hint`},od={key:0,class:`k-combobox__empty`},sd=E(Object.assign({inheritAttrs:!1},{__name:`KCombobox`,props:{modelValue:{type:[String,Number,null],default:null},options:{type:Array,default:()=>[]},getValue:{type:Function,default:e=>e.value??e.id},getLabel:{type:Function,default:e=>e.label??e.name??``},label:{type:String,default:``},placeholder:{type:String,default:`Начните вводить…`},hint:{type:String,default:``},error:{type:String,default:``},emptyText:{type:String,default:`Ничего не найдено`},name:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}},emits:[`update:modelValue`,`search`],setup(e,{emit:n}){let r=(0,t.useAttrs)(),i=(0,t.computed)(()=>({class:r.class,style:r.style})),a=e,o=n,s=(0,t.computed)(()=>a.options.map(e=>typeof e==`object`&&e?e:{value:e,label:String(e)})),c=e=>String(a.getValue(e)),l=e=>String(a.getLabel(e)),u=(0,t.ref)([]);(0,t.watch)(s,e=>{u.value=e},{immediate:!0});function d(e){let t=(e||``).toLowerCase().trim();u.value=t?s.value.filter(e=>l(e).toLowerCase().includes(t)):s.value}let f=(0,t.computed)(()=>Es({items:u.value,itemToValue:c,itemToString:l}));function p(e){if(e!=null&&e!==``)return s.value.find(t=>c(t)===String(e))}let m=B(td,{id:(0,t.useId)(),positioning:{sameWidth:!0},get collection(){return f.value},get disabled(){return a.disabled},get invalid(){return!!a.error},get required(){return a.required},get name(){return a.name||void 0},get placeholder(){return a.placeholder},get value(){let e=p(a.modelValue);return e?[c(e)]:[]},onOpenChange({open:e}){e||(u.value=s.value)},onInputValueChange({inputValue:e}){d(e),o(`search`,e)},onValueChange({value:e}){let t=p(e[0]);o(`update:modelValue`,t===void 0?null:a.getValue(t))}}),h=(0,t.computed)(()=>_u(m,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-combobox`},{...i.value,...h.value.getRootProps()}),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:0,class:`k-combobox__label`},h.value.getLabelProps()),[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,rd,`*`)):(0,t.createCommentVNode)(``,!0)],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:[`k-combobox__box`,{"k-combobox__box--error":e.error,"k-combobox__box--disabled":e.disabled}]},h.value.getControlProps()),[(0,t.createElementVNode)(`input`,(0,t.mergeProps)({class:`k-combobox__input`},h.value.getInputProps()),null,16),e.clearable&&h.value.hasSelectedItems?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-combobox__clear`,"aria-label":`Очистить`},h.value.getClearTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:14})],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-combobox__trigger`,"aria-label":`Показать список`},h.value.getTriggerProps()),[(0,t.createVNode)(D,{name:`chevron-down`,size:16})],16)],16),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,id,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ad,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.normalizeProps)((0,t.guardReactiveProps)(h.value.getPositionerProps())),[(0,t.createElementVNode)(`ul`,(0,t.mergeProps)({class:`k-combobox__content`},h.value.getContentProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(u.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:c(e),class:`k-combobox__item`},{ref_for:!0},h.value.getItemProps({item:e})),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-combobox__item-text`},{ref_for:!0},h.value.getItemTextProps({item:e})),(0,t.toDisplayString)(l(e)),17),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-combobox__item-check`},{ref_for:!0},h.value.getItemIndicatorProps({item:e})),[(0,t.createVNode)(D,{name:`check`,size:15})],16)],16))),128)),u.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`li`,od,(0,t.toDisplayString)(e.emptyText),1))],16)],16)]))],16))}}),[[`__scopeId`,`data-v-2f435f23`]]),cd=E({__name:`KCountdown`,props:{to:{type:[String,Number,Date],required:!0},warnAt:{type:Number,default:300},dangerAt:{type:Number,default:60},showIcon:{type:Boolean,default:!0},size:{type:String,default:`md`},endedText:{type:String,default:`Завершено`}},setup(e){let n=e,r=(0,t.ref)(Date.now()),i=null;(0,t.onMounted)(()=>{i=setInterval(()=>{r.value=Date.now()},1e3)}),(0,t.onBeforeUnmount)(()=>clearInterval(i));let a=(0,t.computed)(()=>Math.max(0,Math.floor((new Date(n.to).getTime()-r.value)/1e3))),o=(0,t.computed)(()=>a.value<=0),s=(0,t.computed)(()=>o.value?`ended`:a.value<=n.dangerAt?`danger`:a.value<=n.warnAt?`warning`:`normal`),c=(0,t.computed)(()=>{if(o.value)return n.endedText;let e=a.value,t=Math.floor(e/86400),r=Math.floor(e%86400/3600),i=Math.floor(e%3600/60),s=e%60,c=e=>String(e).padStart(2,`0`);return t>0?`${t} д ${c(r)}:${c(i)}:${c(s)}`:`${c(r)}:${c(i)}:${c(s)}`});return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-countdown`,[`k-countdown--${s.value}`,`k-countdown--${e.size}`]])},[e.showIcon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`clock`,size:e.size===`lg`?18:14},null,8,[`size`])):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(c.value),1)],2))}},[[`__scopeId`,`data-v-f2953376`]]),ld={class:`k-desc__label`},ud={class:`k-desc__value`},dd=E({__name:`KDescriptions`,props:{items:{type:Array,default:()=>[]},columns:{type:Number,default:2}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,{class:`k-desc`,style:(0,t.normalizeStyle)({"--k-desc-cols":e.columns})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.key,class:(0,t.normalizeClass)([`k-desc__row`,{"k-desc__row--wide":e.wide}])},[(0,t.createElementVNode)(`dt`,ld,(0,t.toDisplayString)(e.label),1),(0,t.createElementVNode)(`dd`,ud,[(0,t.renderSlot)(n.$slots,`value-${e.key}`,{item:e},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.value??`—`),1)],!0)])],2))),128))],4))}},[[`__scopeId`,`data-v-a1a1403d`]]),fd=O(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),pd=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,md=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,hd=e=>e.ids?.content??`dialog:${e.id}:content`,gd=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`:ja(n)?n(t):n},_d=e=>e.ids?.title??`dialog:${e.id}:title`,vd=e=>e.ids?.description??`dialog:${e.id}:description`,yd=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,bd=e=>e.getById(hd(e)),xd=e=>e.getById(pd(e)),Sd=e=>e.getById(md(e)),Cd=e=>e.getById(gd(e)),wd=e=>e.getById(_d(e)),Td=e=>e.getById(vd(e)),Ed=e=>e.getById(yd(e)),Dd=e=>ai(e.getRootNode(),`[data-scope="dialog"][data-part="trigger"]${tn(e.id)}`),Od=(e,t)=>t==null?Cd(e)??Dd(e)[0]:e.getById(gd(e,t));function kd(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`),l=i.get(`triggerValue`);return{open:c,setOpen(e){n.matches(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},triggerValue:l,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},getTriggerProps(e={}){let{value:n}=e,i=n!=null&&l===n;return t.button({...fd.trigger.attrs,dir:a(`dir`),id:gd(o,n),"data-ownedby":o.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":hd(o),"data-current":k(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})}})},getBackdropProps(){return t.element({...fd.backdrop.attrs,dir:a(`dir`),hidden:!c,id:md(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...fd.positioner.attrs,dir:a(`dir`),id:pd(o),style:co({pointerEvents:!c||!a(`modal`)?`none`:void 0})})},getContentProps(){let e=i.get(`rendered`);return t.element({...fd.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:hd(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":a(`modal`),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:_d(o),"aria-describedby":e.description?vd(o):void 0,style:co({pointerEvents:a(`modal`)?void 0:`auto`})})},getTitleProps(){return t.element({...fd.title.attrs,dir:a(`dir`),id:_d(o)})},getDescriptionProps(){return t.element({...fd.description.attrs,dir:a(`dir`),id:vd(o)})},getCloseTriggerProps(){return t.button({...fd.closeTrigger.attrs,dir:a(`dir`),id:yd(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var Ad=new WeakMap,jd=new WeakMap,Md={},Nd=0,Pd=e=>e&&(e.host||Pd(e.parentNode)),Fd=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Pd(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),Id=new Set([`script`,`output`,`status`,`next-route-announcer`]),Ld=e=>Id.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),Rd=(e,t)=>{let{parentNode:n,markerName:r,controlAttribute:i,explicitBooleanValue:a,followControlledElements:o=!0}=t,s=Fd(n,Array.isArray(e)?e:[e]);Md[r]||(Md[r]=new WeakMap);let c=Md[r],l=[],u=new Set,d=new Set(s),f=e=>{e&&!u.has(e)&&(u.add(e),f(e.parentNode))};s.forEach(e=>{f(e),o&&A(e)&&On(e,e=>{f(e)})});let p=e=>{e&&!d.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(u.has(e))p(e);else try{if(Ld(e))return;let t=e.getAttribute(i),n=a?t===`true`:t!==null&&t!==`false`,o=(Ad.get(e)||0)+1,s=(c.get(e)||0)+1;Ad.set(e,o),c.set(e,s),l.push(e),o===1&&n&&jd.set(e,!0),s===1&&e.setAttribute(r,``),n||e.setAttribute(i,a?`true`:``)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return p(n),u.clear(),Nd++,()=>{l.forEach(e=>{let t=Ad.get(e)-1,n=c.get(e)-1;Ad.set(e,t),c.set(e,n),t||(jd.has(e)||e.removeAttribute(i),jd.delete(e)),n||e.removeAttribute(r)}),Nd--,Nd||(Ad=new WeakMap,Ad=new WeakMap,jd=new WeakMap,Md={})}},zd=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,Bd=(e,t=zd(e),n=`data-aria-hidden`,r=!0)=>{if(t)return Rd(e,{parentNode:t,markerName:n,controlAttribute:`aria-hidden`,explicitBooleanValue:!0,followControlledElements:r})},Vd=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Hd(e,t={}){let{defer:n=!0}=t,r=n?Vd:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(Bd(t))})),()=>{i.forEach(e=>e?.())}}var Ud=Object.defineProperty,Wd=(e,t,n)=>t in e?Ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y=(e,t,n)=>Wd(e,typeof t==`symbol`?t:t+``,n),Gd={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},Kd=[],qd=class{constructor(e,t){Y(this,`trapStack`),Y(this,`config`),Y(this,`doc`),Y(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Y(this,`lastInteractionType`,`keyboard`),Y(this,`portalContainers`,new Set),Y(this,`listenerCleanups`,[]),Y(this,`handleFocus`,e=>{let t=P(e),n=this.findContainerIndex(t,e)>=0;if(n||on(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode){if(Br(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>Br(e)>0))||(n=!1)}else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Y(this,`handlePointerDown`,e=>{this.lastInteractionType=`pointer`;let t=P(e);if(!(this.findContainerIndex(t,e)>=0)){if(Qd(this.config.clickOutsideDeactivates,e)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Qd(this.config.allowOutsideClick,e)||e.preventDefault()}}),Y(this,`handleClick`,e=>{let t=P(e);this.findContainerIndex(t,e)>=0||Qd(this.config.clickOutsideDeactivates,e)||Qd(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),Y(this,`handleTabKey`,e=>{if(this.lastInteractionType=`keyboard`,this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;Yd(e)&&e.preventDefault(),this.tryFocus(n)}}),Y(this,`handleEscapeKey`,e=>{$d(e)&&Qd(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),Y(this,`_mutationObserver`),Y(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)||e.type===`childList`&&e.addedNodes.length>0&&Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return Mn(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?Nn(t):!1}))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Y(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),Y(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!Ir(e)){let t=yn(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),Y(this,`tryFocus`,(e,t)=>{if(e!==!1&&e!==yn(this.doc)){if(!e||!e.focus){this.tryFocus(this.getInitialFocusNode());return}e.focus({preventScroll:!!this.config.preventScroll,...t}),this.state.mostRecentlyFocusedNode=e,tf(e)&&e.select()}}),Y(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Gd.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{ef(()=>{if(a&&this.isSafeToOverrideFocus()){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation),t=this.lastInteractionType===`keyboard`?{focusVisible:!0}:void 0;this.tryFocus(e,t)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),Y(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),Y(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);this.state.paused=!1,t?.();try{this.updateTabbableNodes()}catch{}this.attachListeners();try{this.commitInitialFocus()}catch{}return this.updateObservedNodes(),n?.(),this}),Y(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Y(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||t!==!1&&e}),Y(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),Y(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),Y(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||P(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Ir(r)&&!Rr(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=Br(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else Yd(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Ir(r)&&!Rr(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=Br(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else Yd(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||Kd;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:Xd,isKeyBackward:Zd,...t};this.doc=n.document||M(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{kn(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:i})=>r.contains(e)||n?.includes(r)||i.find(t=>t===e)||this.isControlledElement(r,e)||this.isPersistentElement(e,t))}isControlledElement(e,t){return this.config.followControlledElements?Dn(e,t):!1}isPersistentElement(e,t){let n=this.config.persistentElements;if(!n||n.length===0)return!1;let r=typeof t?.composedPath==`function`?t.composedPath():void 0;return n.some(t=>{let n=t();return j(n,e)||n!=null&&r?.includes(n)})}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=Lr(e,{getShadowRoot:this.config.getShadowRoot}),n=Fr(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e<t.length;e++)if(Br(t[e])>0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e<n.length;e++)if(Rr(n[e]))return n[e]}else for(let e=a-1;e>=0;e--)if(Rr(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}attachListeners(){if(this.state.active)return Gd.activateTrap(this.trapStack,this),this.listenerCleanups.push(F(this.doc,`focusin`,this.handleFocus,!0),F(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),F(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),F(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),F(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),F(this.doc,`keydown`,this.handleEscapeKey)),this}commitInitialFocus(){return this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ef(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this}addListeners(){if(this.state.active)return this.attachListeners(),this.commitInitialFocus(),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}containsElement(e){return this.state.containers.some(t=>j(t,e))}isSafeToOverrideFocus(){let e=yn(this.doc);return!e||e===this.doc.body||this.containsElement(e)?!0:this.trapStack.some(t=>t!==this&&t.containsElement(e))}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=yn(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Jd=e=>e?.type===`keydown`,Yd=e=>Jd(e)&&e?.key===`Tab`,Xd=e=>Jd(e)&&e.key===`Tab`&&!e?.shiftKey,Zd=e=>Jd(e)&&e.key===`Tab`&&e?.shiftKey,Qd=(e,...t)=>typeof e==`function`?e(...t):e,$d=e=>!e.isComposing&&e.key===`Escape`,ef=e=>setTimeout(e,0),tf=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function nf(e,t={}){let n,r=I(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new qd(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:M(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var rf=`data-scroll-lock`,af=new WeakMap;function of(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function sf(e){let t=Cn(e)?.scrollbarGutter;return t===`stable`||t?.startsWith(`stable `)===!0}function cf(e){let{documentElement:t,body:n}=e;return $r(t)?t:n}function lf(e){let t=e.defaultView??window,{documentElement:n,body:r}=e,i=cf(e),a=sf(n)||sf(r),o=t.innerWidth-n.clientWidth;r.setAttribute(rf,``);let s=()=>xi(n,`--scrollbar-width`,`${o}px`),c=of(n),l=[s(),Yn()?(()=>{let{scrollX:e,scrollY:n,visualViewport:i}=t,s=i?.offsetLeft??0,l=i?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(n-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=bi(r,u);return()=>{d?.(),t.scrollTo({left:e,top:n,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),bi(i,e)})()];return()=>{l.forEach(e=>e?.()),r.removeAttribute(rf)}}function uf(e){let t=e??document,n=af.get(t);n||(n={count:0,cleanup:lf(t)},af.set(t,n)),n.count++;let r=n,i=!1;return()=>{i||(i=!0,r.count--,r.count===0&&(r.cleanup(),af.delete(t)))}}var df=R({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>Ed(t):void 0,i=typeof e.modal!=`boolean`||e.modal;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:i&&!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:Od(n,e)})}}))}},watch({track:e,action:t,prop:n}){e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{open:{entry:[`checkRenderedElements`,`setInitialFocus`],effects:[`trackDismissableElement`,`trapFocus`,`preventScroll`,`hideContentBelow`],on:{"CONTROLLED.CLOSE":{target:`closed`},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}},closed:{on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Gu(()=>bd(e),{type:`dialog`,defer:!0,pointerBlocking:n(`modal`),layerStyleTargets:[()=>Sd(e),()=>xd(e)],exclude:[Cd(e),...Dd(e)].filter(Boolean),onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault()},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return uf(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?nf(()=>bd(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:()=>Vr({root:bd(e),getInitialEl:t(`initialFocusEl`)}),setReturnFocus:r=>{let i=t(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let t=Od(e,a);if(t)return t}return Dd(e)[0]||r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?Hd(()=>[bd(e)],{defer:!0}):void 0}},actions:{setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||I(()=>{Vr({root:bd(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},checkRenderedElements({context:e,scope:t}){I(()=>{e.set(`rendered`,{title:!!wd(t),description:!!Td(t)})})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},toggleVisibility({prop:e,send:t,event:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),ff={class:`k-drawer__header`},pf={class:`k-drawer__heading`},mf={class:`k-drawer__tools`},hf={class:`k-drawer__body`},gf={key:0,class:`k-drawer__footer`},_f=E({__name:`KDrawer`,props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:``},subtitle:{type:String,default:``},side:{type:String,default:`right`},size:{type:String,default:`md`},modal:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},closeOnOutside:{type:Boolean,default:!1}},emits:[`update:modelValue`,`close`],setup(e,{emit:n}){let r=e,i=n,a=B(df,{id:(0,t.useId)(),get open(){return r.modelValue},get modal(){return r.modal},get trapFocus(){return r.modal},get preventScroll(){return r.modal},get closeOnInteractOutside(){return r.modal&&r.closeOnOutside&&r.closable},get closeOnEscape(){return r.closable},onOpenChange({open:e}){i(`update:modelValue`,e),e||i(`close`)}}),o=(0,t.computed)(()=>kd(a,z));return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createVNode)(t.Transition,{name:`k-drawer`,duration:220},{default:(0,t.withCtx)(()=>[o.value.open?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`k-drawer`,[`k-drawer--${e.side}`,{"k-drawer--modal":e.modal}]])},[e.modal?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({key:0,class:`k-drawer__backdrop`},o.value.getBackdropProps()),null,16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-drawer__positioner`},o.value.getPositionerProps()),[(0,t.createElementVNode)(`aside`,(0,t.mergeProps)({class:[`k-drawer__panel`,`k-drawer__panel--${e.size}`]},o.value.getContentProps()),[(0,t.createElementVNode)(`header`,ff,[(0,t.createElementVNode)(`div`,pf,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`h2`,(0,t.mergeProps)({class:`k-drawer__title`},o.value.getTitleProps()),(0,t.toDisplayString)(e.title),17),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:0,class:`k-drawer__subtitle`},o.value.getDescriptionProps()),(0,t.toDisplayString)(e.subtitle),17)):(0,t.createCommentVNode)(``,!0)],!0)]),(0,t.createElementVNode)(`div`,mf,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0),e.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-drawer__close`,"aria-label":`Закрыть`},o.value.getCloseTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:18})],16)):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,hf,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,gf,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)],16)],16)],2)):(0,t.createCommentVNode)(``,!0)]),_:3})]))}},[[`__scopeId`,`data-v-719b8b21`]]),X=O(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),vf=e=>e.ids?.anchor??`popover:${e.id}:anchor`,yf=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`popover:${e.id}:trigger:${t}`:`popover:${e.id}:trigger`:ja(n)?n(t):n},bf=e=>e.ids?.content??`popover:${e.id}:content`,xf=e=>e.ids?.positioner??`popover:${e.id}:popper`,Sf=e=>e.ids?.arrow??`popover:${e.id}:arrow`,Cf=e=>e.ids?.title??`popover:${e.id}:title`,wf=e=>e.ids?.description??`popover:${e.id}:desc`,Tf=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,Ef=e=>e.getById(vf(e)),Df=e=>e.getById(yf(e)),Of=e=>ai(e.getRootNode(),`[data-scope="popover"][data-part="trigger"]${tn(e.id)}`),kf=(e,t)=>t==null?Df(e)??Of(e)[0]:e.getById(yf(e,t)),Af=e=>e.getById(bf(e)),jf=e=>e.getById(xf(e)),Mf=e=>e.getById(Cf(e)),Nf=e=>e.getById(wf(e)),Pf={closeTriggerLabel:`close`};function Ff(e,t){let{state:n,context:r,send:i,computed:a,prop:o,scope:s}=e,c=lo(Pf,o(`translations`)),l=n.matches(`open`),u=r.get(`currentPlacement`),d=u?Al(u):void 0,f=a(`currentPortalled`),p=r.get(`renderedElements`),m=r.get(`triggerValue`),h=Yl({...o(`positioning`),placement:u});return{portalled:f,open:l,setOpen(e){n.matches(`open`)!==e&&i({type:e?`OPEN`:`CLOSE`})},triggerValue:m,setTriggerValue(e){i({type:`TRIGGER_VALUE.SET`,value:e})},reposition(e={}){i({type:`POSITIONING.SET`,options:e})},getArrowProps(){return t.element({id:Sf(s),...X.arrow.attrs,dir:o(`dir`),style:h.arrow})},getArrowTipProps(){return t.element({...X.arrowTip.attrs,dir:o(`dir`),style:h.arrowTip})},getAnchorProps(){return t.element({...X.anchor.attrs,dir:o(`dir`),id:vf(s)})},getTriggerProps(e={}){let{value:n}=e,r=n!=null&&m===n;return t.button({...X.trigger.attrs,dir:o(`dir`),type:`button`,"data-placement":u,"data-side":d,id:yf(s,n),"data-ownedby":s.id,"data-value":n,"data-current":k(r),"aria-haspopup":`dialog`,"aria-expanded":n==null?l:l&&r,"data-state":l?`open`:`closed`,"aria-controls":bf(s),onPointerDown(e){sr(e)&&Qn()&&e.currentTarget.focus()},onClick(e){e.defaultPrevented||i({type:l&&n!=null&&!r?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})},onBlur(e){i({type:`TRIGGER_BLUR`,target:e.relatedTarget})}})},getIndicatorProps(){return t.element({...X.indicator.attrs,dir:o(`dir`),"data-state":l?`open`:`closed`})},getPositionerProps(){return t.element({id:xf(s),...X.positioner.attrs,dir:o(`dir`),style:h.floating})},getContentProps(){return t.element({...X.content.attrs,dir:o(`dir`),id:bf(s),tabIndex:-1,role:`dialog`,"aria-modal":Zt(o(`modal`)),hidden:!l,"data-state":l?`open`:`closed`,"data-expanded":k(l),"aria-labelledby":p.title?Cf(s):void 0,"aria-describedby":p.description?wf(s):void 0,"data-placement":u,"data-side":d})},getTitleProps(){return t.element({...X.title.attrs,id:Cf(s),dir:o(`dir`)})},getDescriptionProps(){return t.element({...X.description.attrs,id:wf(s),dir:o(`dir`)})},getCloseTriggerProps(){return t.button({...X.closeTrigger.attrs,dir:o(`dir`),id:Tf(s),type:`button`,"aria-label":c.closeTriggerLabel,onClick(e){e.defaultPrevented||(e.stopPropagation(),i({type:`CLOSE`}))}})}}}var If=R({props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,restoreFocus:!0,...e,positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:kf(n,e)})}}))}},computed:{currentPortalled:({prop:e})=>!!e(`modal`)||!!e(`portalled`)},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`toggleVisibility`])})},entry:[`checkRenderedElements`],on:{"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`,`reposition`]}},states:{closed:{on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}]}},open:{effects:[`trapFocus`,`preventScroll`,`hideContentBelow`,`trackDismissableElement`,`trackPositioning`,`proxyTabFocus`],on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){e.set(`currentPlacement`,t(`positioning`).placement);let r=Ef(n);return ql(()=>r??kf(n,e.get(`triggerValue`)),()=>jf(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){let r=()=>Af(n),i=!0;return Gu(r,{type:`popover`,pointerBlocking:t(`modal`),exclude:[Df(n),...Of(n)].filter(Boolean),defer:!0,onEscapeKeyDown(e){t(`onEscapeKeyDown`)?.(e),!t(`closeOnEscape`)&&e.preventDefault()},onInteractOutside(e){t(`onInteractOutside`)?.(e),!e.defaultPrevented&&(i=!(e.detail.focusable||e.detail.contextmenu),t(`closeOnInteractOutside`)||e.preventDefault())},onPointerDownOutside:t(`onPointerDownOutside`),onFocusOutside:t(`onFocusOutside`),persistentElements:t(`persistentElements`),onRequestDismiss:t(`onRequestDismiss`),onDismiss(){e({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},proxyTabFocus({prop:e,scope:t,context:n}){return e(`modal`)||!e(`portalled`)?void 0:ii(()=>Af(t),{triggerElement:kf(t,n.get(`triggerValue`)),defer:!0,getShadowRoot:!0,onFocus(e){e.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t,context:n}){return e(`modal`)?Hd(()=>[Af(t),kf(t,n.get(`triggerValue`))],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e(`modal`))return uf(t.getDoc())},trapFocus({prop:e,scope:t,context:n}){return e(`modal`)?nf(()=>Af(t),{preventScroll:!0,returnFocusOnDeactivate:!!e(`restoreFocus`),initialFocus:()=>Vr({root:Af(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)}),setReturnFocus:r=>{let i=e(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let e=kf(t,a);if(e)return e}return Of(t)[0]||r},getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){let i=Ef(n);ql(()=>i??kf(n,r.get(`triggerValue`)),()=>jf(n),{...t(`positioning`),...e.options,defer:!0,listeners:!1,onComplete(e){r.set(`currentPlacement`,e.placement)}})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},checkRenderedElements({context:e,scope:t}){I(()=>{Object.assign(e.get(`renderedElements`),{title:!!Mf(t),description:!!Nf(t)})})},setInitialFocus({prop:e,scope:t}){e(`modal`)||I(()=>{Vr({root:Af(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)})?.focus({preventScroll:!0})})},setFinalFocus({event:e,prop:t,scope:n,context:r}){let i=e.restoreFocus??e.previousEvent?.restoreFocus;(i==null||i)&&t(`restoreFocus`)&&I(()=>{let e=t(`finalFocusEl`)?.();if(e){e.focus({preventScroll:!0});return}kf(n,r.get(`triggerValue`))?.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}}),Lf={class:`k-dropdown`},Rf=E({__name:`KDropdown`,props:{modelValue:{type:Boolean,default:void 0},label:{type:String,default:``},icon:{type:String,default:``},iconEnd:{type:String,default:void 0},variant:{type:String,default:`secondary`},size:{type:String,default:`md`},align:{type:String,default:`end`},placement:{type:String,default:``},width:{type:String,default:`13rem`},closeOnSelect:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>r.label?r.icon:r.icon||`more`),o=(0,t.computed)(()=>r.label?r.iconEnd??`chevron-down`:``),s=B(If,{id:(0,t.useId)(),get positioning(){return{placement:r.placement||(r.align===`start`?`bottom-start`:`bottom-end`)}},get open(){return r.modelValue},onOpenChange(e){i(`update:modelValue`,e.open)}}),c=(0,t.computed)(()=>Ff(s,z));function l(){c.value.setOpen(!1)}function u(e){r.closeOnSelect&&e.target.closest(`[data-k-menu-item]`)&&l()}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Lf,[(0,t.renderSlot)(n.$slots,`trigger`,{props:c.value.getTriggerProps(),open:c.value.open},()=>[(0,t.createVNode)(At,(0,t.mergeProps)(c.value.getTriggerProps(),{variant:e.variant,size:e.size,icon:a.value,"icon-end":o.value,disabled:e.disabled}),(0,t.createSlots)({_:2},[e.label?{name:`default`,fn:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)]),key:`0`}:void 0]),1040,[`variant`,`size`,`icon`,`icon-end`,`disabled`])],!0),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.normalizeProps)((0,t.guardReactiveProps)(c.value.getPositionerProps())),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-dropdown__menu`,style:{minWidth:e.width}},c.value.getContentProps(),{onClick:u}),[(0,t.renderSlot)(n.$slots,`default`,{close:l},void 0,!0)],16)],16)]))]))}},[[`__scopeId`,`data-v-fa73f15e`]]),zf={class:`k-empty`},Bf={class:`k-empty__icon`},Vf={class:`k-empty__title`},Hf={key:0,class:`k-empty__desc`},Uf={key:1,class:`k-empty__actions`},Wf=E({__name:`KEmpty`,props:{icon:{type:String,default:`search`},title:{type:String,default:`Ничего не найдено`},description:{type:String,default:``}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,zf,[(0,t.createElementVNode)(`span`,Bf,[(0,t.createVNode)(D,{name:e.icon,size:24},null,8,[`name`])]),(0,t.createElementVNode)(`p`,Vf,(0,t.toDisplayString)(e.title),1),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Hf,(0,t.toDisplayString)(e.description),1)):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Uf,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-f3632906`]]),Z=O(`file-upload`).parts(`root`,`dropzone`,`item`,`itemDeleteTrigger`,`itemGroup`,`itemName`,`itemPreview`,`itemPreviewImage`,`itemSizeText`,`label`,`trigger`,`clearTrigger`).build(),Gf=e=>typeof e.getAsEntry==`function`?e.getAsEntry():typeof e.webkitGetAsEntry==`function`?e.webkitGetAsEntry():null,Kf=e=>e.isDirectory,qf=e=>e.isFile,Jf=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),Yf=(e,t)=>Promise.all(Array.from(e).filter(e=>e.kind===`file`).map(e=>{let n=Gf(e);if(!n)return null;if(Kf(n)&&t)return Xf(n.createReader(),`${n.name}`);if(qf(n)&&typeof e.getAsFile==`function`){let t=e.getAsFile();return Promise.resolve(t?Jf(t,``):null)}if(qf(n))return new Promise(e=>{n.file(t=>{e(Jf(t,``))})})}).filter(e=>e)),Xf=(e,t=``)=>new Promise(n=>{let r=[],i=()=>{e.readEntries(e=>{if(e.length===0){n(Promise.all(r).then(e=>e.flat()));return}let a=e.map(e=>{if(!e)return null;if(Kf(e))return Xf(e.createReader(),`${t}${e.name}`);if(qf(e))return new Promise(n=>{e.file(e=>{n(Jf(e,t))})})}).filter(e=>e);r.push(Promise.all(a)),i()})};i()});function Zf(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||/\w+\/[-+.\w]+/g.test(e)}function Qf(e){return/^.*\.[\w]+$/.test(e)}var $f=e=>Zf(e)||Qf(e);function ep(e){if(e!=null)return typeof e==`string`?e:Array.isArray(e)?e.filter($f).join(`,`):Object.entries(e).reduce((e,[t,n])=>[...e,t,...n],[]).filter($f).join(`,`)}var tp=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,np=e=>e!=null;function rp(e,t,n){if(np(e.size)){if(np(t)&&np(n)){if(e.size>n)return[!1,`FILE_TOO_LARGE`];if(e.size<t)return[!1,`FILE_TOO_SMALL`]}else if(np(t)&&e.size<t)return[!1,`FILE_TOO_SMALL`];else if(np(n)&&e.size>n)return[!1,`FILE_TOO_LARGE`]}return[!0,null]}var ip=new Map(`3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip`.split(`[`).flatMap(e=>{let[t,n]=e.split(`_`);return t.split(`,`).map(e=>[e,n])}));function ap(e){let t=e.split(`.`).pop();return t&&ip.get(t)||null}function op(e,t){if(e&&t){let n=Array.isArray(t)?t:typeof t==`string`?t.split(`,`):[];if(n.length===0)return!0;let r=e.name||``,i=(e.type||ap(r)||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}function sp(e,t){let n=e.type===`application/x-moz-file`||op(e,t);return[n,n?null:`FILE_INVALID_TYPE`]}function cp(e){let t=new Map;return function(n,r){let i=n+(r?Object.entries(r).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(t.has(i))return t.get(i);let a=new e(n,r);return t.set(i,a),a}}var lp=cp(Intl.NumberFormat);function up(e,t,n={}){return lp(t,n).format(e)}var dp=[``,`kilo`,`mega`,`giga`,`tera`],fp=[``,`kilo`,`mega`,`giga`,`tera`,`peta`],pp=(e,t=`en-US`,n={})=>{if(Number.isNaN(e))return``;if(e===0)return`0 B`;let{unitSystem:r=`decimal`,precision:i=3,unit:a=`byte`,unitDisplay:o=`short`}=n,s=r===`binary`?1024:1e3,c=a===`bit`?dp:fp,l=e<0,u=Math.abs(e),d=0;for(;u>=s&&d<c.length-1;)u/=s,d++;let f=parseFloat(u.toPrecision(i));return up(l?-f:f,t,{style:`unit`,unit:c[d]+a,unitDisplay:o})},mp=e=>e.ids?.root??`file:${e.id}`,hp=e=>e.ids?.dropzone??`file:${e.id}:dropzone`,gp=e=>e.ids?.hiddenInput??`file:${e.id}:input`,_p=e=>e.ids?.trigger??`file:${e.id}:trigger`,vp=e=>e.ids?.label??`file:${e.id}:label`,yp=(e,t)=>e.ids?.item?.(t)??`file:${e.id}:item:${t}`,bp=(e,t)=>e.ids?.itemName?.(t)??`file:${e.id}:item-name:${t}`,xp=(e,t)=>e.ids?.itemSizeText?.(t)??`file:${e.id}:item-size:${t}`,Sp=(e,t)=>e.ids?.itemPreview?.(t)??`file:${e.id}:item-preview:${t}`,Cp=(e,t)=>e.ids?.itemDeleteTrigger?.(t)??`file:${e.id}:item-delete:${t}`,wp=e=>Ya(`${e.name}-${e.size}`),Tp=e=>e.getById(mp(e)),Ep=e=>e.getById(gp(e)),Dp=e=>e.getById(hp(e));function Op(e){let t=P(e);return e.dataTransfer?e.dataTransfer.types.some(e=>e===`Files`||e===`application/x-moz-file`):!!t&&`files`in t}function kp(e,t,n){let{prop:r,computed:i}=e;return!i(`multiple`)&&t>1?!1:!i(`multiple`)&&t+n.length===2||!(t+n.length>r(`maxFiles`))}function Ap(e,t,n=[],r=[]){let{prop:i,computed:a}=e,o=[],s=[],c={acceptedFiles:n,rejectedFiles:r};return t.forEach(e=>{let[t,r]=sp(e,a(`acceptAttr`)),[l,u]=rp(e,i(`minFileSize`),i(`maxFileSize`)),d=n.some(t=>tp(t,e))||o.some(t=>tp(t,e)),f=i(`validate`)?.(e,c),p=!f||f.length===0;if(t&&l&&p&&!d)o.push(e);else{let t=[r,u];d&&t.push(`FILE_EXISTS`),p||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}}),kp(e,o.length,n)||(o.forEach(e=>{s.push({file:e,errors:[`TOO_MANY_FILES`]})}),o.splice(0)),{acceptedFiles:o,rejectedFiles:s}}function jp(e,t){let n=N(e);try{if(`DataTransfer`in n){let r=new n.DataTransfer;t.forEach(e=>{r.items.add(e)}),e.files=r.files}}catch{}}var Mp={dropzone:`dropzone`,itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`},Np=`accepted`,Pp=`button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]`;function Fp(e,t){if(!e||e.getAttribute(`type`)===`file`)return!1;let n=e.closest(Pp);return n!=t&&j(t,n)}function Ip(e,t){let{state:n,send:r,prop:i,computed:a,scope:o,context:s}=e,c=!!i(`disabled`),l=!!i(`readOnly`),u=!!i(`required`),d=i(`allowDrop`),f=lo(Mp,i(`translations`)),p=n.matches(`dragging`),m=n.matches(`focused`)&&!c,h=s.get(`acceptedFiles`),g=i(`maxFiles`);return{dragging:p,focused:m,disabled:c,readOnly:l,transforming:s.get(`transforming`),maxFilesReached:h.length>=g,remainingFiles:Math.max(0,g-h.length),openFilePicker(){c||l||r({type:`OPEN`})},deleteFile(e,t=Np){c||l||r({type:`FILE.DELETE`,file:e,itemType:t})},acceptedFiles:h,rejectedFiles:s.get(`rejectedFiles`),setFiles(e){c||l||r({type:`FILES.SET`,files:e,count:e.length})},clearRejectedFiles(){c||l||r({type:`REJECTED_FILES.CLEAR`})},clearFiles(){c||l||r({type:`FILES.CLEAR`})},getFileSize(e){return pp(e.size,i(`locale`))},createFileUrl(e,t){let n=o.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(c||l)return!1;let t=Array.from(e?.items??[]).reduce((e,t)=>{if(t.kind!==`file`)return e;let n=t.getAsFile();return n?[...e,n]:e},[]);return t.length?(r({type:`FILE.SELECT`,files:t}),!0):!1},getRootProps(){return t.element({...Z.root.attrs,dir:i(`dir`),id:mp(o),"data-disabled":k(c),"data-readonly":k(l),"data-dragging":k(p)})},getDropzoneProps(e={}){return t.element({...Z.dropzone.attrs,dir:i(`dir`),id:hp(o),tabIndex:c||l||e.disableClick?void 0:0,role:e.disableClick?`application`:`button`,"aria-label":f.dropzone,"aria-disabled":c||l||void 0,"data-invalid":k(i(`invalid`)),"data-disabled":k(c),"data-readonly":k(l),"data-dragging":k(p),onKeyDown(t){if(c||l||t.defaultPrevented)return;let n=P(t);j(t.currentTarget,n)&&(Fp(n,t.currentTarget)||e.disableClick||(t.key===`Enter`||t.key===` `)&&r({type:`DROPZONE.CLICK`,src:`keydown`}))},onClick(t){if(c||l||t.defaultPrevented||e.disableClick)return;let n=P(t);j(t.currentTarget,n)&&(Fp(n,t.currentTarget)||(t.currentTarget.localName===`label`&&t.preventDefault(),r({type:`DROPZONE.CLICK`})))},onDragOver(e){if(c||l||!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect=`copy`}catch{}if(!Op(e))return;let t=e.dataTransfer.items.length;r({type:`DROPZONE.DRAG_OVER`,count:t})},onDragLeave(e){c||l||d&&(j(e.currentTarget,e.relatedTarget)||r({type:`DROPZONE.DRAG_LEAVE`}))},onDrop(e){c||l||(d&&(e.preventDefault(),e.stopPropagation()),Op(e)&&Yf(e.dataTransfer.items,i(`directory`)).then(e=>{r({type:`DROPZONE.DROP`,files:xa(e)})}))},onFocus(){c||l||r({type:`DROPZONE.FOCUS`})},onBlur(){c||l||r({type:`DROPZONE.BLUR`})}})},getTriggerProps(){return t.button({...Z.trigger.attrs,dir:i(`dir`),id:_p(o),disabled:c||l,"data-disabled":k(c),"data-readonly":k(l),"data-invalid":k(i(`invalid`)),type:`button`,onClick(e){c||l||(j(Dp(o),e.currentTarget)&&e.stopPropagation(),r({type:`OPEN`}))}})},getHiddenInputProps(){return t.input({id:gp(o),tabIndex:-1,disabled:c||l,type:`file`,required:i(`required`),capture:i(`capture`),name:i(`name`),accept:a(`acceptAttr`),webkitdirectory:i(`directory`)?``:void 0,multiple:a(`multiple`)||i(`maxFiles`)>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=``},onInput(e){if(c||l)return;let{files:t}=e.currentTarget;r({type:`FILE.SELECT`,files:t?Array.from(t):[]})},style:Ei})},getItemGroupProps(e={}){let{type:n=Np}=e;return t.element({...Z.itemGroup.attrs,dir:i(`dir`),"data-disabled":k(c),"data-type":n})},getItemProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.item.attrs,dir:i(`dir`),id:yp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemNameProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.itemName.attrs,dir:i(`dir`),id:bp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemSizeTextProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.itemSizeText.attrs,dir:i(`dir`),id:xp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemPreviewProps(e){let{file:n,type:r=Np}=e;return t.element({...Z.itemPreview.attrs,dir:i(`dir`),id:Sp(o,wp(n)),"data-disabled":k(c),"data-type":r})},getItemPreviewImageProps(e){let{file:n,url:r,type:i=Np}=e;if(!n.type.startsWith(`image/`))throw Error(`Preview Image is only supported for image files`);return t.img({...Z.itemPreviewImage.attrs,alt:f.itemPreview?.(n),src:r,"data-disabled":k(c),"data-type":i})},getItemDeleteTriggerProps(e){let{file:n,type:a=Np}=e;return t.button({...Z.itemDeleteTrigger.attrs,dir:i(`dir`),id:Cp(o,wp(n)),type:`button`,disabled:c||l,"data-disabled":k(c),"data-readonly":k(l),"data-type":a,"aria-label":f.deleteFile?.(n),onClick(){c||l||r({type:`FILE.DELETE`,file:n,itemType:a})}})},getLabelProps(){return t.label({...Z.label.attrs,dir:i(`dir`),id:vp(o),htmlFor:gp(o),"data-disabled":k(c),"data-invalid":k(i(`invalid`)),"data-required":k(u)})},getClearTriggerProps(){return t.button({...Z.clearTrigger.attrs,dir:i(`dir`),type:`button`,disabled:c||l,hidden:h.length===0,"data-disabled":k(c),"data-readonly":k(l),onClick(e){e.defaultPrevented||c||l||r({type:`FILES.CLEAR`})}})}}}var Lp=R({props({props:e}){return{minFileSize:0,maxFileSize:1/0,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e(`defaultAcceptedFiles`),value:e(`acceptedFiles`),isEqual:(e,t)=>e.length===t?.length&&e.every((e,n)=>tp(e,t[n])),hash(e){return e.map(e=>`${e.name}-${e.size}`).join(`,`)},onChange(t){let r=n();e(`onFileAccept`)?.({files:t}),e(`onFileChange`)?.({acceptedFiles:t,rejectedFiles:r.get(`rejectedFiles`)})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(e,t)=>e.length===t?.length&&e.every((e,n)=>tp(e.file,t[n].file)),onChange(t){let r=n();e(`onFileReject`)?.({files:t}),e(`onFileChange`)?.({acceptedFiles:r.get(`acceptedFiles`),rejectedFiles:t})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>ep(e(`accept`)),multiple:({prop:e})=>e(`maxFiles`)>1},watch({track:e,context:t,action:n}){e([()=>t.hash(`acceptedFiles`)],()=>{n([`syncInputElement`])})},on:{"FILES.SET":{actions:[`setFiles`]},"FILE.SELECT":{actions:[`setEventFiles`]},"FILE.DELETE":{actions:[`removeFile`]},"FILES.CLEAR":{actions:[`clearFiles`]},"REJECTED_FILES.CLEAR":{actions:[`clearRejectedFiles`]}},effects:[`preventDocumentDrop`],states:{idle:{on:{OPEN:{actions:[`openFilePicker`]},"DROPZONE.CLICK":{actions:[`openFilePicker`]},"DROPZONE.FOCUS":{target:`focused`},"DROPZONE.DRAG_OVER":{target:`dragging`}}},focused:{on:{"DROPZONE.BLUR":{target:`idle`},OPEN:{actions:[`openFilePicker`]},"DROPZONE.CLICK":{actions:[`openFilePicker`]},"DROPZONE.DRAG_OVER":{target:`dragging`}}},dragging:{on:{"DROPZONE.DROP":{target:`idle`,actions:[`setEventFiles`]},"DROPZONE.DRAG_LEAVE":{target:`idle`}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e(`preventDocumentDrop`)||!e(`allowDrop`)||e(`disabled`))return;let n=t.getDoc();return Ua(F(n,`dragover`,e=>{e?.preventDefault()},!1),F(n,`drop`,e=>{j(Tp(t),P(e))||e.preventDefault()},!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{let n=Ep(e);if(!n)return;jp(n,t.get(`acceptedFiles`));let r=e.getWin();n.dispatchEvent(new r.Event(`change`,{bubbles:!0}))})},openFilePicker({scope:e}){I(()=>{Ep(e)?.click()})},setFiles(e){let{computed:t,context:n,event:r}=e,{acceptedFiles:i,rejectedFiles:a}=Ap(e,r.files);n.set(`acceptedFiles`,t(`multiple`)?i:i.length>0?[i[0]]:[]),n.set(`rejectedFiles`,a)},setEventFiles(e){let{computed:t,context:n,event:r,prop:i}=e,a=n.get(`acceptedFiles`),o=n.get(`rejectedFiles`),{acceptedFiles:s,rejectedFiles:c}=Ap(e,r.files,a,o),l=e=>{if(t(`multiple`)){n.set(`acceptedFiles`,t=>[...t,...e]),n.set(`rejectedFiles`,c);return}if(e.length){n.set(`acceptedFiles`,[e[0]]),n.set(`rejectedFiles`,c);return}c.length&&(n.set(`acceptedFiles`,n.get(`acceptedFiles`)),n.set(`rejectedFiles`,c))},u=i(`transformFiles`);u?(n.set(`transforming`,!0),u(s).then(l).catch(e=>{go(`[zag-js/file-upload] error transforming files
|
|
2
|
+
${e}`)}).finally(()=>{n.set(`transforming`,!1)})):l(s)},removeFile({context:e,event:t}){if(t.itemType===`rejected`){let n=e.get(`rejectedFiles`).filter(e=>!tp(e.file,t.file));e.set(`rejectedFiles`,n)}else{let n=e.get(`acceptedFiles`).filter(e=>!tp(e,t.file));e.set(`acceptedFiles`,n)}},clearRejectedFiles({context:e}){e.set(`rejectedFiles`,[])},clearFiles({context:e}){e.set(`acceptedFiles`,[]),e.set(`rejectedFiles`,[])}}}}),Rp={class:`k-upload__label`},zp={key:0,class:`k-upload__hint`},Bp=E({__name:`KFileUpload`,props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:`Перетащите файлы или нажмите для выбора`},hint:{type:String,default:``},accept:{type:String,default:``},multiple:{type:Boolean,default:!0},maxFileSize:{type:Number,default:1/0},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`,`reject`],setup(e,{emit:n}){let r=e,i=n,a=B(Lp,{id:(0,t.useId)(),locale:`ru-RU`,get accept(){return r.accept?r.accept.split(`,`).map(e=>e.trim()).filter(Boolean):void 0},get maxFiles(){return r.multiple?1/0:1},get maxFileSize(){return r.maxFileSize},get disabled(){return r.disabled},get acceptedFiles(){return r.modelValue},onFileChange({acceptedFiles:e,rejectedFiles:t}){i(`update:modelValue`,e),t.length&&i(`reject`,t)}}),o=(0,t.computed)(()=>Ip(a,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-upload`},o.value.getRootProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-upload__zone`},o.value.getDropzoneProps()),[(0,t.createVNode)(D,{name:`upload`,size:20,class:`k-upload__icon`}),(0,t.createElementVNode)(`span`,Rp,(0,t.toDisplayString)(e.label),1),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,zp,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16),(0,t.createElementVNode)(`input`,(0,t.normalizeProps)((0,t.guardReactiveProps)(o.value.getHiddenInputProps())),null,16),o.value.acceptedFiles.length?((0,t.openBlock)(),(0,t.createElementBlock)(`ul`,(0,t.mergeProps)({key:0,class:`k-upload__list`},o.value.getItemGroupProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.value.acceptedFiles,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:`${e.name}-${e.size}-${e.lastModified}`,class:`k-upload__file`},{ref_for:!0},o.value.getItemProps({file:e})),[(0,t.createVNode)(D,{name:`document`,size:16,class:`k-upload__file-icon`}),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-upload__file-name`},{ref_for:!0},o.value.getItemNameProps({file:e})),(0,t.toDisplayString)(e.name),17),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-upload__file-size`},{ref_for:!0},o.value.getItemSizeTextProps({file:e})),(0,t.toDisplayString)(o.value.getFileSize(e)),17),(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-upload__remove`,"aria-label":`Удалить`},{ref_for:!0},o.value.getItemDeleteTriggerProps({file:e})),[(0,t.createVNode)(D,{name:`close`,size:14})],16)],16))),128))],16)):(0,t.createCommentVNode)(``,!0)],16))}},[[`__scopeId`,`data-v-e38c669e`]]),Vp={class:`k-filterbar`},Hp={class:`k-filterbar__row`},Up={key:0,class:`k-filterbar__search`},Wp={class:`k-filterbar__fields`},Gp={key:1,class:`k-filterbar__actions`},Kp={key:0,class:`k-filterbar__chips`},qp=[`onClick`],Jp=E({__name:`KFilterBar`,props:{active:{type:Array,default:()=>[]}},emits:[`remove`,`reset`],setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Vp,[(0,t.createElementVNode)(`div`,Hp,[n.$slots.search?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Up,[(0,t.renderSlot)(n.$slots,`search`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Wp,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Gp,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),e.active.length?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Kp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.active,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:e.key,class:`k-filterbar__chip`},[(0,t.createTextVNode)((0,t.toDisplayString)(e.label)+` `,1),(0,t.createElementVNode)(`button`,{class:`k-filterbar__chip-x`,"aria-label":`Убрать фильтр`,onClick:t=>n.$emit(`remove`,e)},[(0,t.createVNode)(D,{name:`close`,size:12})],8,qp)]))),128)),(0,t.createElementVNode)(`button`,{class:`k-filterbar__reset`,onClick:r[0]||=e=>n.$emit(`reset`)},`Сбросить всё`)])):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-f1d38124`]]),Yp=O(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`).build(),Xp=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`tooltip:${e.id}:trigger:${t}`:`tooltip:${e.id}:trigger`:ja(n)?n(t):n},Zp=e=>e.ids?.content??`tooltip:${e.id}:content`,Qp=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,$p=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,em=e=>e.getById(Xp(e)),tm=e=>e.getById($p(e)),nm=e=>ai(e.getRootNode(),`[data-scope="tooltip"][data-part="trigger"]${tn(e.id)}`),rm=(e,t)=>t==null?em(e)??nm(e)[0]:e.getById(Xp(e,t)),Q=uo({id:null,prevId:null,instant:!1});function im(e,t){let{state:n,context:r,send:i,scope:a,prop:o,event:s}=e,c=o(`id`),l=!!o(`aria-label`),u=n.matches(`open`,`closing`),d=r.get(`triggerValue`),f=r.get(`currentPlacement`),p=f?Al(f):void 0,m=Zp(a),h=o(`disabled`),g=Yl({...o(`positioning`),placement:f});return{open:u,setOpen(e){n.matches(`open`,`closing`)!==e&&i({type:e?`open`:`close`})},triggerValue:d,setTriggerValue(e){i({type:`triggerValue.set`,value:e??void 0})},reposition(e={}){i({type:`positioning.set`,options:e})},getTriggerProps(e={}){let{value:n}=e,r=n!=null&&d===n,s=Xp(a,n);return t.button({...Yp.trigger.attrs,id:s,"data-ownedby":a.id,"data-value":n,"data-current":k(r),dir:o(`dir`),"data-expanded":k(u),"data-state":u?`open`:`closed`,"aria-describedby":u?m:void 0,onClick(e){e.defaultPrevented||h||o(`closeOnClick`)&&i({type:u&&n!=null&&!r?`triggerValue.set`:`close`,src:`trigger.click`,value:n,triggerId:s})},onFocus(e){e.defaultPrevented||h||Zi()&&i({type:u&&n!=null&&!r?`triggerValue.set`:`open`,src:`trigger.focus`,value:n,triggerId:s})},onBlur(e){e.defaultPrevented||h||c===Q.get(`id`)&&((e.relatedTarget??a.getDoc().activeElement)?.closest(tn(a.id))??i({type:`close`,src:`trigger.blur`,value:n,triggerId:s}))},onPointerDown(e){e.defaultPrevented||h||sr(e)&&o(`closeOnPointerDown`)&&c===Q.get(`id`)&&i({type:`close`,src:`trigger.pointerdown`,value:n,triggerId:s})},onPointerMove(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:u&&n!=null&&!r?`triggerValue.set`:`pointer.move`,value:n,triggerId:s})},onPointerOver(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:`pointer.move`,value:n,triggerId:s})},onPointerLeave(){h||i({type:`pointer.leave`})},onPointerCancel(){h||i({type:`pointer.leave`})}})},getArrowProps(){return t.element({id:Qp(a),...Yp.arrow.attrs,dir:o(`dir`),style:g.arrow})},getArrowTipProps(){return t.element({...Yp.arrowTip.attrs,dir:o(`dir`),style:g.arrowTip})},getPositionerProps(){return t.element({id:$p(a),...Yp.positioner.attrs,dir:o(`dir`),style:g.floating})},getContentProps(){let e=Q.get(`id`)===c,n=Q.get(`prevId`)===c,r=Q.get(`instant`)&&(u&&e||n);return t.element({...Yp.content.attrs,dir:o(`dir`),hidden:!u,"data-state":u?`open`:`closed`,"data-instant":k(r),role:l?void 0:`tooltip`,id:l?void 0:m,"data-placement":f,"data-side":p,onPointerEnter(){i({type:`content.pointer.move`})},onPointerLeave(){i({type:`content.pointer.leave`})},style:{pointerEvents:o(`interactive`)?`auto`:`none`}})}}}var{and:am,not:om}=Uo(),sm=R({initialState:({prop:e})=>e(`open`)||e(`defaultOpen`)?`open`:`closed`,props({props:e}){yo(e,[`id`]);let t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:`bottom`,...e.positioning}}},effects:[`trackFocusVisible`,`trackStore`],context:({bindable:e,prop:t,scope:n})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:null})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:rm(n,e)})}}))}),watch({track:e,action:t,prop:n}){e([()=>n(`disabled`)],()=>{t([`closeIfDisabled`])}),e([()=>n(`open`)],()=>{t([`toggleVisibility`])}),e([()=>n(`triggerValue`)],()=>{t([`repositionImmediate`])})},on:{"triggerValue.set":{actions:[`setTriggerValue`,`repositionImmediate`]}},states:{closed:{entry:[`clearGlobalId`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":{actions:[`clearPointerMoveOpened`]},"pointer.move":[{guard:am(`noVisibleTooltip`,om(`hasPointerMoveOpened`)),target:`opening`,actions:[`setTriggerValue`]},{guard:om(`hasPointerMoveOpened`),target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`,`setTriggerValue`]}]}},opening:{effects:[`trackScroll`,`trackPointerlockChange`,`waitForOpenDelay`],on:{"after.openDelay":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"controlled.open":{target:`open`},"controlled.close":{target:`closed`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":[{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`invokeOnClose`]}]}},open:{effects:[`trackEscapeKey`,`trackScroll`,`trackPointerlockChange`,`trackPositioning`],entry:[`setGlobalId`],on:{"controlled.close":{target:`closed`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.leave":[{guard:`isVisible`,target:`closing`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],"content.pointer.leave":{guard:`isInteractive`,target:`closing`},"positioning.set":{actions:[`reposition`]},"triggerValue.set":{target:`closing`,actions:[`setTriggerValue`,`immediateReopen`]}}},closing:{effects:[`trackPositioning`,`waitForCloseDelay`],on:{"after.closeDelay":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"controlled.close":{target:`closed`},"controlled.open":{target:`open`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.move":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`,`toggleVisibility`]},{target:`open`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`]}],"triggerValue.set":{target:`open`,actions:[`setTriggerValue`,`repositionImmediate`]},reopen:{target:`open`},"content.pointer.move":{guard:`isInteractive`,target:`open`},"positioning.set":{actions:[`reposition`]}}}},implementations:{guards:{noVisibleTooltip:()=>Q.get(`id`)===null,isVisible:({prop:e})=>e(`id`)===Q.get(`id`),isInteractive:({prop:e})=>!!e(`interactive`),hasPointerMoveOpened:({context:e})=>!!e.get(`hasPointerMoveOpened`),isOpenControlled:({prop:e})=>e(`open`)!==void 0},actions:{setGlobalId:({prop:e})=>{let t=Q.get(`id`),n=t!==null&&t!==e(`id`);Q.update({id:e(`id`),prevId:n?t:null,instant:n})},clearGlobalId:({prop:e})=>{e(`id`)===Q.get(`id`)&&Q.update({id:null,prevId:null,instant:!1})},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e(`disabled`)&&t({type:`close`,src:`disabled.change`})},reposition:({context:e,event:t,prop:n,scope:r})=>{t.type===`positioning.set`&&ql(()=>rm(r,e.get(`triggerValue`)),()=>tm(r),{...n(`positioning`),...t.options,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},repositionImmediate:({context:e,event:t,prop:n,scope:r})=>{let i=t.value??e.get(`triggerValue`);return ql(()=>rm(r,i),()=>tm(r),{...n(`positioning`),onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e(`open`)?`controlled.open`:`controlled.close`,previousEvent:t})})},setPointerMoveOpened:({context:e,event:t})=>{let n=t.triggerId??t.previousEvent?.triggerId;e.set(`hasPointerMoveOpened`,n??null)},clearPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,null)},setTriggerValue:({context:e,event:t})=>{t.value!==void 0&&e.set(`triggerValue`,t.value)},immediateReopen:({send:e})=>{queueMicrotask(()=>{e({type:`reopen`})})}},effects:{trackFocusVisible:({scope:e})=>Qi({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),ql(()=>rm(n,e.get(`triggerValue`)),()=>tm(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>F(t.getDoc(),`pointerlockchange`,()=>e({type:`close`,src:`pointerlock:change`}),!1),trackScroll:({send:e,prop:t,scope:n,context:r})=>{if(!t(`closeOnScroll`))return;let i=rm(n,r.get(`triggerValue`));if(!i)return;let a=Xr(i).map(t=>F(t,`scroll`,()=>{e({type:`close`,src:`scroll`})},{passive:!0,capture:!0}));return()=>{a.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=Q.subscribe(()=>{Q.get(`id`)!==e(`id`)&&t({type:`close`,src:`id.change`})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t(`closeOnEscape`)?F(document,`keydown`,t=>{ir(t)||t.key===`Escape`&&(t.stopPropagation(),e({type:`close`,src:`keydown.escape`}))},!0):void 0,waitForOpenDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.openDelay`,previousEvent:n})},t(`openDelay`));return()=>clearTimeout(r)},waitForCloseDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.closeDelay`,previousEvent:n})},t(`closeDelay`));return()=>clearTimeout(r)}}}}),cm=E({__name:`KTooltip`,props:{text:{type:String,default:``},placement:{type:String,default:`top`},openDelay:{type:Number,default:300},closeDelay:{type:Number,default:100},disabled:{type:Boolean,default:!1}},setup(e){let n=e,r=B(sm,{id:(0,t.useId)(),get positioning(){return{placement:n.placement}},get openDelay(){return n.openDelay},get closeDelay(){return n.closeDelay},get disabled(){return n.disabled}}),i=(0,t.computed)(()=>im(r,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-tooltip`,tabindex:`0`},i.value.getTriggerProps()),[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)],16),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[i.value.open?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.normalizeProps)((0,t.mergeProps)({key:0},i.value.getPositionerProps())),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-tooltip__bubble`},i.value.getContentProps()),[(0,t.renderSlot)(n.$slots,`content`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.text),1)],!0)],16)],16)):(0,t.createCommentVNode)(``,!0)]))],64))}},[[`__scopeId`,`data-v-e8bb1df5`]]),lm={class:`k-gantt`},um={class:`k-gantt__scroll`},dm={class:`k-gantt__corner`},fm={class:`k-gantt__month`},pm={class:`k-gantt__date`},mm={class:`k-gantt__wd`},hm={key:0,class:`k-gantt__empty`},gm=[`onClick`],_m={class:`k-gantt__group-name`},vm={class:`k-gantt__count`},ym=[`onClick`,`onKeydown`],bm={key:0,class:`k-gantt__code`},xm={class:`k-gantt__title`},Sm={class:`k-gantt__hint`},Cm=E({__name:`KGantt`,props:{items:{type:Array,default:()=>[]},groups:{type:Array,default:()=>[]},from:{type:String,required:!0},to:{type:String,required:!0},today:{type:String,default:()=>new Date(Date.now()-new Date().getTimezoneOffset()*6e4).toISOString().slice(0,10)},weekends:{type:Boolean,default:!1},dayWidth:{type:Number,default:56},labelWidth:{type:String,default:`18rem`},emptyText:{type:String,default:`Нет задач в этом периоде`},selected:{type:[String,Number],default:null}},emits:[`item-click`],setup(e,{emit:n}){let r=e,i=n,a=[`вс`,`пн`,`вт`,`ср`,`чт`,`пт`,`сб`],o=[`янв`,`фев`,`мар`,`апр`,`май`,`июн`,`июл`,`авг`,`сен`,`окт`,`ноя`,`дек`],s=e=>new Date(`${e}T00:00:00Z`),c=(e,t)=>new Date(s(e).getTime()+t*864e5).toISOString().slice(0,10),l=(0,t.computed)(()=>{let e=[];for(let t=r.from;t<=r.to;t=c(t,1)){let n=s(t).getUTCDay(),i=n===0||n===6;(!i||r.weekends)&&e.push({iso:t,wd:n,weekend:i,date:s(t).getUTCDate(),month:s(t).getUTCMonth()})}return e.map((t,n)=>({...t,monthStart:n===0||t.month!==e[n-1].month}))}),u=(0,t.computed)(()=>l.value.findIndex(e=>e.iso===r.today));function d(e,t){let n=e||t,i=t||e;if(!n||i<r.from||n>r.to)return null;let a=l.value,o=a.findIndex(e=>e.iso>=n),s=-1;for(let e=a.length-1;e>=0;e--)if(a[e].iso<=i){s=e;break}return o<0||s<o?null:{first:o,last:s,cutStart:n<r.from,cutEnd:i>r.to}}function f(e){return(e.segments?.length?e.segments:[{start:e.start,end:e.end}]).map(e=>d(e.start,e.end)).filter(Boolean)}let p=(0,t.ref)(new Set);function m(e){let t=new Set(p.value);t.has(e)?t.delete(e):t.add(e),p.value=t}let h=(0,t.computed)(()=>{let e=[];if(!r.groups.length){for(let t of r.items)e.push({type:`item`,key:t.key,item:t,bars:f(t)});return e}for(let t of r.groups){let n=r.items.filter(e=>e.group===t.key),i=n.flatMap(f),a=i.length?{first:Math.min(...i.map(e=>e.first)),last:Math.max(...i.map(e=>e.last))}:null,o=p.value.has(t.key);if(e.push({type:`group`,key:`g:${t.key}`,group:t,items:n,summary:a,collapsed:o}),!o)for(let r of n)e.push({type:`item`,key:`${t.key}:${r.key}`,item:r,bars:f(r)})}return e}),g=(0,t.computed)(()=>({"--k-gantt-day-w":`${r.dayWidth}px`,"--k-gantt-label-w":r.labelWidth,gridTemplateColumns:`var(--k-gantt-label-w) repeat(${l.value.length}, minmax(var(--k-gantt-day-w), 1fr))`})),_=e=>{let t=l.value.length;return{left:`calc(${e.first/t*100}% + 3px)`,width:`calc(${(e.last-e.first+1)/t*100}% - 6px)`}},v=(0,t.computed)(()=>{let e=[];return l.value.forEach((t,n)=>{t.weekend&&e.push({key:`w${n}`,kind:`weekend`,i:n}),n>0&&t.wd===1&&!r.weekends&&e.push({key:`m${n}`,kind:`week`,i:n})}),e});function y(e){i(`item-click`,e)}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,lm,[(0,t.createElementVNode)(`div`,um,[(0,t.createElementVNode)(`div`,{class:`k-gantt__grid`,style:(0,t.normalizeStyle)(g.value)},[(0,t.createElementVNode)(`div`,dm,[(0,t.renderSlot)(n.$slots,`corner`,{},void 0,!0)]),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n.iso,class:(0,t.normalizeClass)([`k-gantt__day`,{"k-gantt__day--today":r===u.value,"k-gantt__day--weekend":n.weekend,"k-gantt__day--week":r>0&&n.wd===1&&!e.weekends}])},[(0,t.createElementVNode)(`span`,fm,(0,t.toDisplayString)(n.monthStart?o[n.month]:``),1),(0,t.createElementVNode)(`span`,pm,(0,t.toDisplayString)(n.date),1),(0,t.createElementVNode)(`span`,mm,(0,t.toDisplayString)(a[n.wd]),1)],2))),128)),h.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,hm,(0,t.toDisplayString)(e.emptyText),1)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:r.key},[r.type===`group`?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`button`,{type:`button`,class:`k-gantt__label k-gantt__label--group`,style:(0,t.normalizeStyle)({gridRow:i+2}),onClick:e=>m(r.group.key)},[(0,t.createVNode)(D,{name:r.collapsed?`chevron-right`:`chevron-down`,size:14,class:`k-gantt__chevron`},null,8,[`name`]),(0,t.createElementVNode)(`span`,_m,[(0,t.renderSlot)(n.$slots,`group`,{group:r.group,items:r.items,collapsed:r.collapsed},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.group.label),1)],!0)]),(0,t.createElementVNode)(`span`,vm,(0,t.toDisplayString)(r.items.length),1)],12,gm),(0,t.createElementVNode)(`div`,{class:`k-gantt__track k-gantt__track--group`,style:(0,t.normalizeStyle)({gridRow:i+2})},[r.summary?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`k-gantt__summary`,style:(0,t.normalizeStyle)(_(r.summary))},null,4)):(0,t.createCommentVNode)(``,!0)],4)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`k-gantt__label k-gantt__label--item`,{"k-gantt__label--muted":r.item.muted,"k-gantt__label--selected":r.item.key===e.selected}]),style:(0,t.normalizeStyle)({gridRow:i+2}),role:`button`,tabindex:`0`,onClick:e=>y(r.item),onKeydown:[(0,t.withKeys)((0,t.withModifiers)(e=>y(r.item),[`prevent`]),[`enter`]),(0,t.withKeys)((0,t.withModifiers)(e=>y(r.item),[`prevent`]),[`space`])]},[(0,t.renderSlot)(n.$slots,`label`,{item:r.item},()=>[r.item.code?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,bm,(0,t.toDisplayString)(r.item.code),1)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,xm,(0,t.toDisplayString)(r.item.label),1)],!0)],46,ym),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`k-gantt__track`,{"k-gantt__track--selected":r.item.key===e.selected}]),style:(0,t.normalizeStyle)({gridRow:i+2})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.bars,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:i,class:`k-gantt__bar-slot`,style:(0,t.normalizeStyle)(_(e))},[(0,t.createVNode)(cm,{disabled:!r.item.hint,placement:`top`},{content:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,Sm,(0,t.toDisplayString)(r.item.hint),1)]),default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(r.item.href?`a`:`button`),{href:r.item.href||void 0,target:r.item.href?`_blank`:void 0,rel:r.item.href?`noopener`:void 0,type:r.item.href?void 0:`button`,class:(0,t.normalizeClass)([`k-gantt__bar`,[`k-gantt__bar--${r.item.tone||`primary`}`,{"k-gantt__bar--muted":r.item.muted,"k-gantt__bar--cut-start":e.cutStart,"k-gantt__bar--cut-end":e.cutEnd}]]),onClick:e=>y(r.item)},{default:(0,t.withCtx)(()=>[i===0?(0,t.renderSlot)(n.$slots,`bar`,{item:r.item},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.item.code||r.item.label),1)],!0,0):(0,t.createCommentVNode)(``,!0)]),_:2},1032,[`href`,`target`,`rel`,`type`,`class`,`onClick`]))]),_:2},1032,[`disabled`])],4))),128))],6)],64))],64))),128)),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:e.key,class:(0,t.normalizeClass)([`k-gantt__mark`,`k-gantt__mark--${e.kind}`]),style:(0,t.normalizeStyle)({gridColumn:e.i+2,gridRow:`2 / ${h.value.length+2}`})},null,6))),128)),u.value>=0&&h.value.length?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,class:`k-gantt__today`,style:(0,t.normalizeStyle)({gridColumn:u.value+2,gridRow:`2 / ${h.value.length+2}`})},null,4)):(0,t.createCommentVNode)(``,!0)],4)])]))}},[[`__scopeId`,`data-v-9c9f41c7`]]),wm={key:0,class:`k-input__label`},Tm={key:0,class:`k-input__req`},Em=[`type`,`value`,`placeholder`,`required`,`disabled`,`readonly`,`aria-invalid`],Dm={key:1,class:`k-input__suffix`},Om={key:1,class:`k-input__error`},km={key:2,class:`k-input__hint`},Am=E(Object.assign({inheritAttrs:!1},{__name:`KInput`,props:{modelValue:{type:[String,Number],default:``},label:{type:String,default:``},placeholder:{type:String,default:``},type:{type:String,default:`text`},hint:{type:String,default:``},error:{type:String,default:``},prefixIcon:{type:String,default:``},suffix:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{type:String,default:`md`},inline:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e){let n=(0,t.useAttrs)(),r=(0,t.computed)(()=>({class:n.class,style:n.style})),i=(0,t.computed)(()=>{let{class:e,style:t,...r}=n;return r});return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:[`k-input`,[`k-input--${e.size}`,{"k-input--inline":e.inline}]]},r.value),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,wm,[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Tm,`*`)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`k-input__box`,{"k-input__box--error":e.error,"k-input__box--disabled":e.disabled}])},[e.prefixIcon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.prefixIcon,size:16,class:`k-input__icon`},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`input`,(0,t.mergeProps)({class:`k-input__field`,type:e.type,value:e.modelValue,placeholder:e.placeholder,required:e.required,disabled:e.disabled,readonly:e.readonly,"aria-invalid":e.error?`true`:null},i.value,{onInput:a[0]||=e=>n.$emit(`update:modelValue`,e.target.value)}),null,16,Em),e.suffix?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Dm,(0,t.toDisplayString)(e.suffix),1)):(0,t.createCommentVNode)(``,!0)],2),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Om,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,km,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-768590a7`]]),jm={class:`k-menu-item__label`},Mm=E({__name:`KMenuItem`,props:{icon:{type:String,default:``},to:{type:[String,Object],default:null},danger:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.to?`router-link`:`button`),{to:e.to,type:e.to?null:`button`,class:(0,t.normalizeClass)([`k-menu-item`,{"k-menu-item--danger":e.danger}]),disabled:e.to?null:e.disabled,role:`menuitem`,"data-k-menu-item":``},{default:(0,t.withCtx)(()=>[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:15},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,jm,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])]),_:3},8,[`to`,`type`,`class`,`disabled`]))}},[[`__scopeId`,`data-v-547b0d2a`]]),Nm={key:0,class:`k-modal__header`},Pm={class:`k-modal__heading`},Fm={class:`k-modal__body`},Im={key:1,class:`k-modal__footer`},Lm=E({__name:`KModal`,props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:``},subtitle:{type:String,default:``},size:{type:String,default:`md`},closable:{type:Boolean,default:!0},closeOnOutside:{type:Boolean,default:!1}},emits:[`update:modelValue`,`close`],setup(e,{emit:n}){let r=e,i=n,a=B(df,{id:(0,t.useId)(),get open(){return r.modelValue},get closeOnInteractOutside(){return r.closeOnOutside&&r.closable},get closeOnEscape(){return r.closable},onOpenChange({open:e}){i(`update:modelValue`,e),e||i(`close`)}}),o=(0,t.computed)(()=>kd(a,z));return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[o.value.open?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-modal__backdrop`},o.value.getBackdropProps()),null,16),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-modal__positioner`},o.value.getPositionerProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:[`k-modal__panel`,`k-modal__panel--${e.size}`]},o.value.getContentProps()),[e.title||n.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,Nm,[(0,t.createElementVNode)(`div`,Pm,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`h2`,(0,t.mergeProps)({class:`k-modal__title`},o.value.getTitleProps()),(0,t.toDisplayString)(e.title),17),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:0,class:`k-modal__subtitle`},o.value.getDescriptionProps()),(0,t.toDisplayString)(e.subtitle),17)):(0,t.createCommentVNode)(``,!0)],!0)]),e.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-modal__close`,"aria-label":`Закрыть`},o.value.getCloseTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:18})],16)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Fm,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Im,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)],16)],16)],64)):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-500f8743`]]),Rm=E({__name:`KMoney`,props:{value:{type:[Number,String],default:0},currency:{type:String,default:`RUB`},fraction:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},tone:{type:String,default:``},size:{type:String,default:`md`}},setup(e){let n=e,r=(0,t.computed)(()=>{let e=Number(n.value);return Number.isFinite(e)?new Intl.NumberFormat(`ru-RU`,{style:`currency`,currency:n.currency,minimumFractionDigits:n.fraction?2:0,maximumFractionDigits:n.fraction?2:0,notation:n.compact?`compact`:`standard`}).format(e):`—`});return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)([`k-money`,[e.tone&&`k-money--${e.tone}`,`k-money--${e.size}`]])},(0,t.toDisplayString)(r.value),3))}},[[`__scopeId`,`data-v-f98ea4aa`]]),zm={key:0,class:`k-page__crumbs`,"aria-label":`Хлебные крошки`},Bm={class:`k-page__header`},Vm={class:`k-page__heading`},Hm={class:`k-page__titles`},Um={class:`k-page__title-row`},Wm={key:0,class:`k-page__subtitle`},Gm={key:0,class:`k-page__actions`},Km=E({__name:`KPage`,props:{title:{type:String,default:``},subtitle:{type:String,default:``},breadcrumbs:{type:Array,default:()=>[]},back:{type:[String,Object],default:null},width:{type:String,default:`wide`}},setup(e){return(n,r)=>{let i=(0,t.resolveComponent)(`router-link`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-page`,`k-page--${e.width}`])},[e.breadcrumbs.length?((0,t.openBlock)(),(0,t.createElementBlock)(`nav`,zm,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.breadcrumbs,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:r},[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(n.to&&r<e.breadcrumbs.length-1?`router-link`:`span`),{to:n.to,class:(0,t.normalizeClass)([`k-page__crumb`,{"k-page__crumb--current":r===e.breadcrumbs.length-1}])},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.label),1)]),_:2},1032,[`to`,`class`])),r<e.breadcrumbs.length-1?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`chevron-right`,size:13,class:`k-page__crumb-sep`})):(0,t.createCommentVNode)(``,!0)],64))),128))])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`header`,Bm,[(0,t.createElementVNode)(`div`,Vm,[e.back?((0,t.openBlock)(),(0,t.createBlock)(i,{key:0,to:e.back,class:`k-page__back`,"aria-label":`Назад`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(D,{name:`back`,size:18})]),_:1},8,[`to`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Hm,[(0,t.createElementVNode)(`div`,Um,[(0,t.renderSlot)(n.$slots,`title`,{},()=>[(0,t.createElementVNode)(`h1`,null,(0,t.toDisplayString)(e.title),1)],!0),(0,t.renderSlot)(n.$slots,`title-extra`,{},void 0,!0)]),e.subtitle?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Wm,(0,t.toDisplayString)(e.subtitle),1)):(0,t.createCommentVNode)(``,!0)])]),n.$slots.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Gm,[(0,t.renderSlot)(n.$slots,`actions`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)],2)}}},[[`__scopeId`,`data-v-ad12f5da`]]),qm=O(`pagination`).parts(`root`,`item`,`ellipsis`,`firstTrigger`,`prevTrigger`,`nextTrigger`,`lastTrigger`).build(),Jm=e=>e.ids?.root??`pagination:${e.id}`,Ym=e=>e.ids?.firstTrigger??`pagination:${e.id}:first`,Xm=e=>e.ids?.prevTrigger??`pagination:${e.id}:prev`,Zm=e=>e.ids?.nextTrigger??`pagination:${e.id}:next`,Qm=e=>e.ids?.lastTrigger??`pagination:${e.id}:last`,$m=(e,t)=>e.ids?.ellipsis?.(t)??`pagination:${e.id}:ellipsis:${t}`,eh=(e,t)=>e.ids?.item?.(t)??`pagination:${e.id}:item:${t}`,th=(e,t)=>{let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)},nh=e=>e.map(e=>ka(e)?{type:`page`,value:e}:{type:`ellipsis`}),rh=`ellipsis`,ih=e=>{let{page:t,totalPages:n,siblingCount:r,boundaryCount:i=1}=e;if(n<=0)return[];if(n===1)return[1];let a=n,o=Math.max(t-r,1),s=Math.min(t+r,a),c=Math.min(r*2+3+i*2,n);if(n<=c)return th(1,a);let l=c-1-i,u=o>1+i+1&&Math.abs(o-1)>i+1,d=s<a-i-1&&Math.abs(a-s)>i+1,f=[];if(!u&&d){let e=th(1,l);f.push(...e,rh),f.push(...th(a-i+1,a))}else if(u&&!d){f.push(...th(1,1+i-1)),f.push(rh);let e=th(a-l+1,a);f.push(...e)}else if(u&&d){f.push(...th(1,1+i-1)),f.push(rh);let e=th(o,s);f.push(...e),f.push(rh),f.push(...th(a-i+1,a))}else f.push(...th(1,a));for(let e=0;e<f.length;e++)if(f[e]===rh){let t=ka(f[e-1])?f[e-1]:0;(ka(f[e+1])?f[e+1]:n+1)-t===2&&(f[e]=t+1)}return f},ah=e=>nh(ih(e)),oh={rootLabel:`pagination`,firstTriggerLabel:`first page`,prevTriggerLabel:`previous page`,nextTriggerLabel:`next page`,lastTriggerLabel:`last page`,itemLabel({page:e,totalPages:t}){return`${t>1&&e===t?`last page, `:``}page ${e}`}};function sh(e,t){let{send:n,scope:r,prop:i,computed:a,context:o}=e,s=a(`totalPages`),c=o.get(`page`),l=o.get(`pageSize`),u=lo(oh,i(`translations`)),d=i(`count`),f=i(`getPageUrl`),p=i(`type`),m=a(`previousPage`),h=a(`nextPage`),g=a(`pageRange`),_=c===1,v=c>=s;return{count:d,page:c,pageSize:l,totalPages:s,pages:ah({page:c,totalPages:s,siblingCount:i(`siblingCount`),boundaryCount:i(`boundaryCount`)}),previousPage:m,nextPage:h,pageRange:g,slice(e){return e.slice(g.start,g.end)},setPageSize(e){n({type:`SET_PAGE_SIZE`,size:e})},setPage(e){n({type:`SET_PAGE`,page:e})},goToNextPage(){n({type:`NEXT_PAGE`})},goToPrevPage(){n({type:`PREVIOUS_PAGE`})},goToFirstPage(){n({type:`FIRST_PAGE`})},goToLastPage(){n({type:`LAST_PAGE`})},getRootProps(){return t.element({id:Jm(r),...qm.root.attrs,dir:i(`dir`),"aria-label":u.rootLabel})},getEllipsisProps(e){return t.element({id:$m(r,e.index),...qm.ellipsis.attrs,dir:i(`dir`)})},getItemProps(e){let a=e.value,o=a===c;return t.element({id:eh(r,a),...qm.item.attrs,dir:i(`dir`),"data-index":a,"data-selected":k(o),"aria-current":o?`page`:void 0,"aria-label":u.itemLabel?.({page:a,totalPages:s}),onClick(){n({type:`SET_PAGE`,page:a})},...p===`button`&&{type:`button`},...p===`link`&&f&&{href:f({page:a,pageSize:l})}})},getPrevTriggerProps(){return t.element({id:Xm(r),...qm.prevTrigger.attrs,dir:i(`dir`),"data-disabled":k(_),"aria-label":u.prevTriggerLabel,onClick(){n({type:`PREVIOUS_PAGE`})},...p===`button`&&{disabled:_,type:`button`},...p===`link`&&f&&m&&{href:f({page:m,pageSize:l})}})},getFirstTriggerProps(){return t.element({id:Ym(r),...qm.firstTrigger.attrs,dir:i(`dir`),"data-disabled":k(_),"aria-label":u.firstTriggerLabel,onClick(){n({type:`FIRST_PAGE`})},...p===`button`&&{disabled:_,type:`button`},...p===`link`&&f&&{href:f({page:1,pageSize:l})}})},getNextTriggerProps(){return t.element({id:Zm(r),...qm.nextTrigger.attrs,dir:i(`dir`),"data-disabled":k(v),"aria-label":u.nextTriggerLabel,onClick(){n({type:`NEXT_PAGE`})},...p===`button`&&{disabled:v,type:`button`},...p===`link`&&f&&h&&{href:f({page:h,pageSize:l})}})},getLastTriggerProps(){return t.element({id:Qm(r),...qm.lastTrigger.attrs,dir:i(`dir`),"data-disabled":k(v),"aria-label":u.lastTriggerLabel,onClick(){n({type:`LAST_PAGE`})},...p===`button`&&{disabled:v,type:`button`},...p===`link`&&f&&{href:f({page:s,pageSize:l})}})}}}var ch=R({props({props:e}){return{defaultPageSize:10,siblingCount:1,boundaryCount:1,defaultPage:1,type:`button`,count:1,...e}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({value:e(`page`),defaultValue:e(`defaultPage`),onChange(t){let r=n();e(`onPageChange`)?.({page:t,pageSize:r.get(`pageSize`)})}})),pageSize:t(()=>({value:e(`pageSize`),defaultValue:e(`defaultPageSize`),onChange(t){e(`onPageSizeChange`)?.({pageSize:t})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get(`pageSize`)],()=>{n([`setPageIfNeeded`])})},computed:{totalPages:bo(({prop:e,context:t})=>[t.get(`pageSize`),e(`count`)],([e,t])=>Math.ceil(t/e)),pageRange:bo(({context:e,prop:t})=>[e.get(`page`),e.get(`pageSize`),t(`count`)],([e,t,n])=>{let r=(e-1)*t;return{start:r,end:Math.min(r+t,n)}}),previousPage:({context:e})=>e.get(`page`)===1?null:e.get(`page`)-1,nextPage:({context:e,computed:t})=>e.get(`page`)===t(`totalPages`)?null:e.get(`page`)+1,isValidPage:({context:e,computed:t})=>e.get(`page`)>=1&&e.get(`page`)<=t(`totalPages`)},on:{SET_PAGE:{guard:`isValidPage`,actions:[`setPage`]},SET_PAGE_SIZE:{actions:[`setPageSize`]},FIRST_PAGE:{actions:[`goToFirstPage`]},LAST_PAGE:{actions:[`goToLastPage`]},PREVIOUS_PAGE:{guard:`canGoToPrevPage`,actions:[`goToPrevPage`]},NEXT_PAGE:{guard:`canGoToNextPage`,actions:[`goToNextPage`]}},states:{idle:{}},implementations:{guards:{isValidPage:({event:e,computed:t})=>e.page>=1&&e.page<=t(`totalPages`),isValidCount:({context:e,event:t})=>e.get(`page`)>t.count,canGoToNextPage:({context:e,computed:t})=>e.get(`page`)<t(`totalPages`),canGoToPrevPage:({context:e})=>e.get(`page`)>1},actions:{setPage({context:e,event:t,computed:n}){let r=lh(t.page,n(`totalPages`));e.set(`page`,r)},setPageSize({context:e,event:t}){e.set(`pageSize`,t.size)},goToFirstPage({context:e}){e.set(`page`,1)},goToLastPage({context:e,computed:t}){e.set(`page`,t(`totalPages`))},goToPrevPage({context:e,computed:t}){e.set(`page`,e=>lh(e-1,t(`totalPages`)))},goToNextPage({context:e,computed:t}){e.set(`page`,e=>lh(e+1,t(`totalPages`)))},setPageIfNeeded({context:e,computed:t}){t(`isValidPage`)||e.set(`page`,1)}}}}),lh=(e,t)=>Math.min(Math.max(e,1),t),uh={key:0,class:`k-pagination__info`},dh={class:`k-pagination__pages`},fh=E({__name:`KPagination`,props:{page:{type:Number,default:1},pageSize:{type:Number,default:20},total:{type:Number,default:0},siblings:{type:Number,default:1},showInfo:{type:Boolean,default:!0},translations:{type:Object,default:()=>({})}},emits:[`update:page`],setup(e,{emit:n}){let r=e,i=n,a=B(ch,{id:(0,t.useId)(),get translations(){return{rootLabel:`Постраничная навигация`,prevTriggerLabel:`Назад`,nextTriggerLabel:`Вперёд`,itemLabel:({page:e})=>`Страница ${e}`,...r.translations}},get count(){return r.total},get pageSize(){return r.pageSize||1},get siblingCount(){return r.siblings},get page(){return r.page},onPageChange({page:e}){e!==r.page&&i(`update:page`,e)}}),o=(0,t.computed)(()=>sh(a,z)),s=(0,t.computed)(()=>r.total?o.value.pageRange.start+1:0),c=(0,t.computed)(()=>o.value.pageRange.end),l=(0,t.computed)(()=>r.translations.rangeLabel?r.translations.rangeLabel({from:s.value,to:c.value,total:r.total}):`${s.value}–${c.value} из ${r.total}`);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`nav`,(0,t.mergeProps)({class:`k-pagination`},o.value.getRootProps()),[e.showInfo?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,uh,(0,t.toDisplayString)(l.value),1)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,dh,[(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-pagination__nav`},o.value.getPrevTriggerProps()),[(0,t.createVNode)(D,{name:`chevron-left`,size:16})],16),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(o.value.pages,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:e.type===`page`?e.value:`ellipsis-${n}`},[e.type===`ellipsis`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-pagination__gap`},{ref_for:!0},o.value.getEllipsisProps({index:n})),`…`,16)):((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:1,class:`k-pagination__page`},{ref_for:!0},o.value.getItemProps(e)),(0,t.toDisplayString)(e.value),17))],64))),128)),(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-pagination__nav`},o.value.getNextTriggerProps()),[(0,t.createVNode)(D,{name:`chevron-right`,size:16})],16)])],16))}},[[`__scopeId`,`data-v-4d7a15dd`]]),ph=O(`progress`).parts(`root`,`label`,`track`,`range`,`valueText`,`view`,`circle`,`circleTrack`,`circleRange`).build(),mh=e=>e.ids?.root??`progress-${e.id}`,hh=e=>e.ids?.track??`progress-${e.id}-track`,gh=e=>e.ids?.label??`progress-${e.id}-label`,_h=e=>e.ids?.circle??`progress-${e.id}-circle`,vh={value:({value:e,percent:t,formatter:n})=>{if(e===null)return`loading...`;if(n){let r=n.resolvedOptions().style===`percent`?t/100:e;return n.format(r)}return e.toString()}};function yh(e,t){let{context:n,computed:r,prop:i,send:a,scope:o}=e,s=r(`percent`),c=r(`isIndeterminate`)?``:r(`formatter`).format(s/100),l=i(`max`),u=i(`min`),d=i(`orientation`),f=lo(vh,i(`translations`)),p=r(`isIndeterminate`),m=n.get(`value`),h=f.value({value:m,max:l,percent:s,min:u,formatter:r(`formatter`)}),g=bh(m,l),_={role:`progressbar`,"aria-label":h,"data-max":l,"aria-valuemin":u,"aria-valuemax":l,"aria-valuenow":m??void 0,"data-orientation":d,"data-state":g},v=Ch(e);return{value:m,valueAsString:h,min:u,max:l,percent:s,percentAsString:c,indeterminate:p,setValue(e){a({type:`VALUE.SET`,value:e})},setToMax(){a({type:`VALUE.SET`,value:l})},setToMin(){a({type:`VALUE.SET`,value:u})},getRootProps(){return t.element({dir:i(`dir`),...ph.root.attrs,id:mh(o),"data-max":l,"data-value":m??void 0,"data-state":g,"data-orientation":d,style:{"--percent":p?void 0:s}})},getLabelProps(){return t.element({dir:i(`dir`),id:gh(o),...ph.label.attrs,"data-orientation":d})},getValueTextProps(){return t.element({dir:i(`dir`),"aria-live":`polite`,...ph.valueText.attrs})},getTrackProps(){return t.element({dir:i(`dir`),id:hh(o),...ph.track.attrs,..._})},getRangeProps(){return t.element({dir:i(`dir`),...ph.range.attrs,"data-orientation":d,"data-state":g,style:{[r(`isHorizontal`)?`width`:`height`]:p?void 0:`${s}%`}})},getCircleProps(){return t.element({dir:i(`dir`),id:_h(o),...ph.circle.attrs,..._,...v.root})},getCircleTrackProps(){return t.element({dir:i(`dir`),"data-orientation":d,...ph.circleTrack.attrs,...v.track})},getCircleRangeProps(){return t.element({dir:i(`dir`),...ph.circleRange.attrs,...v.range,"data-state":g})},getViewProps(e){return t.element({dir:i(`dir`),...ph.view.attrs,"data-state":e.state,hidden:e.state!==g})}}}function bh(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}var xh={style:{"--radius":`calc(var(--size) / 2 - var(--thickness) / 2)`,cx:`calc(var(--size) / 2)`,cy:`calc(var(--size) / 2)`,r:`var(--radius)`,fill:`transparent`,strokeWidth:`var(--thickness)`}},Sh={style:{width:`var(--size)`,height:`var(--size)`}};function Ch(e){let{context:t,computed:n}=e;return{root:Sh,track:xh,range:{opacity:t.get(`value`)===0?0:void 0,style:{...xh.style,"--percent":n(`percent`),"--circumference":`calc(2 * 3.14159 * var(--radius))`,"--offset":`calc(var(--circumference) * (100 - var(--percent)) / 100)`,strokeDashoffset:`calc(var(--circumference) * ((100 - var(--percent)) / 100))`,strokeDasharray:n(`isIndeterminate`)?void 0:`var(--circumference)`,transformOrigin:`center`,transform:`rotate(-90deg)`}}}}var wh=R({props({props:e}){let t=e.min??0,n=e.max??100;return{orientation:`horizontal`,...e,max:n,min:t,defaultValue:e.defaultValue===void 0?Oh(t,n):e.defaultValue,formatOptions:{style:`percent`,...e.formatOptions}}},initialState(){return`idle`},entry:[`validateContext`],context({bindable:e,prop:t}){return{value:e(()=>({defaultValue:t(`defaultValue`),value:t(`value`),onChange(e){t(`onValueChange`)?.({value:e})}}))}},computed:{isIndeterminate:({context:e})=>e.get(`value`)===null,percent({context:e,prop:t}){let n=e.get(`value`);return ka(n)?oo(n,t(`min`),t(`max`))*100:-1},formatter:bo(({prop:e})=>[e(`locale`),e(`formatOptions`)],([e,t])=>new Intl.NumberFormat(e,t)),isHorizontal:({prop:e})=>e(`orientation`)===`horizontal`},states:{idle:{on:{"VALUE.SET":{actions:[`setValue`]}}}},implementations:{actions:{setValue:({context:e,event:t,prop:n})=>{let r=t.value===null?null:Math.max(0,Math.min(t.value,n(`max`)));e.set(`value`,r)},validateContext:({context:e,prop:t})=>{let n=t(`max`),r=t(`min`),i=e.get(`value`);if(i!=null){if(!Th(n))throw Error(`[progress] The max value passed \`${n}\` is not a valid number`);if(!Eh(i,n))throw Error(`[progress] The value passed \`${i}\` exceeds the max value \`${n}\``);if(!Dh(i,r))throw Error(`[progress] The value passed \`${i}\` exceeds the min value \`${r}\``)}}}}}),Th=e=>ka(e)&&!isNaN(e),Eh=(e,t)=>Th(e)&&e<=t,Dh=(e,t)=>Th(e)&&e>=t,Oh=(e,t)=>e+(t-e)/2,kh={key:0,class:`k-progress__head`},Ah=E({__name:`KProgress`,props:{value:{type:Number,default:0},max:{type:Number,default:100},label:{type:String,default:``},tone:{type:String,default:`primary`},showValue:{type:Boolean,default:!1}},setup(e){let n=e,r=B(wh,{id:(0,t.useId)(),min:0,locale:`ru-RU`,get value(){return n.value},get max(){return n.max}}),i=(0,t.computed)(()=>yh(r,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-progress`},i.value.getRootProps()),[e.label||e.showValue?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,kh,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-progress__label`},i.value.getLabelProps()),(0,t.toDisplayString)(e.label),17),e.showValue?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-progress__value`},i.value.getValueTextProps()),(0,t.toDisplayString)(i.value.percentAsString),17)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-progress__track`},i.value.getTrackProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:[`k-progress__bar`,`k-progress__bar--${e.tone}`]},i.value.getRangeProps()),null,16)],16)],16))}},[[`__scopeId`,`data-v-7e309874`]]),jh=O(`radio-group`).parts(`root`,`label`,`item`,`itemText`,`itemControl`,`indicator`).build(),Mh=e=>e.ids?.root??`radio-group:${e.id}`,Nh=e=>e.ids?.label??`radio-group:${e.id}:label`,Ph=(e,t)=>e.ids?.item?.(t)??`radio-group:${e.id}:radio:${t}`,Fh=(e,t)=>e.ids?.itemHiddenInput?.(t)??`radio-group:${e.id}:radio:input:${t}`,Ih=(e,t)=>e.ids?.itemControl?.(t)??`radio-group:${e.id}:radio:control:${t}`,Lh=(e,t)=>e.ids?.itemLabel?.(t)??`radio-group:${e.id}:radio:label:${t}`,Rh=e=>e.ids?.indicator??`radio-group:${e.id}:indicator`,zh=e=>e.getById(Mh(e)),Bh=(e,t)=>e.getById(Fh(e,t)),Vh=e=>e.getById(Rh(e)),Hh=e=>zh(e)?.querySelector(`input:not(:disabled)`),Uh=e=>zh(e)?.querySelector(`input:not(:disabled):checked`),Wh=e=>{let t=`input[type=radio]${tn(Mh(e))}:not([disabled])`;return ai(zh(e),t)},Gh=(e,t)=>{if(t)return e.getById(Ph(e,t))},Kh=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function qh(e,t){let{context:n,send:r,computed:i,prop:a,scope:o}=e,s=i(`isDisabled`),c=a(`invalid`),l=a(`readOnly`);function u(e){return{value:e.value,invalid:!!e.invalid||!!c,disabled:!!e.disabled||s,checked:n.get(`value`)===e.value,focused:n.get(`focusedValue`)===e.value,focusVisible:n.get(`focusVisibleValue`)===e.value,hovered:n.get(`hoveredValue`)===e.value,active:n.get(`activeValue`)===e.value}}function d(e){let t=u(e);return{"data-focus":k(t.focused),"data-focus-visible":k(t.focusVisible),"data-disabled":k(t.disabled),"data-readonly":k(l),"data-state":t.checked?`checked`:`unchecked`,"data-hover":k(t.hovered),"data-invalid":k(t.invalid),"data-orientation":a(`orientation`),"data-ssr":k(n.get(`ssr`))}}let f=()=>{(Uh(o)??Hh(o))?.focus()};return{focus:f,value:n.get(`value`),setValue(e){r({type:`SET_VALUE`,value:e,isTrusted:!1})},clearValue(){r({type:`SET_VALUE`,value:null,isTrusted:!1})},getRootProps(){return t.element({...jh.root.attrs,role:`radiogroup`,id:Mh(o),"aria-labelledby":Nh(o),"aria-required":a(`required`)||void 0,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"data-orientation":a(`orientation`),"data-disabled":k(s),"data-invalid":k(c),"data-required":k(a(`required`)),"aria-orientation":a(`orientation`),dir:a(`dir`),style:{position:`relative`}})},getLabelProps(){return t.element({...jh.label.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),"data-disabled":k(s),"data-invalid":k(c),"data-required":k(a(`required`)),id:Nh(o),onClick:f})},getItemState:u,getItemProps(e){let n=u(e);return t.label({...jh.item.attrs,dir:a(`dir`),id:Ph(o,e.value),htmlFor:Fh(o,e.value),...d(e),onPointerMove(){n.disabled||n.hovered||r({type:`SET_HOVERED`,value:e.value,hovered:!0})},onPointerLeave(){n.disabled||r({type:`SET_HOVERED`,value:null})},onPointerDown(t){n.disabled||sr(t)&&(n.focused&&t.pointerType===`mouse`&&t.preventDefault(),r({type:`SET_ACTIVE`,value:e.value,active:!0}))},onPointerUp(){n.disabled||r({type:`SET_ACTIVE`,value:null})},onClick(){!n.disabled&&Qn()&&Bh(o,e.value)?.focus()}})},getItemTextProps(e){return t.element({...jh.itemText.attrs,dir:a(`dir`),id:Lh(o,e.value),...d(e)})},getItemControlProps(e){let n=u(e);return t.element({...jh.itemControl.attrs,dir:a(`dir`),id:Ih(o,e.value),"data-active":k(n.active),"aria-hidden":!0,...d(e)})},getItemHiddenInputProps(e){let n=u(e);return t.input({"data-ownedby":Mh(o),id:Fh(o,e.value),type:`radio`,name:a(`name`)||a(`id`),form:a(`form`),value:e.value,required:a(`required`),"aria-labelledby":Lh(o,e.value),"aria-invalid":n.invalid||void 0,onClick(t){if(l){t.preventDefault();return}t.currentTarget.checked&&r({type:`SET_VALUE`,value:e.value,isTrusted:!0})},onBlur(){r({type:`SET_FOCUSED`,value:null,focused:!1,focusVisible:!1})},onFocus(){let t=Zi();r({type:`SET_FOCUSED`,value:e.value,focused:!0,focusVisible:t})},onKeyDown(t){t.defaultPrevented||t.key===` `&&r({type:`SET_ACTIVE`,value:e.value,active:!0})},onKeyUp(e){e.defaultPrevented||e.key===` `&&r({type:`SET_ACTIVE`,value:null})},disabled:n.disabled||l,defaultChecked:n.checked,style:Ei})},getIndicatorProps(){let e=n.get(`indicatorRect`),i=n.get(`animateIndicator`);return t.element({id:Rh(o),...jh.indicator.attrs,dir:a(`dir`),hidden:n.get(`value`)==null||Jh(e),"data-disabled":k(s),"data-orientation":a(`orientation`),onTransitionEnd(e){P(e)===e.currentTarget&&r({type:`INDICATOR_TRANSITION_END`})},style:{"--transition-property":`left, top, width, height`,"--left":so(e?.x),"--top":so(e?.y),"--width":so(e?.width),"--height":so(e?.height),position:`absolute`,willChange:i?`var(--transition-property)`:`auto`,transitionProperty:i?`var(--transition-property)`:`none`,transitionDuration:i?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[a(`orientation`)===`horizontal`?`left`:`top`]:a(`orientation`)===`horizontal`?`var(--left)`:`var(--top)`}})}}}var Jh=e=>e==null||e.width===0&&e.height===0&&e.x===0&&e.y===0,{not:Yh}=Uo(),Xh=R({props({props:e}){return{orientation:`vertical`,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null,prevValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`)},entry:[`syncPrevValue`,`syncIndicatorRect`,`syncSsr`],exit:[`cleanupObserver`],effects:[`trackFormControlState`,`trackFocusVisible`],watch({track:e,action:t,context:n}){e([()=>n.get(`value`)],()=>{t([`syncIndicatorAnimation`,`syncIndicatorRect`,`syncInputElements`])})},on:{SET_VALUE:[{guard:Yh(`isTrusted`),actions:[`setValue`,`dispatchChangeEvent`]},{actions:[`setValue`]}],SET_HOVERED:{actions:[`setHovered`]},SET_ACTIVE:{actions:[`setActive`]},SET_FOCUSED:{actions:[`setFocused`]},INDICATOR_TRANSITION_END:{actions:[`clearIndicatorAnimation`]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return xr(zh(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackFocusVisible({scope:e}){return Qi({root:e.getRootNode?.()})}},actions:{setValue({context:e,event:t}){e.set(`value`,t.value)},setHovered({context:e,event:t}){e.set(`hoveredValue`,t.value)},setActive({context:e,event:t}){e.set(`activeValue`,t.value)},setFocused({context:e,event:t}){e.set(`focusedValue`,t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set(`focusVisibleValue`,n)},syncPrevValue({context:e,refs:t}){t.set(`prevValue`,e.get(`value`))},syncIndicatorAnimation({context:e,refs:t}){let n=t.get(`prevValue`),r=e.get(`value`),i=n!=null&&r!=null&&n!==r;e.set(`animateIndicator`,i),t.set(`prevValue`,r)},clearIndicatorAnimation({context:e}){e.set(`animateIndicator`,!1)},syncInputElements({context:e,scope:t}){Wh(t).forEach(t=>{t.checked=t.value===e.get(`value`)})},cleanupObserver({refs:e}){e.get(`indicatorCleanup`)?.()},syncSsr({context:e}){e.set(`ssr`,!1)},syncIndicatorRect({context:e,scope:t,refs:n}){if(n.get(`indicatorCleanup`)?.(),!Vh(t))return;let r=e.get(`value`),i=Gh(t,r);if(r==null||!i){e.set(`indicatorRect`,null);return}let a=()=>{e.set(`indicatorRect`,Kh(i))};a();let o=pi.observe(i,a);n.set(`indicatorCleanup`,o)},dispatchChangeEvent({context:e,scope:t}){Wh(t).forEach(t=>{let n=t.value===e.get(`value`);n!==t.checked&&_r(t,{checked:n})})}}}}),Zh={class:`k-radio__body`},Qh={key:0,class:`k-radio__hint`},$h=E({__name:`KRadioGroup`,props:{modelValue:{type:[String,Number,Boolean,null],default:null},options:{type:Array,default:()=>[]},label:{type:String,default:``},name:{type:String,default:``},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.computed)(()=>r.options.map(e=>typeof e==`object`&&e?e:{value:e,label:String(e)})),o=B(Xh,{id:(0,t.useId)(),get value(){return r.modelValue==null?null:String(r.modelValue)},get disabled(){return r.disabled},get name(){return r.name||void 0},get orientation(){return r.inline?`horizontal`:`vertical`},onValueChange({value:e}){let t=a.value.find(t=>String(t.value)===e);i(`update:modelValue`,t?t.value:e)}}),s=(0,t.computed)(()=>qh(o,z)),c=e=>({value:String(e.value),disabled:e.disabled});return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-radio`},s.value.getRootProps()),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-radio__legend`},s.value.getLabelProps()),(0,t.toDisplayString)(e.label),17)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`k-radio__items`,{"k-radio__items--inline":e.inline}])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:e.value,class:`k-radio__item`},{ref_for:!0},s.value.getItemProps(c(e))),[(0,t.createElementVNode)(`input`,(0,t.mergeProps)({ref_for:!0},s.value.getItemHiddenInputProps(c(e))),null,16),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-radio__control`},{ref_for:!0},s.value.getItemControlProps(c(e))),null,16),(0,t.createElementVNode)(`span`,Zh,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-radio__label`},{ref_for:!0},s.value.getItemTextProps(c(e))),(0,t.toDisplayString)(e.label),17),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Qh,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])],16))),128))],2)],16))}},[[`__scopeId`,`data-v-98047f64`]]),eg=[`title`],tg=E({__name:`KSegmented`,props:{modelValue:{type:[String,Number],default:``},options:{type:Array,default:()=>[]},size:{type:String,default:`md`},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=B(Xh,{id:(0,t.useId)(),orientation:`horizontal`,get value(){return r.modelValue===``||r.modelValue==null?null:String(r.modelValue)},get disabled(){return r.disabled},onValueChange({value:e}){let t=r.options.find(t=>String(t.value)===e);i(`update:modelValue`,t?t.value:e)}}),o=(0,t.computed)(()=>qh(a,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:[`k-segmented`,`k-segmented--${e.size}`]},o.value.getRootProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.options,n=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:n.value,class:`k-segmented__item`,title:n.title},{ref_for:!0},o.value.getItemProps({value:String(n.value)})),[(0,t.createElementVNode)(`input`,(0,t.mergeProps)({ref_for:!0},o.value.getItemHiddenInputProps({value:String(n.value)})),null,16),n.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:n.icon,size:e.size===`sm`?14:16},null,8,[`name`,`size`])):(0,t.createCommentVNode)(``,!0),n.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:1,ref_for:!0},o.value.getItemTextProps({value:String(n.value)})),(0,t.toDisplayString)(n.label),17)):(0,t.createCommentVNode)(``,!0)],16,eg))),128))],16))}},[[`__scopeId`,`data-v-06f6c695`]]),$=O(`select`).parts(`label`,`positioner`,`trigger`,`indicator`,`clearTrigger`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`list`,`content`,`root`,`control`,`valueText`).build(),ng=e=>new vs(e);ng.empty=()=>new vs({items:[]});var rg=e=>e.ids?.root??`select:${e.id}`,ig=e=>e.ids?.content??`select:${e.id}:content`,ag=e=>e.ids?.trigger??`select:${e.id}:trigger`,og=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,sg=e=>e.ids?.label??`select:${e.id}:label`,cg=e=>e.ids?.control??`select:${e.id}:control`,lg=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,ug=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,dg=e=>e.ids?.positioner??`select:${e.id}:positioner`,fg=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,pg=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,mg=e=>e.getById(ug(e)),hg=e=>e.getById(ig(e)),gg=e=>e.getById(ag(e)),_g=e=>e.getById(og(e)),vg=e=>e.getById(dg(e)),yg=(e,t)=>t==null?null:e.getById(lg(e,t)),bg={clearTriggerLabel:`Clear value`};function xg(e,t){let{context:n,prop:r,scope:i,state:a,computed:o,send:s}=e,c=lo(bg,r(`translations`)),l=r(`disabled`)||n.get(`fieldsetDisabled`),u=!!r(`invalid`),d=!!r(`required`),f=!!r(`readOnly`),p=r(`composite`),m=r(`collection`),h=a.hasTag(`open`),g=a.matches(`focused`),_=n.get(`highlightedValue`),v=n.get(`highlightedItem`),y=o(`selectedItems`),b=n.get(`currentPlacement`),x=b?Al(b):void 0,S=o(`isTypingAhead`),C=o(`isInteractive`),w=_?lg(i,_):void 0;function T(e){let t=m.getItemDisabled(e.item),r=m.getItemValue(e.item);return vo(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(l||t),highlighted:_===r,selected:n.get(`value`).includes(r)}}let ee=Yl({...r(`positioning`),placement:b});return{open:h,focused:g,empty:n.get(`value`).length===0,highlightedItem:v,highlightedValue:_,selectedItems:y,hasSelectedItems:o(`hasSelectedItems`),value:n.get(`value`),valueAsString:o(`valueAsString`),collection:m,multiple:!!r(`multiple`),disabled:!!l,reposition(e={}){s({type:`POSITIONING.SET`,options:e})},focus(){gg(i)?.focus({preventScroll:!0})},setOpen(e){a.hasTag(`open`)!==e&&s({type:e?`OPEN`:`CLOSE`})},selectValue(e){s({type:`ITEM.SELECT`,value:e})},setValue(e){s({type:`VALUE.SET`,value:e})},selectAll(){s({type:`VALUE.SET`,value:m.getValues()})},setHighlightValue(e){s({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){s({type:`HIGHLIGHTED_VALUE.CLEAR`})},clearValue(e){s(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:T,getRootProps(){return t.element({...$.root.attrs,dir:r(`dir`),id:rg(i),"data-invalid":k(u),"data-readonly":k(f)})},getLabelProps(){return t.label({dir:r(`dir`),id:sg(i),...$.label.attrs,"data-disabled":k(l),"data-invalid":k(u),"data-readonly":k(f),"data-required":k(d),htmlFor:ug(i),onClick(e){e.defaultPrevented||l||gg(i)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...$.control.attrs,dir:r(`dir`),id:cg(i),"data-state":h?`open`:`closed`,"data-focus":k(g),"data-disabled":k(l),"data-invalid":k(u)})},getValueTextProps(){return t.element({...$.valueText.attrs,dir:r(`dir`),"data-disabled":k(l),"data-invalid":k(u),"data-focus":k(g)})},getTriggerProps(){return t.button({id:ag(i),disabled:l,dir:r(`dir`),type:`button`,role:`combobox`,"aria-controls":ig(i),"aria-expanded":h,"aria-haspopup":`listbox`,"data-state":h?`open`:`closed`,"aria-invalid":u,"aria-required":d,"aria-labelledby":sg(i),...$.trigger.attrs,"data-disabled":k(l),"data-invalid":k(u),"data-readonly":k(f),"data-placement":b,"data-side":x,"data-placeholder-shown":k(!o(`hasSelectedItems`)),onClick(e){C&&(e.defaultPrevented||s({type:`TRIGGER.CLICK`}))},onFocus(){s({type:`TRIGGER.FOCUS`})},onBlur(){s({type:`TRIGGER.BLUR`})},onKeyDown(e){if(e.defaultPrevented||!C)return;let t={ArrowUp(){s({type:`TRIGGER.ARROW_UP`})},ArrowDown(e){s({type:e.altKey?`OPEN`:`TRIGGER.ARROW_DOWN`})},ArrowLeft(){s({type:`TRIGGER.ARROW_LEFT`})},ArrowRight(){s({type:`TRIGGER.ARROW_RIGHT`})},Home(){s({type:`TRIGGER.HOME`})},End(){s({type:`TRIGGER.END`})},Enter(){s({type:`TRIGGER.ENTER`})},Space(e){s(S?{type:`TRIGGER.TYPEAHEAD`,key:e.key}:{type:`TRIGGER.ENTER`})}}[fr(e,{dir:r(`dir`),orientation:`vertical`})];if(t){t(e),e.preventDefault();return}wi.isValidEvent(e)&&(s({type:`TRIGGER.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getIndicatorProps(){return t.element({...$.indicator.attrs,dir:r(`dir`),"aria-hidden":!0,"data-state":h?`open`:`closed`,"data-disabled":k(l),"data-invalid":k(u),"data-readonly":k(f)})},getItemProps(e){let n=T(e);return t.element({id:lg(i,n.value),role:`option`,...$.item.attrs,dir:r(`dir`),"data-value":n.value,"aria-selected":n.selected,"data-state":n.selected?`checked`:`unchecked`,"data-highlighted":k(n.highlighted),"data-disabled":k(n.disabled),"aria-disabled":Zt(n.disabled),onPointerMove(e){n.disabled||e.pointerType!==`mouse`||Yi()===`pointer`&&n.value!==_&&s({type:`ITEM.POINTER_MOVE`,value:n.value})},onClick(e){e.defaultPrevented||n.disabled||s({type:`ITEM.CLICK`,src:`pointerup`,value:n.value})},onPointerLeave(t){n.disabled||e.persistFocus||t.pointerType===`mouse`&&Yi()===`pointer`&&s({type:`ITEM.POINTER_LEAVE`})}})},getItemTextProps(e){let n=T(e);return t.element({...$.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":k(n.disabled),"data-highlighted":k(n.highlighted)})},getItemIndicatorProps(e){let n=T(e);return t.element({"aria-hidden":!0,...$.itemIndicator.attrs,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...$.itemGroupLabel.attrs,id:pg(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...$.itemGroup.attrs,"data-disabled":k(l),id:fg(i,n),"aria-labelledby":pg(i,n),role:`group`,dir:r(`dir`)})},getClearTriggerProps(){return t.button({...$.clearTrigger.attrs,id:og(i),type:`button`,"aria-label":c.clearTriggerLabel,"data-invalid":k(u),disabled:l,hidden:!o(`hasSelectedItems`),dir:r(`dir`),onClick(e){e.defaultPrevented||s({type:`CLEAR.CLICK`})}})},getHiddenSelectProps(){let e=n.get(`value`),a=r(`multiple`)?e:e?.[0],o=e=>{Cr(pr(e))||s({type:`VALUE.SET`,value:Sg(e.currentTarget)})};return t.select({name:r(`name`),form:r(`form`),disabled:l,multiple:r(`multiple`),required:r(`required`),"aria-hidden":!0,id:ug(i),defaultValue:a,style:Ei,tabIndex:-1,autoComplete:r(`autoComplete`),onChange:o,onInput:o,onFocus(){gg(i)?.focus({preventScroll:!0})},"aria-labelledby":sg(i)})},getPositionerProps(){return t.element({...$.positioner.attrs,dir:r(`dir`),id:dg(i),style:ee.floating})},getContentProps(){return t.element({hidden:!h,dir:r(`dir`),id:ig(i),role:p?`listbox`:`dialog`,...$.content.attrs,"data-state":h?`open`:`closed`,"data-placement":b,"data-side":x,"data-activedescendant":w,"aria-activedescendant":p?w:void 0,"aria-multiselectable":r(`multiple`)&&p?!0:void 0,"aria-labelledby":sg(i),tabIndex:0,onKeyDown(e){if(!C||!j(e.currentTarget,P(e)))return;if(e.key===`Tab`&&!Hr(e)){e.preventDefault();return}let t={ArrowUp(){s({type:`CONTENT.ARROW_UP`})},ArrowDown(){s({type:`CONTENT.ARROW_DOWN`})},Home(){s({type:`CONTENT.HOME`})},End(){s({type:`CONTENT.END`})},Enter(){s({type:`ITEM.CLICK`,src:`keydown.enter`})},Space(e){S?s({type:`CONTENT.TYPEAHEAD`,key:e.key}):t.Enter?.(e)}},n=t[fr(e)];if(n){n(e),e.preventDefault();return}_n(P(e))||wi.isValidEvent(e)&&(s({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getListProps(){return t.element({...$.list.attrs,tabIndex:0,role:p?void 0:`listbox`,"aria-labelledby":ag(i),"aria-activedescendant":p?void 0:w,"aria-multiselectable":!p&&r(`multiple`)?!0:void 0})}}}var Sg=e=>e.multiple?Array.from(e.selectedOptions,e=>e.value):e.value?[e.value]:[],{and:Cg,not:wg,or:Tg}=Uo(),Eg=R({props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??ng.empty(),positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},context({prop:e,bindable:t,getContext:n}){let r=e(`value`)??e(`defaultValue`)??[],i=e(`collection`).findMany(r);return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:wa,onChange(t){let r=n(),i=e(`collection`),a=ws({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:ws({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});return r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItemMap:t(()=>({defaultValue:Ts({selectedItems:i,collection:e(`collection`)})}))}},refs(){return{typeahead:{...wi.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get(`value`).length>0,isTypingAhead:({refs:e})=>e.get(`typeahead`).keysSoFar!==``,isDisabled:({prop:e,context:t})=>!!e(`disabled`)||!!t.get(`fieldsetDisabled`),isInteractive:({prop:e})=>!(e(`disabled`)||e(`readOnly`)),selectedItems:({context:e,prop:t})=>Ss({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`))},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`idle`},entry:[`syncSelectElement`],watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`,`syncSelectElement`,`dispatchChangeEvent`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>t(`collection`).toString()],()=>{r([`syncCollection`])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedItem`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedItem`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setSelectedItems`]},"VALUE.CLEAR":{actions:[`clearSelectedItems`]},"CLEAR.CLICK":{actions:[`clearSelectedItems`,`focusTriggerEl`]}},effects:[`trackFormControlState`],states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{target:`open`,actions:[`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`,`highlightFirstSelectedItem`]}],"TRIGGER.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}]}},focused:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{guard:`isTriggerArrowUpEvent`,target:`open`,actions:[`setInitialFocus`,`highlightComputedLastItem`]},{guard:Tg(`isTriggerArrowDownEvent`,`isTriggerEnterEvent`),target:`open`,actions:[`setInitialFocus`,`highlightComputedFirstItem`]},{target:`open`,actions:[`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}],"TRIGGER.BLUR":{target:`idle`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightFirstSelectedItem`]}],"TRIGGER.ENTER":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_UP":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedLastItem`]}],"TRIGGER.ARROW_DOWN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_LEFT":[{guard:Cg(wg(`multiple`),`hasSelectedItems`),actions:[`selectPreviousItem`]},{guard:wg(`multiple`),actions:[`selectLastItem`]}],"TRIGGER.ARROW_RIGHT":[{guard:Cg(wg(`multiple`),`hasSelectedItems`),actions:[`selectNextItem`]},{guard:wg(`multiple`),actions:[`selectFirstItem`]}],"TRIGGER.HOME":{guard:wg(`multiple`),actions:[`selectFirstItem`]},"TRIGGER.END":{guard:wg(`multiple`),actions:[`selectLastItem`]},"TRIGGER.TYPEAHEAD":{guard:wg(`multiple`),actions:[`selectMatchingItem`]}}},open:{tags:[`open`],exit:[`scrollContentToTop`],effects:[`trackDismissableElement`,`trackFocusVisible`,`computePlacement`,`scrollToHighlightedItem`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`focused`,actions:[`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`clearHighlightedItem`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`restoreFocus`,target:`focused`,actions:[`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`focused`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"ITEM.CLICK":[{guard:Cg(`closeOnSelect`,`isOpenControlled`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{actions:[`selectHighlightedItem`]}],"CONTENT.HOME":{actions:[`highlightFirstItem`]},"CONTENT.END":{actions:[`highlightLastItem`]},"CONTENT.ARROW_DOWN":[{guard:Cg(`hasHighlightedItem`,`loop`,`isLastItemHighlighted`),actions:[`highlightFirstItem`]},{guard:`hasHighlightedItem`,actions:[`highlightNextItem`]},{actions:[`highlightFirstItem`]}],"CONTENT.ARROW_UP":[{guard:Cg(`hasHighlightedItem`,`loop`,`isFirstItemHighlighted`),actions:[`highlightLastItem`]},{guard:`hasHighlightedItem`,actions:[`highlightPreviousItem`]},{actions:[`highlightLastItem`]}],"CONTENT.TYPEAHEAD":{actions:[`highlightMatchingItem`]},"ITEM.POINTER_MOVE":{actions:[`highlightItem`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedItem`]},"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{loop:({prop:e})=>!!e(`loopFocus`),multiple:({prop:e})=>!!e(`multiple`),hasSelectedItems:({computed:e})=>!!e(`hasSelectedItems`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e(`closeOnSelect`)),restoreFocus:({event:e})=>Dg(e),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.CLICK`,isTriggerEnterEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ENTER`,isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_UP`,isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_DOWN`},effects:{trackFocusVisible({scope:e}){return Qi({root:e.getRootNode?.()})},trackFormControlState({context:e,scope:t}){return xr(mg(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){let t=e.initial(`value`);e.set(`value`,t)}})},trackDismissableElement({scope:e,send:t,prop:n}){let r=()=>hg(e),i=!0;return Gu(r,{type:`listbox`,defer:!0,exclude:[gg(e),_g(e)],onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onInteractOutside(e){n(`onInteractOutside`)?.(e),i=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(){t({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){let r=t(`positioning`);return e.set(`currentPlacement`,r.placement),ql(()=>gg(n),()=>vg(n),{defer:!0,...r,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=r=>{let i=e.get(`highlightedValue`);if(i==null||Yi()===`pointer`)return;let a=hg(n),o=t(`scrollToIndexFn`);if(o){let e=t(`collection`).indexOf(i);o?.({index:e,immediate:r,getElement:()=>yg(n,i)});return}hi(yg(n,i),{rootEl:a,block:`nearest`})};return I(()=>{Xi(`virtual`),r(!0)}),qr(()=>hg(n),{defer:!0,attributes:[`data-activedescendant`],callback(){r(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:r}){ql(gg(n),()=>vg(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getPreviousValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightNextItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getNextValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;e.set(`highlightedValue`,n)},highlightLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;e.set(`highlightedValue`,n)},setInitialFocus({scope:e}){I(()=>{Vr({root:hg(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Dg(e)&&I(()=>{gg(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get(`highlightedValue`);r!=null&&t(`collection`).has(r)&&(t(`onSelect`)?.({value:r}),r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(r)?null:r,e.set(`value`,e=>r==null?[]:t(`multiple`)?ba(e,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.firstValue;e.set(`highlightedValue`,i)},highlightComputedLastItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue;e.set(`highlightedValue`,i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n(`hasSelectedItems`))return;let r=t(`collection`).sort(e.get(`value`))[0];e.set(`highlightedValue`,r)},highlightItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},setHighlightedItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},selectItem({context:e,prop:t,event:n}){t(`onSelect`)?.({value:n.value});let r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(n.value)?null:n.value;e.set(`value`,e=>r==null?[]:t(`multiple`)?ba(e,r):[r])},clearItem({context:e,event:t}){e.set(`value`,e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getPreviousValue(n);r&&e.set(`value`,[r])},selectNextItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getNextValue(n);r&&e.set(`value`,[r])},selectFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;n&&e.set(`value`,[n])},selectLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;n&&e.set(`value`,[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`value`)[0]});i!=null&&e.set(`value`,[i])},scrollContentToTop({prop:e,scope:t}){if(e(`scrollToIndexFn`)){let n=e(`collection`).firstValue;e(`scrollToIndexFn`)?.({index:0,immediate:!0,getElement:()=>yg(t,n)})}else hg(t)?.scrollTo(0,0)},invokeOnOpen({prop:e,context:t}){e(`onOpenChange`)?.({open:!0,value:t.get(`value`)})},invokeOnClose({prop:e,context:t}){e(`onOpenChange`)?.({open:!1,value:t.get(`value`)})},syncSelectElement({context:e,prop:t,scope:n}){let r=mg(n);if(r){if(e.get(`value`).length===0&&!t(`multiple`)){r.selectedIndex=-1;return}for(let t of r.options)t.selected=e.get(`value`).includes(t.value)}},syncCollection({context:e,prop:t}){let n=t(`collection`),r=n.find(e.get(`highlightedValue`));r&&e.set(`highlightedItem`,r);let i=ws({values:e.get(`value`),collection:n,selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,i.nextSelectedItemMap)},syncSelectedItems({context:e,prop:t}){let n=ws({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)});e.set(`selectedItemMap`,n.nextSelectedItemMap)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=mg(e);if(!t)return;let n=new(e.getWin()).Event(`change`,{bubbles:!0,composed:!0});t.dispatchEvent(wr(n))})}}}});function Dg(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}var Og={key:0,class:`k-select__req`},kg=[`value`],Ag={key:1,class:`k-select__error`},jg={key:2,class:`k-select__hint`},Mg={key:0,class:`k-select__empty`},Ng=E(Object.assign({inheritAttrs:!1},{__name:`KSelect`,props:{modelValue:{type:[String,Number,Boolean,null],default:null},options:{type:Array,default:()=>[]},getValue:{type:Function,default:e=>e.value},getLabel:{type:Function,default:e=>e.label},label:{type:String,default:``},placeholder:{type:String,default:`Выберите…`},hint:{type:String,default:``},error:{type:String,default:``},name:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=(0,t.useAttrs)(),i=(0,t.computed)(()=>({class:r.class,style:r.style})),a=e,o=n,s=(0,t.ref)(null),c=(0,t.computed)(()=>a.options.map(e=>typeof e==`object`&&e?e:{value:e,label:String(e)})),l=e=>String(a.getValue(e)),u=e=>String(a.getLabel(e)),d=(0,t.computed)(()=>ng({items:c.value,itemToValue:l,itemToString:u}));function f(e){if(e!=null&&e!==``)return c.value.find(t=>l(t)===String(e))}let p=B(Eg,{id:(0,t.useId)(),positioning:{sameWidth:!0,getAnchorElement:()=>s.value},get collection(){return d.value},get disabled(){return a.disabled},get invalid(){return!!a.error},get required(){return a.required},get name(){return a.name||void 0},get value(){let e=f(a.modelValue);return e?[l(e)]:[]},onValueChange({value:e}){let t=f(e[0]);o(`update:modelValue`,t===void 0?null:a.getValue(t))}}),m=(0,t.computed)(()=>xg(p,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-select`},{...i.value,...m.value.getRootProps()}),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({key:0,class:`k-select__label`},m.value.getLabelProps()),[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Og,`*`)):(0,t.createCommentVNode)(``,!0)],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,(0,t.mergeProps)({ref_key:`box`,ref:s,class:[`k-select__box`,{"k-select__box--error":e.error,"k-select__box--disabled":e.disabled}]},m.value.getControlProps()),[(0,t.createElementVNode)(`button`,(0,t.mergeProps)({class:`k-select__trigger`},m.value.getTriggerProps()),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:[`k-select__value`,{"k-select__value--placeholder":!m.value.hasSelectedItems}]},m.value.getValueTextProps()),(0,t.toDisplayString)(m.value.hasSelectedItems?m.value.valueAsString:e.placeholder),17)],16),e.clearable&&m.value.hasSelectedItems?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-select__clear`,"aria-label":`Очистить`},m.value.getClearTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:14})],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-select__chevron`},m.value.getIndicatorProps()),[(0,t.createVNode)(D,{name:`chevron-down`,size:16})],16)],16),(0,t.createElementVNode)(`select`,(0,t.normalizeProps)((0,t.guardReactiveProps)(m.value.getHiddenSelectProps())),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`option`,{key:l(e),value:l(e)},(0,t.toDisplayString)(u(e)),9,kg))),128))],16),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ag,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,jg,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.normalizeProps)((0,t.guardReactiveProps)(m.value.getPositionerProps())),[(0,t.createElementVNode)(`ul`,(0,t.mergeProps)({class:`k-select__content`},m.value.getContentProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.value,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:l(e),class:`k-select__item`},{ref_for:!0},m.value.getItemProps({item:e})),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-select__item-text`},{ref_for:!0},m.value.getItemTextProps({item:e})),(0,t.toDisplayString)(u(e)),17),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-select__item-check`},{ref_for:!0},m.value.getItemIndicatorProps({item:e})),[(0,t.createVNode)(D,{name:`check`,size:15})],16)],16))),128)),c.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`li`,Mg,`Нет вариантов`))],16)],16)]))],16))}}),[[`__scopeId`,`data-v-f59de15e`]]),Pg={class:`k-shell__sidebar`},Fg={class:`k-shell__logo`},Ig={class:`k-shell__nav`},Lg={key:0,class:`k-shell__section`},Rg={class:`k-shell__link-label`},zg={key:1,class:`k-shell__badge`},Bg={key:0,class:`k-shell__sidebar-footer`},Vg={class:`k-shell__main`},Hg={class:`k-shell__header`},Ug={class:`k-shell__header-left`},Wg={class:`k-shell__header-actions`},Gg={class:`k-shell__content`},Kg=E({__name:`KShell`,props:{nav:{type:Array,default:()=>[]},title:{type:String,default:``}},setup(e){let n=(0,t.ref)(!1);return(r,i)=>{let a=(0,t.resolveComponent)(`router-link`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-shell`,{"k-shell--nav-open":n.value}])},[(0,t.createElementVNode)(`aside`,Pg,[(0,t.createElementVNode)(`div`,Fg,[(0,t.renderSlot)(r.$slots,`logo`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)]),(0,t.createElementVNode)(`nav`,Ig,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.nav,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:r},[e.section?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Lg,(0,t.toDisplayString)(e.section),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,e=>((0,t.openBlock)(),(0,t.createBlock)(a,{key:e.to,to:e.to,class:`k-shell__link`,onClick:i[0]||=e=>n.value=!1},{default:(0,t.withCtx)(()=>[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:17,class:`k-shell__link-icon`},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,Rg,(0,t.toDisplayString)(e.label),1),e.badge?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,zg,(0,t.toDisplayString)(e.badge),1)):(0,t.createCommentVNode)(``,!0)]),_:2},1032,[`to`]))),128))],64))),128))]),r.$slots.sidebarFooter?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Bg,[(0,t.renderSlot)(r.$slots,`sidebarFooter`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,Vg,[(0,t.createElementVNode)(`header`,Hg,[(0,t.createElementVNode)(`button`,{class:`k-shell__burger`,"aria-label":`Меню`,onClick:i[1]||=e=>n.value=!n.value},[(0,t.createVNode)(D,{name:n.value?`close`:`menu`,size:20},null,8,[`name`])]),(0,t.createElementVNode)(`div`,Ug,[(0,t.renderSlot)(r.$slots,`header-left`,{},void 0,!0)]),(0,t.createElementVNode)(`div`,Wg,[(0,t.renderSlot)(r.$slots,`header-actions`,{},void 0,!0),(0,t.renderSlot)(r.$slots,`user`,{},void 0,!0)])]),(0,t.createElementVNode)(`main`,Gg,[(0,t.renderSlot)(r.$slots,`default`,{},void 0,!0)])]),(0,t.createElementVNode)(`div`,{class:`k-shell__overlay`,onClick:i[2]||=e=>n.value=!1})],2)}}},[[`__scopeId`,`data-v-28e372ea`]]),qg={class:`k-stat`},Jg={class:`k-stat__head`},Yg={class:`k-stat__label`},Xg={class:`k-stat__value`},Zg={key:0,class:`k-stat__foot`},Qg={key:1,class:`k-stat__hint`},$g=E({__name:`KStat`,props:{label:{type:String,default:``},value:{type:[String,Number],default:``},hint:{type:String,default:``},icon:{type:String,default:``},tone:{type:String,default:`neutral`},trend:{type:Number,default:null},invert:{type:Boolean,default:!1}},setup(e){let n=e,r=(0,t.computed)(()=>n.invert?n.trend<0:n.trend>0);return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,qg,[(0,t.createElementVNode)(`div`,Jg,[(0,t.createElementVNode)(`span`,Yg,(0,t.toDisplayString)(e.label),1),e.icon?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([`k-stat__icon`,`k-stat__icon--${e.tone}`])},[(0,t.createVNode)(D,{name:e.icon,size:16},null,8,[`name`])],2)):(0,t.createCommentVNode)(``,!0)]),(0,t.createElementVNode)(`div`,Xg,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.value),1)],!0)]),e.hint||e.trend!=null?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Zg,[e.trend==null?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,class:(0,t.normalizeClass)([`k-stat__trend`,r.value?`k-stat__trend--good`:`k-stat__trend--bad`])},[(0,t.createVNode)(D,{name:e.trend>0?`up`:`down`,size:13},null,8,[`name`]),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(Math.abs(e.trend).toLocaleString(`ru-RU`))+`% `,1)],2)),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Qg,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)]))}},[[`__scopeId`,`data-v-65b0e012`]]),e_=O(`steps`).parts(`root`,`list`,`item`,`trigger`,`indicator`,`separator`,`content`,`nextTrigger`,`prevTrigger`,`progress`).build(),t_=e=>e.ids?.root??`steps:${e.id}`,n_=e=>e.ids?.list??`steps:${e.id}:list`,r_=(e,t)=>e.ids?.triggerId?.(t)??`steps:${e.id}:trigger:${t}`,i_=(e,t)=>e.ids?.contentId?.(t)??`steps:${e.id}:content:${t}`;function a_(e,t){let{context:n,send:r,computed:i,prop:a,scope:o}=e,s=n.get(`step`),c=a(`count`),l=i(`percent`),u=i(`hasNextStep`),d=i(`hasPrevStep`),f=e=>a(`isStepValid`)?.(e)??!0,p=e=>a(`isStepSkippable`)?.(e)??!1,m=e=>({triggerId:r_(o,e.index),contentId:i_(o,e.index),current:e.index===s,completed:e.index<s,incomplete:e.index>s,index:e.index,first:e.index===0,last:e.index===c-1,skippable:p(e.index),isValid:()=>f(e.index)}),h=()=>{r({type:`STEP.NEXT`,src:`next.trigger.click`})},g=()=>{r({type:`STEP.PREV`,src:`prev.trigger.click`})};return{value:s,count:c,percent:l,hasNextStep:u,hasPrevStep:d,isCompleted:i(`completed`),isStepValid:f,isStepSkippable:p,goToNextStep:h,goToPrevStep:g,resetStep:()=>{r({type:`STEP.RESET`,src:`reset.trigger.click`})},getItemState:m,setStep:e=>{r({type:`STEP.SET`,value:e,src:`api.setValue`})},getRootProps(){return t.element({...e_.root.attrs,id:t_(o),dir:a(`dir`),"data-orientation":a(`orientation`),style:{"--percent":`${l}%`}})},getListProps(){let e=ma(c).map((e,t)=>r_(o,t));return t.element({...e_.list.attrs,dir:a(`dir`),id:n_(o),role:`tablist`,"aria-owns":e.join(` `),"aria-orientation":a(`orientation`),"data-orientation":a(`orientation`)})},getItemProps(e){let n=m(e);return t.element({...e_.item.attrs,dir:a(`dir`),"aria-current":n.current?`step`:void 0,"data-orientation":a(`orientation`),"data-skippable":k(n.skippable)})},getTriggerProps(e){let n=m(e);return t.button({...e_.trigger.attrs,id:n.triggerId,role:`tab`,type:`button`,dir:a(`dir`),tabIndex:!a(`linear`)||n.current?0:-1,"aria-selected":n.current,"aria-controls":n.contentId,"data-state":n.current?`open`:`closed`,"data-orientation":a(`orientation`),"data-complete":k(n.completed),"data-current":k(n.current),"data-incomplete":k(n.incomplete),onClick(t){t.defaultPrevented||a(`linear`)||r({type:`STEP.SET`,value:e.index,src:`trigger.click`})}})},getContentProps(e){let n=m(e);return t.element({...e_.content.attrs,dir:a(`dir`),id:n.contentId,role:`tabpanel`,tabIndex:0,hidden:!n.current,"data-state":n.current?`open`:`closed`,"data-orientation":a(`orientation`),"aria-labelledby":n.triggerId})},getIndicatorProps(e){let n=m(e);return t.element({...e_.indicator.attrs,dir:a(`dir`),"aria-hidden":!0,"data-complete":k(n.completed),"data-current":k(n.current),"data-incomplete":k(n.incomplete)})},getSeparatorProps(e){let n=m(e);return t.element({...e_.separator.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),"data-complete":k(n.completed),"data-current":k(n.current),"data-incomplete":k(n.incomplete)})},getNextTriggerProps(){return t.button({...e_.nextTrigger.attrs,dir:a(`dir`),type:`button`,disabled:!u,onClick(e){e.defaultPrevented||h()}})},getPrevTriggerProps(){return t.button({dir:a(`dir`),...e_.prevTrigger.attrs,type:`button`,disabled:!d,onClick(e){e.defaultPrevented||g()}})},getProgressProps(){return t.element({dir:a(`dir`),...e_.progress.attrs,role:`progressbar`,"aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${l}% complete`,"data-complete":k(l===100)})}}}var o_=R({props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:`horizontal`,...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e(`defaultStep`),value:e(`step`),onChange(t){e(`onStepChange`)?.({step:t}),t==e(`count`)&&e(`onStepComplete`)?.()}}))}},computed:{percent:bo(({context:e,prop:t})=>[e.get(`step`),t(`count`)],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get(`step`)<t(`count`),hasPrevStep:({context:e})=>e.get(`step`)>0,completed:({context:e,prop:t})=>e.get(`step`)===t(`count`)},initialState(){return`idle`},entry:[`validateStepIndex`],states:{idle:{on:{"STEP.SET":[{guard:`isValidStepNavigation`,actions:[`setStep`]},{actions:[`invokeOnStepInvalid`]}],"STEP.NEXT":[{guard:`isCurrentStepValid`,actions:[`goToNextStep`]},{actions:[`invokeOnStepInvalid`]}],"STEP.PREV":{actions:[`goToPrevStep`]},"STEP.RESET":{actions:[`resetStep`]}}}},implementations:{guards:{isCurrentStepValid({context:e,prop:t}){let n=e.get(`step`);if(t(`isStepSkippable`)?.(n))return!0;let r=t(`isStepValid`);return!r||r(n)},isValidStepNavigation({context:e,event:t,prop:n}){let r=e.get(`step`);if(t.value<=r||n(`isStepSkippable`)?.(r))return!0;let i=n(`isStepValid`);return!i||i(r)}},actions:{goToNextStep({context:e,prop:t}){let n=t(`count`);e.set(`step`,Math.min(e.get(`step`)+1,n))},goToPrevStep({context:e}){e.set(`step`,Math.max(e.get(`step`)-1,0))},resetStep({context:e}){e.set(`step`,0)},setStep({context:e,event:t}){e.set(`step`,t.value)},validateStepIndex({context:e,prop:t}){s_(t(`count`),e.get(`step`))},invokeOnStepInvalid({context:e,event:t,prop:n}){n(`onStepInvalid`)?.({step:e.get(`step`),action:t.type===`STEP.NEXT`?`next`:`set`,targetStep:t.value})}}}}),s_=(e,t)=>{if(!ao(t,0,e))throw RangeError(`[zag-js/steps] step index ${t} is out of bounds`)},c_={class:`k-steps__body`},l_={class:`k-steps__label`},u_={key:0,class:`k-steps__hint`},d_=E({__name:`KSteps`,props:{items:{type:Array,default:()=>[]},current:{type:Number,default:0},clickable:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:n}){let r=e,i=n,a=B(o_,{id:(0,t.useId)(),linear:!1,get step(){return r.current},get count(){return r.items.length},onStepChange({step:e}){e!==r.current&&i(`select`,e)}}),o=(0,t.computed)(()=>a_(a,z)),s=e=>typeof e==`string`?e:e.label,c=e=>typeof e==`string`?``:e.hint;return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-steps`},o.value.getRootProps()),[(0,t.createElementVNode)(`ol`,(0,t.mergeProps)({class:`k-steps__list`},o.value.getListProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,(0,t.mergeProps)({key:r,class:`k-steps__item`},{ref_for:!0},o.value.getItemProps({index:r})),[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.clickable?`button`:`div`),(0,t.mergeProps)({class:[`k-steps__trigger`,{"k-steps__trigger--clickable":e.clickable&&r<=e.current}]},{ref_for:!0},e.clickable?o.value.getTriggerProps({index:r}):{},{disabled:e.clickable&&r>e.current?!0:null}),{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-steps__marker`},{ref_for:!0},o.value.getIndicatorProps({index:r})),[r<e.current?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:`check`,size:14})):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(r+1),1)],64))],16),(0,t.createElementVNode)(`span`,c_,[(0,t.createElementVNode)(`span`,l_,(0,t.toDisplayString)(s(n)),1),c(n)?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,u_,(0,t.toDisplayString)(c(n)),1)):(0,t.createCommentVNode)(``,!0)])]),_:2},1040,[`class`,`disabled`])),r<e.items.length-1?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,(0,t.mergeProps)({key:0,class:`k-steps__sep`},{ref_for:!0},o.value.getSeparatorProps({index:r})),null,16)):(0,t.createCommentVNode)(``,!0)],16))),128))],16)],16))}},[[`__scopeId`,`data-v-84abd47e`]]),f_=O(`switch`).parts(`root`,`label`,`control`,`thumb`).build(),p_=e=>e.ids?.root??`switch:${e.id}`,m_=e=>e.ids?.label??`switch:${e.id}:label`,h_=e=>e.ids?.thumb??`switch:${e.id}:thumb`,g_=e=>e.ids?.control??`switch:${e.id}:control`,__=e=>e.ids?.hiddenInput??`switch:${e.id}:input`,v_=e=>e.getById(p_(e)),y_=e=>e.getById(__(e));function b_(e,t){let{context:n,send:r,prop:i,scope:a}=e,o=!!i(`disabled`),s=!!i(`readOnly`),c=!!i(`required`),l=!!n.get(`checked`),u=!o&&n.get(`focused`),d=!o&&n.get(`focusVisible`),f={"data-active":k(!o&&n.get(`active`)),"data-focus":k(u),"data-focus-visible":k(d),"data-readonly":k(s),"data-hover":k(n.get(`hovered`)),"data-disabled":k(o),"data-state":l?`checked`:`unchecked`,"data-invalid":k(i(`invalid`)),"data-required":k(c)};return{checked:l,disabled:o,focused:u,setChecked(e){r({type:`CHECKED.SET`,checked:e,isTrusted:!1})},toggleChecked(){r({type:`CHECKED.TOGGLE`,checked:l,isTrusted:!1})},getRootProps(){return t.label({...f_.root.attrs,...f,dir:i(`dir`),id:p_(a),htmlFor:__(a),onPointerMove(){o||r({type:`CONTEXT.SET`,context:{hovered:!0}})},onPointerLeave(){o||r({type:`CONTEXT.SET`,context:{hovered:!1}})},onClick(e){o||(P(e)===y_(a)&&e.stopPropagation(),Qn()&&y_(a)?.focus())}})},getLabelProps(){return t.element({...f_.label.attrs,...f,dir:i(`dir`),id:m_(a)})},getThumbProps(){return t.element({...f_.thumb.attrs,...f,dir:i(`dir`),id:h_(a),"aria-hidden":!0})},getControlProps(){return t.element({...f_.control.attrs,...f,dir:i(`dir`),id:g_(a),"aria-hidden":!0})},getHiddenInputProps(){return t.input({id:__(a),type:`checkbox`,required:i(`required`),defaultChecked:l,disabled:o,"aria-labelledby":m_(a),"aria-invalid":i(`invalid`),name:i(`name`),form:i(`form`),value:i(`value`),style:Ei,onFocus(){let e=Zi();r({type:`CONTEXT.SET`,context:{focused:!0,focusVisible:e}})},onBlur(){r({type:`CONTEXT.SET`,context:{focused:!1,focusVisible:!1}})},onClick(e){if(s){e.preventDefault();return}let t=e.currentTarget.checked;r({type:`CHECKED.SET`,checked:t,isTrusted:!0})}})}}}var{not:x_}=Uo(),S_=R({props({props:e}){return{defaultChecked:!1,label:`switch`,value:`on`,...e}},initialState(){return`ready`},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e(`defaultChecked`),value:e(`checked`),onChange(t){e(`onCheckedChange`)?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t(`disabled`)||e.get(`fieldsetDisabled`)},watch({track:e,prop:t,context:n,action:r}){e([()=>t(`disabled`)],()=>{r([`removeFocusIfNeeded`])}),e([()=>n.get(`checked`)],()=>{r([`syncInputElement`])})},effects:[`trackFormControlState`,`trackPressEvent`,`trackFocusVisible`],on:{"CHECKED.TOGGLE":[{guard:x_(`isTrusted`),actions:[`toggleChecked`,`dispatchChangeEvent`]},{actions:[`toggleChecked`]}],"CHECKED.SET":[{guard:x_(`isTrusted`),actions:[`setChecked`,`dispatchChangeEvent`]},{actions:[`setChecked`]}],"CONTEXT.SET":{actions:[`setContext`]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e(`isDisabled`))return ei({pointerNode:v_(t),keyboardNode:y_(t),isValidKey:e=>e.key===` `,onPress:()=>n.set(`active`,!1),onPressStart:()=>n.set(`active`,!0),onPressEnd:()=>n.set(`active`,!1)})},trackFocusVisible({computed:e,scope:t}){if(!e(`isDisabled`))return Qi({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return xr(y_(n),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){t({type:`CHECKED.SET`,checked:!!e.initial(`checked`),src:`form-reset`})}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){let n=y_(t);n&&gr(n,!!e.get(`checked`))},removeFocusIfNeeded({context:e,prop:t}){t(`disabled`)&&e.set(`focused`,!1)},setChecked({context:e,event:t}){e.set(`checked`,t.checked)},toggleChecked({context:e}){e.set(`checked`,!e.get(`checked`))},dispatchChangeEvent({context:e,scope:t}){queueMicrotask(()=>{_r(y_(t),{checked:e.get(`checked`)})})}}}}),C_={key:0,class:`k-switch__body`},w_={key:0,class:`k-switch__hint`},T_=E({__name:`KSwitch`,props:{modelValue:{type:Boolean,default:!1},label:{type:String,default:``},hint:{type:String,default:``},name:{type:String,default:``},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=B(S_,{id:(0,t.useId)(),get checked(){return r.modelValue},get disabled(){return r.disabled},get name(){return r.name||void 0},onCheckedChange({checked:e}){i(`update:modelValue`,e)}}),o=(0,t.computed)(()=>b_(a,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:`k-switch`},o.value.getRootProps()),[(0,t.createElementVNode)(`input`,(0,t.normalizeProps)((0,t.guardReactiveProps)(o.value.getHiddenInputProps())),null,16),(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-switch__track`},o.value.getControlProps()),[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-switch__thumb`},o.value.getThumbProps()),null,16)],16),e.label||e.hint||n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,C_,[(0,t.createElementVNode)(`span`,(0,t.mergeProps)({class:`k-switch__label`},o.value.getLabelProps()),[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],16),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,w_,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}},[[`__scopeId`,`data-v-0896c0cd`]]),E_={class:`k-table__scroll`},D_={class:`k-table__table`},O_=[`onClick`],k_={class:`k-table__th-inner`},A_={key:0},j_=[`colspan`],M_={key:1},N_=[`colspan`],P_=[`onClick`],F_=E({__name:`KTable`,props:{columns:{type:Array,required:!0},rows:{type:Array,default:()=>[]},rowKey:{type:[String,Function],default:`id`},loading:{type:Boolean,default:!1},emptyText:{type:String,default:`Ничего не найдено`},loadingText:{type:String,default:`Загрузка…`},paginationTranslations:{type:Object,default:()=>({})},clickable:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},sortKey:{type:String,default:``},sortDir:{type:String,default:`asc`},page:{type:Number,default:1},pageSize:{type:Number,default:0},total:{type:Number,default:0}},emits:[`update:page`,`update:sortKey`,`update:sortDir`,`row-click`],setup(e,{emit:n}){let r=e,i=n;function a(e,t){return typeof r.rowKey==`function`?r.rowKey(e):e[r.rowKey]??t}function o(e){e.sortable&&(r.sortKey===e.key?i(`update:sortDir`,r.sortDir===`asc`?`desc`:`asc`):(i(`update:sortKey`,e.key),i(`update:sortDir`,`asc`)))}let s=(0,t.computed)(()=>r.pageSize>0&&r.total>r.pageSize);return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`k-table`,{"k-table--dense":e.dense}])},[(0,t.createElementVNode)(`div`,E_,[(0,t.createElementVNode)(`table`,D_,[(0,t.createElementVNode)(`thead`,null,[(0,t.createElementVNode)(`tr`,null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.columns,n=>((0,t.openBlock)(),(0,t.createElementBlock)(`th`,{key:n.key,style:(0,t.normalizeStyle)({width:n.width,textAlign:n.align||`left`}),class:(0,t.normalizeClass)({"k-table__th--sortable":n.sortable}),onClick:e=>o(n)},[(0,t.createElementVNode)(`span`,k_,[(0,t.createTextVNode)((0,t.toDisplayString)(n.label)+` `,1),n.sortable?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.sortKey===n.key&&e.sortDir===`desc`?`chevron-down`:`chevron-up`,size:13,class:(0,t.normalizeClass)([`k-table__sort`,{"k-table__sort--active":e.sortKey===n.key}])},null,8,[`name`,`class`])):(0,t.createCommentVNode)(``,!0)])],14,O_))),128))])]),(0,t.createElementVNode)(`tbody`,null,[e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`tr`,A_,[(0,t.createElementVNode)(`td`,{colspan:e.columns.length,class:`k-table__msg`},[(0,t.createVNode)(D,{name:`spinner`,size:18,spin:``}),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.loadingText),1)],8,j_)])):e.rows.length?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:2},(0,t.renderList)(e.rows,(o,s)=>((0,t.openBlock)(),(0,t.createElementBlock)(`tr`,{key:a(o,s),class:(0,t.normalizeClass)({"k-table__row--clickable":e.clickable}),onClick:t=>e.clickable&&i(`row-click`,o)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.columns,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`td`,{key:e.key,style:(0,t.normalizeStyle)({textAlign:e.align||`left`,whiteSpace:e.nowrap?`nowrap`:null})},[e.actions?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`k-table__actions`,onClick:r[0]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.renderSlot)(n.$slots,`cell-${e.key}`,{row:o,value:o[e.key],index:s},void 0,!0)])):(0,t.renderSlot)(n.$slots,`cell-${e.key}`,{row:o,value:o[e.key],index:s},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(o[e.key]),1)],!0,1)],4))),128))],10,P_))),128)):((0,t.openBlock)(),(0,t.createElementBlock)(`tr`,M_,[(0,t.createElementVNode)(`td`,{colspan:e.columns.length,class:`k-table__msg`},[(0,t.renderSlot)(n.$slots,`empty`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.emptyText),1)],!0)],8,N_)]))])])]),s.value?((0,t.openBlock)(),(0,t.createBlock)(fh,{key:0,page:e.page,"page-size":e.pageSize,total:e.total,translations:e.paginationTranslations,"onUpdate:page":r[1]||=e=>i(`update:page`,e)},null,8,[`page`,`page-size`,`total`,`translations`])):(0,t.createCommentVNode)(``,!0)],2))}},[[`__scopeId`,`data-v-106d2400`]]),I_=O(`tabs`).parts(`root`,`list`,`trigger`,`content`,`indicator`).build(),L_=e=>e.ids?.root??`tabs:${e.id}`,R_=e=>e.ids?.list??`tabs:${e.id}:list`,z_=(e,t)=>e.ids?.content?.(t)??`tabs:${e.id}:content-${t}`,B_=(e,t)=>e.ids?.trigger?.(t)??`tabs:${e.id}:trigger-${t}`,V_=e=>e.ids?.indicator??`tabs:${e.id}:indicator`,H_=e=>e.getById(R_(e)),U_=(e,t)=>e.getById(z_(e,t)),W_=(e,t)=>t==null?null:e.getById(B_(e,t)),G_=e=>e.getById(V_(e)),K_=e=>{let t=`[role=tab]${tn(R_(e))}:not([disabled])`;return ai(H_(e),t)},q_=e=>ha(K_(e)),J_=e=>ga(K_(e)),Y_=(e,t)=>ui(K_(e),B_(e,t.value),t.loopFocus),X_=(e,t)=>di(K_(e),B_(e,t.value),t.loopFocus),Z_=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),Q_=(e,t)=>Z_(ci(K_(e),B_(e,t)));function $_(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`translations`),c=n.matches(`focused`),l=a(`orientation`)===`vertical`,u=a(`orientation`)===`horizontal`,d=a(`composite`);function f(e){return{selected:i.get(`value`)===e.value,focused:i.get(`focusedValue`)===e.value,disabled:!!e.disabled}}return{value:i.get(`value`),focusedValue:i.get(`focusedValue`),setValue(e){r({type:`SET_VALUE`,value:e})},clearValue(){r({type:`CLEAR_VALUE`})},setIndicatorRect(e){let t=B_(o,e);r({type:`SET_INDICATOR_RECT`,id:t})},syncTabIndex(){r({type:`SYNC_TAB_INDEX`})},selectNext(e){r({type:`TAB_FOCUS`,value:e,src:`selectNext`}),r({type:`ARROW_NEXT`,src:`selectNext`})},selectPrev(e){r({type:`TAB_FOCUS`,value:e,src:`selectPrev`}),r({type:`ARROW_PREV`,src:`selectPrev`})},focus(){let e=i.get(`value`);e&&W_(o,e)?.focus()},getRootProps(){return t.element({...I_.root.attrs,id:L_(o),"data-orientation":a(`orientation`),"data-focus":k(c),dir:a(`dir`)})},getListProps(){return t.element({...I_.list.attrs,id:R_(o),role:`tablist`,dir:a(`dir`),"data-focus":k(c),"aria-orientation":a(`orientation`),"data-orientation":a(`orientation`),"aria-label":s?.listLabel,onKeyDown(e){if(e.defaultPrevented||ir(e)||!j(e.currentTarget,P(e)))return;let t={ArrowDown(){u||r({type:`ARROW_NEXT`,key:`ArrowDown`})},ArrowUp(){u||r({type:`ARROW_PREV`,key:`ArrowUp`})},ArrowLeft(){l||r({type:`ARROW_PREV`,key:`ArrowLeft`})},ArrowRight(){l||r({type:`ARROW_NEXT`,key:`ArrowRight`})},Home(){r({type:`HOME`})},End(){r({type:`END`})}}[fr(e,{dir:a(`dir`),orientation:a(`orientation`)})];if(t){e.preventDefault(),t(e);return}}})},getTriggerState:f,getTriggerProps(e){let{value:n,disabled:s}=e,c=f(e);return t.button({...I_.trigger.attrs,role:`tab`,type:`button`,disabled:s,dir:a(`dir`),"data-orientation":a(`orientation`),"data-disabled":k(s),"aria-disabled":s,"data-value":n,"aria-selected":c.selected,"data-selected":k(c.selected),"data-focus":k(c.focused),"aria-controls":c.selected?z_(o,n):void 0,"data-ownedby":R_(o),"data-ssr":k(i.get(`ssr`)),id:B_(o,n),tabIndex:c.selected&&d?0:-1,onFocus(){r({type:`TAB_FOCUS`,value:n})},onBlur(e){e.relatedTarget?.getAttribute(`role`)!==`tab`&&r({type:`TAB_BLUR`})},onClick(e){e.defaultPrevented||nr(e)||s||(Qn()&&e.currentTarget.focus(),r({type:`TAB_CLICK`,value:n}))}})},getContentProps(e){let{value:n}=e,r=i.get(`value`)===n;return t.element({...I_.content.attrs,dir:a(`dir`),id:z_(o,n),tabIndex:d?0:-1,"aria-labelledby":B_(o,n),role:`tabpanel`,"data-ownedby":R_(o),"data-selected":k(r),"data-orientation":a(`orientation`),hidden:!r})},getIndicatorProps(){let e=i.get(`indicatorRect`),n=i.get(`animateIndicator`);return t.element({id:V_(o),...I_.indicator.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),hidden:ev(e),onTransitionEnd(e){P(e)===e.currentTarget&&r({type:`INDICATOR_TRANSITION_END`})},style:{"--transition-property":`left, right, top, bottom, width, height`,"--left":so(e?.x),"--top":so(e?.y),"--width":so(e?.width),"--height":so(e?.height),position:`absolute`,willChange:n?`var(--transition-property)`:`auto`,transitionProperty:n?`var(--transition-property)`:`none`,transitionDuration:n?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[u?`left`:`top`]:u?`var(--left)`:`var(--top)`}})}}}var ev=e=>e==null||e.width===0&&e.height===0&&e.x===0&&e.y===0,{createMachine:tv}=Wo(),nv=tv({props({props:e}){return{dir:`ltr`,orientation:`horizontal`,activationMode:`automatic`,loopFocus:!0,composite:!0,navigate(e){Jr(e.node)},defaultValue:null,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),focusedValue:t(()=>({defaultValue:e(`value`)||e(`defaultValue`),sync:!0,onChange(t){e(`onFocusChange`)?.({focusedValue:t})}})),ssr:t(()=>({defaultValue:!0})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1}))}},refs(){return{indicatorCleanup:null,prevValue:null}},watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`)],()=>{r([`syncIndicatorAnimation`,`syncIndicatorRect`,`syncTabIndex`,`navigateIfNeeded`])}),n([()=>t(`dir`),()=>t(`orientation`)],()=>{r([`syncIndicatorRect`])})},on:{SET_VALUE:{actions:[`setValue`]},CLEAR_VALUE:{actions:[`clearValue`]},SET_INDICATOR_RECT:{actions:[`setIndicatorRect`]},SYNC_TAB_INDEX:{actions:[`syncTabIndex`]},INDICATOR_TRANSITION_END:{actions:[`clearIndicatorAnimation`]}},entry:[`syncPrevValue`,`syncIndicatorRect`,`syncTabIndex`,`syncSsr`],exit:[`cleanupObserver`],states:{idle:{on:{TAB_FOCUS:{target:`focused`,actions:[`setFocusedValue`]},TAB_CLICK:{target:`focused`,actions:[`setFocusedValue`,`setValue`]}}},focused:{on:{TAB_CLICK:{actions:[`setFocusedValue`,`setValue`]},ARROW_PREV:[{guard:`selectOnFocus`,actions:[`focusPrevTab`,`selectFocusedTab`]},{actions:[`focusPrevTab`]}],ARROW_NEXT:[{guard:`selectOnFocus`,actions:[`focusNextTab`,`selectFocusedTab`]},{actions:[`focusNextTab`]}],HOME:[{guard:`selectOnFocus`,actions:[`focusFirstTab`,`selectFocusedTab`]},{actions:[`focusFirstTab`]}],END:[{guard:`selectOnFocus`,actions:[`focusLastTab`,`selectFocusedTab`]},{actions:[`focusLastTab`]}],TAB_FOCUS:{actions:[`setFocusedValue`]},TAB_BLUR:{target:`idle`,actions:[`clearFocusedValue`]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e(`activationMode`)===`automatic`},actions:{selectFocusedTab({context:e,prop:t}){I(()=>{let n=e.get(`focusedValue`);if(!n)return;let r=t(`deselectable`)&&e.get(`value`)===n?null:n;e.set(`value`,r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set(`focusedValue`,t.value)})},clearFocusedValue({context:e}){e.set(`focusedValue`,null)},setValue({context:e,event:t,prop:n}){let r=n(`deselectable`)&&e.get(`value`)===e.get(`focusedValue`);e.set(`value`,r?null:t.value)},clearValue({context:e}){e.set(`value`,null)},focusFirstTab({scope:e}){I(()=>{q_(e)?.focus()})},focusLastTab({scope:e}){I(()=>{J_(e)?.focus()})},focusNextTab({context:e,prop:t,scope:n,event:r}){let i=r.value??e.get(`focusedValue`);if(!i)return;let a=Y_(n,{value:i,loopFocus:t(`loopFocus`)});I(()=>{t(`composite`)?a?.focus():a?.dataset.value!=null&&e.set(`focusedValue`,a.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:r}){let i=r.value??e.get(`focusedValue`);if(!i)return;let a=X_(n,{value:i,loopFocus:t(`loopFocus`)});I(()=>{t(`composite`)?a?.focus():a?.dataset.value!=null&&e.set(`focusedValue`,a.dataset.value)})},syncTabIndex({context:e,scope:t}){I(()=>{let n=e.get(`value`);if(!n)return;let r=U_(t,n);r&&(Fr(r).length>0?r.removeAttribute(`tabindex`):r.setAttribute(`tabindex`,`0`))})},cleanupObserver({refs:e}){let t=e.get(`indicatorCleanup`);t&&t()},setIndicatorRect({context:e,event:t,scope:n}){let r=t.id??e.get(`value`);G_(n)&&r&&W_(n,r)&&e.set(`indicatorRect`,Q_(n,r))},syncSsr({context:e}){e.set(`ssr`,!1)},syncPrevValue({context:e,refs:t}){t.set(`prevValue`,e.get(`value`))},syncIndicatorAnimation({context:e,refs:t}){let n=t.get(`prevValue`),r=e.get(`value`),i=n!=null&&r!=null&&n!==r;e.set(`animateIndicator`,i),t.set(`prevValue`,r)},clearIndicatorAnimation({context:e}){e.set(`animateIndicator`,!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let r=t.get(`indicatorCleanup`);if(r&&r(),!G_(n))return;let i=()=>{let t=W_(n,e.get(`value`));if(!t)return;let r=Z_(t);e.set(`indicatorRect`,e=>wa(e,r)?e:r)};i();let a=K_(n),o=H_(n),s=Ua(...a.map(e=>pi.observe(e,i)),...o?[pi.observe(o,i)]:[]);t.set(`indicatorCleanup`,s)},navigateIfNeeded({context:e,prop:t,scope:n}){let r=e.get(`value`);if(!r)return;let i=W_(n,r);pn(i)&&t(`navigate`)?.({value:r,node:i,href:i.href})}}}}),rv={class:`k-tabs__label`},iv={key:1,class:`k-tabs__count`},av={key:0,class:`k-tabs__hint`},ov=E({__name:`KTabs`,props:{modelValue:{type:[String,Number],default:``},items:{type:Array,default:()=>[]},variant:{type:String,default:`line`}},emits:[`update:modelValue`],setup(e,{emit:n}){let r=e,i=n,a=B(nv,{id:(0,t.useId)(),get value(){return r.modelValue===``||r.modelValue==null?null:String(r.modelValue)},onValueChange({value:e}){let t=r.items.find(t=>String(t.value)===e);i(`update:modelValue`,t?t.value:e)}}),o=(0,t.computed)(()=>$_(a,z));return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:[`k-tabs`,`k-tabs--${e.variant}`]},o.value.getRootProps()),[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-tabs__list`},o.value.getListProps()),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,e=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:e.value,class:[`k-tabs__tab`,{"k-tabs__tab--hinted":e.hint}]},{ref_for:!0},o.value.getTriggerProps({value:String(e.value),disabled:e.disabled})),[(0,t.createElementVNode)(`span`,rv,[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:15},null,8,[`name`])):(0,t.createCommentVNode)(``,!0),(0,t.createTextVNode)(` `+(0,t.toDisplayString)(e.label)+` `,1),e.count==null?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,iv,(0,t.toDisplayString)(e.count),1))]),e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,av,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16))),128))],16)],16))}},[[`__scopeId`,`data-v-d6a570d0`]]),sv={key:0,class:`k-textarea__label`},cv={key:0,class:`k-textarea__req`},lv=[`value`,`rows`,`placeholder`,`required`,`disabled`],uv={key:1,class:`k-textarea__error`},dv={key:2,class:`k-textarea__hint`},fv=E(Object.assign({inheritAttrs:!1},{__name:`KTextarea`,props:{modelValue:{type:String,default:``},label:{type:String,default:``},placeholder:{type:String,default:``},rows:{type:[Number,String],default:4},hint:{type:String,default:``},error:{type:String,default:``},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e){let n=(0,t.useAttrs)(),r=(0,t.computed)(()=>({class:n.class,style:n.style})),i=(0,t.computed)(()=>{let{class:e,style:t,...r}=n;return r});return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`label`,(0,t.mergeProps)({class:`k-textarea`},r.value),[e.label?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,sv,[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1),e.required?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,cv,`*`)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`textarea`,(0,t.mergeProps)({class:[`k-textarea__field`,{"k-textarea__field--error":e.error}],value:e.modelValue,rows:e.rows,placeholder:e.placeholder,required:e.required,disabled:e.disabled},i.value,{onInput:a[0]||=e=>n.$emit(`update:modelValue`,e.target.value)}),null,16,lv),e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,uv,(0,t.toDisplayString)(e.error),1)):e.hint?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,dv,(0,t.toDisplayString)(e.hint),1)):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-b46790f4`]]),pv={class:`k-timeline`},mv={class:`k-timeline__body`},hv={class:`k-timeline__head`},gv={class:`k-timeline__title`},_v={class:`k-timeline__time`},vv={key:0,class:`k-timeline__text`},yv=E({__name:`KTimeline`,props:{items:{type:Array,default:()=>[]}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`ol`,pv,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`li`,{key:r,class:`k-timeline__item`},[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`k-timeline__marker`,`k-timeline__marker--${e.tone||`neutral`}`])},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(D,{key:0,name:e.icon,size:12},null,8,[`name`])):(0,t.createCommentVNode)(``,!0)],2),(0,t.createElementVNode)(`div`,mv,[(0,t.createElementVNode)(`div`,hv,[(0,t.createElementVNode)(`span`,gv,[(0,t.renderSlot)(n.$slots,`title`,{item:e},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)]),(0,t.createElementVNode)(`span`,_v,(0,t.toDisplayString)(e.time),1)]),e.text?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,vv,(0,t.toDisplayString)(e.text),1)):(0,t.createCommentVNode)(``,!0),(0,t.renderSlot)(n.$slots,`extra`,{item:e},void 0,!0)])]))),128))]))}},[[`__scopeId`,`data-v-0bbdcdd1`]]),bv=O(`toast`).parts(`group`,`root`,`title`,`description`,`actionTrigger`,`closeTrigger`).build(),xv=e=>`toast-group:${e}`,Sv=(e,t)=>e.getById(`toast-group:${t}`),Cv=e=>`toast:${e.id}`,wv=e=>e.getById(Cv(e)),Tv=e=>`toast:${e.id}:title`,Ev=e=>`toast:${e.id}:description`,Dv=e=>`toast${e.id}:close`,Ov={info:5e3,error:5e3,success:2e3,loading:1/0,warning:5e3,DEFAULT:5e3};function kv(e,t){return e??Ov[t]??Ov.DEFAULT}var Av=e=>typeof e==`string`?{left:e,right:e,bottom:e,top:e}:e;function jv(e,t){let{prop:n,computed:r,context:i}=e,{offsets:a,gap:o}=n(`store`).attrs,s=i.get(`heights`),c=Av(a),l=n(`dir`)===`rtl`,u=t.replace(`-start`,l?`-right`:`-left`).replace(`-end`,l?`-left`:`-right`),d=u.includes(`right`),f=u.includes(`left`),p={position:`fixed`,pointerEvents:r(`count`)>0?void 0:`none`,display:`flex`,flexDirection:`column`,"--gap":`${o}px`,"--first-height":`${s[0]?.height||0}px`,"--viewport-offset-left":c.left,"--viewport-offset-right":c.right,"--viewport-offset-top":c.top,"--viewport-offset-bottom":c.bottom,zIndex:Xt},m=`center`;return d&&(m=`flex-end`),f&&(m=`flex-start`),p.alignItems=m,u.includes(`top`)&&(p.top=`max(env(safe-area-inset-top, 0px), ${c.top})`),u.includes(`bottom`)&&(p.bottom=`max(env(safe-area-inset-bottom, 0px), ${c.bottom})`),u.includes(`left`)||(p.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${c.right})`),u.includes(`right`)||(p.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${c.left})`),p}function Mv(e,t){let{prop:n,context:r,computed:i}=e,a=n(`parent`),o=a.computed(`placement`),{gap:s}=a.prop(`store`).attrs,[c]=o.split(`-`),l=r.get(`mounted`),u=r.get(`remainingTime`),d=i(`height`),f=i(`frontmost`),p=!f,m=!n(`stacked`),h=n(`stacked`),g=n(`type`)===`loading`?2**53-1:u,_=i(`heightIndex`)*s+i(`heightBefore`),v={position:`absolute`,pointerEvents:`auto`,"--opacity":`0`,"--remove-delay":`${n(`removeDelay`)}ms`,"--duration":`${g}ms`,"--initial-height":`${d}px`,"--offset":`${_}px`,"--index":n(`index`),"--z-index":i(`zIndex`),"--lift-amount":`calc(var(--lift) * var(--gap))`,"--y":`100%`,"--x":`0`},y=e=>Object.assign(v,e);return c===`top`?y({top:`0`,"--sign":`-1`,"--y":`-100%`,"--lift":`1`}):c===`bottom`&&y({bottom:`0`,"--sign":`1`,"--y":`100%`,"--lift":`-1`}),l&&(y({"--y":`0`,"--opacity":`1`}),h&&y({"--y":`calc(var(--lift) * var(--offset))`,"--height":`var(--initial-height)`})),t||y({"--opacity":`0`,pointerEvents:`none`}),p&&m&&(y({"--base-scale":`var(--index) * 0.05 + 1`,"--y":`calc(var(--lift-amount) * var(--index))`,"--scale":`calc(-1 * var(--base-scale))`,"--height":`var(--first-height)`}),t||y({"--y":`calc(var(--sign) * 40%)`})),p&&h&&!t&&y({"--y":`calc(var(--lift) * var(--offset) + var(--lift) * -100%)`}),f&&!t&&y({"--y":`calc(var(--lift) * -100%)`}),v}function Nv(e,t){let{computed:n}=e,r={position:`absolute`,inset:`0`,scale:`1 2`,pointerEvents:t?`none`:`auto`};return n(`frontmost`)&&!t&&(e=>Object.assign(r,e))({height:`calc(var(--initial-height) + 80%)`}),r}function Pv(){return{position:`absolute`,left:`0`,height:`calc(var(--gap) + 2px)`,bottom:`100%`,width:`100%`}}function Fv(e,t){let{context:n,prop:r,send:i,refs:a,computed:o}=e;return{getCount(){return n.get(`toasts`).length},getToasts(){return n.get(`toasts`)},getGroupProps(n={}){let{label:s=`Notifications`}=n,{hotkey:c}=r(`store`).attrs,l=c.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),u=o(`placement`),[d,f=`center`]=u.split(`-`);return t.element({...bv.group.attrs,dir:r(`dir`),tabIndex:-1,role:`region`,"aria-label":`${s}, ${u} (${l})`,id:xv(u),"data-placement":u,"data-side":d,"data-align":f,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,style:jv(e,u),onMouseEnter(){a.get(`ignoreMouseTimer`).isActive()||i({type:`REGION.POINTER_ENTER`,placement:u})},onMouseMove(){a.get(`ignoreMouseTimer`).isActive()||i({type:`REGION.POINTER_ENTER`,placement:u})},onMouseLeave(){a.get(`ignoreMouseTimer`).isActive()||i({type:`REGION.POINTER_LEAVE`,placement:u})},onFocus(e){i({type:`REGION.FOCUS`,target:e.relatedTarget})},onBlur(e){a.get(`isFocusWithin`)&&!j(e.currentTarget,e.relatedTarget)&&queueMicrotask(()=>i({type:`REGION.BLUR`}))}})},subscribe(e){return r(`store`).subscribe(()=>e(n.get(`toasts`)))}}}var{guards:Iv,createMachine:Lv}=Wo(),{and:Rv}=Iv,zv=Lv({props({props:e}){return{dir:`ltr`,id:Wa(),...e,store:e.store}},initialState({prop:e}){return e(`store`).attrs.overlap?`overlap`:`stack`},refs(){return{lastFocusedEl:null,isFocusWithin:!1,isPointerWithin:!1,ignoreMouseTimer:Ur.create(),dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:e=>e.map(e=>e.id).join(`,`)})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get(`toasts`).length,overlap:({prop:e})=>e(`store`).attrs.overlap,placement:({prop:e})=>e(`store`).attrs.placement},effects:[`subscribeToStore`,`trackDocumentVisibility`,`trackHotKeyPress`],watch({track:e,context:t,action:n}){e([()=>t.hash(`toasts`)],()=>{queueMicrotask(()=>{n([`collapsedIfEmpty`,`setDismissableBranch`])})})},exit:[`clearDismissableBranch`,`clearLastFocusedEl`,`clearMouseEventTimer`],on:{"DOC.HOTKEY":{actions:[`focusRegionEl`]},"REGION.BLUR":[{guard:Rv(`isOverlapping`,`isPointerOut`),target:`overlap`,actions:[`collapseToasts`,`resumeToasts`,`restoreFocusIfPointerOut`]},{guard:`isPointerOut`,target:`stack`,actions:[`resumeToasts`,`restoreFocusIfPointerOut`]},{actions:[`clearFocusWithin`]}],"TOAST.REMOVE":{actions:[`removeToast`,`removeHeight`,`ignoreMouseEventsTemporarily`]},"TOAST.PAUSE":{actions:[`pauseToasts`]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:`isOverlapping`,target:`overlap`,actions:[`clearPointerWithin`,`resumeToasts`,`collapseToasts`]},{actions:[`clearPointerWithin`,`resumeToasts`]}],"REGION.OVERLAP":{target:`overlap`,actions:[`collapseToasts`]},"REGION.FOCUS":{actions:[`setLastFocusedEl`,`pauseToasts`]},"REGION.POINTER_ENTER":{actions:[`setPointerWithin`,`pauseToasts`]}}},overlap:{on:{"REGION.STACK":{target:`stack`,actions:[`expandToasts`]},"REGION.POINTER_ENTER":{target:`stack`,actions:[`setPointerWithin`,`pauseToasts`,`expandToasts`]},"REGION.FOCUS":{target:`stack`,actions:[`setLastFocusedEl`,`pauseToasts`,`expandToasts`]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e(`overlap`),isPointerOut:({refs:e})=>!e.get(`isPointerWithin`)},effects:{subscribeToStore({context:e,prop:t}){let n=t(`store`);return e.set(`toasts`,n.getVisibleToasts()),n.subscribe(t=>{if(t.dismiss){e.set(`toasts`,e=>e.filter(e=>e.id!==t.id));return}e.set(`toasts`,e=>{let n=e.findIndex(e=>e.id===t.id);return n===-1?[t,...e]:[...e.slice(0,n),{...e[n],...t},...e.slice(n+1)]})})},trackHotKeyPress({prop:e,send:t}){return F(document,`keydown`,n=>{let{hotkey:r}=e(`store`).attrs;r.every(e=>n[e]||n.code===e)&&t({type:`DOC.HOTKEY`})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){let{pauseOnPageIdle:r}=e(`store`).attrs;if(!r)return;let i=n.getDoc();return F(i,`visibilitychange`,()=>{t({type:i.visibilityState===`hidden`?`PAUSE_ALL`:`RESUME_ALL`})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:r}){let i=t.get(`toasts`),a=n(`placement`),o=i.length>0;if(!o){e.get(`dismissableCleanup`)?.();return}if(o&&e.get(`dismissableCleanup`))return;let s=Ku(()=>Sv(r,a),{defer:!0});e.set(`dismissableCleanup`,s)},clearDismissableBranch({refs:e}){e.get(`dismissableCleanup`)?.()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{Sv(e,t(`placement`))?.focus()})},pauseToasts({prop:e}){e(`store`).pause()},resumeToasts({prop:e}){e(`store`).resume()},expandToasts({prop:e}){e(`store`).expand()},collapseToasts({prop:e}){e(`store`).collapse()},removeToast({prop:e,event:t}){e(`store`).remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set(`heights`,t=>t.filter(t=>t.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t(`overlap`)||t(`count`)>1||e({type:`REGION.OVERLAP`})},setLastFocusedEl({refs:e,event:t}){!e.get(`isFocusWithin`)&&t.target&&(e.set(`isFocusWithin`,!0),e.set(`lastFocusedEl`,t.target))},restoreFocusIfPointerOut({refs:e}){e.get(`lastFocusedEl`)&&!e.get(`isPointerWithin`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null),e.set(`isFocusWithin`,!1))},setPointerWithin({refs:e}){e.set(`isPointerWithin`,!0)},clearPointerWithin({refs:e}){e.set(`isPointerWithin`,!1),e.get(`lastFocusedEl`)&&!e.get(`isFocusWithin`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null))},clearFocusWithin({refs:e}){e.set(`isFocusWithin`,!1)},clearLastFocusedEl({refs:e}){e.get(`lastFocusedEl`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null),e.set(`isFocusWithin`,!1))},ignoreMouseEventsTemporarily({refs:e}){e.get(`ignoreMouseTimer`).request()},clearMouseEventTimer({refs:e}){e.get(`ignoreMouseTimer`).cancel()}}}}),Bv={closeTriggerLabel:`Dismiss notification`};function Vv(e,t){let{state:n,send:r,prop:i,scope:a,context:o,computed:s}=e,c=lo(Bv,i(`translations`)),l=n.hasTag(`visible`),u=n.hasTag(`paused`),d=o.get(`mounted`),f=s(`frontmost`),p=i(`parent`).computed(`placement`),m=i(`type`),h=i(`stacked`),g=i(`title`),_=i(`description`),v=i(`action`),[y,b=`center`]=p.split(`-`);return{type:m,title:g,description:_,placement:p,visible:l,paused:u,closable:!!i(`closable`),pause(){r({type:`PAUSE`})},resume(){r({type:`RESUME`})},dismiss(){r({type:`DISMISS`,src:`programmatic`})},getRootProps(){return t.element({...bv.root.attrs,dir:i(`dir`),id:Cv(a),"data-state":l?`open`:`closed`,"data-type":m,"data-placement":p,"data-align":b,"data-side":y,"data-mounted":k(d),"data-paused":k(u),"data-first":k(f),"data-sibling":k(!f),"data-stack":k(h),"data-overlap":k(!h),role:`status`,"aria-atomic":`true`,"aria-describedby":_?Ev(a):void 0,"aria-labelledby":g?Tv(a):void 0,tabIndex:0,style:Mv(e,l),onKeyDown(e){e.defaultPrevented||e.key==`Escape`&&(r({type:`DISMISS`,src:`keyboard`}),e.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":`before`,style:Nv(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":`after`,style:Pv()})},getTitleProps(){return t.element({...bv.title.attrs,id:Tv(a)})},getDescriptionProps(){return t.element({...bv.description.attrs,id:Ev(a)})},getActionTriggerProps(){return t.button({...bv.actionTrigger.attrs,type:`button`,onClick(e){e.defaultPrevented||(v?.onClick?.(),r({type:`DISMISS`,src:`user`}))}})},getCloseTriggerProps(){return t.button({id:Dv(a),...bv.closeTrigger.attrs,type:`button`,"aria-label":c?.closeTriggerLabel,onClick(e){e.defaultPrevented||r({type:`DISMISS`,src:`user`})}})}}}var{not:Hv}=Uo(),Uv=R({props({props:e}){return yo(e,[`id`,`type`,`parent`,`removeDelay`],`toast`),{closable:!0,...e,duration:kv(e.duration,e.type)}},initialState({prop:e}){return e(`type`)===`loading`||e(`duration`)===1/0?`visible:persist`:`visible`},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:kv(e(`duration`),e(`type`))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e(`parent`).context.get(`toasts`),n=t.findIndex(t=>t.id===e(`id`));return t.length-n},height:({prop:e})=>e(`parent`).context.get(`heights`).find(t=>t.id===e(`id`))?.height??0,heightIndex:({prop:e})=>e(`parent`).context.get(`heights`).findIndex(t=>t.id===e(`id`)),frontmost:({prop:e})=>e(`index`)===0,heightBefore:({prop:e})=>{let t=e(`parent`).context.get(`heights`),n=t.findIndex(t=>t.id===e(`id`));return t.reduce((e,t,r)=>r>=n?e:e+t.height,0)},shouldPersist:({prop:e})=>e(`type`)===`loading`||e(`duration`)===1/0},watch({track:e,prop:t,send:n}){e([()=>t(`message`)],()=>{let e=t(`message`);e&&n({type:e,src:`programmatic`})}),e([()=>t(`type`),()=>t(`duration`)],()=>{n({type:`UPDATE`})})},on:{UPDATE:[{guard:`shouldPersist`,target:`visible:persist`,actions:[`resetCloseTimer`]},{target:`visible:updating`,actions:[`resetCloseTimer`]}],MEASURE:{actions:[`measureHeight`]}},entry:[`setMounted`,`measureHeight`,`invokeOnVisible`],effects:[`trackHeight`],states:{"visible:updating":{tags:[`visible`,`updating`],effects:[`waitForNextTick`],on:{SHOW:{target:`visible`}}},"visible:persist":{tags:[`visible`,`paused`],on:{RESUME:{guard:Hv(`isLoadingType`),target:`visible`,actions:[`setCloseTimer`]},DISMISS:{target:`dismissing`}}},visible:{tags:[`visible`],effects:[`waitForDuration`],on:{DISMISS:{target:`dismissing`},PAUSE:{target:`visible:persist`,actions:[`syncRemainingTime`]}}},dismissing:{entry:[`invokeOnDismiss`],effects:[`waitForRemoveDelay`],on:{REMOVE:{target:`unmounted`,actions:[`notifyParentToRemove`]}}},unmounted:{entry:[`invokeOnUnmount`]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return ho(()=>{t({type:`REMOVE`,src:`timer`})},e(`removeDelay`))},waitForDuration({send:e,context:t,computed:n}){if(!n(`shouldPersist`))return ho(()=>{e({type:`DISMISS`,src:`timer`})},t.get(`remainingTime`))},waitForNextTick({send:e}){return ho(()=>{e({type:`SHOW`,src:`timer`})},0)},trackHeight({scope:e,prop:t}){let n;return I(()=>{let r=wv(e);if(!r)return;let i=new(e.getWin()).MutationObserver(()=>{let e=Wv(r),n={id:t(`id`),height:e};Gv(t(`parent`),n)});i.observe(r,{childList:!0,subtree:!0,characterData:!0}),n=()=>i.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e(`type`)===`loading`,shouldPersist:({computed:e})=>e(`shouldPersist`)},actions:{setMounted({context:e}){I(()=>{e.set(`mounted`,!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{let r=wv(e);if(!r)return;let i=Wv(r);n.set(`initialHeight`,i);let a={id:t(`id`),height:i};Gv(t(`parent`),a)})},setCloseTimer({refs:e}){e.set(`closeTimerStartTime`,Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set(`closeTimerStartTime`,Date.now()),e.set(`remainingTime`,kv(n(`duration`),n(`type`)))},syncRemainingTime({context:e,refs:t}){e.set(`remainingTime`,e=>{let n=t.get(`closeTimerStartTime`),r=Date.now()-n;return t.set(`lastCloseStartTimerStartTime`,Date.now()),e-r})},notifyParentToRemove({prop:e}){e(`parent`).send({type:`TOAST.REMOVE`,id:e(`id`)})},invokeOnDismiss({prop:e,event:t}){e(`onStatusChange`)?.({status:`dismissing`,src:t.src})},invokeOnUnmount({prop:e}){e(`onStatusChange`)?.({status:`unmounted`})},invokeOnVisible({prop:e}){e(`onStatusChange`)?.({status:`visible`})}}}});function Wv(e){let t=e.style.height;e.style.height=`auto`;let n=e.offsetHeight;return e.style.height=t,n}function Gv(e,t){let{id:n,height:r}=t;e.context.set(`heights`,e=>e.find(e=>e.id===n)?e.map(e=>e.id===n?{...e,height:r}:e):[{id:n,height:r},...e])}var Kv=(e,t)=>({...t,...co(e)}),qv={error:[1,2],warning:[3,6],loading:[4,5],success:[5,7],info:[6,8]},Jv=`info`,Yv=(e,t)=>{let[n,r]=qv[e??Jv];return t?n:r},Xv=e=>e.sort((e,t)=>(e.priority??Yv(e.type,!!e.action))-(t.priority??Yv(t.type,!!t.action)));function Zv(e={}){let t=Kv(e,{placement:`bottom`,overlap:!1,max:24,gap:16,offsets:`1rem`,hotkey:[`altKey`,`KeyT`],removeDelay:200,pauseOnPageIdle:!0}),n=[],r=[],i=new Set,a=[],o=e=>(n.push(e),()=>{let t=n.indexOf(e);n.splice(t,1)}),s=e=>(n.forEach(t=>t(e)),e),c=e=>{if(r.length>=t.max){a.push(e);return}s(e),r.unshift(e)},l=()=>{for(a=Xv(a);a.length>0&&r.length<t.max;){let e=a.shift();e&&(s(e),r.unshift(e))}},u=e=>{let n=e.id??`toast:${Wa()}`,a=r.find(e=>e.id===n);if(i.has(n)&&i.delete(n),a)r=r.map(t=>t.id===n?s({...t,...e,id:n}):t);else{let r={id:n,duration:t.duration,removeDelay:t.removeDelay,type:Jv,...e,stacked:!t.overlap,gap:t.gap},i=r.priority??Yv(r.type,!!r.action);c({...r,priority:i})}return n},d=e=>(i.add(e),e?(n.forEach(t=>t({id:e,dismiss:!0})),r=r.filter(t=>t.id!==e),l()):(r.forEach(e=>{n.forEach(t=>t({id:e.id,dismiss:!0}))}),r=[],a=[]),e);return{attrs:t,subscribe:o,create:u,update:(e,t)=>u({id:e,...t}),remove:d,dismiss:e=>{r=e==null?r.map(e=>s({...e,message:`DISMISS`})):r.map(t=>t.id===e?s({...t,message:`DISMISS`}):t)},error:e=>u({...e,type:`error`}),success:e=>u({...e,type:`success`}),info:e=>u({...e,type:`info`}),warning:e=>u({...e,type:`warning`}),loading:e=>u({...e,type:`loading`}),getVisibleToasts:()=>r.filter(e=>!i.has(e.id)),getCount:()=>r.length,promise:(e,t,n={})=>{if(!t||!t.loading){go(`[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified`);return}let r=u({...n,...t.loading,promise:e,type:`loading`}),i=!0,a,o=Va(e).then(async e=>{if(a=[`resolve`,e],Qv(e)&&!e.ok){i=!1;let a=Va(t.error,`HTTP Error! status: ${e.status}`);u({...n,...a,id:r,type:`error`})}else if(t.success!==void 0){i=!1;let a=Va(t.success,e);u({...n,...a,id:r,type:a.type??`success`})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let a=Va(t.error,e);u({...n,...a,id:r,type:`error`})}}).finally(()=>{i&&d(r),t.finally?.()});return{id:r,unwrap:()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t))}},pause:e=>{r=e==null?r.map(e=>s({...e,message:`PAUSE`})):r.map(t=>t.id===e?s({...t,message:`PAUSE`}):t)},resume:e=>{r=e==null?r.map(e=>s({...e,message:`RESUME`})):r.map(t=>t.id===e?s({...t,message:`RESUME`}):t)},isVisible:e=>!i.has(e)&&!!r.find(t=>t.id===e),isDismissed:e=>i.has(e),expand:()=>{r=r.map(e=>s({...e,stacked:!0}))},collapse:()=>{r=r.map(e=>s({...e,stacked:!1}))}}}var Qv=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,$v={connect:Fv,machine:zv},ey={class:`k-toast__body`},ty=E({__name:`KToastItem`,props:{actor:{type:Object,required:!0},index:{type:Number,required:!0},parent:{type:Object,required:!0}},setup(e){let n=e,r=B(Uv,(0,t.computed)(()=>({...n.actor,parent:n.parent,index:n.index}))),i=(0,t.computed)(()=>Vv(r,z)),a={info:`info`,success:`check-badge`,warning:`alert`,error:`reject`,loading:`spinner`};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)({class:`k-toast`},i.value.getRootProps()),[(0,t.createElementVNode)(`span`,(0,t.normalizeProps)((0,t.guardReactiveProps)(i.value.getGhostBeforeProps())),null,16),(0,t.createVNode)(D,{name:a[i.value.type]||`info`,size:18,class:`k-toast__icon`,spin:i.value.type===`loading`},null,8,[`name`,`spin`]),(0,t.createElementVNode)(`div`,ey,[i.value.title?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:0,class:`k-toast__title`},i.value.getTitleProps()),(0,t.toDisplayString)(i.value.title),17)):(0,t.createCommentVNode)(``,!0),i.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,(0,t.mergeProps)({key:1,class:`k-toast__text`},i.value.getDescriptionProps()),(0,t.toDisplayString)(i.value.description),17)):(0,t.createCommentVNode)(``,!0)]),i.value.closable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,(0,t.mergeProps)({key:0,class:`k-toast__close`,"aria-label":`Закрыть`},i.value.getCloseTriggerProps()),[(0,t.createVNode)(D,{name:`close`,size:14})],16)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,(0,t.normalizeProps)((0,t.guardReactiveProps)(i.value.getGhostAfterProps())),null,16)],16))}},[[`__scopeId`,`data-v-259b0872`]]),ny=Zv({placement:`top-end`,duration:4e3,removeDelay:400,gap:12}),ry={info:`info`,success:`success`,warning:`warning`,danger:`error`,error:`error`,loading:`loading`};function iy({title:e=``,text:t=``,tone:n=`info`,timeout:r}={}){let i={title:e,description:t,type:ry[n]??`info`};return r===0?i.duration=1/0:r!=null&&(i.duration=r),ny.create(i)}function ay(e){ny.dismiss(e)}function oy(){return{toast:iy,success:(e,t)=>iy({title:e,text:t,tone:`success`}),info:(e,t)=>iy({title:e,text:t,tone:`info`}),warning:(e,t)=>iy({title:e,text:t,tone:`warning`}),error:(e,t)=>iy({title:e,text:t,tone:`danger`}),loading:(e,t)=>iy({title:e,text:t,tone:`loading`,timeout:0}),dismiss:ay}}var sy=E({__name:`KToast`,setup(e){let n=B($v.machine,{id:(0,t.useId)(),store:ny}),r=(0,t.computed)(()=>$v.connect(n,z));return(e,i)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:`body`},[(0,t.createElementVNode)(`div`,(0,t.mergeProps)({class:`k-toasts`},r.value.getGroupProps({label:`Уведомления`})),[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(r.value.getToasts(),(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(ty,{key:e.id,actor:e,index:r,parent:(0,t.unref)(n)},null,8,[`actor`,`index`,`parent`]))),128))],16)]))}},[[`__scopeId`,`data-v-c623c427`]]),cy=class{list=[];prefix=new Float64Array(64);rowPrefix=new Float64Array(64);dirtyFrom=0;get length(){return this.list.length}total(){return this.build(),this.prefix[this.list.length]}rows(){return this.build(),this.rowPrefix[this.list.length]}offset(e){this.build();let t=this.list.length;return this.prefix[e<0?0:e>t?t:e]}rowOf(e){this.build();let t=this.list.length;return this.rowPrefix[e<0?0:e>t?t:e]}indexOf(e){return this.build(),this.list[e.index]===e?e.index:-1}indexAt(e){return this.build(),ly(this.prefix,this.list.length,e)}indexAtRow(e){return this.build(),ly(this.rowPrefix,this.list.length,e)}insert(e,t){if(t.length){if(e>=this.list.length)for(let e of t)this.list.push(e);else this.list=e<=0?t.concat(this.list):this.list.slice(0,e).concat(t,this.list.slice(e));this.touch(e)}}replace(e,t,n){this.list=this.list.slice(0,e).concat(n,this.list.slice(e+t)),this.touch(e)}assign(e){this.list=e,this.dirtyFrom=0}remove(e,t=1){let n=this.list.splice(e,t);return this.touch(e),n}clear(){this.list=[],this.dirtyFrom=0}setHeight(e,t){e.height=t,this.touch(e.index)}touch(e){e<this.dirtyFrom&&(this.dirtyFrom=Math.max(0,e))}build(){let e=this.list.length;if(this.dirtyFrom>=e+1)return;if(this.prefix.length<e+1){let t=Math.max(e+1,this.prefix.length*2),n=new Float64Array(t);n.set(this.prefix.subarray(0,this.dirtyFrom+1)),this.prefix=n;let r=new Float64Array(t);r.set(this.rowPrefix.subarray(0,this.dirtyFrom+1)),this.rowPrefix=r}let t=this.prefix,n=this.rowPrefix,r=this.list,i=this.dirtyFrom,a=i===0?0:t[i],o=i===0?0:n[i];for(t[0]=0,n[0]=0;i<e;i++){let e=r[i];e.index=i,a+=e.height,o+=e.count??1,t[i+1]=a,n[i+1]=o}this.dirtyFrom=e+1}};function ly(e,t,n){if(t===0)return 0;let r=0,i=t-1;for(;r<i;){let t=r+i+1>>1;e[t]<=n?r=t:i=t-1}return r}function uy(e){let t=[];for(let n of e.querySelectorAll(`img`))n.complete||t.push(n);for(let n of e.querySelectorAll(`video`))n.readyState<1&&n.preload!==`none`&&t.push(n);return t}function dy(e){return uy(e).length>0}function fy(e,t){let n=[];for(let t of e)for(let e of uy(t))e instanceof HTMLImageElement&&e.loading===`lazy`&&(e.loading=`eager`),n.push(new Promise(t=>{let n=()=>t(),r=e instanceof HTMLVideoElement?`loadedmetadata`:`load`;e.addEventListener(r,n,{once:!0}),e.addEventListener(`error`,n,{once:!0})}));return!n.length||t<=0?Promise.resolve():new Promise(e=>{let r=setTimeout(e,t);Promise.all(n).then(()=>{clearTimeout(r),e()})})}var py=`
|
|
3
|
+
.eds{position:relative;overflow:hidden;contain:strict;--eds-row:64px}
|
|
4
|
+
.eds-viewport{position:absolute;inset:0;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;overflow-anchor:none;overscroll-behavior:contain;scrollbar-gutter:stable;outline:none}
|
|
5
|
+
.eds[data-origin=bottom]>.eds-viewport{flex-direction:column-reverse}
|
|
6
|
+
.eds-content{flex:none;display:flex;flex-direction:column;box-sizing:border-box;width:100%}
|
|
7
|
+
.eds-spacer{flex:none}
|
|
8
|
+
.eds-item{flex:none;position:relative;contain:size layout style}
|
|
9
|
+
.eds-host{display:flow-root}
|
|
10
|
+
.eds-gap{flex:none;position:relative;contain:strict;background:linear-gradient(transparent var(--eds-gap-pad,8px),var(--eds-gap-color,rgba(127,127,127,.13)) var(--eds-gap-pad,8px) calc(100% - var(--eds-gap-pad,8px)),transparent calc(100% - var(--eds-gap-pad,8px))) var(--eds-gap-inset,16px) 0/calc(100% - 2 * var(--eds-gap-inset,16px)) var(--eds-row) repeat-y;animation:eds-pulse 1.1s ease-in-out infinite alternate}
|
|
11
|
+
@keyframes eds-pulse{from{opacity:.55}to{opacity:1}}
|
|
12
|
+
@media (prefers-reduced-motion:reduce){.eds-gap{animation:none}}
|
|
13
|
+
.eds-measure{position:absolute;top:0;left:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none;contain:strict}
|
|
14
|
+
.eds-measure>.eds-item{height:auto!important}
|
|
15
|
+
.eds-loader{position:absolute;left:50%;z-index:1;display:flex;pointer-events:none;opacity:0;transform:translate(-50%,0) scale(.8);transition:opacity .18s,transform .18s}
|
|
16
|
+
.eds-loader[data-side=before]{top:var(--eds-loader-offset,10px)}
|
|
17
|
+
.eds-loader[data-side=after]{bottom:var(--eds-loader-offset,10px)}
|
|
18
|
+
.eds-loader[data-active]{opacity:1;transform:translate(-50%,0) scale(1);transition-delay:.12s}
|
|
19
|
+
.eds-spinner{box-sizing:border-box;width:30px;height:30px;padding:6px;border-radius:50%;background:var(--eds-loader-bg,rgba(127,127,127,.18));backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
|
|
20
|
+
.eds-spinner::after{content:"";display:block;width:100%;height:100%;box-sizing:border-box;border-radius:50%;border:2px solid var(--eds-loader-color,currentColor);border-right-color:transparent;animation:eds-spin .7s linear infinite}
|
|
21
|
+
@keyframes eds-spin{to{transform:rotate(360deg)}}
|
|
22
|
+
`,my=new WeakSet;function hy(e){if(my.has(e))return;my.add(e);let t=e.createElement(`style`);t.dataset.eds=``,t.textContent=py,e.head.prepend(t)}var gy=.1,_y=4,vy=4,yy=15e6;function by(e){return Math.ceil(e-.02)}var xy=[`before`,`after`];function Sy(e){let t=document.createElement(`div`);return t.className=e,t}function Cy(){return new Promise(e=>{typeof requestIdleCallback==`function`?requestIdleCallback(()=>e(),{timeout:400}):setTimeout(e,32)})}var wy=class{root;viewport;content;o;bottom;virtual;near;far;spacerBefore;spacerAfter;measurer;loaders={};layout=new cy;keys=new Map;hosts=new WeakMap;cache=new Set;rs=0;re=0;spacerSizes=[-1,-1];padStart=0;padEnd=0;vh=0;width=0;more;state={before:`idle`,after:`idle`,range:`idle`};cooldown={before:0,after:0};queue={before:[],after:[]};chain={before:Promise.resolve(),after:Promise.resolve()};pending=new Map;active=!1;touching=!1;pressing=!1;idleTimer=0;staleTimer=0;retryTimer=0;expect=null;gen=0;stuck=!0;visible=[-1,-1,null,null];structGen=0;rowVar=0;lastTotal=-1;pattern=0;seen=null;pin=null;requests=[];rangeCooldown=0;rangeTimer=0;trail=[];loadMs=800;sumH=0;sumN=0;destroyed=!1;dirtyCommit=!1;inObserver=!1;toObserve=[];observeFrame=0;remeasuring=!1;fontsReady;sized=Promise.resolve();onSized=null;ro;vro;counters={requests:0,created:0,measured:0,scrollWrites:0,busyWrites:0,shift:0};constructor(e,t){this.root=e,this.o=t,this.bottom=t.origin===`bottom`,this.virtual=(t.mode??(t.loadRange?`virtual`:`infinite`))===`virtual`,this.near=this.bottom?`after`:`before`,this.far=this.bottom?`before`:`after`;let n=this.baseMore();this.more={before:t.hasBefore??n.before,after:t.hasAfter??n.after},hy(e.ownerDocument),e.classList.add(`eds`),e.dataset.origin=this.bottom?`bottom`:`top`,e.dataset.mode=this.virtual?`virtual`:`infinite`,this.viewport=Sy(`eds-viewport`),this.viewport.tabIndex=0,this.content=Sy(`eds-content`),this.spacerBefore=Sy(`eds-spacer`),this.spacerAfter=Sy(`eds-spacer`),this.content.append(this.spacerBefore,this.spacerAfter),this.viewport.append(this.content),this.measurer=Sy(`eds-content eds-measure`),this.measurer.setAttribute(`aria-hidden`,`true`),e.append(this.viewport,this.measurer);for(let n of xy){if(!this.loaderOf(n))continue;let r=Sy(`eds-loader`);r.dataset.side=n;let i=t.renderLoader?.(n);r.append(i===void 0?Sy(`eds-spinner`):i??``),e.append(r),this.loaders[n]=r}let r=this.viewport;r.addEventListener(`scroll`,this.onScroll,{passive:!0}),r.addEventListener(`wheel`,this.onWheel,{passive:!0}),r.addEventListener(`touchstart`,this.onTouchStart,{passive:!0}),r.addEventListener(`touchend`,this.onTouchEnd,{passive:!0}),r.addEventListener(`touchcancel`,this.onTouchEnd,{passive:!0}),r.addEventListener(`pointerdown`,this.onPointerDown,{passive:!0}),r.addEventListener(`keydown`,this.onKey,{passive:!0}),window.addEventListener(`pointerup`,this.onPointerUp,{passive:!0}),window.addEventListener(`pointercancel`,this.onPointerUp,{passive:!0}),this.ro=new ResizeObserver(this.onItemsResize),this.vro=new ResizeObserver(this.onViewportResize),this.vro.observe(this.viewport),this.readMetrics(),this.width||(this.sized=new Promise(e=>this.onSized=e));let i=e.ownerDocument.fonts;this.fontsReady=i?i.ready.catch(()=>{}):Promise.resolve(),i?.addEventListener(`loadingdone`,this.onFonts),this.virtual?this.reset(t.items,{total:t.total,anchor:t.anchor}):t.items?.length?this.reset(t.items,{hasBefore:t.hasBefore,hasAfter:t.hasAfter,anchor:t.anchor}):this.sync()}get mode(){return this.virtual?`virtual`:`infinite`}get items(){let e=[];for(let t of this.layout.list)t.gap||e.push(t.item);return e}get size(){return this.keys.size}get total(){return this.layout.rows()}get isStuck(){return this.stuck}get loadState(){return{...this.state}}get hasMore(){return{...this.more}}get stats(){return{loaded:this.keys.size,total:this.layout.rows(),rendered:this.re-this.rs,cached:this.cache.size,...this.counters}}has(e){return this.keys.has(e)}get(e){return this.keys.get(e)?.item}append(e){return this.add(`after`,e)}prepend(e){return this.add(`before`,e)}update(e,t){let n=this.keys.get(e);if(!n)return!1;if(t!==void 0&&(n.item=t),n.node){let e=n.node.host;if(this.o.update){let t=this.o.update(n.item,e);t&&e.replaceChildren(t)}else{this.o.unmount?.(n.item,e),e.replaceChildren();let t=this.o.render(n.item,e);t&&e.append(t)}this.dirtyCommit=!0,this.flushCommit()}return n.attached||(n.stale=!0,this.scheduleRemeasure()),!0}remove(e){let t=this.keys.get(e);if(!t)return!1;let n=this.getPos(),r=this.viewTop(n),i=this.zoneOf(t,r),a=i===`near`?this.nearGaps(r):[],o=this.layout.indexOf(t);this.pin&&o>=0&&this.layout.rowOf(o)<this.pin.row&&this.pin.row--,this.destroyNode(t),this.keys.delete(e),this.pending.delete(t),this.structGen++,o>=0&&(this.layout.remove(o),o<this.rs?(this.rs--,this.re--):o<this.re&&this.re--);let s=i===`near`?this.absorb(-t.height,a):0;return this.refreshSpacers(),s!==0&&this.setPos(n+s),this.flushCommit(),this.sync(),!0}async reset(e=[],t={}){if(this.virtual)return this.resetRows(e,t);let n=++this.gen,r=e.length?await this.measure(this.fresh(e,!1),!0):[];if(n!==this.gen||this.destroyed){r.forEach(e=>this.destroyNode(e));return}this.clear();let i=this.baseMore();this.more.before=t.hasBefore??i.before,this.more.after=t.hasAfter??i.after;for(let e of r)this.keys.set(e.key,e),this.cache.add(e);this.layout.insert(0,r),this.refreshSpacers();let a=t.anchor===void 0?void 0:this.keys.get(t.anchor);a?this.setPos(this.posFor(a,t.align??`center`,0)):this.setPos(0),this.sync()}async resetRows(e,t){let n=++this.gen,r=Math.max(0,Math.floor(t.index??0)),i=e.length?await this.measure(this.fresh(e,!1),!0):[];if(n!==this.gen||this.destroyed){i.forEach(e=>this.destroyNode(e));return}let a=this.layout.rows();this.clear(),this.structGen++,this.more.before=!1,this.more.after=!1;let o=t.total===null?void 0:t.total??(a||this.o.total),s=i.length?r+i.length:0,c=o===void 0?s:Math.max(o,s);c>0&&this.layout.insert(0,[this.makeGap(c,this.gapHeight(c))]),this.refreshSpacers(),i.length&&this.fillRows(r,i);let l=t.anchor===void 0?void 0:this.keys.get(t.anchor);if(l)this.setPos(this.posFor(l,t.align??`center`,0));else if(t.index!==void 0&&c>0){let e=Math.min(r,c-1);this.pin={row:e,align:t.align??`start`},this.setPos(this.rowPos(e,this.pin.align,0))}else this.setPos(0);this.sync()}rowPos(e,t,n){let r=this.layout,i=r.indexAtRow(e),a=r.list[i],o=this.padStart+r.offset(i),s=a.height;return a.gap&&(s=a.height/a.count,o+=Math.round((e-r.rowOf(i))*s)),this.posAt(o,s,t,n)}scrollToKey(e,t={}){let n=this.keys.get(e);return n?(this.pin=null,this.scrollToPos(this.posFor(n,t.align??`center`,t.offset??0),t.behavior),!0):!1}scrollToIndex(e,t={}){if(!Number.isFinite(e)||e<0||e>=this.layout.rows())return!1;let n=Math.floor(e),r=t.align??`center`;return this.pin=this.virtual?{row:n,align:r}:null,this.scrollToPos(this.rowPos(n,r,t.offset??0),t.behavior),!0}setTotal(e){if(!this.virtual||!Number.isFinite(e))return;let t=Math.max(0,Math.floor(e)),n=this.layout.rows();t!==n&&(t>n?this.growTail(t-n):this.shrinkTail(n-t,!0),this.structGen++,this.flushCommit(),this.sync())}indexOfKey(e){let t=this.keys.get(e),n=t?this.layout.indexOf(t):-1;return n<0?-1:this.layout.rowOf(n)}scrollToTop(e={}){this.scrollToEdge(`before`,e.behavior)}scrollToBottom(e={}){this.scrollToEdge(`after`,e.behavior)}refresh(){this.readMetrics(),this.markStale(),this.sync()}debug(){let e=0;for(let t=this.rs;t<this.re;t++){let n=this.layout.list[t];!n?.node||n.gap||this.pending.has(n)||n.waiting||by(n.node.host.getBoundingClientRect().height)!==n.height&&e++}return{model:this.padStart+this.layout.total()+this.padEnd,dom:this.content.offsetHeight,mismatched:e}}destroy(){if(this.destroyed)return;this.destroyed=!0,this.gen++,clearTimeout(this.idleTimer),clearTimeout(this.staleTimer),clearTimeout(this.retryTimer),clearTimeout(this.rangeTimer),cancelAnimationFrame(this.observeFrame),this.ro.disconnect(),this.vro.disconnect();let e=this.viewport;e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`wheel`,this.onWheel),e.removeEventListener(`touchstart`,this.onTouchStart),e.removeEventListener(`touchend`,this.onTouchEnd),e.removeEventListener(`touchcancel`,this.onTouchEnd),e.removeEventListener(`pointerdown`,this.onPointerDown),e.removeEventListener(`keydown`,this.onKey),window.removeEventListener(`pointerup`,this.onPointerUp),window.removeEventListener(`pointercancel`,this.onPointerUp),this.root.ownerDocument.fonts?.removeEventListener(`loadingdone`,this.onFonts);for(let e of this.layout.list)this.destroyNode(e);for(let e of xy)for(let t of this.queue[e])this.destroyNode(t);this.layout.clear(),this.keys.clear(),this.viewport.remove(),this.measurer.remove();for(let e of xy)this.loaders[e]?.remove();this.root.classList.remove(`eds`),delete this.root.dataset.origin,delete this.root.dataset.mode,this.root.style.removeProperty(`--eds-row`)}baseMore(){let e={before:!1,after:!1};return e[this.far]=!!this.loaderOf(this.far),e}loaderOf(e){if(!this.virtual)return e===`before`?this.o.loadBefore:this.o.loadAfter}fresh(e,t){let n=new Set,r=[];for(let i of e){let e=this.o.getKey(i);n.has(e)||t&&this.keys.has(e)||(n.add(e),r.push(i))}return r}add(e,t){let n=async()=>{if(this.destroyed||this.more[e])return;let n=this.gen,r=this.fresh(t,!0);if(!r.length)return;let i=!(e===this.near&&this.isStuckLive()),a=await this.measure(r,i);if(n!==this.gen||this.destroyed||this.more[e]){a.forEach(e=>this.destroyNode(e));return}this.insert(e,a.filter(e=>!this.keys.has(e.key)))},r=this.chain[e].then(n,n);return this.chain[e]=r,r}async measure(e,t){if(await this.fontsReady,await this.sized,this.destroyed)return[];let n=e.map(e=>({key:this.o.getKey(e),item:e,height:0,index:-1,count:1,gap:!1,phase:NaN,node:null,attached:!1,stale:!1,waiting:!1})),r=document.createDocumentFragment();for(let e of n)r.append(this.createNode(e).wrap);this.measurer.append(r),this.dirtyCommit=!0,await this.flushCommit(),t&&await fy(n.map(e=>e.node.host),this.o.mediaTimeout??1500);let i=n.filter(e=>e.node);for(let e of i)e.height=by(e.node.host.getBoundingClientRect().height),this.sumH+=e.height,this.sumN++;for(let e of i)e.node.wrap.parentNode===this.measurer&&e.node.wrap.remove();return this.counters.measured+=i.length,i}insert(e,t){if(t.length){if(e===this.far)return this.insertNow(e,t,!1,!1);if(this.isStuckLive())return this.insertNow(e,t,!1,!0);if(this.isBusy()){let n=t.reduce((e,t)=>e+t.height,0);if(!this.virtual||n>this.room(this.nearGaps(this.viewTop()))){this.queue[e].push(...t);return}}this.insertNow(e,t,!0,!1)}}insertNow(e,t,n,r){let i=t.filter(e=>!this.keys.has(e.key));for(let e of t)i.includes(e)||this.destroyNode(e);if(!i.length)return;let a=this.getPos(),o=n?this.nearGaps(this.viewTop(a)):[],s=0;for(let e of i)s+=e.height,this.keys.set(e.key,e),this.cache.add(e);e===`before`?(this.layout.insert(0,i),this.structGen++,this.pin&&(this.pin.row+=i.length),this.re>0&&(this.rs+=i.length,this.re+=i.length)):this.layout.insert(this.layout.length,i);let c=n?this.absorb(s,o):0;this.refreshSpacers(),c!==0&&this.setPos(a+c),r&&this.slide(s),this.sync()}slide(e){let t=this.o.animate??!0;if(!t||e<=0||typeof this.content.animate!=`function`||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let n=typeof t==`object`?t:{},r=this.bottom?e:-e;this.content.animate([{transform:`translateY(${r}px)`},{transform:`translateY(0)`}],{duration:n.duration??260,easing:n.easing??`cubic-bezier(.22,.9,.3,1)`,composite:`add`})}clear(){for(let e of this.layout.list)this.destroyNode(e);for(let e of xy){for(let t of this.queue[e])this.destroyNode(t);this.queue[e]=[],this.setState(e,`idle`),this.cooldown[e]=0}this.cache.clear(),this.layout.clear(),this.keys.clear(),this.pending.clear(),this.requests=[],this.trail=[],this.pin=null,this.seen=null,clearTimeout(this.rangeTimer),this.rangeTimer=0,this.rangeCooldown=0,this.setState(`range`,`idle`),this.rs=0,this.re=0,this.visible=[-1,-1,null,null];for(let e of this.content.getAnimations?.()??[])e.cancel();this.refreshSpacers(),this.flushCommit()}createNode(e){let t=Sy(`eds-item`),n=Sy(`eds-host`);t.append(n);let r=this.o.render(e.item,n);return r&&n.append(r),e.node={wrap:t,host:n},this.hosts.set(n,e),this.counters.created++,this.dirtyCommit=!0,e.node}destroyNode(e){this.cache.delete(e);let t=e.node;if(t){if(e.gap){t.wrap.remove(),e.node=null,e.attached=!1;return}this.ro.unobserve(t.host),t.wrap.remove(),this.hosts.delete(t.host),e.node=null,e.attached=!1,this.o.unmount?.(e.item,t.host),this.dirtyCommit=!0}}attach(e){if(e.gap){if(!e.node){let t=Sy(`eds-gap`);t.setAttribute(`aria-hidden`,`true`),e.node={wrap:t,host:t},e.phase=NaN}return this.paintGap(e),e.attached=!0,e.node.wrap}let t=e.node??this.createNode(e);return t.wrap.style.height=`${e.height}px`,this.cache.delete(e),e.attached=!0,this.observe(t.host),t.wrap}observe(e){if(!this.inObserver){this.ro.observe(e);return}this.toObserve.push(e),this.observeFrame||=requestAnimationFrame(this.flushObserve)}flushObserve=()=>{this.observeFrame=0;for(let e of this.toObserve.splice(0)){let t=this.hosts.get(e);t?.attached&&t.node?.host===e&&this.ro.observe(e)}};detach(e){if(e.node){if(e.gap)return this.destroyNode(e);this.ro.unobserve(e.node.host),e.node.wrap.remove(),e.attached=!1,this.cache.add(e)}}trimCache(){let e=this.o.cacheSize??400;for(let t of this.cache){if(this.cache.size<=e)break;this.destroyNode(t)}}flushCommit(){if(!this.dirtyCommit||this.destroyed)return;this.dirtyCommit=!1;let e=this.o.commit?.();if(e&&typeof e.then==`function`)return e.then(()=>{})}setRange(e,t){let n=this.layout.list,{rs:r,re:i}=this;if(e!==r||t!==i){if(r===i||t<=r||e>=i){for(let e=r;e<i;e++)this.detach(n[e]);let a=document.createDocumentFragment();for(let r=e;r<t;r++)a.append(this.attach(n[r]));this.spacerAfter.before(a)}else{for(let t=r;t<e;t++)this.detach(n[t]);for(let e=t;e<i;e++)this.detach(n[e]);if(e<r){let t=document.createDocumentFragment();for(let i=e;i<r;i++)t.append(this.attach(n[i]));this.spacerBefore.after(t)}if(t>i){let e=document.createDocumentFragment();for(let r=i;r<t;r++)e.append(this.attach(n[r]));this.spacerAfter.before(e)}}this.rs=e,this.re=t,this.refreshSpacers(),this.trimCache(),this.flushCommit()}}refreshSpacers(){let e=this.layout,t=e.offset(this.rs),n=e.total()-e.offset(this.re);t!==this.spacerSizes[0]&&(this.spacerSizes[0]=t,this.spacerBefore.style.height=`${t}px`),n!==this.spacerSizes[1]&&(this.spacerSizes[1]=n,this.spacerAfter.style.height=`${n}px`)}contentHeight(){return this.padStart+this.layout.total()+this.padEnd}maxPos(){return Math.max(0,this.contentHeight()-this.vh)}getPos(){let e=this.viewport.scrollTop;return Math.max(0,this.bottom?-e:e)}setPos(e){let t=Math.min(Math.max(0,e),this.maxPos()),n=this.getPos();this.expect=t,this.counters.scrollWrites++,this.isBusy()&&this.counters.busyWrites++,this.viewport.scrollTop=this.bottom?-t:t,this.counters.shift+=this.getPos()-n}viewTop(e=this.getPos()){return this.bottom?this.contentHeight()-e-this.vh:e}zoneOf(e,t=this.viewTop()){let n=this.layout,r=n.indexOf(e);if(r<0)return`far`;let i=this.padStart+n.offset(r),a=i+e.height,o=t+this.vh;return this.bottom?i>=o?`near`:a<=t?`far`:`visible`:a<=t?`near`:i>=o?`far`:`visible`}posFor(e,t,n){let r=this.layout;return this.posAt(this.padStart+r.offset(r.indexOf(e)),e.height,t,n)}posAt(e,t,n,r){let i=n===`start`?e-r:n===`end`?e+t-this.vh+r:e+t/2-this.vh/2,a=this.maxPos(),o=Math.min(Math.max(0,i),a);return this.bottom?a-o:o}scrollToPos(e,t=`auto`){let n=Math.min(Math.max(0,e),this.maxPos());if(t!==`smooth`){this.setPos(n),this.sync();return}let r=this.getPos(),i=this.vh*1.5;Math.abs(r-n)>i*1.4&&(this.setPos(n+Math.sign(r-n)*i),this.sync()),this.viewport.scrollTo({top:this.bottom?-n:n,behavior:`smooth`})}scrollToEdge(e,t){if(this.pin=null,e===this.near&&this.more[this.near]){this.reset();return}this.scrollToPos(e===this.near?0:this.maxPos(),t)}isBusy(){return this.active||this.touching||this.pressing}isStuckLive(){return!this.more[this.near]&&this.getPos()<=2}applyHeights(e,t){let n=[],r=this.isBusy(),i=this.getPos(),a=this.viewTop(i),o=this.pinSide(),s=o?o.gaps:this.nearGaps(a),c=this.room(s),l=0;for(let[i,u]of e){if(this.keys.get(i.key)!==i)continue;let e=this.zoneOf(i,a),d=u-i.height;if(!t&&e===`near`&&r&&!(s.length&&l+d<=c)){this.pending.set(i,u);continue}this.pending.delete(i),(o?o.comp(i,this.layout.indexOf(i)):e===`near`||t&&e===`visible`)&&(l+=d),n.push([i,u])}if(!n.length)return;for(let[e,t]of n)this.layout.setHeight(e,t),e.stale=!1,e.attached&&e.node&&(e.node.wrap.style.height=`${t}px`);let u=this.absorb(l,s);this.refreshSpacers(),u!==0&&this.setPos(i+u)}nearGaps(e){let t=[],n=this.layout,r=n.list,i=r.length;if(!this.virtual||!i)return t;let a=this.padStart;if(this.bottom){let o=e+this.vh;for(let e=n.indexAt(o-a);e<i;e++){let i=r[e];i.gap&&a+n.offset(e)>=o&&t.push(i)}}else for(let i=n.indexAt(e-a);i>=0;i--){let o=r[i];o.gap&&a+n.offset(i)+o.height<=e&&t.push(o)}return t}gapsToward(e){let t=[],n=this.layout.list;if(this.bottom)for(let r=e+1;r<n.length;r++)n[r].gap&&t.push(n[r]);else for(let r=e-1;r>=0;r--)n[r].gap&&t.push(n[r]);return t}room(e){let t=0;for(let n of e)t+=Math.max(0,n.height-n.count*_y);return t}absorb(e,t){let n=e;for(let e of t){if(n===0)break;if(this.layout.indexOf(e)<0)continue;let t=n>0?Math.min(n,e.height-e.count*_y):n;t<=0&&n>0||(this.setGapHeight(e,e.height-t),n-=t)}return n}setGapHeight(e,t){this.layout.setHeight(e,t),e.node&&this.paintGap(e)}paintGap(e){e.node.wrap.style.height=`${e.height}px`}paintPattern(e){let t=this.counters.shift,n=this.contentHeight(),r=this.viewTop(e);if(this.seen){let[n,i,a]=this.seen,o=e-n-(t-i),s=this.bottom?a-(n+o)-this.vh:n+o;this.pattern+=r-s}this.seen=[e,t,n];let i=this.rowVar||64,a=this.layout;for(let e=this.rs;e<this.re;e++){let t=a.list[e];if(!t?.gap||!t.node)continue;let n=this.padStart+a.offset(e),r=((this.pattern-n)%i+i)%i;Math.abs(r-t.phase)<.5||(t.phase=r,t.node.wrap.style.backgroundPositionY=`${Math.round(r)}px`)}}paintRow(e,t){let n=Math.max(16,Math.round(this.est()));if(this.rowVar&&Math.abs(n-this.rowVar)<4)return;let r=this.layout;for(let n=this.rs;n<this.re;n++){let i=r.list[n],a=r.offset(n);if(i?.gap&&a<t&&a+i.height>e)return}this.rowVar=n,this.root.style.setProperty(`--eds-row`,`${n}px`);for(let e of this.layout.list)e.gap&&(e.phase=NaN)}sync=()=>{if(this.destroyed)return;this.flushVisiblePending(),this.flushEdgeQueue();let e=this.layout,t=e.length,n=this.getPos(),r=this.viewTop(n)-this.padStart,i=r+this.vh;if(t===0)this.setRange(0,0);else{let n=this.o.overscan??Math.max(this.vh,400),a=e.total(),o=Math.max(0,r-n/2),s=Math.min(a,i+n/2),c=e.offset(this.rs),l=e.offset(this.re);this.rs<this.re&&c<=o&&l>=s&&c>=r-n*3&&l<=i+n*3||this.setRange(e.indexAt(r-n),Math.min(t,e.indexAt(i+n)+1))}let a=!this.more[this.near]&&n<=2;if(a!==this.stuck&&(this.stuck=a,this.o.onStickChange?.(a)),this.emitVisible(r,i),this.virtual){let t=e.rows();t!==this.lastTotal&&(this.lastTotal=t,this.o.onTotalChange?.(t)),this.paintRow(r,i),this.paintPattern(n),this.checkRange(r,i)}else this.checkLoad(r+this.padStart)};flushVisiblePending(){if(!this.pending.size)return;let e=[],t=this.viewTop();for(let[n,r]of this.pending)this.zoneOf(n,t)!==`near`&&e.push([n,r]);e.length&&this.applyHeights(e,!0)}flushEdgeQueue(){let e=this.queue[this.near];if(!e.length||this.getPos()>1)return;this.queue[this.near]=[];let t=!this.more[this.near];this.insertNow(this.near,e,!t,t)}flushDeferred(){if(this.pending.size){let e=[...this.pending];this.pending.clear(),this.applyHeights(e,!0)}for(let e of xy){let t=this.queue[e];if(!t.length)continue;this.queue[e]=[];let n=e===this.near&&this.isStuckLive();this.insertNow(e,t,!n,n)}this.virtual&&(this.rescaleFar(),this.trimLoaded()),this.sync()}emitVisible(e,t){if(!this.o.onVisibleChange)return;let n=this.layout,r=n.list,i=n.length,a=i?n.indexAt(Math.max(0,e)):0,o=i?n.indexAt(Math.max(0,t-1)):-1;for(;a<=o&&r[a].gap;)a++;for(;o>=a&&r[o].gap;)o--;let s=a<=o?r[a]:null,c=a<=o?r[o]:null,l=s?n.rowOf(a):-1,u=c?n.rowOf(o):-1,[d,f,p,m]=this.visible;(l!==d||u!==f||s!==p||c!==m)&&(this.visible=[l,u,s,c],this.o.onVisibleChange(s&&c?{first:s.item,last:c.item,firstIndex:l,lastIndex:u}:null))}threshold(){return this.o.threshold??(this.virtual?Math.max(this.vh*4,2400):Math.max(this.vh*2,1200))}pageSize(){return Math.max(1,this.o.pageSize??50)}est(){return this.sumN?this.sumH/this.sumN:this.o.estimatedHeight??60}makeGap(e,t){return{key:``,item:void 0,height:t,index:-1,count:e,gap:!0,phase:NaN,node:null,attached:!1,stale:!1,waiting:!1}}rowEstimate(e=0){let t=e,n=0;for(let e of this.layout.list)e.gap?t+=e.count:n+=e.height;let r=this.est();return t?Math.max(_y,Math.min(r,(yy-this.padStart-this.padEnd-n)/t)):r}gapHeight(e,t=this.rowEstimate(e)){return Math.max(e*_y,Math.round(e*t))}speed(){let e=performance.now();for(;this.trail.length&&e-this.trail[0][0]>120;)this.trail.shift();return this.trail.length<2?0:Math.abs(this.trail[this.trail.length-1][1]-this.trail[0][1])}velocity(){this.speed();let e=this.trail;if(e.length<2)return 0;let[t,n]=e[0],[r,i]=e[e.length-1],a=r>t?(i-n)/(r-t):0;return this.bottom?-a:a}checkRange(e,t){if(!this.o.loadRange||this.requests.length>=vy||performance.now()<this.rangeCooldown)return;let n=this.layout,r=n.length,i=this.pageSize();if(!r){this.requests.length||this.loadRows(0,i);return}let a=this.threshold(),o=this.velocity(),s=Math.min(this.vh*8,Math.abs(o)*this.loadMs*1.5),c=Math.max(0,e-a-(o<0?s:0)),l=t+a+(o>0?s:0),u=n.list,d=[],f=!1;for(let a=n.indexAt(c);a<r;a++){let r=n.offset(a);if(r>=l)break;let o=u[a];if(!o.gap)continue;let s=r+o.height;f||=r<t&&s>e;let p=o.height/o.count||1,m=n.rowOf(a),h=m+Math.min(o.count-1,Math.max(0,Math.floor((Math.max(c,r)-r)/p))),g=m+Math.min(o.count,Math.max(1,Math.ceil((Math.min(l,s)-r)/p)));for(let n=Math.floor(h/i)*i;n<g;n+=i){let a=Math.max(m,n),s=Math.min(m+o.count,n+i),c=r+(a-m)*p,l=r+(s-m)*p;d.push([a,s,l<=e?e-l:c>=t?c-t:0])}}if(d.length){if(f&&this.isBusy()&&this.speed()>this.vh){this.rangeTimer||=window.setTimeout(()=>{this.rangeTimer=0,this.sync()},120);return}d.sort((e,t)=>e[2]-t[2]);for(let[e,t]of d){if(this.requests.length>=vy)break;this.requests.some(n=>n.from<t&&e<n.to)||this.loadRows(e,t)}}}async loadRows(e,t){let n=this.o.loadRange;if(!n)return;let r=this.gen,i=this.structGen,a={from:e,to:t};this.requests.push(a),this.counters.requests++,this.setState(`range`,`loading`);let o=performance.now();try{let a=await n(e,t);if(r!==this.gen||this.destroyed)return;let s=Array.isArray(a)?a:a.items,c=Array.isArray(a)?void 0:a.total,l=s.length?await this.measure(s,!0):[];if(r!==this.gen||this.destroyed||i!==this.structGen){l.forEach(e=>this.destroyNode(e));return}this.loadMs=this.loadMs*.7+(performance.now()-o)*.3,this.applyTotal(e,t,s.length,c),this.fillRows(e,l),this.rescaleFar(),this.trimLoaded(),this.paintPattern(this.getPos())}catch(e){if(r!==this.gen||this.destroyed)return;this.rangeCooldown=performance.now()+2e3,this.setState(`range`,`error`,e),clearTimeout(this.retryTimer),this.retryTimer=window.setTimeout(this.sync,2050)}finally{let e=this.requests.indexOf(a);e>=0&&this.requests.splice(e,1),r===this.gen&&!this.destroyed&&(!this.requests.length&&this.state.range===`loading`&&this.setState(`range`,`idle`),this.flushCommit(),requestAnimationFrame(this.sync))}}applyTotal(e,t,n,r){let i=this.layout.rows()+this.queue.before.length+this.queue.after.length,a=r;a===void 0&&(a=n<t-e?e+n:Math.max(i,e+n+this.pageSize())),a=Math.max(0,Math.floor(a)),a>i?this.growTail(a-i):a<i&&this.shrinkTail(i-a)}tailCorrection(e,t){e===0||!this.bottom||t<=2||this.setPos(t+e)}growTail(e){let t=this.layout,n=t.list,r=n[n.length-1],i=this.getPos(),a=this.bottom&&i>2;if(r?.gap){r.count+=e,this.setGapHeight(r,a?r.height:r.height+this.gapHeight(e)),this.refreshSpacers();return}t.insert(t.length,[this.makeGap(e,a?0:this.gapHeight(e))]),this.refreshSpacers()}shrinkTail(e,t=!1){let n=this.layout,r=this.getPos(),i=e,a=0;for(;i>0&&n.length;){let e=n.length-1,r=n.list[e];if(!r.gap&&!t)break;if(!r.gap){i--,a+=r.height,this.keys.delete(r.key),this.pending.delete(r),this.destroyNode(r),n.remove(e),this.re>e&&(this.re=e),this.rs>e&&(this.rs=e);continue}if(r.count<=i){i-=r.count,a+=r.height,this.destroyNode(r),n.remove(e),this.re>e&&(this.re=e),this.rs>e&&(this.rs=e);continue}let o=Math.round(r.height*(r.count-i)/r.count);a+=r.height-o,r.count-=i,i=0,this.setGapHeight(r,o)}this.refreshSpacers(),this.tailCorrection(-a,r)}fillRows(e,t){let n=this.layout,r=[],i=new Set,a=new Set,o=null,s=null;for(let c=0;c<t.length;c++){let l=e+c,u=t[c];if(l>=n.rows()||a.has(u.key)){o=null;continue}a.add(u.key);let d=n.list[n.indexAtRow(l)];if(!d.gap){o=null;continue}(!o||s!==d)&&(o=[],s=d,r.push([l,o])),o.push(u),i.add(u)}for(let e of t)i.has(e)||this.destroyNode(e);for(let[,e]of r)for(let t of e){let e=this.keys.get(t.key);e&&e!==t&&this.toGap(e)}let c=[];for(let[e,t]of r)this.splitGap(e,t,c);this.refreshSpacers(),this.applyFill(c)}splitGap(e,t,n){let r=this.layout,i=r.indexAtRow(e),a=r.list[i];if(!a?.gap)return;let o=e-r.rowOf(i),s=Math.min(t.length,a.count-o),c=a.count,l=a.height,u=e=>Math.round(l*e/c),d=[];o>0&&d.push(this.makeGap(o,u(o)));for(let e=0;e<s;e++){let r=t[e];n.push([r,r.height]),r.height=u(o+e+1)-u(o+e),this.keys.set(r.key,r),this.cache.add(r),d.push(r)}for(let e=s;e<t.length;e++)this.destroyNode(t[e]);o+s<c&&d.push(this.makeGap(c-o-s,l-u(o+s))),r.replace(i,1,d);let f=d.length-1;if(i<this.rs)this.rs+=f,this.re+=f;else if(i<this.re){let e=a.node?.wrap,t=document.createDocumentFragment();for(let e of d)t.append(this.attach(e));e?.parentNode?e.replaceWith(t):this.spacerAfter.before(t),a.node=null,a.attached=!1,this.re+=f}}toGap(e){let t=this.layout,n=t.indexOf(e);if(this.keys.delete(e.key),this.pending.delete(e),n<0){this.destroyNode(e);return}let r=this.makeGap(1,e.height),i=e.attached?e.node?.wrap:void 0;i?.parentNode&&i.before(this.attach(r)),this.destroyNode(e),t.replace(n,1,[r])}applyFill(e){if(!e.length)return;let t=this.layout,n=this.getPos(),r=this.viewTop(n),i=new Set(e.map(e=>e[0])),a=this.pinSide(),o=!a&&this.isStuckLive(),s=a??this.anchorSide(r,i),c=s?s.gaps:this.nearGaps(r),l=[],u=[],d=0;for(let n of e){let e=t.indexOf(n[0]);!o&&(s?s.comp(n[0],e):this.zoneOf(n[0],r)===`near`)?(l.push(n),d+=n[1]-n[0].height):u.push(n)}if(!(d===0||c.length>0&&d<=this.room(c))&&this.isBusy())for(let e of l)this.zoneOf(e[0],r)===`near`?(this.pending.set(e[0],e[1]),d-=e[1]-e[0].height):u.push(e);else u.push(...l);for(let[e,n]of u)t.setHeight(e,n),e.attached&&e.node&&(e.node.wrap.style.height=`${n}px`);let f=this.absorb(d,c);this.refreshSpacers(),f!==0&&this.setPos(n+f),this.reveal(e.map(e=>e[0]))}reveal(e){if(!(this.o.animate??!0)||typeof this.content.animate!=`function`||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let t=this.layout,n=this.viewTop(),r=n+this.vh;for(let i of e){if(!i.attached||!i.node||this.pending.has(i))continue;let e=this.padStart+t.offset(t.indexOf(i));e<r&&e+i.height>n&&i.node.wrap.animate([{opacity:0},{opacity:1}],{duration:180,easing:`ease-out`})}}pinSide(){let e=this.pin,t=this.layout;if(!e||e.row>=t.rows())return null;let n=e.row,r=e.align===`end`?!this.bottom:this.bottom,i=(e,i)=>{let a=t.rowOf(i),o=a+e.count;return this.bottom?a>n?!0:o<=n?!1:r:o<=n?!0:a>n?!1:r},a=[],o=t.list;if(this.bottom)for(let e=t.indexAtRow(n)+1;e<o.length;e++)o[e].gap&&a.push(o[e]);else for(let e=t.indexAtRow(n)-1;e>=0;e--)o[e].gap&&a.push(o[e]);return{comp:i,gaps:a}}anchorSide(e,t){let n=this.anchorIndex(e,t);return n<0?null:{comp:(e,t)=>this.bottom?t>n:t<n,gaps:this.gapsToward(n)}}anchorIndex(e,t){let n=this.layout,r=n.list,i=r.length;if(!i)return-1;let a=this.padStart,o=this.vh/2,s=e-o,c=e+this.vh+o,l=e+this.vh/2,u=-1,d=1/0;for(let e=n.indexAt(Math.max(0,s-a));e<i;e++){let i=r[e],o=a+n.offset(e);if(o>=c)break;if(i.gap||t.has(i)||o+i.height<=s)continue;let f=o>l?o-l:o+i.height<l?l-o-i.height:0;f<d&&(d=f,u=e)}return u}rescaleFar(){if(this.pressing)return;let e=this.viewTop(),t=this.rowEstimate(),n=[];for(let r of this.layout.list){if(!r.gap)continue;let i=this.gapHeight(r.count,t);Math.abs(i-r.height)>=2&&this.zoneOf(r,e)===`far`&&n.push([r,i])}if(n.length){for(let[e,t]of n)this.setGapHeight(e,t);this.refreshSpacers()}}trimLoaded(){let e=this.o.maxItems??1e3;if(this.keys.size<=e)return;let t=this.layout,n=t.list,r=this.viewTop()-this.padStart,i=r+this.vh,a=this.o.overscan??Math.max(this.vh,400),o=Math.max(this.threshold(),a*3)+this.vh,s=[];for(let e=0;e<n.length;e++){if(e>=this.rs&&e<this.re)continue;let a=n[e];if(a.gap)continue;let c=t.offset(e),l=c+a.height,u=l<=r?r-l:c>=i?c-i:0;u>o&&s.push([u,a])}s.sort((e,t)=>t[0]-e[0]);let c=new Set(s.slice(0,this.keys.size-Math.floor(e*.8)).map(e=>e[1]));if(!c.size)return;let l=this.rs<this.re?n[this.rs]:null,u=[],d=null;for(let e=0;e<n.length;e++){let t=n[e];if(e>=this.rs&&e<this.re||!(t.gap||c.has(t))){d=null,u.push(t);continue}if(t.gap||(this.keys.delete(t.key),this.pending.delete(t),this.destroyNode(t)),d){d.count+=t.count,d.height+=t.height,t.gap&&this.destroyNode(t);continue}d=t.gap?t:this.makeGap(t.count,t.height),u.push(d)}let f=this.re-this.rs;t.assign(u),l&&(this.rs=t.indexOf(l),this.re=this.rs+f);for(let e=0;e<u.length;e++){let t=u[e];t.gap&&t.node&&this.paintGap(t)}this.refreshSpacers()}checkLoad(e){let t=this.o.threshold??Math.max(this.vh*2,1200),n=performance.now();for(let r of xy)this.more[r]&&this.state[r]!==`loading`&&!this.queue[r].length&&this.loaderOf(r)&&(n<this.cooldown[r]||(r===`before`?e:this.contentHeight()-e-this.vh)<t&&this.load(r))}async load(e){let t=this.loaderOf(e);if(!t)return;let n=this.gen;this.setState(e,`loading`);try{let r=this.layout.list,i=await t((e===`before`?r[0]:r[r.length-1])?.item,e);if(n!==this.gen||this.destroyed)return;let a=Array.isArray(i)?i:i.items,o=Array.isArray(i)?a.length===0:i.done??a.length===0,s=this.fresh(a,!0),c=s.length?await this.measure(s,!0):[];if(n!==this.gen||this.destroyed){c.forEach(e=>this.destroyNode(e));return}this.more[e]=!o&&s.length>0,this.setState(e,this.more[e]?`idle`:`done`),this.insert(e,c)}catch(t){if(n!==this.gen||this.destroyed)return;this.cooldown[e]=performance.now()+2e3,this.setState(e,`error`,t),clearTimeout(this.retryTimer),this.retryTimer=window.setTimeout(this.sync,2050);return}requestAnimationFrame(this.sync)}setState(e,t,n){let r=this.state[e];this.state[e]=t;let i=e===`range`?void 0:this.loaders[e];i&&i.toggleAttribute(`data-active`,t===`loading`),(r!==t||t===`error`)&&this.o.onLoadStateChange?.(e,t,n)}markActive(){this.active=!0,clearTimeout(this.idleTimer),this.idleTimer=window.setTimeout(this.onIdle,this.o.idleDelay??150)}onIdle=()=>{if(this.touching||this.pressing){this.markActive();return}this.active=!1,this.flushDeferred()};onScroll=()=>{let e=this.getPos();this.virtual&&(this.trail.push([performance.now(),e]),this.trail.length>64&&this.trail.shift()),(this.expect===null||Math.abs(e-this.expect)>=1)&&this.markActive(),this.expect=null,this.sync()};onWheel=()=>{this.pin=null,this.markActive()};onTouchStart=()=>{this.pin=null,this.touching=!0,this.markActive()};onTouchEnd=()=>{this.touching=!1,this.markActive()};onPointerDown=e=>{this.pin=null,e.pointerType===`mouse`&&(this.pressing=!0)};onKey=()=>{this.pin=null};onPointerUp=()=>{this.pressing&&(this.pressing=!1,this.active||this.flushDeferred())};onItemsResize=e=>{if(!this.destroyed){this.inObserver=!0;try{this.handleItemsResize(e)}finally{this.inObserver=!1}}};handleItemsResize(e){let t=[];for(let n of e){let e=this.hosts.get(n.target);if(!e||!e.attached||!e.node)continue;let r=by(n.borderBoxSize?.[0]?.blockSize??n.contentRect.height);if(!(r<=0)){if(Math.abs(r-e.height)<gy){this.pending.delete(e);continue}if(dy(e.node.host)){this.waitMedia(e);continue}t.push([e,r])}}t.length&&(this.applyHeights(t,!1),this.sync())}waitMedia(e){!e.waiting&&e.node&&(e.waiting=!0,fy([e.node.host],this.o.mediaTimeout??1500).then(()=>{if(e.waiting=!1,this.destroyed||!e.attached||!e.node)return;let t=by(e.node.host.getBoundingClientRect().height);t>0&&Math.abs(t-e.height)>=gy&&(this.applyHeights([[e,t]],!1),this.sync())}))}onViewportResize=()=>{if(this.destroyed)return;let e=this.content.getBoundingClientRect().width,t=Math.abs(e-this.width)>.5;if(t||this.viewport.clientHeight!==this.vh){this.inObserver=!0;try{this.readMetrics(),t&&this.markStale(),this.width&&this.onSized&&(this.onSized(),this.onSized=null),this.sync()}finally{this.inObserver=!1}}};onFonts=()=>{this.markStale()};readMetrics(){this.vh=this.viewport.clientHeight,this.width=this.content.getBoundingClientRect().width,this.measurer.style.width=`${this.width}px`;let e=getComputedStyle(this.content);this.padStart=Number.parseFloat(e.paddingTop)||0,this.padEnd=Number.parseFloat(e.paddingBottom)||0,this.refreshSpacers()}markStale(){let e=!1;for(let t of this.layout.list)!t.attached&&!t.gap&&(t.stale=!0,e=!0);e&&this.scheduleRemeasure()}scheduleRemeasure(){clearTimeout(this.staleTimer),this.staleTimer=window.setTimeout(()=>void this.remeasure(),250)}pickStale(e){let t=this.layout.list,n=[],r=this.rs-1,i=this.re;for(;n.length<e&&(r>=0||i<t.length);){if(r>=0){let e=t[r--];e.stale&&!e.attached&&n.push(e)}if(i<t.length&&n.length<e){let e=t[i++];e.stale&&!e.attached&&n.push(e)}}return n}async remeasure(){if(this.remeasuring)return;this.remeasuring=!0;let e=this.gen;try{for(;!this.destroyed&&e===this.gen&&(await Cy(),!(this.destroyed||e!==this.gen));){let e=this.pickStale(24);if(!e.length)break;let t=document.createDocumentFragment();for(let n of e){let e=n.node??this.createNode(n);this.cache.add(n),t.append(e.wrap)}this.measurer.append(t),await this.flushCommit(),await fy(e.map(e=>e.node?.host).filter(Boolean),800);let n=[];for(let t of e){if(!t.node)continue;let e=by(t.node.host.getBoundingClientRect().height);t.node.wrap.parentNode===this.measurer&&t.node.wrap.remove(),!t.attached&&(t.stale=!1,e>0&&Math.abs(e-t.height)>=gy&&n.push([t,e]))}n.length&&(this.applyHeights(n,!1),this.sync()),this.trimCache()}}finally{this.remeasuring=!1}}},Ty=(0,t.defineComponent)({name:`InfinityScrollPortal`,props:{to:{type:Object,required:!0},item:{type:null,required:!0},v:{type:Number,required:!0},slot:{type:Function,required:!0}},setup(e){return()=>(0,t.h)(t.Teleport,{to:e.to},e.slot({item:e.item}))}});function Ey(e){return typeof e==`object`&&e?JSON.stringify(e):e}var Dy=(0,t.defineComponent)({name:`InfinityScroll`,props:{getKey:{type:Function,required:!0},origin:{type:String,default:void 0},mode:{type:String,default:void 0},loadRange:{type:Function,default:void 0},total:{type:Number,default:void 0},query:{type:null,default:void 0},pageSize:{type:Number,default:void 0},estimatedHeight:{type:Number,default:void 0},maxItems:{type:Number,default:void 0},loadBefore:{type:Function,default:void 0},loadAfter:{type:Function,default:void 0},items:{type:Array,default:void 0},hasBefore:{type:Boolean,default:void 0},hasAfter:{type:Boolean,default:void 0},anchor:{type:[String,Number],default:void 0},overscan:{type:Number,default:void 0},threshold:{type:Number,default:void 0},cacheSize:{type:Number,default:void 0},mediaTimeout:{type:Number,default:void 0},idleDelay:{type:Number,default:void 0},animate:{type:[Boolean,Object],default:void 0}},emits:{stick:e=>!0,visible:e=>!0,loadState:(e,t,n)=>!0,"update:total":e=>!0},slots:Object,setup(e,{slots:n,emit:r,expose:i}){let a=(0,t.shallowRef)(),o=(0,t.shallowReactive)(new Map),s,c=0;return(0,t.onMounted)(()=>{let n=e;s=new wy(a.value,{getKey:e=>n.getKey(e),origin:n.origin,mode:n.mode,loadRange:n.loadRange&&((e,t)=>n.loadRange(e,t)),total:n.total,pageSize:n.pageSize,estimatedHeight:n.estimatedHeight,maxItems:n.maxItems,loadBefore:n.loadBefore&&((e,t)=>n.loadBefore(e,t)),loadAfter:n.loadAfter&&((e,t)=>n.loadAfter(e,t)),items:n.items,hasBefore:n.hasBefore,hasAfter:n.hasAfter,anchor:n.anchor,overscan:n.overscan,threshold:n.threshold,cacheSize:n.cacheSize,mediaTimeout:n.mediaTimeout,idleDelay:n.idleDelay,animate:n.animate,render:(e,t)=>{o.set(t,{id:++c,item:e,v:0})},update:(e,t)=>{let n=o.get(t);o.set(t,{id:n?.id??++c,item:e,v:(n?.v??0)+1})},unmount:(e,t)=>{o.delete(t)},commit:()=>(0,t.nextTick)(),onStickChange:e=>r(`stick`,e),onVisibleChange:e=>r(`visible`,e),onLoadStateChange:(e,t,n)=>r(`loadState`,e,t,n),onTotalChange:t=>{t!==e.total&&r(`update:total`,t)}})}),(0,t.watch)(()=>Ey(e.query),()=>{s&&s.reset(void 0,{total:null})}),(0,t.watch)(()=>e.total,e=>{s&&e!==void 0&&e!==s.total&&s.setTotal(e)}),(0,t.onBeforeUnmount)(()=>{s?.destroy(),s=void 0}),i({get list(){return s},append:e=>s?.append(e)??Promise.resolve(),prepend:e=>s?.prepend(e)??Promise.resolve(),update:(e,t)=>s?.update(e,t)??!1,remove:e=>s?.remove(e)??!1,reset:(e,t)=>s?.reset(e,t)??Promise.resolve(),scrollToKey:(e,t)=>s?.scrollToKey(e,t)??!1,scrollToIndex:(e,t)=>s?.scrollToIndex(e,t)??!1,indexOfKey:e=>s?.indexOfKey(e)??-1,scrollToTop:e=>s?.scrollToTop(e),scrollToBottom:e=>s?.scrollToBottom(e)}),()=>{let e=n.default,r=e?Array.from(o,([n,r])=>(0,t.h)(Ty,{key:r.id,to:n,item:r.item,v:r.v,slot:e})):[];return(0,t.h)(`div`,{class:`eds-vue`},[(0,t.h)(`div`,{ref:a,style:`height:100%`}),...r])}}}),Oy=E({__name:`KVirtualList`,props:{height:{type:String,default:``},bordered:{type:Boolean,default:!1}},setup(e,{expose:n}){let r=e,i=(0,t.useTemplateRef)(`inner`),a=(0,t.computed)(()=>r.height?{height:r.height}:null),o=e=>(...t)=>i.value?.[e](...t);return n({get list(){return i.value?.list},append:o(`append`),prepend:o(`prepend`),update:o(`update`),remove:o(`remove`),reset:o(`reset`),scrollToKey:o(`scrollToKey`),scrollToIndex:o(`scrollToIndex`),indexOfKey:o(`indexOfKey`),scrollToTop:o(`scrollToTop`),scrollToBottom:o(`scrollToBottom`)}),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Dy),{ref_key:`inner`,ref:i,class:(0,t.normalizeClass)([`k-virtual-list`,{"k-virtual-list--bordered":e.bordered}]),style:(0,t.normalizeStyle)(a.value)},{default:(0,t.withCtx)(({item:e})=>[(0,t.renderSlot)(n.$slots,`default`,{item:e},void 0,!0)]),_:3},8,[`class`,`style`]))}},[[`__scopeId`,`data-v-42cb774b`]]),ky=[`light`,`dark`,`system`],Ay={default:{label:`Default`,accent:`#2563eb`,accentHover:`#1d4ed8`,accentSoft:`#eff6ff`,neutral:`cool`},scanflow:{label:`ScanFlow`,accent:`#2563eb`,accentHover:`#1d4ed8`,accentSoft:`#eff6ff`,neutral:`cool`,neutralOverrides:{light:{bg:`#f8fafc`,surfaceMuted:`#f1f5f9`,border:`#e2e8f0`,text:`#1e293b`},dark:{bg:`#0f172a`,surface:`#1e293b`,surfaceMuted:`#273549`,border:`#334155`,borderStrong:`#475569`}}},slate:{label:`Slate`,accent:`#475569`,accentHover:`#334155`,accentSoft:`#f1f5f9`,neutral:`cool`},ocean:{label:`Ocean`,accent:`#0891b2`,accentHover:`#0e7490`,accentSoft:`#ecfeff`,neutral:`cool`},forest:{label:`Forest`,accent:`#059669`,accentHover:`#047857`,accentSoft:`#ecfdf5`,neutral:`warm`},violet:{label:`Violet`,accent:`#7c3aed`,accentHover:`#6d28d9`,accentSoft:`#f5f3ff`,neutral:`cool`},amber:{label:`Amber`,accent:`#d97706`,accentHover:`#b45309`,accentSoft:`#fffbeb`,neutral:`warm`},rose:{label:`Rose`,accent:`#e11d48`,accentHover:`#be123c`,accentSoft:`#fff1f2`,neutral:`warm`},mono:{label:`Mono`,accent:`#18181b`,accentHover:`#000000`,accentSoft:`#f4f4f5`,neutral:`plain`},bordeaux:{label:`Bordeaux`,accent:`#8a3a48`,accentHover:`#73303c`,accentSoft:`#f3e6e8`,neutral:`warm`,font:`'Golos Text', -apple-system, 'Segoe UI', Roboto, sans-serif`,accentOverrides:{dark:{accent:`#e3929e`,accentHover:`#eaa9b3`,accentSoft:`#33242a`}},semanticOverrides:{light:{success:{base:`#2c7656`,hover:`#235f45`,soft:`#e3f1ea`,strong:`#2c7656`},info:{base:`#3b6286`,hover:`#2f4f6c`,soft:`#e5edf5`,strong:`#3b6286`},danger:{base:`#b03a37`,hover:`#922f2d`,soft:`#fbe8e6`,strong:`#b03a37`}},dark:{success:{base:`#72c9a2`,hover:`#8fd6b6`,soft:`#1b3228`,strong:`#72c9a2`},info:{base:`#94b8db`,hover:`#adc9e4`,soft:`#1c2936`,strong:`#94b8db`},danger:{base:`#f08d83`,hover:`#f4a69e`,soft:`#3a2220`,strong:`#f08d83`}}},neutralOverrides:{light:{bg:`#f6f4f4`,surface:`#ffffff`,surfaceMuted:`#faf8f8`,border:`#e3dcdd`,borderStrong:`#cdc3c4`,text:`#1e2327`,textMuted:`#5f666c`,textFaint:`#959ca1`},dark:{bg:`#15181b`,surface:`#1d2125`,surfaceMuted:`#24292e`,border:`#30353a`,borderStrong:`#454b52`,text:`#ebe7e7`,textMuted:`#a3a9ae`,textFaint:`#737a80`}}},blocky:{label:`Blocky`,accent:`#4f8a25`,accentHover:`#3f711c`,accentSoft:`#e8f3dc`,neutral:`warm`,radius:`square`,elevation:`hard`,font:`rounded`,neutralOverrides:{light:{bg:`#e7e1d3`,surface:`#fbf8f1`,surfaceMuted:`#f1ebdf`,border:`#cdc3ae`,borderStrong:`#8a7a5c`,text:`#2b2418`,textMuted:`#675a43`,textFaint:`#9a8c72`},dark:{bg:`#1b1814`,surface:`#27231d`,surfaceMuted:`#302b24`,border:`#443d32`,borderStrong:`#6b5f4c`,text:`#efe8da`,textMuted:`#b2a58c`,textFaint:`#7c715f`}}}},jy={cool:{light:{bg:`#f6f8fb`,surface:`#ffffff`,surfaceMuted:`#f8fafc`,border:`#e4e9f0`,borderStrong:`#cbd5e1`,text:`#172033`,textMuted:`#64748b`,textFaint:`#94a3b8`},dark:{bg:`#0b1220`,surface:`#111a2b`,surfaceMuted:`#18233a`,border:`#24314a`,borderStrong:`#354764`,text:`#e5eaf3`,textMuted:`#9aa7bb`,textFaint:`#66748c`}},warm:{light:{bg:`#faf9f7`,surface:`#ffffff`,surfaceMuted:`#f7f5f2`,border:`#ebe7e1`,borderStrong:`#d6cfc5`,text:`#26211c`,textMuted:`#6f665c`,textFaint:`#a39a8f`},dark:{bg:`#15120f`,surface:`#1c1814`,surfaceMuted:`#24201b`,border:`#302a24`,borderStrong:`#443c34`,text:`#efe9e2`,textMuted:`#a89e92`,textFaint:`#776d62`}},plain:{light:{bg:`#fafafa`,surface:`#ffffff`,surfaceMuted:`#f4f4f5`,border:`#e7e7e9`,borderStrong:`#d0d0d4`,text:`#18181b`,textMuted:`#6b7280`,textFaint:`#a1a1aa`},dark:{bg:`#0f0f11`,surface:`#17171a`,surfaceMuted:`#1f1f23`,border:`#2a2a30`,borderStrong:`#3c3c44`,text:`#ededf0`,textMuted:`#a1a1aa`,textFaint:`#6b6b75`}}},My={light:{success:{base:`#059669`,hover:`#047857`,soft:`#ecfdf5`,strong:`#065f46`},warning:{base:`#f59e0b`,hover:`#d97706`,soft:`#fffbeb`,strong:`#b45309`},danger:{base:`#dc2626`,hover:`#b91c1c`,soft:`#fef2f2`,strong:`#991b1b`},info:{base:`#4f46e5`,hover:`#4338ca`,soft:`#eef2ff`,strong:`#3730a3`}},dark:{success:{base:`#34d399`,hover:`#6ee7b7`,strong:`#6ee7b7`},warning:{base:`#fbbf24`,hover:`#fcd34d`,strong:`#fcd34d`},danger:{base:`#f87171`,hover:`#fca5a5`,strong:`#fca5a5`},info:{base:`#818cf8`,hover:`#a5b4fc`,strong:`#a5b4fc`}}},Ny={sharp:{sm:`2px`,md:`3px`,lg:`5px`},subtle:{sm:`4px`,md:`5px`,lg:`8px`},default:{sm:`6px`,md:`8px`,lg:`14px`},soft:{sm:`9px`,md:`12px`,lg:`20px`},pill:{sm:`12px`,md:`16px`,lg:`28px`},square:{sm:`0px`,md:`0px`,lg:`0px`}},Py={compact:{controlH:`2.125rem`,controlHSm:`1.75rem`,gap:`0.375rem`},default:{controlH:`2.5rem`,controlHSm:`2rem`,gap:`0.5rem`},comfortable:{controlH:`2.875rem`,controlHSm:`2.25rem`,gap:`0.625rem`}},Fy={flat:{light:{sm:`none`,md:`0 1px 2px rgba(15, 23, 42, 0.06)`,lg:`0 6px 20px rgba(15, 23, 42, 0.10)`},dark:{sm:`none`,md:`0 1px 2px rgba(0, 0, 0, 0.3)`,lg:`0 6px 20px rgba(0, 0, 0, 0.45)`}},default:{light:{sm:`0 1px 2px rgba(15, 23, 42, 0.05)`,md:`0 4px 16px rgba(15, 23, 42, 0.08)`,lg:`0 18px 44px rgba(15, 23, 42, 0.14)`},dark:{sm:`0 1px 2px rgba(0, 0, 0, 0.35)`,md:`0 4px 16px rgba(0, 0, 0, 0.45)`,lg:`0 18px 44px rgba(0, 0, 0, 0.6)`}},lifted:{light:{sm:`0 1px 3px rgba(15, 23, 42, 0.08)`,md:`0 8px 24px rgba(15, 23, 42, 0.12)`,lg:`0 24px 60px rgba(15, 23, 42, 0.20)`},dark:{sm:`0 1px 3px rgba(0, 0, 0, 0.45)`,md:`0 8px 24px rgba(0, 0, 0, 0.55)`,lg:`0 24px 60px rgba(0, 0, 0, 0.7)`}},hard:{light:{sm:`0 3px 0 rgba(43, 36, 24, 0.28)`,md:`0 4px 0 rgba(43, 36, 24, 0.16)`,lg:`0 8px 0 rgba(43, 36, 24, 0.22)`},dark:{sm:`0 3px 0 rgba(0, 0, 0, 0.55)`,md:`0 4px 0 rgba(0, 0, 0, 0.45)`,lg:`0 8px 0 rgba(0, 0, 0, 0.6)`}}},Iy={system:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif`,grotesk:`'Inter', 'Segoe UI', system-ui, sans-serif`,serif:`'Georgia', 'Times New Roman', serif`,mono:`ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace`,rounded:`ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', 'Segoe UI', system-ui, sans-serif`};function Ly(e=`light`){return e===`system`?typeof window>`u`||!window.matchMedia?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e===`dark`?`dark`:`light`}function Ry(e={}){let t=typeof e==`string`?{preset:e}:e,n=Ly(t.scheme),r=n===`dark`,i=Ay[t.preset]??Ay.default,a={...(jy[t.neutral??i.neutral]??jy.cool)[n],...t.neutral?{}:i.neutralOverrides?.[n],...t.bg?{bg:t.bg}:{},...t.surface?{surface:t.surface}:{},...t.text?{text:t.text}:{},...t.textMuted?{textMuted:t.textMuted}:{},...t.textFaint?{textFaint:t.textFaint}:{}},o=Ny[t.radius??i.radius]??Ny.default,s=Py[t.density??i.density]??Py.default,c=(Fy[t.elevation??i.elevation]??Fy.default)[n],l=t.font??i.font,u=Iy[l]??l??Iy.system,d=t.accent?null:i.accentOverrides?.[n],f=t.accent??i.accent,p=d?.accent??(r?Gy(f,.12):f),m={"--k-primary":p,"--k-primary-hover":t.accentHover??d?.accentHover??(r?Gy(p,.14):t.accent?Wy(p,-.12):i.accentHover),"--k-primary-soft":t.accentSoft??d?.accentSoft??(r?Ky(p,a.surface,.22):t.accent?Gy(p,.92):i.accentSoft),"--k-on-primary":qy(p),"--k-bg":a.bg,"--k-surface":a.surface,"--k-surface-muted":a.surfaceMuted,"--k-border":a.border,"--k-border-strong":a.borderStrong,"--k-text":a.text,"--k-text-muted":a.textMuted,"--k-text-faint":a.textFaint,"--k-overlay":r?`rgba(0, 0, 0, 0.6)`:`rgba(15, 23, 42, 0.35)`,"--k-tooltip-bg":r?a.text:`#172033`,"--k-tooltip-text":r?a.bg:`#ffffff`,"--k-selection":Ky(p,a.surface,r?.4:.2),"--k-radius-sm":o.sm,"--k-radius":o.md,"--k-radius-lg":o.lg,"--k-control-h":s.controlH,"--k-control-h-sm":s.controlHSm,"--k-gap":s.gap,"--k-shadow-sm":c.sm,"--k-shadow-md":c.md,"--k-shadow-lg":c.lg,"--k-font":u},h={...My[n],...i.semanticOverrides?.[n]};for(let[e,t]of Object.entries(h))m[`--k-${e}`]=t.base,m[`--k-${e}-hover`]=t.hover,m[`--k-${e}-soft`]=t.soft??Ky(t.base,a.surface,.18),m[`--k-${e}-strong`]=t.strong,m[`--k-on-${e}`]=qy(t.base);return m}function zy(e={},t=null){let n=t??(typeof document<`u`?document.documentElement:null);if(!n)return()=>{};let r=typeof e==`string`?{preset:e}:e,i={},a=n.getAttribute(`data-k-scheme`),o=n.style.colorScheme,s=()=>{let e=Ry(r);for(let[t,r]of Object.entries(e))t in i||(i[t]=n.style.getPropertyValue(t)),n.style.setProperty(t,r);let t=Ly(r.scheme);n.setAttribute(`data-k-scheme`,t),n.style.colorScheme=t};s();let c=null;return r.scheme===`system`&&typeof window<`u`&&window.matchMedia&&(c=window.matchMedia(`(prefers-color-scheme: dark)`),c.addEventListener(`change`,s)),()=>{c?.removeEventListener(`change`,s);for(let[e,t]of Object.entries(i))t?n.style.setProperty(e,t):n.style.removeProperty(e);a?n.setAttribute(`data-k-scheme`,a):n.removeAttribute(`data-k-scheme`),n.style.colorScheme=o}}function By(e={},t=`:root`){let n=typeof e==`string`?{preset:e}:e,r=Object.entries(Ry(n)).map(([e,t])=>` ${e}: ${t};`);return r.push(` color-scheme: ${Ly(n.scheme)};`),`${t} {\n${r.join(`
|
|
23
|
+
`)}\n}`}var Vy=Object.entries(Ay).map(([e,t])=>({value:e,label:t.label,accent:t.accent}));function Hy(e){let t=e.replace(`#`,``),n=t.length===3?t.split(``).map(e=>e+e).join(``):t;return[0,2,4].map(e=>parseInt(n.slice(e,e+2),16))}function Uy(e){return`#${e.map(e=>Math.round(Math.min(255,Math.max(0,e))).toString(16).padStart(2,`0`)).join(``)}`}function Wy(e,t){let n=Hy(e),r=t<0?0:255;return Uy(n.map(e=>e+(r-e)*Math.abs(t)))}function Gy(e,t){return Wy(e,t)}function Ky(e,t,n){let r=Hy(e),i=Hy(t);return Uy(r.map((e,t)=>e*n+i[t]*(1-n)))}function qy(e){let[t,n,r]=Hy(e).map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*t+.7152*n+.0722*r>.45?`#0f172a`:`#ffffff`}var Jy=`ru-RU`;function Yy(e,{fraction:t=!1,currency:n=`RUB`,compact:r=!1,locale:i=Jy}={}){let a=Number(e);return Number.isFinite(a)?new Intl.NumberFormat(i,{style:`currency`,currency:n,minimumFractionDigits:t?2:0,maximumFractionDigits:t?2:0,notation:r?`compact`:`standard`}).format(a):`—`}function Xy(e,{digits:t=0,compact:n=!1,locale:r=Jy}={}){let i=Number(e);return Number.isFinite(i)?new Intl.NumberFormat(r,{minimumFractionDigits:t,maximumFractionDigits:t,notation:n?`compact`:`standard`}).format(i):`—`}function Zy(e,{digits:t=1,locale:n=Jy}={}){let r=Number(e);return Number.isFinite(r)?new Intl.NumberFormat(n,{style:`percent`,minimumFractionDigits:t,maximumFractionDigits:t}).format(r):`—`}function Qy(e,{locale:t=Jy,style:n=`short`}={}){return e?new Intl.DateTimeFormat(t,{dateStyle:n}).format(new Date(e)):`—`}function $y(e,{locale:t=Jy}={}){return e?new Intl.DateTimeFormat(t,{dateStyle:`short`,timeStyle:`short`}).format(new Date(e)):`—`}function eb(e,{locale:t=Jy}={}){if(!e)return`—`;let n=new Date(e).getTime()-Date.now(),r=new Intl.RelativeTimeFormat(t,{numeric:`auto`});for(let[e,t]of[[`year`,31536e6],[`month`,2592e6],[`day`,864e5],[`hour`,36e5],[`minute`,6e4],[`second`,1e3]])if(Math.abs(n)>=t||e===`second`)return r.format(Math.round(n/t),e);return``}function tb(e){let t=Math.max(0,Math.floor(Number(e)||0)),n=e=>String(e).padStart(2,`0`),r=Math.floor(t/86400),i=Math.floor(t%86400/3600),a=Math.floor(t%3600/60),o=t%60;return r>0?`${r} д ${n(i)}:${n(a)}:${n(o)}`:`${n(i)}:${n(a)}:${n(o)}`}function nb(e,{units:t=[`Б`,`КБ`,`МБ`,`ГБ`,`ТБ`]}={}){let n=Number(e);if(!Number.isFinite(n)||n<=0)return`—`;let r=n,i=0;for(;r>=1024&&i<t.length-1;)r/=1024,i++;return`${r.toFixed(i===0?0:1).replace(`.`,`,`)} ${t[i]}`}function rb(e,t=80){let n=String(e??``);return n.length>t?`${n.slice(0,t-1)}…`:n}function ib(e,t=2){return String(e??``).replace(/["«»]/g,``).split(/[\s-]+/).filter(Boolean).slice(0,t).map(e=>e[0].toUpperCase()).join(``)}function ab(e,t){let n=Math.abs(Number(e))%100,r=n%10;return n>10&&n<20?t[2]:r>1&&r<5?t[1]:r===1?t[0]:t[2]}function ob(e,t,{locale:n=Jy}={}){return`${Xy(e,{locale:n})} ${ab(e,t)}`}var sb={KAlert:Ct,KAvatar:Tt,KBadge:Dt,KButton:At,KCard:Rt,KCheckbox:us,KChip:ms,KCombobox:sd,KCountdown:cd,KDescriptions:dd,KDrawer:_f,KDropdown:Rf,KEmpty:Wf,KFileUpload:Bp,KFilterBar:Jp,KGantt:Cm,KIcon:D,KInput:Am,KMenuItem:Mm,KModal:Lm,KMoney:Rm,KPage:Km,KPagination:fh,KProgress:Ah,KRadioGroup:$h,KSegmented:tg,KSelect:Ng,KShell:Kg,KStat:$g,KSteps:d_,KSwitch:T_,KTable:F_,KTabs:ov,KTextarea:fv,KTimeline:yv,KToast:sy,KTooltip:cm,KVirtualList:Oy};e.KAlert=Ct,e.KAvatar=Tt,e.KBadge=Dt,e.KButton=At,e.KCard=Rt,e.KCheckbox=us,e.KChip=ms,e.KCombobox=sd,e.KCountdown=cd,e.KDescriptions=dd,e.KDrawer=_f,e.KDropdown=Rf,e.KEmpty=Wf,e.KFileUpload=Bp,e.KFilterBar=Jp,e.KGantt=Cm,e.KIcon=D,e.KInput=Am,e.KMenuItem=Mm,e.KModal=Lm,e.KMoney=Rm,e.KPage=Km,e.KPagination=fh,e.KProgress=Ah,e.KRadioGroup=$h,e.KSegmented=tg,e.KSelect=Ng,e.KShell=Kg,e.KStat=$g,e.KSteps=d_,e.KSwitch=T_,e.KTable=F_,e.KTabs=ov,e.KTextarea=fv,e.KTimeline=yv,e.KToast=sy,e.KTooltip=cm,e.KVirtualList=Oy,e.applyTheme=zy,e.buildTheme=Ry,e.default={install(e){for(let[t,n]of Object.entries(sb))e.component(t,n)}},e.densities=Py,e.dismissToast=ay,e.elevations=Fy,e.fontStacks=Iy,e.formatBytes=nb,e.formatDate=Qy,e.formatDateTime=$y,e.formatDuration=tb,e.formatMoney=Yy,e.formatNumber=Xy,e.formatPercent=Zy,e.formatRelative=eb,e.iconNames=yt,e.iconRegistry=_t,e.initials=ib,e.neutrals=jy,e.plural=ab,e.pluralize=ob,e.presets=Ay,e.pushToast=iy,e.radiusScales=Ny,e.registerIcons=vt,e.resolveScheme=Ly,e.schemes=ky,e.semantics=My,e.themeToCss=By,e.themes=Vy,e.toastStore=ny,e.truncate=rb,e.useToast=oy});
|