@kvass/widgets 1.3.71 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_plugin-vue_export-helper.js +8 -8
- package/dist/chart-builder.js +8 -8
- package/dist/flatfinder.js +32 -31
- package/dist/font-selector.js +1 -1
- package/dist/icon-selector.js +1 -1
- package/dist/index.es.js +7 -7
- package/dist/index.js +2 -2
- package/dist/index2.js +1 -1
- package/dist/location-selector.js +5 -5
- package/dist/map.js +2 -2
- package/dist/project-portal.js +1 -1
- package/dist/residential-expenses.js +1 -0
- package/dist/table-builder.js +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{q as tt,E as oo,I as al,r as J,H as At,b as G,o as _,e as nt,w as lt,G as Li,c as O,f as $,F as ue,a as et,m as at,j as Et,a0 as yr,d as H,P as xr,z as kr,v as ot,C as Gt,t as ut,A as Er,g as he,R as ll,i as ge,D as Ei,$ as ul,N as wr,n as Vt,J as Cr,K as cl,y as ve,a3 as dl,L as kt,M as Rt,s as ro,O as _r,U as hl,V as pl,W as fl,Q as gl,k as rn,B as Sr,a8 as vl,l as ml,S as An,a2 as bl,Y as yl,Z as xl}from"./_plugin-vue_export-helper.js";function Ar(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Ar(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}function kl(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=Ar(t))&&(i&&(i+=" "),i+=e);return i}const ao=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,lo=kl,Os=(t,e)=>n=>{var i;if(e?.variants==null)return lo(t,n?.class,n?.className);const{variants:s,defaultVariants:o}=e,r=Object.keys(s).map(c=>{const l=n?.[c],d=o?.[c];if(l===null)return null;const h=ao(l)||ao(d);return s[c][h]}),a=n&&Object.entries(n).reduce((c,l)=>{let[d,h]=l;return h===void 0||(c[d]=h),c},{}),u=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,l)=>{let{class:d,className:h,...p}=l;return Object.entries(p).every(g=>{let[f,y]=g;return Array.isArray(y)?y.includes({...o,...a}[f]):{...o,...a}[f]===y})?[...c,d,h]:c},[]);return lo(t,r,u,n?.class,n?.className)},an=/^[a-z0-9]+(-[a-z0-9]+)*$/,wi=(t,e,n,i="")=>{const s=t.split(":");if(t.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const a=s.pop(),u=s.pop(),c={provider:s.length>0?s[0]:i,prefix:u,name:a};return e&&!Vn(c)?null:c}const o=s[0],r=o.split("-");if(r.length>1){const a={provider:i,prefix:r.shift(),name:r.join("-")};return e&&!Vn(a)?null:a}if(n&&i===""){const a={provider:i,prefix:"",name:o};return e&&!Vn(a,n)?null:a}return null},Vn=(t,e)=>t?!!((t.provider===""||t.provider.match(an))&&(e&&t.prefix===""||t.prefix.match(an))&&t.name.match(an)):!1,Tr=Object.freeze({left:0,top:0,width:16,height:16}),Zn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ci=Object.freeze({...Tr,...Zn}),ls=Object.freeze({...Ci,body:"",hidden:!1});function El(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}function uo(t,e){const n=El(t,e);for(const i in ls)i in Zn?i in t&&!(i in n)&&(n[i]=Zn[i]):i in e?n[i]=e[i]:i in t&&(n[i]=t[i]);return n}function wl(t,e){const n=t.icons,i=t.aliases||Object.create(null),s=Object.create(null);function o(r){if(n[r])return s[r]=[];if(!(r in s)){s[r]=null;const a=i[r]&&i[r].parent,u=a&&o(a);u&&(s[r]=[a].concat(u))}return s[r]}return(e||Object.keys(n).concat(Object.keys(i))).forEach(o),s}function Cl(t,e,n){const i=t.icons,s=t.aliases||Object.create(null);let o={};function r(a){o=uo(i[a]||s[a],o)}return r(e),n.forEach(r),uo(t,o)}function Ir(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(s=>{e(s,null),n.push(s)});const i=wl(t);for(const s in i){const o=i[s];o&&(e(s,Cl(t,s,o)),n.push(s))}return n}const _l={provider:"",aliases:{},not_found:{},...Tr};function Bi(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Dr(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!Bi(t,_l))return null;const n=e.icons;for(const s in n){const o=n[s];if(!s.match(an)||typeof o.body!="string"||!Bi(o,ls))return null}const i=e.aliases||Object.create(null);for(const s in i){const o=i[s],r=o.parent;if(!s.match(an)||typeof r!="string"||!n[r]&&!i[r]||!Bi(o,ls))return null}return e}const co=Object.create(null);function Sl(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function Ie(t,e){const n=co[t]||(co[t]=Object.create(null));return n[e]||(n[e]=Sl(t,e))}function Ms(t,e){return Dr(e)?Ir(e,(n,i)=>{i?t.icons[n]=i:t.missing.add(n)}):[]}function Al(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let bn=!1;function Fr(t){return typeof t=="boolean"&&(bn=t),bn}function Tl(t){const e=typeof t=="string"?wi(t,!0,bn):t;if(e){const n=Ie(e.provider,e.prefix),i=e.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function Il(t,e){const n=wi(t,!0,bn);if(!n)return!1;const i=Ie(n.provider,n.prefix);return Al(i,n.name,e)}function Dl(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),bn&&!e&&!t.prefix){let s=!1;return Dr(t)&&(t.prefix="",Ir(t,(o,r)=>{r&&Il(o,r)&&(s=!0)})),s}const n=t.prefix;if(!Vn({provider:e,prefix:n,name:"a"}))return!1;const i=Ie(e,n);return!!Ms(i,t)}const Or=Object.freeze({width:null,height:null}),Mr=Object.freeze({...Or,...Zn}),Fl=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ol=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ho(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const i=t.split(Fl);if(i===null||!i.length)return t;const s=[];let o=i.shift(),r=Ol.test(o);for(;;){if(r){const a=parseFloat(o);isNaN(a)?s.push(o):s.push(Math.ceil(a*e*n)/n)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");r=!r}}const Ml=t=>t==="unset"||t==="undefined"||t==="none";function Rl(t,e){const n={...Ci,...t},i={...Mr,...e},s={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,i].forEach(g=>{const f=[],y=g.hFlip,v=g.vFlip;let k=g.rotate;y?v?k+=2:(f.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),f.push("scale(-1 1)"),s.top=s.left=0):v&&(f.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),f.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,f.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:f.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,f.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),f.length&&(o='<g transform="'+f.join(" ")+'">'+o+"</g>")});const r=i.width,a=i.height,u=s.width,c=s.height;let l,d;r===null?(d=a===null?"1em":a==="auto"?c:a,l=ho(d,u/c)):(l=r==="auto"?u:r,d=a===null?ho(l,c/u):a==="auto"?c:a);const h={},p=(g,f)=>{Ml(f)||(h[g]=f.toString())};return p("width",l),p("height",d),h.viewBox=s.left.toString()+" "+s.top.toString()+" "+u.toString()+" "+c.toString(),{attributes:h,body:o}}const Pl=/\sid="(\S+)"/g,Ll="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Bl=0;function Nl(t,e=Ll){const n=[];let i;for(;i=Pl.exec(t);)n.push(i[1]);if(!n.length)return t;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const r=typeof e=="function"?e(o):e+(Bl++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+s+"$3")}),t=t.replace(new RegExp(s,"g"),""),t}const us=Object.create(null);function jl(t,e){us[t]=e}function cs(t){return us[t]||us[""]}function Rs(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Ps=Object.create(null),Tn=["https://api.simplesvg.com","https://api.unisvg.com"],ds=[];for(;Tn.length>0;)Tn.length===1||Math.random()>.5?ds.push(Tn.shift()):ds.push(Tn.pop());Ps[""]=Rs({resources:["https://api.iconify.design"].concat(ds)});function Rr(t,e){const n=Rs(e);return n===null?!1:(Ps[t]=n,!0)}function Ls(t){return Ps[t]}const Vl=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let po=Vl();function $l(t,e){const n=Ls(t);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let s=0;n.resources.forEach(r=>{s=Math.max(s,r.length)});const o=e+".json?icons=";i=n.maxURL-s-n.path.length-o.length}return i}function zl(t){return t===404}const Hl=(t,e,n)=>{const i=[],s=$l(t,e),o="icons";let r={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach((u,c)=>{a+=u.length+1,a>=s&&c>0&&(i.push(r),r={type:o,provider:t,prefix:e,icons:[]},a=u.length),r.icons.push(u)}),i.push(r),i};function Gl(t){if(typeof t=="string"){const e=Ls(t);if(e)return e.path}return"/"}const ql=(t,e,n)=>{if(!po){n("abort",424);return}let i=Gl(e.provider);switch(e.type){case"icons":{const o=e.prefix,r=e.icons.join(","),a=new URLSearchParams({icons:r});i+=o+".json?"+a.toString();break}case"custom":{const o=e.uri;i+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let s=503;po(t+i).then(o=>{const r=o.status;if(r!==200){setTimeout(()=>{n(zl(r)?"abort":"next",r)});return}return s=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",s)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",s)})},Ul={prepare:Hl,send:ql};function Wl(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((s,o)=>s.provider!==o.provider?s.provider.localeCompare(o.provider):s.prefix!==o.prefix?s.prefix.localeCompare(o.prefix):s.name.localeCompare(o.name));let i={provider:"",prefix:"",name:""};return t.forEach(s=>{if(i.name===s.name&&i.prefix===s.prefix&&i.provider===s.provider)return;i=s;const o=s.provider,r=s.prefix,a=s.name,u=n[o]||(n[o]=Object.create(null)),c=u[r]||(u[r]=Ie(o,r));let l;a in c.icons?l=e.loaded:r===""||c.missing.has(a)?l=e.missing:l=e.pending;const d={provider:o,prefix:r,name:a};l.push(d)}),e}function Pr(t,e){t.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(s=>s.id!==e))})}function Xl(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const i=t.provider,s=t.prefix;e.forEach(o=>{const r=o.icons,a=r.pending.length;r.pending=r.pending.filter(u=>{if(u.prefix!==s)return!0;const c=u.name;if(t.icons[c])r.loaded.push({provider:i,prefix:s,name:c});else if(t.missing.has(c))r.missing.push({provider:i,prefix:s,name:c});else return n=!0,!0;return!1}),r.pending.length!==a&&(n||Pr([t],o.id),o.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),o.abort))})}))}let Yl=0;function Kl(t,e,n){const i=Yl++,s=Pr.bind(null,n,i);if(!e.pending.length)return s;const o={id:i,icons:e,callback:t,abort:s};return n.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(o)}),s}function Zl(t,e=!0,n=!1){const i=[];return t.forEach(s=>{const o=typeof s=="string"?wi(s,e,n):s;o&&i.push(o)}),i}var Jl={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ql(t,e,n,i){const s=t.resources.length,o=t.random?Math.floor(Math.random()*s):t.index;let r;if(t.random){let D=t.resources.slice(0);for(r=[];D.length>1;){const W=Math.floor(Math.random()*D.length);r.push(D[W]),D=D.slice(0,W).concat(D.slice(W+1))}r=r.concat(D)}else r=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let u="pending",c=0,l,d=null,h=[],p=[];typeof i=="function"&&p.push(i);function g(){d&&(clearTimeout(d),d=null)}function f(){u==="pending"&&(u="aborted"),g(),h.forEach(D=>{D.status==="pending"&&(D.status="aborted")}),h=[]}function y(D,W){W&&(p=[]),typeof D=="function"&&p.push(D)}function v(){return{startTime:a,payload:e,status:u,queriesSent:c,queriesPending:h.length,subscribe:y,abort:f}}function k(){u="failed",p.forEach(D=>{D(void 0,l)})}function w(){h.forEach(D=>{D.status==="pending"&&(D.status="aborted")}),h=[]}function T(D,W,x){const b=W!=="success";switch(h=h.filter(m=>m!==D),u){case"pending":break;case"failed":if(b||!t.dataAfterTimeout)return;break;default:return}if(W==="abort"){l=x,k();return}if(b){l=x,h.length||(r.length?M():k());return}if(g(),w(),!t.random){const m=t.resources.indexOf(D.resource);m!==-1&&m!==t.index&&(t.index=m)}u="completed",p.forEach(m=>{m(x)})}function M(){if(u!=="pending")return;g();const D=r.shift();if(D===void 0){if(h.length){d=setTimeout(()=>{g(),u==="pending"&&(w(),k())},t.timeout);return}k();return}const W={status:"pending",resource:D,callback:(x,b)=>{T(W,x,b)}};h.push(W),c++,d=setTimeout(M,t.rotate),n(D,e,W.callback)}return setTimeout(M),v}function Lr(t){const e={...Jl,...t};let n=[];function i(){n=n.filter(r=>r().status==="pending")}function s(r,a,u){const c=Ql(e,r,a,(l,d)=>{i(),u&&u(l,d)});return n.push(c),c}function o(r){return n.find(a=>r(a))||null}return{query:s,find:o,setIndex:r=>{e.index=r},getIndex:()=>e.index,cleanup:i}}function fo(){}const Ni=Object.create(null);function tu(t){if(!Ni[t]){const e=Ls(t);if(!e)return;const n=Lr(e),i={config:e,redundancy:n};Ni[t]=i}return Ni[t]}function eu(t,e,n){let i,s;if(typeof t=="string"){const o=cs(t);if(!o)return n(void 0,424),fo;s=o.send;const r=tu(t);r&&(i=r.redundancy)}else{const o=Rs(t);if(o){i=Lr(o);const r=t.resources?t.resources[0]:"",a=cs(r);a&&(s=a.send)}}return!i||!s?(n(void 0,424),fo):i.query(e,s,n)().abort}const go="iconify2",yn="iconify",Br=yn+"-count",vo=yn+"-version",Nr=36e5,nu=168;function hs(t,e){try{return t.getItem(e)}catch{}}function Bs(t,e,n){try{return t.setItem(e,n),!0}catch{}}function mo(t,e){try{t.removeItem(e)}catch{}}function ps(t,e){return Bs(t,Br,e.toString())}function fs(t){return parseInt(hs(t,Br))||0}const _i={local:!0,session:!0},jr={local:new Set,session:new Set};let Ns=!1;function iu(t){Ns=t}let In=typeof window>"u"?{}:window;function Vr(t){const e=t+"Storage";try{if(In&&In[e]&&typeof In[e].length=="number")return In[e]}catch{}_i[t]=!1}function $r(t,e){const n=Vr(t);if(!n)return;const i=hs(n,vo);if(i!==go){if(i){const a=fs(n);for(let u=0;u<a;u++)mo(n,yn+u.toString())}Bs(n,vo,go),ps(n,0);return}const s=Math.floor(Date.now()/Nr)-nu,o=a=>{const u=yn+a.toString(),c=hs(n,u);if(typeof c=="string"){try{const l=JSON.parse(c);if(typeof l=="object"&&typeof l.cached=="number"&&l.cached>s&&typeof l.provider=="string"&&typeof l.data=="object"&&typeof l.data.prefix=="string"&&e(l,a))return!0}catch{}mo(n,u)}};let r=fs(n);for(let a=r-1;a>=0;a--)o(a)||(a===r-1?(r--,ps(n,r)):jr[t].add(a))}function zr(){if(!Ns){iu(!0);for(const t in _i)$r(t,e=>{const n=e.data,i=e.provider,s=n.prefix,o=Ie(i,s);if(!Ms(o,n).length)return!1;const r=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,r):r,!0})}}function su(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const i in _i)$r(i,s=>{const o=s.data;return s.provider!==t.provider||o.prefix!==t.prefix||o.lastModified===e});return!0}function ou(t,e){Ns||zr();function n(i){let s;if(!_i[i]||!(s=Vr(i)))return;const o=jr[i];let r;if(o.size)o.delete(r=Array.from(o).shift());else if(r=fs(s),!ps(s,r+1))return;const a={cached:Math.floor(Date.now()/Nr),provider:t.provider,data:e};return Bs(s,yn+r.toString(),JSON.stringify(a))}e.lastModified&&!su(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function bo(){}function ru(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Xl(t)}))}function au(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:i}=t,s=t.iconsToLoad;delete t.iconsToLoad;let o;!s||!(o=cs(n))||o.prepare(n,i,s).forEach(r=>{eu(n,r,a=>{if(typeof a!="object")r.icons.forEach(u=>{t.missing.add(u)});else try{const u=Ms(t,a);if(!u.length)return;const c=t.pendingIcons;c&&u.forEach(l=>{c.delete(l)}),ou(t,a)}catch(u){console.error(u)}ru(t)})})}))}const lu=(t,e)=>{const n=Zl(t,!0,Fr()),i=Wl(n);if(!i.pending.length){let u=!0;return e&&setTimeout(()=>{u&&e(i.loaded,i.missing,i.pending,bo)}),()=>{u=!1}}const s=Object.create(null),o=[];let r,a;return i.pending.forEach(u=>{const{provider:c,prefix:l}=u;if(l===a&&c===r)return;r=c,a=l,o.push(Ie(c,l));const d=s[c]||(s[c]=Object.create(null));d[l]||(d[l]=[])}),i.pending.forEach(u=>{const{provider:c,prefix:l,name:d}=u,h=Ie(c,l),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(d)||(p.add(d),s[c][l].push(d))}),o.forEach(u=>{const{provider:c,prefix:l}=u;s[c][l].length&&au(u,s[c][l])}),e?Kl(e,i,o):bo};function uu(t,e){const n={...t};for(const i in e){const s=e[i],o=typeof s;i in Or?(s===null||s&&(o==="string"||o==="number"))&&(n[i]=s):o===typeof n[i]&&(n[i]=i==="rotate"?s%4:s)}return n}const cu=/[\s,]+/;function du(t,e){e.split(cu).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function hu(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function i(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(t);return isNaN(s)?0:i(s)}else if(n!==t){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/s,o%1===0?i(o):0)}}return e}function pu(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)n+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function fu(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function gu(t){return"data:image/svg+xml,"+fu(t)}function vu(t){return'url("'+gu(t)+'")'}const yo={...Mr,inline:!1},mu={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},bu={display:"inline-block"},gs={backgroundColor:"currentColor"},Hr={backgroundColor:"transparent"},xo={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},ko={webkitMask:gs,mask:gs,background:Hr};for(const t in ko){const e=ko[t];for(const n in xo)e[t+n]=xo[n]}const $n={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";$n[t+"-flip"]=e,$n[t.slice(0,1)+"-flip"]=e,$n[t+"Flip"]=e});function Eo(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const wo=(t,e)=>{const n=uu(yo,e),i={...mu},s=e.mode||"svg",o={},r=e.style,a=typeof r=="object"&&!(r instanceof Array)?r:{};for(let f in e){const y=e[f];if(y!==void 0)switch(f){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[f]=y===!0||y==="true"||y===1;break;case"flip":typeof y=="string"&&du(n,y);break;case"color":o.color=y;break;case"rotate":typeof y=="string"?n[f]=hu(y):typeof y=="number"&&(n[f]=y);break;case"ariaHidden":case"aria-hidden":y!==!0&&y!=="true"&&delete i["aria-hidden"];break;default:{const v=$n[f];v?(y===!0||y==="true"||y===1)&&(n[v]=!0):yo[f]===void 0&&(i[f]=y)}}}const u=Rl(t,n),c=u.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),s==="svg"){i.style={...o,...a},Object.assign(i,c);let f=0,y=e.id;return typeof y=="string"&&(y=y.replace(/-/g,"_")),i.innerHTML=Nl(u.body,y?()=>y+"ID"+f++:"iconifyVue"),ro("svg",i)}const{body:l,width:d,height:h}=t,p=s==="mask"||(s==="bg"?!1:l.indexOf("currentColor")!==-1),g=pu(l,{...c,width:d+"",height:h+""});return i.style={...o,"--svg":vu(g),width:Eo(c.width),height:Eo(c.height),...bu,...p?gs:Hr,...a},ro("span",i)};Fr(!0);jl("",Ul);if(typeof document<"u"&&typeof window<"u"){zr();const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Dl(i))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const i="IconifyProviders["+n+"] is invalid.";try{const s=e[n];if(typeof s!="object"||!s||s.resources===void 0)continue;Rr(n,s)||console.error(i)}catch{console.error(i)}}}}const yu={...Ci,body:""},Ae=tt({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,e){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let n;if(typeof t!="string"||(n=wi(t,!1,!0))===null)return this.abortLoading(),null;const i=Tl(n);if(!i)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",i!==null&&(this._loadingIcon={name:t,abort:lu([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==t&&(this._name=t,e&&e(t));const s=["iconify"];return n.prefix!==""&&s.push("iconify--"+n.prefix),n.provider!==""&&s.push("iconify--"+n.provider),{data:i,classes:s}}},render(){this.counter;const t=this.$attrs,e=this.iconMounted?this.getIcon(t.icon,t.onLoad):null;if(!e)return wo(yu,t);let n=t;return e.classes&&(n={...t,class:(typeof t.class=="string"?t.class+" ":"")+e.classes.join(" ")}),wo({...Ci,...e.data},n)}});Rr("",{resources:["https://icons.ui.kvass.no"]});function xu(t){return!t||typeof t!="object"?!1:typeof t.then=="function"&&typeof t.catch=="function"}const ku=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],Eu=(t,e)=>e==="default"?`var(--k-ui-${t})`:`var(--k-ui-${t}-${e})`,Jn=t=>{switch(t){case"start":case"end":return`flex-${t}`;default:return t}},js=(t,e="spacing")=>t.split(" ").map(n=>typeof n=="number"||typeof n=="string"&&n.match(/^\d+$/)?`${n}rem`:typeof n=="string"&&ku.includes(n)?Eu(e,n):n).join(" ");function wu(){var t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var i=Math.random()*16;return t>0?(i=(t+i)%16|0,t=Math.floor(t/16)):(i=(e+i)%16|0,e=Math.floor(e/16)),(n==="x"?i:i&3|8).toString(16)})}const Gr=(t,e)=>Object.fromEntries(Object.entries(e).map(([n,i])=>[`--k-${t}-${n}`,i])),qr=tt({__name:"Spinner",props:{size:{default:"medium"}},setup(t){return(e,n)=>(_(),O("span",{class:Vt(`k-spinner k-spinner--size-${e.size}`)},null,2))}}),Cu={class:"k-button__content"},_u={key:0,class:"k-button__icon k-button__icon--left"},Su={key:1,class:"k-button__icon k-button__icon--right"},Au={key:2,class:"k-button__confirm-label"},Jt=tt({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{type:[String,Object,Function],default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(t,{emit:e}){const n=t,i={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},s=G(()=>!d.value||u.value==="loading"?n.variant:u.value=="confirm"?"warning":i[u.value]||n.variant),o=G(()=>n.loading||u.value==="loading"),r=J(),a=G(()=>{if(u.value)return["error","success"].includes(u.value)||o.value}),u=J("idle"),c=J(),l=J(),d=G(()=>u.value||o.value),h=G(()=>["error","success"].includes(u.value)),p=G(()=>u.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function g(T){if(!T)return;f(),l.value=T,r.value=setTimeout(()=>u.value="loading",100);let M=D=>{f(),n.stateTimeout?(u.value=D,c.value=setTimeout(()=>{f(),e(D)},n.stateTimeout)):e(D)};l.value.then(()=>M("success")).catch(()=>M("error"))}function f(){r.value&&clearTimeout(r.value),c.value&&clearTimeout(c.value),l.value=null,u.value="idle"}At(()=>n.promise,T=>{T&&xu(T)&&g(T)});const y=J(),v=G(()=>u.value==="confirm");function k(T){if(n.confirm&&u.value!=="confirm")return u.value="confirm";f(),e("click",T)}const w=Os("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(T,M)=>(_(),nt(he(T.is),at({type:"button",class:ot(w)({variant:s.value,size:T.size,isLoading:o.value,isBusy:a.value}),"aria-busy":a.value,inert:a.value},T.$attrs,{onClick:k,ref_key:"rootElement",ref:y}),{default:lt(()=>[kr(et("span",Cu,[T.icon||T.iconLeft||T.$slots.icon||T.$slots["icon-left"]?(_(),O("span",_u,[$(T.$slots,"icon-left",{},()=>[$(T.$slots,"icon",{},()=>[Et(ot(Ae),{icon:T.icon||T.iconLeft},null,8,["icon"])])])])):H("",!0),$(T.$slots,"default",{},()=>[Gt(ut(T.label),1)]),T.iconRight||T.$slots["icon-right"]?(_(),O("span",Su,[$(T.$slots,"icon-right",{},()=>[Et(ot(Ae),{icon:T.iconRight},null,8,["icon"])])])):H("",!0)],512),[[Er,!v.value]]),o.value?(_(),nt(qr,{key:0})):H("",!0),h.value?(_(),nt(ot(Ae),{key:1,class:"k-button__state-indicator",icon:p.value},null,8,["icon"])):H("",!0),v.value?(_(),O("span",Au,ut(T.confirmLabel),1)):H("",!0)]),_:3},16,["class","aria-busy","inert"]))}}),Tu={class:"k-alert__content"},Iu={key:0,class:"k-alert__title"},Du={class:"k-alert__icon"},ig=tt({__name:"Alert",props:{variant:{default:"neutral"},icon:{},title:{},content:{},action:{}},emits:["action"],setup(t,{emit:e}){const n=t,i=Os("k-alert",{variants:{variant:{neutral:"k-alert--neutral",info:"k-alert--info",danger:"k-alert--danger",warning:"k-alert--warning",primary:"k-alert--primary"}}}),s={info:"fa-pro-light:circle-question",warning:"fa-pro-light:exclamation-triangle",danger:"fa-pro-light:exclamation-circle"};return(o,r)=>(_(),O("div",{role:"alert",class:Vt(ot(i)({...n}))},[et("div",Tu,[o.title||o.$slots.title?(_(),O("div",Iu,[$(o.$slots,"title",{},()=>[et("strong",null,ut(o.title),1)])])):H("",!0),$(o.$slots,"default",{},()=>[et("span",null,ut(o.content),1)]),o.action?(_(),nt(Jt,{key:1,label:o.action,size:"small",class:"k-alert__action",onClick:r[0]||(r[0]=a=>e("action",{event:a,name:o.action}))},null,8,["label"])):H("",!0)]),et("div",Du,[$(o.$slots,"icon",{},()=>[o.icon||s[o.variant]?(_(),nt(ot(Ae),{key:0,icon:o.icon||s[o.variant]},null,8,["icon"])):H("",!0)])])],2))}});var ce=(t,e=[])=>({parts:(...n)=>{if(Fu(e))return ce(t,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>ce(t,[...e,...n]),rename:n=>ce(n,e),keys:()=>e,build:()=>[...new Set(e)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${Pe(t)}"][data-part="${Pe(i)}"]`,`& [data-scope="${Pe(t)}"][data-part="${Pe(i)}"]`].join(", "),attrs:{"data-scope":Pe(t),"data-part":Pe(i)}}}),{})}),Pe=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Fu=t=>t.length===0,gt=t=>t?"":void 0,Dn=t=>t?"true":void 0;function Qn(t){return typeof t=="object"&&t?.nodeType===Node.ELEMENT_NODE&&typeof t?.nodeName=="string"}function ti(t,e){return!t||!e||!Qn(t)||!Qn(e)?!1:t===e||t.contains(e)}var Ou=t=>t.nodeType===Node.DOCUMENT_NODE?t:t.ownerDocument??document;function En(t){const e={getRootNode:n=>{var i;return((i=n.getRootNode)==null?void 0:i.call(n))??document},getDoc:n=>Ou(e.getRootNode(n)),getWin:n=>e.getDoc(n).defaultView??window,getActiveElement:n=>e.getDoc(n).activeElement,getById:(n,i)=>e.getRootNode(n).getElementById(i),setValue:(n,i)=>{n==null||i==null||(n.value=i.toString())}};return{...e,...t}}var Mu=t=>t.nodeType===Node.DOCUMENT_NODE;function Vs(t){return Mu(t)?t:t?.ownerDocument??document}function Ru(t){return t?.ownerDocument.defaultView??window}function ei(t){var e;return((e=t.composedPath)==null?void 0:e.call(t)[0])??t.target}var Ur=()=>typeof document<"u";function Pu(){const t=navigator.userAgentData;return t?.platform??navigator.platform}var Wr=t=>Ur()&&t.test(Pu()),Lu=()=>Ur()&&!!navigator.maxTouchPoints,Bu=()=>Wr(/^Mac/)&&!Lu(),Nu=()=>Wr(/mac|iphone|ipad|ipod/i),ju=()=>Nu()&&!Bu();function Xr(t,e){return Array.from(t?.querySelectorAll(e)??[])}function Yr(t){const e=new Set;function n(i){const s=globalThis.requestAnimationFrame(i);e.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(t)),function(){e.forEach(i=>i())}}function xn(t){const e=globalThis.requestAnimationFrame(t);return()=>{globalThis.cancelAnimationFrame(e)}}var Kr={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};const Vu=Symbol(),Co=Object.getPrototypeOf,vs=new WeakMap,$u=t=>t&&(vs.has(t)?vs.get(t):Co(t)===Object.prototype||Co(t)===Array.prototype),Zr=t=>$u(t)&&t[Vu]||null,ni=(t,e=!0)=>{vs.set(t,e)};var ji=t=>typeof t=="object"&&t!==null,Ee=new WeakMap,tn=new WeakSet,zu=(t=Object.is,e=(c,l)=>new Proxy(c,l),n=c=>ji(c)&&!tn.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),i=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},s=new WeakMap,o=(c,l,d=i)=>{const h=s.get(c);if(h?.[0]===l)return h[1];const p=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return ni(p,!0),s.set(c,[l,p]),Reflect.ownKeys(c).forEach(g=>{const f=Reflect.get(c,g);tn.has(f)?(ni(f,!1),p[g]=f):f instanceof Promise?Object.defineProperty(p,g,{get(){return d(f)}}):Ee.has(f)?p[g]=Ue(f,d):p[g]=f}),Object.freeze(p)},r=new WeakMap,a=[1,1],u=c=>{if(!ji(c))throw new Error("object required");const l=r.get(c);if(l)return l;let d=a[0];const h=new Set,p=(x,b=++a[0])=>{d!==b&&(d=b,h.forEach(m=>m(x,b)))};let g=a[1];const f=(x=++a[1])=>(g!==x&&!h.size&&(g=x,v.forEach(([b])=>{const m=b[1](x);m>d&&(d=m)})),d),y=x=>(b,m)=>{const E=[...b];E[1]=[x,...E[1]],p(E,m)},v=new Map,k=(x,b)=>{if(h.size){const m=b[3](y(x));v.set(x,[b,m])}else v.set(x,[b])},w=x=>{var b;const m=v.get(x);m&&(v.delete(x),(b=m[1])==null||b.call(m))},T=x=>(h.add(x),h.size===1&&v.forEach(([b,m],E)=>{const F=b[3](y(E));v.set(E,[b,F])}),()=>{h.delete(x),h.size===0&&v.forEach(([b,m],E)=>{m&&(m(),v.set(E,[b]))})}),M=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),D=e(M,{deleteProperty(x,b){const m=Reflect.get(x,b);w(b);const E=Reflect.deleteProperty(x,b);return E&&p(["delete",[b],m]),E},set(x,b,m,E){var F;const z=Reflect.has(x,b),N=Reflect.get(x,b,E);if(z&&(t(N,m)||r.has(m)&&t(N,r.get(m))))return!0;w(b),ji(m)&&(m=Zr(m)||m);let B=m;if(!((F=Object.getOwnPropertyDescriptor(x,b))!=null&&F.set))if(m instanceof Promise)m.then(P=>{m.status="fulfilled",m.value=P,p(["resolve",[b],P])}).catch(P=>{m.status="rejected",m.reason=P,p(["reject",[b],P])});else{!Ee.has(m)&&n(m)&&(B=$s(m));const P=!tn.has(B)&&Ee.get(B);P&&k(b,P)}return Reflect.set(x,b,B,E),p(["set",[b],m,N]),!0}});r.set(c,D);const W=[M,f,o,T];return Ee.set(D,W),Reflect.ownKeys(c).forEach(x=>{const b=Object.getOwnPropertyDescriptor(c,x);b.get||b.set?Object.defineProperty(M,x,b):D[x]=c[x]}),D})=>[u,Ee,tn,t,e,n,i,s,o,r,a],[Hu]=zu();function $s(t={}){return Hu(t)}function ms(t,e,n){const i=Ee.get(t);let s;const o=[],r=i[3];let a=!1;const u=r(c=>{if(o.push(c),n){e(o.splice(0));return}s||(s=Promise.resolve().then(()=>{s=void 0,a&&e(o.splice(0))}))});return a=!0,()=>{a=!1,u()}}function Ue(t,e){const n=Ee.get(t),[i,s,o]=n;return o(i,s(),e)}function _o(t){return tn.add(t),t}function Gu(t,e){Object.keys(e).forEach(i=>{if(Object.getOwnPropertyDescriptor(t,i))throw new Error("object property already defined");const s=e[i],{get:o,set:r}=typeof s=="function"?{get:s}:s,a={};a.get=()=>o(Ue(n)),r&&(a.set=u=>r(n,u)),Object.defineProperty(t,i,a)});const n=$s(t);return n}var qu=(t,e)=>Object.is(t,e);function So(t,e,n,i,s){let o=Reflect.get(Ue(t),e);const r=s||qu;function a(){const u=Ue(t);r(o,u[e])||(n(u[e]),o=Reflect.get(u,e))}return ms(t,a,i)}function Ao(t,e,n){typeof n.value=="object"&&(n.value=_e(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function _e(t){if(typeof t!="object")return t;var e=0,n,i,s,o=Object.prototype.toString.call(t);if(o==="[object Object]"?s=Object.create(t.__proto__||null):o==="[object Array]"?s=Array(t.length):o==="[object Set]"?(s=new Set,t.forEach(function(r){s.add(_e(r))})):o==="[object Map]"?(s=new Map,t.forEach(function(r,a){s.set(_e(a),_e(r))})):o==="[object Date]"?s=new Date(+t):o==="[object RegExp]"?s=new RegExp(t.source,t.flags):o==="[object DataView]"?s=new t.constructor(_e(t.buffer)):o==="[object ArrayBuffer]"?s=t.slice(0):o.slice(-6)==="Array]"&&(s=new t.constructor(t)),s){for(i=Object.getOwnPropertySymbols(t);e<i.length;e++)Ao(s,i[e],Object.getOwnPropertyDescriptor(t,i[e]));for(e=0,i=Object.getOwnPropertyNames(t);e<i.length;e++)Object.hasOwnProperty.call(s,n=i[e])&&s[n]===t[n]||Ao(s,n,Object.getOwnPropertyDescriptor(t,n))}return s||t}var Uu=Object.defineProperty,Wu=(t,e,n)=>e in t?Uu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e,n)=>(Wu(t,typeof e!="symbol"?e+"":e,n),n);function Xu(t){for(;t.length>0;)t.pop();return t}var To=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,Xt=t=>t,Vi=()=>{},Yu=(()=>{let t=0;return()=>(t++,t.toString(36))})(),ln=t=>Array.isArray(t),un=t=>!(t==null||typeof t!="object"||ln(t)),Ku=t=>typeof t=="number"&&!Number.isNaN(t),Ht=t=>typeof t=="string",ii=t=>typeof t=="function";function si(t){if(!Zu(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(i=>typeof i=="string"),n={};for(const i of e){const s=t[i];s!==void 0&&(n[i]=si(s))}return n}var Zu=t=>t&&typeof t=="object"&&t.constructor===Object;function $i(...t){t.length===1?t[0]:t[1],t.length!==2||t[0]}function zn(...t){const e=t.length===1?t[0]:t[1];t.length!==2||t[0]}function Jr(t,...e){for(const n of e){const i=si(n);for(const s in i)un(n[s])?(t[s]||(t[s]={}),Jr(t[s],n[s])):t[s]=n[s]}return t}function Io(t){return _e(t)}function vt(t){return Ht(t)?{type:t}:t}function se(t){return t?ln(t)?t.slice():[t]:[]}function Qr(t){return un(t)&&t.predicate!=null}var Ju=()=>!0;function zs(t,e,n,i){return s=>{var o;return Ht(s)?!!((o=t[s])!=null&&o.call(t,e,n,i)):ii(s)?s(e,n,i):s.predicate(t)(e,n,i)}}function Qu(...t){return{predicate:e=>(n,i,s)=>t.map(zs(e,n,i,s)).some(Boolean)}}function tc(...t){return{predicate:e=>(n,i,s)=>t.map(zs(e,n,i,s)).every(Boolean)}}function ec(t){return{predicate:e=>(n,i,s)=>!zs(e,n,i,s)(t)}}function nc(...t){return(e,n,i)=>i.state.matches(...t)}var ta={or:Qu,and:tc,not:ec,stateIn:nc};function ea(t,e){return t=t??Ju,(n,i,s)=>{if(Ht(t)){const o=e[t];return ii(o)?o(n,i,s):o}return Qr(t)?t.predicate(e)(n,i,s):t?.(n,i,s)}}function zi(t,e){return(n,i,s)=>Qr(t)?t.predicate(e)(n,i,s):t}function ic(t){const e=t.computed??Xt({}),n=t.context??Xt({}),i=$s({value:t.initial??"",previousValue:"",event:Xt({}),previousEvent:Xt({}),context:Gu(n,e),done:!1,tags:[],hasTag(s){return this.tags.includes(s)},matches(...s){return s.includes(this.value)},can(s){return Xt(this).nextEvents.includes(s)},get nextEvents(){var s,o;const r=((o=(s=t.states)==null?void 0:s[this.value])==null?void 0:o.on)??{},a=t?.on??{};return Object.keys({...r,...a})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return Xt(i)}function Fn(t,e){return(n,i)=>{if(Ku(t))return t;if(ii(t))return t(n,i);if(Ht(t)){const s=Number.parseFloat(t);if(!Number.isNaN(s))return s;if(e){const o=e?.[t];return zn(o==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${t}\`. It doesn't exist in \`options.delays\``),ii(o)?o(n,i):o}}}}function sc(t){return Ht(t)?{target:t}:t}function oc(t,e){return(n,i,s)=>se(t).map(sc).find(o=>ea(o.guard,e)(n,i,s)??o.target??o.actions)}var rc=class na{constructor(e,n){var i,s,o,r,a,u;A(this,"status","Not Started"),A(this,"state"),A(this,"initialState"),A(this,"initialContext"),A(this,"id"),A(this,"type","machine"),A(this,"activityEvents",new Map),A(this,"delayedEvents",new Map),A(this,"stateListeners",new Set),A(this,"contextListeners",new Set),A(this,"eventListeners",new Set),A(this,"doneListeners",new Set),A(this,"contextWatchers",new Set),A(this,"removeStateListener",Vi),A(this,"removeEventListener",Vi),A(this,"removeContextListener",Vi),A(this,"parent"),A(this,"children",new Map),A(this,"guardMap"),A(this,"actionMap"),A(this,"delayMap"),A(this,"activityMap"),A(this,"sync"),A(this,"options"),A(this,"config"),A(this,"start",l=>{if(this.state.value="",this.status==="Running")return this;this.status="Running",this.removeStateListener=ms(this.state,()=>{this.stateListeners.forEach(y=>{y(this.stateSnapshot)})},this.sync),this.removeEventListener=So(this.state,"event",y=>{this.executeActions(this.config.onEvent,y),this.eventListeners.forEach(v=>{v(y)})},this.sync),this.removeContextListener=ms(this.state.context,()=>{this.log("Context:",this.contextSnapshot),this.contextListeners.forEach(y=>{y(this.contextSnapshot)})},this.sync||this.options.debug),this.setupContextWatchers(),this.executeActivities(vt("machine.start"),se(this.config.activities),"machine.start"),this.executeActions(this.config.entry,vt("machine.start"));const d=vt("machine.init"),h=un(l)?l.value:l,p=un(l)?l.context:void 0;p&&this.setContext(p);const g={target:h??this.config.initial},f=this.getNextStateInfo(g,d);return this.initialState=f,this.performStateChangeEffects(this.state.value,f,d),this}),A(this,"setupContextWatchers",()=>{var l;for(const[d,h]of Object.entries(this.config.watch??{})){const p=(l=this.options.compareFns)==null?void 0:l[d],g=So(this.state.context,d,()=>{this.executeActions(h,this.state.event)},this.sync,p);this.contextWatchers.add(g)}}),A(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,vt("machine.stop")),this.executeActions(this.config.exit,vt("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.stopEventListeners(),this.stopContextListeners(),this.status="Stopped",this}),A(this,"stopEventListeners",()=>{this.eventListeners.clear(),this.removeEventListener()}),A(this,"stopContextListeners",()=>{this.contextListeners.clear(),this.removeContextListener()}),A(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),A(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(l=>l()),this.contextWatchers.clear()}),A(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(l=>{l.forEach(d=>d())}),this.delayedEvents.clear()}),A(this,"stopActivities",l=>{var d,h;l?((d=this.activityEvents.get(l))==null||d.forEach(p=>p()),(h=this.activityEvents.get(l))==null||h.clear(),this.activityEvents.delete(l)):(this.activityEvents.forEach(p=>{p.forEach(g=>g()),p.clear()}),this.activityEvents.clear())}),A(this,"sendChild",(l,d)=>{const h=vt(l),p=To(d,this.contextSnapshot),g=this.children.get(p);g||zn(`[@zag-js/core] Cannot send '${h.type}' event to unknown child`),g.send(h)}),A(this,"stopChild",l=>{this.children.has(l)||zn(`[@zag-js/core > stop-child] Cannot stop unknown child ${l}`),this.children.get(l).stop(),this.children.delete(l)}),A(this,"removeChild",l=>{this.children.delete(l)}),A(this,"stopChildren",()=>{this.children.forEach(l=>l.stop()),this.children.clear()}),A(this,"setParent",l=>{this.parent=l}),A(this,"spawn",(l,d)=>{const h=To(l);return d&&(h.id=d),h.type="machine.actor",h.setParent(this),this.children.set(h.id,Xt(h)),h.onDone(()=>{this.removeChild(h.id)}).start(),Xt(_o(h))}),A(this,"addActivityCleanup",(l,d)=>{var h;l&&(this.activityEvents.has(l)?(h=this.activityEvents.get(l))==null||h.add(d):this.activityEvents.set(l,new Set([d])))}),A(this,"setState",l=>{this.state.previousValue=this.state.value,this.state.value=l;const d=this.getStateNode(l);l==null?Xu(this.state.tags):this.state.tags=se(d?.tags)}),A(this,"transformContext",l=>{var d,h;return(h=(d=this.options)==null?void 0:d.transformContext)==null||h.call(d,l),l}),A(this,"setContext",l=>{l&&Jr(this.state.context,this.transformContext(l))}),A(this,"withContext",l=>{const d=this.transformContext(l),h={...this.config.context,...si(d)};return new na({...this.config,context:h},this.options)}),A(this,"setOptions",l=>{const d=si(l);this.actionMap={...this.actionMap,...d.actions},this.delayMap={...this.delayMap,...d.delays},this.activityMap={...this.activityMap,...d.activities},this.guardMap={...this.guardMap,...d.guards}}),A(this,"getStateNode",l=>{var d;if(l)return(d=this.config.states)==null?void 0:d[l]}),A(this,"getNextStateInfo",(l,d)=>{const h=this.determineTransition(l,d),p=!(h!=null&&h.target),g=h?.target??this.state.value,f=this.state.value!==g,y=this.getStateNode(g),v={reenter:!p&&!f&&!(h!=null&&h.internal),transition:h,stateNode:y,target:g,changed:f};return this.log("NextState:",`[${d.type}]`,this.state.value,"---->",v.target),v}),A(this,"getActionFromDelayedTransition",l=>{const d=vt("machine.after"),h=Fn(l.delay,this.delayMap)(this.contextSnapshot,d);let p;return{entry:()=>{p=globalThis.setTimeout(()=>{const g=this.getNextStateInfo(l,d);this.performStateChangeEffects(this.state.value,g,d)},h)},exit:()=>{globalThis.clearTimeout(p)}}}),A(this,"getDelayedEventActions",l=>{const d=this.getStateNode(l),h=vt("machine.after");if(!d||!d.after)return;const p=[],g=[];if(ln(d.after)){const f=this.determineTransition(d.after,h);if(!f)return;const y=this.getActionFromDelayedTransition(f);p.push(y.entry),g.push(y.exit)}else if(un(d.after))for(const f in d.after){const y=d.after[f];let v={};if(ln(y)){const w=this.determineTransition(y,h);w&&(v=w)}else Ht(y)?v={target:y,delay:f}:v={...y,delay:f};const k=this.getActionFromDelayedTransition(v);p.push(k.entry),g.push(k.exit)}return{entries:p,exits:g}}),A(this,"executeActions",(l,d)=>{var h;const p=zi(l,this.guardMap)(this.contextSnapshot,d,this.guardMeta);for(const g of se(p)){const f=Ht(g)?(h=this.actionMap)==null?void 0:h[g]:g;$i(Ht(g)&&!f,`[@zag-js/core > execute-actions] No implementation found for action: \`${g}\``),f?.(this.state.context,d,this.meta)}}),A(this,"executeActivities",(l,d,h)=>{var p;for(const g of d){const f=Ht(g)?(p=this.activityMap)==null?void 0:p[g]:g;if(!f){$i(`[@zag-js/core > execute-activity] No implementation found for activity: \`${g}\``);continue}const y=f(this.state.context,l,this.meta);y&&this.addActivityCleanup(h??this.state.value,y)}}),A(this,"createEveryActivities",(l,d)=>{if(!l)return;const h=vt("machine.every");if(ln(l)){const p=se(l).find(f=>{const y=f.delay,v=Fn(y,this.delayMap)(this.contextSnapshot,h);return ea(f.guard,this.guardMap)(this.contextSnapshot,h,this.guardMeta)??v!=null});if(!p)return;const g=Fn(p.delay,this.delayMap)(this.contextSnapshot,h);d(()=>{const f=globalThis.setInterval(()=>{this.executeActions(p.actions,h)},g);return()=>{globalThis.clearInterval(f)}})}else for(const p in l){const g=l?.[p],f=Fn(p,this.delayMap)(this.contextSnapshot,h);d(()=>{const y=globalThis.setInterval(()=>{this.executeActions(g,h)},f);return()=>{globalThis.clearInterval(y)}})}}),A(this,"setEvent",l=>{this.state.previousEvent=this.state.event,this.state.event=_o(vt(l))}),A(this,"performExitEffects",(l,d)=>{const h=this.state.value;if(h==="")return;const p=l?this.getStateNode(l):void 0;this.stopActivities(h);const g=zi(p?.exit,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=se(g),y=this.delayedEvents.get(h);y&&f.push(...y),this.executeActions(f,d),this.eventListeners.clear()}),A(this,"performEntryEffects",(l,d)=>{const h=this.getStateNode(l),p=se(h?.activities);this.createEveryActivities(h?.every,v=>{p.unshift(v)}),p.length>0&&this.executeActivities(d,p);const g=zi(h?.entry,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=se(g),y=this.getDelayedEventActions(l);h!=null&&h.after&&y&&(this.delayedEvents.set(l,y?.exits),f.push(...y.entries)),this.executeActions(f,d),h?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(v=>{v(this.stateSnapshot)}),this.stop())}),A(this,"performTransitionEffects",(l,d)=>{const h=this.determineTransition(l,d);this.executeActions(h?.actions,d)}),A(this,"performStateChangeEffects",(l,d,h)=>{this.setEvent(h);const p=d.changed||d.reenter;p&&this.performExitEffects(l,h),this.performTransitionEffects(d.transition,h),this.setState(d.target),p&&this.performEntryEffects(d.target,h)}),A(this,"determineTransition",(l,d)=>{const h=oc(l,this.guardMap);return h?.(this.contextSnapshot,d,this.guardMeta)}),A(this,"sendParent",l=>{var d;this.parent||zn("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const h=vt(l);(d=this.parent)==null||d.send(h)}),A(this,"log",(...l)=>{}),A(this,"send",l=>{const d=vt(l);this.transition(this.state.value,d)}),A(this,"transition",(l,d)=>{var h,p;const g=Ht(l)?this.getStateNode(l):l?.stateNode,f=vt(d);if(!g&&!this.config.on){const k=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${l}, \`event\`: ${f.type}`;$i(k);return}const y=((h=g?.on)==null?void 0:h[f.type])??((p=this.config.on)==null?void 0:p[f.type]),v=this.getNextStateInfo(y,f);return this.performStateChangeEffects(this.state.value,v,f),v.stateNode}),A(this,"subscribe",l=>(this.stateListeners.add(l),this.status==="Running"&&l(this.stateSnapshot),()=>{this.stateListeners.delete(l)})),A(this,"onDone",l=>(this.doneListeners.add(l),this)),A(this,"onTransition",l=>(this.stateListeners.add(l),this.status==="Running"&&l(this.stateSnapshot),this)),A(this,"onChange",l=>(this.contextListeners.add(l),this)),A(this,"onEvent",l=>(this.eventListeners.add(l),this)),this.config=Io(e),this.options=Io(n??{}),this.id=this.config.id??`machine-${Yu()}`,this.guardMap=((i=this.options)==null?void 0:i.guards)??{},this.actionMap=((s=this.options)==null?void 0:s.actions)??{},this.delayMap=((o=this.options)==null?void 0:o.delays)??{},this.activityMap=((r=this.options)==null?void 0:r.activities)??{},this.sync=((a=this.options)==null?void 0:a.sync)??!1,this.state=ic(this.config),this.initialContext=Ue(this.state.context),this.transformContext(this.state.context);const c=vt("machine.created");this.executeActions((u=this.config)==null?void 0:u.created,c)}get stateSnapshot(){return Xt(Ue(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){var n;return((n=e.initialState)==null?void 0:n.target)??""}}}get meta(){var e;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((e=this.initialState)==null?void 0:e.target)??"",getState:()=>this.stateSnapshot,getAction:n=>this.actionMap[n],getGuard:n=>this.guardMap[n]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},Hs=(t,e)=>new rc(t,e);function ac(t,e,n){if(!t)return;const i=t.ownerDocument.defaultView||window,s=new i.MutationObserver(o=>{for(const r of o)r.type==="attributes"&&r.attributeName&&e.includes(r.attributeName)&&n(r)});return s.observe(t,{attributes:!0,attributeFilter:e}),()=>s.disconnect()}var Gs=t=>t.ownerDocument.defaultView||window;function ia(t,e){const{type:n="HTMLInputElement",property:i="value"}=e,s=Gs(t)[n].prototype;return Object.getOwnPropertyDescriptor(s,i)??{}}function lc(t,e,n={}){var i;(i=ia(t,n).set)==null||i.call(t,e)}function uc(t,e){var n;(n=ia(t,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(t,e)}function sa(t,e){const{value:n,bubbles:i=!0}=e;if(!t)return;const s=Gs(t);t instanceof s.HTMLInputElement&&(lc(t,`${n}`),t.dispatchEvent(new s.Event("input",{bubbles:i})))}function oa(t,e){const{checked:n,bubbles:i=!0}=e;if(!t)return;const s=Gs(t);t instanceof s.HTMLInputElement&&(uc(t,n),t.dispatchEvent(new s.Event("click",{bubbles:i})),t.dispatchEvent(new s.Event("change",{bubbles:i})))}function cc(t){return dc(t)?t.form:t.closest("form")}function dc(t){return t.matches("textarea, input, select, button")}function hc(t,e){if(!t)return;const n=cc(t);return n?.addEventListener("reset",e,{passive:!0}),()=>{n?.removeEventListener("reset",e)}}function pc(t,e){const n=t?.closest("fieldset");if(n)return e(n.disabled),ac(n,["disabled"],()=>e(n.disabled))}function ra(t,e){if(!t)return;const{onFieldsetDisabledChange:n,onFormReset:i}=e,s=[hc(t,i),pc(t,n)];return()=>{s.forEach(o=>o?.())}}var Do=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,Fo=(...t)=>(...e)=>{t.forEach(function(n){n?.(...e)})},fc=t=>typeof t=="string";function Si(t){if(!gc(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(i=>typeof i=="string"),n={};for(const i of e){const s=t[i];s!==void 0&&(n[i]=Si(s))}return n}var gc=t=>t&&typeof t=="object"&&t.constructor===Object;function vc(...t){t.length===1?t[0]:t[1],t.length!==2||t[0]}var mc=ce("checkbox").parts("root","label","control"),Hi=mc.build(),xt=En({getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`checkbox:${t.id}`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`checkbox:${t.id}:label`},getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`checkbox:${t.id}:control`},getHiddenInputId:t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`checkbox:${t.id}:hidden`},getRootEl:t=>xt.getById(t,xt.getRootId(t)),getHiddenInputEl:t=>xt.getById(t,xt.getHiddenInputId(t))});function bc(t,e,n){const i=t.context.isDisabled,s=!i&&t.context.focused,o=t.context.isChecked,r=t.context.isIndeterminate,a={"data-active":gt(t.context.active),"data-focus":gt(s),"data-hover":gt(t.context.hovered),"data-disabled":gt(i),"data-state":r?"indeterminate":t.context.checked?"checked":"unchecked","data-invalid":gt(t.context.invalid)};return{isChecked:o,isDisabled:i,isIndeterminate:r,isFocused:s,checkedState:t.context.checked,setChecked(u){e({type:"CHECKED.SET",checked:u,isTrusted:!1})},toggleChecked(){e({type:"CHECKED.TOGGLE",checked:o,isTrusted:!1})},rootProps:n.label({...Hi.root.attrs,...a,id:xt.getRootId(t.context),htmlFor:xt.getHiddenInputId(t.context),onPointerMove(){i||e({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){i||e({type:"CONTEXT.SET",context:{hovered:!1}})},onPointerDown(u){i||(s&&u.pointerType==="mouse"&&u.preventDefault(),e({type:"CONTEXT.SET",context:{active:!0}}))},onPointerUp(){i||e({type:"CONTEXT.SET",context:{active:!1}})},onClick(u){u.target===xt.getHiddenInputEl(t.context)&&u.stopPropagation()}}),labelProps:n.element({...Hi.label.attrs,...a,id:xt.getLabelId(t.context)}),controlProps:n.element({...Hi.control.attrs,...a,id:xt.getControlId(t.context),"aria-hidden":!0}),hiddenInputProps:n.input({id:xt.getHiddenInputId(t.context),type:"checkbox",required:t.context.required,defaultChecked:o,disabled:i,"data-disabled":gt(i),"aria-labelledby":xt.getLabelId(t.context),"aria-invalid":t.context.invalid,name:t.context.name,form:t.context.form,value:t.context.value,style:Kr,onChange(u){const c=u.currentTarget.checked;e({type:"CHECKED.SET",checked:c,isTrusted:!0})},onBlur(){e({type:"CONTEXT.SET",context:{focused:!1}})},onFocus(){e({type:"CONTEXT.SET",context:{focused:!0}})},onKeyDown(u){u.key===" "&&e({type:"CONTEXT.SET",context:{active:!0}})},onKeyUp(u){u.key===" "&&e({type:"CONTEXT.SET",context:{active:!1}})}})}}var{not:Oo}=ta;function yc(t){const e=Si(t);return Hs({id:"checkbox",initial:"ready",context:{checked:!1,value:"on",disabled:!1,...e,fieldsetDisabled:!1},watch:{disabled:"removeFocusIfNeeded",checked:"syncInputElement"},activities:["trackFormControlState"],on:{"CHECKED.TOGGLE":[{guard:Oo("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:Oo("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{isIndeterminate:n=>bs(n.checked),isChecked:n=>Mo(n.checked),isDisabled:n=>!!n.disabled||n.fieldsetDisabled},states:{ready:{}}},{guards:{isTrusted:(n,i)=>!!i.isTrusted},activities:{trackFormControlState(n,i,{send:s,initialContext:o}){return ra(xt.getHiddenInputEl(n),{onFieldsetDisabledChange(r){n.fieldsetDisabled=r},onFormReset(){s({type:"CHECKED.SET",checked:!!o.checked})}})}},actions:{setContext(n,i){Object.assign(n,i.context)},syncInputElement(n){const i=xt.getHiddenInputEl(n);i&&(i.checked=n.isChecked,i.indeterminate=n.isIndeterminate)},removeFocusIfNeeded(n){n.disabled&&n.focused&&(n.focused=!1)},setChecked(n,i){Ro.checked(n,i.checked)},toggleChecked(n){const i=bs(n.checked)?!0:!n.checked;Ro.checked(n,i)},dispatchChangeEvent(n){const i=xt.getHiddenInputEl(n);oa(i,{checked:Mo(n.checked)})}}})}function bs(t){return t==="indeterminate"}function Mo(t){return bs(t)?!1:!!t}var xc={change:t=>{var e;(e=t.onChange)==null||e.call(t,{checked:t.checked})}},Ro={checked:(t,e)=>{t.checked=e,xc.change(t)}};function kc(t){return new Proxy({},{get(){return t}})}function Ec(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}var Po={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"};function wc(t){return t in Po?Po[t]:t.startsWith("on")?`on${Ec(t.substr(2))}`:t.toLowerCase()}var Ai=kc(t=>{const e={};for(const n in t){const i=t[n];n==="children"?typeof i=="string"&&(e.innerHTML=i):e[wc(n)]=t[n]}return e});function Cc(t,e){const{actions:n,state:i,context:s}=e??{},o=typeof t=="function"?t():t,r=s?o.withContext(s.value):o;return ge(()=>{r.start(i),r.state.can("SETUP")&&r.send("SETUP"),Ei(()=>{r.stop()})}),_r(()=>{r.setOptions({actions:n})}),s&&At(s,r.setContext,{deep:!0}),r}function Ti(t,e){const n=Cc(t,e),i=ll(n.state);return ge(()=>{const s=n.subscribe(o=>{i.value=o});Ei(()=>{s?.()})}),[i,n.send,n]}function De(t={}){const{prefix:e}=t,n=wu();return e?`${e}-${n}`:n}const _c={class:"k-checkbox__label"},Sc={key:0,class:"k-checkbox__help"},Lo=tt({__name:"Checkbox",props:{modelValue:{type:[Boolean,Array]},value:{},label:{},disabled:{type:Boolean},help:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;if(n.modelValue instanceof Array&&!n.value)throw new Error("props.value is required if props.modelValue is an array");const i=()=>{const{modelValue:c,value:l}=n;return c instanceof Array?c.some(d=>An(d)===An(l)):!!c};function s(c){const{modelValue:l,value:d}=n;if(!(l instanceof Array))return e("update:modelValue",typeof c=="boolean"?c:void 0);if(!(typeof c!="boolean"||!d))return c?e("update:modelValue",[...l,d]):e("update:modelValue",l.filter(h=>An(h)!==An(d)))}const o={id:De(),checked:i(),onChange:({checked:c})=>{if(i()!==c)return s(c)}},[r,a]=Ti(yc(o),{context:G(()=>({disabled:n.disabled}))}),u=G(()=>bc(r.value,a,Ai));return At(()=>n.modelValue,()=>{const c=i();if(u.value.isChecked!==c)return u.value.setChecked(c)}),(c,l)=>(_(),O("label",at({class:"k-checkbox"},u.value.rootProps),[et("div",kt(Rt(u.value.controlProps)),[u.value.isChecked?(_(),nt(ot(Ae),{key:0,icon:"fa-pro-solid:check"})):H("",!0)],16),et("span",kt(Rt(u.value.labelProps)),[et("span",_c,[$(c.$slots,"default",{},()=>[Gt(ut(c.label),1)])]),c.$slots.help||c.help?(_(),O("span",Sc,[$(c.$slots,"help",{},()=>[Gt(ut(c.help),1)])])):H("",!0)],16),et("input",kt(Rt(u.value.hiddenInputProps)),null,16)],16))}}),qs=Symbol("form-control"),Ac={class:"k-formcontrol"},Tc=["for"],Ic={key:1,class:"k-formcontrol__error"},Dc={key:2,class:"k-formcontrol__help"},sg=tt({__name:"FormControl",props:{label:{},help:{},error:{}},setup(t){const e=t,n=De({prefix:"k-formcontrol"}),i=G(()=>`${n}_label`),s=G(()=>`${n}_help`);return ul(qs,G(()=>({...e,id:n,labelId:i.value,helpId:s.value,invalid:!!e.error}))),(o,r)=>(_(),O("div",Ac,[o.$slots.label||o.label?(_(),O("label",{key:0,class:"k-formcontrol__label",for:ot(n)},[$(o.$slots,"label",{},()=>[Gt(ut(o.label),1)])],8,Tc)):H("",!0),$(o.$slots,"default",{id:ot(n)}),o.$slots.error||o.error?(_(),O("span",Ic,[$(o.$slots,"error",{},()=>[Gt(ut(o.error),1)])])):H("",!0),o.$slots.help||o.help?(_(),O("span",Dc,[$(o.$slots,"help",{},()=>[Gt(ut(o.help),1)])])):H("",!0)]))}});function de(t){return typeof t=="string"||t instanceof String}function Bo(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function aa(t,e){return Array.isArray(e)?aa(t,(n,i)=>e.includes(i)):Object.entries(t).reduce((n,i)=>{let[s,o]=i;return e(o,s)&&(n[s]=o),n},{})}const I={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Fc(t){switch(t){case I.LEFT:return I.FORCE_LEFT;case I.RIGHT:return I.FORCE_RIGHT;default:return t}}function Gi(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function oi(t,e){if(e===t)return!0;const n=Array.isArray(e),i=Array.isArray(t);let s;if(n&&i){if(e.length!=t.length)return!1;for(s=0;s<e.length;s++)if(!oi(e[s],t[s]))return!1;return!0}if(n!=i)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const o=e instanceof Date,r=t instanceof Date;if(o&&r)return e.getTime()==t.getTime();if(o!=r)return!1;const a=e instanceof RegExp,u=t instanceof RegExp;if(a&&u)return e.toString()==t.toString();if(a!=u)return!1;const c=Object.keys(e);for(s=0;s<c.length;s++)if(!Object.prototype.hasOwnProperty.call(t,c[s]))return!1;for(s=0;s<c.length;s++)if(!oi(t[c[s]],e[c[s]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Oc{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?I.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?I.RIGHT:I.LEFT}}function V(t,e){return new V.InputMask(t,e)}function la(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?V.MaskedRegExp:de(t)?V.MaskedPattern:t===Date?V.MaskedDate:t===Number?V.MaskedNumber:Array.isArray(t)||t===Array?V.MaskedDynamic:V.Masked&&t.prototype instanceof V.Masked?t:V.Masked&&t instanceof V.Masked?t.constructor:t instanceof Function?V.MaskedFunction:(console.warn("Mask not found for mask",t),V.Masked)}function ri(t){if(!t)throw new Error("Options in not defined");if(V.Masked){if(t.prototype instanceof V.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof V.Masked?{mask:t}:Bo(t)&&t.mask instanceof V.Masked?t:{};if(e){const i=e.mask;return{...aa(e,(s,o)=>!o.startsWith("_")),mask:e.constructor,_mask:i,...n}}}return Bo(t)?{...t}:{mask:t}}function Fe(t){if(V.Masked&&t instanceof V.Masked)return t;const e=ri(t),n=la(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}V.createMask=Fe;class Us{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}V.MaskElement=Us;class Re extends Us{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,i;return(e=(n=(i=this.input).getRootNode)==null?void 0:n.call(i))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(Re.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}Re.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"};V.HTMLMaskElement=Re;class Mc extends Re{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}V.HTMLMaskElement=Re;class ua extends Re{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,s=n&&n.focusOffset;return s==null||i==null||i<s?i:s}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,s=n&&n.focusOffset;return s==null||i==null||i>s?i:s}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,e),i.setEnd(this.input.lastChild||this.input,n);const s=this.rootElement,o=s.getSelection&&s.getSelection();o&&(o.removeAllRanges(),o.addRange(i))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}V.HTMLContenteditableMaskElement=ua;class Rc{constructor(e,n){this.el=e instanceof Us?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new ua(e):new Mc(e),this.masked=Fe(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof V.Masked)&&this.masked.constructor===la(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof V.Masked?e:Fe({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const i=this._listeners[e];i&&i.forEach(s=>s(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,i=this.displayValue,s=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==i&&(this.el.value=i),s&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...i}=e,s=!this.maskEquals(n),o=!oi(this.masked,i);s&&(this.mask=n),o&&this.masked.updateOptions(i),(s||o)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,I.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const i=this._listeners[e].indexOf(n);return i>=0&&this._listeners[e].splice(i,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new Oc({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),i=this.masked.rawInputValue,s=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,o=i===this.masked.rawInputValue?n.removeDirection:I.NONE;let r=this.masked.nearestInputPos(n.startChangePos+s,o);o!==I.NONE&&(r=this.masked.nearestInputPos(r,I.NONE)),this.updateControl(),this.updateCursor(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}V.InputMask=Rc;class Z{static normalize(e){return Array.isArray(e)?e:[e,new Z]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}V.ChangeDetails=Z;class Kt{constructor(e,n,i){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=i}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Tt{constructor(e){this._value="",this._update({...Tt.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new Kt(this.extractInput(e,n),e)}appendTail(e){return de(e)&&(e=new Kt(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new Z({inserted:e,rawInserted:e})):new Z}_appendChar(e,n,i){n===void 0&&(n={});const s=this.state;let o;if([e,o]=this.doPrepareChar(e,n),o=o.aggregate(this._appendCharRaw(e,n)),o.inserted){let r,a=this.doValidate(n)!==!1;if(a&&i!=null){const u=this.state;this.overwrite===!0&&(r=i.state,i.unshift(this.displayValue.length-o.tailShift));let c=this.appendTail(i);a=c.rawInserted===i.toString(),!(a&&c.inserted)&&this.overwrite==="shift"&&(this.state=u,r=i.state,i.shift(),c=this.appendTail(i),a=c.rawInserted===i.toString()),a&&c.inserted&&(this.state=u)}a||(o=new Z,this.state=s,i&&r&&(i.state=r))}return o}_appendPlaceholder(){return new Z}_appendEager(){return new Z}append(e,n,i){if(!de(e))throw new Error("value should be string");const s=de(i)?new Kt(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);let o;[e,o]=this.doPrepare(e,n);for(let r=0;r<e.length;++r){const a=this._appendChar(e[r],n,s);if(!a.rawInserted&&!this.doSkipInvalid(e[r],n,s))break;o.aggregate(a)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&o.aggregate(this._appendEager()),s!=null&&(o.tailShift+=this.appendTail(s).tailShift),o}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new Z}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,i=this.value,s=e();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&this.append(i.slice(this.displayValue.length),{},""),delete this._refreshing,s}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,i=e(this);return this.state=n,delete this._isolated,i}doSkipInvalid(e,n,i){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),Z.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),Z.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,i,s,o){s===void 0&&(s=I.NONE),o===void 0&&(o={input:!0});const r=e+n,a=this.extractTail(r),u=this.eager===!0||this.eager==="remove";let c;u&&(s=Fc(s),c=this.extractInput(0,r,{raw:!0}));let l=e;const d=new Z;if(s!==I.NONE&&(l=this.nearestInputPos(e,n>1&&e!==0&&!u?I.NONE:s),d.tailShift=l-e),d.aggregate(this.remove(l)),u&&s!==I.NONE&&c===this.rawInputValue)if(s===I.FORCE_LEFT){let h;for(;c===this.rawInputValue&&(h=this.displayValue.length);)d.aggregate(new Z({tailShift:-1})).aggregate(this.remove(h-1))}else s===I.FORCE_RIGHT&&a.unshift();return d.aggregate(this.append(i,o,a))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||Tt.EMPTY_VALUES.includes(e)&&Tt.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}Tt.DEFAULTS={skipInvalid:!0};Tt.EMPTY_VALUES=[void 0,null,""];V.Masked=Tt;class Se{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=de(e)?new Kt(String(e)):e;const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof Kt)i?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof Se){if(e.stop==null){let s;for(;e.chunks.length&&e.chunks[0].stop==null;)s=e.chunks.shift(),s.from+=e.from,this.extend(s)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof V.MaskedPattern))return new Kt(this.toString()).appendTo(e);const n=new Z;for(let i=0;i<this.chunks.length&&!n.skip;++i){const s=this.chunks[i],o=e._mapPosToBlock(e.displayValue.length),r=s.stop;let a;if(r!=null&&(!o||o.index<=r)){if(s instanceof Se||e._stops.indexOf(r)>=0){const u=e._appendPlaceholder(r);n.aggregate(u)}a=s instanceof Se&&e._blocks[r]}if(a){const u=a.appendTail(s);u.skip=!1,n.aggregate(u),e._value+=u.inserted;const c=s.toString().slice(u.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(s.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...i}=e;Object.assign(this,i),this.chunks=n.map(s=>{const o="chunks"in s?new Se:new Kt;return o.state=s,o})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let i=0;for(;i<this.chunks.length;){const s=this.chunks[i],o=s.unshift(n);if(s.toString()){if(!o)break;++i}else this.chunks.splice(i,1);if(o)return o}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],i=n.shift();if(n.toString()){if(!i)break;--e}else this.chunks.splice(e,1);if(i)return i}return""}}class Pc{constructor(e,n){this.masked=e,this._log=[];const{offset:i,index:s}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=s,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,I.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,I.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,I.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,I.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,I.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,I.NONE),!0})}}class ca{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new Z}nearestInputPos(e,n){n===void 0&&(n=I.NONE);const i=0,s=this._value.length;switch(n){case I.LEFT:case I.FORCE_LEFT:return i;case I.NONE:case I.RIGHT:case I.FORCE_RIGHT:default:return s}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),i===void 0&&(i={}),i.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const i=new Z;if(this.isFilled)return i;const s=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!s)&&!n.tail;return o&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Z;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Kt("")}appendTail(e){return de(e)&&(e=new Kt(String(e))),e.appendTo(this)}append(e,n,i){const s=this._appendChar(e[0],n);return i!=null&&(s.tailShift+=this.appendTail(i).tailShift),s}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class ai{constructor(e){const{parent:n,isOptional:i,placeholderChar:s,displayChar:o,lazy:r,eager:a,...u}=e;this.masked=Fe(u),Object.assign(this,{parent:n,isOptional:i,placeholderChar:s,displayChar:o,lazy:r,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new Z}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new Z;const i=this.masked.state,s=this.masked._appendChar(e,this.currentMaskFlags(n));return s.inserted&&this.doValidate(n)===!1&&(s.inserted=s.rawInserted="",this.masked.state=i),!s.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(s.inserted=this.placeholderChar),s.skip=!s.inserted&&!this.isOptional,this.isFilled=!!s.inserted,s}append(e,n,i){return this.masked.append(e,this.currentMaskFlags(n),i)}_appendPlaceholder(){const e=new Z;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new Z}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,i)}nearestInputPos(e,n){n===void 0&&(n=I.NONE);const i=0,s=this.value.length,o=Math.min(Math.max(e,i),s);switch(n){case I.LEFT:case I.FORCE_LEFT:return this.isComplete?o:i;case I.RIGHT:case I.FORCE_RIGHT:return this.isComplete?o:s;case I.NONE:default:return o}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||e?._beforeTailState}}}ai.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Lc extends Tt{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=i=>i.search(n)>=0),super._update(e)}}V.MaskedRegExp=Lc;class It extends Tt{constructor(e){super({...It.DEFAULTS,...e,definitions:Object.assign({},ai.DEFAULT_DEFINITIONS,e?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let i=!1,s=!1;for(let o=0;o<n.length;++o){if(this.blocks){const c=n.slice(o),l=Object.keys(this.blocks).filter(h=>c.indexOf(h)===0);l.sort((h,p)=>p.length-h.length);const d=l[0];if(d){const{expose:h,...p}=ri(this.blocks[d]),g=Fe({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...p,parent:this});g&&(this._blocks.push(g),h&&(this.exposeBlock=g),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),o+=d.length-1;continue}}let r=n[o],a=r in e;if(r===It.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(r==="{"||r==="}"){i=!i;continue}if(r==="["||r==="]"){s=!s;continue}if(r===It.ESCAPE_CHAR){if(++o,r=n[o],!r)break;a=!1}const u=a?new ai({isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...ri(e[r]),parent:this}):new ca({char:r,eager:this.eager,isUnmasking:i});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...i}=e;this._blocks.forEach((s,o)=>s.state=n[o]),super.state=i}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new Z;let i=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let s=i;s<this._blocks.length;++s){const o=this._blocks[s]._appendEager();if(!o.inserted)break;n.aggregate(o)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const i=this._mapPosToBlock(this.displayValue.length),s=new Z;if(!i)return s;for(let r=i.index;;++r){var o;const a=this._blocks[r];if(!a)break;const u=a._appendChar(e,{...n,_beforeTailState:(o=n._beforeTailState)==null||(o=o._blocks)==null?void 0:o[r]}),c=u.skip;if(s.aggregate(u),c||u.rawInserted)break}return s}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const i=new Se;return e===n||this._forEachBlocksInRange(e,n,(s,o,r,a)=>{const u=s.extractTail(r,a);u.stop=this._findStopBefore(o),u.from=this._blockStartPos(o),u instanceof Se&&(u.blockIndex=o),i.extend(u)}),i}extractInput(e,n,i){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),i===void 0&&(i={}),e===n)return"";let s="";return this._forEachBlocksInRange(e,n,(o,r,a,u)=>{s+=o.extractInput(a,u,i)}),s}_findStopBefore(e){let n;for(let i=0;i<this._stops.length;++i){const s=this._stops[i];if(s<=e)n=s;else break}return n}_appendPlaceholder(e){const n=new Z;if(this.lazy&&e==null)return n;const i=this._mapPosToBlock(this.displayValue.length);if(!i)return n;const s=i.index,o=e??this._blocks.length;return this._blocks.slice(s,o).forEach(r=>{if(!r.lazy||e!=null){var a;const u=r._appendPlaceholder((a=r._blocks)==null?void 0:a.length);this._value+=u.inserted,n.aggregate(u)}}),n}_mapPosToBlock(e){let n="";for(let i=0;i<this._blocks.length;++i){const s=this._blocks[i],o=n.length;if(n+=s.displayValue,e<=n.length)return{index:i,offset:e-o}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,i)=>n+=i.displayValue.length,0)}_forEachBlocksInRange(e,n,i){n===void 0&&(n=this.displayValue.length);const s=this._mapPosToBlock(e);if(s){const o=this._mapPosToBlock(n),r=o&&s.index===o.index,a=s.offset,u=o&&r?o.offset:this._blocks[s.index].displayValue.length;if(i(this._blocks[s.index],s.index,a,u),o&&!r){for(let c=s.index+1;c<o.index;++c)i(this._blocks[c],c,0,this._blocks[c].displayValue.length);i(this._blocks[o.index],o.index,0,o.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const i=super.remove(e,n);return this._forEachBlocksInRange(e,n,(s,o,r,a)=>{i.aggregate(s.remove(r,a))}),i}nearestInputPos(e,n){if(n===void 0&&(n=I.NONE),!this._blocks.length)return 0;const i=new Pc(this,e);if(n===I.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.displayValue.length;if(n===I.LEFT||n===I.FORCE_LEFT){if(n===I.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===e)return e;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===I.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=e||(i.popState(),i.ok&&i.pos<=e))return i.pos;i.popState()}return i.ok?i.pos:n===I.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===I.RIGHT||n===I.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===I.FORCE_RIGHT?this.displayValue.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(e,I.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let i=0;return this._forEachBlocksInRange(e,n,(s,o,r,a)=>{i+=s.totalInputPositions(r,a)}),i}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(i=>this._blocks[i]):[]}}It.DEFAULTS={lazy:!0,placeholderChar:"_"};It.STOP_CHAR="`";It.ESCAPE_CHAR="\\";It.InputDefinition=ai;It.FixedDefinition=ca;V.MaskedPattern=It;class Hn extends It{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:i=this.from||0,maxLength:s=this.maxLength||0,autofix:o=this.autofix,...r}=e;this.to=n,this.from=i,this.maxLength=Math.max(String(n).length,s),this.autofix=o;const a=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<u.length&&u[c]===a[c];)++c;r.mask=u.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",i="";const[,s,o]=e.match(/^(\D*)(\d*)(\D*)/)||[];return o&&(n="0".repeat(s.length)+o,i="9".repeat(s.length)+o),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepareChar(e,n){n===void 0&&(n={});let i;if([e,i]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,i];const s=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0"),r=this.value+e;if(r.length>this.maxLength)return["",i];const[a,u]=this.boundaries(r);return Number(u)<this.from?[s[r.length-1],i]:Number(a)>this.to?this.autofix==="pad"&&r.length<this.maxLength?["",i.aggregate(this.append(s[r.length-1]+e,n))]:[o[r.length-1],i]:[e,i]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,s]=this.boundaries(n);return this.from<=Number(s)&&Number(i)<=this.to&&super.doValidate(e)}}V.MaskedRange=Hn;class Te extends It{constructor(e){const{mask:n,pattern:i,...s}={...Te.DEFAULTS,...e};super({...s,mask:de(n)?n:i})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:i,blocks:s,...o}={...Te.DEFAULTS,...e},r=Object.assign({},Te.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,s),Object.keys(r).forEach(a=>{const u=r[a];!("autofix"in u)&&"autofix"in e&&(u.autofix=e.autofix)}),super._update({...o,mask:de(n)?n:i,blocks:r})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}Te.GET_DEFAULT_BLOCKS=()=>({d:{mask:Hn,from:1,to:31,maxLength:2},m:{mask:Hn,from:1,to:12,maxLength:2},Y:{mask:Hn,from:1900,to:9999}});Te.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),i=String(t.getMonth()+1).padStart(2,"0"),s=t.getFullYear();return[n,i,s].join(".")},parse:(t,e)=>{const[n,i,s]=t.split(".").map(Number);return new Date(s,i-1,n)}};V.MaskedDate=Te;class wn extends Tt{constructor(e){super({...wn.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:i,...s}=ri(n),o=Fe({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return i&&(this.exposeMask=o),o}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const i=this._applyDispatch(e,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),i}_applyDispatch(e,n,i){e===void 0&&(e=""),n===void 0&&(n={}),i===void 0&&(i="");const s=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,o=this.rawInputValue,r=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:o,a=o.slice(r.length),u=this.currentMask,c=new Z,l=u?.state;if(this.currentMask=this.doDispatch(e,{...n},i),this.currentMask)if(this.currentMask!==u){if(this.currentMask.reset(),r){const d=this.currentMask.append(r,{raw:!0});c.tailShift=d.inserted.length-s.length}a&&(c.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)}else l&&(this.currentMask.state=l);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new Z;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,i;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((i=e._beforeTailState)==null?void 0:i.currentMask)||e._beforeTailState}}doDispatch(e,n,i){return n===void 0&&(n={}),i===void 0&&(i=""),this.dispatch(e,this,n,i)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[i,s]=super.doPrepare(e,n);if(this.currentMask){let o;[i,o]=super.doPrepare(i,this.currentMaskFlags(n)),s=s.aggregate(o)}return[i,s]}doPrepareChar(e,n){n===void 0&&(n={});let[i,s]=super.doPrepareChar(e,n);if(this.currentMask){let o;[i,o]=super.doPrepareChar(i,this.currentMaskFlags(n)),s=s.aggregate(o)}return[i,s]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const i=new Z;return this.currentMask&&i.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),i}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:i,currentMask:s,...o}=e;n&&this.compiledMasks.forEach((r,a)=>r.state=n[a]),i!=null&&(this.currentMask=i,this.currentMask.state=s),super.state=o}extractInput(e,n,i){return this.currentMask?this.currentMask.extractInput(e,n,i):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,i)=>{if(!e[i])return;const{mask:s,...o}=e[i];return oi(n,o)&&n.maskEquals(s)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}wn.DEFAULTS=void 0;wn.DEFAULTS={dispatch:(t,e,n,i)=>{if(!e.compiledMasks.length)return;const s=e.rawInputValue,o=e.compiledMasks.map((r,a)=>{const u=e.currentMask===r,c=u?r.displayValue.length:r.nearestInputPos(r.displayValue.length,I.FORCE_LEFT);return r.rawInputValue!==s?(r.reset(),r.append(s,{raw:!0})):u||r.remove(c),r.append(t,e.currentMaskFlags(n)),r.appendTail(i),{index:a,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(c,r.nearestInputPos(r.displayValue.length,I.FORCE_LEFT)))}});return o.sort((r,a)=>a.weight-r.weight||a.totalInputPositions-r.totalInputPositions),e.compiledMasks[o[0].index]}};V.MaskedDynamic=wn;class Bc extends It{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...i}=e;if(n){const s=n.map(a=>a.length),o=Math.min(...s),r=Math.max(...s)-o;i.mask="*".repeat(o),r&&(i.mask+="["+"*".repeat(r)+"]"),this.enum=n}super._update(i)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}V.MaskedEnum=Bc;class Nc extends Tt{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}V.MaskedFunction=Nc;class Mt extends Tt{constructor(e){super({...Mt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"("+Gi(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+i),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Gi).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Gi(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[i,s]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!i&&(s.skip=!0),i&&!this.allowPositive&&!this.value&&i!=="-"&&s.aggregate(this._appendChar("-")),[i,s]}_separatorsCount(e,n){n===void 0&&(n=!1);let i=0;for(let s=0;s<e;++s)this._value.indexOf(this.thousandsSeparator,s)===s&&(++i,n&&(e+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,i))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const o=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const r=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(r);return o.tailShift+=(a-s)*this.thousandsSeparator.length,o.skip=!o.rawInserted&&e===this.thousandsSeparator,o}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=e)return i}return-1}_adjustRangeWithSeparators(e,n){const i=this._findSeparatorAround(e);i>=0&&(e=i);const s=this._findSeparatorAround(n);return s>=0&&(n=s+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const i=this.value.slice(0,e),s=this.value.slice(n),o=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+s));const r=this._separatorsCountFromSlice(i);return new Z({tailShift:(r-o)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case I.NONE:case I.LEFT:case I.FORCE_LEFT:{const i=this._findSeparatorAround(e-1);if(i>=0){const s=i+this.thousandsSeparator.length;if(e<s||this.value.length<=s||n===I.FORCE_LEFT)return i}break}case I.RIGHT:case I.FORCE_RIGHT:{const i=this._findSeparatorAround(e);if(i>=0)return i+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const i=this.number;n=n&&!isNaN(i)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,s,o,r)=>s+r),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,i){n===void 0&&(n={});const s=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Mt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,i)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Mt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Mt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Mt.EMPTY_VALUES.includes(e)&&Mt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Mt.UNMASKED_RADIX=".";Mt.EMPTY_VALUES=[...Tt.EMPTY_VALUES,0];Mt.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Mt.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};V.MaskedNumber=Mt;const ys={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function da(t,e,n){e===void 0&&(e=ys.MASKED),n===void 0&&(n=ys.MASKED);const i=Fe(t);return s=>i.runIsolated(o=>(o[e]=s,o[n]))}function jc(t,e,n,i){return da(e,n,i)(t)}V.PIPE_TYPE=ys;V.createPipe=da;V.pipe=jc;try{globalThis.IMask=V}catch{}function Vc(t,e){let{emit:n,onAccept:i,onComplete:s}=e===void 0?{}:e;const o=hl(t)?t:J(t),r=J(),a=J(),u=J(""),c=J(""),l=J(null);let d,h,p,g;function f(){g=l.value=a.value.typedValue,p=c.value=a.value.unmaskedValue,h=u.value=a.value.value,n&&(n("accept",h),n("accept:masked",h),n("accept:typed",g),n("accept:unmasked",p)),i&&i()}function y(){n&&(n("complete",h),n("complete:masked",h),n("complete:typed",g),n("complete:unmasked",p)),s&&s()}function v(){d=r.value;const w=o.value;!d||!(w!=null&&w.mask)||(a.value=V(d,w).on("accept",f).on("complete",y),f())}function k(){a.value&&(a.value.destroy(),a.value=void 0)}return ge(v),pl(k),At(c,()=>{a.value&&(p=a.value.unmaskedValue=c.value)}),At(u,()=>{a.value&&(h=a.value.value=u.value)}),At(l,()=>{a.value&&(g=a.value.typedValue=l.value)}),At([r,o],()=>{const w=r.value,T=o.value;(!(T!=null&&T.mask)||w!==d)&&k(),w&&(a.value?a.value.updateOptions(T):v())}),{el:r,mask:fl(a),masked:u,unmasked:c,typed:l}}const $c={key:0,class:"k-input__prefix"},zc=["id","value","aria-labelledby","aria-describedby","type"],Hc={key:1,class:"k-input__suffix"},og=tt({__name:"Input",props:{invalid:{type:Boolean},id:{},modelValue:{},prefix:{},suffix:{},mask:{},align:{default:"left"},type:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;function i(u){e("update:modelValue",u.target.value)}const s=Os("k-input",{variants:{invalid:{true:"k-input--invalid"},align:{left:"k-input--align-left",right:"k-input--align-right"}}}),o=wr(qs,G(()=>({id:n.id,invalid:n.invalid}))),{el:r}=Vc(n.mask),a=G({get(){return n.modelValue?n.modelValue:""},set(u){var c;(n.type==="number"||((c=n.mask)==null?void 0:c.mask)===Number)&&(u=parseFloat(`${u}`)),e("update:modelValue",u)}});return(u,c)=>(_(),O("div",{class:Vt(ot(s)({invalid:ot(o).invalid,align:u.align}))},[u.$slots.prefix||u.prefix?(_(),O("span",$c,[$(u.$slots,"prefix",{},()=>[Gt(ut(u.prefix),1)])])):H("",!0),et("input",at({class:"k-input__input",id:ot(o).id,value:a.value,"aria-labelledby":ot(o).labelId,"aria-describedby":ot(o).helpId,onInput:i,ref_key:"el",ref:r,type:n.type},u.$attrs),null,16,zc),u.$slots.suffix||u.suffix?(_(),O("span",Hc,[$(u.$slots,"suffix",{},()=>[Gt(ut(u.suffix),1)])])):H("",!0)],2))}}),Gc=["src","alt"],qc=tt({__name:"Image",props:{src:{},preview:{},alt:{},caption:{},captionVisibility:{default:"hover"},captionTheme:{default:"dark"},size:{default:"cover"},position:{default:"center"},width:{},height:{},aspectRatio:{}},emits:["loaded","error"],setup(t,{emit:e}){const n=t,i=J(),s=J(!1),o=J(!1),r=J(),a=G(()=>({"--k-image-size":n.size,"--k-image-preview":n.preview||"","--k-image-position":n.position,"--k-image-width":n.width||"initial","--k-image-height":n.height||"initial","--k-image-aspectratio":(n.aspectRatio==="natural"?r.value:n.aspectRatio)||"initial"}));function u(){s.value=!0;const{naturalWidth:l=0,naturalHeight:d=0}=i.value||{};r.value=`${l}/${d}`,e("loaded")}function c(){s.value=!0,o.value=!0,e("error")}return ge(()=>{var l;return((l=i.value)==null?void 0:l.complete)&&u()}),(l,d)=>(_(),O("figure",{class:Vt(["k-image",[`k-image--size-${l.size}`,{"k-image--loaded":s.value,"k-image--loading":!s.value}]]),style:ve(a.value)},[s.value?H("",!0):(_(),nt(qr,{key:0,size:"small"})),kr(et("img",{src:l.src,alt:l.alt||l.caption,onLoad:u,onError:c,ref_key:"image",ref:i},null,40,Gc),[[Er,!o.value]]),l.$slots.caption||l.caption?(_(),O("figcaption",{key:1,class:Vt(`k-image__caption k-image__caption--visibility-${l.captionVisibility} k-image__caption--theme-${!s.value||o.value?"light":l.captionTheme}`)},[$(l.$slots,"caption",{},()=>[Gt(ut(l.caption),1)])],2)):H("",!0)],6))}}),Uc={key:1,class:"k-card__content"},Wc={key:0,class:"k-card__title"},Xc={key:2,class:"k-card__footer"},Yc=tt({inheritAttrs:!1,__name:"Card",props:{is:{default:"div"},title:{},variant:{default:"border"},thumbnail:{},thumbnailSize:{default:"cover"},headerMinHeight:{}},setup(t){return(e,n)=>(_(),nt(he(e.is),at({class:`k-card k-card--variant-${e.variant}`,style:`--k-header-min-height: ${e.headerMinHeight||""}`},e.$attrs),{default:lt(()=>[e.$slots.header||e.thumbnail?(_(),O("div",{key:0,class:Vt(["k-card__header",[{"k-card__header--has-thumbnail":!e.$slots.header&&e.thumbnail},`k-card__header--thumbnail-size-${e.thumbnailSize}`]])},[$(e.$slots,"header",{},()=>[e.thumbnail?(_(),nt(qc,{key:0,class:"k-card__thumbnail",src:e.thumbnail,size:e.thumbnailSize},null,8,["src","size"])):H("",!0)])],2)):H("",!0),e.$slots.default||e.title?(_(),O("div",Uc,[e.title?(_(),O("div",Wc,ut(e.title),1)):H("",!0),$(e.$slots,"default")])):H("",!0),e.$slots.footer?(_(),O("div",Xc,[$(e.$slots,"footer")])):H("",!0)]),_:3},16,["class","style"]))}}),rg=tt({__name:"Skeleton",props:{variant:{default:"shiny"},aspectRatio:{},width:{},height:{},rounding:{}},setup(t){const e=()=>t.rounding?t.rounding==="full"?"9999px":js(t.rounding,"rounding"):"initial",n=G(()=>({"--aspect-ratio":!t.aspectRatio||t.width&&t.height?"initial":t.aspectRatio,"--width":t.width||"initial","--height":t.height||"initial","--border-radius":e()}));return(i,s)=>(_(),O("span",{class:Vt(["k-skeleton",`k-skeleton--variant-${i.variant}`]),style:ve(n.value)},[$(i.$slots,"default")],6))}});var xs=(t,e,n,i)=>{const s=typeof t=="function"?t():t;return s?.addEventListener(e,n,i),()=>{s?.removeEventListener(e,n,i)}},Kc=t=>t.button===2||Zc()&&t.ctrlKey&&t.button===0,Zc=()=>/Mac|iPod|iPhone|iPad/.test(window.navigator.platform);function No(t,e,n){if(!t)return;const i=t.ownerDocument.defaultView||window,s=new i.CustomEvent(e,n);return t.dispatchEvent(s)}function jo(t){return Math.max(0,Math.min(1,t))}function ha(t,e){const{left:n,top:i,width:s,height:o}=e.getBoundingClientRect(),r={x:t.x-n,y:t.y-i},a={x:jo(r.x/s),y:jo(r.y/o)};function u(c={}){const{dir:l="ltr",orientation:d="horizontal",inverted:h}=c,p=typeof h=="object"?h.x:h,g=typeof h=="object"?h.y:h;return d==="horizontal"?l==="rtl"||p?1-a.x:a.x:g?1-a.y:a.y}return{offset:r,percent:a,getPercentValue:u}}function Jc(t,e,n){return Math.round((t-e)/n)*n+e}function Qc(t,e,n){return Math.min(Math.max(t,e),n)}function td(t,e,n){return(t-e)/(n-e)}function pa(t,e,n,i){const s=t*(n-e)+e,o=Jc(s,e,i);return Qc(o,e,n)}function ks(t,e){const n={min:t[0],max:t[1]},i={min:e[0],max:e[1]};return function(s){if(n.min===n.max||i.min===i.max)return i.min;const o=(i.max-i.min)/(n.max-n.min);return i.min+o*(s-n.min)}}var ed=ce("slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");ed.build();function nd(t){const{height:e=0}=t.thumbSize??{},n=ks([t.min,t.max],[-e/2,e/2]);return parseFloat(n(t.value).toFixed(2))}function id(t){const{width:e=0}=t.thumbSize??{};if(t.isRtl){const i=ks([t.max,t.min],[-e/2,e/2]);return-1*parseFloat(i(t.value).toFixed(2))}const n=ks([t.min,t.max],[-e/2,e/2]);return parseFloat(n(t.value).toFixed(2))}function sd(t,e){if(t.thumbAlignment==="center")return`${e}%`;const n=t.isVertical?nd(t):id(t);return`calc(${e}% - ${n}px)`}function Ws(t){let e=td(t.value,t.min,t.max)*100;return sd(t,e)}function fa(t){let e="visible";return t.thumbAlignment==="contain"&&!t.hasMeasuredThumbSize&&(e="hidden"),e}function od(t){const e=t.isVertical?"bottom":"insetInlineStart";return{visibility:fa(t),position:"absolute",transform:"var(--slider-thumb-transform)",[e]:"var(--slider-thumb-offset)"}}function rd(t){let e="0%",n=`${100-t.valuePercent}%`;if(t.origin==="center"){const i=t.valuePercent<50;e=i?`${t.valuePercent}%`:"50%",n=i?"50%":n}return{start:e,end:n}}function ad(t){return t.isVertical?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[t.isRtl?"right":"left"]:"var(--slider-range-start)",[t.isRtl?"left":"right"]:"var(--slider-range-end)"}}function ld(){return{touchAction:"none",userSelect:"none",position:"relative"}}function ud(t){const e=rd(t);return{"--slider-thumb-transform":t.isVertical?"translateY(50%)":t.isRtl?"translateX(50%)":"translateX(-50%)","--slider-thumb-offset":Ws(t),"--slider-range-start":e.start,"--slider-range-end":e.end}}function cd(t,e){return{visibility:fa(t),position:"absolute",pointerEvents:"none",[t.isHorizontal?"insetInlineStart":"bottom"]:Ws({...t,value:e}),translate:"var(--tx) var(--ty)","--tx":t.isHorizontal?t.isRtl?"50%":"-50%":"0%","--ty":t.isHorizontal?"0%":"50%"}}function dd(){return{userSelect:"none"}}function hd(){return{position:"relative"}}function pd(){return{userSelect:"none",pointerEvents:"none",position:"relative"}}var fd={getThumbOffset:Ws,getControlStyle:ld,getThumbStyle:od,getRangeStyle:ad,getRootStyle:ud,getMarkerStyle:cd,getLabelStyle:dd,getTrackStyle:hd,getMarkerGroupStyle:pd},ft=En({...fd,getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`slider:${t.id}`},getThumbId:t=>{var e;return((e=t.ids)==null?void 0:e.thumb)??`slider:${t.id}:thumb`},getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`slider:${t.id}:control`},getHiddenInputId:t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`slider:${t.id}:input`},getOutputId:t=>{var e;return((e=t.ids)==null?void 0:e.output)??`slider:${t.id}:output`},getTrackId:t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}track`},getRangeId:t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}:range`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`slider:${t.id}:label`},getMarkerId:(t,e)=>`slider:${t.id}:marker:${e}`,getRootEl:t=>ft.getById(t,ft.getRootId(t)),getThumbEl:t=>ft.getById(t,ft.getThumbId(t)),getControlEl:t=>ft.getById(t,ft.getControlId(t)),getHiddenInputEl:t=>ft.getById(t,ft.getHiddenInputId(t)),getValueFromPoint(t,e){const n=ft.getControlEl(t);if(!n)return;const i=ha(e,n).getPercentValue({orientation:t.orientation,dir:t.dir,inverted:{y:!0}});return pa(i,t.min,t.max,t.step)},dispatchChangeEvent(t){const e=ft.getHiddenInputEl(t);e&&sa(e,{value:t.value})}}),gd=ce("range-slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");gd.build();function vd(t){const e=t[0],n=t[t.length-1];return[e,n]}function md(t){const[e,n]=vd(t.valuePercent);return{start:`${e}%`,end:`${100-n}%`}}function bd(t){let e="visible";return t.thumbAlignment==="contain"&&!t.hasMeasuredThumbSize&&(e="hidden"),e}function yd(t,e){const n=t.isVertical?"bottom":"insetInlineStart";return{visibility:bd(t),position:"absolute",transform:"var(--slider-thumb-transform)",[n]:`var(--slider-thumb-offset-${e})`}}function xd(t){const e=md(t);return{...t.value.reduce((n,i,s)=>{const o=ft.getThumbOffset({...t,value:i});return{...n,[`--slider-thumb-offset-${s}`]:o}},{}),"--slider-thumb-transform":t.isVertical?"translateY(50%)":t.isRtl?"translateX(50%)":"translateX(-50%)","--slider-range-start":e.start,"--slider-range-end":e.end}}var kd={getRootStyle:xd,getControlStyle:ft.getControlStyle,getThumbStyle:yd,getRangeStyle:ft.getRangeStyle,getMarkerStyle:ft.getMarkerStyle,getMarkerGroupStyle:ft.getMarkerGroupStyle},mt=En({...kd,getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`slider:${t.id}`},getThumbId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.thumb)==null?void 0:i.call(n,e))??`slider:${t.id}:thumb:${e}`},getHiddenInputId:(t,e)=>`slider:${t.id}:input:${e}`,getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`slider:${t.id}:control`},getTrackId:t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}:track`},getRangeId:t=>{var e;return((e=t.ids)==null?void 0:e.range)??`slider:${t.id}:range`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`slider:${t.id}:label`},getOutputId:t=>{var e;return((e=t.ids)==null?void 0:e.output)??`slider:${t.id}:output`},getMarkerId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.marker)==null?void 0:i.call(n,e))??`slider:${t.id}:marker:${e}`},getRootEl:t=>mt.getById(t,mt.getRootId(t)),getThumbEl:(t,e)=>mt.getById(t,mt.getThumbId(t,e)),getHiddenInputEl:(t,e)=>mt.getById(t,mt.getHiddenInputId(t,e)),getControlEl:t=>mt.getById(t,mt.getControlId(t)),getElements:t=>Xr(mt.getControlEl(t),"[role=slider]"),getFirstEl:t=>mt.getElements(t)[0],getRangeEl:t=>mt.getById(t,mt.getRangeId(t)),getValueFromPoint(t,e){const n=mt.getControlEl(t);if(!n)return;const i=ha(e,n).getPercentValue({orientation:t.orientation,dir:t.dir,inverted:{y:!0}});return pa(i,t.min,t.max,t.step)},dispatchChangeEvent(t){Array.from(t.value).forEach((e,n)=>{const i=mt.getHiddenInputEl(t,n);i&&sa(i,{value:e})})}});const Es=Math.min,He=Math.max,li=Math.round,On=Math.floor,pe=t=>({x:t,y:t}),Ed={left:"right",right:"left",bottom:"top",top:"bottom"},wd={start:"end",end:"start"};function Xs(t,e){return typeof t=="function"?t(e):t}function We(t){return t.split("-")[0]}function Ii(t){return t.split("-")[1]}function Cd(t){return t==="x"?"y":"x"}function ga(t){return t==="y"?"height":"width"}function Ys(t){return["top","bottom"].includes(We(t))?"y":"x"}function va(t){return Cd(Ys(t))}function _d(t,e,n){n===void 0&&(n=!1);const i=Ii(t),s=va(t),o=ga(s);let r=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=ui(r)),[r,ui(r)]}function Sd(t){const e=ui(t);return[ws(t),e,ws(e)]}function ws(t){return t.replace(/start|end/g,e=>wd[e])}function Ad(t,e,n){const i=["left","right"],s=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?o:r;default:return[]}}function Td(t,e,n,i){const s=Ii(t);let o=Ad(We(t),n==="start",i);return s&&(o=o.map(r=>r+"-"+s),e&&(o=o.concat(o.map(ws)))),o}function ui(t){return t.replace(/left|right|bottom|top/g,e=>Ed[e])}function Id(t){return{top:0,right:0,bottom:0,left:0,...t}}function Dd(t){return typeof t!="number"?Id(t):{top:t,right:t,bottom:t,left:t}}function ci(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Vo(t,e,n){let{reference:i,floating:s}=t;const o=Ys(e),r=va(e),a=ga(r),u=We(e),c=o==="y",l=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,h=i[a]/2-s[a]/2;let p;switch(u){case"top":p={x:l,y:i.y-s.height};break;case"bottom":p={x:l,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-s.width,y:d};break;default:p={x:i.x,y:i.y}}switch(Ii(e)){case"start":p[r]-=h*(n&&c?-1:1);break;case"end":p[r]+=h*(n&&c?-1:1);break}return p}const Fd=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),u=await(r.isRTL==null?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:l,y:d}=Vo(c,i,u),h=i,p={},g=0;for(let f=0;f<a.length;f++){const{name:y,fn:v}=a[f],{x:k,y:w,data:T,reset:M}=await v({x:l,y:d,initialPlacement:i,placement:h,strategy:s,middlewareData:p,rects:c,platform:r,elements:{reference:t,floating:e}});l=k??l,d=w??d,p={...p,[y]:{...p[y],...T}},M&&g<=50&&(g++,typeof M=="object"&&(M.placement&&(h=M.placement),M.rects&&(c=M.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:s}):M.rects),{x:l,y:d}=Vo(c,h,u)),f=-1)}return{x:l,y:d,placement:h,strategy:s,middlewareData:p}};async function Od(t,e){var n;e===void 0&&(e={});const{x:i,y:s,platform:o,rects:r,elements:a,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Xs(e,t),g=Dd(p),f=a[h?d==="floating"?"reference":"floating":d],y=ci(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(f)))==null||n?f:f.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v=d==="floating"?{...r.floating,x:i,y:s}:r.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),w=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},T=ci(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:k,strategy:u}):v);return{top:(y.top-T.top+g.top)/w.y,bottom:(T.bottom-y.bottom+g.bottom)/w.y,left:(y.left-T.left+g.left)/w.x,right:(T.right-y.right+g.right)/w.x}}const Md=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:u,elements:c}=e,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:f=!0,...y}=Xs(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=We(s),k=We(a)===a,w=await(u.isRTL==null?void 0:u.isRTL(c.floating)),T=h||(k||!f?[ui(a)]:Sd(a));!h&&g!=="none"&&T.push(...Td(a,f,g,w));const M=[a,...T],D=await Od(e,y),W=[];let x=((i=o.flip)==null?void 0:i.overflows)||[];if(l&&W.push(D[v]),d){const F=_d(s,r,w);W.push(D[F[0]],D[F[1]])}if(x=[...x,{placement:s,overflows:W}],!W.every(F=>F<=0)){var b,m;const F=(((b=o.flip)==null?void 0:b.index)||0)+1,z=M[F];if(z)return{data:{index:F,overflows:x},reset:{placement:z}};let N=(m=x.filter(B=>B.overflows[0]<=0).sort((B,P)=>B.overflows[1]-P.overflows[1])[0])==null?void 0:m.placement;if(!N)switch(p){case"bestFit":{var E;const B=(E=x.map(P=>[P.placement,P.overflows.filter(X=>X>0).reduce((X,$t)=>X+$t,0)]).sort((P,X)=>P[1]-X[1])[0])==null?void 0:E[0];B&&(N=B);break}case"initialPlacement":N=a;break}if(s!==N)return{reset:{placement:N}}}return{}}}};async function Rd(t,e){const{placement:n,platform:i,elements:s}=t,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),r=We(n),a=Ii(n),u=Ys(n)==="y",c=["left","top"].includes(r)?-1:1,l=o&&u?-1:1,d=Xs(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),u?{x:p*l,y:h*c}:{x:h*c,y:p*l}}const Pd=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:s,y:o,placement:r,middlewareData:a}=e,u=await Rd(e,t);return r===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:s+u.x,y:o+u.y,data:{...u,placement:r}}}}};function fe(t){return ma(t)?(t.nodeName||"").toLowerCase():"#document"}function Dt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ee(t){var e;return(e=(ma(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ma(t){return t instanceof Node||t instanceof Dt(t).Node}function Qt(t){return t instanceof Element||t instanceof Dt(t).Element}function Ut(t){return t instanceof HTMLElement||t instanceof Dt(t).HTMLElement}function $o(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Dt(t).ShadowRoot}function Cn(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=Pt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function Ld(t){return["table","td","th"].includes(fe(t))}function Ks(t){const e=Zs(),n=Pt(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function ba(t){let e=Xe(t);for(;Ut(e)&&!Di(e);){if(Ks(e))return e;e=Xe(e)}return null}function Zs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Di(t){return["html","body","#document"].includes(fe(t))}function Pt(t){return Dt(t).getComputedStyle(t)}function Fi(t){return Qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Xe(t){if(fe(t)==="html")return t;const e=t.assignedSlot||t.parentNode||$o(t)&&t.host||ee(t);return $o(e)?e.host:e}function ya(t){const e=Xe(t);return Di(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ut(e)&&Cn(e)?e:ya(e)}function kn(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=ya(t),o=s===((i=t.ownerDocument)==null?void 0:i.body),r=Dt(s);return o?e.concat(r,r.visualViewport||[],Cn(s)?s:[],r.frameElement&&n?kn(r.frameElement):[]):e.concat(s,kn(s,[],n))}function xa(t){const e=Pt(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=Ut(t),o=s?t.offsetWidth:n,r=s?t.offsetHeight:i,a=li(n)!==o||li(i)!==r;return a&&(n=o,i=r),{width:n,height:i,$:a}}function Js(t){return Qt(t)?t:t.contextElement}function Ge(t){const e=Js(t);if(!Ut(e))return pe(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:o}=xa(e);let r=(o?li(n.width):n.width)/i,a=(o?li(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Bd=pe(0);function ka(t){const e=Dt(t);return!Zs()||!e.visualViewport?Bd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Nd(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Dt(t)?!1:e}function Oe(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=Js(t);let r=pe(1);e&&(i?Qt(i)&&(r=Ge(i)):r=Ge(t));const a=Nd(o,n,i)?ka(o):pe(0);let u=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,l=s.width/r.x,d=s.height/r.y;if(o){const h=Dt(o),p=i&&Qt(i)?Dt(i):i;let g=h.frameElement;for(;g&&i&&p!==h;){const f=Ge(g),y=g.getBoundingClientRect(),v=Pt(g),k=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*f.x,w=y.top+(g.clientTop+parseFloat(v.paddingTop))*f.y;u*=f.x,c*=f.y,l*=f.x,d*=f.y,u+=k,c+=w,g=Dt(g).frameElement}}return ci({width:l,height:d,x:u,y:c})}const jd=[":popover-open",":modal"];function Ea(t){let e=!1,n=0,i=0;function s(o){try{e=e||t.matches(o)}catch{}}if(jd.forEach(o=>{s(o)}),e){const o=ba(t);if(o){const r=o.getBoundingClientRect();n=r.x,i=r.y}}return[e,n,i]}function Vd(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const o=ee(i),[r]=e?Ea(e.floating):[!1];if(i===o||r)return n;let a={scrollLeft:0,scrollTop:0},u=pe(1);const c=pe(0),l=Ut(i);if((l||!l&&s!=="fixed")&&((fe(i)!=="body"||Cn(o))&&(a=Fi(i)),Ut(i))){const d=Oe(i);u=Ge(i),c.x=d.x+i.clientLeft,c.y=d.y+i.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x,y:n.y*u.y-a.scrollTop*u.y+c.y}}function $d(t){return Array.from(t.getClientRects())}function wa(t){return Oe(ee(t)).left+Fi(t).scrollLeft}function zd(t){const e=ee(t),n=Fi(t),i=t.ownerDocument.body,s=He(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=He(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+wa(t);const a=-n.scrollTop;return Pt(i).direction==="rtl"&&(r+=He(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:r,y:a}}function Hd(t,e){const n=Dt(t),i=ee(t),s=n.visualViewport;let o=i.clientWidth,r=i.clientHeight,a=0,u=0;if(s){o=s.width,r=s.height;const c=Zs();(!c||c&&e==="fixed")&&(a=s.offsetLeft,u=s.offsetTop)}return{width:o,height:r,x:a,y:u}}function Gd(t,e){const n=Oe(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,o=Ut(t)?Ge(t):pe(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,u=s*o.x,c=i*o.y;return{width:r,height:a,x:u,y:c}}function zo(t,e,n){let i;if(e==="viewport")i=Hd(t,n);else if(e==="document")i=zd(ee(t));else if(Qt(e))i=Gd(e,n);else{const s=ka(t);i={...e,x:e.x-s.x,y:e.y-s.y}}return ci(i)}function Ca(t,e){const n=Xe(t);return n===e||!Qt(n)||Di(n)?!1:Pt(n).position==="fixed"||Ca(n,e)}function qd(t,e){const n=e.get(t);if(n)return n;let i=kn(t,[],!1).filter(a=>Qt(a)&&fe(a)!=="body"),s=null;const o=Pt(t).position==="fixed";let r=o?Xe(t):t;for(;Qt(r)&&!Di(r);){const a=Pt(r),u=Ks(r);!u&&a.position==="fixed"&&(s=null),(o?!u&&!s:!u&&a.position==="static"&&s&&["absolute","fixed"].includes(s.position)||Cn(r)&&!u&&Ca(t,r))?i=i.filter(c=>c!==r):s=a,r=Xe(r)}return e.set(t,i),i}function Ud(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[...n==="clippingAncestors"?qd(e,this._c):[].concat(n),i],r=o[0],a=o.reduce((u,c)=>{const l=zo(e,c,s);return u.top=He(l.top,u.top),u.right=Es(l.right,u.right),u.bottom=Es(l.bottom,u.bottom),u.left=He(l.left,u.left),u},zo(e,r,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Wd(t){const{width:e,height:n}=xa(t);return{width:e,height:n}}function Xd(t,e,n,i){const s=Ut(e),o=ee(e),r=n==="fixed",a=Oe(t,!0,r,e);let u={scrollLeft:0,scrollTop:0};const c=pe(0);if(s||!s&&!r)if((fe(e)!=="body"||Cn(o))&&(u=Fi(e)),s){const f=Oe(e,!0,r,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else o&&(c.x=wa(o));let l=a.left+u.scrollLeft-c.x,d=a.top+u.scrollTop-c.y;const[h,p,g]=Ea(i);return h&&(l+=p,d+=g,s&&(l+=e.clientLeft,d+=e.clientTop)),{x:l,y:d,width:a.width,height:a.height}}function Ho(t,e){return!Ut(t)||Pt(t).position==="fixed"?null:e?e(t):t.offsetParent}function _a(t,e){const n=Dt(t);if(!Ut(t))return n;let i=Ho(t,e);for(;i&&Ld(i)&&Pt(i).position==="static";)i=Ho(i,e);return i&&(fe(i)==="html"||fe(i)==="body"&&Pt(i).position==="static"&&!Ks(i))?n:i||ba(t)||n}const Yd=async function(t){const e=this.getOffsetParent||_a,n=this.getDimensions;return{reference:Xd(t.reference,await e(t.floating),t.strategy,t.floating),floating:{x:0,y:0,...await n(t.floating)}}};function Kd(t){return Pt(t).direction==="rtl"}const Cs={convertOffsetParentRelativeRectToViewportRelativeRect:Vd,getDocumentElement:ee,getClippingRect:Ud,getOffsetParent:_a,getElementRects:Yd,getClientRects:$d,getDimensions:Wd,getScale:Ge,isElement:Qt,isRTL:Kd};function Zd(t,e){let n=null,i;const s=ee(t);function o(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function r(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();const{left:c,top:l,width:d,height:h}=t.getBoundingClientRect();if(a||e(),!d||!h)return;const p=On(l),g=On(s.clientWidth-(c+d)),f=On(s.clientHeight-(l+h)),y=On(c),v={rootMargin:-p+"px "+-g+"px "+-f+"px "+-y+"px",threshold:He(0,Es(1,u))||1};let k=!0;function w(T){const M=T[0].intersectionRatio;if(M!==u){if(!k)return r();M?r(!1,M):i=setTimeout(()=>{r(!1,1e-7)},100)}k=!1}try{n=new IntersectionObserver(w,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(w,v)}n.observe(t)}return r(!0),o}function Jd(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,c=Js(t),l=s||o?[...c?kn(c):[],...kn(e)]:[];l.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=c&&a?Zd(c,n):null;let h=-1,p=null;r&&(p=new ResizeObserver(v=>{let[k]=v;k&&k.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),n()}),c&&!u&&p.observe(c),p.observe(e));let g,f=u?Oe(t):null;u&&y();function y(){const v=Oe(t);f&&(v.x!==f.x||v.y!==f.y||v.width!==f.width||v.height!==f.height)&&n(),f=v,g=requestAnimationFrame(y)}return n(),()=>{var v;l.forEach(k=>{s&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),d?.(),(v=p)==null||v.disconnect(),p=null,u&&cancelAnimationFrame(g)}}const Qd=Md,th=(t,e,n)=>{const i=new Map,s={platform:Cs,...n},o={...s.platform,_c:i};return Fd(t,e,{...s,platform:o})};function eh(t,e){let n,i,s;const o=J(!0),r=()=>{o.value=!0,s()};At(t,r,{flush:"sync"});const a=typeof e=="function"?e:e.get,u=typeof e=="function"?void 0:e.set,c=gl((l,d)=>(i=l,s=d,{get(){return o.value&&(n=a(),o.value=!1),i(),n},set(h){u?.(h)}}));return Object.isExtensible(c)&&(c.trigger=r),c}function Sa(t){return yl()?(xl(t),!0):!1}function Aa(t){return typeof t=="function"?t():ot(t)}const nh=typeof window<"u"&&typeof document<"u",ih=Object.prototype.toString,sh=t=>ih.call(t)==="[object Object]",oh=()=>{};function Ta(t){var e;const n=Aa(t);return(e=n?.$el)!=null?e:n}const Ia=nh?window:void 0;function rh(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=Ia):[e,n,i,s]=t,!e)return oh;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(l=>l()),o.length=0},a=(l,d,h,p)=>(l.addEventListener(d,h,p),()=>l.removeEventListener(d,h,p)),u=At(()=>[Ta(e),Aa(s)],([l,d])=>{if(r(),!l)return;const h=sh(d)?{...d}:d;o.push(...n.flatMap(p=>i.map(g=>a(l,p,g,h))))},{immediate:!0,flush:"post"}),c=()=>{u(),r()};return Sa(c),c}function ah(){const t=J(!1);return Cr()&&ge(()=>{t.value=!0}),t}function lh(t){const e=ah();return G(()=>(e.value,!!t()))}function uh(t,e,n={}){const{window:i=Ia,...s}=n;let o;const r=lh(()=>i&&"MutationObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},u=At(()=>Ta(t),l=>{a(),r.value&&i&&l&&(o=new MutationObserver(e),o.observe(l,s))},{immediate:!0}),c=()=>{a(),u()};return Sa(c),{isSupported:r,stop:c}}function Da(){const t=Cr(),e=eh(()=>null,()=>t.proxy.$el);return cl(e.trigger),ge(e.trigger),e}function ch(t){return dh(t)}function qi(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function dh(t){for(let e=t;e;e=qi(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=qi(t);e;e=qi(e)){if(!(e instanceof Element))continue;const n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||n.filter!=="none"||e.tagName==="BODY"))return e}return null}const hh=tt({inheritAttrs:!1,__name:"Dropdown",props:{items:{},placement:{default:"bottom-start"},teleport:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},theme:{default:"border"},teleportTo:{default:"body"},offset:{default:8},variant:{},size:{},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{},stateTimeout:{},confirmLabel:{},label:{},icon:{},iconLeft:{},iconRight:{default:"fa-pro-regular:angle-down"}},setup(t){const e=t,n=G(()=>{const{items:v,placement:k,teleport:w,keepOpen:T,...M}=e;return M}),i=J(!1),s=Da(),o=J(),r=J(),a=J({top:"",left:"",position:""});let u=()=>{};function c(){!o.value||!r.value||(u=Jd(o.value.$el,r.value,()=>{!o.value||!r.value||th(o.value.$el,r.value,{placement:e.placement,middleware:[Pd(e.offset),Qd()],platform:{...Cs,getOffsetParent:v=>Cs.getOffsetParent(v,ch)}}).then(({x:v,y:k})=>{a.value={top:`${k}px`,left:`${v}px`,position:"absolute"}})}))}Ei(u),_r(()=>{if(i.value)return c();u()});const l=({target:v},k="dom")=>{if(v instanceof Element&&!(!o.value||!r.value)){if(k==="dom")return[o.value.$el,r.value].some(w=>w&&(v===w||w.contains(v)))?void 0:h(!1);if(k==="shadow-dom"){const w=s.value.getRootNode();return v.shadowRoot===w?void 0:h(!1)}}},d=({key:v})=>v==="Escape"&&h(!1),h=(v=!i.value)=>(v?f():y(),i.value=v,!0),p=G(()=>s.value.getRootNode()),g=G(()=>p.value instanceof ShadowRoot);function f(){window.addEventListener("keydown",d),g.value?(p.value.addEventListener("click",v=>l(v)),window.addEventListener("click",v=>l(v,"shadow-dom"))):window.addEventListener("click",l)}function y(){window.removeEventListener("keydown",d),g.value?(p.value.removeEventListener("click",v=>l(v)),window.removeEventListener("click",v=>l(v,"shadow-dom"))):window.removeEventListener("click",l)}return(v,k)=>(_(),O(ue,null,[Et(Jt,at({...n.value,...v.$attrs},{onClick:k[0]||(k[0]=()=>h()),ref_key:"trigger",ref:o}),yr({_:2},[v.$slots["icon-left"]?{name:"icon-left",fn:lt(()=>[$(v.$slots,"icon-left")]),key:"0"}:void 0,v.$slots.trigger?{name:"default",fn:lt(()=>[$(v.$slots,"trigger")]),key:"1"}:void 0,v.$slots["icon-right"]?{name:"icon-right",fn:lt(()=>[$(v.$slots,"icon-right")]),key:"2"}:void 0]),1040),(_(),nt(xr,{to:v.teleportTo,disabled:!v.teleport},[Et(Sr,{name:"k-dropdown"},{default:lt(()=>[i.value?(_(),O("div",{key:0,class:Vt(`k-dropdown k-dropdown--theme-${v.theme}`),style:ve(a.value),ref_key:"content",ref:r,onClick:k[1]||(k[1]=()=>!v.keepOpen&&h(!1))},[$(v.$slots,"default",{close:h.bind(null,!1)},()=>[(_(!0),O(ue,null,rn(v.items,({action:w,icon:T,...M})=>(_(),nt(Jt,at(M,{variant:"tertiary","icon-right":M.iconRight||T,onClick:()=>w()}),null,16,["icon-right","onClick"]))),256))])],6)):H("",!0)]),_:3})],8,["to","disabled"]))],64))}}),ph={key:0,class:"k-datatable__row"},fh={key:0,class:"k-datatable__cell k-datatable__cell-select"},gh=["onClick"],vh=["innerHTML"],mh={key:1,class:"k-datatable__cell k-datatable__cell-actions"},bh={key:0,class:"k-datatable__cell k-datatable__cell-select"},yh={key:1,class:"k-datatable__cell k-datatable__cell-actions"},xh={key:0,class:"k-datatable__footer"},ag=tt({__name:"DataTable",props:{items:{},selected:{},theme:{default:"default"},header:{type:Boolean,default:!0},sticky:{type:[Boolean,String]},sortBy:{},sortableBy:{default:()=>[]},isDisabled:{type:Function,default:()=>!1},columns:{},labels:{default:()=>({selection:"Valgt",resetSelection:"Tilbakestill valg"})},cellWrapper:{type:Function,default:()=>({component:"div"})},rowWrapper:{type:Function,default:()=>({component:"div"})}},emits:["update:selected","update:sortBy"],setup(t,{emit:e}){const n=t,i=vl(),s=J([-1]),o=G(()=>n.items.filter(p=>!n.isDisabled(p))),r=G(()=>!!n.selected),a=G(()=>!!(Object.keys(n.sortBy||{}).length&&n.sortableBy.length)),u=G(()=>!!i.rowActions),c=G({get:()=>!!(o.value.length&&o.value.every(p=>n.selected&&n.selected.includes(p))),set:p=>e("update:selected",p?[...o.value]:[])}),l=G(()=>[r.value?"2.5rem":!1,...n.columns.filter(({disabled:p})=>!p).map(p=>p.size||"auto"),u.value?"0px":!1].filter(Boolean).join(" "));function d(p){var g;if(!a.value||!n.sortableBy.includes(p))return;let f=((g=n.sortBy)==null?void 0:g[p])||-1;e("update:sortBy",{[p]:f*-1})}function h(p,g){if(!(p.target instanceof HTMLInputElement))return;let f=s.value.slice(-1).pop()||-1,y=[];if(p.shiftKey){let v=f>g,k=f+(v?-1:1);for(;v?k>g:k<g;){let w=n.items[k];!(n.selected||[]).includes(w)&&!n.isDisabled(w)&&y.push(w),v?k--:k++}}p.target.checked?s.value.push(g):f===g&&s.value.pop(),e("update:selected",[...n.selected||[],...y])}return(p,g)=>(_(),O("div",{class:Vt([`k-datatable k-datatable--${p.theme}`,{"k-datatable--sticky":!!p.sticky,"k-datatable--no-header":!p.header}]),style:ve(`--k-datatable-layout: ${l.value}; --k-datatable-sticky-top: ${typeof p.sticky=="string"?p.sticky:"0"}`)},[p.header?(_(),O("div",ph,[r.value?(_(),O("div",fh,[Et(Lo,{class:"k-datatable__checkbox",modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=f=>c.value=f),disabled:!p.items.length},null,8,["modelValue","disabled"])])):H("",!0),(_(!0),O(ue,null,rn(p.columns.filter(({disabled:f})=>!f),f=>(_(),O("div",{class:Vt(["k-datatable__cell",`k-datatable__cell--text-align-${f.align||"start"}`,{"k-datatable__cell-sort":a.value&&p.sortableBy.includes(f.id),"k-datatable__cell-sort--active":f.id in(p.sortBy||{})}]),key:f.id,onClick:y=>d(f.id)},[$(p.$slots,`${f.id}-label`,{item:f},()=>[et("span",{innerHTML:f.label},null,8,vh)]),Et(ot(Ae),{class:"k-datatable__cell-sort-icon",icon:(p.sortBy||{})[f.id]<0?"fa-pro-solid:caret-up":"fa-pro-solid:caret-down"},null,8,["icon"])],10,gh))),128)),u.value?(_(),O("div",mh)):H("",!0)])):H("",!0),(_(!0),O(ue,null,rn(p.items,(f,y)=>(_(),O("div",{class:"k-datatable__row",key:y},[r.value?(_(),O("div",bh,[Et(Lo,{class:"k-datatable__checkbox","model-value":p.selected||[],"onUpdate:modelValue":g[1]||(g[1]=v=>e("update:selected",v)),value:f,onClick:v=>h(v,y),onMousedown:g[2]||(g[2]=ml(()=>{},["prevent"])),disabled:p.isDisabled(f)},null,8,["model-value","value","onClick","disabled"])])):H("",!0),(_(),nt(he(p.rowWrapper(f).component),at({class:"k-datatable__row-wrapper"},p.rowWrapper(f).bind),{default:lt(()=>[(_(!0),O(ue,null,rn(p.columns.filter(({disabled:v})=>!v),(v,k)=>(_(),nt(he(p.cellWrapper(f,v).component),at(p.cellWrapper(f,v).bind,{class:`k-datatable__cell k-datatable__cell--text-align-${v.align||"start"}`,key:`col-${v.id}`,"data-cell-id":v.id}),{default:lt(()=>[$(p.$slots,v.id,{item:f,column:v,rowIndex:y,colIndex:k})]),_:2},1040,["class","data-cell-id"]))),128))]),_:2},1040)),p.$slots["row-actions"]?(_(),O("div",yh,[$(p.$slots,"row-actions",{item:f})])):H("",!0)]))),128)),Et(Sr,{name:"k-datatable-footer"},{default:lt(()=>{var f,y;return[p.$slots.footer||(f=p.selected)!=null&&f.length?(_(),O("div",xh,[(y=p.selected)!=null&&y.length?(_(),nt(hh,{key:0,label:`${p.labels.selection} (${p.selected.length})`,teleport:""},{default:lt(()=>[$(p.$slots,"select-actions"),Et(Jt,{label:p.labels.resetSelection,"icon-right":"fa-pro-light:times-square",variant:"tertiary",onClick:g[3]||(g[3]=v=>e("update:selected",[]))},null,8,["label"])]),_:3},8,["label"])):H("",!0),$(p.$slots,"footer")])):H("",!0)]}),_:3})],6))}});var _s,xe=new Map,kh=t=>t.getBoundingClientRect();function Eh(t,e){const{scope:n="rect",getRect:i=kh,onChange:s}=e,o=wh({scope:n,getRect:i}),r=xe.get(t);return r?(r.callbacks.push(s),s(i(t))):(xe.set(t,{rect:{},callbacks:[s]}),xe.size===1&&(_s=requestAnimationFrame(o))),function(){const a=xe.get(t);if(!a)return;const u=a.callbacks.indexOf(s);u>-1&&a.callbacks.splice(u,1),a.callbacks.length===0&&(xe.delete(t),xe.size===0&&cancelAnimationFrame(_s))}}function wh(t){const{scope:e,getRect:n}=t,i=_h(e);return function s(){const o=[];xe.forEach((r,a)=>{const u=n(a);i(r.rect,u)||(r.rect=u,o.push(r))}),o.forEach(r=>{r.callbacks.forEach(a=>a(r.rect))}),_s=requestAnimationFrame(s)}}var Fa=(t,e)=>t.width===e.width&&t.height===e.height,Oa=(t,e)=>t.top===e.top&&t.left===e.left,Ch=(t,e)=>Fa(t,e)&&Oa(t,e);function _h(t){return t==="size"?Fa:t==="position"?Oa:Ch}var Sh=ce("radio-group").parts("root","label","radio","radioLabel","radioControl","indicator"),Le=Sh.build(),q=En({getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`radio-group:${t.id}`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`radio-group:${t.id}:label`},getRadioId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radio)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:${e}`},getRadioHiddenInputId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radioHiddenInput)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:input:${e}`},getRadioControlId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radioControl)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:control:${e}`},getRadioLabelId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radioLabel)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:label:${e}`},getIndicatorId:t=>{var e;return((e=t.ids)==null?void 0:e.indicator)??`radio-group:${t.id}:indicator`},getRootEl:t=>q.getById(t,q.getRootId(t)),getRadioHiddenInputEl:(t,e)=>q.getById(t,q.getRadioHiddenInputId(t,e)),getIndicatorEl:t=>q.getById(t,q.getIndicatorId(t)),getFirstEnabledInputEl:t=>{var e;return(e=q.getRootEl(t))==null?void 0:e.querySelector("input:not(:disabled)")},getFirstEnabledAndCheckedInputEl:t=>{var e;return(e=q.getRootEl(t))==null?void 0:e.querySelector("input:not(:disabled):checked")},getInputEls:t=>{const e=`input[type=radio][data-ownedby='${CSS.escape(q.getRootId(t))}']:not([disabled])`;return Xr(q.getRootEl(t),e)},getActiveRadioEl:t=>{if(t.value)return q.getById(t,q.getRadioId(t,t.value))},getOffsetRect:t=>({left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.offsetWidth??0,height:t?.offsetHeight??0}),getRectById:(t,e)=>{const n=q.getById(t,q.getRadioId(t,e));if(n)return q.resolveRect(q.getOffsetRect(n))},resolveRect:t=>({width:`${t.width}px`,height:`${t.height}px`,left:`${t.left}px`,top:`${t.top}px`})});function Ah(t,e,n){const i=t.context.isDisabled;function s(a){const u={isInvalid:a.invalid,isDisabled:a.disabled||i,isChecked:t.context.value===a.value,isFocused:t.context.focusedId===a.value,isHovered:t.context.hoveredId===a.value,isActive:t.context.activeId===a.value};return{...u,isInteractive:!u.isDisabled}}function o(a){const u=s(a);return{"data-focus":gt(u.isFocused),"data-disabled":gt(u.isDisabled),"data-state":u.isChecked?"checked":"unchecked","data-hover":gt(u.isHovered),"data-invalid":gt(u.isInvalid),"data-orientation":t.context.orientation}}const r=()=>{const a=q.getFirstEnabledAndCheckedInputEl(t.context);if(a){a.focus();return}const u=q.getFirstEnabledInputEl(t.context);u?.focus()};return{value:t.context.value,setValue(a){e({type:"SET_VALUE",value:a,isTrusted:!1})},clearValue(){e({type:"SET_VALUE",value:null,isTrusted:!1})},focus:r,blur(){const a=q.getActiveElement(t.context);q.getInputEls(t.context).some(u=>u===a)&&a?.blur()},getRadioState:s,rootProps:n.element({...Le.root.attrs,role:"radiogroup",id:q.getRootId(t.context),"aria-labelledby":q.getLabelId(t.context),"data-orientation":t.context.orientation,"data-disabled":gt(i),"aria-orientation":t.context.orientation,dir:t.context.dir}),labelProps:n.element({...Le.label.attrs,"data-orientation":t.context.orientation,"data-disabled":gt(i),id:q.getLabelId(t.context),onClick:r}),getRadioProps(a){const u=s(a);return n.label({...Le.radio.attrs,id:q.getRadioId(t.context,a.value),htmlFor:q.getRadioHiddenInputId(t.context,a.value),...o(a),onPointerMove(){u.isInteractive&&e({type:"SET_HOVERED",value:a.value,hovered:!0})},onPointerLeave(){u.isInteractive&&e({type:"SET_HOVERED",value:null})},onPointerDown(c){u.isInteractive&&(u.isFocused&&c.pointerType==="mouse"&&c.preventDefault(),e({type:"SET_ACTIVE",value:a.value,active:!0}))},onPointerUp(){u.isInteractive&&e({type:"SET_ACTIVE",value:null})}})},getRadioLabelProps(a){return n.element({...Le.radioLabel.attrs,id:q.getRadioLabelId(t.context,a.value),...o(a)})},getRadioControlProps(a){const u=s(a);return n.element({...Le.radioControl.attrs,id:q.getRadioControlId(t.context,a.value),"data-active":gt(u.isActive),"aria-hidden":!0,...o(a)})},getRadioHiddenInputProps(a){const u=s(a),c=a.required,l=u.isDisabled&&!a.focusable;return n.input({"data-ownedby":q.getRootId(t.context),id:q.getRadioHiddenInputId(t.context,a.value),type:"radio",name:t.context.name||t.context.id,form:t.context.form,value:a.value,onChange(d){u.isDisabled||d.target.checked&&e({type:"SET_VALUE",value:a.value,isTrusted:!0})},onBlur(){e({type:"SET_FOCUSED",value:null})},onFocus(){e({type:"SET_FOCUSED",value:a.value,focused:!0})},onKeyDown(d){d.key===" "&&e({type:"SET_ACTIVE",value:a.value,active:!0})},onKeyUp(d){d.key===" "&&e({type:"SET_ACTIVE",value:null})},disabled:l,required:c,defaultChecked:u.isChecked,"data-disabled":gt(u.isDisabled),"aria-required":Dn(c),"aria-invalid":Dn(u.isInvalid),"aria-disabled":Dn(l),"aria-checked":Dn(u.isChecked),style:Kr})},indicatorProps:n.element({id:q.getIndicatorId(t.context),...Le.indicator.attrs,"data-disabled":gt(i),"data-orientation":t.context.orientation,style:{"--transition-duration":"150ms","--transition-property":"left, top, width, height",position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:t.context.canIndicatorTransition?"var(--transition-duration)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",...t.context.indicatorRect}})}}var{not:Th}=ta;function Ih(t){const e=Si(t);return Hs({id:"radio",initial:"idle",context:{value:null,activeId:null,focusedId:null,hoveredId:null,disabled:!1,...e,indicatorRect:{},canIndicatorTransition:!1,fieldsetDisabled:!1},computed:{isDisabled:n=>!!n.disabled||n.fieldsetDisabled},entry:["syncIndicatorRect"],exit:["cleanupObserver"],activities:["trackFormControlState"],watch:{value:["setIndicatorTransition","syncIndicatorRect","syncInputElements"]},on:{SET_VALUE:[{guard:Th("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:"setHovered"},SET_ACTIVE:{actions:"setActive"},SET_FOCUSED:{actions:"setFocused"}},states:{idle:{}}},{guards:{isTrusted:(n,i)=>!!i.isTrusted},activities:{trackFormControlState(n,i,{send:s,initialContext:o}){return ra(q.getRootEl(n),{onFieldsetDisabledChange(r){n.fieldsetDisabled=r},onFormReset(){s({type:"SET_VALUE",value:o.value})}})}},actions:{setValue(n,i){Fh.value(n,i.value)},setHovered(n,i){n.hoveredId=i.value},setActive(n,i){n.activeId=i.value},setFocused(n,i){n.focusedId=i.value},syncInputElements(n){q.getInputEls(n).forEach(i=>{i.checked=i.value===n.value})},setIndicatorTransition(n){n.canIndicatorTransition=fc(n.value)},cleanupObserver(n){var i;(i=n.indicatorCleanup)==null||i.call(n)},syncIndicatorRect(n){var i;if((i=n.indicatorCleanup)==null||i.call(n),!q.getIndicatorEl(n))return;if(n.value==null){n.indicatorRect={};return}const s=q.getActiveRadioEl(n);s&&(n.indicatorCleanup=Eh(s,{getRect(o){return q.getOffsetRect(o)},onChange(o){n.indicatorRect=q.resolveRect(o),Yr(()=>{n.canIndicatorTransition=!1})}}))},dispatchChangeEvent(n){q.getInputEls(n).forEach(i=>{const s=i.value===n.value;s!==i.checked&&oa(i,{checked:s})})}}})}var Dh={change:t=>{var e;t.value!=null&&((e=t.onChange)==null||e.call(t,{value:t.value}))}},Fh={value:(t,e)=>{t.value=e,Dh.change(t)}};const Oh=["aria-describedby"],lg=tt({__name:"RadioGroup",props:{label:{},modelValue:{},items:{},variant:{default:"radio"},direction:{default:"vertical"},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=wr(qs,G(()=>({label:""}))),s={id:De(),name:De(),...n,value:n.modelValue,onChange:({value:u})=>e("update:modelValue",u)},[o,r]=Ti(Ih(s),{context:G(()=>n)}),a=G(()=>Ah(o.value,r,Ai));return At(()=>n.modelValue,u=>a.value.setValue(u)),(u,c)=>(_(),O("div",at({class:["k-radiogroup",`k-radiogroup--variant-${u.variant} k-radiogroup--direction-${u.direction}`]},a.value.rootProps,{"aria-describedby":ot(i).helpId}),[u.variant==="radio"&&(ot(i).label||u.label)?(_(),O("span",kt(at({key:0},a.value.labelProps)),ut(ot(i).label||u.label),17)):H("",!0),u.variant==="segment"?(_(),O("div",kt(at({key:1},a.value.indicatorProps)),null,16)):H("",!0),(_(!0),O(ue,null,rn(u.items,l=>(_(),O("label",kt(Rt(a.value.getRadioProps({value:l.id}))),[et("span",kt(Rt(a.value.getRadioLabelProps({value:l.id}))),ut(l.label),17),et("input",kt(Rt(a.value.getRadioHiddenInputProps({value:l.id}))),null,16),et("div",kt(Rt(a.value.getRadioControlProps({value:l.id}))),null,16)],16))),256))],16,Oh))}}),ug=tt({__name:"Grid",props:{is:{type:[Object,Function],default:"div"},columns:{default:1},align:{},rows:{},gap:{default:"default"},areas:{}},setup(t){const e=t,n=(o,r)=>o?typeof o=="number"||typeof o=="string"&&o.match(/^\d+$/)?`repeat(${o}, 1fr)`:o.match(/^(\d+\s?)+$/)?o.split(" ").map(a=>`${a}fr`).join(" "):o:r,i=o=>{if(o)return Array.isArray(o)?o.map(r=>`"${r}"`).join(`
|
|
2
|
-
`):
|
|
3
|
-
`)},s=G(()=>Gr("grid",{columns:n(e.columns,"1fr"),align:Jn(e.align)||"initial",rows:n(e.rows,"auto"),gap:js(e.gap),areas:i(e.areas)||"unset"}));return(o,r)=>(_(),nt(he(o.is),{class:"k-grid",style:ve(s.value)},{default:lt(()=>[$(o.$slots,"default")]),_:3},8,["style"]))}});function Ma(t){return t?t.flatMap(e=>{const{type:n,children:i}=e;return n===ue?Ma(i):[e]}):[]}const cg=tt({props:{area:String,align:String},inheritAttrs:!1,setup({area:t,align:e},{slots:n}){return()=>{if(!n.default)return null;const[i]=Ma(n.default());if(!i)return null;const s=at({style:{"--k-grid-item-area":t,"--k-grid-item-align-self":Jn(e)||"initial"}},i.props??{});return dl(i,s)}}}),Mh=tt({__name:"Flex",props:{is:{type:[Object,Function],default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(t){const e=t,n=G(()=>Gr("flex",{justify:Jn(e.justify)||"initial",align:Jn(e.align)||"initial",wrap:e.nowrap?"nowrap":"wrap",gap:js(e.gap),direction:e.direction}));return(i,s)=>(_(),nt(he(i.is),{class:"k-flex",style:ve(n.value)},{default:lt(()=>[$(i.$slots,"default")]),_:3},8,["style"]))}}),Rh={key:0,class:"k-scroller__indicator"},dg=tt({__name:"Scroller",props:{is:{type:[Object,Function],default:"div"},appearance:{default:"default"}},setup(t){const e=De({prefix:"k-scroller-"}),n=J({top:!1,right:!1,left:!1,bottom:!1}),i=G(()=>Object.entries(n.value).filter(([,o])=>o).map(([o])=>o)),s=o=>{const{scrollWidth:r,scrollHeight:a,clientWidth:u,clientHeight:c,scrollTop:l,scrollLeft:d}=o,h=r-u>=80,p=a-c>=80;n.value={top:p&&l<=80,left:h&&d<=80,bottom:p&&l>=a-c-80,right:h&&d>=r-u-80}};return ge(()=>{const o=document.getElementById(e);o&&(rh(o,"scroll",()=>s(o)),uh(o,()=>s(o),{childList:!0,subtree:!0}))}),(o,r)=>(_(),nt(he(o.is),{id:ot(e),class:Vt([`k-scroller k-scroller--appearance-${o.appearance}`,...i.value.map(a=>`k-scroller--scrolled-to-${a}`)])},{default:lt(()=>[o.appearance==="indicator"?(_(),O("div",Rh,[$(o.$slots,"indicator",{},()=>[Et(ot(Ae),{icon:"fa-pro-thin:arrow-right"})])])):H("",!0),$(o.$slots,"default")]),_:3},8,["id","class"]))}});var Ze=new WeakMap,Ft=[];function Ph(t,e={}){const{rootEl:n}=e,i=t.filter(Boolean);if(i.length===0)return;const s=i[0].ownerDocument||document,o=s.defaultView??window,r=new Set(i),a=new Set,u=n??s.body;let c=p=>{for(let v of p.querySelectorAll("[data-live-announcer], [data-zag-top-layer]"))r.add(v);let g=v=>{if(r.has(v)||a.has(v.parentElement)&&v.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let k of r)if(v.contains(k))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},f=s.createTreeWalker(p,NodeFilter.SHOW_ELEMENT,{acceptNode:g}),y=g(p);if(y===NodeFilter.FILTER_ACCEPT&&l(p),y!==NodeFilter.FILTER_REJECT){let v=f.nextNode();for(;v!=null;)l(v),v=f.nextNode()}},l=p=>{let g=Ze.get(p)??0;p.getAttribute("aria-hidden")==="true"&&g===0||(g===0&&p.setAttribute("aria-hidden","true"),a.add(p),Ze.set(p,g+1))};Ft.length&&Ft[Ft.length-1].disconnect(),c(u);const d=new o.MutationObserver(p=>{for(let g of p)if(!(g.type!=="childList"||g.addedNodes.length===0)&&![...r,...a].some(f=>f.contains(g.target))){for(let f of g.removedNodes)f instanceof o.Element&&(r.delete(f),a.delete(f));for(let f of g.addedNodes)(f instanceof o.HTMLElement||f instanceof o.SVGElement)&&(f.dataset.liveAnnouncer==="true"||f.dataset.zagTopLayer==="true")?r.add(f):f instanceof o.Element&&c(f)}});d.observe(u,{childList:!0,subtree:!0});let h={observe(){d.observe(u,{childList:!0,subtree:!0})},disconnect(){d.disconnect()}};return Ft.push(h),()=>{d.disconnect();for(let p of a){let g=Ze.get(p);g===1?(p.removeAttribute("aria-hidden"),Ze.delete(p)):Ze.set(p,g-1)}h===Ft[Ft.length-1]?(Ft.pop(),Ft.length&&Ft[Ft.length-1].observe()):Ft.splice(Ft.indexOf(h),1)}}function Lh(t,e={}){const{defer:n}=e,i=n?xn:o=>o(),s=[];return s.push(i(()=>{const o=typeof t=="function"?t():t;s.push(Ph(o,e))})),()=>{s.forEach(o=>o?.())}}var Bh=t=>typeof t=="object"&&t!==null&&t.nodeType===1;function Nh(t){return Bh(t)?t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0:!1}var jh="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";function Ra(t){return!t||t.closest("[inert]")?!1:t.matches(jh)&&Nh(t)}function Vh(t){const e={each(n){var i;for(let s=0;s<((i=t.frames)==null?void 0:i.length);s+=1){const o=t.frames[s];o&&n(o)}},addEventListener(n,i,s){return e.each(o=>{try{o.document.addEventListener(n,i,s)}catch(r){console.warn(r)}}),()=>{try{e.removeEventListener(n,i,s)}catch(o){console.warn(o)}}},removeEventListener(n,i,s){e.each(o=>{try{o.document.removeEventListener(n,i,s)}catch(r){console.warn(r)}})}};return e}var Go="pointerdown.outside",qo="focus.outside";function $h(t){const e=t.composedPath()??[t.target];for(const n of e)if(Qn(n)&&Ra(n))return!0;return!1}var zh=t=>"clientY"in t;function Hh(t,e){if(!zh(e)||!t)return!1;const n=t.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=e.clientY&&e.clientY<=n.top+n.height&&n.left<=e.clientX&&e.clientX<=n.left+n.width}function Gh(t,e){const{exclude:n,onFocusOutside:i,onPointerDownOutside:s,onInteractOutside:o}=e;if(!t)return;const r=Vs(t),a=Ru(t),u=Vh(a);function c(f){const y=ei(f);return!Qn(y)||ti(t,y)||Hh(t,f)?!1:!(n!=null&&n(y))}let l;function d(f){function y(){if(!(!t||!c(f))){if(s||o){const v=Fo(s,o);t.addEventListener(Go,v,{once:!0})}No(t,Go,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,contextmenu:Kc(f),focusable:$h(f)}})}}f.pointerType==="touch"?(u.removeEventListener("click",y),r.removeEventListener("click",y),l=y,r.addEventListener("click",y,{once:!0}),u.addEventListener("click",y,{once:!0})):y()}const h=new Set,p=setTimeout(()=>{h.add(u.addEventListener("pointerdown",d,!0)),h.add(xs(r,"pointerdown",d,!0))},0);function g(f){if(!(!t||!c(f))){if(i||o){const y=Fo(i,o);t.addEventListener(qo,y,{once:!0})}No(t,qo,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,contextmenu:!1,focusable:Ra(ei(f))}})}}return h.add(xs(r,"focusin",g,!0)),h.add(u.addEventListener("focusin",g,!0)),()=>{clearTimeout(p),l&&(u.removeEventListener("click",l),r.removeEventListener("click",l)),h.forEach(f=>f())}}function qh(t,e){const{defer:n}=e,i=n?xn:o=>o(),s=[];return s.push(i(()=>{const o=typeof t=="function"?t():t;s.push(Gh(o,e))})),()=>{s.forEach(o=>o?.())}}function Uh(t,e){const n=i=>{i.key==="Escape"&&e?.(i)};return xs(Vs(t),"keydown",n)}var Nt={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(t=>t.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(t){var e;const n=this.indexOf(t),i=this.topMostPointerBlockingLayer()?this.indexOf((e=this.topMostPointerBlockingLayer())==null?void 0:e.node):-1;return n<i},isTopMost(t){const e=this.layers[this.count()-1];return e?.node===t},getNestedLayers(t){return Array.from(this.layers).slice(this.indexOf(t)+1)},isInNestedLayer(t,e){return this.getNestedLayers(t).some(n=>ti(n.node,e))},isInBranch(t){return Array.from(this.branches).some(e=>ti(e,t))},add(t){this.layers.push(t)},addBranch(t){this.branches.push(t)},remove(t){const e=this.indexOf(t);e<0||(e<this.count()-1&&this.getNestedLayers(t).forEach(n=>n.dismiss()),this.layers.splice(e,1))},removeBranch(t){const e=this.branches.indexOf(t);e>=0&&this.branches.splice(e,1)},indexOf(t){return this.layers.findIndex(e=>e.node===t)},dismiss(t){var e;(e=this.layers[this.indexOf(t)])==null||e.dismiss()},clear(){this.remove(this.layers[0].node)}},Uo;function Wo(){Nt.layers.forEach(({node:t})=>{t.style.pointerEvents=Nt.isBelowPointerBlockingLayer(t)?"none":"auto"})}function Wh(t){t.style.pointerEvents=""}var Ui="data-inert";function Xh(t){const e=Vs(t);return Nt.hasPointerBlockingLayer()&&!e.body.hasAttribute(Ui)&&(Uo=document.body.style.pointerEvents,e.body.style.pointerEvents="none",e.body.setAttribute(Ui,"")),()=>{Nt.hasPointerBlockingLayer()||(e.body.style.pointerEvents=Uo,e.body.removeAttribute(Ui),e.body.style.length===0&&e.body.removeAttribute("style"))}}function Yh(t,e){if(!t){vc("[@zag-js/dismissable] node is `null` or `undefined`");return}const{onDismiss:n,pointerBlocking:i,exclude:s,debug:o}=e,r={dismiss:n,node:t,pointerBlocking:i};Nt.add(r),Wo();function a(h){var p,g;const f=ei(h.detail.originalEvent);Nt.isBelowPointerBlockingLayer(t)||Nt.isInBranch(f)||((p=e.onPointerDownOutside)==null||p.call(e,h),(g=e.onInteractOutside)==null||g.call(e,h),!h.defaultPrevented&&(o&&console.log("onPointerDownOutside:",h.detail.originalEvent),n?.()))}function u(h){var p,g;const f=ei(h.detail.originalEvent);Nt.isInBranch(f)||((p=e.onFocusOutside)==null||p.call(e,h),(g=e.onInteractOutside)==null||g.call(e,h),!h.defaultPrevented&&(o&&console.log("onFocusOutside:",h.detail.originalEvent),n?.()))}function c(h){var p;Nt.isTopMost(t)&&((p=e.onEscapeKeyDown)==null||p.call(e,h),!h.defaultPrevented&&n&&(h.preventDefault(),n()))}function l(h){if(!t)return!1;const p=typeof s=="function"?s():s;return(Array.isArray(p)?p:[p]).some(g=>ti(g,h))||Nt.isInNestedLayer(t,h)}const d=[i?Xh(t):void 0,Uh(t,c),qh(t,{exclude:l,onFocusOutside:u,onPointerDownOutside:a})];return()=>{Nt.remove(t),Wo(),Wh(t),d.forEach(h=>h?.())}}function Kh(t,e){const{defer:n}=e,i=n?xn:o=>o(),s=[];return s.push(i(()=>{const o=typeof t=="function"?t():t;s.push(Yh(o,e))})),()=>{s.forEach(o=>o?.())}}var Wi="data-zag-scroll-lock";function Xo(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Zh(t,e,n){if(!t)return;const i=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{i?t.style.setProperty(e,i):t.style.removeProperty(e)}}function Jh(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function Qh(t){const e=t??document,n=e.defaultView??window,{documentElement:i,body:s}=e;if(s.hasAttribute(Wi))return;s.setAttribute(Wi,"");const o=n.innerWidth-i.clientWidth,r=()=>Zh(i,"--scrollbar-width",`${o}px`),a=Jh(i),u=()=>Xo(s,{overflow:"hidden",[a]:`${o}px`}),c=()=>{const{scrollX:d,scrollY:h,visualViewport:p}=n,g=p?.offsetLeft??0,f=p?.offsetTop??0,y=Xo(s,{position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(f))}px`,left:`${-(d-Math.floor(g))}px`,right:"0",[a]:`${o}px`});return()=>{y?.(),n.scrollTo(d,h)}},l=[r(),ju()?c():u()];return()=>{l.forEach(d=>d?.()),s.removeAttribute(Wi)}}/*!
|
|
1
|
+
import{G as Qi,r as ne,q as oe,b as U,J as Ce,o as A,e as ue,w as ve,z as zo,a as ee,c as P,f as z,j as Ne,v as re,d as W,C as $e,t as de,A as Ho,m as te,g as kt,$ as Vl,n as Oe,u as Bl,M as qo,y as At,a3 as Ll,i as zt,F as rt,a0 as Uo,O as Wo,s as Ia,K as ye,L as Ie,S as Nl,U as Go,V as jl,I as $l,D as Jr,N as Xo,l as Yo,k as nn,B as Ko,a8 as zl,Q as Hl,R as $n,P as ql,a2 as Ul,Y as Wl,Z as Gl,W as Zo}from"./_plugin-vue_export-helper.js";function Jo(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Jo(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Xl(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Jo(e))&&(i&&(i+=" "),i+=t);return i}const Fa=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Da=Xl,Qr=(e,t)=>n=>{var i;if(t?.variants==null)return Da(e,n?.class,n?.className);const{variants:r,defaultVariants:a}=t,o=Object.keys(r).map(u=>{const c=n?.[u],d=a?.[u];if(c===null)return null;const h=Fa(c)||Fa(d);return r[u][h]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,h]=c;return h===void 0||(u[d]=h),u},{}),l=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((u,c)=>{let{class:d,className:h,...p}=c;return Object.entries(p).every(f=>{let[g,m]=f;return Array.isArray(m)?m.includes({...a,...s}[g]):{...a,...s}[g]===m})?[...u,d,h]:u},[]);return Da(e,o,l,n?.class,n?.className)},bn=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ri=(e,t,n,i="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;i=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const s=r.pop(),l=r.pop(),u={provider:r.length>0?r[0]:i,prefix:l,name:s};return t&&!ni(u)?null:u}const a=r[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return t&&!ni(s)?null:s}if(n&&i===""){const s={provider:i,prefix:"",name:a};return t&&!ni(s,n)?null:s}return null},ni=(e,t)=>e?!!((e.provider===""||e.provider.match(bn))&&(t&&e.prefix===""||e.prefix.match(bn))&&e.name.match(bn)):!1,Qo=Object.freeze({left:0,top:0,width:16,height:16}),gi=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Mi=Object.freeze({...Qo,...gi}),kr=Object.freeze({...Mi,body:"",hidden:!1});function Yl(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(n.rotate=i),n}function Oa(e,t){const n=Yl(e,t);for(const i in kr)i in gi?i in e&&!(i in n)&&(n[i]=gi[i]):i in t?n[i]=t[i]:i in e&&(n[i]=e[i]);return n}function Kl(e,t){const n=e.icons,i=e.aliases||Object.create(null),r=Object.create(null);function a(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(r[o]=[s].concat(l))}return r[o]}return Object.keys(n).concat(Object.keys(i)).forEach(a),r}function Zl(e,t,n){const i=e.icons,r=e.aliases||Object.create(null);let a={};function o(s){a=Oa(i[s]||r[s],a)}return o(t),n.forEach(o),Oa(e,a)}function es(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const i=Kl(e);for(const r in i){const a=i[r];a&&(t(r,Zl(e,r,a)),n.push(r))}return n}const Jl={provider:"",aliases:{},not_found:{},...Qo};function er(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ts(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!er(e,Jl))return null;const n=t.icons;for(const r in n){const a=n[r];if(!r.match(bn)||typeof a.body!="string"||!er(a,kr))return null}const i=t.aliases||Object.create(null);for(const r in i){const a=i[r],o=a.parent;if(!r.match(bn)||typeof o!="string"||!n[o]&&!i[o]||!er(a,kr))return null}return t}const Pa=Object.create(null);function Ql(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Bt(e,t){const n=Pa[e]||(Pa[e]=Object.create(null));return n[t]||(n[t]=Ql(e,t))}function ea(e,t){return ts(t)?es(t,(n,i)=>{i?e.icons[n]=i:e.missing.add(n)}):[]}function eu(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let An=!1;function ns(e){return typeof e=="boolean"&&(An=e),An}function tu(e){const t=typeof e=="string"?Ri(e,!0,An):e;if(t){const n=Bt(t.provider,t.prefix),i=t.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function nu(e,t){const n=Ri(e,!0,An);if(!n)return!1;const i=Bt(n.provider,n.prefix);return eu(i,n.name,t)}function iu(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),An&&!t&&!e.prefix){let r=!1;return ts(e)&&(e.prefix="",es(e,(a,o)=>{o&&nu(a,o)&&(r=!0)})),r}const n=e.prefix;if(!ni({provider:t,prefix:n,name:"a"}))return!1;const i=Bt(t,n);return!!ea(i,e)}const is=Object.freeze({width:null,height:null}),rs=Object.freeze({...is,...gi}),ru=/(-?[0-9.]*[0-9]+[0-9.]*)/g,au=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ra(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const i=e.split(ru);if(i===null||!i.length)return e;const r=[];let a=i.shift(),o=au.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?r.push(a):r.push(Math.ceil(s*t*n)/n)}else r.push(a);if(a=i.shift(),a===void 0)return r.join("");o=!o}}function ou(e,t="defs"){let n="";const i=e.indexOf("<"+t);for(;i>=0;){const r=e.indexOf(">",i),a=e.indexOf("</"+t);if(r===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;n+=e.slice(r+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:n,content:e}}function su(e,t){return e?"<defs>"+e+"</defs>"+t:t}function lu(e,t,n){const i=ou(e);return su(i.defs,t+i.content+n)}const uu=e=>e==="unset"||e==="undefined"||e==="none";function cu(e,t){const n={...Mi,...e},i={...rs,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,i].forEach(g=>{const m=[],b=g.hFlip,v=g.vFlip;let E=g.rotate;b?v?E+=2:(m.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),m.push("scale(-1 1)"),r.top=r.left=0):v&&(m.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),m.push("scale(1 -1)"),r.top=r.left=0);let T;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:T=r.height/2+r.top,m.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:m.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:T=r.width/2+r.left,m.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}E%2===1&&(r.left!==r.top&&(T=r.left,r.left=r.top,r.top=T),r.width!==r.height&&(T=r.width,r.width=r.height,r.height=T)),m.length&&(a=lu(a,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=i.width,s=i.height,l=r.width,u=r.height;let c,d;o===null?(d=s===null?"1em":s==="auto"?u:s,c=Ra(d,l/u)):(c=o==="auto"?l:o,d=s===null?Ra(c,u/l):s==="auto"?u:s);const h={},p=(g,m)=>{uu(m)||(h[g]=m.toString())};p("width",c),p("height",d);const f=[r.left,r.top,l,u];return h.viewBox=f.join(" "),{attributes:h,viewBox:f,body:a}}const du=/\sid="(\S+)"/g,hu="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let pu=0;function fu(e,t=hu){const n=[];let i;for(;i=du.exec(e);)n.push(i[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(a=>{const o=typeof t=="function"?t(a):t+(pu++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Er=Object.create(null);function gu(e,t){Er[e]=t}function _r(e){return Er[e]||Er[""]}function ta(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const na=Object.create(null),zn=["https://api.simplesvg.com","https://api.unisvg.com"],wr=[];for(;zn.length>0;)zn.length===1||Math.random()>.5?wr.push(zn.shift()):wr.push(zn.pop());na[""]=ta({resources:["https://api.iconify.design"].concat(wr)});function as(e,t){const n=ta(t);return n===null?!1:(na[e]=n,!0)}function ia(e){return na[e]}const mu=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ma=mu();function vu(e,t){const n=ia(e);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let r=0;n.resources.forEach(o=>{r=Math.max(r,o.length)});const a=t+".json?icons=";i=n.maxURL-r-n.path.length-a.length}return i}function bu(e){return e===404}const yu=(e,t,n)=>{const i=[],r=vu(e,t),a="icons";let o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((l,u)=>{s+=l.length+1,s>=r&&u>0&&(i.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=l.length),o.icons.push(l)}),i.push(o),i};function xu(e){if(typeof e=="string"){const t=ia(e);if(t)return t.path}return"/"}const ku=(e,t,n)=>{if(!Ma){n("abort",424);return}let i=xu(t.provider);switch(t.type){case"icons":{const a=t.prefix,o=t.icons.join(","),s=new URLSearchParams({icons:o});i+=a+".json?"+s.toString();break}case"custom":{const a=t.uri;i+=a.slice(0,1)==="/"?a.slice(1):a;break}default:n("abort",400);return}let r=503;Ma(e+i).then(a=>{const o=a.status;if(o!==200){setTimeout(()=>{n(bu(o)?"abort":"next",o)});return}return r=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?n("abort",a):n("next",r)});return}setTimeout(()=>{n("success",a)})}).catch(()=>{n("next",r)})},Eu={prepare:yu,send:ku};function _u(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,a)=>r.provider!==a.provider?r.provider.localeCompare(a.provider):r.prefix!==a.prefix?r.prefix.localeCompare(a.prefix):r.name.localeCompare(a.name));let i={provider:"",prefix:"",name:""};return e.forEach(r=>{if(i.name===r.name&&i.prefix===r.prefix&&i.provider===r.provider)return;i=r;const a=r.provider,o=r.prefix,s=r.name,l=n[a]||(n[a]=Object.create(null)),u=l[o]||(l[o]=Bt(a,o));let c;s in u.icons?c=t.loaded:o===""||u.missing.has(s)?c=t.missing:c=t.pending;const d={provider:a,prefix:o,name:s};c.push(d)}),t}function os(e,t){e.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(r=>r.id!==t))})}function wu(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const i=e.provider,r=e.prefix;t.forEach(a=>{const o=a.icons,s=o.pending.length;o.pending=o.pending.filter(l=>{if(l.prefix!==r)return!0;const u=l.name;if(e.icons[u])o.loaded.push({provider:i,prefix:r,name:u});else if(e.missing.has(u))o.missing.push({provider:i,prefix:r,name:u});else return n=!0,!0;return!1}),o.pending.length!==s&&(n||os([e],a.id),a.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),a.abort))})}))}let Cu=0;function Au(e,t,n){const i=Cu++,r=os.bind(null,n,i);if(!t.pending.length)return r;const a={id:i,icons:t,callback:e,abort:r};return n.forEach(o=>{(o.loaderCallbacks||(o.loaderCallbacks=[])).push(a)}),r}function Su(e,t=!0,n=!1){const i=[];return e.forEach(r=>{const a=typeof r=="string"?Ri(r,t,n):r;a&&i.push(a)}),i}var Tu={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Iu(e,t,n,i){const r=e.resources.length,a=e.random?Math.floor(Math.random()*r):e.index;let o;if(e.random){let S=e.resources.slice(0);for(o=[];S.length>1;){const X=Math.floor(Math.random()*S.length);o.push(S[X]),S=S.slice(0,X).concat(S.slice(X+1))}o=o.concat(S)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));const s=Date.now();let l="pending",u=0,c,d=null,h=[],p=[];typeof i=="function"&&p.push(i);function f(){d&&(clearTimeout(d),d=null)}function g(){l==="pending"&&(l="aborted"),f(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function m(S,X){X&&(p=[]),typeof S=="function"&&p.push(S)}function b(){return{startTime:s,payload:t,status:l,queriesSent:u,queriesPending:h.length,subscribe:m,abort:g}}function v(){l="failed",p.forEach(S=>{S(void 0,c)})}function E(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function T(S,X,D){const C=X!=="success";switch(h=h.filter(k=>k!==S),l){case"pending":break;case"failed":if(C||!e.dataAfterTimeout)return;break;default:return}if(X==="abort"){c=D,v();return}if(C){c=D,h.length||(o.length?_():v());return}if(f(),E(),!e.random){const k=e.resources.indexOf(S.resource);k!==-1&&k!==e.index&&(e.index=k)}l="completed",p.forEach(k=>{k(D)})}function _(){if(l!=="pending")return;f();const S=o.shift();if(S===void 0){if(h.length){d=setTimeout(()=>{f(),l==="pending"&&(E(),v())},e.timeout);return}v();return}const X={status:"pending",resource:S,callback:(D,C)=>{T(X,D,C)}};h.push(X),u++,d=setTimeout(_,e.rotate),n(S,t,X.callback)}return setTimeout(_),b}function ss(e){const t={...Tu,...e};let n=[];function i(){n=n.filter(o=>o().status==="pending")}function r(o,s,l){const u=Iu(t,o,s,(c,d)=>{i(),l&&l(c,d)});return n.push(u),u}function a(o){return n.find(s=>o(s))||null}return{query:r,find:a,setIndex:o=>{t.index=o},getIndex:()=>t.index,cleanup:i}}function Va(){}const tr=Object.create(null);function Fu(e){if(!tr[e]){const t=ia(e);if(!t)return;const n=ss(t),i={config:t,redundancy:n};tr[e]=i}return tr[e]}function Du(e,t,n){let i,r;if(typeof e=="string"){const a=_r(e);if(!a)return n(void 0,424),Va;r=a.send;const o=Fu(e);o&&(i=o.redundancy)}else{const a=ta(e);if(a){i=ss(a);const o=e.resources?e.resources[0]:"",s=_r(o);s&&(r=s.send)}}return!i||!r?(n(void 0,424),Va):i.query(t,r,n)().abort}const Ba="iconify2",Sn="iconify",ls=Sn+"-count",La=Sn+"-version",us=36e5,Ou=168,Pu=50;function Cr(e,t){try{return e.getItem(t)}catch{}}function ra(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Na(e,t){try{e.removeItem(t)}catch{}}function Ar(e,t){return ra(e,ls,t.toString())}function Sr(e){return parseInt(Cr(e,ls))||0}const Vi={local:!0,session:!0},cs={local:new Set,session:new Set};let aa=!1;function Ru(e){aa=e}let Hn=typeof window>"u"?{}:window;function ds(e){const t=e+"Storage";try{if(Hn&&Hn[t]&&typeof Hn[t].length=="number")return Hn[t]}catch{}Vi[e]=!1}function hs(e,t){const n=ds(e);if(!n)return;const i=Cr(n,La);if(i!==Ba){if(i){const s=Sr(n);for(let l=0;l<s;l++)Na(n,Sn+l.toString())}ra(n,La,Ba),Ar(n,0);return}const r=Math.floor(Date.now()/us)-Ou,a=s=>{const l=Sn+s.toString(),u=Cr(n,l);if(typeof u=="string"){try{const c=JSON.parse(u);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>r&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,s))return!0}catch{}Na(n,l)}};let o=Sr(n);for(let s=o-1;s>=0;s--)a(s)||(s===o-1?(o--,Ar(n,o)):cs[e].add(s))}function ps(){if(!aa){Ru(!0);for(const e in Vi)hs(e,t=>{const n=t.data,i=t.provider,r=n.prefix,a=Bt(i,r);if(!ea(a,n).length)return!1;const o=n.lastModified||-1;return a.lastModifiedCached=a.lastModifiedCached?Math.min(a.lastModifiedCached,o):o,!0})}}function Mu(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const i in Vi)hs(i,r=>{const a=r.data;return r.provider!==e.provider||a.prefix!==e.prefix||a.lastModified===t});return!0}function Vu(e,t){aa||ps();function n(i){let r;if(!Vi[i]||!(r=ds(i)))return;const a=cs[i];let o;if(a.size)a.delete(o=Array.from(a).shift());else if(o=Sr(r),o>=Pu||!Ar(r,o+1))return;const s={cached:Math.floor(Date.now()/us),provider:e.provider,data:t};return ra(r,Sn+o.toString(),JSON.stringify(s))}t.lastModified&&!Mu(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function ja(){}function Bu(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,wu(e)}))}function Lu(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:i}=e,r=e.iconsToLoad;delete e.iconsToLoad;let a;!r||!(a=_r(n))||a.prepare(n,i,r).forEach(o=>{Du(n,o,s=>{if(typeof s!="object")o.icons.forEach(l=>{e.missing.add(l)});else try{const l=ea(e,s);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(c=>{u.delete(c)}),Vu(e,s)}catch(l){console.error(l)}Bu(e)})})}))}const Nu=(e,t)=>{const n=Su(e,!0,ns()),i=_u(n);if(!i.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(i.loaded,i.missing,i.pending,ja)}),()=>{l=!1}}const r=Object.create(null),a=[];let o,s;return i.pending.forEach(l=>{const{provider:u,prefix:c}=l;if(c===s&&u===o)return;o=u,s=c,a.push(Bt(u,c));const d=r[u]||(r[u]=Object.create(null));d[c]||(d[c]=[])}),i.pending.forEach(l=>{const{provider:u,prefix:c,name:d}=l,h=Bt(u,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(d)||(p.add(d),r[u][c].push(d))}),a.forEach(l=>{const{provider:u,prefix:c}=l;r[u][c].length&&Lu(l,r[u][c])}),t?Au(t,i,a):ja};function ju(e,t){const n={...e};for(const i in t){const r=t[i],a=typeof r;i in is?(r===null||r&&(a==="string"||a==="number"))&&(n[i]=r):a===typeof n[i]&&(n[i]=i==="rotate"?r%4:r)}return n}const $u=/[\s,]+/;function zu(e,t){t.split($u).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Hu(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function i(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:i(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let a=parseFloat(e.slice(0,e.length-n.length));return isNaN(a)?0:(a=a/r,a%1===0?i(a):0)}}return t}function qu(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)n+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Uu(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Wu(e){return"data:image/svg+xml,"+Uu(e)}function Gu(e){return'url("'+Wu(e)+'")'}const $a={...rs,inline:!1},Xu={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Yu={display:"inline-block"},Tr={backgroundColor:"currentColor"},fs={backgroundColor:"transparent"},za={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ha={webkitMask:Tr,mask:Tr,background:fs};for(const e in Ha){const t=Ha[e];for(const n in za)t[e+n]=za[n]}const ii={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";ii[e+"-flip"]=t,ii[e.slice(0,1)+"-flip"]=t,ii[e+"Flip"]=t});function qa(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Ua=(e,t)=>{const n=ju($a,t),i={...Xu},r=t.mode||"svg",a={},o=t.style,s=typeof o=="object"&&!(o instanceof Array)?o:{};for(let g in t){const m=t[g];if(m!==void 0)switch(g){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[g]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&zu(n,m);break;case"color":a.color=m;break;case"rotate":typeof m=="string"?n[g]=Hu(m):typeof m=="number"&&(n[g]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete i["aria-hidden"];break;default:{const b=ii[g];b?(m===!0||m==="true"||m===1)&&(n[b]=!0):$a[g]===void 0&&(i[g]=m)}}}const l=cu(e,n),u=l.attributes;if(n.inline&&(a.verticalAlign="-0.125em"),r==="svg"){i.style={...a,...s},Object.assign(i,u);let g=0,m=t.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),i.innerHTML=fu(l.body,m?()=>m+"ID"+g++:"iconifyVue"),Ia("svg",i)}const{body:c,width:d,height:h}=e,p=r==="mask"||(r==="bg"?!1:c.indexOf("currentColor")!==-1),f=qu(c,{...u,width:d+"",height:h+""});return i.style={...a,"--svg":Gu(f),width:qa(u.width),height:qa(u.height),...Yu,...p?Tr:fs,...s},Ia("span",i)};ns(!0);gu("",Eu);if(typeof document<"u"&&typeof window<"u"){ps();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!iu(i))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const i="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;as(n,r)||console.error(i)}catch{console.error(i)}}}}const Ku={...Mi,body:""},Vt=oe({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let n;if(typeof e!="string"||(n=Ri(e,!1,!0))===null)return this.abortLoading(),null;const i=tu(n);if(!i)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",i!==null&&(this._loadingIcon={name:e,abort:Nu([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e));const r=["iconify"];return n.prefix!==""&&r.push("iconify--"+n.prefix),n.provider!==""&&r.push("iconify--"+n.provider),{data:i,classes:r}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad):null;if(!t)return Ua(Ku,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),Ua({...Mi,...t.data},n)}});as("",{resources:["https://icons.ui.kvass.no"]});function Zu(e){return!e||typeof e!="object"?!1:typeof e.then=="function"&&typeof e.catch=="function"}const Ju=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],Qu=(e,t)=>t==="default"?`var(--k-ui-${e})`:`var(--k-ui-${e}-${t})`,mi=e=>{switch(e){case"start":case"end":return`flex-${e}`;default:return e}},oa=(e,t="spacing")=>e.split(" ").map(n=>typeof n=="number"||typeof n=="string"&&n.match(/^\d+$/)?`${n}rem`:typeof n=="string"&&Ju.includes(n)?Qu(t,n):n).join(" ");function ec(){var e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var i=Math.random()*16;return e>0?(i=(e+i)%16|0,e=Math.floor(e/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),(n==="x"?i:i&3|8).toString(16)})}const gs=(e,t)=>Object.fromEntries(Object.entries(t).map(([n,i])=>[`--k-${e}-${n}`,i])),ms=oe({__name:"Spinner",props:{size:{default:"medium"}},setup(e){return(t,n)=>(A(),P("span",{class:Oe(`k-spinner k-spinner--size-${t.size}`)},null,2))}}),tc={class:"k-button__content"},nc={key:0,class:"k-button__icon k-button__icon--left"},ic={key:1,class:"k-button__icon k-button__icon--right"},rc={key:2,class:"k-button__confirm-label"},Lt=oe({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(e,{emit:t}){const n=e,i=t,r={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},a=U(()=>!h.value||u.value==="loading"?n.variant:u.value=="confirm"?"warning":r[u.value]||n.variant),o=U(()=>n.loading||u.value==="loading"),s=ne(),l=U(()=>{if(u.value)return["error","success"].includes(u.value)||o.value}),u=ne("idle"),c=ne(),d=ne(),h=U(()=>u.value||o.value),p=U(()=>["error","success"].includes(u.value)),f=U(()=>u.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function g(_){if(!_)return;m(),d.value=_,s.value=setTimeout(()=>u.value="loading",100);let S=X=>{m(),n.stateTimeout?(u.value=X,c.value=setTimeout(()=>{m(),i(X)},n.stateTimeout)):i(X)};d.value.then(()=>S("success")).catch(()=>S("error"))}function m(){s.value&&clearTimeout(s.value),c.value&&clearTimeout(c.value),d.value=null,u.value="idle"}Ce(()=>n.promise,_=>{_&&Zu(_)&&g(_)});const b=ne(),v=U(()=>u.value==="confirm");function E(_){if(n.confirm&&u.value!=="confirm")return u.value="confirm";m(),i("click",_)}const T=Qr("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(_,S)=>(A(),ue(kt(_.is),te({type:"button",class:re(T)({variant:a.value,size:_.size,isLoading:o.value,isBusy:l.value}),"aria-busy":l.value,inert:l.value},_.$attrs,{onClick:E,ref_key:"rootElement",ref:b}),{default:ve(()=>[zo(ee("span",tc,[_.icon||_.iconLeft||_.$slots.icon||_.$slots["icon-left"]?(A(),P("span",nc,[z(_.$slots,"icon-left",{},()=>[z(_.$slots,"icon",{},()=>[Ne(re(Vt),{icon:_.icon||_.iconLeft},null,8,["icon"])])])])):W("",!0),z(_.$slots,"default",{},()=>[$e(de(_.label),1)]),_.iconRight||_.$slots["icon-right"]?(A(),P("span",ic,[z(_.$slots,"icon-right",{},()=>[Ne(re(Vt),{icon:_.iconRight},null,8,["icon"])])])):W("",!0)],512),[[Ho,!v.value]]),o.value?(A(),ue(ms,{key:0})):W("",!0),p.value?(A(),ue(re(Vt),{key:1,class:"k-button__state-indicator",icon:f.value},null,8,["icon"])):W("",!0),v.value?(A(),P("span",rc,de(_.confirmLabel),1)):W("",!0)]),_:3},16,["class","aria-busy","inert"]))}}),ac={class:"k-alert__content"},oc={key:0,class:"k-alert__title"},sc={class:"k-alert__icon"},km=oe({__name:"Alert",props:{variant:{default:"neutral"},icon:{},title:{},content:{},action:{}},emits:["action"],setup(e,{emit:t}){const n=e,i=t,r=Qr("k-alert",{variants:{variant:{success:"k-alert--success",neutral:"k-alert--neutral",info:"k-alert--info",danger:"k-alert--danger",warning:"k-alert--warning",primary:"k-alert--primary"}}}),a={success:"fa-pro-light:circle-check",info:"fa-pro-light:circle-question",warning:"fa-pro-light:exclamation-triangle",danger:"fa-pro-light:exclamation-circle"};return(o,s)=>(A(),P("div",{role:"alert",class:Oe(re(r)({...n}))},[ee("div",ac,[o.title||o.$slots.title?(A(),P("div",oc,[z(o.$slots,"title",{},()=>[ee("strong",null,de(o.title),1)])])):W("",!0),z(o.$slots,"default",{},()=>[ee("span",null,de(o.content),1)]),o.action?(A(),ue(Lt,{key:1,label:o.action,size:"small",class:"k-alert__action",onClick:s[0]||(s[0]=l=>i("action",{event:l,name:o.action}))},null,8,["label"])):W("",!0)]),ee("div",sc,[z(o.$slots,"icon",{},()=>[o.icon||a[o.variant]?(A(),ue(re(Vt),{key:0,icon:o.icon||a[o.variant]},null,8,["icon"])):W("",!0)])])],2))}});var mt=(e,t=[])=>({parts:(...n)=>{if(lc(t))return mt(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>mt(e,[...t,...n]),rename:n=>mt(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${Wt(e)}"][data-part="${Wt(i)}"]`,`& [data-scope="${Wt(e)}"][data-part="${Wt(i)}"]`].join(", "),attrs:{"data-scope":Wt(e),"data-part":Wt(i)}}}),{})}),Wt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),lc=e=>e.length===0,R=e=>e?"":void 0,uc=e=>e?"true":void 0,cc=1,dc=9,hc=11,Bi=e=>typeof e=="object"&&e!==null,Xe=e=>Bi(e)&&e.nodeType===cc&&typeof e.nodeName=="string",vs=e=>Bi(e)&&e.nodeType===dc,pc=e=>Bi(e)&&e===e.window,bs=e=>Xe(e)?e.localName||"":"#document";function fc(e){return["html","body","#document"].includes(bs(e))}var gc=e=>Bi(e)&&e.nodeType!==void 0,Ir=e=>gc(e)&&e.nodeType===hc&&"host"in e;function Tn(e,t){return!e||!t||!Xe(e)||!Xe(t)?!1:e===t||e.contains(t)}function Ze(e){return vs(e)?e:pc(e)?e.document:e?.ownerDocument??document}function mc(e){return Ze(e).documentElement}function ot(e){var t;return Ir(e)?ot(e.host):vs(e)?e.defaultView??window:Xe(e)?((t=e.ownerDocument)==null?void 0:t.defaultView)??window:window}function vc(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var bc=()=>typeof document<"u";function yc(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var ys=e=>bc()&&e.test(yc()),xs=()=>ys(/^Mac/),sa=()=>ys(/iP(hone|ad|od)|iOS/);function xc(e){var t,n,i;return((t=e.composedPath)==null?void 0:t.call(e))??((i=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:i.call(n))}function st(e){const t=xc(e);return t?.[0]??e.target}function kc(e){if(bs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ir(e)&&e.host||mc(e);return Ir(t)?t.host:t}var Ec=e=>typeof e=="object"&&e!==null&&e.nodeType===1;function _c(e){return Ec(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1}var wc="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";function ks(e){return!e||e.closest("[inert]")?!1:e.matches(wc)&&_c(e)}var Cc=/auto|scroll|overlay|hidden|clip/;function Ac(e){const t=ot(e),{overflow:n,overflowX:i,overflowY:r,display:a}=t.getComputedStyle(e);return Cc.test(n+r+i)&&!["inline","contents"].includes(a)}function la(e){const t=new Set;function n(i){const r=globalThis.requestAnimationFrame(i);t.add(()=>globalThis.cancelAnimationFrame(r))}return n(()=>n(e)),function(){t.forEach(i=>i())}}function Et(e){const t=globalThis.requestAnimationFrame(e);return()=>{globalThis.cancelAnimationFrame(t)}}function Es(e){const t=kc(e);return fc(t)?Ze(t).body:Xe(t)&&Ac(t)?t:Es(t)}function _s(e,t){return Array.from(e?.querySelectorAll(t)??[])}function Rn(e){const t={getRootNode:n=>{var i;return((i=n.getRootNode)==null?void 0:i.call(n))??document},getDoc:n=>Ze(t.getRootNode(n)),getWin:n=>t.getDoc(n).defaultView??window,getActiveElement:n=>vc(t.getRootNode(n)),isActiveElement:(n,i)=>i===t.getActiveElement(n),getById:(n,i)=>t.getRootNode(n).getElementById(i),setValue:(n,i)=>{if(n==null||i==null)return;const r=i.toString();n.value!==r&&(n.value=i.toString())}};return{...t,...e}}var nr=new WeakMap;function Sc(e,t,n){nr.has(e)||nr.set(e,new Map);const i=nr.get(e),r=i.get(t);if(!r)return i.set(t,n()),()=>{var s;(s=i.get(t))==null||s(),i.delete(t)};const a=n(),o=()=>{a(),r(),i.delete(t)};return i.set(t,o),()=>{i.get(t)===o&&(a(),i.set(t,r))}}function Tc(e,t){return e?Sc(e,"style",()=>{const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}):()=>{}}var ua={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},Ic=1e3/60;function Fc(e,t){const n=e();if(Xe(n)&&n.isConnected)return t(n),()=>{};{const i=setInterval(()=>{const r=e();Xe(r)&&r.isConnected&&(t(r),clearInterval(i))},Ic);return()=>clearInterval(i)}}function Dc(e,t){const n=[];return e?.forEach(i=>{const r=Fc(i,t);n.push(r)}),()=>{n.forEach(i=>i())}}function Oc(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function Pc(e){return!(e.metaKey||!xs()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var Rc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Mc(e,t,n){const i=n?st(n):null,r=ot(i);return e=e||i instanceof r.HTMLInputElement&&!Rc.has(i?.type)||i instanceof r.HTMLTextAreaElement||i instanceof r.HTMLElement&&i.isContentEditable,!(e&&t==="keyboard"&&n instanceof r.KeyboardEvent&&!Reflect.has(Vc,n.key))}var Ht=null,Fr=new Set,yn=new Map,Nt=!1,Dr=!1,Vc={Tab:!0,Escape:!0};function Li(e,t){for(let n of Fr)n(e,t)}function vi(e){Nt=!0,Pc(e)&&(Ht="keyboard",Li("keyboard",e))}function Me(e){Ht="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Nt=!0,Li("pointer",e))}function ws(e){Oc(e)&&(Nt=!0,Ht="virtual")}function Cs(e){const t=st(e);t===ot(t)||t===Ze(t)||(!Nt&&!Dr&&(Ht="virtual",Li("virtual",e)),Nt=!1,Dr=!1)}function As(){Nt=!1,Dr=!0}function Bc(e){if(typeof window>"u"||yn.get(ot(e)))return;const t=ot(e),n=Ze(e);let i=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ht="virtual",Li("virtual",null),Nt=!0,i.apply(this,arguments)},n.addEventListener("keydown",vi,!0),n.addEventListener("keyup",vi,!0),n.addEventListener("click",ws,!0),t.addEventListener("focus",Cs,!0),t.addEventListener("blur",As,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",Me,!0),n.addEventListener("pointermove",Me,!0),n.addEventListener("pointerup",Me,!0)):(n.addEventListener("mousedown",Me,!0),n.addEventListener("mousemove",Me,!0),n.addEventListener("mouseup",Me,!0)),t.addEventListener("beforeunload",()=>{Lc(e)},{once:!0}),yn.set(t,{focus:i})}var Lc=(e,t)=>{const n=ot(e),i=Ze(e);yn.has(n)&&(n.HTMLElement.prototype.focus=yn.get(n).focus,i.removeEventListener("keydown",vi,!0),i.removeEventListener("keyup",vi,!0),i.removeEventListener("click",ws,!0),n.removeEventListener("focus",Cs,!0),n.removeEventListener("blur",As,!1),typeof n.PointerEvent<"u"?(i.removeEventListener("pointerdown",Me,!0),i.removeEventListener("pointermove",Me,!0),i.removeEventListener("pointerup",Me,!0)):(i.removeEventListener("mousedown",Me,!0),i.removeEventListener("mousemove",Me,!0),i.removeEventListener("mouseup",Me,!0)),yn.delete(n))};function In(){return Ht==="keyboard"}function ca(e={}){const{isTextInput:t,autoFocus:n,onChange:i,root:r}=e;Bc(r),i?.({isFocusVisible:n||In(),modality:Ht});const a=(o,s)=>{Mc(!!t,o,s)&&i?.({isFocusVisible:In(),modality:o})};return Fr.add(a),()=>{Fr.delete(a)}}const Nc=Symbol(),Wa=Object.getPrototypeOf,Or=new WeakMap,jc=e=>e&&(Or.has(e)?Or.get(e):Wa(e)===Object.prototype||Wa(e)===Array.prototype),$c=e=>jc(e)&&e[Nc]||null,Ga=(e,t=!0)=>{Or.set(e,t)};function zc(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Ss(e,t){const n=zc();return n?(n[e]||(n[e]=t()),n[e]):t()}var ir=e=>typeof e=="object"&&e!==null,Ot=Ss("__zag__proxyStateMap",()=>new WeakMap),fn=Ss("__zag__refSet",()=>new WeakSet),Hc=e=>typeof e=="object"&&e!==null&&"$$typeof"in e,qc=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Uc=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",Wc=e=>Hc(e)||qc(e)||Uc(e),Gc=(e=Object.is,t=(u,c)=>new Proxy(u,c),n=u=>ir(u)&&!fn.has(u)&&(Array.isArray(u)||!(Symbol.iterator in u))&&!Wc(u)&&!(u instanceof WeakMap)&&!(u instanceof WeakSet)&&!(u instanceof Error)&&!(u instanceof Number)&&!(u instanceof Date)&&!(u instanceof String)&&!(u instanceof RegExp)&&!(u instanceof ArrayBuffer),i=u=>{switch(u.status){case"fulfilled":return u.value;case"rejected":throw u.reason;default:throw u}},r=new WeakMap,a=(u,c,d=i)=>{const h=r.get(u);if(h?.[0]===c)return h[1];const p=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u));return Ga(p,!0),r.set(u,[c,p]),Reflect.ownKeys(u).forEach(f=>{const g=Reflect.get(u,f);fn.has(g)?(Ga(g,!1),p[f]=g):g instanceof Promise?Object.defineProperty(p,f,{get(){return d(g)}}):Ot.has(g)?p[f]=Rt(g,d):p[f]=g}),Object.freeze(p)},o=new WeakMap,s=[1,1],l=u=>{if(!ir(u))throw new Error("object required");const c=o.get(u);if(c)return c;let d=s[0];const h=new Set,p=(D,C=++s[0])=>{d!==C&&(d=C,h.forEach(k=>k(D,C)))};let f=s[1];const g=(D=++s[1])=>(f!==D&&!h.size&&(f=D,b.forEach(([C])=>{const k=C[1](D);k>d&&(d=k)})),d),m=D=>(C,k)=>{const y=[...C];y[1]=[D,...y[1]],p(y,k)},b=new Map,v=(D,C)=>{if(h.size){const k=C[3](m(D));b.set(D,[C,k])}else b.set(D,[C])},E=D=>{var C;const k=b.get(D);k&&(b.delete(D),(C=k[1])==null||C.call(k))},T=D=>(h.add(D),h.size===1&&b.forEach(([C,k],y)=>{const x=C[3](m(y));b.set(y,[C,x])}),()=>{h.delete(D),h.size===0&&b.forEach(([C,k],y)=>{k&&(k(),b.set(y,[C]))})}),_=Array.isArray(u)?[]:Object.create(Object.getPrototypeOf(u)),S=t(_,{deleteProperty(D,C){const k=Reflect.get(D,C);E(C);const y=Reflect.deleteProperty(D,C);return y&&p(["delete",[C],k]),y},set(D,C,k,y){var x;const I=Reflect.has(D,C),B=Reflect.get(D,C,y);if(I&&(e(B,k)||o.has(k)&&e(B,o.get(k))))return!0;E(C),ir(k)&&(k=$c(k)||k);let L=k;if(!((x=Object.getOwnPropertyDescriptor(D,C))!=null&&x.set))if(k instanceof Promise)k.then(N=>{Object.assign(k,{status:"fulfilled",value:N}),p(["resolve",[C],N])}).catch(N=>{Object.assign(k,{status:"rejected",reason:N}),p(["reject",[C],N])});else{!Ot.has(k)&&n(k)&&(L=da(k));const N=!fn.has(L)&&Ot.get(L);N&&v(C,N)}return Reflect.set(D,C,L,y),p(["set",[C],k,B]),!0}});o.set(u,S);const X=[_,g,a,T];return Ot.set(S,X),Reflect.ownKeys(u).forEach(D=>{const C=Object.getOwnPropertyDescriptor(u,D);C.get||C.set?Object.defineProperty(_,D,C):S[D]=u[D]}),S})=>[l,Ot,fn,e,t,n,i,r,a,o,s],[Xc]=Gc();function da(e={}){return Xc(e)}function Pr(e,t,n){const i=Ot.get(e);let r;const a=[],o=i[3];let s=!1;const l=o(u=>{if(a.push(u),n){t(a.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,s&&t(a.splice(0))}))});return s=!0,()=>{s=!1,l()}}function Rt(e,t){const n=Ot.get(e),[i,r,a]=n;return a(i,r(),t)}function Xa(e){return fn.add(e),e}function Yc(e,t){Object.keys(t).forEach(i=>{if(Object.getOwnPropertyDescriptor(e,i))throw new Error("object property already defined");const r=t[i],{get:a,set:o}=typeof r=="function"?{get:r}:r,s={};s.get=()=>a(Rt(n)),o&&(s.set=l=>o(n,l)),Object.defineProperty(e,i,s)});const n=da(e);return n}function Kc(e){for(;e.length>0;)e.pop();return e}var Ya=e=>e?.constructor.name==="Array",Zc=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0},vt=(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(Ya(e)&&Ya(t))return Zc(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),i=n.length;for(let r=0;r<i;r++)if(!Reflect.has(e,n[r]))return!1;for(let r=0;r<i;r++){const a=n[r];if(!vt(e[a],t[a]))return!1}return!0},Ka=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,nt=e=>e,Jc=()=>{},Za=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},Ja=(()=>{let e=0;return()=>(e++,e.toString(36))})(),bi=e=>Array.isArray(e),Ts=e=>e!=null&&typeof e=="object",ri=e=>Ts(e)&&!bi(e),Qc=e=>typeof e=="number"&&!Number.isNaN(e),je=e=>typeof e=="string",Fn=e=>typeof e=="function",Is=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ed=e=>Object.prototype.toString.call(e),Fs=Function.prototype.toString,td=Fs.call(Object),nd=e=>{if(!Ts(e)||ed(e)!="[object Object]")return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Is(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Fs.call(n)==td};function lt(e){if(!id(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(i=>typeof i=="string"),n={};for(const i of t){const r=e[i];r!==void 0&&(n[i]=lt(r))}return n}var id=e=>e&&typeof e=="object"&&e.constructor===Object;function ai(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function oi(...e){const t=e.length===1?e[0]:e[1];e.length!==2||e[0]}function Qa(e,t,n){typeof n.value=="object"&&(n.value=Qt(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Qt(e){if(typeof e!="object")return e;var t=0,n,i,r,a=Object.prototype.toString.call(e);if(a==="[object Object]"?r=Object.create(e.__proto__||null):a==="[object Array]"?r=Array(e.length):a==="[object Set]"?(r=new Set,e.forEach(function(o){r.add(Qt(o))})):a==="[object Map]"?(r=new Map,e.forEach(function(o,s){r.set(Qt(s),Qt(o))})):a==="[object Date]"?r=new Date(+e):a==="[object RegExp]"?r=new RegExp(e.source,e.flags):a==="[object DataView]"?r=new e.constructor(Qt(e.buffer)):a==="[object ArrayBuffer]"?r=e.slice(0):a.slice(-6)==="Array]"&&(r=new e.constructor(e)),r){for(i=Object.getOwnPropertySymbols(e);t<i.length;t++)Qa(r,i[t],Object.getOwnPropertyDescriptor(e,i[t]));for(t=0,i=Object.getOwnPropertyNames(e);t<i.length;t++)Object.hasOwnProperty.call(r,n=i[t])&&r[n]===e[n]||Qa(r,n,Object.getOwnPropertyDescriptor(e,n))}return r||e}var rd=Object.defineProperty,ad=(e,t,n)=>t in e?rd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t,n)=>ad(e,typeof t!="symbol"?t+"":t,n);function Ds(e,...t){for(const n of t){const i=lt(n);for(const r in i)nd(n[r])?(e[r]||(e[r]={}),Ds(e[r],n[r])):e[r]=n[r]}return e}function eo(e){return Qt(e)}function Ve(e){return je(e)?{type:e}:e}function ht(e){return e?bi(e)?e.slice():[e]:[]}function Os(e){return ri(e)&&e.predicate!=null}var od=()=>!0;function ha(e,t,n,i){return r=>{var a;return je(r)?!!((a=e[r])!=null&&a.call(e,t,n,i)):Fn(r)?r(t,n,i):r.predicate(e)(t,n,i)}}function sd(...e){return{predicate:t=>(n,i,r)=>e.map(ha(t,n,i,r)).some(Boolean)}}function ld(...e){return{predicate:t=>(n,i,r)=>e.map(ha(t,n,i,r)).every(Boolean)}}function ud(e){return{predicate:t=>(n,i,r)=>!ha(t,n,i,r)(e)}}function cd(...e){return(t,n,i)=>i.state.matches(...e)}var pa={or:sd,and:ld,not:ud,stateIn:cd};function Ps(e,t){return e=e??od,(n,i,r)=>{if(je(e)){const a=t[e];return Fn(a)?a(n,i,r):a}return Os(e)?e.predicate(t)(n,i,r):e?.(n,i,r)}}function rr(e,t){return(n,i,r)=>Os(e)?e.predicate(t)(n,i,r):e}function dd(e){var t,n;const i=e.computed??nt({}),r=e.context??nt({}),a=e.initial?(n=(t=e.states)==null?void 0:t[e.initial])==null?void 0:n.tags:[],o=da({value:e.initial??"",previousValue:"",event:nt({}),previousEvent:nt({}),context:Yc(r,i),done:!1,tags:a??[],hasTag(s){return this.tags.includes(s)},matches(...s){return s.includes(this.value)},can(s){return nt(this).nextEvents.includes(s)},get nextEvents(){var s,l;const u=((l=(s=e.states)==null?void 0:s[this.value])==null?void 0:l.on)??{},c=e?.on??{};return Object.keys({...u,...c})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return nt(o)}function hn(e,t){return(n,i)=>{if(Qc(e))return e;if(Fn(e))return e(n,i);if(je(e)){const r=Number.parseFloat(e);if(!Number.isNaN(r))return r;if(t){const a=t?.[e];return oi(a==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${e}\`. It doesn't exist in \`options.delays\``),Fn(a)?a(n,i):a}}}}function hd(e){return je(e)?{target:e}:e}function pd(e,t){return(n,i,r)=>ht(e).map(hd).find(a=>Ps(a.guard,t)(n,i,r)??a.target??a.actions)}var fd=class{constructor(e,t){var n,i,r,a,o;F(this,"status","Not Started"),F(this,"state"),F(this,"initialState"),F(this,"initialContext"),F(this,"id"),F(this,"type","machine"),F(this,"activityEvents",new Map),F(this,"delayedEvents",new Map),F(this,"stateListeners",new Set),F(this,"doneListeners",new Set),F(this,"contextWatchers",new Set),F(this,"removeStateListener",Jc),F(this,"parent"),F(this,"children",new Map),F(this,"guardMap"),F(this,"actionMap"),F(this,"delayMap"),F(this,"activityMap"),F(this,"sync"),F(this,"options"),F(this,"config"),F(this,"_created",()=>{var s;const l=Ve("machine.created");this.executeActions((s=this.config)==null?void 0:s.created,l)}),F(this,"start",s=>{if(this.state.value="",this.state.tags=[],this.status==="Running")return this;this.status="Running",this.removeStateListener=Pr(this.state,()=>{this.stateListeners.forEach(p=>{p(this.stateSnapshot)})},this.sync),this.setupContextWatchers(),this.executeActivities(Ve("machine.start"),ht(this.config.activities),"machine.start"),this.executeActions(this.config.entry,Ve("machine.start"));const l=Ve("machine.init"),u=ri(s)?s.value:s,c=ri(s)?s.context:void 0;c&&this.setContext(c);const d={target:u??this.config.initial},h=this.getNextStateInfo(d,l);return this.initialState=h,this.performStateChangeEffects(this.state.value,h,l),this}),F(this,"setupContextWatchers",()=>{const{watch:s}=this.config;if(!s)return;let l=Rt(this.state.context);const u=Pr(this.state.context,()=>{var c;const d=Rt(this.state.context);for(const[h,p]of Object.entries(s))(((c=this.options.compareFns)==null?void 0:c[h])??Object.is)(l[h],d[h])||this.executeActions(p,this.state.event);l=d});this.contextWatchers.add(u)}),F(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,Ve("machine.stop")),this.executeActions(this.config.exit,Ve("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.status="Stopped",this}),F(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),F(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(s=>s()),this.contextWatchers.clear()}),F(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(s=>{s.forEach(l=>l())}),this.delayedEvents.clear()}),F(this,"stopActivities",s=>{var l,u;s?((l=this.activityEvents.get(s))==null||l.forEach(c=>c()),(u=this.activityEvents.get(s))==null||u.clear(),this.activityEvents.delete(s)):(this.activityEvents.forEach(c=>{c.forEach(d=>d()),c.clear()}),this.activityEvents.clear())}),F(this,"sendChild",(s,l)=>{const u=Ve(s),c=Ka(l,this.contextSnapshot),d=this.children.get(c);d||oi(`[@zag-js/core] Cannot send '${u.type}' event to unknown child`),d.send(u)}),F(this,"stopChild",s=>{this.children.has(s)||oi(`[@zag-js/core > stop-child] Cannot stop unknown child ${s}`),this.children.get(s).stop(),this.children.delete(s)}),F(this,"removeChild",s=>{this.children.delete(s)}),F(this,"stopChildren",()=>{this.children.forEach(s=>s.stop()),this.children.clear()}),F(this,"setParent",s=>{this.parent=s}),F(this,"spawn",(s,l)=>{const u=Ka(s);return l&&(u.id=l),u.type="machine.actor",u.setParent(this),this.children.set(u.id,nt(u)),u.onDone(()=>{this.removeChild(u.id)}).start(),nt(Xa(u))}),F(this,"stopActivity",s=>{var l;if(!this.state.value)return;const u=this.activityEvents.get(this.state.value);(l=u?.get(s))==null||l(),u?.delete(s)}),F(this,"addActivityCleanup",(s,l,u)=>{var c;s&&(this.activityEvents.has(s)?(c=this.activityEvents.get(s))==null||c.set(l,u):this.activityEvents.set(s,new Map([[l,u]])))}),F(this,"setState",s=>{this.state.previousValue=this.state.value,this.state.value=s;const l=this.getStateNode(s);s==null?Kc(this.state.tags):this.state.tags=ht(l?.tags)}),F(this,"setContext",s=>{s&&Ds(this.state.context,lt(s))}),F(this,"setOptions",s=>{const l=lt(s);this.actionMap={...this.actionMap,...l.actions},this.delayMap={...this.delayMap,...l.delays},this.activityMap={...this.activityMap,...l.activities},this.guardMap={...this.guardMap,...l.guards}}),F(this,"getStateNode",s=>{var l;if(s)return(l=this.config.states)==null?void 0:l[s]}),F(this,"getNextStateInfo",(s,l)=>{const u=this.determineTransition(s,l),c=!(u!=null&&u.target),d=u?.target??this.state.value,h=this.state.value!==d,p=this.getStateNode(d),f={reenter:!c&&!h&&!(u!=null&&u.internal),transition:u,stateNode:p,target:d,changed:h};return this.log("NextState:",`[${l.type}]`,this.state.value,"---->",f.target),f}),F(this,"getAfterActions",(s,l)=>{let u;const c=this.state.value;return{entry:()=>{u=globalThis.setTimeout(()=>{const d=this.getNextStateInfo(s,this.state.event);this.performStateChangeEffects(c,d,this.state.event)},l)},exit:()=>{globalThis.clearTimeout(u)}}}),F(this,"getDelayedEventActions",s=>{const l=this.getStateNode(s),u=this.state.event;if(!l||!l.after)return;const c=[],d=[];if(bi(l.after)){const h=this.determineTransition(l.after,u);if(!h)return;if(!Is(h,"delay"))throw new Error(`[@zag-js/core > after] Delay is required for after transition: ${JSON.stringify(h)}`);const p=hn(h.delay,this.delayMap)(this.contextSnapshot,u),f=this.getAfterActions(h,p);return c.push(f.entry),d.push(f.exit),{entries:c,exits:d}}if(ri(l.after))for(const h in l.after){const p=l.after[h],f=hn(h,this.delayMap)(this.contextSnapshot,u),g=this.getAfterActions(p,f);c.push(g.entry),d.push(g.exit)}return{entries:c,exits:d}}),F(this,"executeActions",(s,l)=>{var u;const c=rr(s,this.guardMap)(this.contextSnapshot,l,this.guardMeta);for(const d of ht(c)){const h=je(d)?(u=this.actionMap)==null?void 0:u[d]:d;ai(je(d)&&!h,`[@zag-js/core > execute-actions] No implementation found for action: \`${d}\``),h?.(this.state.context,l,this.meta)}}),F(this,"executeActivities",(s,l,u)=>{var c;for(const d of l){const h=je(d)?(c=this.activityMap)==null?void 0:c[d]:d;if(!h){ai(`[@zag-js/core > execute-activity] No implementation found for activity: \`${d}\``);continue}const p=h(this.state.context,s,this.meta);if(p){const f=je(d)?d:d.name||Ja();this.addActivityCleanup(u??this.state.value,f,p)}}}),F(this,"createEveryActivities",(s,l)=>{if(s)if(bi(s)){const u=ht(s).find(d=>{const h=d.delay,p=hn(h,this.delayMap)(this.contextSnapshot,this.state.event);return Ps(d.guard,this.guardMap)(this.contextSnapshot,this.state.event,this.guardMeta)??p!=null});if(!u)return;const c=hn(u.delay,this.delayMap)(this.contextSnapshot,this.state.event);l(()=>{const d=globalThis.setInterval(()=>{this.executeActions(u.actions,this.state.event)},c);return()=>{globalThis.clearInterval(d)}})}else for(const u in s){const c=s?.[u],d=hn(u,this.delayMap)(this.contextSnapshot,this.state.event);l(()=>{const h=globalThis.setInterval(()=>{this.executeActions(c,this.state.event)},d);return()=>{globalThis.clearInterval(h)}})}}),F(this,"setEvent",s=>{this.state.previousEvent=this.state.event,this.state.event=Xa(Ve(s))}),F(this,"performExitEffects",(s,l)=>{const u=this.state.value;if(u==="")return;const c=s?this.getStateNode(s):void 0;this.stopActivities(u);const d=rr(c?.exit,this.guardMap)(this.contextSnapshot,l,this.guardMeta),h=ht(d),p=this.delayedEvents.get(u);p&&h.push(...p),this.executeActions(h,l),this.delayedEvents.delete(u)}),F(this,"performEntryEffects",(s,l)=>{const u=this.getStateNode(s),c=ht(u?.activities);this.createEveryActivities(u?.every,f=>{c.unshift(f)}),c.length>0&&this.executeActivities(l,c);const d=rr(u?.entry,this.guardMap)(this.contextSnapshot,l,this.guardMeta),h=ht(d),p=this.getDelayedEventActions(s);u!=null&&u.after&&p&&(this.delayedEvents.set(s,p?.exits),h.push(...p.entries)),this.executeActions(h,l),u?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(f=>{f(this.stateSnapshot)}),this.stop())}),F(this,"performTransitionEffects",(s,l)=>{const u=this.determineTransition(s,l);this.executeActions(u?.actions,l)}),F(this,"performStateChangeEffects",(s,l,u)=>{this.setEvent(u);const c=l.changed||l.reenter;c&&this.performExitEffects(s,u),this.performTransitionEffects(l.transition,u),this.setState(l.target),c&&this.performEntryEffects(l.target,u)}),F(this,"determineTransition",(s,l)=>{const u=pd(s,this.guardMap);return u?.(this.contextSnapshot,l,this.guardMeta)}),F(this,"sendParent",s=>{var l;this.parent||oi("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const u=Ve(s);(l=this.parent)==null||l.send(u)}),F(this,"log",(...s)=>{}),F(this,"send",s=>{const l=Ve(s);this.transition(this.state.value,l)}),F(this,"transition",(s,l)=>{var u,c;const d=je(s)?this.getStateNode(s):s?.stateNode,h=Ve(l);if(!d&&!this.config.on){const g=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${s}, \`event\`: ${h.type}`;ai(g);return}const p=((u=d?.on)==null?void 0:u[h.type])??((c=this.config.on)==null?void 0:c[h.type]),f=this.getNextStateInfo(p,h);return this.performStateChangeEffects(this.state.value,f,h),f.stateNode}),F(this,"subscribe",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),()=>{this.stateListeners.delete(s)})),F(this,"onDone",s=>(this.doneListeners.add(s),this)),F(this,"onTransition",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),this)),this.config=eo(e),this.options=eo(t??{}),this.id=this.config.id??`machine-${Ja()}`,this.guardMap=((n=this.options)==null?void 0:n.guards)??{},this.actionMap=((i=this.options)==null?void 0:i.actions)??{},this.delayMap=((r=this.options)==null?void 0:r.delays)??{},this.activityMap=((a=this.options)==null?void 0:a.activities)??{},this.sync=((o=this.options)==null?void 0:o.sync)??!1,this.state=dd(this.config),this.initialContext=Rt(this.state.context)}get stateSnapshot(){return nt(Rt(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){var t;return((t=e.initialState)==null?void 0:t.target)??""}}}get meta(){var e;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((e=this.initialState)==null?void 0:e.target)??"",getState:()=>this.stateSnapshot,getAction:t=>this.actionMap[t],getGuard:t=>this.guardMap[t]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}getHydrationState(){const e=this.getState();return{value:e.value,tags:e.tags}}},Mn=(e,t)=>new fd(e,t),en="default",Rr="",si=new WeakMap;function gd(e={}){const{target:t,doc:n}=e,i=n??document,r=i.documentElement;return sa()?(en==="default"&&(Rr=r.style.webkitUserSelect,r.style.webkitUserSelect="none"),en="disabled"):t&&(si.set(t,t.style.userSelect),t.style.userSelect="none"),()=>md({target:t,doc:i})}function md(e={}){const{target:t,doc:n}=e,i=(n??document).documentElement;if(sa()){if(en!=="disabled")return;en="restoring",setTimeout(()=>{la(()=>{en==="restoring"&&(i.style.webkitUserSelect==="none"&&(i.style.webkitUserSelect=Rr||""),Rr="",en="default")})},300)}else if(t&&si.has(t)){const r=si.get(t);t.style.userSelect==="none"&&(t.style.userSelect=r??""),t.getAttribute("style")===""&&t.removeAttribute("style"),si.delete(t)}}function vd(e={}){const{defer:t,target:n,...i}=e,r=t?Et:o=>o(),a=[];return a.push(r(()=>{const o=typeof n=="function"?n():n;a.push(gd({...i,target:o}))})),()=>{a.forEach(o=>o?.())}}var _e=(e,t,n,i)=>{const r=typeof e=="function"?e():e;return r?.addEventListener(t,n,i),()=>{r?.removeEventListener(t,n,i)}},bd=e=>e.button===0,yd=e=>e.button===2||xs()&&e.ctrlKey&&e.button===0,xd=e=>e.ctrlKey||e.altKey||e.metaKey;function to(e,t,n){if(!e)return;const i=e.ownerDocument.defaultView||window,r=new i.CustomEvent(t,n);return e.dispatchEvent(r)}var kd={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},no={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Ed(e,t={}){const{dir:n="ltr",orientation:i="horizontal"}=t;let{key:r}=e;return r=kd[r]??r,n==="rtl"&&i==="horizontal"&&r in no&&(r=no[r]),r}function _d(e,t="client"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function wd(e,t="client"){return{x:e[`${t}X`],y:e[`${t}Y`]}}var Cd=e=>"touches"in e&&e.touches.length>0;function fa(e,t="client"){return Cd(e)?_d(e,t):wd(e,t)}var Ad=new Set(["PageUp","PageDown"]),Sd=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function Td(e){return e.ctrlKey||e.metaKey?.1:Ad.has(e.key)||e.shiftKey&&Sd.has(e.key)?10:1}function io(e){return Math.max(0,Math.min(1,e))}function Id(e,t){const{left:n,top:i,width:r,height:a}=t.getBoundingClientRect(),o={x:e.x-n,y:e.y-i},s={x:io(o.x/r),y:io(o.y/a)};function l(u={}){const{dir:c="ltr",orientation:d="horizontal",inverted:h}=u,p=typeof h=="object"?h.x:h,f=typeof h=="object"?h.y:h;return d==="horizontal"?c==="rtl"||p?1-s.x:s.x:f?1-s.y:s.y}return{offset:o,percent:s,getPercentValue:l}}function Fd(e,t){const{onPointerMove:n,onPointerUp:i}=t,r=[],a=[_e(e,"pointermove",o=>{const s=fa(o);r.push({...s,timestamp:performance.now()});const l=Math.sqrt(s.x**2+s.y**2),u=o.pointerType==="touch"?10:5;if(!(l<u)){if(o.pointerType==="mouse"&&o.button===0){i();return}n({point:s,event:o,velocity:Rd(r,.1)})}},!1),_e(e,"pointerup",i,!1),_e(e,"pointercancel",i,!1),_e(e,"contextmenu",i,!1),vd({doc:e})];return()=>{a.forEach(o=>o()),r.length=0}}function Dd(e){return e[e.length-1]}function Od(e){return e*1e3}function Pd(e){return e/1e3}function Rd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=Dd(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Od(t)));)n--;if(!i)return{x:0,y:0};const a=Pd(r.timestamp-i.timestamp);if(a===0)return{x:0,y:0};const o={x:(r.x-i.x)/a,y:(r.y-i.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),{x:Math.abs(o.x),y:Math.abs(o.y)}}var ar=(...e)=>t=>e.reduce((n,i)=>i(n),t),qn=()=>{};function Rs(e){const{pointerNode:t,keyboardNode:n=t,onPress:i,onPressStart:r,onPressEnd:a,isValidKey:o=v=>v.key==="Enter"}=e;if(!t)return qn;const s=ot(t),l=Ze(t);let u=qn,c=qn,d=qn;const h=v=>({point:fa(v),event:v});function p(v){r?.(h(v))}function f(v){a?.(h(v))}const g=_e(t,"pointerdown",v=>{c();const E=_e(s,"pointerup",_=>{const S=st(_);Tn(t,S)?i?.(h(_)):a?.(h(_))},{passive:!i}),T=_e(s,"pointercancel",f,{passive:!a});c=ar(E,T),l.activeElement===n&&v.pointerType==="mouse"&&v.preventDefault(),p(v)},{passive:!r}),m=_e(n,"focus",b);u=ar(g,m);function b(){const v=S=>{if(!o(S))return;const X=C=>{if(!o(C))return;const k=new s.PointerEvent("pointerup"),y=h(k);i?.(y),a?.(y)};c(),c=_e(n,"keyup",X);const D=new s.PointerEvent("pointerdown");p(D)},E=()=>{const S=new s.PointerEvent("pointercancel");f(S)},T=_e(n,"keydown",v),_=_e(n,"blur",E);d=ar(T,_)}return function(){u(),c(),d()}}var ga=e=>e.ownerDocument.defaultView||window;function Ms(e,t){const{type:n="HTMLInputElement",property:i="value"}=t,r=ga(e)[n].prototype;return Object.getOwnPropertyDescriptor(r,i)??{}}function Md(e,t,n={}){var i;(i=Ms(e,n).set)==null||i.call(e,t),e.setAttribute("value",t)}function Vs(e,t){var n;(n=Ms(e,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked")}function Vd(e,t){const{value:n,bubbles:i=!0}=t;if(!e)return;const r=ga(e);e instanceof r.HTMLInputElement&&(Md(e,`${n}`),e.dispatchEvent(new r.Event("input",{bubbles:i})))}function ma(e,t){const{checked:n,bubbles:i=!0}=t;if(!e)return;const r=ga(e);e instanceof r.HTMLInputElement&&(Vs(e,n),e.dispatchEvent(new r.Event("click",{bubbles:i})))}function Bd(e){return Ld(e)?e.form:e.closest("form")}function Ld(e){return e.matches("textarea, input, select, button")}function Nd(e,t){if(!e)return;const n=Bd(e);return n?.addEventListener("reset",t,{passive:!0}),()=>{n?.removeEventListener("reset",t)}}function jd(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const i=n.ownerDocument.defaultView||window,r=new i.MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>r.disconnect()}function Ni(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:i}=t,r=[Nd(e,i),jd(e,n)];return()=>{r.forEach(a=>a?.())}}function $d(e){return new Proxy({},{get(){return e}})}var qt=()=>e=>Array.from(new Set(e)),zd=mt("checkbox").parts("root","label","control","indicator"),Un=zd.build(),me=Rn({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`checkbox:${e.id}`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`checkbox:${e.id}:label`},getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`checkbox:${e.id}:control`},getHiddenInputId:e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`checkbox:${e.id}:input`},getRootEl:e=>me.getById(e,me.getRootId(e)),getHiddenInputEl:e=>me.getById(e,me.getHiddenInputId(e))});function Hd(e,t,n){const i=e.context.isDisabled,r=e.context.readOnly,a=!i&&e.context.focused,o=!i&&e.context.focusVisible,s=e.context.isChecked,l=e.context.isIndeterminate,u={"data-active":R(e.context.active),"data-focus":R(a),"data-focus-visible":R(o),"data-readonly":R(r),"data-hover":R(e.context.hovered),"data-disabled":R(i),"data-state":l?"indeterminate":e.context.checked?"checked":"unchecked","data-invalid":R(e.context.invalid)};return{checked:s,disabled:i,indeterminate:l,focused:a,checkedState:e.context.checked,setChecked(c){t({type:"CHECKED.SET",checked:c,isTrusted:!1})},toggleChecked(){t({type:"CHECKED.TOGGLE",checked:s,isTrusted:!1})},getRootProps(){return n.label({...Un.root.attrs,...u,dir:e.context.dir,id:me.getRootId(e.context),htmlFor:me.getHiddenInputId(e.context),onPointerMove(){i||t({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){i||t({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(c){st(c)===me.getHiddenInputEl(e.context)&&c.stopPropagation()}})},getLabelProps(){return n.element({...Un.label.attrs,...u,dir:e.context.dir,id:me.getLabelId(e.context)})},getControlProps(){return n.element({...Un.control.attrs,...u,dir:e.context.dir,id:me.getControlId(e.context),"aria-hidden":!0})},getIndicatorProps(){return n.element({...Un.indicator.attrs,...u,dir:e.context.dir,hidden:!l&&!e.context.checked})},getHiddenInputProps(){return n.input({id:me.getHiddenInputId(e.context),type:"checkbox",required:e.context.required,defaultChecked:s,disabled:i,"aria-labelledby":me.getLabelId(e.context),"aria-invalid":e.context.invalid,name:e.context.name,form:e.context.form,value:e.context.value,style:ua,onFocus(){const c=In();t({type:"CONTEXT.SET",context:{focused:!0,focusVisible:c}})},onBlur(){t({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(c){if(r){c.preventDefault();return}const d=c.currentTarget.checked;t({type:"CHECKED.SET",checked:d,isTrusted:!0})}})}}}var{not:ro}=pa;function qd(e){const t=lt(e);return Mn({id:"checkbox",initial:"ready",context:{checked:!1,value:"on",disabled:!1,...t,fieldsetDisabled:!1,focusVisible:!1},watch:{disabled:"removeFocusIfNeeded",checked:"syncInputElement"},activities:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:ro("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:ro("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},computed:{isIndeterminate:n=>Mr(n.checked),isChecked:n=>ao(n.checked),isDisabled:n=>!!n.disabled||n.fieldsetDisabled},states:{ready:{}}},{guards:{isTrusted:(n,i)=>!!i.isTrusted},activities:{trackPressEvent(n){if(!n.isDisabled)return Rs({pointerNode:me.getRootEl(n),keyboardNode:me.getHiddenInputEl(n),isValidKey:i=>i.key===" ",onPress:()=>n.active=!1,onPressStart:()=>n.active=!0,onPressEnd:()=>n.active=!1})},trackFocusVisible(n){if(!n.isDisabled)return ca({root:me.getRootNode(n)})},trackFormControlState(n,i,{send:r,initialContext:a}){return Ni(me.getHiddenInputEl(n),{onFieldsetDisabledChange(o){n.fieldsetDisabled=o},onFormReset(){r({type:"CHECKED.SET",checked:!!a.checked})}})}},actions:{setContext(n,i){Object.assign(n,i.context)},syncInputElement(n){const i=me.getHiddenInputEl(n);i&&(Vs(i,n.isChecked),i.indeterminate=n.isIndeterminate)},removeFocusIfNeeded(n){n.disabled&&n.focused&&(n.focused=!1,n.focusVisible=!1)},setChecked(n,i){oo.checked(n,i.checked)},toggleChecked(n){const i=Mr(n.checked)?!0:!n.checked;oo.checked(n,i)},dispatchChangeEvent(n){const i=me.getHiddenInputEl(n);ma(i,{checked:ao(n.checked)})}}})}function Mr(e){return e==="indeterminate"}function ao(e){return Mr(e)?!1:!!e}var Ud={change:e=>{var t;(t=e.onCheckedChange)==null||t.call(e,{checked:e.checked})}},oo={checked:(e,t)=>{vt(e.checked,t)||(e.checked=t,Ud.change(e))}};qt()(["checked","dir","disabled","form","getRootNode","id","ids","invalid","name","onCheckedChange","readOnly","required","value"]);function Wd(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var so={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"};function Gd(e){return e in so?so[e]:e.startsWith("on")?`on${Wd(e.substr(2))}`:e.toLowerCase()}var Vn=$d(e=>{const t={};for(const n in e){const i=e[n];n==="children"?typeof i=="string"&&(t.innerHTML=i):t[Gd(n)]=e[n]}return t});function Xd(e,t){const{actions:n,context:i}=t??{},r=Hl(e.state),a=Pr(e.state,()=>{r.value=Rt(e.state)});return Go(()=>{a?.()}),Xo(()=>{e.setOptions({actions:n})}),i&&Ce(i,o=>{e.setContext(re(o))},{deep:!0}),r}function Yd(e,t){const{state:n,context:i}=t??{},r=typeof e=="function"?e():e;return i&&r.setContext(re(i)),r._created(),zt(()=>{r.start(n),Jr(()=>{r.stop()})}),r}function Bn(e,t){const n=Yd(e,t);return[Xd(n,t),n.send,n]}function _t(e={}){const{prefix:t}=e,n=ec();return t?`${t}-${n}`:n}const Kd={key:0,class:"k-checkbox__help"},lo=oe({__name:"Checkbox",props:{modelValue:{type:[Boolean,Array]},value:{},label:{},disabled:{type:Boolean},required:{type:Boolean},help:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;if(n.modelValue instanceof Array&&!n.value)throw new Error("props.value is required if props.modelValue is an array");const i=t,r=()=>{const{modelValue:c,value:d}=n;return c instanceof Array?c.some(h=>$n(h)===$n(d)):!!c};function a(c){const{modelValue:d,value:h}=n;if(!(d instanceof Array))return i("update:modelValue",typeof c=="boolean"?c:void 0);if(!(typeof c!="boolean"||!h))return c?i("update:modelValue",[...d,h]):i("update:modelValue",d.filter(p=>$n(p)!==$n(h)))}const o={id:_t(),checked:r(),onCheckedChange:({checked:c})=>{if(r()!==c)return a(c)}},[s,l]=Bn(qd(o),{context:U(()=>({disabled:n.disabled,required:n.required}))}),u=U(()=>Hd(s.value,l,Vn));return Ce(()=>n.modelValue,()=>{const c=r();if(u.value.checked!==c)return u.value.setChecked(c)}),(c,d)=>(A(),P("label",te({class:"k-checkbox"},u.value.getRootProps()),[ee("div",ye(Ie(u.value.getControlProps())),[u.value.checked?(A(),ue(re(Vt),{key:0,icon:"fa-pro-solid:check"})):W("",!0)],16),ee("span",ye(Ie(u.value.getLabelProps())),[ee("span",{class:Oe(["k-checkbox__label",{"k-checkbox__label-required":c.required}])},[z(c.$slots,"default",{},()=>[$e(de(c.label),1)])],2),c.$slots.help||c.help?(A(),P("span",Kd,[z(c.$slots,"help",{},()=>[$e(de(c.help),1)])])):W("",!0)],16),ee("input",ye(Ie(u.value.getHiddenInputProps())),null,16)],16))}}),va=Symbol("form-control"),Zd={class:"k-formcontrol"},Jd=["for"],Qd={key:1,class:"k-formcontrol__error"},eh={key:2,class:"k-formcontrol__help"},Em=oe({__name:"FormControl",props:{label:{},help:{},error:{},required:{type:Boolean}},emits:["blur","focus"],setup(e,{emit:t}){const n=e,i=t,r=_t({prefix:"k-formcontrol"}),a=U(()=>`${r}_label`),o=U(()=>`${r}_help`),s={onBlur:()=>i("blur"),onFocus:()=>i("focus")};return Vl(va,U(()=>({...n,id:r,labelId:a.value,helpId:o.value,invalid:!!n.error,required:n.required,events:s}))),(l,u)=>(A(),P("div",Zd,[l.$slots.label||l.label?(A(),P("label",{key:0,class:Oe(["k-formcontrol__label",{"k-formcontrol__label-required":l.required}]),for:re(r)},[z(l.$slots,"label",{},()=>[$e(de(l.label),1)])],10,Jd)):W("",!0),z(l.$slots,"default",{id:re(r)}),l.$slots.error||l.error?(A(),P("span",Qd,[z(l.$slots,"error",{},()=>[$e(de(l.error),1)])])):W("",!0),l.$slots.help||l.help?(A(),P("span",eh,[z(l.$slots,"help",{},()=>[$e(de(l.help),1)])])):W("",!0)]))}});function bt(e){return typeof e=="string"||e instanceof String}function uo(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function Bs(e,t){return Array.isArray(t)?Bs(e,(n,i)=>t.includes(i)):Object.entries(e).reduce((n,i)=>{let[r,a]=i;return t(a,r)&&(n[r]=a),n},{})}const O={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function th(e){switch(e){case O.LEFT:return O.FORCE_LEFT;case O.RIGHT:return O.FORCE_RIGHT;default:return e}}function or(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function yi(e,t){if(t===e)return!0;const n=Array.isArray(t),i=Array.isArray(e);let r;if(n&&i){if(t.length!=e.length)return!1;for(r=0;r<t.length;r++)if(!yi(t[r],e[r]))return!1;return!0}if(n!=i)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){const a=t instanceof Date,o=e instanceof Date;if(a&&o)return t.getTime()==e.getTime();if(a!=o)return!1;const s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;const u=Object.keys(t);for(r=0;r<u.length;r++)if(!Object.prototype.hasOwnProperty.call(e,u[r]))return!1;for(r=0;r<u.length;r++)if(!yi(e[u[r]],t[u[r]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}class nh{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?O.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?O.RIGHT:O.LEFT}}function j(e,t){return new j.InputMask(e,t)}function Ls(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?j.MaskedRegExp:bt(e)?j.MaskedPattern:e===Date?j.MaskedDate:e===Number?j.MaskedNumber:Array.isArray(e)||e===Array?j.MaskedDynamic:j.Masked&&e.prototype instanceof j.Masked?e:j.Masked&&e instanceof j.Masked?e.constructor:e instanceof Function?j.MaskedFunction:(console.warn("Mask not found for mask",e),j.Masked)}function Dn(e){if(!e)throw new Error("Options in not defined");if(j.Masked){if(e.prototype instanceof j.Masked)return{mask:e};const{mask:t=void 0,...n}=e instanceof j.Masked?{mask:e}:uo(e)&&e.mask instanceof j.Masked?e:{};if(t){const i=t.mask;return{...Bs(t,(r,a)=>!a.startsWith("_")),mask:t.constructor,_mask:i,...n}}}return uo(e)?{...e}:{mask:e}}function ut(e){if(j.Masked&&e instanceof j.Masked)return e;const t=Dn(e),n=Ls(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}j.createMask=ut;class ba{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,n){if(!(t==null||n==null||t===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(t,n)}catch{}}get isActive(){return!1}}j.MaskElement=ba;const co=90,ih=89;class ji extends ba{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,n,i;return(t=(n=(i=this.input).getRootNode)==null?void 0:n.call(i))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===co&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===ih&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===co&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}j.HTMLMaskElement=ji;class rh extends ji{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,n){this.input.setSelectionRange(t,n)}get value(){return this.input.value}set value(t){this.input.value=t}}j.HTMLMaskElement=ji;class Ns extends ji{get _unsafeSelectionStart(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),i=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||i==null||i<r?i:r}get _unsafeSelectionEnd(){const t=this.rootElement,n=t.getSelection&&t.getSelection(),i=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||i==null||i>r?i:r}_unsafeSelect(t,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t),i.setEnd(this.input.lastChild||this.input,n);const r=this.rootElement,a=r.getSelection&&r.getSelection();a&&(a.removeAllRanges(),a.addRange(i))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}j.HTMLContenteditableMaskElement=Ns;class $i{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>$i.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}$i.MAX_LENGTH=100;class ah{constructor(t,n){this.el=t instanceof ba?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new Ns(t):new rh(t),this.masked=ut(n),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new $i,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var n;return t==null||((n=this.masked)==null?void 0:n.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof j.Masked)&&this.masked.constructor===Ls(t)){this.masked.updateOptions({mask:t});return}const n=t instanceof j.Masked?t:ut({mask:t});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,n){const i=this._listeners[t];i&&i.forEach(r=>r(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const n=this.masked.unmaskedValue,i=this.masked.value,r=this.masked.rawInputValue,a=this.displayValue,o=this.unmaskedValue!==n||this.value!==i||this._rawInputValue!==r;this._unmaskedValue=n,this._value=i,this._rawInputValue=r,this.el.value!==a&&(this.el.value=a),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),o&&this._fireChangeEvents(),!this._historyChanging&&(o||this.history.isEmpty)&&this.history.push({unmaskedValue:n,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:n,...i}=t,r=!this.maskEquals(n),a=this.masked.optionsIsChanged(i);r&&(this.mask=n),a&&this.masked.updateOptions(i),(r||a)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,O.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,n){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(n),this}off(t,n){if(!this._listeners[t])return this;if(!n)return delete this._listeners[t],this;const i=this._listeners[t].indexOf(n);return i>=0&&this._listeners[t].splice(i,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const n=new nh({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),i=this.masked.rawInputValue,r=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=i===this.masked.rawInputValue?n.removeDirection:O.NONE;let o=this.masked.nearestInputPos(n.startChangePos+r,a);a!==O.NONE&&(o=this.masked.nearestInputPos(o,O.NONE)),this.updateControl(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}j.InputMask=ah;class q{static normalize(t){return Array.isArray(t)?t:[t,new q]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}j.ChangeDetails=q;class We{constructor(t,n,i){t===void 0&&(t=""),n===void 0&&(n=0),this.value=t,this.from=n,this.stop=i}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class xe{constructor(t){this._value="",this._update({...xe.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,n){n===void 0&&(n={input:!0}),this.reset(),this.append(t,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,n){return t}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-t)}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(t,n)}extractTail(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),new We(this.extractInput(t,n),t)}appendTail(t){return bt(t)&&(t=new We(String(t))),t.appendTo(this)}_appendCharRaw(t,n){return t?(this._value+=t,new q({inserted:t,rawInserted:t})):new q}_appendChar(t,n,i){n===void 0&&(n={});const r=this.state;let a;if([t,a]=this.doPrepareChar(t,n),t&&(a=a.aggregate(this._appendCharRaw(t,n)),!a.rawInserted&&this.autofix==="pad")){const o=this.state;this.state=r;let s=this.pad(n);const l=this._appendCharRaw(t,n);s=s.aggregate(l),l.rawInserted||s.equals(a)?a=s:this.state=o}if(a.inserted){let o,s=this.doValidate(n)!==!1;if(s&&i!=null){const l=this.state;if(this.overwrite===!0){o=i.state;for(let c=0;c<a.rawInserted.length;++c)i.unshift(this.displayValue.length-a.tailShift)}let u=this.appendTail(i);if(s=u.rawInserted.length===i.toString().length,!(s&&u.inserted)&&this.overwrite==="shift"){this.state=l,o=i.state;for(let c=0;c<a.rawInserted.length;++c)i.shift();u=this.appendTail(i),s=u.rawInserted.length===i.toString().length}s&&u.inserted&&(this.state=l)}s||(a=new q,this.state=r,i&&o&&(i.state=o))}return a}_appendPlaceholder(){return new q}_appendEager(){return new q}append(t,n,i){if(!bt(t))throw new Error("value should be string");const r=bt(i)?new We(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,n);for(let o=0;o<t.length;++o){const s=this._appendChar(t[o],n,r);if(!s.rawInserted&&!this.doSkipInvalid(t[o],n,r))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&t&&a.aggregate(this._appendEager()),r!=null&&(a.tailShift+=this.appendTail(r).tailShift),a}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(n),new q}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const n=this.rawInputValue,i=this.value,r=t();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&(this.append(i.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const n=this.state,i=t(this);return this.state=n,delete this._isolated,i}doSkipInvalid(t,n,i){return!!this.skipInvalid}doPrepare(t,n){return n===void 0&&(n={}),q.normalize(this.prepare?this.prepare(t,this,n):t)}doPrepareChar(t,n){return n===void 0&&(n={}),q.normalize(this.prepareChar?this.prepareChar(t,this,n):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,n,i,r,a){i===void 0&&(i=""),r===void 0&&(r=O.NONE),a===void 0&&(a={input:!0});const o=t+n,s=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let u;l&&(r=th(r),u=this.extractInput(0,o,{raw:!0}));let c=t;const d=new q;if(r!==O.NONE&&(c=this.nearestInputPos(t,n>1&&t!==0&&!l?O.NONE:r),d.tailShift=c-t),d.aggregate(this.remove(c)),l&&r!==O.NONE&&u===this.rawInputValue)if(r===O.FORCE_LEFT){let h;for(;u===this.rawInputValue&&(h=this.displayValue.length);)d.aggregate(new q({tailShift:-1})).aggregate(this.remove(h-1))}else r===O.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(i,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!yi(this,t)}typedValueEquals(t){const n=this.typedValue;return t===n||xe.EMPTY_VALUES.includes(t)&&xe.EMPTY_VALUES.includes(n)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new q}}xe.DEFAULTS={skipInvalid:!0};xe.EMPTY_VALUES=[void 0,null,""];j.Masked=xe;class Mt{constructor(t,n){t===void 0&&(t=[]),n===void 0&&(n=0),this.chunks=t,this.from=n}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=bt(t)?new We(String(t)):t;const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===t.stop||t.stop==null)&&t.from===n.from+n.toString().length;if(t instanceof We)i?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof Mt){if(t.stop==null){let r;for(;t.chunks.length&&t.chunks[0].stop==null;)r=t.chunks.shift(),r.from+=t.from,this.extend(r)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof j.MaskedPattern))return new We(this.toString()).appendTo(t);const n=new q;for(let i=0;i<this.chunks.length;++i){const r=this.chunks[i],a=t._mapPosToBlock(t.displayValue.length),o=r.stop;let s;if(o!=null&&(!a||a.index<=o)&&((r instanceof Mt||t._stops.indexOf(o)>=0)&&n.aggregate(t._appendPlaceholder(o)),s=r instanceof Mt&&t._blocks[o]),s){const l=s.appendTail(r);n.aggregate(l);const u=r.toString().slice(l.rawInserted.length);u&&n.aggregate(t.append(u,{tail:!0}))}else n.aggregate(t.append(r.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:n,...i}=t;Object.assign(this,i),this.chunks=n.map(r=>{const a="chunks"in r?new Mt:new We;return a.state=r,a})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const n=t!=null?t-this.from:t;let i=0;for(;i<this.chunks.length;){const r=this.chunks[i],a=r.unshift(n);if(r.toString()){if(!a)break;++i}else this.chunks.splice(i,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const n=this.chunks[t],i=n.shift();if(n.toString()){if(!i)break;--t}else this.chunks.splice(t,1);if(i)return i}return""}}class oh{constructor(t,n){this.masked=t,this._log=[];const{offset:i,index:r}=t._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,O.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,O.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,O.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,O.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,O.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,O.NONE),!0})}}class js{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(n),this._value||(this._isRawInput=!1),new q}nearestInputPos(t,n){n===void 0&&(n=O.NONE);const i=0,r=this._value.length;switch(n){case O.LEFT:case O.FORCE_LEFT:return i;case O.NONE:case O.RIGHT:case O.FORCE_RIGHT:default:return r}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),this._isRawInput?n-t:0}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this._value.length),i===void 0&&(i={}),i.raw&&this._isRawInput&&this._value.slice(t,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,n){if(n===void 0&&(n={}),this.isFilled)return new q;const i=this.eager===!0||this.eager==="append",r=this.char===t&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!i)&&!n.tail,a=new q({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(n.raw||n.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new q;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new We("")}appendTail(t){return bt(t)&&(t=new We(String(t))),t.appendTo(this)}append(t,n,i){const r=this._appendChar(t[0],n);return i!=null&&(r.tailShift+=this.appendTail(i).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}}class xi{constructor(t){const{parent:n,isOptional:i,placeholderChar:r,displayChar:a,lazy:o,eager:s,...l}=t;this.masked=ut(l),Object.assign(this,{parent:n,isOptional:i,placeholderChar:r,displayChar:a,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),t===0&&n>=1?(this.isFilled=!1,this.masked.remove(t,n)):new q}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,n){if(n===void 0&&(n={}),this.isFilled)return new q;const i=this.masked.state;let r=this.masked._appendChar(t,this.currentMaskFlags(n));return r.inserted&&this.doValidate(n)===!1&&(r=new q,this.masked.state=i),!r.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(t,n,i){return this.masked.append(t,this.currentMaskFlags(n),i)}_appendPlaceholder(){return this.isFilled||this.isOptional?new q:(this.isFilled=!0,new q({inserted:this.placeholderChar}))}_appendEager(){return new q}extractTail(t,n){return this.masked.extractTail(t,n)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.masked.extractInput(t,n,i)}nearestInputPos(t,n){n===void 0&&(n=O.NONE);const i=0,r=this.value.length,a=Math.min(Math.max(t,i),r);switch(n){case O.LEFT:case O.FORCE_LEFT:return this.isComplete?a:i;case O.RIGHT:case O.FORCE_RIGHT:return this.isComplete?a:r;case O.NONE:default:return a}}totalInputPositions(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.value.length),this.value.slice(t,n).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var n;return{...t,_beforeTailState:(t==null||(n=t._beforeTailState)==null?void 0:n.masked)||t?._beforeTailState}}pad(t){return new q}}xi.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class sh extends xe{updateOptions(t){super.updateOptions(t)}_update(t){const n=t.mask;n&&(t.validate=i=>i.search(n)>=0),super._update(t)}}j.MaskedRegExp=sh;class ke extends xe{constructor(t){super({...ke.DEFAULTS,...t,definitions:Object.assign({},xi.DEFAULT_DEFINITIONS,t?.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!t)return;let i=!1,r=!1;for(let a=0;a<n.length;++a){if(this.blocks){const u=n.slice(a),c=Object.keys(this.blocks).filter(h=>u.indexOf(h)===0);c.sort((h,p)=>p.length-h.length);const d=c[0];if(d){const{expose:h,repeat:p,...f}=Dn(this.blocks[d]),g={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...f,repeat:p,parent:this},m=p!=null?new j.RepeatBlock(g):ut(g);m&&(this._blocks.push(m),h&&(this.exposeBlock=m),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),a+=d.length-1;continue}}let o=n[a],s=o in t;if(o===ke.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){i=!i;continue}if(o==="["||o==="]"){r=!r;continue}if(o===ke.ESCAPE_CHAR){if(++a,o=n[a],!o)break;s=!1}const l=s?new xi({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Dn(t[o]),parent:this}):new js({char:o,eager:this.eager,isUnmasking:i});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:n,...i}=t;this._blocks.forEach((r,a)=>r.state=n[a]),super.state=i}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,n)=>t+=n.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(n),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,n)=>t+=n.value,"")}set value(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(n),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(n),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,n)=>t+=n.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const n=new q;let i=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let r=i;r<this._blocks.length;++r){const a=this._blocks[r]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(t,n){n===void 0&&(n={});const i=this._mapPosToBlock(this.displayValue.length),r=new q;if(!i)return r;for(let o=i.index,s;s=this._blocks[o];++o){var a;const l=s._appendChar(t,{...n,_beforeTailState:(a=n._beforeTailState)==null||(a=a._blocks)==null?void 0:a[o]});if(r.aggregate(l),l.consumed)break}return r}extractTail(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const i=new Mt;return t===n||this._forEachBlocksInRange(t,n,(r,a,o,s)=>{const l=r.extractTail(o,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Mt&&(l.blockIndex=a),i.extend(l)}),i}extractInput(t,n,i){if(t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),i===void 0&&(i={}),t===n)return"";let r="";return this._forEachBlocksInRange(t,n,(a,o,s,l)=>{r+=a.extractInput(s,l,i)}),r}_findStopBefore(t){let n;for(let i=0;i<this._stops.length;++i){const r=this._stops[i];if(r<=t)n=r;else break}return n}_appendPlaceholder(t){const n=new q;if(this.lazy&&t==null)return n;const i=this._mapPosToBlock(this.displayValue.length);if(!i)return n;const r=i.index,a=t??this._blocks.length;return this._blocks.slice(r,a).forEach(o=>{if(!o.lazy||t!=null){var s;n.aggregate(o._appendPlaceholder((s=o._blocks)==null?void 0:s.length))}}),n}_mapPosToBlock(t){let n="";for(let i=0;i<this._blocks.length;++i){const r=this._blocks[i],a=n.length;if(n+=r.displayValue,t<=n.length)return{index:i,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((n,i)=>n+=i.displayValue.length,0)}_forEachBlocksInRange(t,n,i){n===void 0&&(n=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const a=this._mapPosToBlock(n),o=a&&r.index===a.index,s=r.offset,l=a&&o?a.offset:this._blocks[r.index].displayValue.length;if(i(this._blocks[r.index],r.index,s,l),a&&!o){for(let u=r.index+1;u<a.index;++u)i(this._blocks[u],u,0,this._blocks[u].displayValue.length);i(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const i=super.remove(t,n);return this._forEachBlocksInRange(t,n,(r,a,o,s)=>{i.aggregate(r.remove(o,s))}),i}nearestInputPos(t,n){if(n===void 0&&(n=O.NONE),!this._blocks.length)return 0;const i=new oh(this,t);if(n===O.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.displayValue.length;if(n===O.LEFT||n===O.FORCE_LEFT){if(n===O.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===t)return t;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===O.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=t||(i.popState(),i.ok&&i.pos<=t))return i.pos;i.popState()}return i.ok?i.pos:n===O.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===O.RIGHT||n===O.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===O.FORCE_RIGHT?this.displayValue.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(t,O.LEFT))):t}totalInputPositions(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);let i=0;return this._forEachBlocksInRange(t,n,(r,a,o,s)=>{i+=r.totalInputPositions(o,s)}),i}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const n=this._maskedBlocks[t];return n?n.map(i=>this._blocks[i]):[]}pad(t){const n=new q;return this._forEachBlocksInRange(0,this.displayValue.length,i=>n.aggregate(i.pad(t))),n}}ke.DEFAULTS={...xe.DEFAULTS,lazy:!0,placeholderChar:"_"};ke.STOP_CHAR="`";ke.ESCAPE_CHAR="\\";ke.InputDefinition=xi;ke.FixedDefinition=js;j.MaskedPattern=ke;class li extends ke{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:n=this.to||0,from:i=this.from||0,maxLength:r=this.maxLength||0,autofix:a=this.autofix,...o}=t;this.to=n,this.from=i,this.maxLength=Math.max(String(n).length,r),this.autofix=a;const s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<l.length&&l[u]===s[u];)++u;o.mask=l.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let n="",i="";const[,r,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(r.length)+a,i="9".repeat(r.length)+a),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepareChar(t,n){n===void 0&&(n={});let i;return[t,i]=super.doPrepareChar(t.replace(/\D/g,""),n),t||(i.skip=!this.isComplete),[t,i]}_appendCharRaw(t,n){if(n===void 0&&(n={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,n);const i=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[a,o]=this.boundaries(this.value+t);return Number(o)<this.from?super._appendCharRaw(i[this.value.length],n):Number(a)>this.to?!n.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(i[this.value.length],n).aggregate(this._appendCharRaw(t,n)):super._appendCharRaw(r[this.value.length],n):super._appendCharRaw(t,n)}doValidate(t){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,r]=this.boundaries(n);return this.from<=Number(r)&&Number(i)<=this.to&&super.doValidate(t)}pad(t){const n=new q;if(this.value.length===this.maxLength)return n;const i=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let a=0;a<r;++a)n.aggregate(super._appendCharRaw("0",t));i.split("").forEach(a=>this._appendCharRaw(a))}return n}}j.MaskedRange=li;const lh="d{.}`m{.}`Y";class it extends ke{static extractPatternOptions(t){const{mask:n,pattern:i,...r}=t;return{...r,mask:bt(n)?n:i}}constructor(t){super(it.extractPatternOptions({...it.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:n,pattern:i,blocks:r,...a}={...it.DEFAULTS,...t},o=Object.assign({},it.GET_DEFAULT_BLOCKS());t.min&&(o.Y.from=t.min.getFullYear()),t.max&&(o.Y.to=t.max.getFullYear()),t.min&&t.max&&o.Y.from===o.Y.to&&(o.m.from=t.min.getMonth()+1,o.m.to=t.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=t.min.getDate(),o.d.to=t.max.getDate())),Object.assign(o,this.blocks,r),super._update({...a,mask:bt(n)?n:i,blocks:o})}doValidate(t){const n=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(it.extractPatternOptions(t))}}it.GET_DEFAULT_BLOCKS=()=>({d:{mask:li,from:1,to:31,maxLength:2},m:{mask:li,from:1,to:12,maxLength:2},Y:{mask:li,from:1900,to:9999}});it.DEFAULTS={...ke.DEFAULTS,mask:Date,pattern:lh,format:(e,t)=>{if(!e)return"";const n=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),r=e.getFullYear();return[n,i,r].join(".")},parse:(e,t)=>{const[n,i,r]=e.split(".").map(Number);return new Date(r,i-1,n)}};j.MaskedDate=it;class zi extends xe{constructor(t){super({...zi.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(n=>{const{expose:i,...r}=Dn(n),a=ut({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return i&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,n){n===void 0&&(n={});const i=this._applyDispatch(t,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(n))),i}_applyDispatch(t,n,i){t===void 0&&(t=""),n===void 0&&(n={}),i===void 0&&(i="");const r=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,s=a.slice(o.length),l=this.currentMask,u=new q,c=l?.state;return this.currentMask=this.doDispatch(t,{...n},i),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),u.tailShift=this.currentMask.value.length-r.length),s&&(u.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),u}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const n=new q;return t&&n.aggregate(this._applyDispatch("",{},t)),n.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var n,i;return{...t,_beforeTailState:((n=t._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((i=t._beforeTailState)==null?void 0:i.currentMask)||t._beforeTailState}}doDispatch(t,n,i){return n===void 0&&(n={}),i===void 0&&(i=""),this.dispatch(t,this,n,i)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,n){n===void 0&&(n={});let[i,r]=super.doPrepare(t,n);if(this.currentMask){let a;[i,a]=super.doPrepare(i,this.currentMaskFlags(n)),r=r.aggregate(a)}return[i,r]}doPrepareChar(t,n){n===void 0&&(n={});let[i,r]=super.doPrepareChar(t,n);if(this.currentMask){let a;[i,a]=super.doPrepareChar(i,this.currentMaskFlags(n)),r=r.aggregate(a)}return[i,r]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(t);this.currentMask&&(this.currentMask.typedValue=t,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,n){const i=new q;return this.currentMask&&i.aggregate(this.currentMask.remove(t,n)).aggregate(this._applyDispatch()),i}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:n,currentMaskRef:i,currentMask:r,...a}=t;n&&this.compiledMasks.forEach((o,s)=>o.state=n[s]),i!=null&&(this.currentMask=i,this.currentMask.state=r),super.state=a}extractInput(t,n,i){return this.currentMask?this.currentMask.extractInput(t,n,i):""}extractTail(t,n){return this.currentMask?this.currentMask.extractTail(t,n):super.extractTail(t,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,n){return this.currentMask?this.currentMask.nearestInputPos(t,n):super.nearestInputPos(t,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((n,i)=>{if(!t[i])return;const{mask:r,...a}=t[i];return yi(n,a)&&n.maskEquals(r)}):super.maskEquals(t)}typedValueEquals(t){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(t))}}zi.DEFAULTS={...xe.DEFAULTS,dispatch:(e,t,n,i)=>{if(!t.compiledMasks.length)return;const r=t.rawInputValue,a=t.compiledMasks.map((o,s)=>{const l=t.currentMask===o,u=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,O.FORCE_LEFT);return o.rawInputValue!==r?(o.reset(),o.append(r,{raw:!0})):l||o.remove(u),o.append(e,t.currentMaskFlags(n)),o.appendTail(i),{index:s,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(u,o.nearestInputPos(o.displayValue.length,O.FORCE_LEFT)))}});return a.sort((o,s)=>s.weight-o.weight||s.totalInputPositions-o.totalInputPositions),t.compiledMasks[a[0].index]}};j.MaskedDynamic=zi;class Hi extends ke{constructor(t){super({...Hi.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:n,...i}=t;if(n){const r=n.map(s=>s.length),a=Math.min(...r),o=Math.max(...r)-a;i.mask="*".repeat(a),o&&(i.mask+="["+"*".repeat(o)+"]"),this.enum=n}super._update(i)}_appendCharRaw(t,n){n===void 0&&(n={});const i=Math.min(this.nearestInputPos(0,O.FORCE_RIGHT),this.value.length),r=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+t,i));if(r.length){r.length===1&&this._forEachBlocksInRange(0,this.value.length,(o,s)=>{const l=r[0][s];s>=this.value.length||l===o.value||(o.reset(),o._appendChar(l,n))});const a=super._appendCharRaw(r[0][this.value.length],n);return r.length===1&&r[0].slice(this.unmaskedValue.length).split("").forEach(o=>a.aggregate(super._appendCharRaw(o))),a}return new q({skip:!this.isComplete})}extractTail(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),new We("",t)}remove(t,n){if(t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),t===n)return new q;const i=Math.min(super.nearestInputPos(0,O.FORCE_RIGHT),this.value.length);let r;for(r=t;r>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(i,r),i)).length>1);--r);const a=super.remove(r,n);return a.tailShift+=r-t,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}Hi.DEFAULTS={...ke.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n};j.MaskedEnum=Hi;class uh extends xe{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}j.MaskedFunction=uh;var $s;class Te extends xe{constructor(t){super({...Te.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"("+or(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+n+i),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(or).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(or(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const n=t.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(t,n){n===void 0&&(n={});const[i,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),n);return t&&!i&&(r.skip=!0),i&&!this.allowPositive&&!this.value&&i!=="-"&&r.aggregate(this._appendChar("-")),[i,r]}_separatorsCount(t,n){n===void 0&&(n=!1);let i=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++i,n&&(t+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,n,i){return t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n),this._removeThousandsSeparators(super.extractInput(t,n,i))}_appendCharRaw(t,n){n===void 0&&(n={});const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=t;const o=this.number;let s=!isNaN(o),l=!1;if(s){let h;this.min!=null&&this.min<0&&this.number<this.min&&(h=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(h=this.max),h!=null&&(this.autofix?(this._value=this.format(h,this).replace(Te.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!n.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let u;s?u=new q({inserted:this._value.slice(a.length),rawInserted:l?"":t,skip:l}):(this._value=a,u=new q),this._value=this._insertThousandsSeparators(this._value);const c=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,d=this._separatorsCountFromSlice(c);return u.tailShift+=(d-r)*this.thousandsSeparator.length,u}_findSeparatorAround(t){if(this.thousandsSeparator){const n=t-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=t)return i}return-1}_adjustRangeWithSeparators(t,n){const i=this._findSeparatorAround(t);i>=0&&(t=i);const r=this._findSeparatorAround(n);return r>=0&&(n=r+this.thousandsSeparator.length),[t,n]}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length),[t,n]=this._adjustRangeWithSeparators(t,n);const i=this.value.slice(0,t),r=this.value.slice(n),a=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+r));const o=this._separatorsCountFromSlice(i);return new q({tailShift:(o-a)*this.thousandsSeparator.length})}nearestInputPos(t,n){if(!this.thousandsSeparator)return t;switch(n){case O.NONE:case O.LEFT:case O.FORCE_LEFT:{const i=this._findSeparatorAround(t-1);if(i>=0){const r=i+this.thousandsSeparator.length;if(t<r||this.value.length<=r||n===O.FORCE_LEFT)return i}break}case O.RIGHT:case O.FORCE_RIGHT:{const i=this._findSeparatorAround(t);if(i>=0)return i+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let n=t;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==t&&(this.unmaskedValue=this.format(n,this));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(t){const n=this._removeThousandsSeparators(t).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,r,a,o)=>r+o),t.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const n=t.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(t,n,i){n===void 0&&(n={});const r=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===Te.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,n,i)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Te.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(Te.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||Te.EMPTY_VALUES.includes(t)&&Te.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}$s=Te;Te.UNMASKED_RADIX=".";Te.EMPTY_VALUES=[...xe.EMPTY_VALUES,0];Te.DEFAULTS={...xe.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[$s.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};j.MaskedNumber=Te;const Vr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function zs(e,t,n){t===void 0&&(t=Vr.MASKED),n===void 0&&(n=Vr.MASKED);const i=ut(e);return r=>i.runIsolated(a=>(a[t]=r,a[n]))}function ch(e,t,n,i){return zs(t,n,i)(e)}j.PIPE_TYPE=Vr;j.createPipe=zs;j.pipe=ch;class dh extends ke{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var n,i,r;const{repeat:a,...o}=Dn(t);this._blockOpts=Object.assign({},this._blockOpts,o);const s=ut(this._blockOpts);this.repeat=(n=(i=a??s.repeat)!=null?i:this.repeat)!=null?n:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((r=this._blocks)==null?void 0:r.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(ut(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,n){n===void 0&&(n={});const i=new q;for(let l=(r=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?r:Math.max(this._blocks.length-1,0),u,c;u=(o=this._blocks[l])!=null?o:c=!c&&this._allocateBlock(l);++l){var r,a,o,s;const d=u._appendChar(t,{...n,_beforeTailState:(s=n._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]});if(d.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(i.aggregate(d),d.consumed)break}return i}_trimEmptyTail(t,n){var i,r;t===void 0&&(t=0);const a=Math.max(((i=this._mapPosToBlock(t))==null?void 0:i.index)||0,this.repeatFrom,0);let o;n!=null&&(o=(r=this._mapPosToBlock(n))==null?void 0:r.index),o==null&&(o=this._blocks.length-1);let s=0;for(let l=o;a<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(o-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,n){t===void 0&&(t=0),n===void 0&&(n=this.displayValue.length);const i=super.remove(t,n);return this._trimEmptyTail(t,n),i}totalInputPositions(t,n){return t===void 0&&(t=0),n==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,n)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}j.RepeatBlock=dh;try{globalThis.IMask=j}catch{}function hh(e,t){let{emit:n,onAccept:i,onComplete:r,defaultValue:a,defaultUnmaskedValue:o,defaultTypedValue:s}=t===void 0?{}:t;const l=Nl(e)?e:ne(e),u=ne(),c=ne(),d=ne(""),h=ne(""),p=ne();let f,g=d.value,m=h.value,b=p.value;function v(){b=p.value=c.value.typedValue,m=h.value=c.value.unmaskedValue,g=d.value=c.value.value}function E(k){v(),n&&(n("accept",d.value,k),n("accept:masked",d.value,k),n("accept:typed",p.value,k),n("accept:unmasked",h.value,k)),i?.(k)}function T(k){n&&(n("complete",c.value.value,k),n("complete:masked",c.value.value,k),n("complete:typed",c.value.typedValue,k),n("complete:unmasked",c.value.unmaskedValue,k)),r?.(k)}const _=()=>{!c.value||h.value===void 0||(m!==h.value&&(c.value.unmaskedValue=h.value,c.value.unmaskedValue!==h.value&&E()),m=void 0)};Ce(h,_);const S=()=>{!c.value||d.value===void 0||(g!==d.value&&(c.value.value=d.value,c.value.value!==d.value&&E()),g=void 0)};Ce(d,S);const X=()=>{!c.value||p.value===void 0||(b!==p.value&&(c.value.typedValue=p.value,c.value.masked.typedValueEquals(p.value)||E()),b=void 0)};Ce(p,X);function D(){f=u.value;const k=l.value;!f||!(k!=null&&k.mask)||(c.value=j(f,k),a!==void 0&&(d.value=a),o!==void 0&&(h.value=o),s!==void 0&&(p.value=s),_(),S(),X(),v(),c.value.on("accept",E).on("complete",T))}function C(){var k;(k=c.value)==null||k.destroy(),c.value=void 0}return zt(D),Go(C),Ce([u,l],()=>{const k=u.value,y=l.value;(!(y!=null&&y.mask)||k!==f)&&C(),k&&(c.value?c.value.updateOptions(y):D())}),{el:u,mask:jl(c),masked:d,unmasked:h,typed:p}}const ph={key:0,class:"k-input__prefix"},fh=["id","aria-labelledby","aria-describedby","required","type"],gh={key:1,class:"k-input__suffix"},_m=oe({__name:"Input",props:{invalid:{type:Boolean},id:{},modelValue:{},prefix:{},suffix:{},mask:{},align:{default:"left"},type:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=Bl(),i=e,r=t;function a(p){i.mask||r("update:modelValue",p.target.value)}const o=Qr("k-input",{variants:{invalid:{true:"k-input--invalid"},align:{left:"k-input--align-left",right:"k-input--align-right"}}}),s=qo(va,U(()=>({id:i.id,invalid:i.invalid,required:!1,events:{onBlur:()=>{},onFocus:()=>{}}}))),l=p=>{var f;(f=s.value.events)==null||f.onFocus(p),n.onFocus&&n.onFocus(p)},u=p=>{var f;(f=s.value.events)==null||f.onBlur(p),n.onBlur&&n.onBlur(p)},{unmasked:c,masked:d,el:h}=hh(i.mask,{defaultValue:String(i.modelValue),onAccept:()=>{var p,f;if((p=i.mask)!=null&&p.pattern)return;const g=((f=i.mask)==null?void 0:f.mask)===Number?parseFloat(c.value):d.value;g!==i.modelValue&&r("update:modelValue",g)},onCompleted:()=>{var p;(p=i.mask)!=null&&p.pattern&&r("update:modelValue",i.mask.unmask?c.value:d.value)}});return Ce(()=>i.modelValue,p=>{i.mask&&c.value!==String(p)&&(c.value=String(p)),i.mask||(h.value.value=p)}),(p,f)=>(A(),P("div",{class:Oe(re(o)({invalid:re(s).invalid,align:p.align}))},[p.$slots.prefix||p.prefix?(A(),P("span",ph,[z(p.$slots,"prefix",{},()=>[$e(de(p.prefix),1)])])):W("",!0),ee("input",te({class:"k-input__input",id:re(s).id,"aria-labelledby":re(s).labelId,"aria-describedby":re(s).helpId,required:re(s).required,onInput:a,onBlur:u,onFocus:l,ref_key:"el",ref:h,type:i.type},{...re(s).events,...p.$attrs}),null,16,fh),p.$slots.suffix||p.suffix?(A(),P("span",gh,[z(p.$slots,"suffix",{},()=>[$e(de(p.suffix),1)])])):W("",!0)],2))}}),mh=["src","alt"],vh=oe({__name:"Image",props:{src:{},preview:{},alt:{},caption:{},captionVisibility:{default:"hover"},captionTheme:{default:"dark"},size:{default:"cover"},position:{default:"center"},width:{},height:{},aspectRatio:{}},emits:["loaded","error"],setup(e,{emit:t}){const n=e,i=t,r=ne(),a=ne(!1),o=ne(!1),s=ne(),l=U(()=>({"--k-image-size":n.size,"--k-image-preview":n.preview||"","--k-image-position":n.position,"--k-image-width":n.width||"initial","--k-image-height":n.height||"initial","--k-image-aspectratio":(n.aspectRatio==="natural"?s.value:n.aspectRatio)||"initial"}));function u(){a.value=!0;const{naturalWidth:d=0,naturalHeight:h=0}=r.value||{};s.value=`${d}/${h}`,i("loaded")}function c(){a.value=!0,o.value=!0,i("error")}return zt(()=>{var d;return((d=r.value)==null?void 0:d.complete)&&u()}),(d,h)=>(A(),P("figure",{class:Oe(["k-image",[`k-image--size-${d.size}`,{"k-image--loaded":a.value,"k-image--loading":!a.value}]]),style:At(l.value)},[a.value?W("",!0):(A(),ue(ms,{key:0,size:"small"})),zo(ee("img",{src:d.src,alt:d.alt||d.caption,onLoad:u,onError:c,ref_key:"image",ref:r},null,40,mh),[[Ho,!o.value]]),d.$slots.caption||d.caption?(A(),P("figcaption",{key:1,class:Oe(`k-image__caption k-image__caption--visibility-${d.captionVisibility} k-image__caption--theme-${!a.value||o.value?"light":d.captionTheme}`)},[z(d.$slots,"caption",{},()=>[$e(de(d.caption),1)])],2)):W("",!0)],6))}}),bh={key:1,class:"k-card__content"},yh={key:0,class:"k-card__title"},xh={key:2,class:"k-card__footer"},kh=oe({inheritAttrs:!1,__name:"Card",props:{is:{default:"div"},title:{},variant:{default:"border"},thumbnail:{},thumbnailSize:{default:"cover"},headerMinHeight:{}},setup(e){return(t,n)=>(A(),ue(kt(t.is),te({class:`k-card k-card--variant-${t.variant}`,style:`--k-header-min-height: ${t.headerMinHeight||""}`},t.$attrs),{default:ve(()=>[t.$slots.header||t.thumbnail?(A(),P("div",{key:0,class:Oe(["k-card__header",[{"k-card__header--has-thumbnail":!t.$slots.header&&t.thumbnail},`k-card__header--thumbnail-size-${t.thumbnailSize}`]])},[z(t.$slots,"header",{},()=>[t.thumbnail?(A(),ue(vh,{key:0,class:"k-card__thumbnail",src:t.thumbnail,size:t.thumbnailSize},null,8,["src","size"])):W("",!0)])],2)):W("",!0),t.$slots.default||t.title?(A(),P("div",bh,[t.title?(A(),P("div",yh,de(t.title),1)):W("",!0),z(t.$slots,"default")])):W("",!0),t.$slots.footer?(A(),P("div",xh,[z(t.$slots,"footer")])):W("",!0)]),_:3},16,["class","style"]))}}),wm=oe({__name:"Skeleton",props:{variant:{default:"shiny"},aspectRatio:{},width:{},height:{},rounding:{}},setup(e){const t=()=>e.rounding?e.rounding==="full"?"9999px":oa(e.rounding,"rounding"):"initial",n=U(()=>({"--aspect-ratio":!e.aspectRatio||e.width&&e.height?"initial":e.aspectRatio,"--width":e.width||"initial","--height":e.height||"initial","--border-radius":t()}));return(i,r)=>(A(),P("span",{class:Oe(["k-skeleton",`k-skeleton--variant-${i.variant}`]),style:At(n.value)},[z(i.$slots,"default")],6))}});function Eh(e,t,n){return e===0?n:t[e-1]}function _h(e,t,n){return e===t.length-1?n:t[e+1]}function wh(e,t,n){return Math.round((e-t)/n)*n+t}function qi(e,t,n){return Math.min(Math.max(e,t),n)}function ya(e,t,n){return(e-t)/(n-t)}function Hs(e,t,n,i){const r=e*(n-t)+t,a=wh(r,t,i);return qi(a,t,n)}function Wn(e,t){let n=e,i=t.toString(),r=i.indexOf("."),a=r>=0?i.length-r:0;if(a>0){let o=Math.pow(10,a);n=Math.round(n*o)/o}return n}function qs(e,t,n,i){t=Number(t),n=Number(n);let r=(e-(isNaN(t)?0:t))%i,a=Wn(Math.abs(r)*2>=i?e+Math.sign(r)*(i-Math.abs(r)):e-r,i);return isNaN(t)?!isNaN(n)&&a>n&&(a=Math.floor(Wn(n/i,i))*i):a<t?a=t:!isNaN(n)&&a>n&&(a=t+Math.floor(Wn((n-t)/i,i))*i),a=Wn(a,i),a}function Ch(e,t,n){return e[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)]}function Us(e,t){const n=Eh(e,t.values,t.min),i=_h(e,t.values,t.max);let r=t.values.slice();return function(a){let o=qs(a,n,i,t.step);return r=Ch(r,e,a),r[e]=o,r}}function Ah(e,t){const n=t.values[e]+t.step;return Us(e,t)(n)}function Sh(e,t){const n=t.values[e]-t.step;return Us(e,t)(n)}function Th(e,t){let n=e.findIndex(a=>t-a<0);if(n===0)return n;if(n===-1)return e.length-1;let i=e[n-1],r=e[n];return Math.abs(i-t)<Math.abs(r-t)?n-1:n}function Ih(e,t,n,i){return e.map((r,a)=>{const o=a===0?t:e[a-1]+i,s=a===e.length-1?n:e[a+1]-i;return{min:o,max:s,value:r}})}function Br(e,t){const n={min:e[0],max:e[1]},i={min:t[0],max:t[1]};return function(r){if(n.min===n.max||i.min===i.max)return i.min;const a=(i.max-i.min)/(n.max-n.min);return i.min+a*(r-n.min)}}function Fh(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,i=new n.ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const[a]=r;let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,s=u.blockSize}else o=e.offsetWidth,s=e.offsetHeight;t({width:o,height:s})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}function Dh(e){const{getNodes:t,observeMutation:n=!0,callback:i}=e,r=[];let a=null;function o(){const s=t();a=s[0];const l=s.map((u,c)=>Fh(u,d=>{i(d,c)}));r.push(...l)}if(o(),n){const s=Oh(a,o);r.push(s)}return()=>{r.forEach(s=>{s?.()})}}function Oh(e,t){var n;if(!e||!e.parentElement)return;const i=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,r=new i.MutationObserver(()=>{t()});return r.observe(e.parentElement,{childList:!0}),()=>{r.disconnect()}}var Ph=mt("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker"),et=Ph.build();function Rh(e){const t=e[0],n=e[e.length-1];return[t,n]}function Mh(e){const[t,n]=Rh(e.valuePercent);if(e.valuePercent.length===1){if(e.origin==="center"){const i=e.valuePercent[0]<50,r=i?`${e.valuePercent[0]}%`:"50%",a=i?"50%":`${100-e.valuePercent[0]}%`;return{start:r,end:a}}return{start:"0%",end:`${100-n}%`}}return{start:`${t}%`,end:`${100-n}%`}}function Vh(e){return e.isVertical?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[e.isRtl?"right":"left"]:"var(--slider-range-start)",[e.isRtl?"left":"right"]:"var(--slider-range-end)"}}function Bh(e){const{height:t=0}=e.thumbSize??{},n=Br([e.min,e.max],[-t/2,t/2]);return parseFloat(n(e.value).toFixed(2))}function Lh(e){const{width:t=0}=e.thumbSize??{};if(e.isRtl){const i=Br([e.max,e.min],[-t/2,t/2]);return-1*parseFloat(i(e.value).toFixed(2))}const n=Br([e.min,e.max],[-t/2,t/2]);return parseFloat(n(e.value).toFixed(2))}function Nh(e,t){if(e.thumbAlignment==="center")return`${t}%`;const n=e.isVertical?Bh(e):Lh(e);return`calc(${t}% - ${n}px)`}function Ws(e){let t=ya(e.value,e.min,e.max)*100;return Nh(e,t)}function Gs(e){let t="visible";return e.thumbAlignment==="contain"&&!e.hasMeasuredThumbSize&&(t="hidden"),t}function jh(e,t){const n=e.isVertical?"bottom":"insetInlineStart";return{visibility:Gs(e),position:"absolute",transform:"var(--slider-thumb-transform)",[n]:`var(--slider-thumb-offset-${t})`}}function $h(){return{touchAction:"none",userSelect:"none",WebkitUserSelect:"none",position:"relative"}}function zh(e){const t=Mh(e);return{...e.value.reduce((n,i,r)=>{const a=Ws({...e,value:i});return{...n,[`--slider-thumb-offset-${r}`]:a}},{}),"--slider-thumb-transform":e.isVertical?"translateY(50%)":e.isRtl?"translateX(50%)":"translateX(-50%)","--slider-range-start":t.start,"--slider-range-end":t.end}}function Hh(e,t){return{visibility:Gs(e),position:"absolute",pointerEvents:"none",[e.isHorizontal?"insetInlineStart":"bottom"]:Ws({...e,value:t}),translate:"var(--tx) var(--ty)","--tx":e.isHorizontal?e.isRtl?"50%":"-50%":"0%","--ty":e.isHorizontal?"0%":"50%"}}function qh(){return{userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none",position:"relative"}}var Uh={getRootStyle:zh,getControlStyle:$h,getThumbStyle:jh,getRangeStyle:Vh,getMarkerStyle:Hh,getMarkerGroupStyle:qh},H=Rn({...Uh,getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`slider:${e.id}`},getThumbId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.thumb)==null?void 0:i.call(n,t))??`slider:${e.id}:thumb:${t}`},getHiddenInputId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.hiddenInput)==null?void 0:i.call(n,t))??`slider:${e.id}:input:${t}`},getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`slider:${e.id}:control`},getTrackId:e=>{var t;return((t=e.ids)==null?void 0:t.track)??`slider:${e.id}:track`},getRangeId:e=>{var t;return((t=e.ids)==null?void 0:t.range)??`slider:${e.id}:range`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`slider:${e.id}:label`},getValueTextId:e=>{var t;return((t=e.ids)==null?void 0:t.valueText)??`slider:${e.id}:value-text`},getMarkerId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.marker)==null?void 0:i.call(n,t))??`slider:${e.id}:marker:${t}`},getRootEl:e=>H.getById(e,H.getRootId(e)),getThumbEl:(e,t)=>H.getById(e,H.getThumbId(e,t)),getHiddenInputEl:(e,t)=>H.getById(e,H.getHiddenInputId(e,t)),getControlEl:e=>H.getById(e,H.getControlId(e)),getElements:e=>_s(H.getControlEl(e),"[role=slider]"),getFirstEl:e=>H.getElements(e)[0],getRangeEl:e=>H.getById(e,H.getRangeId(e)),getValueFromPoint(e,t){const n=H.getControlEl(e);if(!n)return;const i=Id(t,n).getPercentValue({orientation:e.orientation,dir:e.dir,inverted:{y:!0}});return Hs(i,e.min,e.max,e.step)},dispatchChangeEvent(e){Array.from(e.value).forEach((t,n)=>{const i=H.getHiddenInputEl(e,n);i&&Vd(i,{value:t})})}});function ho(e,t){return t.map((n,i,r)=>Lr({...e,value:r},n,i))}function yt(e,t){return Ih(e.value,e.min,e.max,e.minStepsBetweenThumbs)[t]}function Lr(e,t,n){const i=yt(e,n),r=qs(t,e.min,e.max,e.step);return qi(r,i.min,i.max)}function Wh(e,t,n){const i=t??e.focusedIndex,r=yt(e,i),a=Sh(i,{...r,step:n??e.step,values:e.value});return a[i]=qi(a[i],r.min,r.max),a}function Gh(e,t,n){const i=t??e.focusedIndex,r=yt(e,i),a=Ah(i,{...r,step:n??e.step,values:e.value});return a[i]=qi(a[i],r.min,r.max),a}function Xh(e,t){return Th(e.value,t)}function Yh(e,t){for(let n=0;n<t.length;n++){const i=t[n];e[n]=i}}function Kh(e,t,n){const i=e.context["aria-label"],r=e.context["aria-labelledby"],a=e.context.value,o=e.matches("focus"),s=e.matches("dragging"),l=e.context.isDisabled,u=e.context.invalid,c=e.context.isInteractive,d=e.context.orientation==="horizontal",h=e.context.orientation==="vertical";function p(g){return ya(g,e.context.min,e.context.max)}function f(g){return Hs(g,e.context.min,e.context.max,e.context.step)}return{value:e.context.value,dragging:s,focused:o,setValue(g){t({type:"SET_VALUE",value:g})},getThumbValue(g){return a[g]},setThumbValue(g,m){t({type:"SET_VALUE",index:g,value:m})},getValuePercent:p,getPercentValue:f,getThumbPercent(g){return p(a[g])},setThumbPercent(g,m){const b=f(m);t({type:"SET_VALUE",index:g,value:b})},getThumbMin(g){return yt(e.context,g).min},getThumbMax(g){return yt(e.context,g).max},increment(g){t({type:"INCREMENT",index:g})},decrement(g){t({type:"DECREMENT",index:g})},focus(){c&&t({type:"FOCUS",index:0})},getLabelProps(){return n.label({...et.label.attrs,dir:e.context.dir,"data-disabled":R(l),"data-orientation":e.context.orientation,"data-invalid":R(u),"data-dragging":R(s),"data-focus":R(o),id:H.getLabelId(e.context),htmlFor:H.getHiddenInputId(e.context,0),onClick(g){var m;c&&(g.preventDefault(),(m=H.getFirstEl(e.context))==null||m.focus())},style:{userSelect:"none",WebkitUserSelect:"none"}})},getRootProps(){return n.element({...et.root.attrs,"data-disabled":R(l),"data-orientation":e.context.orientation,"data-dragging":R(s),"data-invalid":R(u),"data-focus":R(o),id:H.getRootId(e.context),dir:e.context.dir,style:H.getRootStyle(e.context)})},getValueTextProps(){return n.element({...et.valueText.attrs,dir:e.context.dir,"data-disabled":R(l),"data-orientation":e.context.orientation,"data-invalid":R(u),"data-focus":R(o),id:H.getValueTextId(e.context)})},getTrackProps(){return n.element({...et.track.attrs,dir:e.context.dir,id:H.getTrackId(e.context),"data-disabled":R(l),"data-invalid":R(u),"data-dragging":R(s),"data-orientation":e.context.orientation,"data-focus":R(o),style:{position:"relative"}})},getThumbProps(g){var m,b;const{index:v=0,name:E}=g,T=a[v],_=yt(e.context,v),S=(b=(m=e.context).getAriaValueText)==null?void 0:b.call(m,{value:T,index:v}),X=Array.isArray(i)?i[v]:i,D=Array.isArray(r)?r[v]:r;return n.element({...et.thumb.attrs,dir:e.context.dir,"data-index":v,"data-name":E,id:H.getThumbId(e.context,v),"data-disabled":R(l),"data-orientation":e.context.orientation,"data-focus":R(o&&e.context.focusedIndex===v),"data-dragging":R(s&&e.context.focusedIndex===v),draggable:!1,"aria-disabled":uc(l),"aria-label":X,"aria-labelledby":D??H.getLabelId(e.context),"aria-orientation":e.context.orientation,"aria-valuemax":_.max,"aria-valuemin":_.min,"aria-valuenow":a[v],"aria-valuetext":S,role:"slider",tabIndex:l?void 0:0,style:H.getThumbStyle(e.context,v),onPointerDown(C){c&&(t({type:"THUMB_POINTER_DOWN",index:v}),C.stopPropagation())},onBlur(){c&&t("BLUR")},onFocus(){c&&t({type:"FOCUS",index:v})},onKeyDown(C){if(C.defaultPrevented||!c)return;const k=Td(C)*e.context.step,y={ArrowUp(){d||t({type:"ARROW_INC",step:k,src:"ArrowUp"})},ArrowDown(){d||t({type:"ARROW_DEC",step:k,src:"ArrowDown"})},ArrowLeft(){h||t({type:"ARROW_DEC",step:k,src:"ArrowLeft"})},ArrowRight(){h||t({type:"ARROW_INC",step:k,src:"ArrowRight"})},PageUp(){t({type:"ARROW_INC",step:k,src:"PageUp"})},PageDown(){t({type:"ARROW_DEC",step:k,src:"PageDown"})},Home(){t("HOME")},End(){t("END")}},x=Ed(C,e.context),I=y[x];I&&(I(C),C.preventDefault(),C.stopPropagation())}})},getHiddenInputProps(g){const{index:m=0,name:b}=g;return n.input({name:b??(e.context.name?e.context.name+(e.context.value.length>1?"[]":""):void 0),form:e.context.form,type:"text",hidden:!0,defaultValue:e.context.value[m],id:H.getHiddenInputId(e.context,m)})},getRangeProps(){return n.element({id:H.getRangeId(e.context),...et.range.attrs,dir:e.context.dir,"data-dragging":R(s),"data-focus":R(o),"data-invalid":R(u),"data-disabled":R(l),"data-orientation":e.context.orientation,style:H.getRangeStyle(e.context)})},getControlProps(){return n.element({...et.control.attrs,dir:e.context.dir,id:H.getControlId(e.context),"data-dragging":R(s),"data-disabled":R(l),"data-orientation":e.context.orientation,"data-invalid":R(u),"data-focus":R(o),style:H.getControlStyle(),onPointerDown(g){if(!c||!bd(g)||xd(g))return;const m=fa(g);t({type:"POINTER_DOWN",point:m}),g.preventDefault(),g.stopPropagation()}})},getMarkerGroupProps(){return n.element({...et.markerGroup.attrs,role:"presentation",dir:e.context.dir,"aria-hidden":!0,"data-orientation":e.context.orientation,style:H.getMarkerGroupStyle()})},getMarkerProps(g){const m=H.getMarkerStyle(e.context,g.value);let b;const v=e.context.value[0],E=e.context.value[e.context.value.length-1];return g.value<v?b="under-value":g.value>E?b="over-value":b="at-value",n.element({...et.marker.attrs,id:H.getMarkerId(e.context,g.value),role:"presentation",dir:e.context.dir,"data-orientation":e.context.orientation,"data-value":g.value,"data-disabled":R(l),"data-state":b,style:m})}}}var Zh=(e,t)=>e?.width===t?.width&&e?.height===t?.height;function Jh(e){const t=lt(e);return Mn({id:"slider",initial:"idle",context:{thumbSize:null,thumbAlignment:"contain",min:0,max:100,step:1,value:[0],origin:"start",orientation:"horizontal",dir:"ltr",minStepsBetweenThumbs:0,disabled:!1,readOnly:!1,...t,focusedIndex:-1,fieldsetDisabled:!1},computed:{isHorizontal:n=>n.orientation==="horizontal",isVertical:n=>n.orientation==="vertical",isRtl:n=>n.orientation==="horizontal"&&n.dir==="rtl",isDisabled:n=>!!n.disabled||n.fieldsetDisabled,isInteractive:n=>!(n.readOnly||n.isDisabled),hasMeasuredThumbSize:n=>n.thumbSize!=null,valuePercent(n){return n.value.map(i=>100*ya(i,n.min,n.max))}},watch:{value:["syncInputElements"]},entry:["coarseValue"],activities:["trackFormControlState","trackThumbsSize"],on:{SET_VALUE:[{guard:"hasIndex",actions:"setValueAtIndex"},{actions:"setValue"}],INCREMENT:{actions:"incrementThumbAtIndex"},DECREMENT:{actions:"decrementThumbAtIndex"}},states:{idle:{on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},FOCUS:{target:"focus",actions:"setFocusedIndex"},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]}}},focus:{entry:"focusActiveThumb",on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]},ARROW_DEC:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]},ARROW_INC:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},HOME:{actions:["setFocusedThumbToMin","invokeOnChangeEnd"]},END:{actions:["setFocusedThumbToMax","invokeOnChangeEnd"]},BLUR:{target:"idle",actions:"clearFocusedIndex"}}},dragging:{entry:"focusActiveThumb",activities:"trackPointerMove",on:{POINTER_UP:{target:"focus",actions:"invokeOnChangeEnd"},POINTER_MOVE:{actions:"setPointerValue"}}}}},{guards:{hasIndex:(n,i)=>i.index!=null},activities:{trackFormControlState(n,i,{initialContext:r}){return Ni(H.getRootEl(n),{onFieldsetDisabledChange(a){n.fieldsetDisabled=a},onFormReset(){Pe.value(n,r.value)}})},trackPointerMove(n,i,{send:r}){return Fd(H.getDoc(n),{onPointerMove(a){r({type:"POINTER_MOVE",point:a.point})},onPointerUp(){r("POINTER_UP")}})},trackThumbsSize(n){if(!(n.thumbAlignment!=="contain"||n.thumbSize))return Dh({getNodes:()=>H.getElements(n),observeMutation:!0,callback(i){!i||Zh(n.thumbSize,i)||(n.thumbSize=i)}})}},actions:{syncInputElements(n){n.value.forEach((i,r)=>{const a=H.getHiddenInputEl(n,r);H.setValue(a,i)})},invokeOnChangeEnd(n){ui.valueChangeEnd(n)},setClosestThumbIndex(n,i){const r=H.getValueFromPoint(n,i.point);if(r==null)return;const a=Xh(n,r);Pe.focusedIndex(n,a)},setFocusedIndex(n,i){Pe.focusedIndex(n,i.index)},clearFocusedIndex(n){Pe.focusedIndex(n,-1)},setPointerValue(n,i){const r=H.getValueFromPoint(n,i.point);if(r==null)return;const a=Lr(n,r,n.focusedIndex);Pe.valueAtIndex(n,n.focusedIndex,a)},focusActiveThumb(n){Et(()=>{const i=H.getThumbEl(n,n.focusedIndex);i?.focus({preventScroll:!0})})},decrementThumbAtIndex(n,i){const r=Wh(n,i.index,i.step);Pe.value(n,r)},incrementThumbAtIndex(n,i){const r=Gh(n,i.index,i.step);Pe.value(n,r)},setFocusedThumbToMin(n){const{min:i}=yt(n,n.focusedIndex);Pe.valueAtIndex(n,n.focusedIndex,i)},setFocusedThumbToMax(n){const{max:i}=yt(n,n.focusedIndex);Pe.valueAtIndex(n,n.focusedIndex,i)},coarseValue(n){const i=ho(n,n.value);Pe.value(n,i)},setValueAtIndex(n,i){const r=Lr(n,i.value,i.index);Pe.valueAtIndex(n,i.index,r)},setValue(n,i){const r=ho(n,i.value);Pe.value(n,r)}}})}var ui={valueChange(e){var t;(t=e.onValueChange)==null||t.call(e,{value:Array.from(e.value)}),H.dispatchChangeEvent(e)},valueChangeEnd(e){var t;(t=e.onValueChangeEnd)==null||t.call(e,{value:Array.from(e.value)})},focusChange(e){var t;(t=e.onFocusChange)==null||t.call(e,{value:Array.from(e.value),focusedIndex:e.focusedIndex})}},Pe={valueAtIndex:(e,t,n)=>{vt(e.value[t],n)||(e.value[t]=n,ui.valueChange(e))},value:(e,t)=>{vt(e.value,t)||(Yh(e.value,t),ui.valueChange(e))},focusedIndex:(e,t)=>{vt(e.focusedIndex,t)||(e.focusedIndex=t,ui.focusChange(e))}};qt()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value"]);qt()(["index","name"]);const Qh=["data-value"],Cm=oe({__name:"Slider",props:{modelValue:{},min:{default:0},max:{default:100},step:{default:1},marker:{},format:{type:Function,default:()=>e=>e},markerFormat:{},markerHighlight:{type:Boolean,default:!1},getRootNode:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r={id:_t(),...n,value:[n.modelValue],onValueChange:({value:c})=>{i("update:modelValue",c[0])},getRootNode:n.getRootNode},[a,o]=Bn(Jh(r),{context:U(()=>n)}),s=U(()=>Kh(a.value,o,Vn)),l=c=>s.value.setValue([Math.max(n.min||c,Math.min(n.max||c,c))]),u=U(()=>{const c=h=>n.markerFormat?n.markerFormat(h):n.format(h);if(!n.marker)return[];if(n.marker instanceof Array)return n.marker.map(h=>({value:h,label:c(h)}));const d=Math.floor((n.max-n.min)/n.marker)+1;return Array(d).fill(void 0).map((h,p)=>{const f=n.min+n.marker*p;return{value:f,label:c(f)}})});return Ce(()=>n.modelValue,l,{deep:!0}),(c,d)=>(A(),P("div",te(s.value.getRootProps(),{class:["k-slider",{"k-slider--marker-highlight":c.markerHighlight}]}),[ee("div",ye(Ie(s.value.getControlProps())),[ee("div",ye(Ie(s.value.getTrackProps())),[ee("div",ye(Ie(s.value.getRangeProps())),null,16)],16),ee("div",ye(Ie(s.value.getThumbProps({index:0}))),[ee("input",ye(Ie(s.value.getHiddenInputProps({index:0}))),null,16)],16),ee("output",ye(Ie(s.value.getValueTextProps())),[z(c.$slots,"value",{value:s.value.value},()=>[$e(de(c.format(s.value.value.at(0))),1)])],16)],16),u.value.length?(A(),P("div",ye(te({key:0},s.value.getMarkerGroupProps())),[(A(!0),P(rt,null,nn(u.value,h=>(A(),P("span",te({ref_for:!0},s.value.getMarkerProps({value:h.value}),{"data-value":h.label}),null,16,Qh))),256))],16)):W("",!0)],16))}}),Nr=Math.min,rn=Math.max,ki=Math.round,Gn=Math.floor,wt=e=>({x:e,y:e}),ep={left:"right",right:"left",bottom:"top",top:"bottom"},tp={start:"end",end:"start"};function xa(e,t){return typeof e=="function"?e(t):e}function sn(e){return e.split("-")[0]}function Ui(e){return e.split("-")[1]}function np(e){return e==="x"?"y":"x"}function Xs(e){return e==="y"?"height":"width"}function On(e){return["top","bottom"].includes(sn(e))?"y":"x"}function Ys(e){return np(On(e))}function ip(e,t,n){n===void 0&&(n=!1);const i=Ui(e),r=Ys(e),a=Xs(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Ei(o)),[o,Ei(o)]}function rp(e){const t=Ei(e);return[jr(e),t,jr(t)]}function jr(e){return e.replace(/start|end/g,t=>tp[t])}function ap(e,t,n){const i=["left","right"],r=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:i:t?i:r;case"left":case"right":return t?a:o;default:return[]}}function op(e,t,n,i){const r=Ui(e);let a=ap(sn(e),n==="start",i);return r&&(a=a.map(o=>o+"-"+r),t&&(a=a.concat(a.map(jr)))),a}function Ei(e){return e.replace(/left|right|bottom|top/g,t=>ep[t])}function sp(e){return{top:0,right:0,bottom:0,left:0,...e}}function lp(e){return typeof e!="number"?sp(e):{top:e,right:e,bottom:e,left:e}}function _i(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function po(e,t,n){let{reference:i,floating:r}=e;const a=On(t),o=Ys(t),s=Xs(o),l=sn(t),u=a==="y",c=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,h=i[s]/2-r[s]/2;let p;switch(l){case"top":p={x:c,y:i.y-r.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-r.width,y:d};break;default:p={x:i.x,y:i.y}}switch(Ui(t)){case"start":p[o]-=h*(n&&u?-1:1);break;case"end":p[o]+=h*(n&&u?-1:1);break}return p}const up=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=po(u,i,l),h=i,p={},f=0;for(let g=0;g<s.length;g++){const{name:m,fn:b}=s[g],{x:v,y:E,data:T,reset:_}=await b({x:c,y:d,initialPlacement:i,placement:h,strategy:r,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});c=v??c,d=E??d,p={...p,[m]:{...p[m],...T}},_&&f<=50&&(f++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:c,y:d}=po(u,h,l)),g=-1)}return{x:c,y:d,placement:h,strategy:r,middlewareData:p}};async function cp(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=xa(t,e),f=lp(p),g=s[h?d==="floating"?"reference":"floating":d],m=_i(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),E=await(a.isElement==null?void 0:a.isElement(v))?await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1}:{x:1,y:1},T=_i(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:v,strategy:l}):b);return{top:(m.top-T.top+f.top)/E.y,bottom:(T.bottom-m.bottom+f.bottom)/E.y,left:(m.left-T.left+f.left)/E.x,right:(T.right-m.right+f.right)/E.x}}const dp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:a,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=xa(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=sn(r),v=On(s),E=sn(s)===s,T=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=h||(E||!g?[Ei(s)]:rp(s)),S=f!=="none";!h&&S&&_.push(...op(s,g,f,T));const X=[s,..._],D=await cp(t,m),C=[];let k=((i=a.flip)==null?void 0:i.overflows)||[];if(c&&C.push(D[b]),d){const B=ip(r,o,T);C.push(D[B[0]],D[B[1]])}if(k=[...k,{placement:r,overflows:C}],!C.every(B=>B<=0)){var y,x;const B=(((y=a.flip)==null?void 0:y.index)||0)+1,L=X[B];if(L)return{data:{index:B,overflows:k},reset:{placement:L}};let N=(x=k.filter(Z=>Z.overflows[0]<=0).sort((Z,ie)=>Z.overflows[1]-ie.overflows[1])[0])==null?void 0:x.placement;if(!N)switch(p){case"bestFit":{var I;const Z=(I=k.filter(ie=>{if(S){const J=On(ie.placement);return J===v||J==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(J=>J>0).reduce((J,qe)=>J+qe,0)]).sort((ie,J)=>ie[1]-J[1])[0])==null?void 0:I[0];Z&&(N=Z);break}case"initialPlacement":N=s;break}if(r!==N)return{reset:{placement:N}}}return{}}}};async function hp(e,t){const{placement:n,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=sn(n),s=Ui(n),l=On(n)==="y",u=["left","top"].includes(o)?-1:1,c=a&&l?-1:1,d=xa(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof f=="number"&&(p=s==="end"?f*-1:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}const pp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:a,placement:o,middlewareData:s}=t,l=await hp(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(i=s.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:a+l.y,data:{...l,placement:o}}}}};function Wi(){return typeof window<"u"}function cn(e){return Ks(e)?(e.nodeName||"").toLowerCase():"#document"}function De(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Je(e){var t;return(t=(Ks(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ks(e){return Wi()?e instanceof Node||e instanceof De(e).Node:!1}function ze(e){return Wi()?e instanceof Element||e instanceof De(e).Element:!1}function Ye(e){return Wi()?e instanceof HTMLElement||e instanceof De(e).HTMLElement:!1}function fo(e){return!Wi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof De(e).ShadowRoot}function Ln(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(r)}function fp(e){return["table","td","th"].includes(cn(e))}function Gi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ka(e){const t=Ea(),n=ze(e)?He(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function gp(e){let t=Ct(e);for(;Ye(t)&&!ln(t);){if(ka(t))return t;if(Gi(t))return null;t=Ct(t)}return null}function Ea(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ln(e){return["html","body","#document"].includes(cn(e))}function He(e){return De(e).getComputedStyle(e)}function Xi(e){return ze(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ct(e){if(cn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||fo(e)&&e.host||Je(e);return fo(t)?t.host:t}function Zs(e){const t=Ct(e);return ln(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&Ln(t)?t:Zs(t)}function Pn(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Zs(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=De(r);if(a){const s=$r(o);return t.concat(o,o.visualViewport||[],Ln(r)?r:[],s&&n?Pn(s):[])}return t.concat(r,Pn(r,[],n))}function $r(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Js(e){const t=He(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Ye(e),a=r?e.offsetWidth:n,o=r?e.offsetHeight:i,s=ki(n)!==a||ki(i)!==o;return s&&(n=a,i=o),{width:n,height:i,$:s}}function _a(e){return ze(e)?e:e.contextElement}function an(e){const t=_a(e);if(!Ye(t))return wt(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:a}=Js(t);let o=(a?ki(n.width):n.width)/i,s=(a?ki(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const mp=wt(0);function Qs(e){const t=De(e);return!Ea()||!t.visualViewport?mp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==De(e)?!1:t}function jt(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=_a(e);let o=wt(1);t&&(i?ze(i)&&(o=an(i)):o=an(e));const s=vp(a,n,i)?Qs(a):wt(0);let l=(r.left+s.x)/o.x,u=(r.top+s.y)/o.y,c=r.width/o.x,d=r.height/o.y;if(a){const h=De(a),p=i&&ze(i)?De(i):i;let f=h,g=$r(f);for(;g&&i&&p!==f;){const m=an(g),b=g.getBoundingClientRect(),v=He(g),E=b.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,T=b.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,u*=m.y,c*=m.x,d*=m.y,l+=E,u+=T,f=De(g),g=$r(f)}}return _i({width:c,height:d,x:l,y:u})}function bp(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=Je(i),s=t?Gi(t.floating):!1;if(i===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=wt(1);const c=wt(0),d=Ye(i);if((d||!d&&!a)&&((cn(i)!=="body"||Ln(o))&&(l=Xi(i)),Ye(i))){const h=jt(i);u=an(i),c.x=h.x+i.clientLeft,c.y=h.y+i.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function yp(e){return Array.from(e.getClientRects())}function zr(e,t){const n=Xi(e).scrollLeft;return t?t.left+n:jt(Je(e)).left+n}function xp(e){const t=Je(e),n=Xi(e),i=e.ownerDocument.body,r=rn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=rn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+zr(e);const s=-n.scrollTop;return He(i).direction==="rtl"&&(o+=rn(t.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:s}}function kp(e,t){const n=De(e),i=Je(e),r=n.visualViewport;let a=i.clientWidth,o=i.clientHeight,s=0,l=0;if(r){a=r.width,o=r.height;const u=Ea();(!u||u&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:a,height:o,x:s,y:l}}function Ep(e,t){const n=jt(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,a=Ye(e)?an(e):wt(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=r*a.x,u=i*a.y;return{width:o,height:s,x:l,y:u}}function go(e,t,n){let i;if(t==="viewport")i=kp(e,n);else if(t==="document")i=xp(Je(e));else if(ze(t))i=Ep(t,n);else{const r=Qs(e);i={...t,x:t.x-r.x,y:t.y-r.y}}return _i(i)}function el(e,t){const n=Ct(e);return n===t||!ze(n)||ln(n)?!1:He(n).position==="fixed"||el(n,t)}function _p(e,t){const n=t.get(e);if(n)return n;let i=Pn(e,[],!1).filter(s=>ze(s)&&cn(s)!=="body"),r=null;const a=He(e).position==="fixed";let o=a?Ct(e):e;for(;ze(o)&&!ln(o);){const s=He(o),l=ka(o);!l&&s.position==="fixed"&&(r=null),(a?!l&&!r:!l&&s.position==="static"&&r&&["absolute","fixed"].includes(r.position)||Ln(o)&&!l&&el(e,o))?i=i.filter(u=>u!==o):r=s,o=Ct(o)}return t.set(e,i),i}function wp(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const a=[...n==="clippingAncestors"?Gi(t)?[]:_p(t,this._c):[].concat(n),i],o=a[0],s=a.reduce((l,u)=>{const c=go(t,u,r);return l.top=rn(c.top,l.top),l.right=Nr(c.right,l.right),l.bottom=Nr(c.bottom,l.bottom),l.left=rn(c.left,l.left),l},go(t,o,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Cp(e){const{width:t,height:n}=Js(e);return{width:t,height:n}}function Ap(e,t,n){const i=Ye(t),r=Je(t),a=n==="fixed",o=jt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=wt(0);if(i||!i&&!a)if((cn(t)!=="body"||Ln(r))&&(s=Xi(t)),i){const p=jt(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else r&&(l.x=zr(r));let u=0,c=0;if(r&&!i&&!a){const p=r.getBoundingClientRect();c=p.top+s.scrollTop,u=p.left+s.scrollLeft-zr(r,p)}const d=o.left+s.scrollLeft-l.x-u,h=o.top+s.scrollTop-l.y-c;return{x:d,y:h,width:o.width,height:o.height}}function sr(e){return He(e).position==="static"}function mo(e,t){if(!Ye(e)||He(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Je(e)===n&&(n=n.ownerDocument.body),n}function tl(e,t){const n=De(e);if(Gi(e))return n;if(!Ye(e)){let r=Ct(e);for(;r&&!ln(r);){if(ze(r)&&!sr(r))return r;r=Ct(r)}return n}let i=mo(e,t);for(;i&&fp(i)&&sr(i);)i=mo(i,t);return i&&ln(i)&&sr(i)&&!ka(i)?n:i||gp(e)||n}const Sp=async function(e){const t=this.getOffsetParent||tl,n=this.getDimensions,i=await n(e.floating);return{reference:Ap(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Tp(e){return He(e).direction==="rtl"}const Hr={convertOffsetParentRelativeRectToViewportRelativeRect:bp,getDocumentElement:Je,getClippingRect:wp,getOffsetParent:tl,getElementRects:Sp,getClientRects:yp,getDimensions:Cp,getScale:an,isElement:ze,isRTL:Tp};function Ip(e,t){let n=null,i;const r=Je(e);function a(){var s;clearTimeout(i),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:u,top:c,width:d,height:h}=e.getBoundingClientRect();if(s||t(),!d||!h)return;const p=Gn(c),f=Gn(r.clientWidth-(u+d)),g=Gn(r.clientHeight-(c+h)),m=Gn(u),b={rootMargin:-p+"px "+-f+"px "+-g+"px "+-m+"px",threshold:rn(0,Nr(1,l))||1};let v=!0;function E(T){const _=T[0].intersectionRatio;if(_!==l){if(!v)return o();_?o(!1,_):i=setTimeout(()=>{o(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(E,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return o(!0),a}function Fp(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=_a(e),c=r||a?[...u?Pn(u):[],...Pn(t)]:[];c.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const d=u&&s?Ip(u,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(b=>{let[v]=b;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=p)==null||E.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let f,g=l?jt(e):null;l&&m();function m(){const b=jt(e);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,f=requestAnimationFrame(m)}return n(),()=>{var b;c.forEach(v=>{r&&v.removeEventListener("scroll",n),a&&v.removeEventListener("resize",n)}),d?.(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const Dp=pp,Op=dp,Pp=(e,t,n)=>{const i=new Map,r={platform:Hr,...n},a={...r.platform,_c:i};return up(e,t,{...r,platform:a})};function Rp(e,t){let n,i,r;const a=ne(!0),o=()=>{a.value=!0,r()};Ce(e,o,{flush:"sync"});const s=typeof t=="function"?t:t.get,l=typeof t=="function"?void 0:t.set,u=ql((c,d)=>(i=c,r=d,{get(){return a.value&&(n=s(),a.value=!1),i(),n},set(h){l?.(h)}}));return Object.isExtensible(u)&&(u.trigger=o),u}function nl(e){return Wl()?(Gl(e),!0):!1}function wa(e){return typeof e=="function"?e():re(e)}const Mp=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Vp=e=>e!=null,Bp=Object.prototype.toString,Lp=e=>Bp.call(e)==="[object Object]",Np=()=>{};function il(e){var t;const n=wa(e);return(t=n?.$el)!=null?t:n}const rl=Mp?window:void 0;function jp(...e){let t,n,i,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,i,r]=e,t=rl):[t,n,i,r]=e,!t)return Np;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const a=[],o=()=>{a.forEach(c=>c()),a.length=0},s=(c,d,h,p)=>(c.addEventListener(d,h,p),()=>c.removeEventListener(d,h,p)),l=Ce(()=>[il(t),wa(r)],([c,d])=>{if(o(),!c)return;const h=Lp(d)?{...d}:d;a.push(...n.flatMap(p=>i.map(f=>s(c,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return nl(u),u}function $p(){const e=ne(!1),t=Zo();return t&&zt(()=>{e.value=!0},t),e}function zp(e){const t=$p();return U(()=>(t.value,!!e()))}function Hp(e,t,n={}){const{window:i=rl,...r}=n;let a;const o=zp(()=>i&&"MutationObserver"in i),s=()=>{a&&(a.disconnect(),a=void 0)},l=U(()=>{const h=wa(e),p=(Array.isArray(h)?h:[h]).map(il).filter(Vp);return new Set(p)}),u=Ce(()=>l.value,h=>{s(),o.value&&h.size&&(a=new MutationObserver(t),h.forEach(p=>a.observe(p,r)))},{immediate:!0,flush:"post"}),c=()=>a?.takeRecords(),d=()=>{s(),u()};return nl(d),{isSupported:o,stop:d,takeRecords:c}}function al(e){const t=Zo(),n=Rp(()=>null,()=>t.proxy.$el);return $l(n.trigger),zt(n.trigger),n}function qp(e){return Up(e)}function lr(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Up(e){for(let t=e;t;t=lr(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=lr(e);t;t=lr(t)){if(!(t instanceof Element))continue;const n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||n.filter!=="none"||t.tagName==="BODY"))return t}return null}const Wp=oe({inheritAttrs:!1,__name:"Dropdown",props:{items:{},placement:{default:"bottom-start"},teleport:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},theme:{default:"border"},teleportTo:{default:"body"},offset:{default:8},variant:{},size:{},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{},stateTimeout:{},confirmLabel:{},label:{},icon:{},iconLeft:{},iconRight:{default:"fa-pro-regular:angle-down"}},setup(e,{expose:t}){const n=e,i=U(()=>{const{items:v,placement:E,teleport:T,keepOpen:_,...S}=n;return S}),r=ne(!1),a=al(),o=ne(),s=ne(),l=ne({top:"",left:"",position:""});let u=()=>{};function c(){!o.value||!s.value||(u=Fp(o.value.$el,s.value,()=>{!o.value||!s.value||Pp(o.value.$el,s.value,{placement:n.placement,middleware:[Dp(n.offset),Op()],platform:{...Hr,getOffsetParent:v=>Hr.getOffsetParent(v,qp)}}).then(({x:v,y:E})=>{l.value={top:`${E}px`,left:`${v}px`,position:"absolute"}})}))}Jr(u),Xo(()=>{if(r.value)return c();u()});const d=({target:v},E="dom")=>{if(v instanceof Element&&!(!o.value||!s.value)){if(E==="dom")return[o.value.$el,s.value].some(T=>T&&(v===T||T.contains(v)))?void 0:p(!1);if(E==="shadow-dom"){const T=a.value.getRootNode();return v.shadowRoot===T?void 0:p(!1)}}},h=({key:v})=>v==="Escape"&&p(!1),p=(v=!r.value)=>(v?m():b(),r.value=v,!0),f=U(()=>a.value.getRootNode()),g=U(()=>f.value instanceof ShadowRoot);function m(){window.addEventListener("keydown",h),g.value?(f.value.addEventListener("click",v=>d(v)),window.addEventListener("click",v=>d(v,"shadow-dom"))):window.addEventListener("click",d)}function b(){window.removeEventListener("keydown",h),g.value?(f.value.removeEventListener("click",v=>d(v)),window.removeEventListener("click",v=>d(v,"shadow-dom"))):window.removeEventListener("click",d)}return t({isOpen:r}),(v,E)=>(A(),P(rt,null,[Ne(Lt,te({...i.value,...v.$attrs},{onClick:E[0]||(E[0]=Yo(()=>p(),["stop"])),ref_key:"trigger",ref:o,class:"k-dropdown-trigger"}),Uo({_:2},[v.$slots["icon-left"]?{name:"icon-left",fn:ve(()=>[z(v.$slots,"icon-left")]),key:"0"}:void 0,v.$slots.trigger?{name:"default",fn:ve(()=>[z(v.$slots,"trigger")]),key:"1"}:void 0,v.$slots["icon-right"]?{name:"icon-right",fn:ve(()=>[z(v.$slots,"icon-right")]),key:"2"}:void 0]),1040),(A(),ue(Wo,{to:v.teleportTo,disabled:!v.teleport},[Ne(Ko,{name:"k-dropdown"},{default:ve(()=>[r.value?(A(),P("div",{key:0,class:Oe(`k-dropdown k-dropdown--theme-${v.theme}`),style:At(l.value),ref_key:"content",ref:s,onClick:E[1]||(E[1]=()=>!v.keepOpen&&p(!1))},[z(v.$slots,"default",{close:p.bind(null,!1)},()=>[(A(!0),P(rt,null,nn(v.items,({action:T,icon:_,...S})=>(A(),ue(Lt,te({ref_for:!0},S,{variant:"tertiary","icon-right":S.iconRight||_,onClick:()=>T()}),null,16,["icon-right","onClick"]))),256))])],6)):W("",!0)]),_:3})],8,["to","disabled"]))],64))}}),Gp={key:0,class:"k-datatable__row"},Xp={key:0,class:"k-datatable__cell k-datatable__cell-select"},Yp=["data-col-id","onClick"],Kp=["innerHTML"],Zp={key:1,class:"k-datatable__cell k-datatable__cell-actions"},Jp={key:0,class:"k-datatable__cell k-datatable__cell-select"},Qp={key:1,class:"k-datatable__cell k-datatable__cell-actions"},ef={key:0,class:"k-datatable__footer"},Am=oe({__name:"DataTable",props:{items:{},selected:{},theme:{default:"default"},header:{type:Boolean,default:!0},sticky:{type:[Boolean,String]},sortBy:{},sortableBy:{default:()=>[]},isDisabled:{type:Function,default:()=>!1},columns:{},labels:{default:()=>({selection:"Valgt",resetSelection:"Tilbakestill valg"})},cellWrapper:{type:Function,default:()=>({component:"div"})},rowWrapper:{type:Function,default:()=>({component:"div"})}},emits:["update:selected","update:sortBy"],setup(e,{emit:t}){const n=e,i=zl(),r=t,a=ne([-1]),o=U(()=>n.items.filter(f=>!n.isDisabled(f))),s=U(()=>!!n.selected),l=U(()=>!!(Object.keys(n.sortBy||{}).length&&n.sortableBy.length)),u=U(()=>!!i.rowActions),c=U({get:()=>!!(o.value.length&&o.value.every(f=>n.selected&&n.selected.includes(f))),set:f=>r("update:selected",f?[...o.value]:[])}),d=U(()=>[s.value?"2.5rem":!1,...n.columns.filter(({disabled:f})=>!f).map(f=>f.size||"auto"),u.value?"0px":!1].filter(Boolean).join(" "));function h(f){var g;if(!l.value||!n.sortableBy.includes(f))return;let m=((g=n.sortBy)==null?void 0:g[f])||-1;r("update:sortBy",{[f]:m*-1})}function p(f,g){if(!f.isTrusted||!(f.target instanceof HTMLInputElement))return;let m=a.value.slice(-1).pop()||-1,b=[];if(f.shiftKey){let v=m>g,E=m+(v?-1:1);for(;v?E>g:E<g;){let T=n.items[E];!(n.selected||[]).includes(T)&&!n.isDisabled(T)&&b.push(T),v?E--:E++}}f.target.checked?a.value.push(g):m===g&&a.value.pop(),r("update:selected",[...n.selected||[],...b])}return(f,g)=>(A(),P("div",{class:Oe([`k-datatable k-datatable--${f.theme}`,{"k-datatable--sticky":!!f.sticky,"k-datatable--no-header":!f.header}]),style:At(`--k-datatable-layout: ${d.value}; --k-datatable-sticky-top: ${typeof f.sticky=="string"?f.sticky:"0"}`)},[f.header?(A(),P("div",Gp,[s.value?(A(),P("div",Xp,[Ne(lo,{class:"k-datatable__checkbox",modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=m=>c.value=m),disabled:!f.items.length},null,8,["modelValue","disabled"])])):W("",!0),(A(!0),P(rt,null,nn(f.columns.filter(({disabled:m})=>!m),m=>(A(),P("div",{class:Oe(["k-datatable__cell",`k-datatable__cell--text-align-${m.align||"start"}`,{"k-datatable__cell-sort":l.value&&f.sortableBy.includes(m.id),"k-datatable__cell-sort--active":m.id in(f.sortBy||{})}]),key:m.id,"data-col-id":m.id,onClick:b=>h(m.id)},[z(f.$slots,`${m.id}-label`,{item:m},()=>[ee("span",{innerHTML:m.label},null,8,Kp)]),Ne(re(Vt),{class:"k-datatable__cell-sort-icon",icon:(f.sortBy||{})[m.id]<0?"fa-pro-solid:caret-up":"fa-pro-solid:caret-down"},null,8,["icon"])],10,Yp))),128)),u.value?(A(),P("div",Zp)):W("",!0)])):W("",!0),(A(!0),P(rt,null,nn(f.items,(m,b)=>(A(),P("div",{class:"k-datatable__row",key:b},[s.value?(A(),P("div",Jp,[Ne(lo,{class:"k-datatable__checkbox","model-value":f.selected||[],"onUpdate:modelValue":g[1]||(g[1]=v=>r("update:selected",v)),value:m,onMousedown:g[2]||(g[2]=Yo(()=>{},["prevent"])),onClick:v=>p(v,b),disabled:f.isDisabled(m)},null,8,["model-value","value","onClick","disabled"])])):W("",!0),(A(),ue(kt(f.rowWrapper(m).component),te({class:"k-datatable__row-wrapper",ref_for:!0},f.rowWrapper(m).bind),{default:ve(()=>[(A(!0),P(rt,null,nn(f.columns.filter(({disabled:v})=>!v),(v,E)=>(A(),ue(kt(f.cellWrapper(m,v).component),te({ref_for:!0},f.cellWrapper(m,v).bind,{class:`k-datatable__cell k-datatable__cell--text-align-${v.align||"start"}`,key:`col-${v.id}`,"data-cell-id":v.id}),{default:ve(()=>[z(f.$slots,v.id,{item:m,column:v,rowIndex:b,colIndex:E})]),_:2},1040,["class","data-cell-id"]))),128))]),_:2},1040)),f.$slots["row-actions"]?(A(),P("div",Qp,[z(f.$slots,"row-actions",{item:m})])):W("",!0)]))),128)),Ne(Ko,{name:"k-datatable-footer"},{default:ve(()=>{var m,b;return[f.$slots.footer||(m=f.selected)!=null&&m.length?(A(),P("div",ef,[(b=f.selected)!=null&&b.length?(A(),ue(Wp,{key:0,label:`${f.labels.selection} (${f.selected.length})`,teleport:""},{default:ve(()=>[z(f.$slots,"select-actions"),Ne(Lt,{label:f.labels.resetSelection,"icon-right":"fa-pro-light:times-square",variant:"tertiary",onClick:g[3]||(g[3]=v=>r("update:selected",[]))},null,8,["label"])]),_:3},8,["label"])):W("",!0),z(f.$slots,"footer")])):W("",!0)]}),_:3})],6))}});var qr,Ft=new Map,tf=e=>e.getBoundingClientRect();function nf(e,t){const{scope:n="rect",getRect:i=tf,onChange:r}=t,a=rf({scope:n,getRect:i}),o=Ft.get(e);return o?(o.callbacks.push(r),r(i(e))):(Ft.set(e,{rect:{},callbacks:[r]}),Ft.size===1&&(qr=requestAnimationFrame(a))),function(){const s=Ft.get(e);if(!s)return;const l=s.callbacks.indexOf(r);l>-1&&s.callbacks.splice(l,1),s.callbacks.length===0&&(Ft.delete(e),Ft.size===0&&cancelAnimationFrame(qr))}}function rf(e){const{scope:t,getRect:n}=e,i=of(t);return function r(){const a=[];Ft.forEach((o,s)=>{const l=n(s);i(o.rect,l)||(o.rect=l,a.push(o))}),a.forEach(o=>{o.callbacks.forEach(s=>s(o.rect))}),qr=requestAnimationFrame(r)}}var ol=(e,t)=>e.width===t.width&&e.height===t.height,sl=(e,t)=>e.top===t.top&&e.left===t.left,af=(e,t)=>ol(e,t)&&sl(e,t);function of(e){return e==="size"?ol:e==="position"?sl:af}var sf=mt("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Gt=sf.build(),Y=Rn({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`radio-group:${e.id}`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`radio-group:${e.id}:label`},getItemId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.item)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:${t}`},getItemHiddenInputId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.itemHiddenInput)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:input:${t}`},getItemControlId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.itemControl)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:control:${t}`},getItemLabelId:(e,t)=>{var n,i;return((i=(n=e.ids)==null?void 0:n.itemLabel)==null?void 0:i.call(n,t))??`radio-group:${e.id}:radio:label:${t}`},getIndicatorId:e=>{var t;return((t=e.ids)==null?void 0:t.indicator)??`radio-group:${e.id}:indicator`},getRootEl:e=>Y.getById(e,Y.getRootId(e)),getItemHiddenInputEl:(e,t)=>Y.getById(e,Y.getItemHiddenInputId(e,t)),getIndicatorEl:e=>Y.getById(e,Y.getIndicatorId(e)),getFirstEnabledInputEl:e=>{var t;return(t=Y.getRootEl(e))==null?void 0:t.querySelector("input:not(:disabled)")},getFirstEnabledAndCheckedInputEl:e=>{var t;return(t=Y.getRootEl(e))==null?void 0:t.querySelector("input:not(:disabled):checked")},getInputEls:e=>{const t=`input[type=radio][data-ownedby='${CSS.escape(Y.getRootId(e))}']:not([disabled])`;return _s(Y.getRootEl(e),t)},getActiveRadioEl:e=>{if(e.value)return Y.getById(e,Y.getItemId(e,e.value))},getOffsetRect:e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),getRectById:(e,t)=>{const n=Y.getById(e,Y.getItemId(e,t));if(n)return Y.resolveRect(Y.getOffsetRect(n))},resolveRect:e=>({width:`${e.width}px`,height:`${e.height}px`,left:`${e.left}px`,top:`${e.top}px`})});function lf(e,t,n){const i=e.context.isDisabled,r=e.context.readOnly;function a(l){return{invalid:!!l.invalid,disabled:!!l.disabled||i,checked:e.context.value===l.value,focused:e.context.focusedValue===l.value,hovered:e.context.hoveredValue===l.value,active:e.context.activeValue===l.value}}function o(l){const u=a(l);return{"data-focus":R(u.focused),"data-focus-visible":R(u.focused&&e.context.focusVisible),"data-disabled":R(u.disabled),"data-readonly":R(r),"data-state":u.checked?"checked":"unchecked","data-hover":R(u.hovered),"data-invalid":R(u.invalid),"data-orientation":e.context.orientation,"data-ssr":R(e.context.ssr)}}const s=()=>{const l=Y.getFirstEnabledAndCheckedInputEl(e.context);if(l){l.focus();return}const u=Y.getFirstEnabledInputEl(e.context);u?.focus()};return{focus:s,value:e.context.value,setValue(l){t({type:"SET_VALUE",value:l,isTrusted:!1})},clearValue(){t({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return n.element({...Gt.root.attrs,role:"radiogroup",id:Y.getRootId(e.context),"aria-labelledby":Y.getLabelId(e.context),"data-orientation":e.context.orientation,"data-disabled":R(i),"aria-orientation":e.context.orientation,dir:e.context.dir,style:{position:"relative"}})},getLabelProps(){return n.element({...Gt.label.attrs,dir:e.context.dir,"data-orientation":e.context.orientation,"data-disabled":R(i),id:Y.getLabelId(e.context),onClick:s})},getItemState:a,getItemProps(l){const u=a(l);return n.label({...Gt.item.attrs,dir:e.context.dir,id:Y.getItemId(e.context,l.value),htmlFor:Y.getItemHiddenInputId(e.context,l.value),...o(l),onPointerMove(){u.disabled||u.hovered||t({type:"SET_HOVERED",value:l.value,hovered:!0})},onPointerLeave(){u.disabled||t({type:"SET_HOVERED",value:null})},onPointerDown(c){u.disabled||(u.focused&&c.pointerType==="mouse"&&c.preventDefault(),t({type:"SET_ACTIVE",value:l.value,active:!0}))},onPointerUp(){u.disabled||t({type:"SET_ACTIVE",value:null})}})},getItemTextProps(l){return n.element({...Gt.itemText.attrs,dir:e.context.dir,id:Y.getItemLabelId(e.context,l.value),...o(l)})},getItemControlProps(l){const u=a(l);return n.element({...Gt.itemControl.attrs,dir:e.context.dir,id:Y.getItemControlId(e.context,l.value),"data-active":R(u.active),"aria-hidden":!0,...o(l)})},getItemHiddenInputProps(l){const u=a(l);return n.input({"data-ownedby":Y.getRootId(e.context),id:Y.getItemHiddenInputId(e.context,l.value),type:"radio",name:e.context.name||e.context.id,form:e.context.form,value:l.value,onClick(c){if(r){c.preventDefault();return}c.currentTarget.checked&&t({type:"SET_VALUE",value:l.value,isTrusted:!0})},onBlur(){t({type:"SET_FOCUSED",value:null,focused:!1,focusVisible:!1})},onFocus(){const c=In();t({type:"SET_FOCUSED",value:l.value,focused:!0,focusVisible:c})},onKeyDown(c){c.defaultPrevented||c.key===" "&&t({type:"SET_ACTIVE",value:l.value,active:!0})},onKeyUp(c){c.defaultPrevented||c.key===" "&&t({type:"SET_ACTIVE",value:null})},disabled:u.disabled,defaultChecked:u.checked,style:ua})},getIndicatorProps(){var l,u,c,d;return n.element({id:Y.getIndicatorId(e.context),...Gt.indicator.attrs,dir:e.context.dir,hidden:e.context.value==null,"data-disabled":R(i),"data-orientation":e.context.orientation,style:{"--transition-property":"left, top, width, height","--left":(l=e.context.indicatorRect)==null?void 0:l.left,"--top":(u=e.context.indicatorRect)==null?void 0:u.top,"--width":(c=e.context.indicatorRect)==null?void 0:c.width,"--height":(d=e.context.indicatorRect)==null?void 0:d.height,position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:e.context.canIndicatorTransition?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",[e.context.orientation==="horizontal"?"left":"top"]:e.context.orientation==="horizontal"?"var(--left)":"var(--top)"}})}}}var{not:uf}=pa;function cf(e){const t=lt(e);return Mn({id:"radio",initial:"idle",context:{value:null,activeValue:null,focusedValue:null,hoveredValue:null,disabled:!1,orientation:"vertical",...t,indicatorRect:{},canIndicatorTransition:!1,fieldsetDisabled:!1,focusVisible:!1,ssr:!0},computed:{isDisabled:n=>!!n.disabled||n.fieldsetDisabled},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],activities:["trackFormControlState","trackFocusVisible"],watch:{value:["setIndicatorTransition","syncIndicatorRect","syncInputElements"]},on:{SET_VALUE:[{guard:uf("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:"setHovered"},SET_ACTIVE:{actions:"setActive"},SET_FOCUSED:{actions:"setFocused"}},states:{idle:{}}},{guards:{isTrusted:(n,i)=>!!i.isTrusted},activities:{trackFormControlState(n,i,{send:r,initialContext:a}){return Ni(Y.getRootEl(n),{onFieldsetDisabledChange(o){n.fieldsetDisabled=o},onFormReset(){r({type:"SET_VALUE",value:a.value})}})},trackFocusVisible(n){return ca({root:Y.getRootNode(n)})}},actions:{setValue(n,i){hf.value(n,i.value)},setHovered(n,i){n.hoveredValue=i.value},setActive(n,i){n.activeValue=i.value},setFocused(n,i){n.focusedValue=i.value,n.focusVisible=i.focusVisible},syncInputElements(n){Y.getInputEls(n).forEach(i=>{i.checked=i.value===n.value})},setIndicatorTransition(n){n.canIndicatorTransition=je(n.value)},cleanupObserver(n){var i;(i=n.indicatorCleanup)==null||i.call(n)},syncSsr(n){n.ssr=!1},syncIndicatorRect(n){var i;if((i=n.indicatorCleanup)==null||i.call(n),!Y.getIndicatorEl(n))return;const r=n.value,a=Y.getActiveRadioEl(n);if(r==null||!a){n.indicatorRect={};return}n.indicatorCleanup=nf(a,{getRect(o){return Y.getOffsetRect(o)},onChange(o){n.indicatorRect=Y.resolveRect(o),la(()=>{n.canIndicatorTransition=!1})}})},dispatchChangeEvent(n){Y.getInputEls(n).forEach(i=>{const r=i.value===n.value;r!==i.checked&&ma(i,{checked:r})})}}})}var df={change:e=>{var t;e.value!=null&&((t=e.onValueChange)==null||t.call(e,{value:e.value}))}},hf={value:(e,t)=>{vt(e.value,t)||(e.value=t,df.change(e))}};qt()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value"]);qt()(["value","disabled","invalid"]);const pf=["aria-describedby"],Sm=oe({__name:"RadioGroup",props:{label:{},modelValue:{},items:{},variant:{default:"radio"},direction:{default:"vertical"},disabled:{type:Boolean},getRootNode:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=qo(va,U(()=>({label:""}))),i=e,r=t,a={id:_t(),name:_t(),...i,value:i.modelValue,onValueChange:({value:u})=>r("update:modelValue",u),getRootNode:i.getRootNode},[o,s]=Bn(cf(a),{context:U(()=>i)}),l=U(()=>lf(o.value,s,Vn));return Ce(()=>i.modelValue,u=>l.value.setValue(u)),(u,c)=>(A(),P("div",te({class:["k-radiogroup",`k-radiogroup--variant-${u.variant} k-radiogroup--direction-${u.direction}`]},l.value.getRootProps(),{"aria-describedby":re(n).helpId}),[u.variant==="radio"&&(re(n).label||u.label)?(A(),P("span",ye(te({key:0},l.value.getLabelProps())),de(re(n).label||u.label),17)):W("",!0),u.variant==="segment"?(A(),P("div",ye(te({key:1},l.value.getIndicatorProps())),null,16)):W("",!0),(A(!0),P(rt,null,nn(u.items,d=>(A(),P("label",te({ref_for:!0},l.value.getItemProps({value:d.id})),[ee("span",te({ref_for:!0},l.value.getItemTextProps({value:d.id})),de(d.label),17),ee("input",te({ref_for:!0},l.value.getItemHiddenInputProps({value:d.id})),null,16),ee("div",te({ref_for:!0},l.value.getItemControlProps({value:d.id})),null,16)],16))),256))],16,pf))}}),Tm=oe({__name:"Grid",props:{is:{default:"div"},columns:{default:1},align:{},rows:{},gap:{default:"default"},areas:{}},setup(e){const t=e,n=(a,o)=>a?typeof a=="number"||typeof a=="string"&&a.match(/^\d+$/)?`repeat(${a}, 1fr)`:a.match(/^(\d+\s?)+$/)?a.split(" ").map(s=>`${s}fr`).join(" "):a:o,i=a=>{if(a)return Array.isArray(a)?a.map(o=>`"${o}"`).join(`
|
|
2
|
+
`):a.split("|").map(o=>o.trim()).map(o=>`"${o}"`).join(`
|
|
3
|
+
`)},r=U(()=>gs("grid",{columns:n(t.columns,"1fr"),align:mi(t.align)||"initial",rows:n(t.rows,"auto"),gap:oa(t.gap),areas:i(t.areas)||"unset"}));return(a,o)=>(A(),ue(kt(a.is),{class:"k-grid",style:At(r.value)},{default:ve(()=>[z(a.$slots,"default")]),_:3},8,["style"]))}});function ll(e){return e?e.flatMap(t=>{const{type:n,children:i}=t;return n===rt?ll(i):[t]}):[]}const Im=oe({props:{area:String,align:String},inheritAttrs:!1,setup({area:e,align:t},{slots:n}){return()=>{if(!n.default)return null;const[i]=ll(n.default());if(!i)return null;const r=te({style:{"--k-grid-item-area":e,"--k-grid-item-align-self":mi(t)||"initial"}},i.props??{});return Ll(i,r)}}}),Fm=oe({__name:"Flex",props:{is:{default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(e){const t=e,n=U(()=>gs("flex",{justify:mi(t.justify)||"initial",align:mi(t.align)||"initial",wrap:t.nowrap?"nowrap":"wrap",gap:oa(t.gap),direction:t.direction}));return(i,r)=>(A(),ue(kt(i.is),{class:"k-flex",style:At(n.value)},{default:ve(()=>[z(i.$slots,"default")]),_:3},8,["style"]))}}),ff={key:0,class:"k-scroller__indicator"},Dm=oe({__name:"Scroller",props:{is:{default:"div"},appearance:{default:"default"},treshhold:{default:80}},setup(e){const t=_t({prefix:"k-scroller-"}),n=e,i=ne({top:!1,right:!1,left:!1,bottom:!1}),r=U(()=>Object.entries(i.value).filter(([,o])=>o).map(([o])=>o)),a=o=>{const{scrollWidth:s,scrollHeight:l,clientWidth:u,clientHeight:c,scrollTop:d,scrollLeft:h}=o,p=s-u>=n.treshhold,f=l-c>=n.treshhold;i.value={top:f&&d<=n.treshhold,left:p&&h<=n.treshhold,bottom:f&&d>=l-c-n.treshhold,right:p&&h>=s-u-n.treshhold}};return zt(()=>{const o=document.getElementById(t);o&&(jp(o,"scroll",()=>a(o)),Hp(o,()=>a(o),{childList:!0,subtree:!0}))}),(o,s)=>(A(),ue(kt(o.is),{id:re(t),class:Oe([`k-scroller k-scroller--appearance-${o.appearance}`,...r.value.map(l=>`k-scroller--scrolled-to-${l}`)])},{default:ve(()=>[o.appearance==="indicator"?(A(),P("div",ff,[z(o.$slots,"indicator",{},()=>[Ne(re(Vt),{icon:"fa-pro-thin:arrow-right"})])])):W("",!0),z(o.$slots,"default")]),_:3},8,["id","class"]))}});var gf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xt=new WeakMap,Xn=new WeakMap,Yn={},ur=0,ul=function(e){return e&&(e.host||ul(e.parentNode))},mf=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=ul(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},vf=function(e,t,n,i){var r=mf(t,Array.isArray(e)?e:[e]);Yn[n]||(Yn[n]=new WeakMap);var a=Yn[n],o=[],s=new Set,l=new Set(r),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};r.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(i),f=p!==null&&p!=="false",g=(Xt.get(h)||0)+1,m=(a.get(h)||0)+1;Xt.set(h,g),a.set(h,m),o.push(h),g===1&&f&&Xn.set(h,!0),m===1&&h.setAttribute(n,"true"),f||h.setAttribute(i,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return c(t),s.clear(),ur++,function(){o.forEach(function(d){var h=Xt.get(d)-1,p=a.get(d)-1;Xt.set(d,h),a.set(d,p),h||(Xn.has(d)||d.removeAttribute(i),Xn.delete(d)),p||d.removeAttribute(n)}),ur--,ur||(Xt=new WeakMap,Xt=new WeakMap,Xn=new WeakMap,Yn={})}},bf=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=gf(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live]"))),vf(i,r,n,"aria-hidden")):function(){return null}},yf=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function xf(e,t={}){const{defer:n=!0}=t,i=n?yf:a=>a(),r=[];return r.push(i(()=>{const a=(typeof e=="function"?e():e).filter(Boolean);r.push(bf(a))})),()=>{r.forEach(a=>a?.())}}function kf(e){const t={each(n){var i;for(let r=0;r<((i=e.frames)==null?void 0:i.length);r+=1){const a=e.frames[r];a&&n(a)}},addEventListener(n,i,r){return t.each(a=>{try{a.document.addEventListener(n,i,r)}catch{}}),()=>{try{t.removeEventListener(n,i,r)}catch{}}},removeEventListener(n,i,r){t.each(a=>{try{a.document.removeEventListener(n,i,r)}catch{}})}};return t}function Ef(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,i,r)=>{try{t?.addEventListener(n,i,r)}catch{}return()=>{try{t?.removeEventListener(n,i,r)}catch{}}},removeEventListener:(n,i,r)=>{try{t?.removeEventListener(n,i,r)}catch{}}}}var vo="pointerdown.outside",bo="focus.outside";function _f(e){for(const t of e)if(Xe(t)&&ks(t))return!0;return!1}var cl=e=>"clientY"in e;function wf(e,t){if(!cl(t)||!e)return!1;const 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 yo(e,t){if(!t||!cl(e))return!1;const n=t.scrollHeight>t.clientHeight&&e.clientX>t.clientWidth,i=t.scrollWidth>t.clientWidth&&e.clientY>t.clientHeight;return n||i}function Cf(e,t){const{exclude:n,onFocusOutside:i,onPointerDownOutside:r,onInteractOutside:a,defer:o}=t;if(!e)return;const s=Ze(e),l=ot(e),u=kf(l),c=Ef(l);function d(b){const v=st(b);if(!Xe(v)||Tn(e,v)||wf(e,b)||yo(b,v))return!1;const E=Es(e);return yo(b,E)?!1:!(n!=null&&n(v))}const h=new Set;function p(b){function v(){var E;const T=o?Et:S=>S(),_=((E=b.composedPath)==null?void 0:E.call(b))??[b.target];T(()=>{if(!(!e||!d(b))){if(r||a){const S=Za(r,a);e.addEventListener(vo,S,{once:!0})}to(e,vo,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:yd(b),focusable:_f(_)}})}})}b.pointerType==="touch"?(h.forEach(E=>E()),h.add(_e(s,"click",v,{once:!0})),h.add(c.addEventListener("click",v,{once:!0})),h.add(u.addEventListener("click",v,{once:!0}))):v()}const f=new Set,g=setTimeout(()=>{f.add(_e(s,"pointerdown",p,!0)),f.add(c.addEventListener("pointerdown",p,!0)),f.add(u.addEventListener("pointerdown",p,!0))},0);function m(b){(o?Et:v=>v())(()=>{if(!(!e||!d(b))){if(i||a){const v=Za(i,a);e.addEventListener(bo,v,{once:!0})}to(e,bo,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:!1,focusable:ks(st(b))}})}})}return f.add(_e(s,"focusin",m,!0)),f.add(c.addEventListener("focusin",m,!0)),f.add(u.addEventListener("focusin",m,!0)),()=>{clearTimeout(g),h.forEach(b=>b()),f.forEach(b=>b())}}function Af(e,t){const{defer:n}=t,i=n?Et:a=>a(),r=[];return r.push(i(()=>{const a=typeof e=="function"?e():e;r.push(Cf(a,t))})),()=>{r.forEach(a=>a?.())}}function Sf(e,t){const n=i=>{i.key==="Escape"&&(i.isComposing||t==null||t(i))};return _e(Ze(e),"keydown",n,{capture:!0})}var Le={layers:[],branches:[],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){var t;const n=this.indexOf(e),i=this.topMostPointerBlockingLayer()?this.indexOf((t=this.topMostPointerBlockingLayer())==null?void 0:t.node):-1;return n<i},isTopMost(e){const t=this.layers[this.count()-1];return t?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Tn(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Tn(t,e))},add(e){const t=this.layers.push(e);e.node.style.setProperty("--layer-index",`${t}`)},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>n.dismiss()),this.layers.splice(t,1),e.style.removeProperty("--layer-index"))},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){var t;(t=this.layers[this.indexOf(e)])==null||t.dismiss()},clear(){this.remove(this.layers[0].node)}},xo;function ko(){Le.layers.forEach(({node:e})=>{e.style.pointerEvents=Le.isBelowPointerBlockingLayer(e)?"none":"auto"})}function Tf(e){e.style.pointerEvents=""}function If(e,t){const n=Ze(e),i=[];if(Le.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(xo=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t){const r=Dc(t,a=>{i.push(Tc(a,{pointerEvents:"auto"}))});i.push(r)}return()=>{Le.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=xo,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),i.forEach(r=>r()))}}function Ff(e,t){if(!e){ai("[@zag-js/dismissable] node is `null` or `undefined`");return}const{onDismiss:n,pointerBlocking:i,exclude:r,debug:a}=t,o={dismiss:n,node:e,pointerBlocking:i};Le.add(o),ko();function s(h){var p,f;const g=st(h.detail.originalEvent);Le.isBelowPointerBlockingLayer(e)||Le.isInBranch(g)||((p=t.onPointerDownOutside)==null||p.call(t,h),(f=t.onInteractOutside)==null||f.call(t,h),!h.defaultPrevented&&(a&&console.log("onPointerDownOutside:",h.detail.originalEvent),n?.()))}function l(h){var p,f;const g=st(h.detail.originalEvent);Le.isInBranch(g)||((p=t.onFocusOutside)==null||p.call(t,h),(f=t.onInteractOutside)==null||f.call(t,h),!h.defaultPrevented&&(a&&console.log("onFocusOutside:",h.detail.originalEvent),n?.()))}function u(h){var p;Le.isTopMost(e)&&((p=t.onEscapeKeyDown)==null||p.call(t,h),!h.defaultPrevented&&n&&(h.preventDefault(),n()))}function c(h){var p;if(!e)return!1;const f=typeof r=="function"?r():r,g=Array.isArray(f)?f:[f],m=(p=t.persistentElements)==null?void 0:p.map(b=>b()).filter(Xe);return m&&g.push(...m),g.some(b=>Tn(b,h))||Le.isInNestedLayer(e,h)}const d=[i?If(e,t.persistentElements):void 0,Sf(e,u),Af(e,{exclude:c,onFocusOutside:l,onPointerDownOutside:s,defer:t.defer})];return()=>{Le.remove(e),ko(),Tf(e),d.forEach(h=>h?.())}}function Df(e,t){const{defer:n}=t,i=n?Et:a=>a(),r=[];return r.push(i(()=>{const a=Fn(e)?e():e;r.push(Ff(a,t))})),()=>{r.forEach(a=>a?.())}}var cr="data-scroll-lock";function Eo(e,t){if(!e)return;const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Of(e,t,n){if(!e)return;const i=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{i?e.style.setProperty(t,i):e.style.removeProperty(t)}}function Pf(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Rf(e){const t=e??document,n=t.defaultView??window,{documentElement:i,body:r}=t;if(r.hasAttribute(cr))return;r.setAttribute(cr,"");const a=n.innerWidth-i.clientWidth,o=()=>Of(i,"--scrollbar-width",`${a}px`),s=Pf(i),l=()=>Eo(r,{overflow:"hidden",[s]:`${a}px`}),u=()=>{const{scrollX:d,scrollY:h,visualViewport:p}=n,f=p?.offsetLeft??0,g=p?.offsetTop??0,m=Eo(r,{position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(g))}px`,left:`${-(d-Math.floor(f))}px`,right:"0",[s]:`${a}px`});return()=>{m?.(),n.scrollTo({left:d,top:h,behavior:"instant"})}},c=[o(),sa()?u():l()];return()=>{c.forEach(d=>d?.()),r.removeAttribute(cr)}}/*!
|
|
4
4
|
* tabbable 6.2.0
|
|
5
5
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
6
|
-
*/var
|
|
7
|
-
* focus-trap 7.
|
|
6
|
+
*/var dl=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],wi=dl.join(","),hl=typeof Element>"u",$t=hl?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ci=!hl&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ai=function e(t,n){var i;n===void 0&&(n=!0);var r=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),a=r===""||r==="true",o=a||n&&t&&e(t.parentNode);return o},Mf=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},pl=function(e,t,n){if(Ai(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(wi));return t&&$t.call(e,wi)&&i.unshift(e),i=i.filter(n),i},fl=function e(t,n,i){for(var r=[],a=Array.from(t);a.length;){var o=a.shift();if(!Ai(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),l=s.length?s:o.children,u=e(l,!0,i);i.flatten?r.push.apply(r,u):r.push({scopeParent:o,candidates:u})}else{var c=$t.call(o,wi);c&&i.filter(o)&&(n||!t.includes(o))&&r.push(o);var d=o.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(o),h=!Ai(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(o));if(d&&h){var p=e(d===!0?o.children:d.children,!0,i);i.flatten?r.push.apply(r,p):r.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return r},gl=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pt=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Mf(e))&&!gl(e)?0:e.tabIndex},Vf=function(e,t){var n=Pt(e);return n<0&&t&&!gl(e)?0:n},Bf=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ml=function(e){return e.tagName==="INPUT"},Lf=function(e){return ml(e)&&e.type==="hidden"},Nf=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},jf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},$f=function(e){if(!e.name)return!0;var t=e.form||Ci(e),n=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var r=jf(i,e.form);return!r||r===e},zf=function(e){return ml(e)&&e.type==="radio"},Hf=function(e){return zf(e)&&!$f(e)},qf=function(e){var t,n=e&&Ci(e),i=(t=n)===null||t===void 0?void 0:t.host,r=!1;if(n&&n!==e){var a,o,s;for(r=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||e!=null&&(s=e.ownerDocument)!==null&&s!==void 0&&s.contains(e));!r&&i;){var l,u,c;n=Ci(i),i=(l=n)===null||l===void 0?void 0:l.host,r=!!((u=i)!==null&&u!==void 0&&(c=u.ownerDocument)!==null&&c!==void 0&&c.contains(i))}}return r},_o=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return n===0&&i===0},Uf=function(e,t){var n=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var r=$t.call(e,"details>summary:first-of-type"),a=r?e.parentElement:e;if($t.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var o=e;e;){var s=e.parentElement,l=Ci(e);if(s&&!s.shadowRoot&&i(s)===!0)return _o(e);e.assignedSlot?e=e.assignedSlot:!s&&l!==e.ownerDocument?e=l.host:e=s}e=o}if(qf(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return _o(e);return!1},Wf=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var i=t.children.item(n);if(i.tagName==="LEGEND")return $t.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},Si=function(e,t){return!(t.disabled||Ai(t)||Lf(t)||Uf(t,e)||Nf(t)||Wf(t))},Ur=function(e,t){return!(Hf(t)||Pt(t)<0||!Si(e,t))},Gf=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Xf=function e(t){var n=[],i=[];return t.forEach(function(r,a){var o=!!r.scopeParent,s=o?r.scopeParent:r,l=Vf(s,o),u=o?e(r.candidates):s;l===0?o?n.push.apply(n,u):n.push(s):i.push({documentOrder:a,tabIndex:l,item:r,isScope:o,content:u})}),i.sort(Bf).reduce(function(r,a){return a.isScope?r.push.apply(r,a.content):r.push(a.content),r},[]).concat(n)},Yf=function(e,t){t=t||{};var n;return t.getShadowRoot?n=fl([e],t.includeContainer,{filter:Ur.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Gf}):n=pl(e,t.includeContainer,Ur.bind(null,t)),Xf(n)},Kf=function(e,t){t=t||{};var n;return t.getShadowRoot?n=fl([e],t.includeContainer,{filter:Si.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=pl(e,t.includeContainer,Si.bind(null,t)),n},Yt=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return $t.call(e,wi)===!1?!1:Ur(t,e)},Zf=dl.concat("iframe").join(","),dr=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return $t.call(e,Zf)===!1?!1:Si(t,e)};/*!
|
|
7
|
+
* focus-trap 7.6.0
|
|
8
8
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
9
|
-
*/function Ko(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,i)}return n}function Zo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ko(Object(n),!0).forEach(function(i){mp(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ko(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function mp(t,e,n){return e=yp(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bp(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yp(t){var e=bp(t,"string");return typeof e=="symbol"?e:String(e)}var Jo={activateTrap:function(t,e){if(t.length>0){var n=t[t.length-1];n!==e&&n.pause()}var i=t.indexOf(e);i===-1||t.splice(i,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}},xp=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},kp=function(t){return t?.key==="Escape"||t?.key==="Esc"||t?.keyCode===27},cn=function(t){return t?.key==="Tab"||t?.keyCode===9},Ep=function(t){return cn(t)&&!t.shiftKey},wp=function(t){return cn(t)&&t.shiftKey},Qo=function(t){return setTimeout(t,0)},tr=function(t,e){var n=-1;return t.every(function(i,s){return e(i)?(n=s,!1):!0}),n},Je=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return typeof t=="function"?t.apply(void 0,n):t},Mn=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},Cp=[],_p=function(t,e){var n=e?.document||document,i=e?.trapStack||Cp,s=Zo({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ep,isKeyBackward:wp},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},r,a=function(b,m,E){return b&&b[m]!==void 0?b[m]:s[E||m]},u=function(b,m){var E=typeof m?.composedPath=="function"?m.composedPath():void 0;return o.containerGroups.findIndex(function(F){var z=F.container,N=F.tabbableNodes;return z.contains(b)||E?.includes(z)||N.find(function(B){return B===b})})},c=function(b){var m=s[b];if(typeof m=="function"){for(var E=arguments.length,F=new Array(E>1?E-1:0),z=1;z<E;z++)F[z-1]=arguments[z];m=m.apply(void 0,F)}if(m===!0&&(m=void 0),!m){if(m===void 0||m===!1)return m;throw new Error("`".concat(b,"` was specified but was not a node, or did not return a node"))}var N=m;if(typeof m=="string"&&(N=n.querySelector(m),!N))throw new Error("`".concat(b,"` as selector refers to no known node"));return N},l=function(){var b=c("initialFocus");if(b===!1)return!1;if(b===void 0||!Xi(b,s.tabbableOptions))if(u(n.activeElement)>=0)b=n.activeElement;else{var m=o.tabbableGroups[0],E=m&&m.firstTabbableNode;b=E||c("fallbackFocus")}if(!b)throw new Error("Your focus-trap needs to have at least one focusable element");return b},d=function(){if(o.containerGroups=o.containers.map(function(b){var m=fp(b,s.tabbableOptions),E=gp(b,s.tabbableOptions),F=m.length>0?m[0]:void 0,z=m.length>0?m[m.length-1]:void 0,N=E.find(function(X){return Be(X)}),B=E.slice().reverse().find(function(X){return Be(X)}),P=!!m.find(function(X){return we(X)>0});return{container:b,tabbableNodes:m,focusableNodes:E,posTabIndexesFound:P,firstTabbableNode:F,lastTabbableNode:z,firstDomTabbableNode:N,lastDomTabbableNode:B,nextTabbableNode:function(X){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ie=m.indexOf(X);return ie<0?$t?E.slice(E.indexOf(X)+1).find(function(Lt){return Be(Lt)}):E.slice(0,E.indexOf(X)).reverse().find(function(Lt){return Be(Lt)}):m[ie+($t?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(b){return b.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(b){return b.posTabIndexesFound})&&o.containerGroups.length>1)throw new 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.")},h=function b(m){if(m!==!1&&m!==n.activeElement){if(!m||!m.focus){b(l());return}m.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=m,xp(m)&&m.select()}},p=function(b){var m=c("setReturnFocus",b);return m||(m===!1?!1:b)},g=function(b){var m=b.target,E=b.event,F=b.isBackward,z=F===void 0?!1:F;m=m||Mn(E),d();var N=null;if(o.tabbableGroups.length>0){var B=u(m,E),P=B>=0?o.containerGroups[B]:void 0;if(B<0)z?N=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:N=o.tabbableGroups[0].firstTabbableNode;else if(z){var X=tr(o.tabbableGroups,function(Ri){var Pi=Ri.firstTabbableNode;return m===Pi});if(X<0&&(P.container===m||Xi(m,s.tabbableOptions)&&!Be(m,s.tabbableOptions)&&!P.nextTabbableNode(m,!1))&&(X=B),X>=0){var $t=X===0?o.tabbableGroups.length-1:X-1,ie=o.tabbableGroups[$t];N=we(m)>=0?ie.lastTabbableNode:ie.lastDomTabbableNode}else cn(E)||(N=P.nextTabbableNode(m,!1))}else{var Lt=tr(o.tabbableGroups,function(Ri){var Pi=Ri.lastTabbableNode;return m===Pi});if(Lt<0&&(P.container===m||Xi(m,s.tabbableOptions)&&!Be(m,s.tabbableOptions)&&!P.nextTabbableNode(m))&&(Lt=B),Lt>=0){var rl=Lt===o.tabbableGroups.length-1?0:Lt+1,so=o.tabbableGroups[rl];N=we(m)>=0?so.firstTabbableNode:so.firstDomTabbableNode}else cn(E)||(N=P.nextTabbableNode(m))}}else N=c("fallbackFocus");return N},f=function(b){var m=Mn(b);if(!(u(m,b)>=0)){if(Je(s.clickOutsideDeactivates,b)){r.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Je(s.allowOutsideClick,b)||b.preventDefault()}},y=function(b){var m=Mn(b),E=u(m,b)>=0;if(E||m instanceof Document)E&&(o.mostRecentlyFocusedNode=m);else{b.stopImmediatePropagation();var F,z=!0;if(o.mostRecentlyFocusedNode)if(we(o.mostRecentlyFocusedNode)>0){var N=u(o.mostRecentlyFocusedNode),B=o.containerGroups[N].tabbableNodes;if(B.length>0){var P=B.findIndex(function(X){return X===o.mostRecentlyFocusedNode});P>=0&&(s.isKeyForward(o.recentNavEvent)?P+1<B.length&&(F=B[P+1],z=!1):P-1>=0&&(F=B[P-1],z=!1))}}else o.containerGroups.some(function(X){return X.tabbableNodes.some(function($t){return we($t)>0})})||(z=!1);else z=!1;z&&(F=g({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),h(F||o.mostRecentlyFocusedNode||l())}o.recentNavEvent=void 0},v=function(b){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=b;var E=g({event:b,isBackward:m});E&&(cn(b)&&b.preventDefault(),h(E))},k=function(b){if(kp(b)&&Je(s.escapeDeactivates,b)!==!1){b.preventDefault(),r.deactivate();return}(s.isKeyForward(b)||s.isKeyBackward(b))&&v(b,s.isKeyBackward(b))},w=function(b){var m=Mn(b);u(m,b)>=0||Je(s.clickOutsideDeactivates,b)||Je(s.allowOutsideClick,b)||(b.preventDefault(),b.stopImmediatePropagation())},T=function(){if(o.active)return Jo.activateTrap(i,r),o.delayInitialFocusTimer=s.delayInitialFocus?Qo(function(){h(l())}):h(l()),n.addEventListener("focusin",y,!0),n.addEventListener("mousedown",f,{capture:!0,passive:!1}),n.addEventListener("touchstart",f,{capture:!0,passive:!1}),n.addEventListener("click",w,{capture:!0,passive:!1}),n.addEventListener("keydown",k,{capture:!0,passive:!1}),r},M=function(){if(o.active)return n.removeEventListener("focusin",y,!0),n.removeEventListener("mousedown",f,!0),n.removeEventListener("touchstart",f,!0),n.removeEventListener("click",w,!0),n.removeEventListener("keydown",k,!0),r},D=function(b){var m=b.some(function(E){var F=Array.from(E.removedNodes);return F.some(function(z){return z===o.mostRecentlyFocusedNode})});m&&h(l())},W=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(D):void 0,x=function(){W&&(W.disconnect(),o.active&&!o.paused&&o.containers.map(function(b){W.observe(b,{subtree:!0,childList:!0})}))};return r={get active(){return o.active},get paused(){return o.paused},activate:function(b){if(o.active)return this;var m=a(b,"onActivate"),E=a(b,"onPostActivate"),F=a(b,"checkCanFocusTrap");F||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=n.activeElement,m?.();var z=function(){F&&d(),T(),x(),E?.()};return F?(F(o.containers.concat()).then(z,z),this):(z(),this)},deactivate:function(b){if(!o.active)return this;var m=Zo({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},b);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,M(),o.active=!1,o.paused=!1,x(),Jo.deactivateTrap(i,r);var E=a(m,"onDeactivate"),F=a(m,"onPostDeactivate"),z=a(m,"checkCanReturnFocus"),N=a(m,"returnFocus","returnFocusOnDeactivate");E?.();var B=function(){Qo(function(){N&&h(p(o.nodeFocusedBeforeActivation)),F?.()})};return N&&z?(z(p(o.nodeFocusedBeforeActivation)).then(B,B),this):(B(),this)},pause:function(b){if(o.paused||!o.active)return this;var m=a(b,"onPause"),E=a(b,"onPostPause");return o.paused=!0,m?.(),M(),x(),E?.(),this},unpause:function(b){if(!o.paused||!o.active)return this;var m=a(b,"onUnpause"),E=a(b,"onPostUnpause");return o.paused=!1,m?.(),d(),T(),x(),E?.(),this},updateContainerElements:function(b){var m=[].concat(b).filter(Boolean);return o.containers=m.map(function(E){return typeof E=="string"?n.querySelector(E):E}),o.active&&d(),x(),this}},r.updateContainerElements(t),r},Sp=ce("dialog").parts("trigger","backdrop","container","content","title","description","closeTrigger"),me=Sp.build(),K=En({getContainerId:t=>{var e;return((e=t.ids)==null?void 0:e.container)??`dialog:${t.id}:container`},getBackdropId:t=>{var e;return((e=t.ids)==null?void 0:e.backdrop)??`dialog:${t.id}:backdrop`},getContentId:t=>{var e;return((e=t.ids)==null?void 0:e.content)??`dialog:${t.id}:content`},getTriggerId:t=>{var e;return((e=t.ids)==null?void 0:e.trigger)??`dialog:${t.id}:trigger`},getTitleId:t=>{var e;return((e=t.ids)==null?void 0:e.title)??`dialog:${t.id}:title`},getDescriptionId:t=>{var e;return((e=t.ids)==null?void 0:e.description)??`dialog:${t.id}:description`},getCloseTriggerId:t=>{var e;return((e=t.ids)==null?void 0:e.closeTrigger)??`dialog:${t.id}:close`},getContentEl:t=>K.getById(t,K.getContentId(t)),getTriggerEl:t=>K.getById(t,K.getTriggerId(t)),getContainerEl:t=>K.getById(t,K.getContainerId(t)),getTitleEl:t=>K.getById(t,K.getTitleId(t)),getDescriptionEl:t=>K.getById(t,K.getDescriptionId(t))});function Ap(t,e,n){const i=t.context["aria-label"],s=t.matches("open"),o=t.context.renderedElements;return{isOpen:s,open(){e("OPEN")},close(){e("CLOSE")},triggerProps:n.button({...me.trigger.attrs,id:K.getTriggerId(t.context),"aria-haspopup":"dialog",type:"button","aria-expanded":s,"data-state":s?"open":"closed","aria-controls":K.getContentId(t.context),onClick(){e("TOGGLE")}}),backdropProps:n.element({...me.backdrop.attrs,hidden:!s,id:K.getBackdropId(t.context),"data-state":s?"open":"closed"}),containerProps:n.element({...me.container.attrs,hidden:!s,id:K.getContainerId(t.context),"data-state":s?"open":"closed",style:{pointerEvents:s?void 0:"none"}}),contentProps:n.element({...me.content.attrs,role:t.context.role,hidden:!s,id:K.getContentId(t.context),tabIndex:-1,"data-state":s?"open":"closed","aria-modal":!0,"aria-label":i||void 0,"aria-labelledby":i||!o.title?void 0:K.getTitleId(t.context),"aria-describedby":o.description?K.getDescriptionId(t.context):void 0}),titleProps:n.element({...me.title.attrs,id:K.getTitleId(t.context)}),descriptionProps:n.element({...me.description.attrs,id:K.getDescriptionId(t.context)}),closeTriggerProps:n.button({...me.closeTrigger.attrs,id:K.getCloseTriggerId(t.context),type:"button",onClick(r){r.stopPropagation(),e("CLOSE")}})}}function Tp(t){const e=Si(t);return Hs({id:"dialog",initial:e.open?"open":"closed",context:{role:"dialog",renderedElements:{title:!0,description:!0},modal:!0,trapFocus:!0,preventScroll:!0,closeOnOutsideClick:!0,closeOnEsc:!0,restoreFocus:!0,...e},watch:{open:["toggleVisibility"]},states:{open:{entry:["checkRenderedElements"],activities:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{CLOSE:{target:"closed",actions:["invokeOnClose","restoreFocus"]},TOGGLE:{target:"closed",actions:["invokeOnClose","restoreFocus"]}}},closed:{on:{OPEN:{target:"open",actions:["invokeOnOpen"]},TOGGLE:{target:"open",actions:["invokeOnOpen"]}}}}},{activities:{trackDismissableElement(n,i,{send:s}){return Kh(()=>K.getContentEl(n),{defer:!0,pointerBlocking:n.modal,exclude:[K.getTriggerEl(n)],onDismiss(){s({type:"CLOSE",src:"interact-outside"})},onEscapeKeyDown(o){var r;n.closeOnEsc?s({type:"CLOSE",src:"escape-key"}):o.preventDefault(),(r=n.onEsc)==null||r.call(n)},onPointerDownOutside(o){var r;n.closeOnOutsideClick||o.preventDefault(),(r=n.onOutsideClick)==null||r.call(n)}})},preventScroll(n){if(n.preventScroll)return Qh(K.getDoc(n))},trapFocus(n){if(!n.trapFocus)return;let i;return Yr(()=>{const s=K.getContentEl(n);if(s){i=_p(s,{document:K.getDoc(n),escapeDeactivates:!1,preventScroll:!0,returnFocusOnDeactivate:!1,fallbackFocus:s,allowOutsideClick:!0,initialFocus:Do(n.initialFocusEl)});try{i.activate()}catch{}}}),()=>i?.deactivate()},hideContentBelow(n){return n.modal?Lh(()=>[K.getContainerEl(n)],{defer:!0}):void 0}},actions:{checkRenderedElements(n){xn(()=>{n.renderedElements.title=!!K.getTitleEl(n),n.renderedElements.description=!!K.getDescriptionEl(n)})},invokeOnClose(n){var i;(i=n.onClose)==null||i.call(n)},invokeOnOpen(n){var i;(i=n.onOpen)==null||i.call(n)},toggleVisibility(n,i,{send:s}){s({type:n.open?"OPEN":"CLOSE",src:"controlled"})},restoreFocus(n){n.restoreFocus&&xn(()=>{const i=Do(n.finalFocusEl)??K.getTriggerEl(n);i?.focus({preventScroll:!0})})}}})}const Ip=["data-id"],Dp=["data-id"],Fp=["data-id"],Op={class:"k-dialog__card-header"},Mp=tt({__name:"Dialog",props:{title:{},description:{},closeOnOutsideClick:{type:Boolean,default:!0},role:{default:"dialog"},alignment:{default:"top"},triggerLabel:{},showCloseTrigger:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},dialogId:{},teleport:{type:Boolean,default:!0}},emits:["open","close","clickoutside"],setup(t,{expose:e,emit:n}){var i;const s=t,o=Da(),[r,a]=Ti(Tp({id:De({prefix:"dialog"}),closeOnOutsideClick:s.closeOnOutsideClick,closeOnEsc:s.closeOnEsc,modal:!0,role:s.role,onClose(){s.closeOnEsc&&n("close")},onOpen(){n("open")},onOutsideClick(){n("clickoutside")},getRootNode:(i=o.value)==null?void 0:i.getRootNode}),{context:G(()=>s)}),u=G(()=>Ap(r.value,a,Ai)),c=l=>s.dialogId?`${s.dialogId}-${l}`:"";return e({open:u.value.open,close:u.value.close}),(l,d)=>(_(),O("div",{class:"k-dialog","data-id":l.dialogId},[$(l.$slots,"trigger",{triggerProps:u.value.triggerProps},()=>[l.triggerLabel?(_(),nt(Jt,at({key:0,class:"k-dialog__trigger",variant:"secondary"},u.value.triggerProps),{default:lt(()=>[Gt(ut(l.triggerLabel),1)]),_:1},16)):H("",!0)]),(_(),nt(xr,{to:"body",disabled:!l.teleport},[u.value.isOpen?(_(),O(ue,{key:0},[et("div",at({class:"k-dialog__backdrop"},u.value.backdropProps,{"data-id":c("backdrop")}),null,16,Dp),et("div",at({class:`k-dialog__container k-dialog--align-${l.alignment}`},u.value.containerProps,{"data-id":c("container")}),[Et(Yc,at({class:"k-dialog__card",variant:"shadow"},u.value.contentProps,{"data-id":c("dialog")}),yr({default:lt(()=>[$(l.$slots,"header",{titleProps:u.value.titleProps,descriptionProps:u.value.descriptionProps,closeTriggerProps:u.value.closeTriggerProps},()=>[et("div",Op,[$(l.$slots,"title",{titleProps:u.value.titleProps},()=>[l.title?(_(),O("h2",at({key:0,class:"k-dialog__title"},u.value.titleProps),ut(l.title),17)):H("",!0)]),$(l.$slots,"description",{descriptionProps:u.value.descriptionProps},()=>[l.description?(_(),O("span",at({key:0,class:"k-dialog__description"},u.value.descriptionProps),ut(l.description),17)):H("",!0)]),l.showCloseTrigger?(_(),nt(Jt,at({key:0,class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},u.value.closeTriggerProps),null,16)):H("",!0)])]),$(l.$slots,"default",{descriptionProps:u.value.descriptionProps})]),_:2},[l.$slots.footer?{name:"footer",fn:lt(()=>[$(l.$slots,"footer",{close:u.value.close})]),key:"0"}:void 0]),1040,["data-id"])],16,Fp)],64)):H("",!0)],8,["disabled"]))],8,Ip))}});oo({title:{},description:{},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},type:{default:"info"}},{open:{type:Boolean,default:!1}}),oo(["cancel","confirm"],["update:open"]);function Oi(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t<arguments.length;t++)this.define(arguments[t]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Oi.prototype.define=function(t,e){for(let n in t){let i=t[n].map(function(s){return s.toLowerCase()});n=n.toLowerCase();for(let s=0;s<i.length;s++){const o=i[s];if(o[0]!=="*"){if(!e&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+n+'".');this._types[o]=n}}if(e||!this._extensions[n]){const s=i[0];this._extensions[n]=s[0]!=="*"?s:s.substr(1)}}};Oi.prototype.getType=function(t){t=String(t);let e=t.replace(/^.*[/\\]/,"").toLowerCase(),n=e.replace(/^.*\./,"").toLowerCase(),i=e.length<t.length;return(n.length<e.length-1||!i)&&this._types[n]||null};Oi.prototype.getExtension=function(t){return t=/^\s*([^;\s]*)/.test(t)&&RegExp.$1,t&&this._extensions[t.toLowerCase()]||null};var Rp=Oi,Pp={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let Lp=Rp;new Lp(Pp);const Bp=tt({__name:"CreateTrigger",props:{label:{}},setup(t){return(e,n)=>(_(),nt(Jt,{type:"button",class:"k-media-image-create-trigger",label:e.label,iconRight:"fa6-solid:image"},null,8,["label"]))}}),Np=tt({__name:"Thumbnail",props:{value:{}},setup(t){const e=t,n=G(()=>({backgroundImage:`url(${e.value.url})`}));return(i,s)=>(_(),O("div",{class:"k-media-image__thumbnail",style:ve(n.value),onClick:s[0]||(s[0]=o=>i.$emit("click"))},null,4))}}),jp=tt({__name:"Preview",props:{value:{},size:{}},setup(t){const e=t,n=G(()=>({padding:e.size==="cover"?"0":"1rem",backgroundSize:e.size,backgroundImage:`url(${e.value.url})`}));return(i,s)=>(_(),O("div",{class:"k-media-image-preview",style:ve(n.value)},null,4))}});Li(Bp),Li(Np),Li(jp);/**!
|
|
9
|
+
*/function Jf(e,t,n){return(t=eg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wo(Object(n),!0).forEach(function(i){Jf(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Qf(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eg(e){var t=Qf(e,"string");return typeof t=="symbol"?t:t+""}var Ao={activateTrap:function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},tg=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ng=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},xn=function(e){return e?.key==="Tab"||e?.keyCode===9},ig=function(e){return xn(e)&&!e.shiftKey},rg=function(e){return xn(e)&&e.shiftKey},So=function(e){return setTimeout(e,0)},To=function(e,t){var n=-1;return e.every(function(i,r){return t(i)?(n=r,!1):!0}),n},pn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,n):e},Kn=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},ag=[],og=function(e,t){var n=t?.document||document,i=t?.trapStack||ag,r=Co({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:ig,isKeyBackward:rg},t),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,s=function(y,x,I){return y&&y[x]!==void 0?y[x]:r[I||x]},l=function(y,x){var I=typeof x?.composedPath=="function"?x.composedPath():void 0;return a.containerGroups.findIndex(function(B){var L=B.container,N=B.tabbableNodes;return L.contains(y)||I?.includes(L)||N.find(function(Z){return Z===y})})},u=function(y){var x=r[y];if(typeof x=="function"){for(var I=arguments.length,B=new Array(I>1?I-1:0),L=1;L<I;L++)B[L-1]=arguments[L];x=x.apply(void 0,B)}if(x===!0&&(x=void 0),!x){if(x===void 0||x===!1)return x;throw new Error("`".concat(y,"` was specified but was not a node, or did not return a node"))}var N=x;if(typeof x=="string"&&(N=n.querySelector(x),!N))throw new Error("`".concat(y,"` as selector refers to no known node"));return N},c=function(){var y=u("initialFocus");if(y===!1)return!1;if(y===void 0||!dr(y,r.tabbableOptions))if(l(n.activeElement)>=0)y=n.activeElement;else{var x=a.tabbableGroups[0],I=x&&x.firstTabbableNode;y=I||u("fallbackFocus")}if(!y)throw new Error("Your focus-trap needs to have at least one focusable element");return y},d=function(){if(a.containerGroups=a.containers.map(function(y){var x=Yf(y,r.tabbableOptions),I=Kf(y,r.tabbableOptions),B=x.length>0?x[0]:void 0,L=x.length>0?x[x.length-1]:void 0,N=I.find(function(J){return Yt(J)}),Z=I.slice().reverse().find(function(J){return Yt(J)}),ie=!!x.find(function(J){return Pt(J)>0});return{container:y,tabbableNodes:x,focusableNodes:I,posTabIndexesFound:ie,firstTabbableNode:B,lastTabbableNode:L,firstDomTabbableNode:N,lastDomTabbableNode:Z,nextTabbableNode:function(J){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,dn=x.indexOf(J);return dn<0?qe?I.slice(I.indexOf(J)+1).find(function(Qe){return Yt(Qe)}):I.slice(0,I.indexOf(J)).reverse().find(function(Qe){return Yt(Qe)}):x[dn+(qe?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(y){return y.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(y){return y.posTabIndexesFound})&&a.containerGroups.length>1)throw new 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.")},h=function(y){var x=y.activeElement;if(x)return x.shadowRoot&&x.shadowRoot.activeElement!==null?h(x.shadowRoot):x},p=function(y){if(y!==!1&&y!==h(document)){if(!y||!y.focus){p(c());return}y.focus({preventScroll:!!r.preventScroll}),a.mostRecentlyFocusedNode=y,tg(y)&&y.select()}},f=function(y){var x=u("setReturnFocus",y);return x||(x===!1?!1:y)},g=function(y){var x=y.target,I=y.event,B=y.isBackward,L=B===void 0?!1:B;x=x||Kn(I),d();var N=null;if(a.tabbableGroups.length>0){var Z=l(x,I),ie=Z>=0?a.containerGroups[Z]:void 0;if(Z<0)L?N=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:N=a.tabbableGroups[0].firstTabbableNode;else if(L){var J=To(a.tabbableGroups,function(Zi){var Ji=Zi.firstTabbableNode;return x===Ji});if(J<0&&(ie.container===x||dr(x,r.tabbableOptions)&&!Yt(x,r.tabbableOptions)&&!ie.nextTabbableNode(x,!1))&&(J=Z),J>=0){var qe=J===0?a.tabbableGroups.length-1:J-1,dn=a.tabbableGroups[qe];N=Pt(x)>=0?dn.lastTabbableNode:dn.lastDomTabbableNode}else xn(I)||(N=ie.nextTabbableNode(x,!1))}else{var Qe=To(a.tabbableGroups,function(Zi){var Ji=Zi.lastTabbableNode;return x===Ji});if(Qe<0&&(ie.container===x||dr(x,r.tabbableOptions)&&!Yt(x,r.tabbableOptions)&&!ie.nextTabbableNode(x))&&(Qe=Z),Qe>=0){var Ml=Qe===a.tabbableGroups.length-1?0:Qe+1,Ta=a.tabbableGroups[Ml];N=Pt(x)>=0?Ta.firstTabbableNode:Ta.firstDomTabbableNode}else xn(I)||(N=ie.nextTabbableNode(x))}}else N=u("fallbackFocus");return N},m=function(y){var x=Kn(y);if(!(l(x,y)>=0)){if(pn(r.clickOutsideDeactivates,y)){o.deactivate({returnFocus:r.returnFocusOnDeactivate});return}pn(r.allowOutsideClick,y)||y.preventDefault()}},b=function(y){var x=Kn(y),I=l(x,y)>=0;if(I||x instanceof Document)I&&(a.mostRecentlyFocusedNode=x);else{y.stopImmediatePropagation();var B,L=!0;if(a.mostRecentlyFocusedNode)if(Pt(a.mostRecentlyFocusedNode)>0){var N=l(a.mostRecentlyFocusedNode),Z=a.containerGroups[N].tabbableNodes;if(Z.length>0){var ie=Z.findIndex(function(J){return J===a.mostRecentlyFocusedNode});ie>=0&&(r.isKeyForward(a.recentNavEvent)?ie+1<Z.length&&(B=Z[ie+1],L=!1):ie-1>=0&&(B=Z[ie-1],L=!1))}}else a.containerGroups.some(function(J){return J.tabbableNodes.some(function(qe){return Pt(qe)>0})})||(L=!1);else L=!1;L&&(B=g({target:a.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(a.recentNavEvent)})),p(B||a.mostRecentlyFocusedNode||c())}a.recentNavEvent=void 0},v=function(y){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=y;var I=g({event:y,isBackward:x});I&&(xn(y)&&y.preventDefault(),p(I))},E=function(y){(r.isKeyForward(y)||r.isKeyBackward(y))&&v(y,r.isKeyBackward(y))},T=function(y){ng(y)&&pn(r.escapeDeactivates,y)!==!1&&(y.preventDefault(),o.deactivate())},_=function(y){var x=Kn(y);l(x,y)>=0||pn(r.clickOutsideDeactivates,y)||pn(r.allowOutsideClick,y)||(y.preventDefault(),y.stopImmediatePropagation())},S=function(){if(a.active)return Ao.activateTrap(i,o),a.delayInitialFocusTimer=r.delayInitialFocus?So(function(){p(c())}):p(c()),n.addEventListener("focusin",b,!0),n.addEventListener("mousedown",m,{capture:!0,passive:!1}),n.addEventListener("touchstart",m,{capture:!0,passive:!1}),n.addEventListener("click",_,{capture:!0,passive:!1}),n.addEventListener("keydown",E,{capture:!0,passive:!1}),n.addEventListener("keydown",T),o},X=function(){if(a.active)return n.removeEventListener("focusin",b,!0),n.removeEventListener("mousedown",m,!0),n.removeEventListener("touchstart",m,!0),n.removeEventListener("click",_,!0),n.removeEventListener("keydown",E,!0),n.removeEventListener("keydown",T),o},D=function(y){var x=y.some(function(I){var B=Array.from(I.removedNodes);return B.some(function(L){return L===a.mostRecentlyFocusedNode})});x&&p(c())},C=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(D):void 0,k=function(){C&&(C.disconnect(),a.active&&!a.paused&&a.containers.map(function(y){C.observe(y,{subtree:!0,childList:!0})}))};return o={get active(){return a.active},get paused(){return a.paused},activate:function(y){if(a.active)return this;var x=s(y,"onActivate"),I=s(y,"onPostActivate"),B=s(y,"checkCanFocusTrap");B||d(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=n.activeElement,x?.();var L=function(){B&&d(),S(),k(),I?.()};return B?(B(a.containers.concat()).then(L,L),this):(L(),this)},deactivate:function(y){if(!a.active)return this;var x=Co({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},y);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,X(),a.active=!1,a.paused=!1,k(),Ao.deactivateTrap(i,o);var I=s(x,"onDeactivate"),B=s(x,"onPostDeactivate"),L=s(x,"checkCanReturnFocus"),N=s(x,"returnFocus","returnFocusOnDeactivate");I?.();var Z=function(){So(function(){N&&p(f(a.nodeFocusedBeforeActivation)),B?.()})};return N&&L?(L(f(a.nodeFocusedBeforeActivation)).then(Z,Z),this):(Z(),this)},pause:function(y){if(a.paused||!a.active)return this;var x=s(y,"onPause"),I=s(y,"onPostPause");return a.paused=!0,x?.(),X(),k(),I?.(),this},unpause:function(y){if(!a.paused||!a.active)return this;var x=s(y,"onUnpause"),I=s(y,"onPostUnpause");return a.paused=!1,x?.(),d(),S(),k(),I?.(),this},updateContainerElements:function(y){var x=[].concat(y).filter(Boolean);return a.containers=x.map(function(I){return typeof I=="string"?n.querySelector(I):I}),a.active&&d(),k(),this}},o.updateContainerElements(e),o},sg=mt("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),St=sg.build(),G=Rn({getPositionerId:e=>{var t;return((t=e.ids)==null?void 0:t.positioner)??`dialog:${e.id}:positioner`},getBackdropId:e=>{var t;return((t=e.ids)==null?void 0:t.backdrop)??`dialog:${e.id}:backdrop`},getContentId:e=>{var t;return((t=e.ids)==null?void 0:t.content)??`dialog:${e.id}:content`},getTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.trigger)??`dialog:${e.id}:trigger`},getTitleId:e=>{var t;return((t=e.ids)==null?void 0:t.title)??`dialog:${e.id}:title`},getDescriptionId:e=>{var t;return((t=e.ids)==null?void 0:t.description)??`dialog:${e.id}:description`},getCloseTriggerId:e=>{var t;return((t=e.ids)==null?void 0:t.closeTrigger)??`dialog:${e.id}:close`},getContentEl:e=>G.getById(e,G.getContentId(e)),getPositionerEl:e=>G.getById(e,G.getPositionerId(e)),getBackdropEl:e=>G.getById(e,G.getBackdropId(e)),getTriggerEl:e=>G.getById(e,G.getTriggerId(e)),getTitleEl:e=>G.getById(e,G.getTitleId(e)),getDescriptionEl:e=>G.getById(e,G.getDescriptionId(e)),getCloseTriggerEl:e=>G.getById(e,G.getCloseTriggerId(e))});function lg(e,t,n){const i=e.context["aria-label"],r=e.matches("open"),a=e.context.renderedElements;return{open:r,setOpen(o){o!==r&&t(o?"OPEN":"CLOSE")},getTriggerProps(){return n.button({...St.trigger.attrs,dir:e.context.dir,id:G.getTriggerId(e.context),"aria-haspopup":"dialog",type:"button","aria-expanded":r,"data-state":r?"open":"closed","aria-controls":G.getContentId(e.context),onClick(o){o.defaultPrevented||t("TOGGLE")}})},getBackdropProps(){return n.element({...St.backdrop.attrs,dir:e.context.dir,hidden:!r,id:G.getBackdropId(e.context),"data-state":r?"open":"closed"})},getPositionerProps(){return n.element({...St.positioner.attrs,dir:e.context.dir,id:G.getPositionerId(e.context),style:{pointerEvents:r?void 0:"none"}})},getContentProps(){return n.element({...St.content.attrs,dir:e.context.dir,role:e.context.role,hidden:!r,id:G.getContentId(e.context),tabIndex:-1,"data-state":r?"open":"closed","aria-modal":!0,"aria-label":i||void 0,"aria-labelledby":i||!a.title?void 0:G.getTitleId(e.context),"aria-describedby":a.description?G.getDescriptionId(e.context):void 0})},getTitleProps(){return n.element({...St.title.attrs,dir:e.context.dir,id:G.getTitleId(e.context)})},getDescriptionProps(){return n.element({...St.description.attrs,dir:e.context.dir,id:G.getDescriptionId(e.context)})},getCloseTriggerProps(){return n.button({...St.closeTrigger.attrs,dir:e.context.dir,id:G.getCloseTriggerId(e.context),type:"button",onClick(o){o.defaultPrevented||(o.stopPropagation(),t("CLOSE"))}})}}}function ug(e){const t=lt(e);return Mn({id:"dialog",initial:t.open?"open":"closed",context:{role:"dialog",renderedElements:{title:!0,description:!0},modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!0,closeOnEscape:!0,restoreFocus:!0,...t},created:["setAlertDialogProps"],watch:{open:["toggleVisibility"]},states:{open:{entry:["checkRenderedElements","syncZIndex"],activities:["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"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}}},{guards:{isOpenControlled:n=>!!n["open.controlled"]},activities:{trackDismissableElement(n,i,{send:r}){return Df(()=>G.getContentEl(n),{defer:!0,pointerBlocking:n.modal,exclude:[G.getTriggerEl(n)],onInteractOutside(a){var o;(o=n.onInteractOutside)==null||o.call(n,a),n.closeOnInteractOutside||a.preventDefault()},persistentElements:n.persistentElements,onFocusOutside:n.onFocusOutside,onPointerDownOutside:n.onPointerDownOutside,onEscapeKeyDown(a){var o;(o=n.onEscapeKeyDown)==null||o.call(n,a),n.closeOnEscape||a.preventDefault()},onDismiss(){r({type:"CLOSE",src:"interact-outside"})}})},preventScroll(n){if(n.preventScroll)return Rf(G.getDoc(n))},trapFocus(n){if(!n.trapFocus||!n.modal)return;let i;const r=la(()=>{var a;const o=G.getContentEl(n);if(o){i=og(o,{document:G.getDoc(n),escapeDeactivates:!1,preventScroll:!0,fallbackFocus:o,returnFocusOnDeactivate:n.restoreFocus,allowOutsideClick:!0,initialFocus:((a=n.initialFocusEl)==null?void 0:a.call(n))??void 0,setReturnFocus(s){var l;return((l=n.finalFocusEl)==null?void 0:l.call(n))??s}});try{i.activate()}catch{}}});return()=>{i?.deactivate(),r()}},hideContentBelow(n){return n.modal?xf(()=>[G.getContentEl(n)],{defer:!0}):void 0}},actions:{setAlertDialogProps(n){n.role==="alertdialog"&&(n.initialFocusEl||(n.initialFocusEl=()=>G.getCloseTriggerEl(n)),n.closeOnInteractOutside=!1)},checkRenderedElements(n){Et(()=>{n.renderedElements.title=!!G.getTitleEl(n),n.renderedElements.description=!!G.getDescriptionEl(n)})},syncZIndex(n){Et(()=>{const i=G.getContentEl(n);if(!i)return;const r=G.getWin(n).getComputedStyle(i);[G.getPositionerEl(n),G.getBackdropEl(n)].forEach(a=>{a?.style.setProperty("--z-index",r.zIndex)})})},invokeOnClose(n){var i;(i=n.onOpenChange)==null||i.call(n,{open:!1})},invokeOnOpen(n){var i;(i=n.onOpenChange)==null||i.call(n,{open:!0})},toggleVisibility(n,i,{send:r}){r({type:n.open?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:i})}}})}qt()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","open.controlled","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const cg=["data-id"],dg=["data-id"],hg=["data-id"],pg={class:"k-dialog__card-header"},Om=oe({__name:"Dialog",props:{title:{},description:{},closeOnOutsideClick:{type:Boolean,default:!0},role:{default:"dialog"},alignment:{default:"top"},triggerLabel:{},showCloseTrigger:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},dialogId:{},teleport:{type:Boolean,default:!0},disabled:{type:Boolean}},emits:["open","close","clickoutside"],setup(e,{expose:t,emit:n}){var i;const r=e,a=n,o=al(),[s,l]=Bn(ug({id:_t({prefix:"dialog"}),closeOnEscape:r.closeOnEsc,modal:!0,role:r.role,onOpenChange(){if(!u.value.open)return a("open");a("close")},onPointerDownOutside(){a("clickoutside"),r.closeOnOutsideClick&&u.value.setOpen(!1)},getRootNode:(i=o.value)==null?void 0:i.getRootNode}),{context:U(()=>r)}),u=U(()=>lg(s.value,l,Vn)),c=d=>r.dialogId?`${r.dialogId}-${d}`:"";return t({open:()=>u.value.setOpen(!0),close:()=>u.value.setOpen(!1)}),(d,h)=>(A(),P("div",{class:"k-dialog","data-id":d.dialogId},[z(d.$slots,"trigger",{triggerProps:u.value.getTriggerProps()},()=>[d.triggerLabel?(A(),ue(Lt,te({key:0,class:"k-dialog__trigger",variant:"secondary"},u.value.getTriggerProps(),{disabled:d.disabled}),{default:ve(()=>[$e(de(d.triggerLabel),1)]),_:1},16,["disabled"])):W("",!0)]),(A(),ue(Wo,{to:"body",disabled:!d.teleport},[u.value.open?(A(),P(rt,{key:0},[ee("div",te({class:"k-dialog__backdrop"},u.value.getBackdropProps(),{"data-id":c("backdrop")}),null,16,dg),ee("div",te({class:`k-dialog__container k-dialog--align-${d.alignment}`},u.value.getPositionerProps(),{"data-id":c("container")}),[Ne(kh,te({class:"k-dialog__card",variant:"shadow"},u.value.getContentProps(),{"data-id":c("dialog")}),Uo({default:ve(()=>[z(d.$slots,"header",{titleProps:u.value.titleProps,descriptionProps:u.value.getDescriptionProps(),closeTriggerProps:u.value.getCloseTriggerProps()},()=>[ee("div",pg,[z(d.$slots,"title",{titleProps:u.value.getTitleProps()},()=>[d.title?(A(),P("h2",te({key:0,class:"k-dialog__title"},u.value.getTitleProps()),de(d.title),17)):W("",!0)]),z(d.$slots,"description",{descriptionProps:u.value.getDescriptionProps()},()=>[d.description?(A(),P("span",te({key:0,class:"k-dialog__description"},u.value.getDescriptionProps()),de(d.description),17)):W("",!0)]),d.showCloseTrigger?(A(),ue(Lt,te({key:0,class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},u.value.getCloseTriggerProps()),null,16)):W("",!0)])]),z(d.$slots,"default",{descriptionProps:u.value.getDescriptionProps()})]),_:2},[d.$slots.footer?{name:"footer",fn:ve(()=>[z(d.$slots,"footer",{close:()=>u.value.setOpen(!1)})]),key:"0"}:void 0]),1040,["data-id"])],16,hg)],64)):W("",!0)],8,["disabled"]))],8,cg))}});function fg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Yi(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Yi.prototype.define=function(e,t){for(let n in e){let i=e[n].map(function(r){return r.toLowerCase()});n=n.toLowerCase();for(let r=0;r<i.length;r++){const a=i[r];if(a[0]!=="*"){if(!t&&a in this._types)throw new Error('Attempt to change mapping for "'+a+'" extension from "'+this._types[a]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+a+'" from the list of extensions for "'+n+'".');this._types[a]=n}}if(t||!this._extensions[n]){const r=i[0];this._extensions[n]=r[0]!=="*"?r:r.substr(1)}}};Yi.prototype.getType=function(e){e=String(e);let t=e.replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),i=t.length<e.length;return(n.length<t.length-1||!i)&&this._types[n]||null};Yi.prototype.getExtension=function(e){return e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1,e&&this._extensions[e.toLowerCase()]||null};var gg=Yi,mg={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let vg=gg;new vg(mg);const bg=oe({__name:"CreateTrigger",props:{label:{}},setup(e){return(t,n)=>(A(),ue(Lt,{type:"button",label:t.label,iconRight:"fa6-solid:image",size:"small",variant:"tertiary"},null,8,["label"]))}}),yg=oe({__name:"Thumbnail",props:{value:{}},setup(e){const t=e,n=U(()=>({backgroundImage:`url(${t.value.url})`}));return(i,r)=>(A(),P("div",{class:"k-media-image__thumbnail",style:At(n.value),onClick:r[0]||(r[0]=a=>i.$emit("click"))},null,4))}}),xg=oe({__name:"Preview",props:{value:{},size:{}},setup(e){const t=e,n=U(()=>({padding:t.size==="cover"?"0":"1rem",backgroundSize:t.size,backgroundImage:`url(${t.value.url})`}));return(i,r)=>(A(),P("div",{class:"k-media-image-preview",style:At(n.value)},null,4))}});Qi(bg),Qi(yg),Qi(xg);/**!
|
|
10
10
|
* Sortable 1.14.0
|
|
11
11
|
* @author RubaXa <trash@rubaxa.org>
|
|
12
12
|
* @author owenm <owen23355@gmail.com>
|
|
13
13
|
* @license MIT
|
|
14
|
-
*/function er(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,i)}return n}function Wt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?er(Object(n),!0).forEach(function(i){Vp(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Gn(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gn=function(e){return typeof e}:Gn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gn(t)}function Vp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function te(){return te=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},te.apply(this,arguments)}function $p(t,e){if(t==null)return{};var n={},i=Object.keys(t),s,o;for(o=0;o<i.length;o++)s=i[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function zp(t,e){if(t==null)return{};var n=$p(t,e),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(s=0;s<o.length;s++)i=o[s],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var Hp="1.14.0";function Zt(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var ne=Zt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_n=Zt(/Edge/i),nr=Zt(/firefox/i),dn=Zt(/safari/i)&&!Zt(/chrome/i)&&!Zt(/android/i),$a=Zt(/iP(ad|od|hone)/i),Gp=Zt(/chrome/i)&&Zt(/android/i),za={capture:!1,passive:!1};function Y(t,e,n){t.addEventListener(e,n,!ne&&za)}function U(t,e,n){t.removeEventListener(e,n,!ne&&za)}function gi(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function qp(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function zt(t,e,n,i){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&gi(t,e):gi(t,e))||i&&t===n)return t;if(t===n)break}while(t=qp(t))}return null}var ir=/\s+/g;function wt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(ir," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(ir," ")}}function R(t,e,n){var i=t&&t.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=n+(typeof n=="string"?"":"px")}}function qe(t,e){var n="";if(typeof t=="string")n=t;else do{var i=R(t,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(n)}function Ha(t,e,n){if(t){var i=t.getElementsByTagName(e),s=0,o=i.length;if(n)for(;s<o;s++)n(i[s],s);return i}return[]}function qt(){var t=document.scrollingElement;return t||document.documentElement}function ct(t,e,n,i,s){if(!(!t.getBoundingClientRect&&t!==window)){var o,r,a,u,c,l,d;if(t!==window&&t.parentNode&&t!==qt()?(o=t.getBoundingClientRect(),r=o.top,a=o.left,u=o.bottom,c=o.right,l=o.height,d=o.width):(r=0,a=0,u=window.innerHeight,c=window.innerWidth,l=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(s=s||t.parentNode,!ne))do if(s&&s.getBoundingClientRect&&(R(s,"transform")!=="none"||n&&R(s,"position")!=="static")){var h=s.getBoundingClientRect();r-=h.top+parseInt(R(s,"border-top-width")),a-=h.left+parseInt(R(s,"border-left-width")),u=r+o.height,c=a+o.width;break}while(s=s.parentNode);if(i&&t!==window){var p=qe(s||t),g=p&&p.a,f=p&&p.d;p&&(r/=f,a/=g,d/=g,l/=f,u=r+l,c=a+d)}return{top:r,left:a,bottom:u,right:c,width:d,height:l}}}function sr(t,e,n){for(var i=le(t,!0),s=ct(t)[e];i;){var o=ct(i)[n],r=void 0;if(n==="top"||n==="left"?r=s>=o:r=s<=o,!r)return i;if(i===qt())break;i=le(i,!1)}return!1}function Ye(t,e,n,i){for(var s=0,o=0,r=t.children;o<r.length;){if(r[o].style.display!=="none"&&r[o]!==L.ghost&&(i||r[o]!==L.dragged)&&zt(r[o],n.draggable,t,!1)){if(s===e)return r[o];s++}o++}return null}function Qs(t,e){for(var n=t.lastElementChild;n&&(n===L.ghost||R(n,"display")==="none"||e&&!gi(n,e));)n=n.previousElementSibling;return n||null}function Ot(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==L.clone&&(!e||gi(t,e))&&n++;return n}function or(t){var e=0,n=0,i=qt();if(t)do{var s=qe(t),o=s.a,r=s.d;e+=t.scrollLeft*o,n+=t.scrollTop*r}while(t!==i&&(t=t.parentNode));return[e,n]}function Up(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var i in e)if(e.hasOwnProperty(i)&&e[i]===t[n][i])return Number(n)}return-1}function le(t,e){if(!t||!t.getBoundingClientRect)return qt();var n=t,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var s=R(n);if(n.clientWidth<n.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return qt();if(i||e)return n;i=!0}}while(n=n.parentNode);return qt()}function Wp(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Yi(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var hn;function Ga(t,e){return function(){if(!hn){var n=arguments,i=this;n.length===1?t.call(i,n[0]):t.apply(i,n),hn=setTimeout(function(){hn=void 0},e)}}}function Xp(){clearTimeout(hn),hn=void 0}function qa(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Ua(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var St="Sortable"+new Date().getTime();function Yp(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(R(i,"display")==="none"||i===L.ghost)){t.push({target:i,rect:ct(i)});var s=Wt({},t[t.length-1].rect);if(i.thisAnimationDuration){var o=qe(i,!0);o&&(s.top-=o.f,s.left-=o.e)}i.fromRect=s}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(Up(t,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,o=0;t.forEach(function(r){var a=0,u=r.target,c=u.fromRect,l=ct(u),d=u.prevFromRect,h=u.prevToRect,p=r.rect,g=qe(u,!0);g&&(l.top-=g.f,l.left-=g.e),u.toRect=l,u.thisAnimationDuration&&Yi(d,l)&&!Yi(c,l)&&(p.top-l.top)/(p.left-l.left)===(c.top-l.top)/(c.left-l.left)&&(a=Zp(p,d,h,i.options)),Yi(l,c)||(u.prevFromRect=c,u.prevToRect=l,a||(a=i.options.animation),i.animate(u,p,l,a)),a&&(s=!0,o=Math.max(o,a),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},a),u.thisAnimationDuration=a)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},o):typeof n=="function"&&n(),t=[]},animate:function(n,i,s,o){if(o){R(n,"transition",""),R(n,"transform","");var r=qe(this.el),a=r&&r.a,u=r&&r.d,c=(i.left-s.left)/(a||1),l=(i.top-s.top)/(u||1);n.animatingX=!!c,n.animatingY=!!l,R(n,"transform","translate3d("+c+"px,"+l+"px,0)"),this.forRepaintDummy=Kp(n),R(n,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),R(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){R(n,"transition",""),R(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},o)}}}}function Kp(t){return t.offsetWidth}function Zp(t,e,n,i){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*i.animation}var Ne=[],Ki={initializeByDefault:!0},Sn={mount:function(t){for(var e in Ki)Ki.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ki[e]);Ne.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Ne.push(t)},pluginEvent:function(t,e,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=t+"Global";Ne.forEach(function(o){e[o.pluginName]&&(e[o.pluginName][s]&&e[o.pluginName][s](Wt({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](Wt({sortable:e},n)))})},initializePlugins:function(t,e,n,i){Ne.forEach(function(r){var a=r.pluginName;if(!(!t.options[a]&&!r.initializeByDefault)){var u=new r(t,e,t.options);u.sortable=t,u.options=t.options,t[a]=u,te(n,u.defaults)}});for(var s in t.options)if(t.options.hasOwnProperty(s)){var o=this.modifyOption(t,s,t.options[s]);typeof o<"u"&&(t.options[s]=o)}},getEventProperties:function(t,e){var n={};return Ne.forEach(function(i){typeof i.eventProperties=="function"&&te(n,i.eventProperties.call(e[i.pluginName],t))}),n},modifyOption:function(t,e,n){var i;return Ne.forEach(function(s){t[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[e]=="function"&&(i=s.optionListeners[e].call(t[s.pluginName],n))}),i}};function Jp(t){var e=t.sortable,n=t.rootEl,i=t.name,s=t.targetEl,o=t.cloneEl,r=t.toEl,a=t.fromEl,u=t.oldIndex,c=t.newIndex,l=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[St],!!e){var f,y=e.options,v="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ne&&!_n?f=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent(i,!0,!0)),f.to=r||n,f.from=a||n,f.item=s||n,f.clone=o,f.oldIndex=u,f.newIndex=c,f.oldDraggableIndex=l,f.newDraggableIndex=d,f.originalEvent=h,f.pullMode=p?p.lastPutMode:void 0;var k=Wt(Wt({},g),Sn.getEventProperties(i,e));for(var w in k)f[w]=k[w];n&&n.dispatchEvent(f),y[v]&&y[v].call(e,f)}}var Qp=["evt"],bt=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=zp(n,Qp);Sn.pluginEvent.bind(L)(t,e,Wt({dragEl:C,parentEl:it,ghostEl:j,rootEl:Q,nextEl:ke,lastDownEl:qn,cloneEl:st,cloneHidden:ae,dragStarted:en,putSortable:dt,activeSortable:L.active,originalEvent:i,oldIndex:ze,oldDraggableIndex:pn,newIndex:Ct,newDraggableIndex:re,hideGhostForTarget:Ka,unhideGhostForTarget:Za,cloneNowHidden:function(){ae=!0},cloneNowShown:function(){ae=!1},dispatchSortableEvent:function(o){pt({sortable:e,name:o,originalEvent:i})}},s))};function pt(t){Jp(Wt({putSortable:dt,cloneEl:st,targetEl:C,rootEl:Q,oldIndex:ze,oldDraggableIndex:pn,newIndex:Ct,newDraggableIndex:re},t))}var C,it,j,Q,ke,qn,st,ae,ze,Ct,pn,re,Rn,dt,$e=!1,vi=!1,mi=[],be,Bt,Zi,Ji,rr,ar,en,je,fn,gn=!1,Pn=!1,Un,ht,Qi=[],As=!1,bi=[],Mi=typeof document<"u",Ln=$a,lr=_n||ne?"cssFloat":"float",tf=Mi&&!Gp&&!$a&&"draggable"in document.createElement("div"),Wa=function(){if(Mi){if(ne)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Xa=function(t,e){var n=R(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=Ye(t,0,e),o=Ye(t,1,e),r=s&&R(s),a=o&&R(o),u=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+ct(s).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+ct(o).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&r.float&&r.float!=="none"){var l=r.float==="left"?"left":"right";return o&&(a.clear==="both"||a.clear===l)?"vertical":"horizontal"}return s&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||u>=i&&n[lr]==="none"||o&&n[lr]==="none"&&u+c>i)?"vertical":"horizontal"},ef=function(t,e,n){var i=n?t.left:t.top,s=n?t.right:t.bottom,o=n?t.width:t.height,r=n?e.left:e.top,a=n?e.right:e.bottom,u=n?e.width:e.height;return i===r||s===a||i+o/2===r+u/2},nf=function(t,e){var n;return mi.some(function(i){var s=i[St].options.emptyInsertThreshold;if(!(!s||Qs(i))){var o=ct(i),r=t>=o.left-s&&t<=o.right+s,a=e>=o.top-s&&e<=o.bottom+s;if(r&&a)return n=i}}),n},Ya=function(t){function e(s,o){return function(r,a,u,c){var l=r.options.group.name&&a.options.group.name&&r.options.group.name===a.options.group.name;if(s==null&&(o||l))return!0;if(s==null||s===!1)return!1;if(o&&s==="clone")return s;if(typeof s=="function")return e(s(r,a,u,c),o)(r,a,u,c);var d=(o?r:a).options.group.name;return s===!0||typeof s=="string"&&s===d||s.join&&s.indexOf(d)>-1}}var n={},i=t.group;(!i||Gn(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Ka=function(){!Wa&&j&&R(j,"display","none")},Za=function(){!Wa&&j&&R(j,"display","")};Mi&&document.addEventListener("click",function(t){if(vi)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),vi=!1,!1},!0);var ye=function(t){if(C){t=t.touches?t.touches[0]:t;var e=nf(t.clientX,t.clientY);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[St]._onDragOver(n)}}},sf=function(t){C&&C.parentNode[St]._isOutsideThisEl(t.target)};function L(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=te({},e),t[St]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Xa(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,r){o.setData("Text",r.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:L.supportPointer!==!1&&"PointerEvent"in window&&!dn,emptyInsertThreshold:5};Sn.initializePlugins(this,t,n);for(var i in n)!(i in e)&&(e[i]=n[i]);Ya(e);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=e.forceFallback?!1:tf,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Y(t,"pointerdown",this._onTapStart):(Y(t,"mousedown",this._onTapStart),Y(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Y(t,"dragover",this),Y(t,"dragenter",this)),mi.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),te(this,Yp())}L.prototype={constructor:L,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(je=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,C):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,s=i.preventOnFilter,o=t.type,r=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,a=(r||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=i.filter;if(hf(n),!C&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&dn&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=zt(a,i.draggable,n,!1),!(a&&a.animated)&&qn!==a)){if(ze=Ot(a),pn=Ot(a,i.draggable),typeof c=="function"){if(c.call(this,t,a,this)){pt({sortable:e,rootEl:u,name:"filter",targetEl:a,toEl:n,fromEl:n}),bt("filter",e,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(l){if(l=zt(u,l.trim(),n,!1),l)return pt({sortable:e,rootEl:l,name:"filter",targetEl:a,fromEl:n,toEl:n}),bt("filter",e,{evt:t}),!0}),c)){s&&t.cancelable&&t.preventDefault();return}i.handle&&!zt(u,i.handle,n,!1)||this._prepareDragStart(t,r,a)}}},_prepareDragStart:function(t,e,n){var i=this,s=i.el,o=i.options,r=s.ownerDocument,a;if(n&&!C&&n.parentNode===s){var u=ct(n);if(Q=s,C=n,it=C.parentNode,ke=C.nextSibling,qn=n,Rn=o.group,L.dragged=C,be={target:C,clientX:(e||t).clientX,clientY:(e||t).clientY},rr=be.clientX-u.left,ar=be.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,C.style["will-change"]="all",a=function(){if(bt("delayEnded",i,{evt:t}),L.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!nr&&i.nativeDraggable&&(C.draggable=!0),i._triggerDragStart(t,e),pt({sortable:i,name:"choose",originalEvent:t}),wt(C,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){Ha(C,c.trim(),ts)}),Y(r,"dragover",ye),Y(r,"mousemove",ye),Y(r,"touchmove",ye),Y(r,"mouseup",i._onDrop),Y(r,"touchend",i._onDrop),Y(r,"touchcancel",i._onDrop),nr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,C.draggable=!0),bt("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(_n||ne))){if(L.eventCanceled){this._onDrop();return}Y(r,"mouseup",i._disableDelayedDrag),Y(r,"touchend",i._disableDelayedDrag),Y(r,"touchcancel",i._disableDelayedDrag),Y(r,"mousemove",i._delayedDragTouchMoveHandler),Y(r,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&Y(r,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(a,o.delay)}else a()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){C&&ts(C),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;U(t,"mouseup",this._disableDelayedDrag),U(t,"touchend",this._disableDelayedDrag),U(t,"touchcancel",this._disableDelayedDrag),U(t,"mousemove",this._delayedDragTouchMoveHandler),U(t,"touchmove",this._delayedDragTouchMoveHandler),U(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?Y(document,"pointermove",this._onTouchMove):e?Y(document,"touchmove",this._onTouchMove):Y(document,"mousemove",this._onTouchMove):(Y(C,"dragend",this),Y(Q,"dragstart",this._onDragStart));try{document.selection?Wn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if($e=!1,Q&&C){bt("dragStarted",this,{evt:e}),this.nativeDraggable&&Y(document,"dragover",sf);var n=this.options;!t&&wt(C,n.dragClass,!1),wt(C,n.ghostClass,!0),L.active=this,t&&this._appendGhost(),pt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Bt){this._lastX=Bt.clientX,this._lastY=Bt.clientY,Ka();for(var t=document.elementFromPoint(Bt.clientX,Bt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Bt.clientX,Bt.clientY),t!==e);)e=t;if(C.parentNode[St]._isOutsideThisEl(t),e)do{if(e[St]){var n=void 0;if(n=e[St]._onDragOver({clientX:Bt.clientX,clientY:Bt.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Za()}},_onTouchMove:function(t){if(be){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,s=t.touches?t.touches[0]:t,o=j&&qe(j,!0),r=j&&o&&o.a,a=j&&o&&o.d,u=Ln&&ht&&or(ht),c=(s.clientX-be.clientX+i.x)/(r||1)+(u?u[0]-Qi[0]:0)/(r||1),l=(s.clientY-be.clientY+i.y)/(a||1)+(u?u[1]-Qi[1]:0)/(a||1);if(!L.active&&!$e){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(j){o?(o.e+=c-(Zi||0),o.f+=l-(Ji||0)):o={a:1,b:0,c:0,d:1,e:c,f:l};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");R(j,"webkitTransform",d),R(j,"mozTransform",d),R(j,"msTransform",d),R(j,"transform",d),Zi=c,Ji=l,Bt=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!j){var t=this.options.fallbackOnBody?document.body:Q,e=ct(C,!0,Ln,!0,t),n=this.options;if(Ln){for(ht=t;R(ht,"position")==="static"&&R(ht,"transform")==="none"&&ht!==document;)ht=ht.parentNode;ht!==document.body&&ht!==document.documentElement?(ht===document&&(ht=qt()),e.top+=ht.scrollTop,e.left+=ht.scrollLeft):ht=qt(),Qi=or(ht)}j=C.cloneNode(!0),wt(j,n.ghostClass,!1),wt(j,n.fallbackClass,!0),wt(j,n.dragClass,!0),R(j,"transition",""),R(j,"transform",""),R(j,"box-sizing","border-box"),R(j,"margin",0),R(j,"top",e.top),R(j,"left",e.left),R(j,"width",e.width),R(j,"height",e.height),R(j,"opacity","0.8"),R(j,"position",Ln?"absolute":"fixed"),R(j,"zIndex","100000"),R(j,"pointerEvents","none"),L.ghost=j,t.appendChild(j),R(j,"transform-origin",rr/parseInt(j.style.width)*100+"% "+ar/parseInt(j.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,i=t.dataTransfer,s=n.options;if(bt("dragStart",this,{evt:t}),L.eventCanceled){this._onDrop();return}bt("setupClone",this),L.eventCanceled||(st=Ua(C),st.draggable=!1,st.style["will-change"]="",this._hideClone(),wt(st,this.options.chosenClass,!1),L.clone=st),n.cloneId=Wn(function(){bt("clone",n),!L.eventCanceled&&(n.options.removeCloneOnHide||Q.insertBefore(st,C),n._hideClone(),pt({sortable:n,name:"clone"}))}),!e&&wt(C,s.dragClass,!0),e?(vi=!0,n._loopId=setInterval(n._emulateDragOver,50)):(U(document,"mouseup",n._onDrop),U(document,"touchend",n._onDrop),U(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,C)),Y(document,"drop",n),R(C,"transform","translateZ(0)")),$e=!0,n._dragStartId=Wn(n._dragStarted.bind(n,e,t)),Y(document,"selectstart",n),en=!0,dn&&R(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,i,s,o,r=this.options,a=r.group,u=L.active,c=Rn===a,l=r.sort,d=dt||u,h,p=this,g=!1;if(As)return;function f(X,$t){bt(X,p,Wt({evt:t,isOwner:c,axis:h?"vertical":"horizontal",revert:o,dragRect:i,targetRect:s,canSort:l,fromSortable:d,target:n,completed:v,onMove:function(ie,Lt){return Bn(Q,e,C,i,ie,ct(ie),t,Lt)},changed:k},$t))}function y(){f("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function v(X){return f("dragOverCompleted",{insertion:X}),X&&(c?u._hideClone():u._showClone(p),p!==d&&(wt(C,dt?dt.options.ghostClass:u.options.ghostClass,!1),wt(C,r.ghostClass,!0)),dt!==p&&p!==L.active?dt=p:p===L.active&&dt&&(dt=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){f("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===C&&!C.animated||n===e&&!n.animated)&&(je=null),!r.dragoverBubble&&!t.rootEl&&n!==document&&(C.parentNode[St]._isOutsideThisEl(t.target),!X&&ye(t)),!r.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function k(){Ct=Ot(C),re=Ot(C,r.draggable),pt({sortable:p,name:"change",toEl:e,newIndex:Ct,newDraggableIndex:re,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=zt(n,r.draggable,e,!0),f("dragOver"),L.eventCanceled)return g;if(C.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return v(!1);if(vi=!1,u&&!r.disabled&&(c?l||(o=it!==Q):dt===this||(this.lastPutMode=Rn.checkPull(this,u,C,t))&&a.checkPut(this,u,C,t))){if(h=this._getDirection(t,n)==="vertical",i=ct(C),f("dragOverValid"),L.eventCanceled)return g;if(o)return it=Q,y(),this._hideClone(),f("revert"),L.eventCanceled||(ke?Q.insertBefore(C,ke):Q.appendChild(C)),v(!0);var w=Qs(e,r.draggable);if(!w||lf(t,h,this)&&!w.animated){if(w===C)return v(!1);if(w&&e===t.target&&(n=w),n&&(s=ct(n)),Bn(Q,e,C,i,n,s,t,!!n)!==!1)return y(),e.appendChild(C),it=e,k(),v(!0)}else if(w&&af(t,h,this)){var T=Ye(e,0,r,!0);if(T===C)return v(!1);if(n=T,s=ct(n),Bn(Q,e,C,i,n,s,t,!1)!==!1)return y(),e.insertBefore(C,T),it=e,k(),v(!0)}else if(n.parentNode===e){s=ct(n);var M=0,D,W=C.parentNode!==e,x=!ef(C.animated&&C.toRect||i,n.animated&&n.toRect||s,h),b=h?"top":"left",m=sr(n,"top","top")||sr(C,"top","top"),E=m?m.scrollTop:void 0;je!==n&&(D=s[b],gn=!1,Pn=!x&&r.invertSwap||W),M=uf(t,n,s,h,x?1:r.swapThreshold,r.invertedSwapThreshold==null?r.swapThreshold:r.invertedSwapThreshold,Pn,je===n);var F;if(M!==0){var z=Ot(C);do z-=M,F=it.children[z];while(F&&(R(F,"display")==="none"||F===j))}if(M===0||F===n)return v(!1);je=n,fn=M;var N=n.nextElementSibling,B=!1;B=M===1;var P=Bn(Q,e,C,i,n,s,t,B);if(P!==!1)return(P===1||P===-1)&&(B=P===1),As=!0,setTimeout(rf,30),y(),B&&!N?e.appendChild(C):n.parentNode.insertBefore(C,B?N:n),m&&qa(m,0,E-m.scrollTop),it=C.parentNode,D!==void 0&&!Pn&&(Un=Math.abs(D-ct(n)[b])),k(),v(!0)}if(e.contains(C))return v(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){U(document,"mousemove",this._onTouchMove),U(document,"touchmove",this._onTouchMove),U(document,"pointermove",this._onTouchMove),U(document,"dragover",ye),U(document,"mousemove",ye),U(document,"touchmove",ye)},_offUpEvents:function(){var t=this.el.ownerDocument;U(t,"mouseup",this._onDrop),U(t,"touchend",this._onDrop),U(t,"pointerup",this._onDrop),U(t,"touchcancel",this._onDrop),U(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(Ct=Ot(C),re=Ot(C,n.draggable),bt("drop",this,{evt:t}),it=C&&C.parentNode,Ct=Ot(C),re=Ot(C,n.draggable),L.eventCanceled){this._nulling();return}$e=!1,Pn=!1,gn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ts(this.cloneId),Ts(this._dragStartId),this.nativeDraggable&&(U(document,"drop",this),U(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),dn&&R(document.body,"user-select",""),R(C,"transform",""),t&&(en&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),j&&j.parentNode&&j.parentNode.removeChild(j),(Q===it||dt&&dt.lastPutMode!=="clone")&&st&&st.parentNode&&st.parentNode.removeChild(st),C&&(this.nativeDraggable&&U(C,"dragend",this),ts(C),C.style["will-change"]="",en&&!$e&&wt(C,dt?dt.options.ghostClass:this.options.ghostClass,!1),wt(C,this.options.chosenClass,!1),pt({sortable:this,name:"unchoose",toEl:it,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==it?(Ct>=0&&(pt({rootEl:it,name:"add",toEl:it,fromEl:Q,originalEvent:t}),pt({sortable:this,name:"remove",toEl:it,originalEvent:t}),pt({rootEl:it,name:"sort",toEl:it,fromEl:Q,originalEvent:t}),pt({sortable:this,name:"sort",toEl:it,originalEvent:t})),dt&&dt.save()):Ct!==ze&&Ct>=0&&(pt({sortable:this,name:"update",toEl:it,originalEvent:t}),pt({sortable:this,name:"sort",toEl:it,originalEvent:t})),L.active&&((Ct==null||Ct===-1)&&(Ct=ze,re=pn),pt({sortable:this,name:"end",toEl:it,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){bt("nulling",this),Q=C=it=j=ke=st=qn=ae=be=Bt=en=Ct=re=ze=pn=je=fn=dt=Rn=L.dragged=L.ghost=L.clone=L.active=null,bi.forEach(function(t){t.checked=!0}),bi.length=Zi=Ji=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":C&&(this._onDragOver(t),of(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,i=0,s=n.length,o=this.options;i<s;i++)e=n[i],zt(e,o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||df(e));return t},sort:function(t,e){var n={},i=this.el;this.toArray().forEach(function(s,o){var r=i.children[o];zt(r,this.options.draggable,i,!1)&&(n[s]=r)},this),e&&this.captureAnimationState(),t.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return zt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var i=Sn.modifyOption(this,t,e);typeof i<"u"?n[t]=i:n[t]=e,t==="group"&&Ya(n)},destroy:function(){bt("destroy",this);var t=this.el;t[St]=null,U(t,"mousedown",this._onTapStart),U(t,"touchstart",this._onTapStart),U(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(U(t,"dragover",this),U(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),mi.splice(mi.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ae){if(bt("hideClone",this),L.eventCanceled)return;R(st,"display","none"),this.options.removeCloneOnHide&&st.parentNode&&st.parentNode.removeChild(st),ae=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(ae){if(bt("showClone",this),L.eventCanceled)return;C.parentNode==Q&&!this.options.group.revertClone?Q.insertBefore(st,C):ke?Q.insertBefore(st,ke):Q.appendChild(st),this.options.group.revertClone&&this.animate(C,st),R(st,"display",""),ae=!1}}};function of(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Bn(t,e,n,i,s,o,r,a){var u,c=t[St],l=c.options.onMove,d;return window.CustomEvent&&!ne&&!_n?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=t,u.dragged=n,u.draggedRect=i,u.related=s||e,u.relatedRect=o||ct(e),u.willInsertAfter=a,u.originalEvent=r,t.dispatchEvent(u),l&&(d=l.call(c,u,r)),d}function ts(t){t.draggable=!1}function rf(){As=!1}function af(t,e,n){var i=ct(Ye(n.el,0,n.options,!0)),s=10;return e?t.clientX<i.left-s||t.clientY<i.top&&t.clientX<i.right:t.clientY<i.top-s||t.clientY<i.bottom&&t.clientX<i.left}function lf(t,e,n){var i=ct(Qs(n.el,n.options.draggable)),s=10;return e?t.clientX>i.right+s||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+s}function uf(t,e,n,i,s,o,r,a){var u=i?t.clientY:t.clientX,c=i?n.height:n.width,l=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!r){if(a&&Un<c*s){if(!gn&&(fn===1?u>l+c*o/2:u<d-c*o/2)&&(gn=!0),gn)h=!0;else if(fn===1?u<l+Un:u>d-Un)return-fn}else if(u>l+c*(1-s)/2&&u<d-c*(1-s)/2)return cf(e)}return h=h||r,h&&(u<l+c*o/2||u>d-c*o/2)?u>l+c/2?1:-1:0}function cf(t){return Ot(C)<Ot(t)?1:-1}function df(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,i=0;n--;)i+=e.charCodeAt(n);return i.toString(36)}function hf(t){bi.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var i=e[n];i.checked&&bi.push(i)}}function Wn(t){return setTimeout(t,0)}function Ts(t){return clearTimeout(t)}Mi&&Y(document,"touchmove",function(t){(L.active||$e)&&t.cancelable&&t.preventDefault()});L.utils={on:Y,off:U,css:R,find:Ha,is:function(t,e){return!!zt(t,e,t,!1)},extend:Wp,throttle:Ga,closest:zt,toggleClass:wt,clone:Ua,index:Ot,nextTick:Wn,cancelNextTick:Ts,detectDirection:Xa,getChild:Ye};L.get=function(t){return t[St]};L.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(L.utils=Wt(Wt({},L.utils),i.utils)),Sn.mount(i)})};L.create=function(t,e){return new L(t,e)};L.version=Hp;var rt=[],nn,Is,Ds=!1,es,ns,yi,sn;function pf(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?Y(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Y(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Y(document,"touchmove",this._handleFallbackAutoScroll):Y(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?U(document,"dragover",this._handleAutoScroll):(U(document,"pointermove",this._handleFallbackAutoScroll),U(document,"touchmove",this._handleFallbackAutoScroll),U(document,"mousemove",this._handleFallbackAutoScroll)),ur(),Xn(),Xp()},nulling:function(){yi=Is=nn=Ds=sn=es=ns=null,rt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var i=this,s=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(s,o);if(yi=e,n||this.options.forceAutoScrollFallback||_n||ne||dn){is(e,this.options,r,n);var a=le(r,!0);Ds&&(!sn||s!==es||o!==ns)&&(sn&&ur(),sn=setInterval(function(){var u=le(document.elementFromPoint(s,o),!0);u!==a&&(a=u,Xn()),is(e,i.options,u,n)},10),es=s,ns=o)}else{if(!this.options.bubbleScroll||le(r,!0)===qt()){Xn();return}is(e,this.options,le(r,!1),!1)}}},te(t,{pluginName:"scroll",initializeByDefault:!0})}function Xn(){rt.forEach(function(t){clearInterval(t.pid)}),rt=[]}function ur(){clearInterval(sn)}var is=Ga(function(t,e,n,i){if(e.scroll){var s=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=e.scrollSensitivity,a=e.scrollSpeed,u=qt(),c=!1,l;Is!==n&&(Is=n,Xn(),nn=e.scroll,l=e.scrollFn,nn===!0&&(nn=le(n,!0)));var d=0,h=nn;do{var p=h,g=ct(p),f=g.top,y=g.bottom,v=g.left,k=g.right,w=g.width,T=g.height,M=void 0,D=void 0,W=p.scrollWidth,x=p.scrollHeight,b=R(p),m=p.scrollLeft,E=p.scrollTop;p===u?(M=w<W&&(b.overflowX==="auto"||b.overflowX==="scroll"||b.overflowX==="visible"),D=T<x&&(b.overflowY==="auto"||b.overflowY==="scroll"||b.overflowY==="visible")):(M=w<W&&(b.overflowX==="auto"||b.overflowX==="scroll"),D=T<x&&(b.overflowY==="auto"||b.overflowY==="scroll"));var F=M&&(Math.abs(k-s)<=r&&m+w<W)-(Math.abs(v-s)<=r&&!!m),z=D&&(Math.abs(y-o)<=r&&E+T<x)-(Math.abs(f-o)<=r&&!!E);if(!rt[d])for(var N=0;N<=d;N++)rt[N]||(rt[N]={});(rt[d].vx!=F||rt[d].vy!=z||rt[d].el!==p)&&(rt[d].el=p,rt[d].vx=F,rt[d].vy=z,clearInterval(rt[d].pid),(F!=0||z!=0)&&(c=!0,rt[d].pid=setInterval(function(){i&&this.layer===0&&L.active._onTouchMove(yi);var B=rt[this.layer].vy?rt[this.layer].vy*a:0,P=rt[this.layer].vx?rt[this.layer].vx*a:0;typeof l=="function"&&l.call(L.dragged.parentNode[St],P,B,t,yi,rt[this.layer].el)!=="continue"||qa(rt[this.layer].el,P,B)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==u&&(h=le(h,!1)));Ds=c}},30),Ja=function(t){var e=t.originalEvent,n=t.putSortable,i=t.dragEl,s=t.activeSortable,o=t.dispatchSortableEvent,r=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var u=n||s;r();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,l=document.elementFromPoint(c.clientX,c.clientY);a(),u&&!u.el.contains(l)&&(o("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function to(){}to.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=Ye(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(e,i):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Ja};te(to,{pluginName:"revertOnSpill"});function eo(){}eo.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,i=n||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:Ja};te(eo,{pluginName:"removeOnSpill"});L.mount(new pf);L.mount(eo,to);const ff=["Start","Add","Remove","Update","End"],gf=["Choose","Unchoose","Sort","Filter","Clone"],vf=["Move"],cr={manage:vf,manageAndEmit:ff,emit:gf};[...[...cr.manageAndEmit,...cr.emit].map(t=>t.toLowerCase())];var Yn=(t,e=[])=>({parts:(...n)=>{if(mf(e))return Yn(t,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Yn(t,[...e,...n]),rename:n=>Yn(n,e),keys:()=>e,build:()=>[...new Set(e)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${Ve(t)}"][data-part="${Ve(i)}"]`,`& [data-scope="${Ve(t)}"][data-part="${Ve(i)}"]`].join(", "),attrs:{"data-scope":Ve(t),"data-part":Ve(i)}}}),{})}),Ve=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),mf=t=>t.length===0,Qe=t=>t?"":void 0,bf=t=>t.nodeType===Node.DOCUMENT_NODE?t:t.ownerDocument??document;function yf(t){const e={getRootNode:n=>{var i;return((i=n.getRootNode)==null?void 0:i.call(n))??document},getDoc:n=>bf(e.getRootNode(n)),getWin:n=>e.getDoc(n).defaultView??window,getActiveElement:n=>e.getDoc(n).activeElement,isActiveElement:(n,i)=>i===e.getActiveElement(n),focus(n,i){i!=null&&(e.isActiveElement(n,i)||i.focus({preventScroll:!0}))},getById:(n,i)=>e.getRootNode(n).getElementById(i),setValue:(n,i)=>{if(n==null||i==null)return;const s=i.toString();n.value!==s&&(n.value=i.toString())}};return{...e,...t}}var xf={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},ss=t=>typeof t=="object"&&t!==null,Ce=new WeakMap,on=new WeakSet,kf=(t=Object.is,e=(c,l)=>new Proxy(c,l),n=c=>ss(c)&&!on.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),i=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},s=new WeakMap,o=(c,l,d=i)=>{const h=s.get(c);if(h?.[0]===l)return h[1];const p=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return ni(p,!0),s.set(c,[l,p]),Reflect.ownKeys(c).forEach(g=>{const f=Reflect.get(c,g);on.has(f)?(ni(f,!1),p[g]=f):f instanceof Promise?Object.defineProperty(p,g,{get(){return d(f)}}):Ce.has(f)?p[g]=Ke(f,d):p[g]=f}),Object.freeze(p)},r=new WeakMap,a=[1,1],u=c=>{if(!ss(c))throw new Error("object required");const l=r.get(c);if(l)return l;let d=a[0];const h=new Set,p=(x,b=++a[0])=>{d!==b&&(d=b,h.forEach(m=>m(x,b)))};let g=a[1];const f=(x=++a[1])=>(g!==x&&!h.size&&(g=x,v.forEach(([b])=>{const m=b[1](x);m>d&&(d=m)})),d),y=x=>(b,m)=>{const E=[...b];E[1]=[x,...E[1]],p(E,m)},v=new Map,k=(x,b)=>{if(h.size){const m=b[3](y(x));v.set(x,[b,m])}else v.set(x,[b])},w=x=>{var b;const m=v.get(x);m&&(v.delete(x),(b=m[1])==null||b.call(m))},T=x=>(h.add(x),h.size===1&&v.forEach(([b,m],E)=>{const F=b[3](y(E));v.set(E,[b,F])}),()=>{h.delete(x),h.size===0&&v.forEach(([b,m],E)=>{m&&(m(),v.set(E,[b]))})}),M=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),D=e(M,{deleteProperty(x,b){const m=Reflect.get(x,b);w(b);const E=Reflect.deleteProperty(x,b);return E&&p(["delete",[b],m]),E},set(x,b,m,E){var F;const z=Reflect.has(x,b),N=Reflect.get(x,b,E);if(z&&(t(N,m)||r.has(m)&&t(N,r.get(m))))return!0;w(b),ss(m)&&(m=Zr(m)||m);let B=m;if(!((F=Object.getOwnPropertyDescriptor(x,b))!=null&&F.set))if(m instanceof Promise)m.then(P=>{m.status="fulfilled",m.value=P,p(["resolve",[b],P])}).catch(P=>{m.status="rejected",m.reason=P,p(["reject",[b],P])});else{!Ce.has(m)&&n(m)&&(B=no(m));const P=!on.has(B)&&Ce.get(B);P&&k(b,P)}return Reflect.set(x,b,B,E),p(["set",[b],m,N]),!0}});r.set(c,D);const W=[M,f,o,T];return Ce.set(D,W),Reflect.ownKeys(c).forEach(x=>{const b=Object.getOwnPropertyDescriptor(c,x);b.get||b.set?Object.defineProperty(M,x,b):D[x]=c[x]}),D})=>[u,Ce,on,t,e,n,i,s,o,r,a],[Ef]=kf();function no(t={}){return Ef(t)}function Fs(t,e,n){const i=Ce.get(t);let s;const o=[],r=i[3];let a=!1;const u=r(c=>{if(o.push(c),n){e(o.splice(0));return}s||(s=Promise.resolve().then(()=>{s=void 0,a&&e(o.splice(0))}))});return a=!0,()=>{a=!1,u()}}function Ke(t,e){const n=Ce.get(t),[i,s,o]=n;return o(i,s(),e)}function dr(t){return on.add(t),t}function wf(t,e){Object.keys(e).forEach(i=>{if(Object.getOwnPropertyDescriptor(t,i))throw new Error("object property already defined");const s=e[i],{get:o,set:r}=typeof s=="function"?{get:s}:s,a={};a.get=()=>o(Ke(n)),r&&(a.set=u=>r(n,u)),Object.defineProperty(t,i,a)});const n=no(t);return n}var Cf=(t,e)=>Object.is(t,e);function hr(t,e,n,i,s){let o=Reflect.get(Ke(t),e);const r=s||Cf;function a(){const u=Ke(t);r(o,u[e])||(n(u[e]),o=Reflect.get(u,e))}return Fs(t,a,i)}var _f=Object.defineProperty,Sf=(t,e,n)=>e in t?_f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S=(t,e,n)=>(Sf(t,typeof e!="symbol"?e+"":e,n),n);function Af(t){for(;t.length>0;)t.pop();return t}var pr=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,Yt=t=>t,os=()=>{},fr=(()=>{let t=0;return()=>(t++,t.toString(36))})(),vn=t=>Array.isArray(t),mn=t=>!(t==null||typeof t!="object"||vn(t)),Tf=t=>typeof t=="number"&&!Number.isNaN(t),jt=t=>typeof t=="string",xi=t=>typeof t=="function";function ki(t){if(!If(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(i=>typeof i=="string"),n={};for(const i of e){const s=t[i];s!==void 0&&(n[i]=ki(s))}return n}var If=t=>t&&typeof t=="object"&&t.constructor===Object;function rs(...t){t.length===1?t[0]:t[1],t.length!==2||t[0]}function Kn(...t){const e=t.length===1?t[0]:t[1];t.length!==2||t[0]}function Qa(t,...e){for(const n of e){const i=ki(n);for(const s in i)mn(n[s])?(t[s]||(t[s]={}),Qa(t[s],n[s])):t[s]=n[s]}return t}function gr(t){return _e(t)}function yt(t){return jt(t)?{type:t}:t}function oe(t){return t?vn(t)?t.slice():[t]:[]}function tl(t){return mn(t)&&t.predicate!=null}var Df=()=>!0;function io(t,e,n,i){return s=>{var o;return jt(s)?!!((o=t[s])!=null&&o.call(t,e,n,i)):xi(s)?s(e,n,i):s.predicate(t)(e,n,i)}}function Ff(...t){return{predicate:e=>(n,i,s)=>t.map(io(e,n,i,s)).some(Boolean)}}function Of(...t){return{predicate:e=>(n,i,s)=>t.map(io(e,n,i,s)).every(Boolean)}}function Mf(t){return{predicate:e=>(n,i,s)=>!io(e,n,i,s)(t)}}function Rf(...t){return(e,n,i)=>i.state.matches(...t)}var Pf={or:Ff,and:Of,not:Mf,stateIn:Rf};function el(t,e){return t=t??Df,(n,i,s)=>{if(jt(t)){const o=e[t];return xi(o)?o(n,i,s):o}return tl(t)?t.predicate(e)(n,i,s):t?.(n,i,s)}}function as(t,e){return(n,i,s)=>tl(t)?t.predicate(e)(n,i,s):t}function Lf(t){const e=t.computed??Yt({}),n=t.context??Yt({}),i=no({value:t.initial??"",previousValue:"",event:Yt({}),previousEvent:Yt({}),context:wf(n,e),done:!1,tags:[],hasTag(s){return this.tags.includes(s)},matches(...s){return s.includes(this.value)},can(s){return Yt(this).nextEvents.includes(s)},get nextEvents(){var s,o;const r=((o=(s=t.states)==null?void 0:s[this.value])==null?void 0:o.on)??{},a=t?.on??{};return Object.keys({...r,...a})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return Yt(i)}function Nn(t,e){return(n,i)=>{if(Tf(t))return t;if(xi(t))return t(n,i);if(jt(t)){const s=Number.parseFloat(t);if(!Number.isNaN(s))return s;if(e){const o=e?.[t];return Kn(o==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${t}\`. It doesn't exist in \`options.delays\``),xi(o)?o(n,i):o}}}}function Bf(t){return jt(t)?{target:t}:t}function Nf(t,e){return(n,i,s)=>oe(t).map(Bf).find(o=>el(o.guard,e)(n,i,s)??o.target??o.actions)}var jf=class nl{constructor(e,n){var i,s,o,r,a,u;S(this,"status","Not Started"),S(this,"state"),S(this,"initialState"),S(this,"initialContext"),S(this,"id"),S(this,"type","machine"),S(this,"activityEvents",new Map),S(this,"delayedEvents",new Map),S(this,"stateListeners",new Set),S(this,"contextListeners",new Set),S(this,"eventListeners",new Set),S(this,"doneListeners",new Set),S(this,"contextWatchers",new Set),S(this,"removeStateListener",os),S(this,"removeEventListener",os),S(this,"removeContextListener",os),S(this,"parent"),S(this,"children",new Map),S(this,"guardMap"),S(this,"actionMap"),S(this,"delayMap"),S(this,"activityMap"),S(this,"sync"),S(this,"options"),S(this,"config"),S(this,"start",l=>{if(this.state.value="",this.status==="Running")return this;this.status="Running",this.removeStateListener=Fs(this.state,()=>{this.stateListeners.forEach(y=>{y(this.stateSnapshot)})},this.sync),this.removeEventListener=hr(this.state,"event",y=>{this.executeActions(this.config.onEvent,y),this.eventListeners.forEach(v=>{v(y)})},this.sync),this.removeContextListener=Fs(this.state.context,()=>{this.log("Context:",this.contextSnapshot),this.contextListeners.forEach(y=>{y(this.contextSnapshot)})},this.sync||this.options.debug),this.setupContextWatchers(),this.executeActivities(yt("machine.start"),oe(this.config.activities),"machine.start"),this.executeActions(this.config.entry,yt("machine.start"));const d=yt("machine.init"),h=mn(l)?l.value:l,p=mn(l)?l.context:void 0;p&&this.setContext(p);const g={target:h??this.config.initial},f=this.getNextStateInfo(g,d);return this.initialState=f,this.performStateChangeEffects(this.state.value,f,d),this}),S(this,"setupContextWatchers",()=>{var l;for(const[d,h]of Object.entries(this.config.watch??{})){const p=(l=this.options.compareFns)==null?void 0:l[d],g=hr(this.state.context,d,()=>{this.executeActions(h,this.state.event)},this.sync,p);this.contextWatchers.add(g)}}),S(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,yt("machine.stop")),this.executeActions(this.config.exit,yt("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.stopEventListeners(),this.stopContextListeners(),this.status="Stopped",this}),S(this,"stopEventListeners",()=>{this.eventListeners.clear(),this.removeEventListener()}),S(this,"stopContextListeners",()=>{this.contextListeners.clear(),this.removeContextListener()}),S(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),S(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(l=>l()),this.contextWatchers.clear()}),S(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(l=>{l.forEach(d=>d())}),this.delayedEvents.clear()}),S(this,"stopActivities",l=>{var d,h;l?((d=this.activityEvents.get(l))==null||d.forEach(p=>p()),(h=this.activityEvents.get(l))==null||h.clear(),this.activityEvents.delete(l)):(this.activityEvents.forEach(p=>{p.forEach(g=>g()),p.clear()}),this.activityEvents.clear())}),S(this,"sendChild",(l,d)=>{const h=yt(l),p=pr(d,this.contextSnapshot),g=this.children.get(p);g||Kn(`[@zag-js/core] Cannot send '${h.type}' event to unknown child`),g.send(h)}),S(this,"stopChild",l=>{this.children.has(l)||Kn(`[@zag-js/core > stop-child] Cannot stop unknown child ${l}`),this.children.get(l).stop(),this.children.delete(l)}),S(this,"removeChild",l=>{this.children.delete(l)}),S(this,"stopChildren",()=>{this.children.forEach(l=>l.stop()),this.children.clear()}),S(this,"setParent",l=>{this.parent=l}),S(this,"spawn",(l,d)=>{const h=pr(l);return d&&(h.id=d),h.type="machine.actor",h.setParent(this),this.children.set(h.id,Yt(h)),h.onDone(()=>{this.removeChild(h.id)}).start(),Yt(dr(h))}),S(this,"stopActivity",l=>{var d;if(!this.state.value)return;const h=this.activityEvents.get(this.state.value);(d=h?.get(l))==null||d(),h?.delete(l)}),S(this,"addActivityCleanup",(l,d,h)=>{var p;l&&(this.activityEvents.has(l)?(p=this.activityEvents.get(l))==null||p.set(d,h):this.activityEvents.set(l,new Map([[d,h]])))}),S(this,"setState",l=>{this.state.previousValue=this.state.value,this.state.value=l;const d=this.getStateNode(l);l==null?Af(this.state.tags):this.state.tags=oe(d?.tags)}),S(this,"transformContext",l=>{var d,h;return(h=(d=this.options)==null?void 0:d.transformContext)==null||h.call(d,l),l}),S(this,"setContext",l=>{l&&Qa(this.state.context,this.transformContext(l))}),S(this,"withContext",l=>{const d=this.transformContext(l),h={...this.config.context,...ki(d)};return new nl({...this.config,context:h},this.options)}),S(this,"setOptions",l=>{const d=ki(l);this.actionMap={...this.actionMap,...d.actions},this.delayMap={...this.delayMap,...d.delays},this.activityMap={...this.activityMap,...d.activities},this.guardMap={...this.guardMap,...d.guards}}),S(this,"getStateNode",l=>{var d;if(l)return(d=this.config.states)==null?void 0:d[l]}),S(this,"getNextStateInfo",(l,d)=>{const h=this.determineTransition(l,d),p=!(h!=null&&h.target),g=h?.target??this.state.value,f=this.state.value!==g,y=this.getStateNode(g),v={reenter:!p&&!f&&!(h!=null&&h.internal),transition:h,stateNode:y,target:g,changed:f};return this.log("NextState:",`[${d.type}]`,this.state.value,"---->",v.target),v}),S(this,"getActionFromDelayedTransition",l=>{const d=yt("machine.after"),h=Nn(l.delay,this.delayMap)(this.contextSnapshot,d);let p;return{entry:()=>{p=globalThis.setTimeout(()=>{const g=this.getNextStateInfo(l,d);this.performStateChangeEffects(this.state.value,g,d)},h)},exit:()=>{globalThis.clearTimeout(p)}}}),S(this,"getDelayedEventActions",l=>{const d=this.getStateNode(l),h=yt("machine.after");if(!d||!d.after)return;const p=[],g=[];if(vn(d.after)){const f=this.determineTransition(d.after,h);if(!f)return;const y=this.getActionFromDelayedTransition(f);p.push(y.entry),g.push(y.exit)}else if(mn(d.after))for(const f in d.after){const y=d.after[f];let v={};if(vn(y)){const w=this.determineTransition(y,h);w&&(v=w)}else jt(y)?v={target:y,delay:f}:v={...y,delay:f};const k=this.getActionFromDelayedTransition(v);p.push(k.entry),g.push(k.exit)}return{entries:p,exits:g}}),S(this,"executeActions",(l,d)=>{var h;const p=as(l,this.guardMap)(this.contextSnapshot,d,this.guardMeta);for(const g of oe(p)){const f=jt(g)?(h=this.actionMap)==null?void 0:h[g]:g;rs(jt(g)&&!f,`[@zag-js/core > execute-actions] No implementation found for action: \`${g}\``),f?.(this.state.context,d,this.meta)}}),S(this,"executeActivities",(l,d,h)=>{var p;for(const g of d){const f=jt(g)?(p=this.activityMap)==null?void 0:p[g]:g;if(!f){rs(`[@zag-js/core > execute-activity] No implementation found for activity: \`${g}\``);continue}const y=f(this.state.context,l,this.meta);if(y){const v=jt(g)?g:g.name||fr();this.addActivityCleanup(h??this.state.value,v,y)}}}),S(this,"createEveryActivities",(l,d)=>{if(!l)return;const h=yt("machine.every");if(vn(l)){const p=oe(l).find(f=>{const y=f.delay,v=Nn(y,this.delayMap)(this.contextSnapshot,h);return el(f.guard,this.guardMap)(this.contextSnapshot,h,this.guardMeta)??v!=null});if(!p)return;const g=Nn(p.delay,this.delayMap)(this.contextSnapshot,h);d(()=>{const f=globalThis.setInterval(()=>{this.executeActions(p.actions,h)},g);return()=>{globalThis.clearInterval(f)}})}else for(const p in l){const g=l?.[p],f=Nn(p,this.delayMap)(this.contextSnapshot,h);d(()=>{const y=globalThis.setInterval(()=>{this.executeActions(g,h)},f);return()=>{globalThis.clearInterval(y)}})}}),S(this,"setEvent",l=>{this.state.previousEvent=this.state.event,this.state.event=dr(yt(l))}),S(this,"performExitEffects",(l,d)=>{const h=this.state.value;if(h==="")return;const p=l?this.getStateNode(l):void 0;this.stopActivities(h);const g=as(p?.exit,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=oe(g),y=this.delayedEvents.get(h);y&&f.push(...y),this.executeActions(f,d),this.eventListeners.clear()}),S(this,"performEntryEffects",(l,d)=>{const h=this.getStateNode(l),p=oe(h?.activities);this.createEveryActivities(h?.every,v=>{p.unshift(v)}),p.length>0&&this.executeActivities(d,p);const g=as(h?.entry,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=oe(g),y=this.getDelayedEventActions(l);h!=null&&h.after&&y&&(this.delayedEvents.set(l,y?.exits),f.push(...y.entries)),this.executeActions(f,d),h?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(v=>{v(this.stateSnapshot)}),this.stop())}),S(this,"performTransitionEffects",(l,d)=>{const h=this.determineTransition(l,d);this.executeActions(h?.actions,d)}),S(this,"performStateChangeEffects",(l,d,h)=>{this.setEvent(h);const p=d.changed||d.reenter;p&&this.performExitEffects(l,h),this.performTransitionEffects(d.transition,h),this.setState(d.target),p&&this.performEntryEffects(d.target,h)}),S(this,"determineTransition",(l,d)=>{const h=Nf(l,this.guardMap);return h?.(this.contextSnapshot,d,this.guardMeta)}),S(this,"sendParent",l=>{var d;this.parent||Kn("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const h=yt(l);(d=this.parent)==null||d.send(h)}),S(this,"log",(...l)=>{}),S(this,"send",l=>{const d=yt(l);this.transition(this.state.value,d)}),S(this,"transition",(l,d)=>{var h,p;const g=jt(l)?this.getStateNode(l):l?.stateNode,f=yt(d);if(!g&&!this.config.on){const k=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${l}, \`event\`: ${f.type}`;rs(k);return}const y=((h=g?.on)==null?void 0:h[f.type])??((p=this.config.on)==null?void 0:p[f.type]),v=this.getNextStateInfo(y,f);return this.performStateChangeEffects(this.state.value,v,f),v.stateNode}),S(this,"subscribe",l=>(this.stateListeners.add(l),this.status==="Running"&&l(this.stateSnapshot),()=>{this.stateListeners.delete(l)})),S(this,"onDone",l=>(this.doneListeners.add(l),this)),S(this,"onTransition",l=>(this.stateListeners.add(l),this.status==="Running"&&l(this.stateSnapshot),this)),S(this,"onChange",l=>(this.contextListeners.add(l),this)),S(this,"onEvent",l=>(this.eventListeners.add(l),this)),this.config=gr(e),this.options=gr(n??{}),this.id=this.config.id??`machine-${fr()}`,this.guardMap=((i=this.options)==null?void 0:i.guards)??{},this.actionMap=((s=this.options)==null?void 0:s.actions)??{},this.delayMap=((o=this.options)==null?void 0:o.delays)??{},this.activityMap=((r=this.options)==null?void 0:r.activities)??{},this.sync=((a=this.options)==null?void 0:a.sync)??!1,this.state=Lf(this.config),this.initialContext=Ke(this.state.context),this.transformContext(this.state.context);const c=yt("machine.created");this.executeActions((u=this.config)==null?void 0:u.created,c)}get stateSnapshot(){return Yt(Ke(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){var n;return((n=e.initialState)==null?void 0:n.target)??""}}}get meta(){var e;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((e=this.initialState)==null?void 0:e.target)??"",getState:()=>this.stateSnapshot,getAction:n=>this.actionMap[n],getGuard:n=>this.guardMap[n]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},Vf=(t,e)=>new jf(t,e);function $f(t,e,n){if(!t)return;const i=t.ownerDocument.defaultView||window,s=new i.MutationObserver(o=>{for(const r of o)r.type==="attributes"&&r.attributeName&&e.includes(r.attributeName)&&n(r)});return s.observe(t,{attributes:!0,attributeFilter:e}),()=>s.disconnect()}var il=t=>t.ownerDocument.defaultView||window;function zf(t,e){const{type:n="HTMLInputElement",property:i="value"}=e,s=il(t)[n].prototype;return Object.getOwnPropertyDescriptor(s,i)??{}}function Hf(t,e){var n;(n=zf(t,{type:"HTMLInputElement",property:"checked"}).set)==null||n.call(t,e)}function Gf(t,e){const{checked:n,bubbles:i=!0}=e;if(!t)return;const s=il(t);t instanceof s.HTMLInputElement&&(Hf(t,n),t.dispatchEvent(new s.Event("click",{bubbles:i})),t.dispatchEvent(new s.Event("change",{bubbles:i})))}function qf(t){return Uf(t)?t.form:t.closest("form")}function Uf(t){return t.matches("textarea, input, select, button")}function Wf(t,e){if(!t)return;const n=qf(t);return n?.addEventListener("reset",e,{passive:!0}),()=>{n?.removeEventListener("reset",e)}}function Xf(t,e){const n=t?.closest("fieldset");if(n)return e(n.disabled),$f(n,["disabled"],()=>e(n.disabled))}function Yf(t,e){if(!t)return;const{onFieldsetDisabledChange:n,onFormReset:i}=e,s=[Wf(t,i),Xf(t,n)];return()=>{s.forEach(o=>o?.())}}var vr=t=>t?.constructor.name==="Array",sl=(t,e)=>{if(Object.is(t,e))return!0;if(t==null&&e!=null||t!=null&&e==null)return!1;if(typeof t?.isEqual=="function"&&typeof e?.isEqual=="function")return t.isEqual(e);if(typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();if(vr(t)&&vr(e))return Array.from(t).toString()===Array.from(e).toString();if(typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(e??Object.create(null)),i=n.length;for(let s=0;s<i;s++)if(!Reflect.has(t,n[s]))return!1;for(let s=0;s<i;s++){const o=n[s];if(!sl(t[o],e[o]))return!1}return!0};function ol(t){if(!Kf(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(i=>typeof i=="string"),n={};for(const i of e){const s=t[i];s!==void 0&&(n[i]=ol(s))}return n}var Kf=t=>t&&typeof t=="object"&&t.constructor===Object,Zf=Yn("switch").parts("root","label","control","thumb"),jn=Zf.build(),_t=yf({getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`switch:${t.id}`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`switch:${t.id}:label`},getThumbId:t=>{var e;return((e=t.ids)==null?void 0:e.thumb)??`switch:${t.id}:thumb`},getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`switch:${t.id}:control`},getHiddenInputId:t=>{var e;return((e=t.ids)==null?void 0:e.input)??`switch:${t.id}:input`},getHiddenInputEl:t=>_t.getById(t,_t.getHiddenInputId(t))});function Jf(t,e,n){const i=t.context.isDisabled,s=!i&&t.context.focused,o=t.context.checked,r={"data-active":Qe(t.context.active),"data-focus":Qe(s),"data-hover":Qe(t.context.hovered),"data-disabled":Qe(i),"data-state":t.context.checked?"checked":"unchecked","data-invalid":Qe(t.context.invalid)};return{isChecked:o,isDisabled:i,isFocused:s,setChecked(a){e({type:"CHECKED.SET",checked:a,isTrusted:!1})},toggleChecked(){e({type:"CHECKED.TOGGLE",checked:o,isTrusted:!1})},rootProps:n.label({...jn.root.attrs,...r,dir:t.context.dir,id:_t.getRootId(t.context),htmlFor:_t.getHiddenInputId(t.context),onPointerMove(){i||e({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){i||e({type:"CONTEXT.SET",context:{hovered:!1}})},onPointerDown(a){i||(s&&a.preventDefault(),e({type:"CONTEXT.SET",context:{active:!0}}))},onPointerUp(){i||e({type:"CONTEXT.SET",context:{active:!1}})},onClick(a){a.target===_t.getHiddenInputEl(t.context)&&a.stopPropagation()}}),labelProps:n.element({...jn.label.attrs,...r,dir:t.context.dir,id:_t.getLabelId(t.context)}),thumbProps:n.element({...jn.thumb.attrs,...r,dir:t.context.dir,id:_t.getThumbId(t.context),"aria-hidden":!0}),controlProps:n.element({...jn.control.attrs,...r,dir:t.context.dir,id:_t.getControlId(t.context),"aria-hidden":!0}),hiddenInputProps:n.input({id:_t.getHiddenInputId(t.context),type:"checkbox",required:t.context.required,defaultChecked:o,disabled:i,"aria-labelledby":_t.getLabelId(t.context),"aria-invalid":t.context.invalid,name:t.context.name,form:t.context.form,value:t.context.value,style:xf,onChange(a){const u=a.currentTarget.checked;e({type:"CHECKED.SET",checked:u,isTrusted:!0})},onBlur(){e({type:"CONTEXT.SET",context:{focused:!1}})},onFocus(){e({type:"CONTEXT.SET",context:{focused:!0}})},onKeyDown(a){a.key===" "&&e({type:"CONTEXT.SET",context:{active:!0}})},onKeyUp(a){a.key===" "&&e({type:"CONTEXT.SET",context:{active:!1}})}})}}var{not:mr}=Pf;function Qf(t){const e=ol(t);return Vf({id:"switch",initial:"ready",context:{checked:!1,label:"switch",value:"on",disabled:!1,...e,fieldsetDisabled:!1},computed:{isDisabled:n=>n.disabled||n.fieldsetDisabled},watch:{disabled:"removeFocusIfNeeded",checked:"syncInputElement"},activities:["trackFormControlState"],on:{"CHECKED.TOGGLE":[{guard:mr("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:mr("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}}},{guards:{isTrusted:(n,i)=>!!i.isTrusted},activities:{trackFormControlState(n,i,{send:s,initialContext:o}){return Yf(_t.getHiddenInputEl(n),{onFieldsetDisabledChange(r){n.fieldsetDisabled=r},onFormReset(){s({type:"CHECKED.SET",checked:!!o.checked,src:"form-reset"})}})}},actions:{setContext(n,i){Object.assign(n,i.context)},syncInputElement(n){const i=_t.getHiddenInputEl(n);i&&(i.checked=!!n.checked)},removeFocusIfNeeded(n){n.disabled&&n.focused&&(n.focused=!1)},setChecked(n,i){br.checked(n,i.checked)},toggleChecked(n,i){br.checked(n,!n.checked)},dispatchChangeEvent(n){const i=_t.getHiddenInputEl(n);Gf(i,{checked:n.checked})}}})}var tg={change:t=>{var e;(e=t.onCheckedChange)==null||e.call(t,{checked:t.checked})}},br={checked:(t,e)=>{sl(t.checked,e)||(t.checked=e,tg.change(t))}};const eg={key:0,class:"k-switch__label"},hg=tt({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},labels:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i={id:De(),checked:n.modelValue,disabled:n.disabled,onCheckedChange:({checked:a})=>e("update:modelValue",a)},[s,o]=Ti(Qf(i),{}),r=G(()=>Jf(s.value,o,Ai));return At(()=>n.modelValue,()=>{if(r.value.isChecked!==n.modelValue)return r.value.setChecked(n.modelValue)}),(a,u)=>(_(),O("label",at({class:"k-switch"},r.value.rootProps),[et("input",kt(Rt(r.value.hiddenInputProps)),null,16),et("span",kt(Rt(r.value.controlProps)),[et("span",kt(Rt(r.value.thumbProps)),null,16)],16),et("span",kt(Rt(r.value.labelProps)),[a.labels?(_(),O("span",eg,ut(r.value.isChecked?a.labels.on:a.labels.off),1)):H("",!0)],16)],16))}}),pg=tt({__name:"LazyLoad",props:{wrapperTag:{default:"div"},threshold:{default:0},observerRoot:{default:null}},emits:["intersect"],setup(t,{emit:e}){const n=t,i=J(!1);function s(u){const c=u[0];c.isIntersecting&&(i.value=!0,bl(()=>{e("intersect",c),a()}))}const o=J(),r=J();ge(()=>{o.value=new IntersectionObserver(s,{root:n.observerRoot,threshold:n.threshold}),o.value.observe(r.value)}),Ei(()=>{a()});function a(){o.value&&o.value.disconnect()}return(u,c)=>(_(),nt(he(u.wrapperTag),{ref_key:"rootRef",ref:r,class:"k-lazyload"},{default:lt(()=>[i.value?$(u.$slots,"default",{key:0}):$(u.$slots,"placeholder",{key:1})]),_:3},512))}});export{Ae as C,cg as E,Lo as G,Jt as I,Mp as L,pg as T,hh as V,dg as _,og as a,Mh as b,rg as h,ug as k,sg as l,ig as s,ag as v,hg as x,lg as y};
|
|
14
|
+
*/function Io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Io(Object(n),!0).forEach(function(i){kg(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Io(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function ci(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ci=function(t){return typeof t}:ci=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function kg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(){return ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ct.apply(this,arguments)}function Eg(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,a;for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function _g(e,t){if(e==null)return{};var n=Eg(e,t),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)i=a[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var wg="1.14.0";function at(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var dt=at(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Nn=at(/Edge/i),Fo=at(/firefox/i),kn=at(/safari/i)&&!at(/chrome/i)&&!at(/android/i),vl=at(/iP(ad|od|hone)/i),Cg=at(/chrome/i)&&at(/android/i),bl={capture:!1,passive:!1};function Q(e,t,n){e.addEventListener(t,n,!dt&&bl)}function K(e,t,n){e.removeEventListener(t,n,!dt&&bl)}function Ti(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Ag(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ue(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Ti(e,t):Ti(e,t))||i&&e===n)return e;if(e===n)break}while(e=Ag(e))}return null}var Do=/\s+/g;function Ae(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(Do," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(Do," ")}}function M(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function on(e,t){var n="";if(typeof e=="string")n=e;else do{var i=M(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function yl(e,t,n){if(e){var i=e.getElementsByTagName(t),r=0,a=i.length;if(n)for(;r<a;r++)n(i[r],r);return i}return[]}function Ge(){var e=document.scrollingElement;return e||document.documentElement}function pe(e,t,n,i,r){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,l,u,c,d;if(e!==window&&e.parentNode&&e!==Ge()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,l=a.bottom,u=a.right,c=a.height,d=a.width):(o=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!dt))do if(r&&r.getBoundingClientRect&&(M(r,"transform")!=="none"||n&&M(r,"position")!=="static")){var h=r.getBoundingClientRect();o-=h.top+parseInt(M(r,"border-top-width")),s-=h.left+parseInt(M(r,"border-left-width")),l=o+a.height,u=s+a.width;break}while(r=r.parentNode);if(i&&e!==window){var p=on(r||e),f=p&&p.a,g=p&&p.d;p&&(o/=g,s/=f,d/=f,c/=g,l=o+c,u=s+d)}return{top:o,left:s,bottom:l,right:u,width:d,height:c}}}function Oo(e,t,n){for(var i=gt(e,!0),r=pe(e)[t];i;){var a=pe(i)[n],o=void 0;if(o=r>=a,!o)return i;if(i===Ge())break;i=gt(i,!1)}return!1}function un(e,t,n,i){for(var r=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!=="none"&&o[a]!==V.ghost&&(i||o[a]!==V.dragged)&&Ue(o[a],n.draggable,e,!1)){if(r===t)return o[a];r++}a++}return null}function Ca(e,t){for(var n=e.lastElementChild;n&&(n===V.ghost||M(n,"display")==="none"||t&&!Ti(n,t));)n=n.previousElementSibling;return n||null}function Re(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==V.clone&&(!t||Ti(e,t))&&n++;return n}function Po(e){var t=0,n=0,i=Ge();if(e)do{var r=on(e),a=r.a,o=r.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==i&&(e=e.parentNode));return[t,n]}function Sg(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function gt(e,t){if(!e||!e.getBoundingClientRect)return Ge();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=M(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Ge();if(i||t)return n;i=!0}}while(n=n.parentNode);return Ge()}function Tg(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function hr(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var En;function xl(e,t){return function(){if(!En){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),En=setTimeout(function(){En=void 0},t)}}}function Ig(){clearTimeout(En),En=void 0}function kl(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function El(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Fe="Sortable"+new Date().getTime();function Fg(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(M(i,"display")==="none"||i===V.ghost)){e.push({target:i,rect:pe(i)});var r=Ke({},e[e.length-1].rect);if(i.thisAnimationDuration){var a=on(i,!0);a&&(r.top-=a.f,r.left-=a.e)}i.fromRect=r}})}},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(Sg(e,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var r=!1,a=0;e.forEach(function(o){var s=0,l=o.target,u=l.fromRect,c=pe(l),d=l.prevFromRect,h=l.prevToRect,p=o.rect,f=on(l,!0);f&&(c.top-=f.f,c.left-=f.e),l.toRect=c,l.thisAnimationDuration&&hr(d,c)&&!hr(u,c)&&(p.top-c.top)/(p.left-c.left)===(u.top-c.top)/(u.left-c.left)&&(s=Og(p,d,h,i.options)),hr(c,u)||(l.prevFromRect=u,l.prevToRect=c,s||(s=i.options.animation),i.animate(l,p,c,s)),s&&(r=!0,a=Math.max(a,s),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout(function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null},s),l.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),e=[]},animate:function(n,i,r,a){if(a){M(n,"transition",""),M(n,"transform","");var o=on(this.el),s=o&&o.a,l=o&&o.d,u=(i.left-r.left)/(s||1),c=(i.top-r.top)/(l||1);n.animatingX=!!u,n.animatingY=!!c,M(n,"transform","translate3d("+u+"px,"+c+"px,0)"),this.forRepaintDummy=Dg(n),M(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),M(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){M(n,"transition",""),M(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function Dg(e){return e.offsetWidth}function Og(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var Kt=[],pr={initializeByDefault:!0},jn={mount:function(e){for(var t in pr)pr.hasOwnProperty(t)&&!(t in e)&&(e[t]=pr[t]);Kt.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Kt.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var r=e+"Global";Kt.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][r]&&t[a.pluginName][r](Ke({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](Ke({sortable:t},n)))})},initializePlugins:function(e,t,n,i){Kt.forEach(function(o){var s=o.pluginName;if(!(!e.options[s]&&!o.initializeByDefault)){var l=new o(e,t,e.options);l.sortable=e,l.options=e.options,e[s]=l,ct(n,l.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);typeof a<"u"&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return Kt.forEach(function(i){typeof i.eventProperties=="function"&&ct(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return Kt.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]=="function"&&(i=r.optionListeners[t].call(e[r.pluginName],n))}),i}};function Pg(e){var t=e.sortable,n=e.rootEl,i=e.name,r=e.targetEl,a=e.cloneEl,o=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,p=e.putSortable,f=e.extraEventProperties;if(t=t||n&&n[Fe],!!t){var g,m=t.options,b="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!dt&&!Nn?g=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(i,!0,!0)),g.to=o||n,g.from=s||n,g.item=r||n,g.clone=a,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=p?p.lastPutMode:void 0;var v=Ke(Ke({},f),jn.getEventProperties(i,t));for(var E in v)g[E]=v[E];n&&n.dispatchEvent(g),m[b]&&m[b].call(t,g)}}var Rg=["evt"],we=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,r=_g(n,Rg);jn.pluginEvent.bind(V)(e,t,Ke({dragEl:w,parentEl:se,ghostEl:$,rootEl:ae,nextEl:Dt,lastDownEl:di,cloneEl:le,cloneHidden:ft,dragStarted:gn,putSortable:ge,activeSortable:V.active,originalEvent:i,oldIndex:tn,oldDraggableIndex:_n,newIndex:Se,newDraggableIndex:pt,hideGhostForTarget:Al,unhideGhostForTarget:Sl,cloneNowHidden:function(){ft=!0},cloneNowShown:function(){ft=!1},dispatchSortableEvent:function(a){Ee({sortable:t,name:a,originalEvent:i})}},r))};function Ee(e){Pg(Ke({putSortable:ge,cloneEl:le,targetEl:w,rootEl:ae,oldIndex:tn,oldDraggableIndex:_n,newIndex:Se,newDraggableIndex:pt},e))}var w,se,$,ae,Dt,di,le,ft,tn,Se,_n,pt,Zn,ge,Jt=!1,Ii=!1,Fi=[],Tt,Be,fr,gr,Ro,Mo,gn,Zt,wn,Cn=!1,Jn=!1,hi,be,mr=[],Wr=!1,Di=[],Ki=typeof document<"u",Qn=vl,Vo=Nn||dt?"cssFloat":"float",Mg=Ki&&!Cg&&!vl&&"draggable"in document.createElement("div"),_l=function(){if(Ki){if(dt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),wl=function(e,t){var n=M(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=un(e,0,t),a=un(e,1,t),o=r&&M(r),s=a&&M(a),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+pe(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+pe(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&o.float&&o.float!=="none"){var c=o.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===c)?"vertical":"horizontal"}return r&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||l>=i&&n[Vo]==="none"||a&&n[Vo]==="none"&&l+u>i)?"vertical":"horizontal"},Vg=function(e,t,n){var i=n?e.left:e.top,r=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return i===o||r===s||i+a/2===o+l/2},Bg=function(e,t){var n;return Fi.some(function(i){var r=i[Fe].options.emptyInsertThreshold;if(!(!r||Ca(i))){var a=pe(i),o=e>=a.left-r&&e<=a.right+r,s=t>=a.top-r&&t<=a.bottom+r;if(o&&s)return n=i}}),n},Cl=function(e){function t(r,a){return function(o,s,l,u){var c=o.options.group.name&&s.options.group.name&&o.options.group.name===s.options.group.name;if(r==null&&(a||c))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return t(r(o,s,l,u),a)(o,s,l,u);var d=(a?o:s).options.group.name;return r===!0||typeof r=="string"&&r===d||r.join&&r.indexOf(d)>-1}}var n={},i=e.group;(!i||ci(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Al=function(){!_l&&$&&M($,"display","none")},Sl=function(){!_l&&$&&M($,"display","")};Ki&&document.addEventListener("click",function(e){if(Ii)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ii=!1,!1},!0);var It=function(e){if(w){e=e.touches?e.touches[0]:e;var t=Bg(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Fe]._onDragOver(n)}}},Lg=function(e){w&&w.parentNode[Fe]._isOutsideThisEl(e.target)};function V(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ct({},t),e[Fe]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return wl(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,o){a.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:V.supportPointer!==!1&&"PointerEvent"in window&&!kn,emptyInsertThreshold:5};jn.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);Cl(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:Mg,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Q(e,"pointerdown",this._onTapStart):(Q(e,"mousedown",this._onTapStart),Q(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Q(e,"dragover",this),Q(e,"dragenter",this)),Fi.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ct(this,Fg())}V.prototype={constructor:V,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Zt=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,w):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,r=i.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(o||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=i.filter;if(Wg(n),!w&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||i.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&kn&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=Ue(s,i.draggable,n,!1),!(s&&s.animated)&&di!==s)){if(tn=Re(s),_n=Re(s,i.draggable),typeof u=="function"){if(u.call(this,e,s,this)){Ee({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),we("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=Ue(l,c.trim(),n,!1),c)return Ee({sortable:t,rootEl:c,name:"filter",targetEl:s,fromEl:n,toEl:n}),we("filter",t,{evt:e}),!0}),u)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!Ue(l,i.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var i=this,r=i.el,a=i.options,o=r.ownerDocument,s;if(n&&!w&&n.parentNode===r){var l=pe(n);if(ae=r,w=n,se=w.parentNode,Dt=w.nextSibling,di=n,Zn=a.group,V.dragged=w,Tt={target:w,clientX:(t||e).clientX,clientY:(t||e).clientY},Ro=Tt.clientX-l.left,Mo=Tt.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,w.style["will-change"]="all",s=function(){if(we("delayEnded",i,{evt:e}),V.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Fo&&i.nativeDraggable&&(w.draggable=!0),i._triggerDragStart(e,t),Ee({sortable:i,name:"choose",originalEvent:e}),Ae(w,a.chosenClass,!0)},a.ignore.split(",").forEach(function(u){yl(w,u.trim(),vr)}),Q(o,"dragover",It),Q(o,"mousemove",It),Q(o,"touchmove",It),Q(o,"mouseup",i._onDrop),Q(o,"touchend",i._onDrop),Q(o,"touchcancel",i._onDrop),Fo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,w.draggable=!0),we("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Nn||dt))){if(V.eventCanceled){this._onDrop();return}Q(o,"mouseup",i._disableDelayedDrag),Q(o,"touchend",i._disableDelayedDrag),Q(o,"touchcancel",i._disableDelayedDrag),Q(o,"mousemove",i._delayedDragTouchMoveHandler),Q(o,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Q(o,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){w&&vr(w),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;K(e,"mouseup",this._disableDelayedDrag),K(e,"touchend",this._disableDelayedDrag),K(e,"touchcancel",this._disableDelayedDrag),K(e,"mousemove",this._delayedDragTouchMoveHandler),K(e,"touchmove",this._delayedDragTouchMoveHandler),K(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Q(document,"pointermove",this._onTouchMove):t?Q(document,"touchmove",this._onTouchMove):Q(document,"mousemove",this._onTouchMove):(Q(w,"dragend",this),Q(ae,"dragstart",this._onDragStart));try{document.selection?pi(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Jt=!1,ae&&w){we("dragStarted",this,{evt:t}),this.nativeDraggable&&Q(document,"dragover",Lg);var n=this.options;!e&&Ae(w,n.dragClass,!1),Ae(w,n.ghostClass,!0),V.active=this,e&&this._appendGhost(),Ee({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Be){this._lastX=Be.clientX,this._lastY=Be.clientY,Al();for(var e=document.elementFromPoint(Be.clientX,Be.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Be.clientX,Be.clientY),e!==t);)t=e;if(w.parentNode[Fe]._isOutsideThisEl(e),t)do{if(t[Fe]){var n=void 0;if(n=t[Fe]._onDragOver({clientX:Be.clientX,clientY:Be.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Sl()}},_onTouchMove:function(e){if(Tt){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=$&&on($,!0),o=$&&a&&a.a,s=$&&a&&a.d,l=Qn&&be&&Po(be),u=(r.clientX-Tt.clientX+i.x)/(o||1)+(l?l[0]-mr[0]:0)/(o||1),c=(r.clientY-Tt.clientY+i.y)/(s||1)+(l?l[1]-mr[1]:0)/(s||1);if(!V.active&&!Jt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if($){a?(a.e+=u-(fr||0),a.f+=c-(gr||0)):a={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");M($,"webkitTransform",d),M($,"mozTransform",d),M($,"msTransform",d),M($,"transform",d),fr=u,gr=c,Be=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!$){var e=this.options.fallbackOnBody?document.body:ae,t=pe(w,!0,Qn,!0,e),n=this.options;if(Qn){for(be=e;M(be,"position")==="static"&&M(be,"transform")==="none"&&be!==document;)be=be.parentNode;be!==document.body&&be!==document.documentElement?(be===document&&(be=Ge()),t.top+=be.scrollTop,t.left+=be.scrollLeft):be=Ge(),mr=Po(be)}$=w.cloneNode(!0),Ae($,n.ghostClass,!1),Ae($,n.fallbackClass,!0),Ae($,n.dragClass,!0),M($,"transition",""),M($,"transform",""),M($,"box-sizing","border-box"),M($,"margin",0),M($,"top",t.top),M($,"left",t.left),M($,"width",t.width),M($,"height",t.height),M($,"opacity","0.8"),M($,"position",Qn?"absolute":"fixed"),M($,"zIndex","100000"),M($,"pointerEvents","none"),V.ghost=$,e.appendChild($),M($,"transform-origin",Ro/parseInt($.style.width)*100+"% "+Mo/parseInt($.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,r=n.options;if(we("dragStart",this,{evt:e}),V.eventCanceled){this._onDrop();return}we("setupClone",this),V.eventCanceled||(le=El(w),le.draggable=!1,le.style["will-change"]="",this._hideClone(),Ae(le,this.options.chosenClass,!1),V.clone=le),n.cloneId=pi(function(){we("clone",n),!V.eventCanceled&&(n.options.removeCloneOnHide||ae.insertBefore(le,w),n._hideClone(),Ee({sortable:n,name:"clone"}))}),!t&&Ae(w,r.dragClass,!0),t?(Ii=!0,n._loopId=setInterval(n._emulateDragOver,50)):(K(document,"mouseup",n._onDrop),K(document,"touchend",n._onDrop),K(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(n,i,w)),Q(document,"drop",n),M(w,"transform","translateZ(0)")),Jt=!0,n._dragStartId=pi(n._dragStarted.bind(n,t,e)),Q(document,"selectstart",n),gn=!0,kn&&M(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,r,a,o=this.options,s=o.group,l=V.active,u=Zn===s,c=o.sort,d=ge||l,h,p=this,f=!1;if(Wr)return;function g(Z,ie){we(Z,p,Ke({evt:e,isOwner:u,axis:h?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:c,fromSortable:d,target:n,completed:b,onMove:function(J,qe){return ei(ae,t,w,i,J,pe(J),e,qe)},changed:v},ie))}function m(){g("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function b(Z){return g("dragOverCompleted",{insertion:Z}),Z&&(u?l._hideClone():l._showClone(p),p!==d&&(Ae(w,ge?ge.options.ghostClass:l.options.ghostClass,!1),Ae(w,o.ghostClass,!0)),ge!==p&&p!==V.active?ge=p:p===V.active&&ge&&(ge=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){g("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===w&&!w.animated||n===t&&!n.animated)&&(Zt=null),!o.dragoverBubble&&!e.rootEl&&n!==document&&(w.parentNode[Fe]._isOutsideThisEl(e.target),!Z&&It(e)),!o.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function v(){Se=Re(w),pt=Re(w,o.draggable),Ee({sortable:p,name:"change",toEl:t,newIndex:Se,newDraggableIndex:pt,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Ue(n,o.draggable,t,!0),g("dragOver"),V.eventCanceled)return f;if(w.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return b(!1);if(Ii=!1,l&&!o.disabled&&(u?c||(a=se!==ae):ge===this||(this.lastPutMode=Zn.checkPull(this,l,w,e))&&s.checkPut(this,l,w,e))){if(h=this._getDirection(e,n)==="vertical",i=pe(w),g("dragOverValid"),V.eventCanceled)return f;if(a)return se=ae,m(),this._hideClone(),g("revert"),V.eventCanceled||(Dt?ae.insertBefore(w,Dt):ae.appendChild(w)),b(!0);var E=Ca(t,o.draggable);if(!E||zg(e,h,this)&&!E.animated){if(E===w)return b(!1);if(E&&t===e.target&&(n=E),n&&(r=pe(n)),ei(ae,t,w,i,n,r,e,!!n)!==!1)return m(),t.appendChild(w),se=t,v(),b(!0)}else if(E&&$g(e,h,this)){var T=un(t,0,o,!0);if(T===w)return b(!1);if(n=T,r=pe(n),ei(ae,t,w,i,n,r,e,!1)!==!1)return m(),t.insertBefore(w,T),se=t,v(),b(!0)}else if(n.parentNode===t){r=pe(n);var _=0,S,X=w.parentNode!==t,D=!Vg(w.animated&&w.toRect||i,n.animated&&n.toRect||r,h),C=h?"top":"left",k=Oo(n,"top","top")||Oo(w,"top","top"),y=k?k.scrollTop:void 0;Zt!==n&&(S=r[C],Cn=!1,Jn=!D&&o.invertSwap||X),_=Hg(e,n,r,h,D?1:o.swapThreshold,o.invertedSwapThreshold==null?o.swapThreshold:o.invertedSwapThreshold,Jn,Zt===n);var x;if(_!==0){var I=Re(w);do I-=_,x=se.children[I];while(x&&(M(x,"display")==="none"||x===$))}if(_===0||x===n)return b(!1);Zt=n,wn=_;var B=n.nextElementSibling,L=!1;L=_===1;var N=ei(ae,t,w,i,n,r,e,L);if(N!==!1)return(N===1||N===-1)&&(L=N===1),Wr=!0,setTimeout(jg,30),m(),L&&!B?t.appendChild(w):n.parentNode.insertBefore(w,L?B:n),k&&kl(k,0,y-k.scrollTop),se=w.parentNode,S!==void 0&&!Jn&&(hi=Math.abs(S-pe(n)[C])),v(),b(!0)}if(t.contains(w))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){K(document,"mousemove",this._onTouchMove),K(document,"touchmove",this._onTouchMove),K(document,"pointermove",this._onTouchMove),K(document,"dragover",It),K(document,"mousemove",It),K(document,"touchmove",It)},_offUpEvents:function(){var e=this.el.ownerDocument;K(e,"mouseup",this._onDrop),K(e,"touchend",this._onDrop),K(e,"pointerup",this._onDrop),K(e,"touchcancel",this._onDrop),K(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Se=Re(w),pt=Re(w,n.draggable),we("drop",this,{evt:e}),se=w&&w.parentNode,Se=Re(w),pt=Re(w,n.draggable),V.eventCanceled){this._nulling();return}Jt=!1,Jn=!1,Cn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Gr(this.cloneId),Gr(this._dragStartId),this.nativeDraggable&&(K(document,"drop",this),K(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),kn&&M(document.body,"user-select",""),M(w,"transform",""),e&&(gn&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),$&&$.parentNode&&$.parentNode.removeChild($),(ae===se||ge&&ge.lastPutMode!=="clone")&&le&&le.parentNode&&le.parentNode.removeChild(le),w&&(this.nativeDraggable&&K(w,"dragend",this),vr(w),w.style["will-change"]="",gn&&!Jt&&Ae(w,ge?ge.options.ghostClass:this.options.ghostClass,!1),Ae(w,this.options.chosenClass,!1),Ee({sortable:this,name:"unchoose",toEl:se,newIndex:null,newDraggableIndex:null,originalEvent:e}),ae!==se?(Se>=0&&(Ee({rootEl:se,name:"add",toEl:se,fromEl:ae,originalEvent:e}),Ee({sortable:this,name:"remove",toEl:se,originalEvent:e}),Ee({rootEl:se,name:"sort",toEl:se,fromEl:ae,originalEvent:e}),Ee({sortable:this,name:"sort",toEl:se,originalEvent:e})),ge&&ge.save()):Se!==tn&&Se>=0&&(Ee({sortable:this,name:"update",toEl:se,originalEvent:e}),Ee({sortable:this,name:"sort",toEl:se,originalEvent:e})),V.active&&((Se==null||Se===-1)&&(Se=tn,pt=_n),Ee({sortable:this,name:"end",toEl:se,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){we("nulling",this),ae=w=se=$=Dt=le=di=ft=Tt=Be=gn=Se=pt=tn=_n=Zt=wn=ge=Zn=V.dragged=V.ghost=V.clone=V.active=null,Di.forEach(function(e){e.checked=!0}),Di.length=fr=gr=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":w&&(this._onDragOver(e),Ng(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,r=n.length,a=this.options;i<r;i++)t=n[i],Ue(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||Ug(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(r,a){var o=i.children[a];Ue(o,this.options.draggable,i,!1)&&(n[r]=o)},this),t&&this.captureAnimationState(),e.forEach(function(r){n[r]&&(i.removeChild(n[r]),i.appendChild(n[r]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Ue(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=jn.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&Cl(n)},destroy:function(){we("destroy",this);var e=this.el;e[Fe]=null,K(e,"mousedown",this._onTapStart),K(e,"touchstart",this._onTapStart),K(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(K(e,"dragover",this),K(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Fi.splice(Fi.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ft){if(we("hideClone",this),V.eventCanceled)return;M(le,"display","none"),this.options.removeCloneOnHide&&le.parentNode&&le.parentNode.removeChild(le),ft=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(ft){if(we("showClone",this),V.eventCanceled)return;w.parentNode==ae&&!this.options.group.revertClone?ae.insertBefore(le,w):Dt?ae.insertBefore(le,Dt):ae.appendChild(le),this.options.group.revertClone&&this.animate(w,le),M(le,"display",""),ft=!1}}};function Ng(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function ei(e,t,n,i,r,a,o,s){var l,u=e[Fe],c=u.options.onMove,d;return window.CustomEvent&&!dt&&!Nn?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=r||t,l.relatedRect=a||pe(t),l.willInsertAfter=s,l.originalEvent=o,e.dispatchEvent(l),c&&(d=c.call(u,l,o)),d}function vr(e){e.draggable=!1}function jg(){Wr=!1}function $g(e,t,n){var i=pe(un(n.el,0,n.options,!0)),r=10;return t?e.clientX<i.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-r||e.clientY<i.bottom&&e.clientX<i.left}function zg(e,t,n){var i=pe(Ca(n.el,n.options.draggable)),r=10;return t?e.clientX>i.right+r||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+r}function Hg(e,t,n,i,r,a,o,s){var l=i?e.clientY:e.clientX,u=i?n.height:n.width,c=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!o){if(s&&hi<u*r){if(!Cn&&(wn===1?l>c+u*a/2:l<d-u*a/2)&&(Cn=!0),Cn)h=!0;else if(wn===1?l<c+hi:l>d-hi)return-wn}else if(l>c+u*(1-r)/2&&l<d-u*(1-r)/2)return qg(t)}return h=h||o,h&&(l<c+u*a/2||l>d-u*a/2)?l>c+u/2?1:-1:0}function qg(e){return Re(w)<Re(e)?1:-1}function Ug(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Wg(e){Di.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Di.push(i)}}function pi(e){return setTimeout(e,0)}function Gr(e){return clearTimeout(e)}Ki&&Q(document,"touchmove",function(e){(V.active||Jt)&&e.cancelable&&e.preventDefault()});V.utils={on:Q,off:K,css:M,find:yl,is:function(e,t){return!!Ue(e,t,e,!1)},extend:Tg,throttle:xl,closest:Ue,toggleClass:Ae,clone:El,index:Re,nextTick:pi,cancelNextTick:Gr,detectDirection:wl,getChild:un};V.get=function(e){return e[Fe]};V.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(V.utils=Ke(Ke({},V.utils),i.utils)),jn.mount(i)})};V.create=function(e,t){return new V(e,t)};V.version=wg;var ce=[],mn,Xr,Yr=!1,br,yr,Oi,vn;function Gg(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Q(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Q(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Q(document,"touchmove",this._handleFallbackAutoScroll):Q(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?K(document,"dragover",this._handleAutoScroll):(K(document,"pointermove",this._handleFallbackAutoScroll),K(document,"touchmove",this._handleFallbackAutoScroll),K(document,"mousemove",this._handleFallbackAutoScroll)),Bo(),fi(),Ig()},nulling:function(){Oi=Xr=mn=Yr=vn=br=yr=null,ce.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,a);if(Oi=t,n||this.options.forceAutoScrollFallback||Nn||dt||kn){xr(t,this.options,o,n);var s=gt(o,!0);Yr&&(!vn||r!==br||a!==yr)&&(vn&&Bo(),vn=setInterval(function(){var l=gt(document.elementFromPoint(r,a),!0);l!==s&&(s=l,fi()),xr(t,i.options,l,n)},10),br=r,yr=a)}else{if(!this.options.bubbleScroll||gt(o,!0)===Ge()){fi();return}xr(t,this.options,gt(o,!1),!1)}}},ct(e,{pluginName:"scroll",initializeByDefault:!0})}function fi(){ce.forEach(function(e){clearInterval(e.pid)}),ce=[]}function Bo(){clearInterval(vn)}var xr=xl(function(e,t,n,i){if(t.scroll){var r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,l=Ge(),u=!1,c;Xr!==n&&(Xr=n,fi(),mn=t.scroll,c=t.scrollFn,mn===!0&&(mn=gt(n,!0)));var d=0,h=mn;do{var p=h,f=pe(p),g=f.top,m=f.bottom,b=f.left,v=f.right,E=f.width,T=f.height,_=void 0,S=void 0,X=p.scrollWidth,D=p.scrollHeight,C=M(p),k=p.scrollLeft,y=p.scrollTop;p===l?(_=E<X&&(C.overflowX==="auto"||C.overflowX==="scroll"||C.overflowX==="visible"),S=T<D&&(C.overflowY==="auto"||C.overflowY==="scroll"||C.overflowY==="visible")):(_=E<X&&(C.overflowX==="auto"||C.overflowX==="scroll"),S=T<D&&(C.overflowY==="auto"||C.overflowY==="scroll"));var x=_&&(Math.abs(v-r)<=o&&k+E<X)-(Math.abs(b-r)<=o&&!!k),I=S&&(Math.abs(m-a)<=o&&y+T<D)-(Math.abs(g-a)<=o&&!!y);if(!ce[d])for(var B=0;B<=d;B++)ce[B]||(ce[B]={});(ce[d].vx!=x||ce[d].vy!=I||ce[d].el!==p)&&(ce[d].el=p,ce[d].vx=x,ce[d].vy=I,clearInterval(ce[d].pid),(x!=0||I!=0)&&(u=!0,ce[d].pid=setInterval(function(){i&&this.layer===0&&V.active._onTouchMove(Oi);var L=ce[this.layer].vy?ce[this.layer].vy*s:0,N=ce[this.layer].vx?ce[this.layer].vx*s:0;typeof c=="function"&&c.call(V.dragged.parentNode[Fe],N,L,e,Oi,ce[this.layer].el)!=="continue"||kl(ce[this.layer].el,N,L)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=gt(h,!1)));Yr=u}},30),Tl=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,r=e.activeSortable,a=e.dispatchSortableEvent,o=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||r;o();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(a("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Aa(){}Aa.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=un(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Tl};ct(Aa,{pluginName:"revertOnSpill"});function Sa(){}Sa.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:Tl};ct(Sa,{pluginName:"removeOnSpill"});V.mount(new Gg);V.mount(Sa,Aa);const Xg=["Start","Add","Remove","Update","End"],Yg=["Choose","Unchoose","Sort","Filter","Clone"],Kg=["Move"],Lo={manage:Kg,manageAndEmit:Xg,emit:Yg};[...[...Lo.manageAndEmit,...Lo.emit].map(e=>e.toLowerCase())];var Zg=mt("switch").parts("root","label","control","thumb"),ti=Zg.build(),fe=Rn({getRootId:e=>{var t;return((t=e.ids)==null?void 0:t.root)??`switch:${e.id}`},getLabelId:e=>{var t;return((t=e.ids)==null?void 0:t.label)??`switch:${e.id}:label`},getThumbId:e=>{var t;return((t=e.ids)==null?void 0:t.thumb)??`switch:${e.id}:thumb`},getControlId:e=>{var t;return((t=e.ids)==null?void 0:t.control)??`switch:${e.id}:control`},getHiddenInputId:e=>{var t;return((t=e.ids)==null?void 0:t.hiddenInput)??`switch:${e.id}:input`},getRootEl:e=>fe.getById(e,fe.getRootId(e)),getHiddenInputEl:e=>fe.getById(e,fe.getHiddenInputId(e))});function Jg(e,t,n){const i=e.context.isDisabled,r=e.context.readOnly,a=e.context.checked,o=!i&&e.context.focused,s=!i&&e.context.focusVisible,l={"data-active":R(e.context.active),"data-focus":R(o),"data-focus-visible":R(s),"data-readonly":R(r),"data-hover":R(e.context.hovered),"data-disabled":R(i),"data-state":e.context.checked?"checked":"unchecked","data-invalid":R(e.context.invalid)};return{checked:a,disabled:i,focused:o,setChecked(u){t({type:"CHECKED.SET",checked:u,isTrusted:!1})},toggleChecked(){t({type:"CHECKED.TOGGLE",checked:a,isTrusted:!1})},getRootProps(){return n.label({...ti.root.attrs,...l,dir:e.context.dir,id:fe.getRootId(e.context),htmlFor:fe.getHiddenInputId(e.context),onPointerMove(){i||t({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){i||t({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(u){i||st(u)===fe.getHiddenInputEl(e.context)&&u.stopPropagation()}})},getLabelProps(){return n.element({...ti.label.attrs,...l,dir:e.context.dir,id:fe.getLabelId(e.context)})},getThumbProps(){return n.element({...ti.thumb.attrs,...l,dir:e.context.dir,id:fe.getThumbId(e.context),"aria-hidden":!0})},getControlProps(){return n.element({...ti.control.attrs,...l,dir:e.context.dir,id:fe.getControlId(e.context),"aria-hidden":!0})},getHiddenInputProps(){return n.input({id:fe.getHiddenInputId(e.context),type:"checkbox",required:e.context.required,defaultChecked:a,disabled:i,"aria-labelledby":fe.getLabelId(e.context),"aria-invalid":e.context.invalid,name:e.context.name,form:e.context.form,value:e.context.value,style:ua,onFocus(){const u=In();t({type:"CONTEXT.SET",context:{focused:!0,focusVisible:u}})},onBlur(){t({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(u){if(r){u.preventDefault();return}const c=u.currentTarget.checked;t({type:"CHECKED.SET",checked:c,isTrusted:!0})}})}}}var{not:No}=pa;function Qg(e){const t=lt(e);return Mn({id:"switch",initial:"ready",context:{checked:!1,label:"switch",value:"on",disabled:!1,...t,fieldsetDisabled:!1,focusVisible:!1},computed:{isDisabled:n=>n.disabled||n.fieldsetDisabled},watch:{disabled:"removeFocusIfNeeded",checked:"syncInputElement"},activities:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:No("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:No("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}}},{guards:{isTrusted:(n,i)=>!!i.isTrusted},activities:{trackPressEvent(n){if(!n.isDisabled)return Rs({pointerNode:fe.getRootEl(n),keyboardNode:fe.getHiddenInputEl(n),isValidKey:i=>i.key===" ",onPress:()=>n.active=!1,onPressStart:()=>n.active=!0,onPressEnd:()=>n.active=!1})},trackFocusVisible(n){if(!n.isDisabled)return ca({root:fe.getRootNode(n)})},trackFormControlState(n,i,{send:r,initialContext:a}){return Ni(fe.getHiddenInputEl(n),{onFieldsetDisabledChange(o){n.fieldsetDisabled=o},onFormReset(){r({type:"CHECKED.SET",checked:!!a.checked,src:"form-reset"})}})}},actions:{setContext(n,i){Object.assign(n,i.context)},syncInputElement(n){const i=fe.getHiddenInputEl(n);i&&(i.checked=!!n.checked)},removeFocusIfNeeded(n){n.disabled&&n.focused&&(n.focused=!1)},setChecked(n,i){jo.checked(n,i.checked)},toggleChecked(n,i){jo.checked(n,!n.checked)},dispatchChangeEvent(n){const i=fe.getHiddenInputEl(n);ma(i,{checked:n.checked})}}})}var em={change:e=>{var t;(t=e.onCheckedChange)==null||t.call(e,{checked:e.checked})}},jo={checked:(e,t)=>{vt(e.checked,t)||(e.checked=t,em.change(e))}};qt()(["checked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);const tm={key:0,class:"k-switch__label"},Pm=oe({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},labels:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r={id:_t(),checked:n.modelValue,disabled:n.disabled,onCheckedChange:({checked:l})=>i("update:modelValue",l)},[a,o]=Bn(Qg(r),{}),s=U(()=>Jg(a.value,o,Vn));return Ce(()=>n.modelValue,()=>{if(s.value.checked!==n.modelValue)return s.value.setChecked(n.modelValue)}),(l,u)=>(A(),P("label",te({class:"k-switch"},s.value.getRootProps),[ee("input",ye(Ie(s.value.getHiddenInputProps())),null,16),ee("span",ye(Ie(s.value.getControlProps())),[ee("span",ye(Ie(s.value.getThumbProps())),null,16)],16),ee("span",ye(Ie(s.value.getLabelProps())),[l.labels?(A(),P("span",tm,de(s.value.checked?l.labels.on:l.labels.off),1)):W("",!0)],16)],16))}}),Rm=oe({__name:"LazyLoad",props:{wrapperTag:{default:"div"},threshold:{default:0},observerRoot:{default:null}},emits:["intersect"],setup(e,{emit:t}){const n=e,i=t,r=ne(!1);function a(u){const c=u[0];c.isIntersecting&&(r.value=!0,Ul(()=>{i("intersect",c),l()}))}const o=ne(),s=ne();zt(()=>{o.value=new IntersectionObserver(a,{root:n.observerRoot,threshold:n.threshold}),o.value.observe(s.value)}),Jr(()=>{l()});function l(){o.value&&o.value.disconnect()}return(u,c)=>(A(),ue(kt(u.wrapperTag),{ref_key:"rootRef",ref:s,class:"k-lazyload"},{default:ve(()=>[r.value?z(u.$slots,"default",{key:0}):z(u.$slots,"placeholder",{key:1})]),_:3},512))}});function nm(e){return e%4===0&&e%100!==0||e%400===0}function im(e=""){if(e.length===10){let t=e.replace(".","-").replace("/","-").split("-");if(t.length===3&&t[0].length===4){let n=parseInt(t[0]),i=parseInt(t[1]),r=parseInt(t[2]);if(i===2){if(nm(n)){if(r>29)return!1}else if(r>28)return!1}if((i===4||i===6||i===9||i===11)&&r>30)return!1}return!0}return!0}function tt(e){let t;if(typeof e=="number"&&(t=new Date(e),typeof t=="object"))return!0;if(t=new Date(e),typeof t=="object")return!(t.toString()==="Invalid Date"||!im(e));var n=/^\d{4}\-\d{1,2}\-\d{1,2}$/;if(!n.test(e))return!1;var i=e.split("-"),r=parseInt(i[2],10),a=parseInt(i[1],10),o=parseInt(i[0],10);if(o<1e3||o>3e3||a==0||a>12)return!1;var s=[31,28,31,30,31,30,31,31,30,31,30,31];return(o%400==0||o%100!=0&&o%4==0)&&(s[1]=29),r>0&&r<=s[a-1]}var Pi={required:function(e){var t;return e==null?!1:(t=String(e).replace(/\s/g,""),t.length>0)},required_if:function(e,t,n){return t=this.getParameters(),this.validator._objectPath(this.validator.input,t[0])===t[1]?this.validator.getRule("required").validate(e):!0},required_unless:function(e,t,n){return t=this.getParameters(),this.validator._objectPath(this.validator.input,t[0])!==t[1]?this.validator.getRule("required").validate(e):!0},required_with:function(e,t,n){return this.validator._objectPath(this.validator.input,t)?this.validator.getRule("required").validate(e):!0},required_with_all:function(e,t,n){t=this.getParameters();for(var i=0;i<t.length;i++)if(!this.validator._objectPath(this.validator.input,t[i]))return!0;return this.validator.getRule("required").validate(e)},required_without:function(e,t,n){return this.validator._objectPath(this.validator.input,t)?!0:this.validator.getRule("required").validate(e)},required_without_all:function(e,t,n){t=this.getParameters();for(var i=0;i<t.length;i++)if(this.validator._objectPath(this.validator.input,t[i]))return!0;return this.validator.getRule("required").validate(e)},boolean:function(e){return e===!0||e===!1||e===0||e===1||e==="0"||e==="1"||e==="true"||e==="false"},size:function(e,t,n){if(e){t=parseFloat(t);var i=this.getSize();return i===t}return!0},string:function(e,t,n){return typeof e=="string"},sometimes:function(e){return!0},min:function(e,t,n){var i=this.getSize();return i>=t},max:function(e,t,n){var i=this.getSize();return i<=t},between:function(e,t,n){t=this.getParameters();var i=this.getSize(),r=parseFloat(t[0],10),a=parseFloat(t[1],10);return i>=r&&i<=a},email:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)||(t=/^((?:[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]|[^\u0000-\u007F])+@(?:[a-zA-Z0-9]|[^\u0000-\u007F])(?:(?:[a-zA-Z0-9-]|[^\u0000-\u007F]){0,61}(?:[a-zA-Z0-9]|[^\u0000-\u007F]))?(?:\.(?:[a-zA-Z0-9]|[^\u0000-\u007F])(?:(?:[a-zA-Z0-9-]|[^\u0000-\u007F]){0,61}(?:[a-zA-Z0-9]|[^\u0000-\u007F]))?)+)*$/),t.test(e)},numeric:function(e){var t;return t=Number(e),typeof t=="number"&&!isNaN(t)&&typeof e!="boolean"},array:function(e){return e instanceof Array},url:function(e){return/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_\+.~#?&/=]*)/i.test(e)},alpha:function(e){return/^[a-zA-Z]+$/.test(e)},alpha_dash:function(e){return/^[a-zA-Z0-9_\-]+$/.test(e)},alpha_num:function(e){return/^[a-zA-Z0-9]+$/.test(e)},same:function(e,t){var n=this.validator._flattenObject(this.validator.input)[t],i=e;return n===i},different:function(e,t){var n=this.validator._flattenObject(this.validator.input)[t],i=e;return n!==i},in:function(e,t){var n,i;if(e&&(n=this.getParameters()),e&&!(e instanceof Array)){var r=e;for(i=0;i<n.length;i++)if(typeof n[i]=="string"&&(r=String(e)),r===n[i])return!0;return!1}if(e&&e instanceof Array){for(i=0;i<e.length;i++)if(n.indexOf(e[i])<0)return!1}return!0},not_in:function(e,t){for(var n=this.getParameters(),i=n.length,r=!0,a=0;a<i;a++){var o=e;if(typeof n[a]=="string"&&(o=String(e)),o===n[a]){r=!1;break}}return r},accepted:function(e){return e==="on"||e==="yes"||e===1||e==="1"||e===!0},confirmed:function(e,t,n){var i=n+"_confirmation";return this.validator.input[i]===e},integer:function(e){return String(parseInt(e,10))===String(e)},digits:function(e,t){var n=this.validator.getRule("numeric");return!!(n.validate(e)&&String(e.trim()).length===parseInt(t))},digits_between:function(e){var t=this.validator.getRule("numeric"),n=this.getParameters(),i=String(e).length,r=parseFloat(n[0],10),a=parseFloat(n[1],10);return!!(t.validate(e)&&i>=r&&i<=a)},regex:function(e,t){var n=/[g|i|m]{1,3}$/,i=t.match(n);return i=i?i[0]:"",t=t.replace(n,"").slice(1,-1),t=new RegExp(t,i),!!t.test(e)},date:function(e,t){return tt(e)},present:function(e){return typeof e<"u"},after:function(e,t){var n=this.validator.input[t],i=e;return!tt(n)||!tt(i)?!1:new Date(n).getTime()<new Date(i).getTime()},after_or_equal:function(e,t){var n=this.validator.input[t],i=e;return!tt(n)||!tt(i)?!1:new Date(n).getTime()<=new Date(i).getTime()},before:function(e,t){var n=this.validator.input[t],i=e;return!tt(n)||!tt(i)?!1:new Date(n).getTime()>new Date(i).getTime()},before_or_equal:function(e,t){var n=this.validator.input[t],i=e;return!tt(n)||!tt(i)?!1:new Date(n).getTime()>=new Date(i).getTime()},hex:function(e){return/^[0-9a-f]+$/i.test(e)},ipv4:function(e,t,n){if(typeof e!="string")return!1;var i=/^[0-9]+$/;if(octets=e.split("."),octets.length!=4)return!1;for(let a=0;a<octets.length;a++){const o=octets[a];if(!i.test(o))return!1;var r=parseInt(o);if(r>=256)return!1}return!0},ipv6:function(e,t,n){if(typeof e!="string")return!1;var i=/^[0-9a-f]+$/;if(hextets=e.split(":"),colons=e.match(/::/),colons!=null&&e.match(/::/g).length>1||e[0]==":"&&(colons==null||colons!=null&&colons.index!=0)||e[e.length-1]==":"&&(colons==null||colons!=null&&colons.index!=e.length-2)||3>hextets.length)return!1;var r=hextets.length==9&&colons!=null&&(colons.index==0||colons.index==e.length-2);if(hextets.length>8&&!r||hextets.length!=8&&colons==null)return!1;for(let a=0;a<hextets.length;a++){const o=hextets[a];if(o.length!=0&&(!i.test(o)||o.length>4))return!1}return!0},ip:function(e,t,n){return Pi.ipv4(e,t,n)||Pi.ipv6(e,t,n)}},Il=function(){throw new Error("Validator `"+this.name+"` is not defined!")},Fl;function Dl(e,t,n){this.name=e,this.fn=t,this.passes=null,this._customMessage=void 0,this.async=n}Dl.prototype={validate:function(e,t,n,i){var r=this;if(this._setValidatingData(n,e,t),typeof i=="function"){this.callback=i;var a=function(o,s){r.response(o,s)};return this.async?this._apply(e,t,n,a):a(this._apply(e,t,n))}return this._apply(e,t,n)},_apply:function(e,t,n,i){var r=this.isMissed()?Il:this.fn;return r.apply(this,[e,t,n,i])},_setValidatingData:function(e,t,n){this.attribute=e,this.inputValue=t,this.ruleValue=n},getParameters:function(){var e=[];return typeof this.ruleValue=="string"&&(e=this.ruleValue.split(",")),typeof this.ruleValue=="number"&&e.push(this.ruleValue),this.ruleValue instanceof Array&&(e=this.ruleValue),e},getSize:function(){var e=this.inputValue;return e instanceof Array?e.length:typeof e=="number"?e:this.validator._hasNumericRule(this.attribute)?parseFloat(e,10):e.length},_getValueType:function(){return typeof this.inputValue=="number"||this.validator._hasNumericRule(this.attribute)?"numeric":"string"},response:function(e,t){this.passes=e===void 0||e===!0,this._customMessage=t,this.callback(this.passes,t)},setValidator:function(e){this.validator=e},isMissed:function(){return typeof this.fn!="function"},get customMessage(){return this.isMissed()?Fl:this._customMessage}};var rm={asyncRules:[],implicitRules:["required","required_if","required_unless","required_with","required_with_all","required_without","required_without_all","accepted","present"],make:function(e,t){var n=this.isAsync(e),i=new Dl(e,Pi[e],n);return i.setValidator(t),i},isAsync:function(e){for(var t=0,n=this.asyncRules.length;t<n;t++)if(this.asyncRules[t]===e)return!0;return!1},isImplicit:function(e){return this.implicitRules.indexOf(e)>-1},register:function(e,t){Pi[e]=t},registerImplicit:function(e,t){this.register(e,t),this.implicitRules.push(e)},registerAsync:function(e,t){this.register(e,t),this.asyncRules.push(e)},registerAsyncImplicit:function(e,t){this.registerImplicit(e,t),this.asyncRules.push(e)},registerMissedRuleValidator:function(e,t){Il=e,Fl=t}},am=rm;function om(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sm={between:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{min:n[0],max:n[1]})},digits_between:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{min:n[0],max:n[1]})},required_if:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{other:this._getAttributeName(n[0]),value:n[1]})},required_unless:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{other:this._getAttributeName(n[0]),value:n[1]})},required_with:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{field:this._getAttributeName(n[0])})},required_with_all:function(e,t){var n=t.getParameters(),i=this._getAttributeName.bind(this);return this._replacePlaceholders(t,e,{fields:n.map(i).join(", ")})},required_without:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{field:this._getAttributeName(n[0])})},required_without_all:function(e,t){var n=t.getParameters(),i=this._getAttributeName.bind(this);return this._replacePlaceholders(t,e,{fields:n.map(i).join(", ")})},after:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{after:this._getAttributeName(n[0])})},before:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{before:this._getAttributeName(n[0])})},after_or_equal:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{after_or_equal:this._getAttributeName(n[0])})},before_or_equal:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{before_or_equal:this._getAttributeName(n[0])})},same:function(e,t){var n=t.getParameters();return this._replacePlaceholders(t,e,{same:this._getAttributeName(n[0])})}};function lm(e){return e.replace(/[_\[]/g," ").replace(/]/g,"")}var Ol={replacements:sm,formatter:lm},$o=Ol,Kr=function(e,t){this.lang=e,this.messages=t,this.customMessages={},this.attributeNames={}};Kr.prototype={constructor:Kr,_setCustom:function(e){this.customMessages=e||{}},_setAttributeNames:function(e){this.attributeNames=e},_setAttributeFormatter:function(e){this.attributeFormatter=e},_getAttributeName:function(e){var t=e;return this.attributeNames.hasOwnProperty(e)?this.attributeNames[e]:(this.messages.attributes.hasOwnProperty(e)&&(t=this.messages.attributes[e]),this.attributeFormatter&&(t=this.attributeFormatter(t)),t)},all:function(){return this.messages},render:function(e){if(e.customMessage)return e.customMessage;var t=this._getTemplate(e),n;return $o.replacements[e.name]?n=$o.replacements[e.name].apply(this,[t,e]):n=this._replacePlaceholders(e,t,{}),n},_getTemplate:function(e){for(var t=this.messages,n=t.def,i=this.customMessages,r=[e.name+"."+e.attribute,e.name],a=0,o;a<r.length;a++)if(o=r[a],i.hasOwnProperty(o)){n=i[o];break}else if(t.hasOwnProperty(o)){n=t[o];break}return typeof n=="object"&&(n=n[e._getValueType()]),n},_replacePlaceholders:function(e,t,n){var i,r;if(n.attribute=this._getAttributeName(e.attribute),n[e.name]=n[e.name]||e.getParameters().join(","),typeof t=="string"&&typeof n=="object"){i=t;for(r in n)i=i.replace(new RegExp(":"+r,"g"),n[r])}return i}};var um=Kr,cm=um,dm=om,hm={messages:{},_set:function(e,t){this.messages[e]=t},_setRuleMessage:function(e,t,n){this._load(e),n===void 0&&(n=this.messages[e].def),this.messages[e][t]=n},_load:function(e){if(!this.messages[e])try{var t=dm("./lang/"+e);this._set(e,t)}catch{}},_get:function(e){return this._load(e),this.messages[e]},_make:function(e){return this._load(e),new cm(e,this.messages[e])}},pm=hm,Zr=function(){this.errors={}};Zr.prototype={constructor:Zr,add:function(e,t){this.has(e)||(this.errors[e]=[]),this.errors[e].indexOf(t)===-1&&this.errors[e].push(t)},get:function(e){return this.has(e)?this.errors[e]:[]},first:function(e){return this.has(e)?this.errors[e][0]:!1},all:function(){return this.errors},has:function(e){return!!this.errors.hasOwnProperty(e)}};var fm=Zr;function Pl(e,t){this.onResolvedAll=t,this.onFailedOne=e,this.resolvers={},this.resolversCount=0,this.passed=[],this.failed=[],this.firing=!1}Pl.prototype={add:function(e){var t=this.resolversCount;return this.resolvers[t]=e,this.resolversCount++,t},resolve:function(e){var t=this.resolvers[e];t.passes===!0?this.passed.push(t):t.passes===!1&&(this.failed.push(t),this.onFailedOne(t)),this.fire()},isAllResolved:function(){return this.passed.length+this.failed.length===this.resolversCount},fire:function(){this.firing&&this.isAllResolved()&&this.onResolvedAll(this.failed.length===0)},enableFiring:function(){this.firing=!0}};var gm=Pl,xt=am,Ut=pm,mm=fm,vm=Ol,bm=gm,he=function(e,t,n){var i=he.getDefaultLang();this.input=e||{},this.messages=Ut._make(i),this.messages._setCustom(n),this.setAttributeFormatter(he.prototype.attributeFormatter),this.errors=new mm,this.errorCount=0,this.hasAsync=!1,this.rules=this._parseRules(t)};he.prototype={constructor:he,lang:"en",numericRules:["integer","numeric"],attributeFormatter:vm.formatter,check:function(){for(var e in this.rules){var t=this.rules[e],n=this._objectPath(this.input,e);if(!(this._hasRule(e,["sometimes"])&&!this._suppliedWithData(e)))for(var i=0,r=t.length,a,o,s;i<r&&(o=t[i],a=this.getRule(o.name),!(this._isValidatable(a,n)&&(s=a.validate(n,o.value,e),s||this._addFailure(a),this._shouldStopValidating(e,s))));i++);}return this.errorCount===0},checkAsync:function(e,t){var n=this;e=e||function(){},t=t||function(){};var i=function(f,g){n._addFailure(f,g)},r=function(f){f?e():t()},a=new bm(i,r),o=function(f,g,m,b){return function(){var v=a.add(b);b.validate(f,g.value,m,function(){a.resolve(v)})}};for(var s in this.rules){var l=this.rules[s],u=this._objectPath(this.input,s);if(!(this._hasRule(s,["sometimes"])&&!this._suppliedWithData(s)))for(var c=0,d=l.length,h,p;c<d;c++)p=l[c],h=this.getRule(p.name),this._isValidatable(h,u)&&o(u,p,s,h)()}a.enableFiring(),a.fire()},_addFailure:function(e){var t=this.messages.render(e);this.errors.add(e.attribute,t),this.errorCount++},_flattenObject:function(e){var t={};function n(i,r){if(!(!r&&Object.getOwnPropertyNames(i).length===0))if(Object(i)!==i||Array.isArray(i))t[r]=i;else{var a=!0;for(var o in i)a=!1,n(i[o],r?r+"."+o:o);a&&(t[r]={})}}return e&&n(e),t},_objectPath:function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];var n=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);for(var a=0,o=n.length;a<o;a++)if(typeof i=="object"&&i!==null&&Object.hasOwnProperty.call(i,n[a]))i=i[n[a]];else return;return i},_parseRules:function(e){var t={};e=this._flattenObject(e);for(var n in e){var i=e[n];this._parseRulesCheck(n,i,t)}return t},_parseRulesCheck:function(e,t,n,i){e.indexOf("*")>-1?this._parsedRulesRecurse(e,t,n,i):this._parseRulesDefault(e,t,n,i)},_parsedRulesRecurse:function(e,t,n,i){var r=e.substr(0,e.indexOf("*")-1),a=this._objectPath(this.input,r);if(a)for(var o=0;o<a.length;o++){var s=i?i.slice():[];s.push(o),this._parseRulesCheck(e.replace("*",o),t,n,s)}},_parseRulesDefault:function(e,t,n,i){var r=[];t instanceof Array&&(t=this._prepareRulesArray(t)),typeof t=="string"&&(t=t.split("|"));for(var a=0,o=t.length,s;a<o;a++)s=typeof t[a]=="string"?this._extractRuleAndRuleValue(t[a]):t[a],s.value&&(s.value=this._replaceWildCards(s.value,i),this._replaceWildCardsMessages(i)),xt.isAsync(s.name)&&(this.hasAsync=!0),r.push(s);n[e]=r},_replaceWildCards:function(e,t){if(!t)return e;var n=e;return t.forEach(function(i){Array.isArray(n)&&(n=n[0]);const r=n.indexOf("*");if(r===-1)return n;n=n.substr(0,r)+i+n.substr(r+1)}),Array.isArray(e)&&(e[0]=n,n=e),n},_replaceWildCardsMessages:function(e){var t=this.messages.customMessages,n=this;Object.keys(t).forEach(function(i){if(e){var r=n._replaceWildCards(i,e);t[r]=t[i]}}),this.messages._setCustom(t)},_prepareRulesArray:function(e){for(var t=[],n=0,i=e.length;n<i;n++)if(typeof e[n]=="object")for(var r in e[n])t.push({name:r,value:e[n][r]});else t.push(e[n]);return t},_suppliedWithData:function(e){return this.input.hasOwnProperty(e)},_extractRuleAndRuleValue:function(e){var t={},n;return t.name=e,e.indexOf(":")>=0&&(n=e.split(":"),t.name=n[0],t.value=n.slice(1).join(":")),t},_hasRule:function(e,t){for(var n=this.rules[e]||[],i=0,r=n.length;i<r;i++)if(t.indexOf(n[i].name)>-1)return!0;return!1},_hasNumericRule:function(e){return this._hasRule(e,this.numericRules)},_isValidatable:function(e,t){return Array.isArray(t)||xt.isImplicit(e.name)?!0:this.getRule("required").validate(t)},_shouldStopValidating:function(e,t){var n=this.stopOnAttributes;return typeof n>"u"||n===!1||t===!0?!1:n instanceof Array?n.indexOf(e)>-1:!0},setAttributeNames:function(e){this.messages._setAttributeNames(e)},setAttributeFormatter:function(e){this.messages._setAttributeFormatter(e)},getRule:function(e){return xt.make(e,this)},stopOnError:function(e){this.stopOnAttributes=e},passes:function(e){var t=this._checkAsync("passes",e);return t?this.checkAsync(e):this.check()},fails:function(e){var t=this._checkAsync("fails",e);return t?this.checkAsync(function(){},e):!this.check()},_checkAsync:function(e,t){var n=typeof t=="function";if(this.hasAsync&&!n)throw e+" expects a callback when async rules are being tested.";return this.hasAsync||n}};he.setMessages=function(e,t){return Ut._set(e,t),this};he.getMessages=function(e){return Ut._get(e)};he.useLang=function(e){this.prototype.lang=e};he.getDefaultLang=function(){return this.prototype.lang};he.setAttributeFormatter=function(e){this.prototype.attributeFormatter=e};he.stopOnError=function(e){this.prototype.stopOnAttributes=e};he.register=function(e,t,n,i){var r=he.getDefaultLang();xt.register(e,t),Ut._setRuleMessage(r,e,n)};he.registerImplicit=function(e,t,n,i){var r=he.getDefaultLang();xt.registerImplicit(e,t),Ut._setRuleMessage(r,e,n)};he.registerAsync=function(e,t,n,i){var r=he.getDefaultLang();xt.registerAsync(e,t),Ut._setRuleMessage(r,e,n)};he.registerAsyncImplicit=function(e,t,n){var i=he.getDefaultLang();xt.registerAsyncImplicit(e,t),Ut._setRuleMessage(i,e,n)};he.registerMissedRuleValidator=function(e,t){xt.registerMissedRuleValidator(e,t)};var ym=he;const Rl=fg(ym);ne(!1);Rl.register;Rl.registerAsync;export{Rm as A,Dm as E,Fm as J,Wp as Q,Lt as V,_m as _,Im as a,Vt as b,lo as c,Om as e,Cm as g,Tm as k,Em as l,wm as p,km as s,Am as v,Pm as x,Sm as y};
|